@productcraft/notify 0.1.0 → 0.2.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/dist/index.cjs CHANGED
@@ -27,7 +27,8 @@ var CategoriesResource = class extends APIResource {
27
27
  * @param params - `Notify.CategoryCreateParams`.
28
28
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
29
29
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
30
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
30
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
31
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
31
32
  * @throws {ConflictError} 409 CONFLICT, CATEGORY_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CATEGORY_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
32
33
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the workspace already has 50 categories.
33
34
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -50,7 +51,8 @@ var CategoriesResource = class extends APIResource {
50
51
  *
51
52
  * @param categoryId - Id of the category.
52
53
  * @param options - Per-request options.
53
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
54
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
55
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
54
56
  * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.
55
57
  * @throws {ConflictError} 409 CONFLICT, CATEGORY_IN_USE: `CATEGORY_IN_USE`: a notification type still uses the category.
56
58
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -74,7 +76,8 @@ var CategoriesResource = class extends APIResource {
74
76
  * @param params - `Notify.CategoryListParams`.
75
77
  * @param options - Per-request options.
76
78
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.
77
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
79
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
80
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
78
81
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
79
82
  * @see GET /v1/workspaces/{workspace_id}/categories
80
83
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-categories
@@ -96,7 +99,8 @@ var CategoriesResource = class extends APIResource {
96
99
  *
97
100
  * @param categoryId - Id of the category.
98
101
  * @param options - Per-request options.
99
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
102
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
103
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
100
104
  * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.
101
105
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
102
106
  * @see GET /v1/workspaces/{workspace_id}/categories/{category_id}
@@ -120,7 +124,8 @@ var CategoriesResource = class extends APIResource {
120
124
  * @param params - `Notify.CategoryUpdateParams`.
121
125
  * @param options - Per-request options.
122
126
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
123
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
127
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
128
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
124
129
  * @throws {NotFoundError} 404 NOT_FOUND, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this id in this workspace.
125
130
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
126
131
  * @see PATCH /v1/workspaces/{workspace_id}/categories/{category_id}
@@ -144,7 +149,8 @@ var ChannelsApnsResource = class extends APIResource {
144
149
  *
145
150
  * @param credentialId - Id of the credential.
146
151
  * @param options - Per-request options.
147
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
152
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
153
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
148
154
  * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no APNs credential with this id in the workspace.
149
155
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
150
156
  * @see DELETE /v1/workspaces/{workspace_id}/channels/apns/credentials/{credential_id}
@@ -167,7 +173,8 @@ var ChannelsApnsResource = class extends APIResource {
167
173
  * @param params - `Notify.ChannelApnUploadCredentialParams`.
168
174
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
169
175
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).
170
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
176
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
177
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
171
178
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same bundle id ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
172
179
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID, CREDENTIAL_MISMATCH: `CREDENTIAL_INVALID`: the `.p8` is not a P-256 private key, or Apple rejected it (wrong `key_id`/`team_id`, revoked key); `CREDENTIAL_MISMATCH`: Apple accepted the key but not for this `bundle_id`. Nothing was stored.
173
180
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -199,7 +206,8 @@ var ChannelsFcmResource = class extends APIResource {
199
206
  *
200
207
  * @param credentialId - Id of the credential.
201
208
  * @param options - Per-request options.
202
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
209
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
210
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
203
211
  * @throws {NotFoundError} 404 NOT_FOUND, CREDENTIAL_NOT_FOUND: `CREDENTIAL_NOT_FOUND`: no FCM credential with this id in the workspace.
204
212
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
205
213
  * @see DELETE /v1/workspaces/{workspace_id}/channels/fcm/credentials/{credential_id}
@@ -222,7 +230,8 @@ var ChannelsFcmResource = class extends APIResource {
222
230
  * @param params - `Notify.ChannelFcmUploadCredentialParams`.
223
231
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
224
232
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is malformed (`errors` names it).
225
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
233
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
234
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
226
235
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFLICT`: another upload for the same project ran at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
227
236
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the JSON is not a service-account key file, or Google rejected it (deleted account or key, missing Firebase Cloud Messaging role, FCM API not enabled, unknown project). Nothing was stored.
228
237
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -249,7 +258,8 @@ var ChannelsWebpushResource = class extends APIResource {
249
258
  * @param params - `Notify.ChannelWebpushGenerateVapidKeysParams`.
250
259
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
251
260
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
252
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
261
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
262
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
253
263
  * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `CONFIRMATION_REQUIRED`: the workspace already has a VAPID key and the body has no `confirm: "rotate"`; `CONFLICT`: another request changed the key at the same time; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
254
264
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
255
265
  * @see POST /v1/workspaces/{workspace_id}/channels/webpush/vapid-keys
@@ -272,7 +282,8 @@ var ChannelsWebpushResource = class extends APIResource {
272
282
  * @param params - `Notify.ChannelWebpushImportVapidKeysParams`.
273
283
  * @param options - Per-request options.
274
284
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
275
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
285
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
286
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
276
287
  * @throws {ConflictError} 409 CONFLICT, CONFIRMATION_REQUIRED: `CONFIRMATION_REQUIRED`: a different key is active and the body has no `confirm: "rotate"`; `CONFLICT`: another request changed the key at the same time.
277
288
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CREDENTIAL_INVALID: `CREDENTIAL_INVALID`: the keys are not base64url P-256 keys, or they are not a matching pair.
278
289
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -297,7 +308,8 @@ var ChannelsWebpushResource = class extends APIResource {
297
308
  * Credential: `bearer`.
298
309
  *
299
310
  * @param options - Per-request options.
300
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
311
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
312
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
301
313
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
302
314
  * @see GET /v1/workspaces/{workspace_id}/channels/webpush
303
315
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels-webpush
@@ -331,7 +343,8 @@ var ChannelsResource = class extends APIResource {
331
343
  * Credential: `bearer`.
332
344
  *
333
345
  * @param options - Per-request options.
334
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
346
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
347
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
335
348
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
336
349
  * @see GET /v1/workspaces/{workspace_id}/channels
337
350
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-channels
@@ -355,7 +368,8 @@ var DeliveriesResource = class extends APIResource {
355
368
  * @param params - `Notify.DeliveryListParams`.
356
369
  * @param options - Per-request options.
357
370
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.
358
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
371
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
372
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
359
373
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
360
374
  * @see GET /v1/workspaces/{workspace_id}/deliveries
361
375
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-deliveries
@@ -379,7 +393,8 @@ var DeliveriesResource = class extends APIResource {
379
393
  *
380
394
  * @param deliveryId - The delivery id.
381
395
  * @param options - Per-request options.
382
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
396
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
397
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
383
398
  * @throws {NotFoundError} 404 NOT_FOUND, DELIVERY_NOT_FOUND: `DELIVERY_NOT_FOUND`: no delivery with this id in this workspace.
384
399
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
385
400
  * @see GET /v1/workspaces/{workspace_id}/deliveries/{delivery_id}
@@ -402,7 +417,8 @@ var ExportResource = class extends APIResource {
402
417
  * Credential: `bearer`.
403
418
  *
404
419
  * @param options - Per-request options.
405
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
420
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
421
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
406
422
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
407
423
  * @see GET /v1/workspaces/{workspace_id}/export
408
424
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-export
@@ -428,7 +444,8 @@ var NotificationTypesTemplatesResource = class extends APIResource {
428
444
  * @param locale - Template locale (BCP 47).
429
445
  * @param options - Per-request options.
430
446
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.
431
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
447
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
448
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
432
449
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.
433
450
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
434
451
  * @see DELETE /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}
@@ -451,7 +468,8 @@ var NotificationTypesTemplatesResource = class extends APIResource {
451
468
  * @param locale - Template locale (BCP 47).
452
469
  * @param options - Per-request options.
453
470
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.
454
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
471
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
472
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
455
473
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.
456
474
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
457
475
  * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}
@@ -477,7 +495,8 @@ var NotificationTypesTemplatesResource = class extends APIResource {
477
495
  * @param params - `Notify.NotificationTypeTemplateRevertParams`.
478
496
  * @param options - Per-request options.
479
497
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel, malformed locale or version.
480
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
498
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
499
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
481
500
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND, TEMPLATE_VERSION_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, `TEMPLATE_NOT_FOUND`, or `TEMPLATE_VERSION_NOT_FOUND`: that version is not kept.
482
501
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
483
502
  * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/revert
@@ -503,7 +522,8 @@ var NotificationTypesTemplatesResource = class extends APIResource {
503
522
  * @param params - `Notify.NotificationTypeTemplateUpdateParams`.
504
523
  * @param options - Per-request options.
505
524
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.
506
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
525
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
526
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
507
527
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.
508
528
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `TEMPLATE_INVALID`: a field is missing, unknown or does not parse (the message names it); `UNSAFE_URL`: a URL field is not https; `LIMIT_EXCEEDED`: the template is over 32 KB or the type has 100 templates.
509
529
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -529,7 +549,8 @@ var NotificationTypesTemplatesResource = class extends APIResource {
529
549
  * @param locale - Template locale (BCP 47).
530
550
  * @param options - Per-request options.
531
551
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: unknown channel or malformed locale.
532
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
552
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
553
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
533
554
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, TEMPLATE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `TEMPLATE_NOT_FOUND`: the type has no template for this channel and locale.
534
555
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
535
556
  * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}/templates/{channel}/{locale}/versions
@@ -557,7 +578,8 @@ var NotificationTypesResource = class extends APIResource {
557
578
  *
558
579
  * @param typeId - Id of the type.
559
580
  * @param options - Per-request options.
560
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
581
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
582
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
561
583
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.
562
584
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
563
585
  * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/archive
@@ -580,7 +602,8 @@ var NotificationTypesResource = class extends APIResource {
580
602
  * @param params - `Notify.NotificationTypeCreateParams`.
581
603
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
582
604
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
583
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
605
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
606
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
584
607
  * @throws {ConflictError} 409 CONFLICT, NOTIFICATION_TYPE_KEY_TAKEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `NOTIFICATION_TYPE_KEY_TAKEN`: the key is in use; `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
585
608
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid; `LIMIT_EXCEEDED`: the workspace already has 200 types.
586
609
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -604,7 +627,8 @@ var NotificationTypesResource = class extends APIResource {
604
627
  * @param params - `Notify.NotificationTypeListParams`.
605
628
  * @param options - Per-request options.
606
629
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad parameter, or `BAD_REQUEST`: invalid cursor.
607
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
630
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
631
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
608
632
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
609
633
  * @see GET /v1/workspaces/{workspace_id}/notification-types
610
634
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notification-types
@@ -630,7 +654,8 @@ var NotificationTypesResource = class extends APIResource {
630
654
  * @param params - `Notify.NotificationTypePreviewParams`.
631
655
  * @param options - Per-request options.
632
656
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
633
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
657
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
658
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
634
659
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, RECIPIENT_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`, or `RECIPIENT_NOT_FOUND`: no recipient with this external id.
635
660
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
636
661
  * @see POST /v1/workspaces/{workspace_id}/notification-types/{type_id}/preview
@@ -654,7 +679,8 @@ var NotificationTypesResource = class extends APIResource {
654
679
  * @param params - `Notify.NotificationTypeReplaceByKeyParams`.
655
680
  * @param options - Per-request options.
656
681
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field or template entry is invalid.
657
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
682
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
683
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
658
684
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR, TEMPLATE_INVALID, UNSAFE_URL, LIMIT_EXCEEDED: `CATEGORY_NOT_FOUND`, `VALIDATION_ERROR` (routing), `TEMPLATE_INVALID`, `UNSAFE_URL` or `LIMIT_EXCEEDED` (200 types, 32 KB per template).
659
685
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
660
686
  * @see PUT /v1/workspaces/{workspace_id}/notification-types/by-key/{key}
@@ -674,7 +700,8 @@ var NotificationTypesResource = class extends APIResource {
674
700
  *
675
701
  * @param typeId - Id of the type.
676
702
  * @param options - Per-request options.
677
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
703
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
704
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
678
705
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.
679
706
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
680
707
  * @see GET /v1/workspaces/{workspace_id}/notification-types/{type_id}
@@ -698,7 +725,8 @@ var NotificationTypesResource = class extends APIResource {
698
725
  * @param params - `Notify.NotificationTypeUpdateParams`.
699
726
  * @param options - Per-request options.
700
727
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
701
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
728
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
729
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
702
730
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no notification type with this id in this workspace.
703
731
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, VALIDATION_ERROR: `CATEGORY_NOT_FOUND`: no category with `category_key`; `VALIDATION_ERROR`: the routing is invalid.
704
732
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -723,7 +751,8 @@ var NotificationsResource = class extends APIResource {
723
751
  *
724
752
  * @param notificationId - The notification id.
725
753
  * @param options - Per-request options.
726
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
754
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
755
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
727
756
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.
728
757
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
729
758
  * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/cancel
@@ -745,14 +774,15 @@ var NotificationsResource = class extends APIResource {
745
774
  *
746
775
  * @param params - `Notify.NotificationCancelByKeyParams`.
747
776
  * @param options - Per-request options.
748
- * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `cancellation_key` is missing.
749
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
777
+ * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `cancellation_key` is missing or not 1-255 characters of `A-Z a-z 0-9 . _ : @ | -`.
778
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
779
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
750
780
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
751
781
  * @see POST /v1/workspaces/{workspace_id}/notifications/cancel
752
782
  * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications-cancel
753
783
  * @example
754
784
  * ```ts
755
- * const cancelByKey = await notify.notifications.cancelByKey({ cancellation_key: "invite:inv_77" });
785
+ * const cancelByKey = await notify.notifications.cancelByKey({ cancellation_key: "invite.sent:inv_77" });
756
786
  * ```
757
787
  */
758
788
  cancelByKey(params, options) {
@@ -768,7 +798,8 @@ var NotificationsResource = class extends APIResource {
768
798
  * @param params - `Notify.NotificationListParams`.
769
799
  * @param options - Per-request options.
770
800
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.
771
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
801
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
802
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
772
803
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
773
804
  * @see GET /v1/workspaces/{workspace_id}/notifications
774
805
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-notifications
@@ -792,7 +823,8 @@ var NotificationsResource = class extends APIResource {
792
823
  *
793
824
  * @param notificationId - The notification id.
794
825
  * @param options - Per-request options.
795
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
826
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
827
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
796
828
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.
797
829
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
798
830
  * @see POST /v1/workspaces/{workspace_id}/notifications/{notification_id}/retract
@@ -814,7 +846,8 @@ var NotificationsResource = class extends APIResource {
814
846
  *
815
847
  * @param notificationId - The notification id.
816
848
  * @param options - Per-request options.
817
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
849
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
850
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
818
851
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_NOT_FOUND: `NOTIFICATION_NOT_FOUND`: no notification with this id in this workspace.
819
852
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
820
853
  * @see GET /v1/workspaces/{workspace_id}/notifications/{notification_id}
@@ -830,14 +863,15 @@ var NotificationsResource = class extends APIResource {
830
863
  /**
831
864
  * Send a notification
832
865
  *
833
- * Notifies up to 1,000 recipients with one notification type, across the type's channels (in-app inbox, email, push, web push), honouring each recipient's preferences. Returns 202 as soon as the send is stored; delivery happens in the background (see `GET /deliveries`). Unknown external ids do not fail the call: they are listed in `skipped` (`create_missing: true` creates them instead); the call fails only when no recipient can be notified. An `Idempotency-Key` is **required** (a deterministic one such as `invoice.paid:inv_123` is best): the same key and body return the same notification, even when retried much later; the same key with a different body is a 409. `dry_run: true` returns the plan per recipient and channel with the reason for every skip, and stores nothing (200, no key needed). Limits: 3,000 recipients per minute per workspace; 30 notifications per minute per recipient (critical types have a separate 30), beyond which deliveries are skipped as `rate_limited`.
866
+ * Notifies up to 1,000 recipients with one notification type, across the type's channels (in-app inbox, email, push, web push), honouring each recipient's preferences. Returns 202 as soon as the send is stored; delivery happens in the background (see `GET /deliveries`). Unknown external ids do not fail the call: they are listed in `skipped` (`create_missing: true` creates them instead); the call fails only when no recipient can be notified. An `Idempotency-Key` is **required** (a deterministic one built from your event, such as `invoice.paid:inv_123`, is best; dots are fine): the same key and body return the same notification, even when retried much later; the same key with a different body is a 409. `dry_run: true` returns the plan per recipient and channel with the reason for every skip, and stores nothing (200, no key needed). Limits: 3,000 recipients per minute per workspace; 30 notifications per minute per recipient (critical types have a separate 30), beyond which deliveries are skipped as `rate_limited`.
834
867
  *
835
868
  * Credential: `bearer`.
836
869
  *
837
870
  * @param params - `Notify.NotificationSendParams`.
838
871
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
839
- * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED, TOO_MANY_RECIPIENTS: `IDEMPOTENCY_KEY_REQUIRED`: no `Idempotency-Key`; `TOO_MANY_RECIPIENTS`: over 1,000; `VALIDATION_ERROR`: a field is invalid.
840
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
872
+ * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, IDEMPOTENCY_KEY_REQUIRED, TOO_MANY_RECIPIENTS: `IDEMPOTENCY_KEY_REQUIRED`: no `Idempotency-Key`; `BAD_REQUEST`: the `Idempotency-Key` is over 256 characters or has a character outside `A-Z a-z 0-9 . _ : -` (the message names it); `TOO_MANY_RECIPIENTS`: over 1,000; `VALIDATION_ERROR`: a field is invalid (an invalid `cancellation_key` included).
873
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
874
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
841
875
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no type with this key.
842
876
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the key was used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
843
877
  * @throws {APIError} 413 PAYLOAD_TOO_LARGE, DATA_TOO_LARGE: `DATA_TOO_LARGE`: `data` is over 16 KB.
@@ -868,7 +902,8 @@ var RecipientTokensResource = class extends APIResource {
868
902
  * @param params - `Notify.RecipientTokenMintParams`.
869
903
  * @param options - Per-request options.
870
904
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
871
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
905
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
906
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
872
907
  * @throws {ConflictError} 409 CONFLICT, RECIPIENT_ERASED: `RECIPIENT_ERASED`: the recipient was erased in the last 24 hours (its linked Auth user was deleted).
873
908
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over the mint limit; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
874
909
  * @see POST /v1/workspaces/{workspace_id}/recipient-tokens
@@ -894,7 +929,8 @@ var RecipientsDevicesResource = class extends APIResource {
894
929
  * @param params - `Notify.RecipientDeviceCreateParams`.
895
930
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
896
931
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
897
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
932
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
933
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
898
934
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id; create it with `PUT` first.
899
935
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
900
936
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service, or resolves to a private address.
@@ -919,7 +955,8 @@ var RecipientsDevicesResource = class extends APIResource {
919
955
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
920
956
  * @param deviceId - Id of the device.
921
957
  * @param options - Per-request options.
922
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
958
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
959
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
923
960
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND, DEVICE_NOT_FOUND: `RECIPIENT_NOT_FOUND`, or `DEVICE_NOT_FOUND`: the recipient has no device with this id.
924
961
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
925
962
  * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}/devices/{device_id}
@@ -941,7 +978,8 @@ var RecipientsDevicesResource = class extends APIResource {
941
978
  *
942
979
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
943
980
  * @param options - Per-request options.
944
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
981
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
982
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
945
983
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
946
984
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
947
985
  * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/devices
@@ -967,7 +1005,8 @@ var RecipientsInboxResource = class extends APIResource {
967
1005
  * @param params - `Notify.RecipientInboxListParams`.
968
1006
  * @param options - Per-request options.
969
1007
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.
970
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1008
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1009
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
971
1010
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
972
1011
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
973
1012
  * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/inbox
@@ -996,7 +1035,8 @@ var RecipientsPreferencesResource = class extends APIResource {
996
1035
  * @param params - `Notify.RecipientPreferenceReplaceParams`.
997
1036
  * @param options - Per-request options.
998
1037
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.
999
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1038
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1039
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1000
1040
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1001
1041
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.
1002
1042
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1019,7 +1059,8 @@ var RecipientsPreferencesResource = class extends APIResource {
1019
1059
  *
1020
1060
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
1021
1061
  * @param options - Per-request options.
1022
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1062
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1063
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1023
1064
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1024
1065
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1025
1066
  * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/preferences
@@ -1043,7 +1084,8 @@ var RecipientsPreferencesResource = class extends APIResource {
1043
1084
  * @param params - `Notify.RecipientPreferenceUpdateParams`.
1044
1085
  * @param options - Per-request options.
1045
1086
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a cell is malformed or repeated.
1046
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1087
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1088
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1047
1089
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1048
1090
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND, PREFERENCE_LOCKED: `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: a cell names an unknown key; `PREFERENCE_LOCKED`: the channel is mandatory for that category and cannot be turned off.
1049
1091
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1081,7 +1123,8 @@ var RecipientsResource = class extends APIResource {
1081
1123
  * @param params - `Notify.RecipientBulkIdentifyParams`.
1082
1124
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1083
1125
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `recipients` is missing, empty or longer than 1,000.
1084
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1126
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1127
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1085
1128
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `IDEMPOTENCY_KEY_REUSE`: the `Idempotency-Key` was already used with a different body. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1086
1129
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: more than 20 bulk calls in a minute; see `Retry-After`. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1087
1130
  * @see POST /v1/workspaces/{workspace_id}/recipients/bulk
@@ -1103,7 +1146,8 @@ var RecipientsResource = class extends APIResource {
1103
1146
  *
1104
1147
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
1105
1148
  * @param options - Per-request options.
1106
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1149
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1150
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1107
1151
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1108
1152
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1109
1153
  * @see DELETE /v1/workspaces/{workspace_id}/recipients/{external_id}
@@ -1127,7 +1171,8 @@ var RecipientsResource = class extends APIResource {
1127
1171
  * @param params - `Notify.RecipientIdentifyParams`.
1128
1172
  * @param options - Per-request options.
1129
1173
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
1130
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1174
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1175
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1131
1176
  * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.
1132
1177
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1133
1178
  * @see PUT /v1/workspaces/{workspace_id}/recipients/{external_id}
@@ -1150,7 +1195,8 @@ var RecipientsResource = class extends APIResource {
1150
1195
  * @param params - `Notify.RecipientListParams`.
1151
1196
  * @param options - Per-request options.
1152
1197
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.
1153
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1198
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1199
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1154
1200
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1155
1201
  * @see GET /v1/workspaces/{workspace_id}/recipients
1156
1202
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-recipients
@@ -1174,7 +1220,8 @@ var RecipientsResource = class extends APIResource {
1174
1220
  *
1175
1221
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
1176
1222
  * @param options - Per-request options.
1177
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1223
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1224
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1178
1225
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1179
1226
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1180
1227
  * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}
@@ -1196,7 +1243,8 @@ var RecipientsResource = class extends APIResource {
1196
1243
  *
1197
1244
  * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
1198
1245
  * @param options - Per-request options.
1199
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1246
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1247
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1200
1248
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1201
1249
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1202
1250
  * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens
@@ -1220,7 +1268,8 @@ var RecipientsResource = class extends APIResource {
1220
1268
  * @param params - `Notify.RecipientTimelineParams`.
1221
1269
  * @param options - Per-request options.
1222
1270
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `BAD_REQUEST`: invalid cursor.
1223
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1271
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1272
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1224
1273
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1225
1274
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1226
1275
  * @see GET /v1/workspaces/{workspace_id}/recipients/{external_id}/timeline
@@ -1247,7 +1296,8 @@ var RecipientsResource = class extends APIResource {
1247
1296
  * @param params - `Notify.RecipientUpdateParams`.
1248
1297
  * @param options - Per-request options.
1249
1298
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
1250
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1299
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1300
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1251
1301
  * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1252
1302
  * @throws {ConflictError} 409 CONFLICT, AUTH_USER_ALREADY_LINKED: `AUTH_USER_ALREADY_LINKED`: the Auth end user is linked to another recipient of the workspace.
1253
1303
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1271,7 +1321,8 @@ var SettingsResource = class extends APIResource {
1271
1321
  * Credential: `bearer`.
1272
1322
  *
1273
1323
  * @param options - Per-request options.
1274
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1324
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1325
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1275
1326
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1276
1327
  * @see GET /v1/workspaces/{workspace_id}/settings
1277
1328
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-settings
@@ -1291,7 +1342,8 @@ var SettingsResource = class extends APIResource {
1291
1342
  * Credential: `bearer`.
1292
1343
  *
1293
1344
  * @param options - Per-request options.
1294
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1345
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1346
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1295
1347
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1296
1348
  * @see POST /v1/workspaces/{workspace_id}/settings/revoke-all-tokens
1297
1349
  * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-settings-revoke-all-tokens
@@ -1313,7 +1365,8 @@ var SettingsResource = class extends APIResource {
1313
1365
  * @param params - `Notify.SettingsUpdateParams`.
1314
1366
  * @param options - Per-request options.
1315
1367
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
1316
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1368
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1369
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1317
1370
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1318
1371
  * @see PATCH /v1/workspaces/{workspace_id}/settings
1319
1372
  * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-settings
@@ -1335,7 +1388,8 @@ var SetupStatusResource = class extends APIResource {
1335
1388
  * Credential: `bearer`.
1336
1389
  *
1337
1390
  * @param options - Per-request options.
1338
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.channel.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1391
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1392
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.channel.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1339
1393
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1340
1394
  * @see GET /v1/workspaces/{workspace_id}/setup-status
1341
1395
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-setup-status
@@ -1359,7 +1413,8 @@ var StatsResource = class extends APIResource {
1359
1413
  * @param params - `Notify.StatsRetrieveParams`.
1360
1414
  * @param options - Per-request options.
1361
1415
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a date is invalid, `from` is after `to`, or the range is longer than 90 days.
1362
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.message.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`).
1416
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: Missing, expired, revoked or invalid bearer token (`UNAUTHORIZED`): send a workspace API key or a console session as `Authorization: Bearer <token>`. A recipient token is refused here with `RECIPIENT_TOKEN_INVALID`: it works only on the client API (`/v1/client/…`).
1417
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.message.read`, or the workspace has not enabled Notify (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1363
1418
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1364
1419
  * @see GET /v1/workspaces/{workspace_id}/stats
1365
1420
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-stats
@@ -1383,8 +1438,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1383
1438
  * @param params - `Notify.WebhookEndpointCreateParams`.
1384
1439
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1385
1440
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, WEBHOOK_EVENT_TYPE_UNKNOWN: Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`).
1386
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1387
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1441
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1442
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1388
1443
  * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_LIMIT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1389
1444
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The URL points at a private, loopback or internal address.
1390
1445
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1408,8 +1463,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1408
1463
  * @param endpointId - Id of the endpoint.
1409
1464
  * @param options - Per-request options.
1410
1465
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.
1411
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1412
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1466
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1467
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1413
1468
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1414
1469
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1415
1470
  * @see DELETE /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}
@@ -1431,8 +1486,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1431
1486
  *
1432
1487
  * @param options - Per-request options.
1433
1488
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: The scope id in the path is malformed.
1434
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1435
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1489
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1490
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1436
1491
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1437
1492
  * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints
1438
1493
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints
@@ -1456,8 +1511,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1456
1511
  * @param endpointId - Id of the endpoint.
1457
1512
  * @param options - Per-request options.
1458
1513
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.
1459
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1460
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1514
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1515
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1461
1516
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1462
1517
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1463
1518
  * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}
@@ -1481,8 +1536,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1481
1536
  * @param params - `Notify.WebhookEndpointRotateSecretParams`.
1482
1537
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1483
1538
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `grace_hours` out of range, or `endpoint_id` is not a UUID.
1484
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1485
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1539
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1540
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1486
1541
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1487
1542
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1488
1543
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1507,8 +1562,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1507
1562
  * @param params - `Notify.WebhookEndpointTestParams`.
1508
1563
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1509
1564
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Unknown `event_type`, or `endpoint_id` is not a UUID.
1510
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1511
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1565
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1566
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1512
1567
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1513
1568
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1514
1569
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1533,8 +1588,8 @@ var WebhooksEndpointsResource = class extends APIResource {
1533
1588
  * @param params - `Notify.WebhookEndpointUpdateParams`.
1534
1589
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1535
1590
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Validation failure, or `endpoint_id` is not a UUID.
1536
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1537
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1591
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1592
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1538
1593
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1539
1594
  * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1540
1595
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The new URL points at a private, loopback or internal address.
@@ -1559,8 +1614,8 @@ var WebhooksEventTypesResource = class extends APIResource {
1559
1614
  * Credential: `bearer`.
1560
1615
  *
1561
1616
  * @param options - Per-request options.
1562
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1563
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1617
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1618
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1564
1619
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1565
1620
  * @see GET /v1/workspaces/{workspace_id}/webhooks/event-types
1566
1621
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-event-types
@@ -1584,8 +1639,8 @@ var WebhooksEventsResource = class extends APIResource {
1584
1639
  * @param params - `Notify.WebhookEventListParams`.
1585
1640
  * @param options - Per-request options.
1586
1641
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Invalid filter value or cursor.
1587
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1588
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1642
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1643
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1589
1644
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1590
1645
  * @see GET /v1/workspaces/{workspace_id}/webhooks/events
1591
1646
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-webhooks-events
@@ -1611,8 +1666,8 @@ var WebhooksEventsResource = class extends APIResource {
1611
1666
  * @param params - `Notify.WebhookEventReplayParams`.
1612
1667
  * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
1613
1668
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID.
1614
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1615
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1669
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1670
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1616
1671
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
1617
1672
  * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_NOT_SUBSCRIBED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `endpoint_id` is switched off or does not receive this event type (`WEBHOOK_ENDPOINT_NOT_SUBSCRIBED`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).
1618
1673
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1636,8 +1691,8 @@ var WebhooksEventsResource = class extends APIResource {
1636
1691
  * @param eventId - The event id, `evt_<uuid>`.
1637
1692
  * @param options - Per-request options.
1638
1693
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`.
1639
- * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
1640
- * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`).
1694
+ * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID: `UNAUTHORIZED`: Missing or invalid bearer token. A recipient token is refused with `RECIPIENT_TOKEN_INVALID` (it works only on `/v1/client/…`).
1695
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `notify.webhook.read` (reads) or `notify.webhook.manage` (changes, Send test, replay), or Notify is not enabled for the workspace (`SERVICE_NOT_ENABLED`). Also `FORBIDDEN` when the credential belongs to another workspace than the URL names, or the URL uses the workspace slug instead of its id (a UUID).
1641
1696
  * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days.
1642
1697
  * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1643
1698
  * @see GET /v1/workspaces/{workspace_id}/webhooks/events/{event_id}
@@ -1747,7 +1802,7 @@ var ClientDevicesResource = class extends APIResource {
1747
1802
  * @param deviceId - Id of the device.
1748
1803
  * @param options - Per-request options.
1749
1804
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1750
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1805
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1751
1806
  * @throws {NotFoundError} 404 NOT_FOUND, DEVICE_NOT_FOUND: `DEVICE_NOT_FOUND`: the recipient has no device with this id.
1752
1807
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1753
1808
  * @see DELETE /v1/client/devices/{device_id}
@@ -1772,7 +1827,7 @@ var ClientDevicesResource = class extends APIResource {
1772
1827
  * @param options - Per-request options.
1773
1828
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
1774
1829
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1775
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1830
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1776
1831
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, DEVICE_TOKEN_INVALID, WEBPUSH_ENDPOINT_NOT_ALLOWED: `DEVICE_TOKEN_INVALID`: the token or subscription is malformed for its channel (or `environment` is missing for APNs); `WEBPUSH_ENDPOINT_NOT_ALLOWED`: the endpoint is not https on a known push service.
1777
1832
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1778
1833
  * @see POST /v1/client/devices
@@ -1797,7 +1852,7 @@ var ClientInboxResource = class extends APIResource {
1797
1852
  *
1798
1853
  * @param options - Per-request options.
1799
1854
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1800
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1855
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1801
1856
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1802
1857
  * @see GET /v1/client/inbox/counts
1803
1858
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox-counts
@@ -1821,7 +1876,7 @@ var ClientInboxResource = class extends APIResource {
1821
1876
  * @param params - `Notify.MeInboxInteractParams`.
1822
1877
  * @param options - Per-request options.
1823
1878
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1824
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1879
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1825
1880
  * @throws {NotFoundError} 404 NOT_FOUND, INBOX_ITEM_NOT_FOUND: `INBOX_ITEM_NOT_FOUND`: the recipient has no item with this id (or it was retracted).
1826
1881
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, VALIDATION_ERROR: `VALIDATION_ERROR`: the item has no button with this `action_key`.
1827
1882
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
@@ -1847,7 +1902,7 @@ var ClientInboxResource = class extends APIResource {
1847
1902
  * @param options - Per-request options.
1848
1903
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a query parameter is invalid, or the cursor is not one this route returned.
1849
1904
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1850
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1905
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1851
1906
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1852
1907
  * @see GET /v1/client/inbox
1853
1908
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-inbox
@@ -1874,7 +1929,7 @@ var ClientInboxResource = class extends APIResource {
1874
1929
  * @param options - Per-request options.
1875
1930
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid, or not exactly one of `ids` and `before_id` was given.
1876
1931
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1877
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1932
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `inbox:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1878
1933
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1879
1934
  * @see POST /v1/client/inbox/mark
1880
1935
  * @see https://productcraft.co/docs/notify/api-reference#post-v1-client-inbox-mark
@@ -1898,7 +1953,7 @@ var ClientPreferencesResource = class extends APIResource {
1898
1953
  *
1899
1954
  * @param options - Per-request options.
1900
1955
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1901
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1956
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:read` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1902
1957
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1903
1958
  * @see GET /v1/client/preferences
1904
1959
  * @see https://productcraft.co/docs/notify/api-reference#get-v1-client-preferences
@@ -1922,7 +1977,7 @@ var ClientPreferencesResource = class extends APIResource {
1922
1977
  * @param options - Per-request options.
1923
1978
  * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid (`errors` names it).
1924
1979
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1925
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
1980
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `preferences:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1926
1981
  * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, PREFERENCE_LOCKED, CATEGORY_NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `PREFERENCE_LOCKED`: the channel is mandatory for the category; `CATEGORY_NOT_FOUND` / `NOTIFICATION_TYPE_NOT_FOUND`: no category or type with that key.
1927
1982
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1928
1983
  * @see PATCH /v1/client/preferences
@@ -1947,7 +2002,7 @@ var ClientWebpushResource = class extends APIResource {
1947
2002
  *
1948
2003
  * @param options - Per-request options.
1949
2004
  * @throws {AuthenticationError} 401 UNAUTHORIZED, RECIPIENT_TOKEN_INVALID, RECIPIENT_TOKEN_EXPIRED: `RECIPIENT_TOKEN_INVALID`: no recipient token, a malformed or forged one, an API key, or a revoked token (mint a new one); `RECIPIENT_TOKEN_EXPIRED`: the token expired (mint a new one).
1950
- * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins.
2005
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, RECIPIENT_TOKEN_SCOPE, ORIGIN_NOT_ALLOWED, SERVICE_NOT_ENABLED: `RECIPIENT_TOKEN_SCOPE`: the token lacks the `devices:write` scope; `ORIGIN_NOT_ALLOWED`: the browser origin is not in the workspace client origins; `SERVICE_NOT_ENABLED`: Notify is turned off for the workspace.
1951
2006
  * @throws {NotFoundError} 404 NOT_FOUND, CHANNEL_NOT_CONFIGURED: `CHANNEL_NOT_CONFIGURED`: the workspace has no web push key yet (generate one in the console or with `POST /channels/webpush/vapid-keys`).
1952
2007
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 60 client calls per minute for this recipient; `Retry-After` gives the seconds to wait. Per-IP limit: more than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.
1953
2008
  * @see GET /v1/client/webpush/vapid-public-key
@@ -2000,8 +2055,9 @@ var InboxItemStatusFilter = { values: ["active", "archived", "all"] };
2000
2055
  var InboxMarkAction = { values: ["seen", "read", "unread", "archived", "unarchived"] };
2001
2056
  var NotificationStatus = { values: ["scheduled", "accepted", "planned", "cancelled"] };
2002
2057
  var NotifyChannel = { values: ["inbox", "email", "push", "webpush"] };
2003
- var NotifyDeliveryReason = { values: ["suppressed_preference", "unsubscribed_all", "held_quiet_hours", "scheduled_send", "no_device", "no_address", "email_invalid", "email_complained", "email_paused", "email_budget", "email_backlog_full", "channel_not_configured", "channel_restricted", "type_archived", "credential_invalid", "template_missing", "rate_limited", "throttled", "read_in_inbox", "awaiting_unread", "actor_excluded", "recipient_not_found", "recipient_erased", "mail_suppressed", "mail_refused", "pruned", "payload_too_large", "credential_error", "circuit_open", "expired", "cancelled", "provider_error"] };
2058
+ var NotifyDeliveryReason = { values: ["suppressed_preference", "default_off", "unsubscribed_all", "held_quiet_hours", "scheduled_send", "no_device", "no_address", "email_invalid", "email_complained", "email_paused", "email_budget", "email_backlog_full", "channel_not_configured", "channel_restricted", "type_archived", "credential_invalid", "template_missing", "rate_limited", "throttled", "read_in_inbox", "awaiting_unread", "actor_excluded", "recipient_not_found", "recipient_erased", "mail_suppressed", "mail_refused", "pruned", "payload_too_large", "credential_error", "circuit_open", "expired", "cancelled", "provider_error"] };
2004
2059
  var NotifyEmailPauseReason = { values: ["complaints", "bounces"] };
2060
+ var NotifyQuietHoursSource = { values: ["recipient", "workspace"] };
2005
2061
  var NotifyRecipientDeletionCause = { values: ["api", "auth_user_deleted"] };
2006
2062
  var NotifyStatsChannel = { values: ["inbox", "email", "push", "webpush"] };
2007
2063
  var NotifyWebhookChannel = { values: ["inbox", "email", "push", "webpush"] };
@@ -2023,7 +2079,7 @@ var WebhookEventStatus = { values: ["pending", "delivered", "failed", "not_sent"
2023
2079
  var WebhookEventType = { values: ["notification.accepted", "delivery.sent", "delivery.delivered", "delivery.failed", "delivery.bounced", "delivery.skipped", "inbox_item.read", "inbox_item.archived", "inbox_item.interacted", "device.pruned", "device.moved", "credential.invalid", "email.auto_paused", "recipient.deleted"] };
2024
2080
 
2025
2081
  // src/_generated/client.ts
2026
- var VERSION = "0.1.0" ;
2082
+ var VERSION = "0.2.0" ;
2027
2083
  exports.default = class Notify extends NotifyResources {
2028
2084
  /** The options this client was built with, for the token scopes' own clients. Never enumerable. */
2029
2085
  #options;
@@ -2078,6 +2134,7 @@ exports.default = class Notify extends NotifyResources {
2078
2134
  Notify2.NotifyChannel = NotifyChannel;
2079
2135
  Notify2.NotifyDeliveryReason = NotifyDeliveryReason;
2080
2136
  Notify2.NotifyEmailPauseReason = NotifyEmailPauseReason;
2137
+ Notify2.NotifyQuietHoursSource = NotifyQuietHoursSource;
2081
2138
  Notify2.NotifyRecipientDeletionCause = NotifyRecipientDeletionCause;
2082
2139
  Notify2.NotifyStatsChannel = NotifyStatsChannel;
2083
2140
  Notify2.NotifyWebhookChannel = NotifyWebhookChannel;
@@ -2098,7 +2155,7 @@ exports.default = class Notify extends NotifyResources {
2098
2155
  Notify2.WebhookEventStatus = WebhookEventStatus;
2099
2156
  Notify2.WebhookEventType = WebhookEventType;
2100
2157
  })(exports.default || (exports.default = {}));
2101
- var NotifyErrorCode = { values: ["BAD_REQUEST", "VALIDATION_ERROR", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "PRECONDITION_FAILED", "PAYLOAD_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "UNPROCESSABLE_ENTITY", "PRECONDITION_REQUIRED", "RATE_LIMITED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "SERVICE_NOT_ENABLED", "INVALID_CREDENTIALS", "SESSION_REVOKED", "MCP_NOT_PERMITTED", "MCP_WORKSPACE_MISMATCH", "PAK_NOT_PERMITTED", "ACTIONS_NOT_GRANTABLE", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_KEY_REQUIRED", "IDEMPOTENCY_IN_PROGRESS", "WEBHOOK_ENDPOINT_LIMIT", "WEBHOOK_ENDPOINT_NOT_FOUND", "WEBHOOK_ENDPOINT_NOT_SUBSCRIBED", "WEBHOOK_EVENT_NOT_FOUND", "WEBHOOK_EVENT_TYPE_UNKNOWN", "NOTIFICATION_TYPE_NOT_FOUND", "NOTIFICATION_TYPE_ARCHIVED", "RECIPIENT_NOT_FOUND", "TOO_MANY_RECIPIENTS", "DATA_TOO_LARGE", "TEMPLATE_MISSING", "TEMPLATE_INVALID", "CHANNEL_NOT_CONFIGURED", "CREDENTIAL_INVALID", "CREDENTIAL_NOT_FOUND", "CREDENTIAL_MISMATCH", "DEVICE_TOKEN_INVALID", "WEBPUSH_ENDPOINT_NOT_ALLOWED", "MAIL_NOT_ENABLED", "RECIPIENT_TOKEN_INVALID", "RECIPIENT_TOKEN_EXPIRED", "RECIPIENT_TOKEN_SCOPE", "ORIGIN_NOT_ALLOWED", "STREAM_LIMIT", "LIMIT_EXCEEDED", "SEND_AT_OUT_OF_RANGE", "EMAIL_PAUSED", "EMAIL_BACKLOG_FULL", "UNSAFE_URL", "AUTH_USER_ALREADY_LINKED", "DEVICE_NOT_FOUND", "CATEGORY_NOT_FOUND", "CATEGORY_KEY_TAKEN", "CATEGORY_IN_USE", "NOTIFICATION_TYPE_KEY_TAKEN", "TEMPLATE_NOT_FOUND", "TEMPLATE_VERSION_NOT_FOUND", "PREFERENCE_LOCKED", "NOTIFICATION_NOT_FOUND", "DELIVERY_NOT_FOUND", "CONFIRMATION_REQUIRED", "INBOX_ITEM_NOT_FOUND", "RECIPIENT_ERASED", "DEVICE_MOVE_LIMIT"] };
2158
+ var NotifyErrorCode = { values: ["BAD_REQUEST", "VALIDATION_ERROR", "UNAUTHORIZED", "PAYMENT_REQUIRED", "FORBIDDEN", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "REQUEST_TIMEOUT", "CONFLICT", "GONE", "PRECONDITION_FAILED", "PAYLOAD_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "UNPROCESSABLE_ENTITY", "PRECONDITION_REQUIRED", "RATE_LIMITED", "INTERNAL_SERVER_ERROR", "NOT_IMPLEMENTED", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "GATEWAY_TIMEOUT", "SERVICE_NOT_ENABLED", "INVALID_CREDENTIALS", "SESSION_REVOKED", "MCP_NOT_PERMITTED", "MCP_WORKSPACE_MISMATCH", "PAK_NOT_PERMITTED", "ACTIONS_NOT_GRANTABLE", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_KEY_REQUIRED", "IDEMPOTENCY_IN_PROGRESS", "WEBHOOK_ENDPOINT_LIMIT", "WEBHOOK_ENDPOINT_NOT_FOUND", "WEBHOOK_ENDPOINT_NOT_SUBSCRIBED", "WEBHOOK_EVENT_NOT_FOUND", "WEBHOOK_EVENT_TYPE_UNKNOWN", "NOTIFICATION_TYPE_NOT_FOUND", "NOTIFICATION_TYPE_ARCHIVED", "RECIPIENT_NOT_FOUND", "TOO_MANY_RECIPIENTS", "DATA_TOO_LARGE", "TEMPLATE_MISSING", "TEMPLATE_INVALID", "CHANNEL_NOT_CONFIGURED", "CREDENTIAL_INVALID", "CREDENTIAL_NOT_FOUND", "CREDENTIAL_MISMATCH", "DEVICE_TOKEN_INVALID", "WEBPUSH_ENDPOINT_NOT_ALLOWED", "RECIPIENT_TOKEN_INVALID", "RECIPIENT_TOKEN_EXPIRED", "RECIPIENT_TOKEN_SCOPE", "ORIGIN_NOT_ALLOWED", "STREAM_LIMIT", "LIMIT_EXCEEDED", "SEND_AT_OUT_OF_RANGE", "UNSAFE_URL", "AUTH_USER_ALREADY_LINKED", "DEVICE_NOT_FOUND", "CATEGORY_NOT_FOUND", "CATEGORY_KEY_TAKEN", "CATEGORY_IN_USE", "NOTIFICATION_TYPE_KEY_TAKEN", "TEMPLATE_NOT_FOUND", "TEMPLATE_VERSION_NOT_FOUND", "PREFERENCE_LOCKED", "NOTIFICATION_NOT_FOUND", "DELIVERY_NOT_FOUND", "CONFIRMATION_REQUIRED", "INBOX_ITEM_NOT_FOUND", "RECIPIENT_ERASED", "DEVICE_MOVE_LIMIT"] };
2102
2159
 
2103
2160
  Object.defineProperty(exports, "APIConnectionError", {
2104
2161
  enumerable: true,