Avatar

emarref

Web Developer
Public vals
9
emarref avatar
emarref
XeroWebhookMiddlewareValidateRequest
Script
Wrapper around the valid hmac signature middleware pre-configured for validating Xero webhook requests. export default await chain() .then(add(validateRequest("my_webhook_signing_key"))) .then(send());
0
emarref avatar
emarref
EnvironmentConfig
Script
Utility to retrieve typesafe environment variable configuration with Zod. const { DB_HOST } = config({ DB_HOST: z.string(), }); // DB_HOST is a string, or an error is thrown.
0
emarref avatar
emarref
HttpMiddlewareRequireValidHmacSignature
Script
Middleware to ensure the signed request is valid. export default chain() .then(add(requireValidHmacSignature({ // The secret value shared between you and the originating party signingKey: "my_super_secret_key", // The name of the header containing the signature to compare with our value signatureHeaderName: "x-signature", }))) .then(send())
0
emarref avatar
emarref
HttpMiddleware
Script
Chainable middleware functions to simplify http requests.
0
emarref avatar
emarref
HttpMiddlewareRequireHttpMethod
Script
Middleware to ensure your http handler is called with the specific http method. export default chain() .then(add(requireHttpMethod("post"))) .then(send())
0
emarref avatar
emarref
HttpMiddlewareChain
Script
An implementation of chainable http middleware. Wrap your http handlers in middleware to add functionality and reduce code duplication. export default function chain() .then(add(requireHttpMethod("post"))) .then(add(requireAuthentication())) .then(send())
0
emarref avatar
emarref
HttpHandler
Script
Utilities for handling HTTP requests.
0
emarref avatar
emarref
HttpResponse
Script
Factory functions for creating HTTP Response objects.
0
emarref avatar
emarref
IntentToReceive
HTTP
Implements Xero's "Intent to Receive" signature validation webhook.
0
Next