@samva/webhooks 0.12.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.
- package/README.md +23 -2
- package/dist/decoder.gen.d.ts +4 -0
- package/dist/effect.d.ts +4 -1
- package/dist/effect.js +4 -2
- package/dist/json-schemas.gen-eya_ZDps.js +2750 -0
- package/dist/json-schemas.gen.d.ts +2 -0
- package/dist/promise.d.ts +3 -1
- package/dist/promise.js +3 -2
- package/dist/protocol-CLrYczjc.js +570 -0
- package/dist/protocol.d.ts +6 -11
- package/dist/protocol.js +2 -2
- package/dist/schemas.gen.d.ts +1484 -0
- package/dist/schemas.gen.js +1339 -0
- package/dist/types.gen.d.ts +998 -0
- package/package.json +13 -3
- package/dist/protocol-BGKUmvlI.js +0 -333
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-
|
|
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
|