@isnap/sdk 1.4.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -28,6 +28,9 @@ All notable changes to `@isnap/sdk` will be documented in this file. The format
28
28
  - `coverage.test.ts` guard: for every `/v1` operation in the published `openapi.json`, asserts an SDK wrapper exists (or is listed as deliberately un-wrapped, each with a reason). The expected set is derived from the spec, not hand-written, so a newly published endpoint reddens the suite until it is wrapped.
29
29
  - `verifyWebhook` verifies the **Standard Webhooks** headers (`webhook-id` / `webhook-timestamp` / `webhook-signature`, WHA-3648) whenever `webhook-signature` is present, and falls back to the `X-iSnap-Signature` / `X-iSnap-Timestamp` scheme otherwise (additive, MINOR — `1.4.0`). Every iSnap delivery now carries both header sets over the same body, so existing callers keep working unchanged; the same secret string (`whsec_…`, or a legacy `whs_…`) and the same `[newSecret, oldSecret]` rotation array work on both paths, and the tolerance applies to both. When the standard header is present it decides: a wrong standard signature is rejected even if the legacy one would pass. The Standard Webhooks key is the base64 decoding of the secret without its prefix, which is what every official Standard Webhooks library derives from the same `whsec_` string.
30
30
 
31
+ ### Removed
32
+ - **`verifyWebhook` verifies the Standard Webhooks headers only** (`webhook-id` / `webhook-timestamp` / `webhook-signature`, WHA-3658) — breaking, MAJOR (`2.0.0`). The fallback to the `X-iSnap-Signature` / `X-iSnap-Timestamp` pair is removed, because iSnap no longer sends those headers: a request that carries only them is now rejected with `WebhookSignatureError` (`Missing webhook-id header`). The key derivation no longer strips a `whs_` prefix either; only `whsec_` secrets, the only kind iSnap mints, verify. Unchanged: the `[newSecret, oldSecret]` rotation array, the `tolerance` option and its 300 s default, case-insensitive header reads, and the return value. A caller that already receives iSnap deliveries needs no code change, since every delivery since `1.4.0` carries the standard headers.
33
+
31
34
  ### Changed
32
35
  - `src/generated/openapi.d.ts` is now generated from the **published** contract. `packages/backend/openapi.json` carries only the partner-facing `/v1/*` surface, so the internal operator routes (`/admin`, `/va`, `/farm-ops`, `/kam`, `/auth`, …) and the bridge-only `/v1/device/*` contract — plus every schema reachable only from them — are no longer emitted into the SDK types. Those routes are the dashboard, the ops back-office and the device bridge; none of them is part of the partner contract this SDK wraps, and no `ISnapClient` method referenced their types, so no documented method changes shape.
33
36
  - **`AppDownloadEntry.version` is now `string | null`** (API `1.15.0`, WHA-2538) — source-breaking for a consumer that renders `apps.manifest()`'s `version` without narrowing, which is the point. The field used to be a per-deployment configured string tied to no artifact: staging advertised `0.1.0-staging` for both platforms while the Mac ran `0.0.209` and the update channel published `0.0.x`, so the number could not be installed and the two platforms agreed only because both read one env value. It is now read from the release feed beside the artifact the download URL resolves to, and is `null` when that feed publishes nothing. Render the absence; do not substitute a number, and do not treat `null` as an error. It is also no longer the same string `byod.pair` returns as `bridge_version`.
@@ -1717,7 +1717,7 @@ export interface paths {
1717
1717
  put?: never;
1718
1718
  /**
1719
1719
  * Terminate a line you own
1720
- * @description Permanently END an active line the caller owns — the self-serve counterpart to the admin terminate. Use this when your own customer cancels: `/release` only returns a *reserved* marketplace line to the shelf, while this ends a live `rental` line or a virtual `shared` line for good. The line flips to the terminal `cancelled` status and keeps its owner (who held it when it died is history, not a shelf return); queued messages fail with `carrier_terminated`, shared-fleet bindings are released (`binding.released`), device sessions are revoked, and `line.disconnected` fires with `reason: customer_initiated`. Billing stops in both shapes: a per-line Stripe subscription is cancelled immediately (not at period end), and a wholesale partner's end-of-month active-line count drops the line in the same breath. Dedicated hardware goes back to iSnap stock — the eSIM and Apple ID are recycled, never scrapped, because a customer ending a rental says nothing about whether the carrier plan is still good. **Idempotent**: terminating an already-terminated line returns 200 with the line unchanged and fires nothing a second time. Only an `active` or `suspended` line — the ones you are actually being billed for — is terminable: a merely `reserved` line is a 15-minute hold you give back with `/release`, and a `provisioning` pre-order line is cancelled through `/v1/pre-orders/{id}/cancel`. BYOD lines are refused (400) — that hardware is yours and is billed per device slot by `/v1/byod/*`; owned test lines are refused (403) until converted back with `/convert-from-test`.
1720
+ * @description Permanently END an active line the caller owns — the self-serve counterpart to the admin terminate. Use this when your own customer cancels: `/release` only returns a *reserved* marketplace line to the shelf, while this ends a live `rental` line or a virtual `shared` line for good. The line flips to the terminal `cancelled` status and keeps its owner (who held it when it died is history, not a shelf return); queued messages fail with `carrier_terminated`, shared-fleet bindings are released (`binding.released`), device sessions are revoked, and `line.disconnected` fires with `reason: customer_initiated`. Billing stops in both shapes: a per-line Stripe subscription is cancelled immediately (not at period end), and a wholesale partner's end-of-month active-line count drops the line in the same breath. Dedicated hardware goes back to iSnap stock — the eSIM and Apple ID are recycled, never scrapped, because a customer ending a rental says nothing about whether the carrier plan is still good. **Idempotent**: terminating an already-terminated line returns 200 with the line unchanged and fires nothing a second time. Only an `active` or `suspended` line — the ones you are actually being billed for — is terminable: a merely `reserved` line is a 15-minute hold you give back with `/release`, and a `provisioning` pre-order line is cancelled through `/v1/pre-orders/{id}/cancel`. A BYOD line is terminable like any other: its device session is revoked, so the bridge or phone stops serving it, and it leaves the billable set; a direct customer's slot is freed for a new pairing. Owned test lines are refused (403) until converted back with `/convert-from-test`.
1721
1721
  */
1722
1722
  post: {
1723
1723
  parameters: {
@@ -1831,7 +1831,7 @@ export interface paths {
1831
1831
  put?: never;
1832
1832
  /**
1833
1833
  * Cancel a line at its next billing anniversary
1834
- * @description Schedule the END of a line you own for its next billing anniversary, and keep using it until then. This is the verb for "my own customer cancelled": the month is already paid for and iSnap never prorates, so terminating on the spot would destroy days you have bought. The line stays fully `active` — it sends, receives and bills exactly as before — and iSnap terminates it itself when `cancel_at` arrives, firing `line.terminated` with `origin: scheduled_cancellation`. The date is the next occurrence of `anniversary_at` strictly after now, clamped to the last day of a shorter month (a line taken on the 31st renews on the 28th in February and on the 31st again in March — the clamp never sticks). **Idempotent**: cancelling an already-cancelled line returns the SAME `cancel_at`, never a recomputed one, so a retry that happens to cross the anniversary cannot push your own cancellation a month into the future. Undo it with `/uncancel` any time before the date. Refused with 409 `line_has_no_anniversary` on a line that has none — state it with `/anniversary`, or end the line now with `/terminate`.
1834
+ * @description Schedule the END of a line you own for its next billing anniversary, and keep using it until then. This is the verb for "my own customer cancelled": the month is already paid for and iSnap never prorates, so terminating on the spot would destroy days you have bought. The line stays fully `active` — it sends, receives and bills exactly as before — and iSnap terminates it itself when `cancel_at` arrives, firing `line.terminated` with `origin: scheduled_cancellation`. The date is the next occurrence of `anniversary_at` strictly after now, clamped to the last day of a shorter month (a line taken on the 31st renews on the 28th in February and on the 31st again in March — the clamp never sticks). **Idempotent**: cancelling an already-cancelled line returns the SAME `cancel_at`, never a recomputed one, so a retry that happens to cross the anniversary cannot push your own cancellation a month into the future. Undo it with `/uncancel` any time before the date. Refused with 409 `line_has_no_anniversary` on a line that has none — state it with `/anniversary`, or end the line now with `/terminate`. Rental, shared and BYOD lines are all cancellable; a BYOD line is terminated at its date like the others.
1835
1835
  */
1836
1836
  post: {
1837
1837
  parameters: {
@@ -93,12 +93,13 @@ export declare class LinesResource extends BaseResource {
93
93
  * unchanged line (200), never a `ConflictError` — so a retry after a timeout
94
94
  * is always safe and no `opts.idempotencyKey` is needed for it.
95
95
  *
96
- * Refusals: `BadRequestError` (400 `byod_not_customer_terminable`) — a BYOD
97
- * line is your own hardware, billed per device slot by `/v1/byod/*`;
98
- * `PermissionDeniedError` (403 `pool_line_not_terminable`) — an owned test
99
- * line must go through `convertFromTest()` first; `NotFoundError` (404) — a
100
- * line that does not exist, or one you do not own (the same code for both, so
101
- * nothing leaks).
96
+ * A BYOD line is terminable like any other: its device session is revoked,
97
+ * so the bridge or phone stops serving it, and it leaves the billable set.
98
+ *
99
+ * Refusals: `PermissionDeniedError` (403 `pool_line_not_terminable`) — an
100
+ * owned test line must go through `convertFromTest()` first; `NotFoundError`
101
+ * (404) — a line that does not exist, or one you do not own (the same code for
102
+ * both, so nothing leaks).
102
103
  *
103
104
  * `body` defaults to `{}` (not `undefined`) so the request always carries
104
105
  * `Content-Type: application/json`; the route's body is optional and the
@@ -129,9 +130,9 @@ export declare class LinesResource extends BaseResource {
129
130
  * anniversary to cancel at; state it with `setAnniversary()`, or end the line
130
131
  * now with `terminate()`. `ConflictError` (409
131
132
  * `line_not_customer_cancellable`) — only an `active` or `suspended` line can
132
- * be cancelled. `BadRequestError` (400 `byod_not_customer_cancellable`) and
133
- * `PermissionDeniedError` (403 `pool_line_not_cancellable`) — those tiers have
134
- * no per-line anniversary. `NotFoundError` (404) — a line that does not exist,
133
+ * be cancelled. `PermissionDeniedError` (403 `pool_line_not_cancellable`) — an
134
+ * owned test line has no per-line anniversary. Rental, shared and BYOD lines
135
+ * are all cancellable. `NotFoundError` (404) — a line that does not exist,
135
136
  * or one you do not own (the same code for both, so nothing leaks).
136
137
  */
137
138
  cancel(id: string, opts?: RequestOptions): Promise<Line>;
@@ -1 +1 @@
1
- {"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../src/resources/lines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAChD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAA;AACtD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAA;AAChE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAC9E,MAAM,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,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAS9D,6FAA6F;IAC7F,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAS7E;;;;OAIG;IACH,YAAY,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,eAAe,EACrB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,sBAAsB,CAAC;CAQnC"}
@@ -92,12 +92,13 @@ export class LinesResource extends BaseResource {
92
92
  * unchanged line (200), never a `ConflictError` — so a retry after a timeout
93
93
  * is always safe and no `opts.idempotencyKey` is needed for it.
94
94
  *
95
- * Refusals: `BadRequestError` (400 `byod_not_customer_terminable`) — a BYOD
96
- * line is your own hardware, billed per device slot by `/v1/byod/*`;
97
- * `PermissionDeniedError` (403 `pool_line_not_terminable`) — an owned test
98
- * line must go through `convertFromTest()` first; `NotFoundError` (404) — a
99
- * line that does not exist, or one you do not own (the same code for both, so
100
- * nothing leaks).
95
+ * A BYOD line is terminable like any other: its device session is revoked,
96
+ * so the bridge or phone stops serving it, and it leaves the billable set.
97
+ *
98
+ * Refusals: `PermissionDeniedError` (403 `pool_line_not_terminable`) — an
99
+ * owned test line must go through `convertFromTest()` first; `NotFoundError`
100
+ * (404) — a line that does not exist, or one you do not own (the same code for
101
+ * both, so nothing leaks).
101
102
  *
102
103
  * `body` defaults to `{}` (not `undefined`) so the request always carries
103
104
  * `Content-Type: application/json`; the route's body is optional and the
@@ -130,9 +131,9 @@ export class LinesResource extends BaseResource {
130
131
  * anniversary to cancel at; state it with `setAnniversary()`, or end the line
131
132
  * now with `terminate()`. `ConflictError` (409
132
133
  * `line_not_customer_cancellable`) — only an `active` or `suspended` line can
133
- * be cancelled. `BadRequestError` (400 `byod_not_customer_cancellable`) and
134
- * `PermissionDeniedError` (403 `pool_line_not_cancellable`) — those tiers have
135
- * no per-line anniversary. `NotFoundError` (404) — a line that does not exist,
134
+ * be cancelled. `PermissionDeniedError` (403 `pool_line_not_cancellable`) — an
135
+ * owned test line has no per-line anniversary. Rental, shared and BYOD lines
136
+ * are all cancellable. `NotFoundError` (404) — a line that does not exist,
136
137
  * or one you do not own (the same code for both, so nothing leaks).
137
138
  */
138
139
  cancel(id, opts) {
@@ -1 +1 @@
1
- {"version":3,"file":"lines.js","sourceRoot":"","sources":["../../src/resources/lines.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAwBxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;;OAKG;IACH,IAAI,CAAC,QAAwB,EAAE,EAAE,IAAqB;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAW,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE;YAClE,GAAG,IAAI;YACP,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE;SACpC,CAAC,CAAA;IACJ,CAAC;IAED,uEAAuE;IACvE,QAAQ,CAAC,IAAqB;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAC7E,CAAC;IAED,qFAAqF;IACrF,GAAG,CAAC,EAAU,EAAE,IAAqB;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO,KAAK,EAAE,aAAa,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IACjG,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAoB,EAAE,IAAqB;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,OAA2B,EAAE,EAAE,IAAqB;QAC7D,OAAO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EACL,aAAa,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC5C,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED,6FAA6F;IAC7F,SAAS,CAAC,EAAU,EAAE,IAAqB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,aAAa,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC5C,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,YAAY,CACV,EAAU,EACV,IAAqB,EACrB,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,OAAO,EACP,aAAa,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAC5C,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;CACF"}
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const SDK_VERSION = "1.4.0";
1
+ export declare const SDK_VERSION = "2.0.0";
2
2
  export declare const MIN_API_VERSION = "2.0.0";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // contract surface. Hand-maintained: no build or publish step derives this
5
5
  // from `package.json`, so it MUST be bumped in the same commit as the
6
6
  // `version` field there. `src/version.test.ts` fails CI when they disagree.
7
- export const SDK_VERSION = '1.4.0';
7
+ export const SDK_VERSION = '2.0.0';
8
8
  // Minimum API version the SDK considers compatible. Reference-only
9
9
  // today: the client exposes `client.version()` to read `/v1/version` on
10
10
  // demand, but does NOT call it automatically at first request as a
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAErE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,E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ACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAuB;IAClD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;AAClD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAuB;IACpD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAuB;IACzD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAuB;IAClD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC"}
@@ -15,21 +15,16 @@ export interface VerifyWebhookOptions {
15
15
  }
16
16
  type WebhookHeaders = Record<string, string | string[] | undefined> | Headers;
17
17
  /**
18
- * Verify an incoming webhook delivery. Every iSnap delivery carries two
19
- * signatures over the same body, and this checks one of them:
18
+ * Verify an incoming webhook delivery against its **Standard Webhooks**
19
+ * signature (https://www.standardwebhooks.com): `webhook-id`,
20
+ * `webhook-timestamp`, and `webhook-signature` carrying `v1,` + base64
21
+ * `HMAC-SHA256(key, "<webhook-id>.<webhook-timestamp>.<rawBody>")`, where
22
+ * the key is the base64 decoding of the secret without its `whsec_`
23
+ * prefix. Pass the secret string exactly as the dashboard shows it.
20
24
  *
21
- * - **Standard Webhooks** (https://www.standardwebhooks.com), checked
22
- * whenever a `webhook-signature` header is present: `webhook-id`,
23
- * `webhook-timestamp`, and `webhook-signature` carrying `v1,` + base64
24
- * `HMAC-SHA256(key, "<webhook-id>.<webhook-timestamp>.<rawBody>")`,
25
- * where the key is the base64 decoding of the secret without its
26
- * `whsec_` (or legacy `whs_`) prefix.
27
- * - **The iSnap scheme**, the fallback when there is no
28
- * `webhook-signature`: `X-iSnap-Signature` carries the hex-encoded
29
- * `HMAC-SHA256(secret, "<timestamp>.<rawBody>")` and `X-iSnap-Timestamp`
30
- * the unix-second issuance time.
31
- *
32
- * Both paths take the secret string exactly as the dashboard shows it.
25
+ * This is the only scheme iSnap signs with. The former `X-iSnap-Signature`
26
+ * / `X-iSnap-Timestamp` pair is no longer sent and no longer accepted: a
27
+ * request that carries only those headers is rejected.
33
28
  *
34
29
  * Throws `WebhookSignatureError` on missing headers, malformed
35
30
  * timestamp, expired timestamp (outside `tolerance`), or signature
@@ -45,7 +40,7 @@ type WebhookHeaders = Record<string, string | string[] | undefined> | Headers;
45
40
  *
46
41
  * **Consumers MUST dedupe by `event.event_id`** (also sent as `webhook-id`)
47
42
  * — retries replay the same envelope (same `event_id`, same body,
48
- * refreshed timestamp and signatures). Without consumer-side dedup, an
43
+ * refreshed timestamp and signature). Without consumer-side dedup, an
49
44
  * at-least-once delivery model produces duplicate side-effects on the
50
45
  * partner system.
51
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/webhooks/verify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB;AAED,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,OAAO,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EAClC,OAAO,GAAE,oBAAyB,GACjC,gBAAgB,CAKlB"}
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/webhooks/verify.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB;AAED,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,OAAO,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EAClC,OAAO,GAAE,oBAAyB,GACjC,gBAAgB,CA6ClB"}
@@ -3,21 +3,16 @@ import { WebhookSignatureError } from '../errors.js';
3
3
  import { parseWebhookEvent } from './parse.js';
4
4
  const DEFAULT_TOLERANCE_SECONDS = 300;
5
5
  /**
6
- * Verify an incoming webhook delivery. Every iSnap delivery carries two
7
- * signatures over the same body, and this checks one of them:
6
+ * Verify an incoming webhook delivery against its **Standard Webhooks**
7
+ * signature (https://www.standardwebhooks.com): `webhook-id`,
8
+ * `webhook-timestamp`, and `webhook-signature` carrying `v1,` + base64
9
+ * `HMAC-SHA256(key, "<webhook-id>.<webhook-timestamp>.<rawBody>")`, where
10
+ * the key is the base64 decoding of the secret without its `whsec_`
11
+ * prefix. Pass the secret string exactly as the dashboard shows it.
8
12
  *
9
- * - **Standard Webhooks** (https://www.standardwebhooks.com), checked
10
- * whenever a `webhook-signature` header is present: `webhook-id`,
11
- * `webhook-timestamp`, and `webhook-signature` carrying `v1,` + base64
12
- * `HMAC-SHA256(key, "<webhook-id>.<webhook-timestamp>.<rawBody>")`,
13
- * where the key is the base64 decoding of the secret without its
14
- * `whsec_` (or legacy `whs_`) prefix.
15
- * - **The iSnap scheme**, the fallback when there is no
16
- * `webhook-signature`: `X-iSnap-Signature` carries the hex-encoded
17
- * `HMAC-SHA256(secret, "<timestamp>.<rawBody>")` and `X-iSnap-Timestamp`
18
- * the unix-second issuance time.
19
- *
20
- * Both paths take the secret string exactly as the dashboard shows it.
13
+ * This is the only scheme iSnap signs with. The former `X-iSnap-Signature`
14
+ * / `X-iSnap-Timestamp` pair is no longer sent and no longer accepted: a
15
+ * request that carries only those headers is rejected.
21
16
  *
22
17
  * Throws `WebhookSignatureError` on missing headers, malformed
23
18
  * timestamp, expired timestamp (outside `tolerance`), or signature
@@ -33,48 +28,11 @@ const DEFAULT_TOLERANCE_SECONDS = 300;
33
28
  *
34
29
  * **Consumers MUST dedupe by `event.event_id`** (also sent as `webhook-id`)
35
30
  * — retries replay the same envelope (same `event_id`, same body,
36
- * refreshed timestamp and signatures). Without consumer-side dedup, an
31
+ * refreshed timestamp and signature). Without consumer-side dedup, an
37
32
  * at-least-once delivery model produces duplicate side-effects on the
38
33
  * partner system.
39
34
  */
40
35
  export function verifyWebhook(rawBody, headers, secret, options = {}) {
41
- if (getHeader(headers, 'webhook-signature') !== null) {
42
- return verifyStandardWebhook(rawBody, headers, secret, options);
43
- }
44
- return verifyISnapWebhook(rawBody, headers, secret, options);
45
- }
46
- function verifyISnapWebhook(rawBody, headers, secret, options) {
47
- const sigHeader = getHeader(headers, 'x-isnap-signature');
48
- if (!sigHeader) {
49
- throw new WebhookSignatureError('Missing X-iSnap-Signature header');
50
- }
51
- const tsHeader = getHeader(headers, 'x-isnap-timestamp');
52
- if (!tsHeader) {
53
- throw new WebhookSignatureError('Missing X-iSnap-Timestamp header');
54
- }
55
- const timestamp = checkTimestamp(tsHeader, 'X-iSnap-Timestamp', options);
56
- const candidates = secretCandidates(secret);
57
- const provided = decodeHex(sigHeader);
58
- if (!provided) {
59
- throw new WebhookSignatureError('X-iSnap-Signature is not valid hex');
60
- }
61
- const signedPayload = `${timestamp}.${rawBody}`;
62
- // Multi-secret loop returns early on first match — this is a minor
63
- // timing side-channel during the rotate-secret grace window (an
64
- // attacker who controls request timing could distinguish "matched first
65
- // candidate" from "matched second"). Practical exploit value is near
66
- // zero: knowing which secret matched does not help forge signatures
67
- // for either secret. Worth revisiting if real partners run rotation
68
- // through hostile networks.
69
- for (const candidate of candidates) {
70
- const expected = createHmac('sha256', candidate).update(signedPayload).digest();
71
- if (provided.length === expected.length && timingSafeEqual(provided, expected)) {
72
- return parseWebhookEvent(rawBody);
73
- }
74
- }
75
- throw new WebhookSignatureError('Webhook signature did not match any provided secret');
76
- }
77
- function verifyStandardWebhook(rawBody, headers, secret, options) {
78
36
  const msgId = getHeader(headers, 'webhook-id');
79
37
  if (!msgId) {
80
38
  throw new WebhookSignatureError('Missing webhook-id header');
@@ -83,12 +41,16 @@ function verifyStandardWebhook(rawBody, headers, secret, options) {
83
41
  if (!tsHeader) {
84
42
  throw new WebhookSignatureError('Missing webhook-timestamp header');
85
43
  }
44
+ const sigHeader = getHeader(headers, 'webhook-signature');
45
+ if (!sigHeader) {
46
+ throw new WebhookSignatureError('Missing webhook-signature header');
47
+ }
86
48
  const timestamp = checkTimestamp(tsHeader, 'webhook-timestamp', options);
87
49
  const candidates = secretCandidates(secret);
88
50
  // Space-delimited `<version>,<base64>` pairs; only `v1` (HMAC-SHA256)
89
51
  // exists today, and a version this SDK does not know is skipped rather
90
52
  // than rejected, so a sender adding a scheme does not break verification.
91
- const provided = (getHeader(headers, 'webhook-signature') ?? '')
53
+ const provided = sigHeader
92
54
  .split(' ')
93
55
  .filter((entry) => entry.startsWith('v1,'))
94
56
  .map((entry) => Buffer.from(entry.slice(3), 'base64'));
@@ -96,7 +58,13 @@ function verifyStandardWebhook(rawBody, headers, secret, options) {
96
58
  throw new WebhookSignatureError('webhook-signature carries no v1 signature');
97
59
  }
98
60
  const signedPayload = `${msgId}.${timestamp}.${rawBody}`;
99
- // Same early-return trade-off as the iSnap scheme above.
61
+ // Multi-secret loop returns early on first match — this is a minor
62
+ // timing side-channel during the rotate-secret grace window (an
63
+ // attacker who controls request timing could distinguish "matched first
64
+ // candidate" from "matched second"). Practical exploit value is near
65
+ // zero: knowing which secret matched does not help forge signatures
66
+ // for either secret. Worth revisiting if real partners run rotation
67
+ // through hostile networks.
100
68
  for (const candidate of candidates) {
101
69
  const expected = createHmac('sha256', standardWebhookKey(candidate))
102
70
  .update(signedPayload)
@@ -110,16 +78,12 @@ function verifyStandardWebhook(rawBody, headers, secret, options) {
110
78
  throw new WebhookSignatureError('Webhook signature did not match any provided secret');
111
79
  }
112
80
  // The Standard Webhooks key: the base64 decoding of the secret without its
113
- // prefix. iSnap secrets are `whsec_` (or, minted by an older rotation,
114
- // `whs_`) followed by hex, which is valid base64, so the dashboard string
115
- // works as-is here and in any official Standard Webhooks library (pass a
116
- // `whs_` secret to those as `whsec_` + the same hex).
81
+ // `whsec_` prefix — what every official Standard Webhooks library derives
82
+ // from the same string. iSnap secrets are `whsec_` followed by hex, which is
83
+ // valid base64, so the dashboard string works as-is here and there.
117
84
  function standardWebhookKey(secret) {
118
- for (const prefix of ['whsec_', 'whs_']) {
119
- if (secret.startsWith(prefix))
120
- return Buffer.from(secret.slice(prefix.length), 'base64');
121
- }
122
- return Buffer.from(secret, 'base64');
85
+ const encoded = secret.startsWith('whsec_') ? secret.slice('whsec_'.length) : secret;
86
+ return Buffer.from(encoded, 'base64');
123
87
  }
124
88
  function checkTimestamp(tsHeader, headerName, options) {
125
89
  // Strict integer-only check — `Number.parseInt` would happily accept
@@ -171,11 +135,6 @@ function getHeader(headers, name) {
171
135
  }
172
136
  return null;
173
137
  }
174
- function decodeHex(hex) {
175
- if (!/^[0-9a-fA-F]+$/.test(hex) || hex.length % 2 !== 0)
176
- return null;
177
- return Buffer.from(hex, 'hex');
178
- }
179
138
  function defaultNow() {
180
139
  return Math.floor(Date.now() / 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AE,GAAG,IAAI,CAAC,CAAA;AACtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isnap/sdk",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "description": "Official TypeScript SDK for the iSnap P2P telephony API",
5
5
  "license": "MIT",
6
6
  "type": "module",