@samva/webhooks 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import type { WebhookEventType } from "./types.gen.js";
2
+ export declare const WebhookEventJsonSchemas: Readonly<Record<WebhookEventType, Readonly<Record<string, unknown>>>>;
package/dist/promise.d.ts CHANGED
@@ -110,6 +110,8 @@ export declare const safeVerify: (options: VerifyOptions) => Promise<{
110
110
  readonly verified: false;
111
111
  readonly error: AnyWebhookVerificationError;
112
112
  }>;
113
- export { DEFAULT_TOLERANCE_SECONDS, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, generateWebhookSecret, signWebhook, } from "./protocol.js";
113
+ export { DEFAULT_TOLERANCE_SECONDS, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, isKnownEvent, generateWebhookSecret, signWebhook, } from "./protocol.js";
114
114
  export type { AnyWebhookVerificationError, SamvaWebhookEvent, VerifiedWebhook, WebhookHeaderName, } from "./protocol.js";
115
115
  export { InvalidWebhookHeadersError, InvalidWebhookSecretError, MalformedWebhookPayloadError, WebhookCryptoError, WebhookSignatureError, WebhookTimestampError, WebhookVerificationError, } from "./protocol.js";
116
+ export type * from "./types.gen.js";
117
+ export { WebhookEventJsonSchemas } from "./json-schemas.gen.js";
package/dist/promise.js CHANGED
@@ -1,4 +1,5 @@
1
- import { _ as WebhookTimestampError, c as signWebhook, f as InvalidWebhookHeadersError, g as WebhookSignatureError, h as WebhookCryptoError, i as WEBHOOK_TIMESTAMP_HEADER, l as verifyWebhookAt, m as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, o as generateWebhookSecret, p as InvalidWebhookSecretError, r as WEBHOOK_SIGNATURE_HEADER, s as readWebhookHeaders, t as DEFAULT_TOLERANCE_SECONDS, v as WebhookVerificationError } from "./protocol-BGKUmvlI.js";
1
+ import { _ as WebhookTimestampError, c as signWebhook, f as InvalidWebhookHeadersError, g as WebhookSignatureError, h as WebhookCryptoError, i as WEBHOOK_TIMESTAMP_HEADER, l as verifyWebhookAt, m as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, o as generateWebhookSecret, p as InvalidWebhookSecretError, r as WEBHOOK_SIGNATURE_HEADER, s as readWebhookHeaders, t as DEFAULT_TOLERANCE_SECONDS, v as WebhookVerificationError, y as isKnownEvent } from "./protocol-CLrYczjc.js";
2
+ import { t as WebhookEventJsonSchemas } from "./json-schemas.gen-eya_ZDps.js";
2
3
  //#region src/promise.ts
3
4
  /**
4
5
  * Verifies a Samva webhook delivery from its body and header values, then returns its ID and
@@ -112,6 +113,6 @@ const safeVerify = async (options) => {
112
113
  }
113
114
  };
114
115
  //#endregion
115
- export { DEFAULT_TOLERANCE_SECONDS, InvalidWebhookHeadersError, InvalidWebhookSecretError, MalformedWebhookPayloadError, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookCryptoError, WebhookSignatureError, WebhookTimestampError, WebhookVerificationError, generateWebhookSecret, safeVerify, signWebhook, verify, verifyRequest };
116
+ export { DEFAULT_TOLERANCE_SECONDS, InvalidWebhookHeadersError, InvalidWebhookSecretError, MalformedWebhookPayloadError, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookCryptoError, WebhookEventJsonSchemas, WebhookSignatureError, WebhookTimestampError, WebhookVerificationError, generateWebhookSecret, isKnownEvent, safeVerify, signWebhook, verify, verifyRequest };
116
117
 
117
118
  //# sourceMappingURL=promise.js.map