@arkyc/webhooks 2.0.0 → 2.1.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.
@@ -1,8 +1,7 @@
1
1
  import { DecisionReason, VerificationStatus, WebhookChecks, WebhookEvent, WebhookEventName } from "@arkyc/types";
2
-
3
2
  //#region src/payload.d.ts
4
3
  /** The data needed to assemble a {@link WebhookEvent} body. */
5
- interface BuildWebhookPayloadInput {
4
+ export interface BuildWebhookPayloadInput {
6
5
  event: WebhookEventName;
7
6
  sessionId: string;
8
7
  organizationId: string;
@@ -19,7 +18,7 @@ interface BuildWebhookPayloadInput {
19
18
  /**
20
19
  * Assemble the JSON body delivered to a webhook endpoint.
21
20
  */
22
- declare class WebhookPayload {
21
+ export declare class WebhookPayload {
23
22
  /**
24
23
  * Build the JSON body delivered to a webhook endpoint (matches the spec shape).
25
24
  *
@@ -29,5 +28,4 @@ declare class WebhookPayload {
29
28
  static build(input: BuildWebhookPayloadInput): WebhookEvent;
30
29
  }
31
30
  //#endregion
32
- export { BuildWebhookPayloadInput, WebhookPayload };
33
31
  //# sourceMappingURL=payload.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.mts","names":[],"sources":["../src/payload.ts"],"mappings":";;;;UAGiB,wBAAA;EACf,KAAA,EAAO,gBAAA;EACP,SAAA;EACA,cAAA;EACA,SAAA;EACA,aAAA;EACA,MAAA,EAAQ,kBAAA;EACR,MAAA,EAAQ,aAAA;EACR,cAAA,EAAgB,cAAA;EAED;EAAf,MAAA,GAAS,MAAA;EATT;EAWA,SAAA;AAAA;;;;cAMW,cAAA;EAZH;;;;;;EAAA,OAmBD,KAAA,CAAM,KAAA,EAAO,wBAAA,GAA2B,YAAY;AAAA"}
1
+ {"version":3,"file":"payload.d.mts","names":[],"sources":["../src/payload.ts"],"mappings":";;;iBAGiB;EACf,OAAO;EACP;EACA;EACA;EACA;EACA,QAAQ;EACR,QAAQ;EACR,gBAAgB;;EAEhB,SAAS;;EAET;;;;;qBAMW;;;;;;;SAOJ,MAAM,OAAO,2BAA2B"}
@@ -1,6 +1,6 @@
1
1
  //#region src/signing.d.ts
2
2
  /** Inputs for verifying a received webhook signature. */
3
- interface VerifyWebhookInput {
3
+ export interface VerifyWebhookInput {
4
4
  /** Raw request body as received. */
5
5
  payload: string;
6
6
  /** The endpoint's signing secret. */
@@ -17,7 +17,7 @@ interface VerifyWebhookInput {
17
17
  /**
18
18
  * Sign and verify webhook deliveries (HMAC-SHA256, Stripe-style).
19
19
  */
20
- declare class WebhookSigner {
20
+ export declare class WebhookSigner {
21
21
  /** Header carrying the HMAC signature on a delivered webhook. */
22
22
  static readonly SIGNATURE_HEADER = "X-Arkyc-Signature";
23
23
  /** Header carrying the unix-seconds timestamp the signature covers. */
@@ -45,5 +45,4 @@ declare class WebhookSigner {
45
45
  static verify(input: VerifyWebhookInput): boolean;
46
46
  }
47
47
  //#endregion
48
- export { VerifyWebhookInput, WebhookSigner };
49
48
  //# sourceMappingURL=signing.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signing.d.mts","names":[],"sources":["../src/signing.ts"],"mappings":";;UAGiB,kBAAA;EAAkB;EAEjC,OAAA;EAFiC;EAIjC,MAAA;EAAA;EAEA,SAAA;EAEA;EAAA,SAAA;EAIA;EAFA,YAAA;EAEG;EAAH,GAAA;AAAA;;;;cAMW,aAAA;EAQK;EAAA,gBANA,gBAAA;EAkBJ;EAAA,gBAfI,gBAAA;EAe6B;EAAA,gBAZ7B,qBAAA;EAuBK;;;AAAkB;;;;;;;EAAlB,OAXd,IAAA,CAAK,OAAA,UAAiB,MAAA,UAAgB,SAAA;;;;;;;;SAWtC,MAAA,CAAO,KAAA,EAAO,kBAAkB;AAAA"}
1
+ {"version":3,"file":"signing.d.mts","names":[],"sources":["../src/signing.ts"],"mappings":";;iBAGiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;qBAMW;;kBAEK;;kBAGA;;kBAGA;;;;;;;;;;;SAYT,KAAK,iBAAiB,gBAAgB;;;;;;;;SAWtC,OAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyc/webhooks",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Webhook signing, verification, and payload building",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -36,7 +36,7 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@arkyc/types": "^2.0.0"
39
+ "@arkyc/types": "^2.1.0"
40
40
  },
41
41
  "scripts": {
42
42
  "typecheck": "tsc --noEmit",