Public
HTTP (deprecated)
  • emarref avatar
    EnvironmentConfig
    @emarref
    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.
    Script
  • emarref avatar
    HttpMiddlewareRequireValidHmacSignature
    @emarref
    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())
    Script
  • emarref avatar
    HttpMiddlewareRequireHttpMethod
    @emarref
    Middleware to ensure your http handler is called with the specific http method. export default chain() .then(add(requireHttpMethod("post"))) .then(send())
    Script
  • emarref avatar
    XeroWebhookMiddlewareValidateRequest
    @emarref
    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());
    Script
  • emarref avatar
    HttpMiddlewareChain
    @emarref
    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())
    Script
1
Next
emarref-intenttoreceive.web.val.run
June 16, 2024