@productcraft/notify 0.2.0 → 0.3.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.js CHANGED
@@ -13,6 +13,81 @@ var APIResource = class {
13
13
  this._b = bound;
14
14
  }
15
15
  };
16
+ var BatchesResource = class extends APIResource {
17
+ /**
18
+ * Close a batch now
19
+ *
20
+ * Sends an open batch now instead of at its window end or digest time: one message per batched channel, rendered with everything collected so far. Preferences, quiet hours, the recipient budgets and the type throttle apply as for any send. Useful to test a digest template without waiting for the morning.
21
+ *
22
+ * Credential: `bearer`.
23
+ *
24
+ * @param batchId - The batch id (from a delivery's `batch_id`, or the list).
25
+ * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
26
+ * @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/…`).
27
+ * @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).
28
+ * @throws {NotFoundError} 404 NOT_FOUND, BATCH_NOT_FOUND: `BATCH_NOT_FOUND`: no batch with this id in this workspace.
29
+ * @throws {ConflictError} 409 CONFLICT, BATCH_NOT_OPEN, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `BATCH_NOT_OPEN`: the batch already closed, or is closing right now. `IDEMPOTENCY_KEY_REUSE`: the key was used for another request. 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).
30
+ * @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.
31
+ * @see POST /v1/workspaces/{workspace_id}/batches/{batch_id}/flush
32
+ * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-batches-batch-id-flush
33
+ * @example
34
+ * ```ts
35
+ * const flushBatch = await notify.batches.flush("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
36
+ * ```
37
+ */
38
+ flush(batchId, options) {
39
+ return this._client.request({ method: "POST", path: "/v1/workspaces/{workspace_id}/batches/{batch_id}/flush", pathParams: { batch_id: batchId }, idempotent: true }, options);
40
+ }
41
+ /**
42
+ * List batches
43
+ *
44
+ * Batches of notification types with `batch` (a window or a digest), newest first: one per recipient and key value while collecting (`open`), then `flushed` once its one message went out. Filter by `recipient`, `type` and `state`. Pass `next_cursor` as `cursor` until `has_more` is false.
45
+ *
46
+ * Credential: `bearer`.
47
+ *
48
+ * @param params - `Notify.BatchListParams`.
49
+ * @param options - Per-request options.
50
+ * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR` on a bad filter, or `BAD_REQUEST`: invalid cursor.
51
+ * @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/…`).
52
+ * @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).
53
+ * @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.
54
+ * @see GET /v1/workspaces/{workspace_id}/batches
55
+ * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-batches
56
+ * @example
57
+ * ```ts
58
+ * for await (const batch of notify.batches.list()) {
59
+ * console.log(batch);
60
+ * }
61
+ * const page = await notify.batches.list({}, { timeout: 5_000 });
62
+ * ```
63
+ */
64
+ list(params, options) {
65
+ return this._client.list({ method: "GET", path: "/v1/workspaces/{workspace_id}/batches", query: params }, options);
66
+ }
67
+ /**
68
+ * Get a batch
69
+ *
70
+ * The notifications collected in it, its deliveries (while open, `scheduled: batched`; after it closes, one carrier per channel with its outcome, the rest `skipped: batched_into`), and the `batch` data templates got.
71
+ *
72
+ * Credential: `bearer`.
73
+ *
74
+ * @param batchId - The batch id (from a delivery's `batch_id`, or the list).
75
+ * @param options - Per-request options.
76
+ * @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/…`).
77
+ * @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
+ * @throws {NotFoundError} 404 NOT_FOUND, BATCH_NOT_FOUND: `BATCH_NOT_FOUND`: no batch with this id in this workspace.
79
+ * @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.
80
+ * @see GET /v1/workspaces/{workspace_id}/batches/{batch_id}
81
+ * @see https://productcraft.co/docs/notify/api-reference#get-v1-workspaces-workspace-id-batches-batch-id
82
+ * @example
83
+ * ```ts
84
+ * const batchDetail = await notify.batches.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
85
+ * ```
86
+ */
87
+ retrieve(batchId, options) {
88
+ return this._client.request({ method: "GET", path: "/v1/workspaces/{workspace_id}/batches/{batch_id}", pathParams: { batch_id: batchId } }, options);
89
+ }
90
+ };
16
91
  var CategoriesResource = class extends APIResource {
17
92
  /**
18
93
  * Create a category
@@ -731,7 +806,18 @@ var NotificationTypesResource = class extends APIResource {
731
806
  * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-notification-types-type-id
732
807
  * @example
733
808
  * ```ts
734
- * const notificationType = await notify.notificationTypes.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { category_key: "billing" });
809
+ * const notificationType = await notify.notificationTypes.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", {
810
+ * batch: {
811
+ * inbox: "collapse",
812
+ * key: "post_id",
813
+ * max_items: 10,
814
+ * max_window_seconds: 3600,
815
+ * mode: "window",
816
+ * schedule: { frequency: "daily", time: "09:00", weekday: "monday" },
817
+ * sliding: false,
818
+ * window_seconds: 300,
819
+ * },
820
+ * });
735
821
  * ```
736
822
  */
737
823
  update(typeId, params, options) {
@@ -872,7 +958,7 @@ var NotificationsResource = class extends APIResource {
872
958
  * @throws {NotFoundError} 404 NOT_FOUND, NOTIFICATION_TYPE_NOT_FOUND: `NOTIFICATION_TYPE_NOT_FOUND`: no type with this key.
873
959
  * @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).
874
960
  * @throws {APIError} 413 PAYLOAD_TOO_LARGE, DATA_TOO_LARGE: `DATA_TOO_LARGE`: `data` is over 16 KB.
875
- * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, RECIPIENT_NOT_FOUND, NOTIFICATION_TYPE_ARCHIVED, TEMPLATE_MISSING, SEND_AT_OUT_OF_RANGE, UNSAFE_URL, VALIDATION_ERROR: `RECIPIENT_NOT_FOUND`: no recipient can be notified (`details.skipped` lists why); `NOTIFICATION_TYPE_ARCHIVED`; `TEMPLATE_MISSING`: no template for any requested channel; `SEND_AT_OUT_OF_RANGE`; `UNSAFE_URL`; `VALIDATION_ERROR`: a channel outside the type's routing.
961
+ * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, RECIPIENT_NOT_FOUND, NOTIFICATION_TYPE_ARCHIVED, TEMPLATE_MISSING, SEND_AT_OUT_OF_RANGE, BATCHED_TYPE_NOT_SCHEDULABLE, UNSAFE_URL, VALIDATION_ERROR: `RECIPIENT_NOT_FOUND`: no recipient can be notified (`details.skipped` lists why); `NOTIFICATION_TYPE_ARCHIVED`; `TEMPLATE_MISSING`: no template for any requested channel; `SEND_AT_OUT_OF_RANGE`; `BATCHED_TYPE_NOT_SCHEDULABLE`: the type batches (send it now); `UNSAFE_URL`; `VALIDATION_ERROR`: a channel outside the type's routing.
876
962
  * @throws {RateLimitError} 429 RATE_LIMITED: `RATE_LIMITED`: over 3,000 recipients a minute in this workspace; 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.
877
963
  * @see POST /v1/workspaces/{workspace_id}/notifications
878
964
  * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-notifications
@@ -1134,6 +1220,32 @@ var RecipientsResource = class extends APIResource {
1134
1220
  bulkIdentify(params, options) {
1135
1221
  return this._client.request({ method: "POST", path: "/v1/workspaces/{workspace_id}/recipients/bulk", body: params, idempotent: true }, options);
1136
1222
  }
1223
+ /**
1224
+ * Create a hosted preference page link
1225
+ *
1226
+ * Returns a signed link to a page, hosted by Notify in your workspace's branding (`branding` in settings), where this recipient switches each category on or off per channel, sets quiet hours and a time zone, or unsubscribes from everything except critical types. It needs no sign-in, so it works from any email, also for people who never open your app. The link is valid for 365 days. Changes are recorded in the recipient's consent history with source `hosted_page`. Each call returns a fresh link and changes nothing, so it takes no `Idempotency-Key`.
1227
+ *
1228
+ * Credential: `bearer`.
1229
+ *
1230
+ * @param externalId - Your user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
1231
+ * @param params - `Notify.RecipientCreatePreferenceLinkParams`.
1232
+ * @param options - Per-request options.
1233
+ * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `category_key` is malformed.
1234
+ * @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/…`).
1235
+ * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks `notify.recipient.write`, 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).
1236
+ * @throws {NotFoundError} 404 NOT_FOUND, RECIPIENT_NOT_FOUND: `RECIPIENT_NOT_FOUND`: no recipient with this external id in this workspace.
1237
+ * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CATEGORY_NOT_FOUND: `CATEGORY_NOT_FOUND`: no category with this key.
1238
+ * @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.
1239
+ * @see POST /v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link
1240
+ * @see https://productcraft.co/docs/notify/api-reference#post-v1-workspaces-workspace-id-recipients-external-id-preference-link
1241
+ * @example
1242
+ * ```ts
1243
+ * const preferenceLink = await notify.recipients.createPreferenceLink("user_123", { category_key: "product-updates" });
1244
+ * ```
1245
+ */
1246
+ createPreferenceLink(externalId, params, options) {
1247
+ return this._client.request({ method: "POST", path: "/v1/workspaces/{workspace_id}/recipients/{external_id}/preference-link", pathParams: { external_id: externalId }, body: params }, options);
1248
+ }
1137
1249
  /**
1138
1250
  * Erase a recipient (GDPR)
1139
1251
  *
@@ -1369,7 +1481,14 @@ var SettingsResource = class extends APIResource {
1369
1481
  * @see https://productcraft.co/docs/notify/api-reference#patch-v1-workspaces-workspace-id-settings
1370
1482
  * @example
1371
1483
  * ```ts
1372
- * const notifySettings = await notify.settings.update({ client_origins: ["https://app.example.com", "https://www.example.com"] });
1484
+ * const notifySettings = await notify.settings.update({
1485
+ * branding: {
1486
+ * accent_color: "#4f46e5",
1487
+ * logo_url: "https://acme.example/logo.png",
1488
+ * name: "Acme",
1489
+ * privacy_url: "https://acme.example/privacy",
1490
+ * },
1491
+ * });
1373
1492
  * ```
1374
1493
  */
1375
1494
  update(params, options) {
@@ -1738,6 +1857,7 @@ var WebhooksResource = class extends APIResource {
1738
1857
  }
1739
1858
  };
1740
1859
  var NotifyResources = class extends APIResource {
1860
+ #batches;
1741
1861
  #categories;
1742
1862
  #channels;
1743
1863
  #deliveries;
@@ -1750,6 +1870,9 @@ var NotifyResources = class extends APIResource {
1750
1870
  #setupStatus;
1751
1871
  #stats;
1752
1872
  #webhooks;
1873
+ get batches() {
1874
+ return this.#batches ??= new BatchesResource(this._client, this._b);
1875
+ }
1753
1876
  get categories() {
1754
1877
  return this.#categories ??= new CategoriesResource(this._client, this._b);
1755
1878
  }
@@ -2051,8 +2174,12 @@ var DeviceState = { values: ["active", "invalid", "pruned"] };
2051
2174
  var InboxItemStatusFilter = { values: ["active", "archived", "all"] };
2052
2175
  var InboxMarkAction = { values: ["seen", "read", "unread", "archived", "unarchived"] };
2053
2176
  var NotificationStatus = { values: ["scheduled", "accepted", "planned", "cancelled"] };
2177
+ var NotifyBatchInboxMode = { values: ["collapse", "each"] };
2178
+ var NotifyBatchMode = { values: ["window", "digest"] };
2179
+ var NotifyBatchState = { values: ["open", "flushed", "cancelled"] };
2054
2180
  var NotifyChannel = { values: ["inbox", "email", "push", "webpush"] };
2055
- 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"] };
2181
+ 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", "batched", "batched_into", "actor_excluded", "recipient_not_found", "recipient_erased", "mail_suppressed", "mail_refused", "pruned", "payload_too_large", "credential_error", "circuit_open", "expired", "cancelled", "provider_error"] };
2182
+ var NotifyDigestFrequency = { values: ["daily", "weekly"] };
2056
2183
  var NotifyEmailPauseReason = { values: ["complaints", "bounces"] };
2057
2184
  var NotifyQuietHoursSource = { values: ["recipient", "workspace"] };
2058
2185
  var NotifyRecipientDeletionCause = { values: ["api", "auth_user_deleted"] };
@@ -2061,6 +2188,7 @@ var NotifyWebhookChannel = { values: ["inbox", "email", "push", "webpush"] };
2061
2188
  var NotifyWebhookCredentialProvider = { values: ["apns", "fcm", "vapid"] };
2062
2189
  var NotifyWebhookDeliveryState = { values: ["sent", "delivered", "failed", "bounced", "skipped", "pruned"] };
2063
2190
  var NotifyWebhookDeviceChannel = { values: ["apns", "fcm", "webpush"] };
2191
+ var NotifyWeekday = { values: ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] };
2064
2192
  var PlanDecision = { values: ["deliver", "schedule", "skip"] };
2065
2193
  var PreferenceChannel = { values: ["inbox", "email", "push", "webpush", "*"] };
2066
2194
  var PreferenceScope = { values: ["all", "category", "type"] };
@@ -2076,7 +2204,7 @@ var WebhookEventStatus = { values: ["pending", "delivered", "failed", "not_sent"
2076
2204
  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"] };
2077
2205
 
2078
2206
  // src/_generated/client.ts
2079
- var VERSION = "0.2.0" ;
2207
+ var VERSION = "0.3.0" ;
2080
2208
  var Notify = class extends NotifyResources {
2081
2209
  /** The options this client was built with, for the token scopes' own clients. Never enumerable. */
2082
2210
  #options;
@@ -2128,8 +2256,12 @@ var Notify = class extends NotifyResources {
2128
2256
  Notify2.InboxItemStatusFilter = InboxItemStatusFilter;
2129
2257
  Notify2.InboxMarkAction = InboxMarkAction;
2130
2258
  Notify2.NotificationStatus = NotificationStatus;
2259
+ Notify2.NotifyBatchInboxMode = NotifyBatchInboxMode;
2260
+ Notify2.NotifyBatchMode = NotifyBatchMode;
2261
+ Notify2.NotifyBatchState = NotifyBatchState;
2131
2262
  Notify2.NotifyChannel = NotifyChannel;
2132
2263
  Notify2.NotifyDeliveryReason = NotifyDeliveryReason;
2264
+ Notify2.NotifyDigestFrequency = NotifyDigestFrequency;
2133
2265
  Notify2.NotifyEmailPauseReason = NotifyEmailPauseReason;
2134
2266
  Notify2.NotifyQuietHoursSource = NotifyQuietHoursSource;
2135
2267
  Notify2.NotifyRecipientDeletionCause = NotifyRecipientDeletionCause;
@@ -2138,6 +2270,7 @@ var Notify = class extends NotifyResources {
2138
2270
  Notify2.NotifyWebhookCredentialProvider = NotifyWebhookCredentialProvider;
2139
2271
  Notify2.NotifyWebhookDeliveryState = NotifyWebhookDeliveryState;
2140
2272
  Notify2.NotifyWebhookDeviceChannel = NotifyWebhookDeviceChannel;
2273
+ Notify2.NotifyWeekday = NotifyWeekday;
2141
2274
  Notify2.PlanDecision = PlanDecision;
2142
2275
  Notify2.PreferenceChannel = PreferenceChannel;
2143
2276
  Notify2.PreferenceScope = PreferenceScope;
@@ -2152,7 +2285,7 @@ var Notify = class extends NotifyResources {
2152
2285
  Notify2.WebhookEventStatus = WebhookEventStatus;
2153
2286
  Notify2.WebhookEventType = WebhookEventType;
2154
2287
  })(Notify || (Notify = {}));
2155
- 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"] };
2288
+ 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", "BATCHED_TYPE_NOT_SCHEDULABLE", "BATCH_NOT_FOUND", "BATCH_NOT_OPEN", "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"] };
2156
2289
 
2157
2290
  export { Notify, NotifyErrorCode, Notify as default };
2158
2291
  //# sourceMappingURL=index.js.map