@trycourier/courier 7.21.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 +16 -0
- package/client.d.mts +57 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +57 -0
- package/client.d.ts.map +1 -1
- package/client.js +57 -0
- package/client.js.map +1 -1
- package/client.mjs +57 -0
- 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 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- 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 -0
- 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 -0
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACp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|
const headers_1 = require("../../internal/headers.js");
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Read and write a single user's notification preferences, per topic and per channel.
|
|
10
|
+
*/
|
|
8
11
|
class Preferences extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
13
|
+
* Returns a user's preference overrides with paging, one entry per subscription
|
|
14
|
+
* topic they have set a choice for.
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
* ```ts
|
|
@@ -20,23 +24,8 @@ class Preferences extends resource_1.APIResource {
|
|
|
20
24
|
return this._client.get((0, path_1.path) `/users/${userID}/preferences`, { query, ...options });
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* listed topics are created or updated, and every existing override that is not
|
|
26
|
-
* included in the body is reset to its topic default. Submitting an empty `topics`
|
|
27
|
-
* array is a valid clear-all that resets every existing override.
|
|
28
|
-
*
|
|
29
|
-
* This operation is validation-atomic (all-or-nothing): structural validation
|
|
30
|
-
* fails fast with a single `400`, and if any topic is semantically invalid (an
|
|
31
|
-
* unknown topic, a `REQUIRED` topic that cannot be opted out, or a custom routing
|
|
32
|
-
* request that is not available on the workspace's plan) the request returns a
|
|
33
|
-
* single `400` aggregating every failure in `errors` and writes nothing. On
|
|
34
|
-
* success it returns `200` with `items` (the complete resulting override set) and
|
|
35
|
-
* `deleted` (the ids of the overrides that were reset to default).
|
|
36
|
-
*
|
|
37
|
-
* Every `topic_id` in the response — in `items`, `deleted`, and any `errors` — is
|
|
38
|
-
* returned in Courier's canonical topic id form, regardless of the form supplied
|
|
39
|
-
* in the request.
|
|
27
|
+
* Replaces a user's entire set of preference overrides. Any topic you leave out is
|
|
28
|
+
* reset to its default, so send the full set rather than a subset.
|
|
40
29
|
*
|
|
41
30
|
* @example
|
|
42
31
|
* ```ts
|
|
@@ -60,23 +49,8 @@ class Preferences extends resource_1.APIResource {
|
|
|
60
49
|
return this._client.put((0, path_1.path) `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
61
50
|
}
|
|
62
51
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* created or updated; any existing overrides for topics not listed are left
|
|
66
|
-
* untouched.
|
|
67
|
-
*
|
|
68
|
-
* Structural validation of the request body fails fast with a single `400`. Beyond
|
|
69
|
-
* that, each topic is processed independently (partial-success, not
|
|
70
|
-
* all-or-nothing): valid topics are written and returned in `items`, while topics
|
|
71
|
-
* that cannot be applied are collected in `errors` with a per-topic `reason` (for
|
|
72
|
-
* example an unknown topic, a `REQUIRED` topic that cannot be opted out, a custom
|
|
73
|
-
* routing request that is not available on the workspace's plan, or a write
|
|
74
|
-
* failure). The request therefore returns `200` with both lists whenever the body
|
|
75
|
-
* is structurally valid.
|
|
76
|
-
*
|
|
77
|
-
* Every `topic_id` in the response — in both `items` and `errors` — is returned in
|
|
78
|
-
* Courier's canonical topic id form, regardless of the form supplied in the
|
|
79
|
-
* request.
|
|
52
|
+
* Adds or updates a user's preferences for several subscription topics at once.
|
|
53
|
+
* Topics you leave out keep whatever they were set to before.
|
|
80
54
|
*
|
|
81
55
|
* @example
|
|
82
56
|
* ```ts
|
|
@@ -100,13 +74,25 @@ class Preferences extends resource_1.APIResource {
|
|
|
100
74
|
* ```
|
|
101
75
|
*/
|
|
102
76
|
bulkUpdate(userID, params, options) {
|
|
103
|
-
const { tenant_id, ...body } = params;
|
|
104
|
-
return this._client.post((0, path_1.path) `/users/${userID}/preferences`, {
|
|
77
|
+
const { tenant_id, 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
78
|
+
return this._client.post((0, path_1.path) `/users/${userID}/preferences`, {
|
|
79
|
+
query: { tenant_id },
|
|
80
|
+
body,
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_1.buildHeaders)([
|
|
83
|
+
{
|
|
84
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
85
|
+
...(xIdempotencyExpiration != null ?
|
|
86
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
87
|
+
: undefined),
|
|
88
|
+
},
|
|
89
|
+
options?.headers,
|
|
90
|
+
]),
|
|
91
|
+
});
|
|
105
92
|
}
|
|
106
93
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* preference that does not exist succeeds with no error.
|
|
94
|
+
* Removes a user's override for one subscription topic, resetting it to the
|
|
95
|
+
* effective default from the tenant or workspace.
|
|
110
96
|
*
|
|
111
97
|
* @example
|
|
112
98
|
* ```ts
|
|
@@ -124,7 +110,8 @@ class Preferences extends resource_1.APIResource {
|
|
|
124
110
|
});
|
|
125
111
|
}
|
|
126
112
|
/**
|
|
127
|
-
*
|
|
113
|
+
* Returns a user's opt-in status and channel choices for one subscription topic,
|
|
114
|
+
* or the effective default if they have set no override.
|
|
128
115
|
*
|
|
129
116
|
* @example
|
|
130
117
|
* ```ts
|
|
@@ -139,7 +126,8 @@ class Preferences extends resource_1.APIResource {
|
|
|
139
126
|
return this._client.get((0, path_1.path) `/users/${user_id}/preferences/${topicID}`, { query, ...options });
|
|
140
127
|
}
|
|
141
128
|
/**
|
|
142
|
-
*
|
|
129
|
+
* Sets a user's opt-in status and channel choices for one subscription topic,
|
|
130
|
+
* overriding the tenant default for that topic only.
|
|
143
131
|
*
|
|
144
132
|
* @example
|
|
145
133
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD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}
|
|
@@ -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
|
+
* Read and write a single user's notification preferences, per topic and per channel.
|
|
7
|
+
*/
|
|
5
8
|
export class Preferences extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* Returns a user's preference overrides with paging, one entry per subscription
|
|
11
|
+
* topic they have set a choice for.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -17,23 +21,8 @@ export class Preferences extends APIResource {
|
|
|
17
21
|
return this._client.get(path `/users/${userID}/preferences`, { query, ...options });
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* listed topics are created or updated, and every existing override that is not
|
|
23
|
-
* included in the body is reset to its topic default. Submitting an empty `topics`
|
|
24
|
-
* array is a valid clear-all that resets every existing override.
|
|
25
|
-
*
|
|
26
|
-
* This operation is validation-atomic (all-or-nothing): structural validation
|
|
27
|
-
* fails fast with a single `400`, and if any topic is semantically invalid (an
|
|
28
|
-
* unknown topic, a `REQUIRED` topic that cannot be opted out, or a custom routing
|
|
29
|
-
* request that is not available on the workspace's plan) the request returns a
|
|
30
|
-
* single `400` aggregating every failure in `errors` and writes nothing. On
|
|
31
|
-
* success it returns `200` with `items` (the complete resulting override set) and
|
|
32
|
-
* `deleted` (the ids of the overrides that were reset to default).
|
|
33
|
-
*
|
|
34
|
-
* Every `topic_id` in the response — in `items`, `deleted`, and any `errors` — is
|
|
35
|
-
* returned in Courier's canonical topic id form, regardless of the form supplied
|
|
36
|
-
* in the request.
|
|
24
|
+
* Replaces a user's entire set of preference overrides. Any topic you leave out is
|
|
25
|
+
* reset to its default, so send the full set rather than a subset.
|
|
37
26
|
*
|
|
38
27
|
* @example
|
|
39
28
|
* ```ts
|
|
@@ -57,23 +46,8 @@ export class Preferences extends APIResource {
|
|
|
57
46
|
return this._client.put(path `/users/${userID}/preferences`, { query: { tenant_id }, body, ...options });
|
|
58
47
|
}
|
|
59
48
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* created or updated; any existing overrides for topics not listed are left
|
|
63
|
-
* untouched.
|
|
64
|
-
*
|
|
65
|
-
* Structural validation of the request body fails fast with a single `400`. Beyond
|
|
66
|
-
* that, each topic is processed independently (partial-success, not
|
|
67
|
-
* all-or-nothing): valid topics are written and returned in `items`, while topics
|
|
68
|
-
* that cannot be applied are collected in `errors` with a per-topic `reason` (for
|
|
69
|
-
* example an unknown topic, a `REQUIRED` topic that cannot be opted out, a custom
|
|
70
|
-
* routing request that is not available on the workspace's plan, or a write
|
|
71
|
-
* failure). The request therefore returns `200` with both lists whenever the body
|
|
72
|
-
* is structurally valid.
|
|
73
|
-
*
|
|
74
|
-
* Every `topic_id` in the response — in both `items` and `errors` — is returned in
|
|
75
|
-
* Courier's canonical topic id form, regardless of the form supplied in the
|
|
76
|
-
* request.
|
|
49
|
+
* Adds or updates a user's preferences for several subscription topics at once.
|
|
50
|
+
* Topics you leave out keep whatever they were set to before.
|
|
77
51
|
*
|
|
78
52
|
* @example
|
|
79
53
|
* ```ts
|
|
@@ -97,13 +71,25 @@ export class Preferences extends APIResource {
|
|
|
97
71
|
* ```
|
|
98
72
|
*/
|
|
99
73
|
bulkUpdate(userID, params, options) {
|
|
100
|
-
const { tenant_id, ...body } = params;
|
|
101
|
-
return this._client.post(path `/users/${userID}/preferences`, {
|
|
74
|
+
const { tenant_id, 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
75
|
+
return this._client.post(path `/users/${userID}/preferences`, {
|
|
76
|
+
query: { tenant_id },
|
|
77
|
+
body,
|
|
78
|
+
...options,
|
|
79
|
+
headers: buildHeaders([
|
|
80
|
+
{
|
|
81
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
82
|
+
...(xIdempotencyExpiration != null ?
|
|
83
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
84
|
+
: undefined),
|
|
85
|
+
},
|
|
86
|
+
options?.headers,
|
|
87
|
+
]),
|
|
88
|
+
});
|
|
102
89
|
}
|
|
103
90
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* preference that does not exist succeeds with no error.
|
|
91
|
+
* Removes a user's override for one subscription topic, resetting it to the
|
|
92
|
+
* effective default from the tenant or workspace.
|
|
107
93
|
*
|
|
108
94
|
* @example
|
|
109
95
|
* ```ts
|
|
@@ -121,7 +107,8 @@ export class Preferences extends APIResource {
|
|
|
121
107
|
});
|
|
122
108
|
}
|
|
123
109
|
/**
|
|
124
|
-
*
|
|
110
|
+
* Returns a user's opt-in status and channel choices for one subscription topic,
|
|
111
|
+
* or the effective default if they have set no override.
|
|
125
112
|
*
|
|
126
113
|
* @example
|
|
127
114
|
* ```ts
|
|
@@ -136,7 +123,8 @@ export class Preferences extends APIResource {
|
|
|
136
123
|
return this._client.get(path `/users/${user_id}/preferences/${topicID}`, { query, ...options });
|
|
137
124
|
}
|
|
138
125
|
/**
|
|
139
|
-
*
|
|
126
|
+
* Sets a user's opt-in status and channel choices for one subscription topic,
|
|
127
|
+
* overriding the tenant default for that topic only.
|
|
140
128
|
*
|
|
141
129
|
* @example
|
|
142
130
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.mjs","sourceRoot":"","sources":["../../src/resources/users/preferences.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"preferences.mjs","sourceRoot":"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EAAE,EAAE,SAAS,EAAE;YACpB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -2,9 +2,13 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
2
2
|
import * as TenantsAPI from "../tenants/tenants.mjs";
|
|
3
3
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Associate a user with one or more tenants, and read or remove those associations.
|
|
7
|
+
*/
|
|
5
8
|
export declare class Tenants extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
* Returns a
|
|
10
|
+
* Returns the tenants a user belongs to, with cursor paging. A user can belong to
|
|
11
|
+
* many tenants, each with its own profile and preferences.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -13,9 +17,8 @@ export declare class Tenants extends APIResource {
|
|
|
13
17
|
*/
|
|
14
18
|
list(userID: string, query?: TenantListParams | null | undefined, options?: RequestOptions): APIPromise<TenantListResponse>;
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
17
|
-
* profile
|
|
18
|
-
* the user's main profile when sending to the user with that tenant.
|
|
20
|
+
* Adds a user to several tenants in one call, each optionally with a per-tenant
|
|
21
|
+
* profile that overrides their workspace profile.
|
|
19
22
|
*
|
|
20
23
|
* @example
|
|
21
24
|
* ```ts
|
|
@@ -26,10 +29,8 @@ export declare class Tenants extends APIResource {
|
|
|
26
29
|
*/
|
|
27
30
|
addMultiple(userID: string, body: TenantAddMultipleParams, options?: RequestOptions): APIPromise<void>;
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* A custom profile can also be supplied with the tenant. This profile will be
|
|
32
|
-
* merged with the user's main profile when sending to the user with that tenant.
|
|
32
|
+
* Adds a user to one tenant, optionally with a tenant-specific profile that
|
|
33
|
+
* overrides their workspace profile for sends in that tenant.
|
|
33
34
|
*
|
|
34
35
|
* @example
|
|
35
36
|
* ```ts
|
|
@@ -40,7 +41,8 @@ export declare class Tenants extends APIResource {
|
|
|
40
41
|
*/
|
|
41
42
|
addSingle(tenantID: string, params: TenantAddSingleParams, options?: RequestOptions): APIPromise<void>;
|
|
42
43
|
/**
|
|
43
|
-
* Removes a user from
|
|
44
|
+
* Removes a user from every tenant they belong to in one call. Their
|
|
45
|
+
* workspace-level profile is a separate resource.
|
|
44
46
|
*
|
|
45
47
|
* @example
|
|
46
48
|
* ```ts
|
|
@@ -49,7 +51,8 @@ export declare class Tenants extends APIResource {
|
|
|
49
51
|
*/
|
|
50
52
|
removeAll(userID: string, options?: RequestOptions): APIPromise<void>;
|
|
51
53
|
/**
|
|
52
|
-
* Removes a user from
|
|
54
|
+
* Removes a user from one tenant. Their other tenant memberships and workspace
|
|
55
|
+
* profile are managed through separate endpoints.
|
|
53
56
|
*
|
|
54
57
|
* @example
|
|
55
58
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.d.mts","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,UAAU,+BAA2B;AACjD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tenants.d.mts","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,UAAU,+BAA2B;AACjD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,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C,UAAU,CAAC,iBAAiB,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -2,9 +2,13 @@ import { APIResource } from "../../core/resource.js";
|
|
|
2
2
|
import * as TenantsAPI from "../tenants/tenants.js";
|
|
3
3
|
import { APIPromise } from "../../core/api-promise.js";
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Associate a user with one or more tenants, and read or remove those associations.
|
|
7
|
+
*/
|
|
5
8
|
export declare class Tenants extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
* Returns a
|
|
10
|
+
* Returns the tenants a user belongs to, with cursor paging. A user can belong to
|
|
11
|
+
* many tenants, each with its own profile and preferences.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -13,9 +17,8 @@ export declare class Tenants extends APIResource {
|
|
|
13
17
|
*/
|
|
14
18
|
list(userID: string, query?: TenantListParams | null | undefined, options?: RequestOptions): APIPromise<TenantListResponse>;
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
17
|
-
* profile
|
|
18
|
-
* the user's main profile when sending to the user with that tenant.
|
|
20
|
+
* Adds a user to several tenants in one call, each optionally with a per-tenant
|
|
21
|
+
* profile that overrides their workspace profile.
|
|
19
22
|
*
|
|
20
23
|
* @example
|
|
21
24
|
* ```ts
|
|
@@ -26,10 +29,8 @@ export declare class Tenants extends APIResource {
|
|
|
26
29
|
*/
|
|
27
30
|
addMultiple(userID: string, body: TenantAddMultipleParams, options?: RequestOptions): APIPromise<void>;
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* A custom profile can also be supplied with the tenant. This profile will be
|
|
32
|
-
* merged with the user's main profile when sending to the user with that tenant.
|
|
32
|
+
* Adds a user to one tenant, optionally with a tenant-specific profile that
|
|
33
|
+
* overrides their workspace profile for sends in that tenant.
|
|
33
34
|
*
|
|
34
35
|
* @example
|
|
35
36
|
* ```ts
|
|
@@ -40,7 +41,8 @@ export declare class Tenants extends APIResource {
|
|
|
40
41
|
*/
|
|
41
42
|
addSingle(tenantID: string, params: TenantAddSingleParams, options?: RequestOptions): APIPromise<void>;
|
|
42
43
|
/**
|
|
43
|
-
* Removes a user from
|
|
44
|
+
* Removes a user from every tenant they belong to in one call. Their
|
|
45
|
+
* workspace-level profile is a separate resource.
|
|
44
46
|
*
|
|
45
47
|
* @example
|
|
46
48
|
* ```ts
|
|
@@ -49,7 +51,8 @@ export declare class Tenants extends APIResource {
|
|
|
49
51
|
*/
|
|
50
52
|
removeAll(userID: string, options?: RequestOptions): APIPromise<void>;
|
|
51
53
|
/**
|
|
52
|
-
* Removes a user from
|
|
54
|
+
* Removes a user from one tenant. Their other tenant memberships and workspace
|
|
55
|
+
* profile are managed through separate endpoints.
|
|
53
56
|
*
|
|
54
57
|
* @example
|
|
55
58
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,UAAU,8BAA2B;AACjD,OAAO,EAAE,UA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ACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -5,9 +5,13 @@ exports.Tenants = 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
|
+
* Associate a user with one or more tenants, and read or remove those associations.
|
|
10
|
+
*/
|
|
8
11
|
class Tenants extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
|
-
* Returns a
|
|
13
|
+
* Returns the tenants a user belongs to, with cursor paging. A user can belong to
|
|
14
|
+
* many tenants, each with its own profile and preferences.
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
* ```ts
|
|
@@ -18,9 +22,8 @@ class Tenants extends resource_1.APIResource {
|
|
|
18
22
|
return this._client.get((0, path_1.path) `/users/${userID}/tenants`, { query, ...options });
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
|
-
*
|
|
22
|
-
* profile
|
|
23
|
-
* the user's main profile when sending to the user with that tenant.
|
|
25
|
+
* Adds a user to several tenants in one call, each optionally with a per-tenant
|
|
26
|
+
* profile that overrides their workspace profile.
|
|
24
27
|
*
|
|
25
28
|
* @example
|
|
26
29
|
* ```ts
|
|
@@ -37,10 +40,8 @@ class Tenants extends resource_1.APIResource {
|
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* A custom profile can also be supplied with the tenant. This profile will be
|
|
43
|
-
* merged with the user's main profile when sending to the user with that tenant.
|
|
43
|
+
* Adds a user to one tenant, optionally with a tenant-specific profile that
|
|
44
|
+
* overrides their workspace profile for sends in that tenant.
|
|
44
45
|
*
|
|
45
46
|
* @example
|
|
46
47
|
* ```ts
|
|
@@ -58,7 +59,8 @@ class Tenants extends resource_1.APIResource {
|
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
* Removes a user from
|
|
62
|
+
* Removes a user from every tenant they belong to in one call. Their
|
|
63
|
+
* workspace-level profile is a separate resource.
|
|
62
64
|
*
|
|
63
65
|
* @example
|
|
64
66
|
* ```ts
|
|
@@ -72,7 +74,8 @@ class Tenants extends resource_1.APIResource {
|
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
/**
|
|
75
|
-
* Removes a user from
|
|
77
|
+
* Removes a user from one tenant. Their other tenant memberships and workspace
|
|
78
|
+
* profile are managed through separate endpoints.
|
|
76
79
|
*
|
|
77
80
|
* @example
|
|
78
81
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,MAAc,EACd,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;OAUG;IACH,WAAW,CAAC,MAAc,EAAE,IAA6B,EAAE,OAAwB;QACjF,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,UAAU,EAAE;YACtD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,SAAS,CAAC,QAAgB,EAAE,MAA6B,EAAE,OAAwB;QACjF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,YAAY,QAAQ,EAAE,EAAE;YACnE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAc,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,UAAU,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,QAAgB,EAChB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,YAAY,QAAQ,EAAE,EAAE;YACtE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA/FD,0BA+FC"}
|
|
@@ -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
|
+
* Associate a user with one or more tenants, and read or remove those associations.
|
|
7
|
+
*/
|
|
5
8
|
export class Tenants extends APIResource {
|
|
6
9
|
/**
|
|
7
|
-
* Returns a
|
|
10
|
+
* Returns the tenants a user belongs to, with cursor paging. A user can belong to
|
|
11
|
+
* many tenants, each with its own profile and preferences.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -15,9 +19,8 @@ export class Tenants extends APIResource {
|
|
|
15
19
|
return this._client.get(path `/users/${userID}/tenants`, { query, ...options });
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
19
|
-
* profile
|
|
20
|
-
* the user's main profile when sending to the user with that tenant.
|
|
22
|
+
* Adds a user to several tenants in one call, each optionally with a per-tenant
|
|
23
|
+
* profile that overrides their workspace profile.
|
|
21
24
|
*
|
|
22
25
|
* @example
|
|
23
26
|
* ```ts
|
|
@@ -34,10 +37,8 @@ export class Tenants extends APIResource {
|
|
|
34
37
|
});
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* A custom profile can also be supplied with the tenant. This profile will be
|
|
40
|
-
* merged with the user's main profile when sending to the user with that tenant.
|
|
40
|
+
* Adds a user to one tenant, optionally with a tenant-specific profile that
|
|
41
|
+
* overrides their workspace profile for sends in that tenant.
|
|
41
42
|
*
|
|
42
43
|
* @example
|
|
43
44
|
* ```ts
|
|
@@ -55,7 +56,8 @@ export class Tenants extends APIResource {
|
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
58
|
-
* Removes a user from
|
|
59
|
+
* Removes a user from every tenant they belong to in one call. Their
|
|
60
|
+
* workspace-level profile is a separate resource.
|
|
59
61
|
*
|
|
60
62
|
* @example
|
|
61
63
|
* ```ts
|
|
@@ -69,7 +71,8 @@ export class Tenants extends APIResource {
|
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
/**
|
|
72
|
-
* Removes a user from
|
|
74
|
+
* Removes a user from one tenant. Their other tenant memberships and workspace
|
|
75
|
+
* profile are managed through separate endpoints.
|
|
73
76
|
*
|
|
74
77
|
* @example
|
|
75
78
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../src/resources/users/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,MAAc,EACd,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;OAUG;IACH,WAAW,CAAC,MAAc,EAAE,IAA6B,EAAE,OAAwB;QACjF,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,UAAU,EAAE;YACtD,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;IAED;;;;;;;;;;OAUG;IACH,SAAS,CAAC,QAAgB,EAAE,MAA6B,EAAE,OAAwB;QACjF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,YAAY,QAAQ,EAAE,EAAE;YACnE,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;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,MAAc,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,UAAU,MAAM,UAAU,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,QAAgB,EAChB,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,UAAU,OAAO,YAAY,QAAQ,EAAE,EAAE;YACtE,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"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
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
|