@trycourier/courier 7.20.0 → 7.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +57 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +57 -3
- package/client.d.ts.map +1 -1
- package/client.js +57 -3
- package/client.js.map +1 -1
- package/client.mjs +57 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +13 -5
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +13 -5
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +13 -5
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +13 -5
- package/resources/audiences.mjs.map +1 -1
- package/resources/audit-events.d.mts +7 -2
- package/resources/audit-events.d.mts.map +1 -1
- package/resources/audit-events.d.ts +7 -2
- package/resources/audit-events.d.ts.map +1 -1
- package/resources/audit-events.js +7 -2
- package/resources/audit-events.js.map +1 -1
- package/resources/audit-events.mjs +7 -2
- package/resources/audit-events.mjs.map +1 -1
- package/resources/auth.d.mts +5 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts +5 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +5 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +5 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/automations/automations.d.mts +5 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts +5 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.js +5 -1
- package/resources/automations/automations.js.map +1 -1
- package/resources/automations/automations.mjs +5 -1
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/invoke.d.mts +74 -7
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts +74 -7
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.js +38 -9
- package/resources/automations/invoke.js.map +1 -1
- package/resources/automations/invoke.mjs +38 -9
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/brands.d.mts +42 -7
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +42 -7
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +28 -8
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +28 -8
- package/resources/brands.mjs.map +1 -1
- package/resources/digests/schedules.d.mts +5 -3
- package/resources/digests/schedules.d.mts.map +1 -1
- package/resources/digests/schedules.d.ts +5 -3
- package/resources/digests/schedules.d.ts.map +1 -1
- package/resources/digests/schedules.js +5 -3
- package/resources/digests/schedules.js.map +1 -1
- package/resources/digests/schedules.mjs +5 -3
- package/resources/digests/schedules.mjs.map +1 -1
- package/resources/inbound.d.mts +5 -1
- package/resources/inbound.d.mts.map +1 -1
- package/resources/inbound.d.ts +5 -1
- package/resources/inbound.d.ts.map +1 -1
- package/resources/inbound.js +5 -1
- package/resources/inbound.js.map +1 -1
- package/resources/inbound.mjs +5 -1
- package/resources/inbound.mjs.map +1 -1
- package/resources/inbox/inbox.d.mts +10 -0
- package/resources/inbox/inbox.d.mts.map +1 -0
- package/resources/inbox/inbox.d.ts +10 -0
- package/resources/inbox/inbox.d.ts.map +1 -0
- package/resources/inbox/inbox.js +17 -0
- package/resources/inbox/inbox.js.map +1 -0
- package/resources/inbox/inbox.mjs +12 -0
- package/resources/inbox/inbox.mjs.map +1 -0
- package/resources/inbox/index.d.mts +3 -0
- package/resources/inbox/index.d.mts.map +1 -0
- package/resources/inbox/index.d.ts +3 -0
- package/resources/inbox/index.d.ts.map +1 -0
- package/resources/inbox/index.js +9 -0
- package/resources/inbox/index.js.map +1 -0
- package/resources/inbox/index.mjs +4 -0
- package/resources/inbox/index.mjs.map +1 -0
- package/resources/inbox/messages.d.mts +23 -0
- package/resources/inbox/messages.d.mts.map +1 -0
- package/resources/inbox/messages.d.ts +23 -0
- package/resources/inbox/messages.d.ts.map +1 -0
- package/resources/inbox/messages.js +34 -0
- package/resources/inbox/messages.js.map +1 -0
- package/resources/inbox/messages.mjs +30 -0
- package/resources/inbox/messages.mjs.map +1 -0
- package/resources/inbox.d.mts +2 -0
- package/resources/inbox.d.mts.map +1 -0
- package/resources/inbox.d.ts +2 -0
- package/resources/inbox.d.ts.map +1 -0
- package/resources/inbox.js +6 -0
- package/resources/inbox.js.map +1 -0
- package/resources/inbox.mjs +3 -0
- package/resources/inbox.mjs.map +1 -0
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +130 -39
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +130 -39
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +79 -34
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +79 -34
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/templates.d.mts +60 -17
- package/resources/journeys/templates.d.mts.map +1 -1
- package/resources/journeys/templates.d.ts +60 -17
- package/resources/journeys/templates.d.ts.map +1 -1
- package/resources/journeys/templates.js +41 -20
- package/resources/journeys/templates.js.map +1 -1
- package/resources/journeys/templates.mjs +41 -20
- package/resources/journeys/templates.mjs.map +1 -1
- package/resources/lists/lists.d.mts +40 -5
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts +40 -5
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.js +40 -5
- package/resources/lists/lists.js.map +1 -1
- package/resources/lists/lists.mjs +40 -5
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +65 -5
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts +65 -5
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.js +57 -6
- package/resources/lists/subscriptions.js.map +1 -1
- package/resources/lists/subscriptions.mjs +57 -6
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/messages.d.mts +15 -14
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +15 -14
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +15 -14
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +15 -14
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +9 -3
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +9 -3
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +9 -3
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +9 -3
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +62 -29
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +62 -29
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +49 -26
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +49 -26
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/profiles/lists.d.mts +49 -5
- package/resources/profiles/lists.d.mts.map +1 -1
- package/resources/profiles/lists.d.ts +49 -5
- package/resources/profiles/lists.d.ts.map +1 -1
- package/resources/profiles/lists.js +45 -6
- package/resources/profiles/lists.js.map +1 -1
- package/resources/profiles/lists.mjs +45 -6
- package/resources/profiles/lists.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +70 -11
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +70 -11
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +65 -12
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +65 -12
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/providers/catalog.d.mts +10 -4
- package/resources/providers/catalog.d.mts.map +1 -1
- package/resources/providers/catalog.d.ts +10 -4
- package/resources/providers/catalog.d.ts.map +1 -1
- package/resources/providers/catalog.js +10 -4
- package/resources/providers/catalog.js.map +1 -1
- package/resources/providers/catalog.mjs +10 -4
- package/resources/providers/catalog.mjs.map +1 -1
- package/resources/providers/providers.d.mts +68 -22
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +68 -22
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +57 -14
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +57 -14
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/requests.d.mts +5 -1
- package/resources/requests.d.mts.map +1 -1
- package/resources/requests.d.ts +5 -1
- package/resources/requests.d.ts.map +1 -1
- package/resources/requests.js +5 -1
- package/resources/requests.js.map +1 -1
- package/resources/requests.mjs +5 -1
- package/resources/requests.mjs.map +1 -1
- package/resources/routing-strategies.d.mts +30 -11
- package/resources/routing-strategies.d.mts.map +1 -1
- package/resources/routing-strategies.d.ts +30 -11
- package/resources/routing-strategies.d.ts.map +1 -1
- package/resources/routing-strategies.js +22 -6
- package/resources/routing-strategies.js.map +1 -1
- package/resources/routing-strategies.mjs +22 -6
- package/resources/routing-strategies.mjs.map +1 -1
- package/resources/send.d.mts +24 -4
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +24 -4
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +21 -3
- package/resources/send.js.map +1 -1
- package/resources/send.mjs +21 -3
- package/resources/send.mjs.map +1 -1
- package/resources/tenants/preferences/items.d.mts +7 -2
- package/resources/tenants/preferences/items.d.mts.map +1 -1
- package/resources/tenants/preferences/items.d.ts +7 -2
- package/resources/tenants/preferences/items.d.ts.map +1 -1
- package/resources/tenants/preferences/items.js +7 -2
- package/resources/tenants/preferences/items.js.map +1 -1
- package/resources/tenants/preferences/items.mjs +7 -2
- package/resources/tenants/preferences/items.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +13 -19
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +13 -19
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +13 -19
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +13 -19
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/templates/versions.d.mts +5 -7
- package/resources/tenants/templates/versions.d.mts.map +1 -1
- package/resources/tenants/templates/versions.d.ts +5 -7
- package/resources/tenants/templates/versions.d.ts.map +1 -1
- package/resources/tenants/templates/versions.js +5 -7
- package/resources/tenants/templates/versions.js.map +1 -1
- package/resources/tenants/templates/versions.mjs +5 -7
- package/resources/tenants/templates/versions.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +13 -5
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +13 -5
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +13 -5
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +13 -5
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +7 -2
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts +7 -2
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.js +7 -2
- package/resources/translations.js.map +1 -1
- package/resources/translations.mjs +7 -2
- package/resources/translations.mjs.map +1 -1
- package/resources/users/preferences.d.mts +64 -42
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +64 -42
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.js +30 -42
- package/resources/users/preferences.js.map +1 -1
- package/resources/users/preferences.mjs +30 -42
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/tenants.d.mts +13 -10
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts +13 -10
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.js +13 -10
- package/resources/users/tenants.js.map +1 -1
- package/resources/users/tenants.mjs +13 -10
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts +15 -6
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +15 -6
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +15 -6
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +15 -6
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/workspace-preferences/topics.d.mts +40 -18
- package/resources/workspace-preferences/topics.d.mts.map +1 -1
- package/resources/workspace-preferences/topics.d.ts +40 -18
- package/resources/workspace-preferences/topics.d.ts.map +1 -1
- package/resources/workspace-preferences/topics.js +26 -11
- package/resources/workspace-preferences/topics.js.map +1 -1
- package/resources/workspace-preferences/topics.mjs +26 -11
- package/resources/workspace-preferences/topics.mjs.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.mts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.ts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.js +41 -13
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.mjs +41 -13
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
- package/src/client.ts +59 -25
- package/src/resources/audiences.ts +13 -5
- package/src/resources/audit-events.ts +7 -2
- package/src/resources/auth.ts +5 -1
- package/src/resources/automations/automations.ts +5 -1
- package/src/resources/automations/invoke.ts +115 -9
- package/src/resources/brands.ts +62 -8
- package/src/resources/digests/schedules.ts +5 -3
- package/src/resources/inbound.ts +5 -1
- package/src/resources/inbox/inbox.ts +15 -0
- package/src/resources/inbox/index.ts +4 -0
- package/src/resources/inbox/messages.ts +40 -0
- package/src/resources/inbox.ts +3 -0
- package/src/resources/index.ts +1 -11
- package/src/resources/journeys/journeys.ts +212 -43
- package/src/resources/journeys/templates.ts +98 -20
- package/src/resources/lists/lists.ts +40 -5
- package/src/resources/lists/subscriptions.ts +82 -6
- package/src/resources/messages.ts +15 -14
- package/src/resources/notifications/checks.ts +9 -3
- package/src/resources/notifications/notifications.ts +102 -31
- package/src/resources/profiles/lists.ts +70 -6
- package/src/resources/profiles/profiles.ts +90 -12
- package/src/resources/providers/catalog.ts +10 -4
- package/src/resources/providers/providers.ts +86 -21
- package/src/resources/requests.ts +5 -1
- package/src/resources/routing-strategies.ts +50 -12
- package/src/resources/send.ts +45 -5
- package/src/resources/tenants/preferences/items.ts +7 -2
- package/src/resources/tenants/templates/templates.ts +13 -19
- package/src/resources/tenants/templates/versions.ts +5 -7
- package/src/resources/tenants/tenants.ts +13 -5
- package/src/resources/translations.ts +7 -2
- package/src/resources/users/preferences.ts +86 -44
- package/src/resources/users/tenants.ts +13 -10
- package/src/resources/users/tokens.ts +15 -6
- package/src/resources/workspace-preferences/topics.ts +60 -19
- package/src/resources/workspace-preferences/workspace-preferences.ts +96 -21
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/bulk.d.mts +0 -155
- package/resources/bulk.d.mts.map +0 -1
- package/resources/bulk.d.ts +0 -155
- package/resources/bulk.d.ts.map +0 -1
- package/resources/bulk.js +0 -58
- package/resources/bulk.js.map +0 -1
- package/resources/bulk.mjs +0 -54
- package/resources/bulk.mjs.map +0 -1
- package/src/resources/bulk.ts +0 -210
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.mts","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,M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G;QACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B;IAED;;OAEG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEnB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEpB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Register and manage the APNS and FCM device tokens Courier delivers push notifications to.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Tokens extends APIResource {
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
9
|
+
* Returns one device token with its provider key, status and status reason, expiry
|
|
10
|
+
* date, and any properties stored alongside it.
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
|
@@ -14,7 +18,8 @@ export declare class Tokens extends APIResource {
|
|
|
14
18
|
*/
|
|
15
19
|
retrieve(token: string, params: TokenRetrieveParams, options?: RequestOptions): APIPromise<TokenRetrieveResponse>;
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
21
|
+
* Applies a JSON Patch to a device token, changing its status, expiry, or
|
|
22
|
+
* properties without re-registering it.
|
|
18
23
|
*
|
|
19
24
|
* @example
|
|
20
25
|
* ```ts
|
|
@@ -26,7 +31,8 @@ export declare class Tokens extends APIResource {
|
|
|
26
31
|
*/
|
|
27
32
|
update(token: string, params: TokenUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
34
|
+
* Returns every device token registered for a user, each with its provider key,
|
|
35
|
+
* status, and expiry date.
|
|
30
36
|
*
|
|
31
37
|
* @example
|
|
32
38
|
* ```ts
|
|
@@ -35,7 +41,8 @@ export declare class Tokens extends APIResource {
|
|
|
35
41
|
*/
|
|
36
42
|
list(userID: string, options?: RequestOptions): APIPromise<TokenListResponse>;
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
44
|
+
* Deletes one device token for a user, addressed by the token value, so push sends
|
|
45
|
+
* no longer target that device.
|
|
39
46
|
*
|
|
40
47
|
* @example
|
|
41
48
|
* ```ts
|
|
@@ -46,7 +53,8 @@ export declare class Tokens extends APIResource {
|
|
|
46
53
|
*/
|
|
47
54
|
delete(token: string, params: TokenDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
48
55
|
/**
|
|
49
|
-
*
|
|
56
|
+
* Registers several device tokens for a user in one call, overwriting any stored
|
|
57
|
+
* token with a matching value.
|
|
50
58
|
*
|
|
51
59
|
* @example
|
|
52
60
|
* ```ts
|
|
@@ -55,7 +63,8 @@ export declare class Tokens extends APIResource {
|
|
|
55
63
|
*/
|
|
56
64
|
addMultiple(userID: string, options?: RequestOptions): APIPromise<void>;
|
|
57
65
|
/**
|
|
58
|
-
*
|
|
66
|
+
* Registers one device token for a user against a provider key, overwriting the
|
|
67
|
+
* token if it already exists. Push sends resolve tokens per user.
|
|
59
68
|
*
|
|
60
69
|
* @example
|
|
61
70
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAKpC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAS5F;;;;;;;;OAQG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC;IAI7E;;;;;;;;;;OAUG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ5F;;;;;;;;OAQG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAA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oBAAoB,CAAC,QAAQ,GAAG,IAAI,CAAC;CACjD;AAED,yBAAiB,oBAAoB,CAAC;IACpC;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1B;IAED;;OAEG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEnB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEpB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -5,9 +5,13 @@ exports.Tokens = void 0;
|
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const headers_1 = require("../../internal/headers.js");
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Register and manage the APNS and FCM device tokens Courier delivers push notifications to.
|
|
10
|
+
*/
|
|
8
11
|
class Tokens extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
13
|
+
* Returns one device token with its provider key, status and status reason, expiry
|
|
14
|
+
* date, and any properties stored alongside it.
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
* ```ts
|
|
@@ -21,7 +25,8 @@ class Tokens extends resource_1.APIResource {
|
|
|
21
25
|
return this._client.get((0, path_1.path) `/users/${user_id}/tokens/${token}`, options);
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
28
|
+
* Applies a JSON Patch to a device token, changing its status, expiry, or
|
|
29
|
+
* properties without re-registering it.
|
|
25
30
|
*
|
|
26
31
|
* @example
|
|
27
32
|
* ```ts
|
|
@@ -40,7 +45,8 @@ class Tokens extends resource_1.APIResource {
|
|
|
40
45
|
});
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
48
|
+
* Returns every device token registered for a user, each with its provider key,
|
|
49
|
+
* status, and expiry date.
|
|
44
50
|
*
|
|
45
51
|
* @example
|
|
46
52
|
* ```ts
|
|
@@ -51,7 +57,8 @@ class Tokens extends resource_1.APIResource {
|
|
|
51
57
|
return this._client.get((0, path_1.path) `/users/${userID}/tokens`, options);
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
|
-
*
|
|
60
|
+
* Deletes one device token for a user, addressed by the token value, so push sends
|
|
61
|
+
* no longer target that device.
|
|
55
62
|
*
|
|
56
63
|
* @example
|
|
57
64
|
* ```ts
|
|
@@ -68,7 +75,8 @@ class Tokens extends resource_1.APIResource {
|
|
|
68
75
|
});
|
|
69
76
|
}
|
|
70
77
|
/**
|
|
71
|
-
*
|
|
78
|
+
* Registers several device tokens for a user in one call, overwriting any stored
|
|
79
|
+
* token with a matching value.
|
|
72
80
|
*
|
|
73
81
|
* @example
|
|
74
82
|
* ```ts
|
|
@@ -82,7 +90,8 @@ class Tokens extends resource_1.APIResource {
|
|
|
82
90
|
});
|
|
83
91
|
}
|
|
84
92
|
/**
|
|
85
|
-
*
|
|
93
|
+
* Registers one device token for a user against a provider key, overwriting the
|
|
94
|
+
* token if it already exists. Push sends resolve tokens per user.
|
|
86
95
|
*
|
|
87
96
|
* @example
|
|
88
97
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,KAAa,EACb,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAa,EAAE,MAAyB,EAAE,OAAwB;QACvE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,WAAW,KAAK,EAAE,EAAE;YACjE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EA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AAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA9GD,wBA8GC"}
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Register and manage the APNS and FCM device tokens Courier delivers push notifications to.
|
|
7
|
+
*/
|
|
5
8
|
export class Tokens extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* Returns one device token with its provider key, status and status reason, expiry
|
|
11
|
+
* date, and any properties stored alongside it.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -18,7 +22,8 @@ export class Tokens extends APIResource {
|
|
|
18
22
|
return this._client.get(path `/users/${user_id}/tokens/${token}`, options);
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
|
-
*
|
|
25
|
+
* Applies a JSON Patch to a device token, changing its status, expiry, or
|
|
26
|
+
* properties without re-registering it.
|
|
22
27
|
*
|
|
23
28
|
* @example
|
|
24
29
|
* ```ts
|
|
@@ -37,7 +42,8 @@ export class Tokens extends APIResource {
|
|
|
37
42
|
});
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
|
-
*
|
|
45
|
+
* Returns every device token registered for a user, each with its provider key,
|
|
46
|
+
* status, and expiry date.
|
|
41
47
|
*
|
|
42
48
|
* @example
|
|
43
49
|
* ```ts
|
|
@@ -48,7 +54,8 @@ export class Tokens extends APIResource {
|
|
|
48
54
|
return this._client.get(path `/users/${userID}/tokens`, options);
|
|
49
55
|
}
|
|
50
56
|
/**
|
|
51
|
-
*
|
|
57
|
+
* Deletes one device token for a user, addressed by the token value, so push sends
|
|
58
|
+
* no longer target that device.
|
|
52
59
|
*
|
|
53
60
|
* @example
|
|
54
61
|
* ```ts
|
|
@@ -65,7 +72,8 @@ export class Tokens extends APIResource {
|
|
|
65
72
|
});
|
|
66
73
|
}
|
|
67
74
|
/**
|
|
68
|
-
*
|
|
75
|
+
* Registers several device tokens for a user in one call, overwriting any stored
|
|
76
|
+
* token with a matching value.
|
|
69
77
|
*
|
|
70
78
|
* @example
|
|
71
79
|
* ```ts
|
|
@@ -79,7 +87,8 @@ export class Tokens extends APIResource {
|
|
|
79
87
|
});
|
|
80
88
|
}
|
|
81
89
|
/**
|
|
82
|
-
*
|
|
90
|
+
* Registers one device token for a user against a provider key, overwriting the
|
|
91
|
+
* token if it already exists. Push sends resolve tokens per user.
|
|
83
92
|
*
|
|
84
93
|
* @example
|
|
85
94
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"tokens.mjs","sourceRoot":"","sources":["../../src/resources/users/tokens.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,KAAa,EACb,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,WAAW,KAAK,EAAE,EAAE,OAAO,CAAC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ACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,KAAa,EAAE,MAA4B,EAAE,OAAwB;QAC7E,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,WAAW,KAAK,EAAE,EAAE;YAC/D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -3,11 +3,13 @@ import * as Shared from "../shared.mjs";
|
|
|
3
3
|
import * as WorkspacePreferencesAPI from "./workspace-preferences.mjs";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Manage the workspace catalog of subscription topics, the sections that group them, and publishing the preference page.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Topics extends APIResource {
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* returned.
|
|
11
|
+
* Creates a subscription topic inside a workspace preference. The default status
|
|
12
|
+
* sets whether users start opted in, opted out, or required.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts
|
|
@@ -18,11 +20,10 @@ export declare class Topics extends APIResource {
|
|
|
18
20
|
* );
|
|
19
21
|
* ```
|
|
20
22
|
*/
|
|
21
|
-
create(sectionID: string,
|
|
23
|
+
create(sectionID: string, params: TopicCreateParams, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicGetResponse>;
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* different workspace preference.
|
|
25
|
+
* Returns one subscription topic with its default status, routing options, allowed
|
|
26
|
+
* preferences, and unsubscribe header setting.
|
|
26
27
|
*
|
|
27
28
|
* @example
|
|
28
29
|
* ```ts
|
|
@@ -35,7 +36,8 @@ export declare class Topics extends APIResource {
|
|
|
35
36
|
*/
|
|
36
37
|
retrieve(topicID: string, params: TopicRetrieveParams, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicGetResponse>;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* Returns the subscription topics inside a workspace preference, each with its
|
|
40
|
+
* default status and routing options.
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
41
43
|
* ```ts
|
|
@@ -47,8 +49,8 @@ export declare class Topics extends APIResource {
|
|
|
47
49
|
*/
|
|
48
50
|
list(sectionID: string, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicListResponse>;
|
|
49
51
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
+
* Archives a subscription topic and removes it from its workspace preference,
|
|
53
|
+
* addressed by section id and topic id.
|
|
52
54
|
*
|
|
53
55
|
* @example
|
|
54
56
|
* ```ts
|
|
@@ -80,36 +82,56 @@ export declare class Topics extends APIResource {
|
|
|
80
82
|
}
|
|
81
83
|
export interface TopicCreateParams {
|
|
82
84
|
/**
|
|
83
|
-
* The default subscription status applied when a recipient has not set
|
|
85
|
+
* Body param: The default subscription status applied when a recipient has not set
|
|
86
|
+
* their own.
|
|
84
87
|
*/
|
|
85
88
|
default_status: 'OPTED_OUT' | 'OPTED_IN' | 'REQUIRED';
|
|
86
89
|
/**
|
|
87
|
-
* Human-readable name for the preference topic.
|
|
90
|
+
* Body param: Human-readable name for the preference topic.
|
|
88
91
|
*/
|
|
89
92
|
name: string;
|
|
90
93
|
/**
|
|
91
|
-
* Preference controls a recipient may customize for this topic.
|
|
92
|
-
* if omitted.
|
|
94
|
+
* Body param: Preference controls a recipient may customize for this topic.
|
|
95
|
+
* Defaults to empty if omitted.
|
|
93
96
|
*/
|
|
94
97
|
allowed_preferences?: Array<'snooze' | 'channel_preferences'> | null;
|
|
95
98
|
/**
|
|
96
|
-
* Optional description shown under the topic on the hosted preferences
|
|
99
|
+
* Body param: Optional description shown under the topic on the hosted preferences
|
|
100
|
+
* page.
|
|
97
101
|
*/
|
|
98
102
|
description?: string | null;
|
|
99
103
|
/**
|
|
100
|
-
* Whether to include a list-unsubscribe header on emails for this
|
|
104
|
+
* Body param: Whether to include a list-unsubscribe header on emails for this
|
|
105
|
+
* topic.
|
|
101
106
|
*/
|
|
102
107
|
include_unsubscribe_header?: boolean | null;
|
|
103
108
|
/**
|
|
104
|
-
* Default channels delivered for this topic. Defaults to empty if
|
|
109
|
+
* Body param: Default channels delivered for this topic. Defaults to empty if
|
|
110
|
+
* omitted.
|
|
105
111
|
*/
|
|
106
112
|
routing_options?: Array<Shared.ChannelClassification> | null;
|
|
107
113
|
/**
|
|
108
|
-
* Arbitrary metadata associated with the topic.
|
|
114
|
+
* Body param: Arbitrary metadata associated with the topic.
|
|
109
115
|
*/
|
|
110
116
|
topic_data?: {
|
|
111
117
|
[key: string]: unknown;
|
|
112
118
|
} | null;
|
|
119
|
+
/**
|
|
120
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
121
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
122
|
+
* response from the first request without performing the operation again
|
|
123
|
+
* (including the original status code and any error). Use it to safely retry
|
|
124
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
125
|
+
* is scoped to this endpoint.
|
|
126
|
+
*/
|
|
127
|
+
'Idempotency-Key'?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
130
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
131
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
132
|
+
* maximum is 1 year.
|
|
133
|
+
*/
|
|
134
|
+
'x-idempotency-expiration'?: string;
|
|
113
135
|
}
|
|
114
136
|
export interface TopicRetrieveParams {
|
|
115
137
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,uBAAuB,oCAAgC;AACnE,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"topics.d.mts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,uBAAuB,oCAAgC;AACnE,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC,mCAAmC,CAAC;IAqB1E;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC,mCAAmC,CAAC;IAK1E;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC,oCAAoC,CAAC;IAI3E;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAk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AAE,MAAM,CAAC;IAEb;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAErE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAE7D;;OAEG;IACH,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -3,11 +3,13 @@ import * as Shared from "../shared.js";
|
|
|
3
3
|
import * as WorkspacePreferencesAPI from "./workspace-preferences.js";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Manage the workspace catalog of subscription topics, the sections that group them, and publishing the preference page.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Topics extends APIResource {
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* returned.
|
|
11
|
+
* Creates a subscription topic inside a workspace preference. The default status
|
|
12
|
+
* sets whether users start opted in, opted out, or required.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts
|
|
@@ -18,11 +20,10 @@ export declare class Topics extends APIResource {
|
|
|
18
20
|
* );
|
|
19
21
|
* ```
|
|
20
22
|
*/
|
|
21
|
-
create(sectionID: string,
|
|
23
|
+
create(sectionID: string, params: TopicCreateParams, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicGetResponse>;
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* different workspace preference.
|
|
25
|
+
* Returns one subscription topic with its default status, routing options, allowed
|
|
26
|
+
* preferences, and unsubscribe header setting.
|
|
26
27
|
*
|
|
27
28
|
* @example
|
|
28
29
|
* ```ts
|
|
@@ -35,7 +36,8 @@ export declare class Topics extends APIResource {
|
|
|
35
36
|
*/
|
|
36
37
|
retrieve(topicID: string, params: TopicRetrieveParams, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicGetResponse>;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* Returns the subscription topics inside a workspace preference, each with its
|
|
40
|
+
* default status and routing options.
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
41
43
|
* ```ts
|
|
@@ -47,8 +49,8 @@ export declare class Topics extends APIResource {
|
|
|
47
49
|
*/
|
|
48
50
|
list(sectionID: string, options?: RequestOptions): APIPromise<WorkspacePreferencesAPI.WorkspacePreferenceTopicListResponse>;
|
|
49
51
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
+
* Archives a subscription topic and removes it from its workspace preference,
|
|
53
|
+
* addressed by section id and topic id.
|
|
52
54
|
*
|
|
53
55
|
* @example
|
|
54
56
|
* ```ts
|
|
@@ -80,36 +82,56 @@ export declare class Topics extends APIResource {
|
|
|
80
82
|
}
|
|
81
83
|
export interface TopicCreateParams {
|
|
82
84
|
/**
|
|
83
|
-
* The default subscription status applied when a recipient has not set
|
|
85
|
+
* Body param: The default subscription status applied when a recipient has not set
|
|
86
|
+
* their own.
|
|
84
87
|
*/
|
|
85
88
|
default_status: 'OPTED_OUT' | 'OPTED_IN' | 'REQUIRED';
|
|
86
89
|
/**
|
|
87
|
-
* Human-readable name for the preference topic.
|
|
90
|
+
* Body param: Human-readable name for the preference topic.
|
|
88
91
|
*/
|
|
89
92
|
name: string;
|
|
90
93
|
/**
|
|
91
|
-
* Preference controls a recipient may customize for this topic.
|
|
92
|
-
* if omitted.
|
|
94
|
+
* Body param: Preference controls a recipient may customize for this topic.
|
|
95
|
+
* Defaults to empty if omitted.
|
|
93
96
|
*/
|
|
94
97
|
allowed_preferences?: Array<'snooze' | 'channel_preferences'> | null;
|
|
95
98
|
/**
|
|
96
|
-
* Optional description shown under the topic on the hosted preferences
|
|
99
|
+
* Body param: Optional description shown under the topic on the hosted preferences
|
|
100
|
+
* page.
|
|
97
101
|
*/
|
|
98
102
|
description?: string | null;
|
|
99
103
|
/**
|
|
100
|
-
* Whether to include a list-unsubscribe header on emails for this
|
|
104
|
+
* Body param: Whether to include a list-unsubscribe header on emails for this
|
|
105
|
+
* topic.
|
|
101
106
|
*/
|
|
102
107
|
include_unsubscribe_header?: boolean | null;
|
|
103
108
|
/**
|
|
104
|
-
* Default channels delivered for this topic. Defaults to empty if
|
|
109
|
+
* Body param: Default channels delivered for this topic. Defaults to empty if
|
|
110
|
+
* omitted.
|
|
105
111
|
*/
|
|
106
112
|
routing_options?: Array<Shared.ChannelClassification> | null;
|
|
107
113
|
/**
|
|
108
|
-
* Arbitrary metadata associated with the topic.
|
|
114
|
+
* Body param: Arbitrary metadata associated with the topic.
|
|
109
115
|
*/
|
|
110
116
|
topic_data?: {
|
|
111
117
|
[key: string]: unknown;
|
|
112
118
|
} | null;
|
|
119
|
+
/**
|
|
120
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
121
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
122
|
+
* response from the first request without performing the operation again
|
|
123
|
+
* (including the original status code and any error). Use it to safely retry
|
|
124
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
125
|
+
* is scoped to this endpoint.
|
|
126
|
+
*/
|
|
127
|
+
'Idempotency-Key'?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
130
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
131
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
132
|
+
* maximum is 1 year.
|
|
133
|
+
*/
|
|
134
|
+
'x-idempotency-expiration'?: string;
|
|
113
135
|
}
|
|
114
136
|
export interface TopicRetrieveParams {
|
|
115
137
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,uBAAuB,mCAAgC;AACnE,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,uBAAuB,mCAAgC;AACnE,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC,mCAAmC,CAAC;IAqB1E;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,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ACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,cAAc,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;IAEtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAErE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC;IAE7D;;OAEG;IACH,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -5,11 +5,13 @@ exports.Topics = void 0;
|
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const headers_1 = require("../../internal/headers.js");
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Manage the workspace catalog of subscription topics, the sections that group them, and publishing the preference page.
|
|
10
|
+
*/
|
|
8
11
|
class Topics extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* returned.
|
|
13
|
+
* Creates a subscription topic inside a workspace preference. The default status
|
|
14
|
+
* sets whether users start opted in, opted out, or required.
|
|
13
15
|
*
|
|
14
16
|
* @example
|
|
15
17
|
* ```ts
|
|
@@ -20,13 +22,25 @@ class Topics extends resource_1.APIResource {
|
|
|
20
22
|
* );
|
|
21
23
|
* ```
|
|
22
24
|
*/
|
|
23
|
-
create(sectionID,
|
|
24
|
-
|
|
25
|
+
create(sectionID, params, options) {
|
|
26
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
27
|
+
return this._client.post((0, path_1.path) `/preferences/sections/${sectionID}/topics`, {
|
|
28
|
+
body,
|
|
29
|
+
...options,
|
|
30
|
+
headers: (0, headers_1.buildHeaders)([
|
|
31
|
+
{
|
|
32
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
33
|
+
...(xIdempotencyExpiration != null ?
|
|
34
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
35
|
+
: undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
25
40
|
}
|
|
26
41
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* different workspace preference.
|
|
42
|
+
* Returns one subscription topic with its default status, routing options, allowed
|
|
43
|
+
* preferences, and unsubscribe header setting.
|
|
30
44
|
*
|
|
31
45
|
* @example
|
|
32
46
|
* ```ts
|
|
@@ -42,7 +56,8 @@ class Topics extends resource_1.APIResource {
|
|
|
42
56
|
return this._client.get((0, path_1.path) `/preferences/sections/${section_id}/topics/${topicID}`, options);
|
|
43
57
|
}
|
|
44
58
|
/**
|
|
45
|
-
*
|
|
59
|
+
* Returns the subscription topics inside a workspace preference, each with its
|
|
60
|
+
* default status and routing options.
|
|
46
61
|
*
|
|
47
62
|
* @example
|
|
48
63
|
* ```ts
|
|
@@ -56,8 +71,8 @@ class Topics extends resource_1.APIResource {
|
|
|
56
71
|
return this._client.get((0, path_1.path) `/preferences/sections/${sectionID}/topics`, options);
|
|
57
72
|
}
|
|
58
73
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
74
|
+
* Archives a subscription topic and removes it from its workspace preference,
|
|
75
|
+
* addressed by section id and topic id.
|
|
61
76
|
*
|
|
62
77
|
* @example
|
|
63
78
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topics.js","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"topics.js","sourceRoot":"","sources":["../../src/resources/workspace-preferences/topics.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,SAAiB,EACjB,MAAyB,EACzB,OAAwB;QAExB,MAAM,EACJ,iBAAiB,EAAE,cAAc,EACjC,0BAA0B,EAAE,sBAAsB,EAClD,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,yBAAyB,SAAS,SAAS,EAAE;YACxE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,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