@isnap/sdk 2.3.0 → 2.3.1-next.43435188216.1

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +65 -40
  2. package/README.md +360 -167
  3. package/dist/client.d.ts +35 -49
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +44 -58
  6. package/dist/client.js.map +1 -1
  7. package/dist/config.d.ts +6 -6
  8. package/dist/config.js +6 -6
  9. package/dist/generated/openapi.d.ts +403 -14
  10. package/dist/internal/sleep.d.ts +2 -2
  11. package/dist/internal/sleep.js +5 -5
  12. package/dist/internal/sleep.js.map +1 -1
  13. package/dist/resources/apps.d.ts +11 -18
  14. package/dist/resources/apps.d.ts.map +1 -1
  15. package/dist/resources/apps.js +11 -18
  16. package/dist/resources/apps.js.map +1 -1
  17. package/dist/resources/area-codes.d.ts +5 -6
  18. package/dist/resources/area-codes.d.ts.map +1 -1
  19. package/dist/resources/area-codes.js +5 -6
  20. package/dist/resources/area-codes.js.map +1 -1
  21. package/dist/resources/attachments.d.ts +51 -17
  22. package/dist/resources/attachments.d.ts.map +1 -1
  23. package/dist/resources/attachments.js +42 -22
  24. package/dist/resources/attachments.js.map +1 -1
  25. package/dist/resources/byod.d.ts +14 -4
  26. package/dist/resources/byod.d.ts.map +1 -1
  27. package/dist/resources/byod.js +14 -4
  28. package/dist/resources/byod.js.map +1 -1
  29. package/dist/resources/chats.d.ts +30 -22
  30. package/dist/resources/chats.d.ts.map +1 -1
  31. package/dist/resources/chats.js +29 -21
  32. package/dist/resources/chats.js.map +1 -1
  33. package/dist/resources/lines.d.ts +240 -266
  34. package/dist/resources/lines.d.ts.map +1 -1
  35. package/dist/resources/lines.js +240 -266
  36. package/dist/resources/lines.js.map +1 -1
  37. package/dist/resources/lookup.d.ts +10 -13
  38. package/dist/resources/lookup.d.ts.map +1 -1
  39. package/dist/resources/lookup.js +10 -13
  40. package/dist/resources/lookup.js.map +1 -1
  41. package/dist/resources/macos-sessions.d.ts +42 -36
  42. package/dist/resources/macos-sessions.d.ts.map +1 -1
  43. package/dist/resources/macos-sessions.js +24 -22
  44. package/dist/resources/macos-sessions.js.map +1 -1
  45. package/dist/resources/messages.d.ts +35 -25
  46. package/dist/resources/messages.d.ts.map +1 -1
  47. package/dist/resources/messages.js +30 -19
  48. package/dist/resources/messages.js.map +1 -1
  49. package/dist/resources/preorders.d.ts +42 -47
  50. package/dist/resources/preorders.d.ts.map +1 -1
  51. package/dist/resources/preorders.js +42 -47
  52. package/dist/resources/preorders.js.map +1 -1
  53. package/dist/resources/trial.d.ts +30 -21
  54. package/dist/resources/trial.d.ts.map +1 -1
  55. package/dist/resources/trial.js +30 -21
  56. package/dist/resources/trial.js.map +1 -1
  57. package/dist/resources/webhooks.d.ts +39 -22
  58. package/dist/resources/webhooks.d.ts.map +1 -1
  59. package/dist/resources/webhooks.js +39 -22
  60. package/dist/resources/webhooks.js.map +1 -1
  61. package/dist/retry.d.ts +9 -10
  62. package/dist/retry.d.ts.map +1 -1
  63. package/dist/retry.js +11 -12
  64. package/dist/retry.js.map +1 -1
  65. package/dist/types.d.ts +10 -0
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.d.ts.map +1 -1
  69. package/dist/version.js +13 -37
  70. package/dist/version.js.map +1 -1
  71. package/dist/webhooks/parse.d.ts +10 -9
  72. package/dist/webhooks/parse.d.ts.map +1 -1
  73. package/dist/webhooks/parse.js +14 -13
  74. package/dist/webhooks/parse.js.map +1 -1
  75. package/dist/webhooks/types.d.ts +74 -110
  76. package/dist/webhooks/types.d.ts.map +1 -1
  77. package/dist/webhooks/types.js.map +1 -1
  78. package/dist/webhooks/verify.d.ts +27 -29
  79. package/dist/webhooks/verify.d.ts.map +1 -1
  80. package/dist/webhooks/verify.js +29 -35
  81. package/dist/webhooks/verify.js.map +1 -1
  82. package/examples/handle-webhook.ts +146 -0
  83. package/examples/paginate-messages.ts +54 -0
  84. package/examples/send-message.ts +37 -0
  85. package/examples/upload-attachment.ts +91 -0
  86. package/package.json +4 -8
package/dist/client.d.ts CHANGED
@@ -14,19 +14,19 @@ import { WebhooksResource } from './resources/webhooks.js';
14
14
  import type { components } from './generated/openapi.js';
15
15
  import type { HttpMethod, RequestOptions } from './types.js';
16
16
  /**
17
- * `GET /v1/version` payload, unwrapped from its response envelope: the deployed
18
- * backend's `API_SCHEMA_VERSION`.
17
+ * Result of `client.version()`: `{ version }`, the version of the API the
18
+ * client talks to.
19
19
  */
20
20
  export type VersionInfo = components['schemas']['VersionResponse']['data'];
21
21
  /**
22
- * `GET /v1/health` bare-body payload: `{ status, timestamp, checks }`. `status`
23
- * is `'ok'` on a 200 and `'degraded'` on a 503.
22
+ * Result of `client.health()`: `{ status, timestamp, checks }`. `status` is
23
+ * `ok` on a `200` and `degraded` on a `503`.
24
24
  */
25
25
  export type HealthStatus = components['schemas']['HealthResponse'];
26
26
  /**
27
27
  * Test-only escape hatch to clear the per-process dedup set between test
28
- * cases. Not part of the public stability contract — flagged @internal so
29
- * IDE auto-import doesn't surface it to consumers.
28
+ * cases. Not part of the public surface: it is flagged `@internal` so that
29
+ * editors do not offer it to consumers.
30
30
  *
31
31
  * @internal
32
32
  */
@@ -47,68 +47,54 @@ export declare class ISnapClient {
47
47
  readonly webhooks: WebhooksResource;
48
48
  constructor(config: ClientConfig);
49
49
  /**
50
- * Direct fetch with no SDK auth, no envelope parsing, no retry — used
51
- * internally by resource methods that must call URLs OUTSIDE the iSnap
52
- * API surface (e.g. presigned R2 PUTs during `attachments.upload`).
50
+ * Direct fetch with no API key, no response parsing and no retry. Resource
51
+ * methods use it for a URL outside the iSnap API: the upload URL that
52
+ * `attachments.upload` sends the file to.
53
53
  *
54
- * The leading underscore signals "internal but unavoidably public": it
55
- * lives on the public class because resource classes cannot reach the
56
- * private `config.fetch` otherwise. SDK consumers should use the typed
57
- * resource methods or `request()` for everything in `/v1/*` — calling
58
- * this directly bypasses the SDK contract.
54
+ * It is on the public class only because resource classes cannot reach the
55
+ * private `config.fetch` otherwise. For any `/v1` operation, call a typed
56
+ * method or `request()`.
59
57
  *
60
- * Applies the same `config.timeoutMs` ceiling as `request()` so a
61
- * stalled R2 PUT cannot hang the upload indefinitely.
58
+ * The request is aborted after `timeoutMs`, like an attempt of `request()`.
62
59
  *
63
60
  * @internal
64
61
  */
65
62
  _externalFetch(url: string, init?: RequestInit): Promise<Response>;
66
63
  /**
67
- * Low-level request method. Resource classes wrap this with typed camelCase METHOD NAMES over the
68
- * generated snake_case BODY types; advanced users can call it directly for endpoints not yet
69
- * covered by a resource.
64
+ * Low-level call: any method and path of the API, with the same
65
+ * authentication, retries, idempotency key and error handling as the typed
66
+ * methods. Use it for an operation that has no method, such as
67
+ * `GET /v1/attention`. Resolves with the `data` of the response.
70
68
  *
71
- * The split matters and used to be one word doing two jobs (WHA-2278). This method is a bare
72
- * `JSON.stringify(body)` — it converts NOTHING. Read as "camelCase signatures", that ambiguity
73
- * grew in §5.2's preamble into "method names are camelCase in TypeScript but send snake_case on
74
- * the wire", which has no mechanism behind it, and that one sentence produced a family of wrong
75
- * request examples (`fromLineId`, `lineIds`, `replyToMessageId`) partners would have copied
76
- * verbatim into 400s. Send the keys the generated types declare.
69
+ * `body` is sent as given, with `JSON.stringify`: the SDK converts no field
70
+ * name. Send the snake_case fields the API declares.
77
71
  */
78
72
  request<T>(method: HttpMethod, path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
79
73
  /**
80
- * `GET /v1/version` — the deployed backend's `API_SCHEMA_VERSION`. Enveloped
81
- * like every other `/v1` response, so it resolves to the unwrapped
82
- * `{ version }`. The route is `security: []` (public), but the SDK still
83
- * sends `Authorization` (the backend ignores it here) and `resolveConfig`
84
- * still requires a non-empty `apiKey`.
74
+ * `GET /v1/version`: the version of the API the client talks to, as
75
+ * `{ version }`. The operation needs no credential; the client still sends
76
+ * its key.
85
77
  */
86
78
  version(opts?: RequestOptions): Promise<VersionInfo>;
87
79
  /**
88
- * `GET /v1/health` — the backend's health probe. Returns a BARE body (no
89
- * `{success,data,error}` envelope): `{ status, timestamp, checks }` on a 200,
90
- * and the SAME shape with `status: 'degraded'` on a 503. A degraded backend
91
- * is DATA, not a failure — so a 503 resolves rather than throwing, and is NOT
92
- * retried by default (`maxRetries: 0`, overridable via `opts.maxRetries`). A
93
- * non-JSON body, or any status other than 200/503, throws
94
- * (`ServiceUnavailableError` for `>= 500`, `APIError` otherwise). Like
95
- * `version()`, this route is `security: []` yet still receives `Authorization`
96
- * and still requires a non-empty `apiKey`.
80
+ * `GET /v1/health`: the health of the API as a whole. Resolves with
81
+ * `{ status, timestamp, checks }` on a `200` and on a `503`, where `status`
82
+ * is `ok` or `degraded`: a degraded API is a result, not an error. Any other
83
+ * status throws, and so does a body that is not JSON. The call is not retried
84
+ * unless you pass `opts.maxRetries`. The operation needs no credential; the
85
+ * client still sends its key.
97
86
  *
98
- * This is the GLOBAL system probe. For the health of a specific line use
99
- * `client.lines.health(lineId)` (`GET /v1/lines/{id}/health`) — a different
100
- * endpoint on a different object.
87
+ * For the health of one line, call `client.lines.health(lineId)`
88
+ * (`GET /v1/lines/{id}/health`).
101
89
  */
102
90
  health(opts?: RequestOptions): Promise<HealthStatus>;
103
91
  private dispatch;
104
92
  /**
105
- * Like `request`, but for the BARE `/v1` probes (`/v1/health`) whose body
106
- * carries no `{success,data,error}` envelope. Returns the parsed JSON
107
- * verbatim for 200 and 503 (a degraded 503 is data, not an error) and throws
108
- * for any other status or a non-JSON body. Defaults to `maxRetries: 0` — a
109
- * degraded probe is an answer, not a transient failure to retry — but honours
110
- * an explicit `opts.maxRetries` (a genuinely retryable throwing status like a
111
- * non-JSON 500 is then retried like any other request).
93
+ * Like `request`, for `GET /v1/health`, whose body is not wrapped in
94
+ * `{ success, data, error }`. Returns the parsed JSON as is for a `200` and a
95
+ * `503`, and throws for any other status or a body that is not JSON. Not
96
+ * retried unless `opts.maxRetries` is passed: a degraded result is an answer,
97
+ * not a failure to retry.
112
98
  */
113
99
  private requestBare;
114
100
  private dispatchBare;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAoB,MAAM,YAAY,CAAA;AAG9E;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1E;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAA;AAoBlE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED,qBAAa,WAAW;IACtB,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
package/dist/client.js CHANGED
@@ -23,15 +23,15 @@ const NON_JSON_PREVIEW = 200;
23
23
  const MAX_RESPONSE_BYTES = 10 * 1024 * 1024;
24
24
  const USER_AGENT = `@isnap/sdk/${SDK_VERSION}`;
25
25
  // Per-process dedup set for deprecation warnings. Key is
26
- // `<METHOD> <pathname>|<sunset>` — including the sunset means we re-warn
27
- // if the backend extends or moves the deadline. Process-wide (not
28
- // per-client-instance) so spawning multiple ISnapClient objects in tests
29
- // doesn't multiply the noise.
26
+ // `<METHOD> <pathname>|<sunset>`: including the sunset means we warn again
27
+ // if the API moves the removal date. Process-wide (not per client instance)
28
+ // so that creating several ISnapClient objects in tests does not multiply
29
+ // the noise.
30
30
  const WARNED_DEPRECATIONS = new Set();
31
31
  /**
32
32
  * Test-only escape hatch to clear the per-process dedup set between test
33
- * cases. Not part of the public stability contract — flagged @internal so
34
- * IDE auto-import doesn't surface it to consumers.
33
+ * cases. Not part of the public surface: it is flagged `@internal` so that
34
+ * editors do not offer it to consumers.
35
35
  *
36
36
  * @internal
37
37
  */
@@ -68,18 +68,15 @@ export class ISnapClient {
68
68
  this.webhooks = new WebhooksResource(this);
69
69
  }
70
70
  /**
71
- * Direct fetch with no SDK auth, no envelope parsing, no retry — used
72
- * internally by resource methods that must call URLs OUTSIDE the iSnap
73
- * API surface (e.g. presigned R2 PUTs during `attachments.upload`).
71
+ * Direct fetch with no API key, no response parsing and no retry. Resource
72
+ * methods use it for a URL outside the iSnap API: the upload URL that
73
+ * `attachments.upload` sends the file to.
74
74
  *
75
- * The leading underscore signals "internal but unavoidably public": it
76
- * lives on the public class because resource classes cannot reach the
77
- * private `config.fetch` otherwise. SDK consumers should use the typed
78
- * resource methods or `request()` for everything in `/v1/*` — calling
79
- * this directly bypasses the SDK contract.
75
+ * It is on the public class only because resource classes cannot reach the
76
+ * private `config.fetch` otherwise. For any `/v1` operation, call a typed
77
+ * method or `request()`.
80
78
  *
81
- * Applies the same `config.timeoutMs` ceiling as `request()` so a
82
- * stalled R2 PUT cannot hang the upload indefinitely.
79
+ * The request is aborted after `timeoutMs`, like an attempt of `request()`.
83
80
  *
84
81
  * @internal
85
82
  */
@@ -106,16 +103,13 @@ export class ISnapClient {
106
103
  }
107
104
  }
108
105
  /**
109
- * Low-level request method. Resource classes wrap this with typed camelCase METHOD NAMES over the
110
- * generated snake_case BODY types; advanced users can call it directly for endpoints not yet
111
- * covered by a resource.
106
+ * Low-level call: any method and path of the API, with the same
107
+ * authentication, retries, idempotency key and error handling as the typed
108
+ * methods. Use it for an operation that has no method, such as
109
+ * `GET /v1/attention`. Resolves with the `data` of the response.
112
110
  *
113
- * The split matters and used to be one word doing two jobs (WHA-2278). This method is a bare
114
- * `JSON.stringify(body)` — it converts NOTHING. Read as "camelCase signatures", that ambiguity
115
- * grew in §5.2's preamble into "method names are camelCase in TypeScript but send snake_case on
116
- * the wire", which has no mechanism behind it, and that one sentence produced a family of wrong
117
- * request examples (`fromLineId`, `lineIds`, `replyToMessageId`) partners would have copied
118
- * verbatim into 400s. Send the keys the generated types declare.
111
+ * `body` is sent as given, with `JSON.stringify`: the SDK converts no field
112
+ * name. Send the snake_case fields the API declares.
119
113
  */
120
114
  async request(method, path, body, opts = {}) {
121
115
  const url = this.buildUrl(path, opts.query);
@@ -138,29 +132,23 @@ export class ISnapClient {
138
132
  });
139
133
  }
140
134
  /**
141
- * `GET /v1/version` — the deployed backend's `API_SCHEMA_VERSION`. Enveloped
142
- * like every other `/v1` response, so it resolves to the unwrapped
143
- * `{ version }`. The route is `security: []` (public), but the SDK still
144
- * sends `Authorization` (the backend ignores it here) and `resolveConfig`
145
- * still requires a non-empty `apiKey`.
135
+ * `GET /v1/version`: the version of the API the client talks to, as
136
+ * `{ version }`. The operation needs no credential; the client still sends
137
+ * its key.
146
138
  */
147
139
  async version(opts = {}) {
148
140
  return this.request('GET', '/v1/version', undefined, opts);
149
141
  }
150
142
  /**
151
- * `GET /v1/health` — the backend's health probe. Returns a BARE body (no
152
- * `{success,data,error}` envelope): `{ status, timestamp, checks }` on a 200,
153
- * and the SAME shape with `status: 'degraded'` on a 503. A degraded backend
154
- * is DATA, not a failure — so a 503 resolves rather than throwing, and is NOT
155
- * retried by default (`maxRetries: 0`, overridable via `opts.maxRetries`). A
156
- * non-JSON body, or any status other than 200/503, throws
157
- * (`ServiceUnavailableError` for `>= 500`, `APIError` otherwise). Like
158
- * `version()`, this route is `security: []` yet still receives `Authorization`
159
- * and still requires a non-empty `apiKey`.
143
+ * `GET /v1/health`: the health of the API as a whole. Resolves with
144
+ * `{ status, timestamp, checks }` on a `200` and on a `503`, where `status`
145
+ * is `ok` or `degraded`: a degraded API is a result, not an error. Any other
146
+ * status throws, and so does a body that is not JSON. The call is not retried
147
+ * unless you pass `opts.maxRetries`. The operation needs no credential; the
148
+ * client still sends its key.
160
149
  *
161
- * This is the GLOBAL system probe. For the health of a specific line use
162
- * `client.lines.health(lineId)` (`GET /v1/lines/{id}/health`) — a different
163
- * endpoint on a different object.
150
+ * For the health of one line, call `client.lines.health(lineId)`
151
+ * (`GET /v1/lines/{id}/health`).
164
152
  */
165
153
  async health(opts = {}) {
166
154
  return this.requestBare('GET', '/v1/health', opts);
@@ -169,8 +157,8 @@ export class ISnapClient {
169
157
  const controller = new AbortController();
170
158
  const timeoutId = setTimeout(() => controller.abort(), this.config.timeoutMs);
171
159
  // Track the abort listener so we can detach it in `finally`. Without
172
- // detachment, a long-lived caller signal (e.g. a Node process-wide
173
- // shutdown signal) accumulates one closure per request — leaking the
160
+ // detachment, a long-lived caller signal (such as a process-wide
161
+ // shutdown signal) accumulates one closure per request, leaking the
174
162
  // per-attempt AbortController, the caller's `opts`, and any captured
175
163
  // closure state until the signal eventually fires. Detaching at the
176
164
  // end of the dispatch resolves the leak immediately.
@@ -231,10 +219,10 @@ export class ISnapClient {
231
219
  })();
232
220
  if (!payload) {
233
221
  const message = `Server returned non-JSON response (HTTP ${response.status})${text ? `: ${text.slice(0, NON_JSON_PREVIEW)}` : ''}`;
234
- // 5xx without an envelope is still transient infra (Cloudflare HTML, LB
235
- // 502 page) — surface as ServiceUnavailableError so the retry loop
236
- // kicks in. 4xx without an envelope is a misbehaving proxy; surface
237
- // immediately as base APIError so the caller sees the raw response.
222
+ // A 5xx that is not JSON comes from an intermediary (an HTML error
223
+ // page): throw ServiceUnavailableError so the retry loop takes it. A
224
+ // 4xx that is not JSON is thrown immediately as a plain APIError, so
225
+ // the caller sees the response.
238
226
  if (response.status >= 500) {
239
227
  throw new ServiceUnavailableError({
240
228
  status: response.status,
@@ -265,13 +253,11 @@ export class ISnapClient {
265
253
  return payload.data;
266
254
  }
267
255
  /**
268
- * Like `request`, but for the BARE `/v1` probes (`/v1/health`) whose body
269
- * carries no `{success,data,error}` envelope. Returns the parsed JSON
270
- * verbatim for 200 and 503 (a degraded 503 is data, not an error) and throws
271
- * for any other status or a non-JSON body. Defaults to `maxRetries: 0` — a
272
- * degraded probe is an answer, not a transient failure to retry — but honours
273
- * an explicit `opts.maxRetries` (a genuinely retryable throwing status like a
274
- * non-JSON 500 is then retried like any other request).
256
+ * Like `request`, for `GET /v1/health`, whose body is not wrapped in
257
+ * `{ success, data, error }`. Returns the parsed JSON as is for a `200` and a
258
+ * `503`, and throws for any other status or a body that is not JSON. Not
259
+ * retried unless `opts.maxRetries` is passed: a degraded result is an answer,
260
+ * not a failure to retry.
275
261
  */
276
262
  async requestBare(method, path, opts = {}) {
277
263
  const url = this.buildUrl(path, opts.query);
@@ -356,8 +342,8 @@ export class ISnapClient {
356
342
  requestId: headerRequest
357
343
  });
358
344
  }
359
- // 200 and 503 both carry a meaningful bare body (healthy / degraded) —
360
- // return it verbatim. Any other status is an error even with a JSON body.
345
+ // 200 and 503 both carry a meaningful body (healthy or degraded):
346
+ // return it as is. Any other status is an error even with a JSON body.
361
347
  if (response.status === 200 || response.status === 503) {
362
348
  return payload;
363
349
  }
@@ -395,7 +381,7 @@ export class ISnapClient {
395
381
  const merged = new Headers(custom);
396
382
  merged.forEach((value, key) => headers.set(key, value));
397
383
  }
398
- // Locked headers — set last so caller-supplied custom values cannot
384
+ // Locked headers: set last so that caller-supplied values cannot
399
385
  // override the SDK-managed authentication or idempotency contract.
400
386
  headers.set('Authorization', `Bearer ${this.config.apiKey}`);
401
387
  if (idempotencyKey)
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAGnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAc1C,MAAM,QAAQ,GAA4B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE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,CAAC,CAAC,CAAC,2BAA2B,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACtE,MAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,SAAS,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;QACrE,OAAO,CAAC,IAAI,CACV,yBAAyB,MAAM,CAAC,WAAW,EAAE,IAAI,QAAQ,iBAAiB,YAAY,IAAI,eAAe,aAAa,CACvH,CAAA;IACH,CAAC;IAEO,sBAAsB,CAAC,GAAY;QACzC,IAAI,GAAG,YAAY,YAAY,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC7D,OAAO,yBAAyB,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,CAAA;QAC3D,CAAC;QACD,IAAI,GAAG,YAAY,KAAK;YAAE,OAAO,kBAAkB,GAAG,CAAC,OAAO,EAAE,CAAA;QAChE,OAAO,eAAe,CAAA;IACxB,CAAC;CACF"}
package/dist/config.d.ts CHANGED
@@ -28,8 +28,8 @@ export declare const DEFAULTS: {
28
28
  };
29
29
  export declare function resolveConfig(config: ClientConfig): ResolvedConfig;
30
30
  /**
31
- * Validate `maxRetries` — must be a non-negative integer. NaN, negatives,
32
- * or non-integers (e.g. `Infinity`, `2.5`) would silently break the
31
+ * Validate `maxRetries`: it must be a non-negative integer. NaN, negatives,
32
+ * or non-integers (such as `Infinity` or `2.5`) would silently break the
33
33
  * `for (let attempt = 0; attempt <= config.maxRetries; attempt++)` loop in
34
34
  * `withRetries` and produce confusing failure modes (zero attempts, or
35
35
  * fractional comparisons). Validate at the boundary so the error surfaces
@@ -38,18 +38,18 @@ export declare function resolveConfig(config: ClientConfig): ResolvedConfig;
38
38
  */
39
39
  export declare function validateMaxRetries(value: number | undefined): number;
40
40
  /**
41
- * Validate `maxRetryDelayMs` — the ceiling on a single retry sleep. Must be
41
+ * Validate `maxRetryDelayMs`, the ceiling on a single retry sleep. It must be
42
42
  * a finite positive number: `NaN` and `Infinity` would disable the cap
43
43
  * entirely (a comparison against `NaN` is always false, and nothing exceeds
44
44
  * `Infinity`), which is exactly the unbounded sleep the ceiling exists to
45
45
  * prevent. Zero or negative would reject every retry, including the 60s
46
46
  * limiter windows the API relies on. A caller who genuinely wants day-scale
47
- * sleeps passes a large finite number (`86_400_000`), never `Infinity` —
48
- * same escape hatch, and the same rejection, as `timeoutMs`.
47
+ * sleeps passes a large finite number (`86_400_000`), never `Infinity`:
48
+ * the same rule, and the same rejection, as `timeoutMs`.
49
49
  */
50
50
  export declare function validateMaxRetryDelayMs(value: number | undefined): number;
51
51
  /**
52
- * Validate `timeoutMs` — must be a finite positive number. NaN, zero,
52
+ * Validate `timeoutMs`: it must be a finite positive number. NaN, zero,
53
53
  * negative, or `Infinity` would either abort every request immediately or
54
54
  * never time out at all.
55
55
  */
package/dist/config.js CHANGED
@@ -26,8 +26,8 @@ export function resolveConfig(config) {
26
26
  };
27
27
  }
28
28
  /**
29
- * Validate `maxRetries` — must be a non-negative integer. NaN, negatives,
30
- * or non-integers (e.g. `Infinity`, `2.5`) would silently break the
29
+ * Validate `maxRetries`: it must be a non-negative integer. NaN, negatives,
30
+ * or non-integers (such as `Infinity` or `2.5`) would silently break the
31
31
  * `for (let attempt = 0; attempt <= config.maxRetries; attempt++)` loop in
32
32
  * `withRetries` and produce confusing failure modes (zero attempts, or
33
33
  * fractional comparisons). Validate at the boundary so the error surfaces
@@ -43,14 +43,14 @@ export function validateMaxRetries(value) {
43
43
  return value;
44
44
  }
45
45
  /**
46
- * Validate `maxRetryDelayMs` — the ceiling on a single retry sleep. Must be
46
+ * Validate `maxRetryDelayMs`, the ceiling on a single retry sleep. It must be
47
47
  * a finite positive number: `NaN` and `Infinity` would disable the cap
48
48
  * entirely (a comparison against `NaN` is always false, and nothing exceeds
49
49
  * `Infinity`), which is exactly the unbounded sleep the ceiling exists to
50
50
  * prevent. Zero or negative would reject every retry, including the 60s
51
51
  * limiter windows the API relies on. A caller who genuinely wants day-scale
52
- * sleeps passes a large finite number (`86_400_000`), never `Infinity` —
53
- * same escape hatch, and the same rejection, as `timeoutMs`.
52
+ * sleeps passes a large finite number (`86_400_000`), never `Infinity`:
53
+ * the same rule, and the same rejection, as `timeoutMs`.
54
54
  */
55
55
  export function validateMaxRetryDelayMs(value) {
56
56
  if (value === undefined)
@@ -61,7 +61,7 @@ export function validateMaxRetryDelayMs(value) {
61
61
  return value;
62
62
  }
63
63
  /**
64
- * Validate `timeoutMs` — must be a finite positive number. NaN, zero,
64
+ * Validate `timeoutMs`: it must be a finite positive number. NaN, zero,
65
65
  * negative, or `Infinity` would either abort every request immediately or
66
66
  * never time out at all.
67
67
  */