@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":"profiles.d.mts","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,EACN,oBAAgB;AACjB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAA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AI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -4,31 +4,71 @@ import * as ListsAPI from "./lists.js";
|
|
|
4
4
|
import { ListDeleteResponse, ListRetrieveParams, ListRetrieveResponse, ListSubscribeParams, ListSubscribeResponse, Lists } from "./lists.js";
|
|
5
5
|
import { APIPromise } from "../../core/api-promise.js";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
|
|
9
|
+
*/
|
|
7
10
|
export declare class Profiles extends APIResource {
|
|
8
11
|
lists: ListsAPI.Lists;
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* Merges the supplied values into a user's profile, creating it if absent and
|
|
14
|
+
* leaving any key you omit untouched. Prefer this for everyday writes.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const profile = await client.profiles.create('user_id', {
|
|
19
|
+
* profile: { foo: 'bar' },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
12
22
|
*/
|
|
13
|
-
create(userID: string,
|
|
23
|
+
create(userID: string, params: ProfileCreateParams, options?: RequestOptions): APIPromise<ProfileCreateResponse>;
|
|
14
24
|
/**
|
|
15
|
-
* Returns
|
|
25
|
+
* Returns a user's stored profile and preferences, including the email address,
|
|
26
|
+
* phone number, and push tokens Courier can reach them on.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const profile = await client.profiles.retrieve('user_id');
|
|
31
|
+
* ```
|
|
16
32
|
*/
|
|
17
33
|
retrieve(userID: string, options?: RequestOptions): APIPromise<ProfileRetrieveResponse>;
|
|
18
34
|
/**
|
|
19
|
-
*
|
|
35
|
+
* Applies a JSON Patch to a user profile, adding, removing, or replacing
|
|
36
|
+
* individual fields without sending the whole object.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* await client.profiles.update('user_id', {
|
|
41
|
+
* patch: [
|
|
42
|
+
* {
|
|
43
|
+
* op: 'op',
|
|
44
|
+
* path: 'path',
|
|
45
|
+
* value: 'value',
|
|
46
|
+
* },
|
|
47
|
+
* ],
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
20
50
|
*/
|
|
21
51
|
update(userID: string, body: ProfileUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
22
52
|
/**
|
|
23
|
-
* Deletes
|
|
53
|
+
* Deletes a user's profile and stored contact details. List subscriptions and
|
|
54
|
+
* preferences are separate resources, so remove those too if required.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* await client.profiles.delete('user_id');
|
|
59
|
+
* ```
|
|
24
60
|
*/
|
|
25
61
|
delete(userID: string, options?: RequestOptions): APIPromise<void>;
|
|
26
62
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
63
|
+
* Overwrites a user profile in full, removing any key absent from the request
|
|
64
|
+
* body. Use the patch endpoint when changing a single field.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const response = await client.profiles.replace('user_id', {
|
|
69
|
+
* profile: { foo: 'bar' },
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
32
72
|
*/
|
|
33
73
|
replace(userID: string, body: ProfileReplaceParams, options?: RequestOptions): APIPromise<ProfileReplaceResponse>;
|
|
34
74
|
}
|
|
@@ -49,9 +89,28 @@ export interface ProfileReplaceResponse {
|
|
|
49
89
|
status: 'SUCCESS';
|
|
50
90
|
}
|
|
51
91
|
export interface ProfileCreateParams {
|
|
92
|
+
/**
|
|
93
|
+
* Body param
|
|
94
|
+
*/
|
|
52
95
|
profile: {
|
|
53
96
|
[key: string]: unknown;
|
|
54
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
100
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
101
|
+
* response from the first request without performing the operation again
|
|
102
|
+
* (including the original status code and any error). Use it to safely retry
|
|
103
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
104
|
+
* is scoped to this endpoint.
|
|
105
|
+
*/
|
|
106
|
+
'Idempotency-Key'?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
109
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
110
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
111
|
+
* maximum is 1 year.
|
|
112
|
+
*/
|
|
113
|
+
'x-idempotency-expiration'?: string;
|
|
55
114
|
}
|
|
56
115
|
export interface ProfileUpdateParams {
|
|
57
116
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,EACN,mBAAgB;AACjB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,Q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B,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -8,26 +8,69 @@ const ListsAPI = tslib_1.__importStar(require("./lists.js"));
|
|
|
8
8
|
const lists_1 = require("./lists.js");
|
|
9
9
|
const headers_1 = require("../../internal/headers.js");
|
|
10
10
|
const path_1 = require("../../internal/utils/path.js");
|
|
11
|
+
/**
|
|
12
|
+
* Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
|
|
13
|
+
*/
|
|
11
14
|
class Profiles extends resource_1.APIResource {
|
|
12
15
|
constructor() {
|
|
13
16
|
super(...arguments);
|
|
14
17
|
this.lists = new ListsAPI.Lists(this._client);
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
20
|
+
* Merges the supplied values into a user's profile, creating it if absent and
|
|
21
|
+
* leaving any key you omit untouched. Prefer this for everyday writes.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const profile = await client.profiles.create('user_id', {
|
|
26
|
+
* profile: { foo: 'bar' },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
19
29
|
*/
|
|
20
|
-
create(userID,
|
|
21
|
-
|
|
30
|
+
create(userID, params, options) {
|
|
31
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
32
|
+
return this._client.post((0, path_1.path) `/profiles/${userID}`, {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
headers: (0, headers_1.buildHeaders)([
|
|
36
|
+
{
|
|
37
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
38
|
+
...(xIdempotencyExpiration != null ?
|
|
39
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
40
|
+
: undefined),
|
|
41
|
+
},
|
|
42
|
+
options?.headers,
|
|
43
|
+
]),
|
|
44
|
+
});
|
|
22
45
|
}
|
|
23
46
|
/**
|
|
24
|
-
* Returns
|
|
47
|
+
* Returns a user's stored profile and preferences, including the email address,
|
|
48
|
+
* phone number, and push tokens Courier can reach them on.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const profile = await client.profiles.retrieve('user_id');
|
|
53
|
+
* ```
|
|
25
54
|
*/
|
|
26
55
|
retrieve(userID, options) {
|
|
27
56
|
return this._client.get((0, path_1.path) `/profiles/${userID}`, options);
|
|
28
57
|
}
|
|
29
58
|
/**
|
|
30
|
-
*
|
|
59
|
+
* Applies a JSON Patch to a user profile, adding, removing, or replacing
|
|
60
|
+
* individual fields without sending the whole object.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* await client.profiles.update('user_id', {
|
|
65
|
+
* patch: [
|
|
66
|
+
* {
|
|
67
|
+
* op: 'op',
|
|
68
|
+
* path: 'path',
|
|
69
|
+
* value: 'value',
|
|
70
|
+
* },
|
|
71
|
+
* ],
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
31
74
|
*/
|
|
32
75
|
update(userID, body, options) {
|
|
33
76
|
return this._client.patch((0, path_1.path) `/profiles/${userID}`, {
|
|
@@ -37,7 +80,13 @@ class Profiles extends resource_1.APIResource {
|
|
|
37
80
|
});
|
|
38
81
|
}
|
|
39
82
|
/**
|
|
40
|
-
* Deletes
|
|
83
|
+
* Deletes a user's profile and stored contact details. List subscriptions and
|
|
84
|
+
* preferences are separate resources, so remove those too if required.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* await client.profiles.delete('user_id');
|
|
89
|
+
* ```
|
|
41
90
|
*/
|
|
42
91
|
delete(userID, options) {
|
|
43
92
|
return this._client.delete((0, path_1.path) `/profiles/${userID}`, {
|
|
@@ -46,11 +95,15 @@ class Profiles extends resource_1.APIResource {
|
|
|
46
95
|
});
|
|
47
96
|
}
|
|
48
97
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
98
|
+
* Overwrites a user profile in full, removing any key absent from the request
|
|
99
|
+
* body. Use the patch endpoint when changing a single field.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const response = await client.profiles.replace('user_id', {
|
|
104
|
+
* profile: { foo: 'bar' },
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
54
107
|
*/
|
|
55
108
|
replace(userID, body, options) {
|
|
56
109
|
return this._client.put((0, path_1.path) `/profiles/${userID}`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAOiB;AAEjB,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAOiB;AAEjB,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SA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O,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE;YACpD,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,OAAO,CACL,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AA/GD,4BA+GC;AA6ED,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -4,26 +4,69 @@ import * as ListsAPI from "./lists.mjs";
|
|
|
4
4
|
import { Lists, } from "./lists.mjs";
|
|
5
5
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
6
6
|
import { path } from "../../internal/utils/path.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
|
|
9
|
+
*/
|
|
7
10
|
export class Profiles extends APIResource {
|
|
8
11
|
constructor() {
|
|
9
12
|
super(...arguments);
|
|
10
13
|
this.lists = new ListsAPI.Lists(this._client);
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
16
|
+
* Merges the supplied values into a user's profile, creating it if absent and
|
|
17
|
+
* leaving any key you omit untouched. Prefer this for everyday writes.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const profile = await client.profiles.create('user_id', {
|
|
22
|
+
* profile: { foo: 'bar' },
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
|
-
create(userID,
|
|
17
|
-
|
|
26
|
+
create(userID, params, options) {
|
|
27
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-idempotency-expiration': xIdempotencyExpiration, ...body } = params;
|
|
28
|
+
return this._client.post(path `/profiles/${userID}`, {
|
|
29
|
+
body,
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([
|
|
32
|
+
{
|
|
33
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
34
|
+
...(xIdempotencyExpiration != null ?
|
|
35
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
36
|
+
: undefined),
|
|
37
|
+
},
|
|
38
|
+
options?.headers,
|
|
39
|
+
]),
|
|
40
|
+
});
|
|
18
41
|
}
|
|
19
42
|
/**
|
|
20
|
-
* Returns
|
|
43
|
+
* Returns a user's stored profile and preferences, including the email address,
|
|
44
|
+
* phone number, and push tokens Courier can reach them on.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const profile = await client.profiles.retrieve('user_id');
|
|
49
|
+
* ```
|
|
21
50
|
*/
|
|
22
51
|
retrieve(userID, options) {
|
|
23
52
|
return this._client.get(path `/profiles/${userID}`, options);
|
|
24
53
|
}
|
|
25
54
|
/**
|
|
26
|
-
*
|
|
55
|
+
* Applies a JSON Patch to a user profile, adding, removing, or replacing
|
|
56
|
+
* individual fields without sending the whole object.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* await client.profiles.update('user_id', {
|
|
61
|
+
* patch: [
|
|
62
|
+
* {
|
|
63
|
+
* op: 'op',
|
|
64
|
+
* path: 'path',
|
|
65
|
+
* value: 'value',
|
|
66
|
+
* },
|
|
67
|
+
* ],
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
27
70
|
*/
|
|
28
71
|
update(userID, body, options) {
|
|
29
72
|
return this._client.patch(path `/profiles/${userID}`, {
|
|
@@ -33,7 +76,13 @@ export class Profiles extends APIResource {
|
|
|
33
76
|
});
|
|
34
77
|
}
|
|
35
78
|
/**
|
|
36
|
-
* Deletes
|
|
79
|
+
* Deletes a user's profile and stored contact details. List subscriptions and
|
|
80
|
+
* preferences are separate resources, so remove those too if required.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* await client.profiles.delete('user_id');
|
|
85
|
+
* ```
|
|
37
86
|
*/
|
|
38
87
|
delete(userID, options) {
|
|
39
88
|
return this._client.delete(path `/profiles/${userID}`, {
|
|
@@ -42,11 +91,15 @@ export class Profiles extends APIResource {
|
|
|
42
91
|
});
|
|
43
92
|
}
|
|
44
93
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
94
|
+
* Overwrites a user profile in full, removing any key absent from the request
|
|
95
|
+
* body. Use the patch endpoint when changing a single field.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const response = await client.profiles.replace('user_id', {
|
|
100
|
+
* profile: { foo: 'bar' },
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
50
103
|
*/
|
|
51
104
|
replace(userID, body, options) {
|
|
52
105
|
return this._client.put(path `/profiles/${userID}`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAML,KAAK,GACN,oBAAgB;AAEjB,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MA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,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,MAAc,EAAE,IAAyB,EAAE,OAAwB;QACxE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE;YACnD,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,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE;YACpD,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,OAAO,CACL,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AA6ED,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -3,12 +3,18 @@ import * as Shared from "../shared.mjs";
|
|
|
3
3
|
import * as ProvidersAPI from "./providers.mjs";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Catalog extends APIResource {
|
|
7
10
|
/**
|
|
8
|
-
* Returns the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Returns the provider types Courier supports, each with a display name,
|
|
12
|
+
* description, and the configuration fields it requires.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const catalogs = await client.providers.catalog.list();
|
|
17
|
+
* ```
|
|
12
18
|
*/
|
|
13
19
|
list(query?: CatalogListParams | null | undefined, options?: RequestOptions): APIPromise<CatalogListResponse>;
|
|
14
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.mts","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"catalog.d.mts","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IAEtB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -3,12 +3,18 @@ import * as Shared from "../shared.js";
|
|
|
3
3
|
import * as ProvidersAPI from "./providers.js";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
8
|
+
*/
|
|
6
9
|
export declare class Catalog extends APIResource {
|
|
7
10
|
/**
|
|
8
|
-
* Returns the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Returns the provider types Courier supports, each with a display name,
|
|
12
|
+
* description, and the configuration fields it requires.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const catalogs = await client.providers.catalog.list();
|
|
17
|
+
* ```
|
|
12
18
|
*/
|
|
13
19
|
list(query?: CatalogListParams | null | undefined, options?: RequestOptions): APIPromise<CatalogListResponse>;
|
|
14
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;CAGnC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IAEtB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Catalog = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
8
|
+
*/
|
|
6
9
|
class Catalog extends resource_1.APIResource {
|
|
7
10
|
/**
|
|
8
|
-
* Returns the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Returns the provider types Courier supports, each with a display name,
|
|
12
|
+
* description, and the configuration fields it requires.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const catalogs = await client.providers.catalog.list();
|
|
17
|
+
* ```
|
|
12
18
|
*/
|
|
13
19
|
list(query = {}, options) {
|
|
14
20
|
return this._client.get('/providers/catalog', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAhBD,0BAgBC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
5
|
+
*/
|
|
3
6
|
export class Catalog extends APIResource {
|
|
4
7
|
/**
|
|
5
|
-
* Returns the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
8
|
+
* Returns the provider types Courier supports, each with a display name,
|
|
9
|
+
* description, and the configuration fields it requires.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const catalogs = await client.providers.catalog.list();
|
|
14
|
+
* ```
|
|
9
15
|
*/
|
|
10
16
|
list(query = {}, options) {
|
|
11
17
|
return this._client.get('/providers/catalog', { query, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.mjs","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"catalog.mjs","sourceRoot":"","sources":["../../src/resources/providers/catalog.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;OAQG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -4,33 +4,63 @@ import * as CatalogAPI from "./catalog.mjs";
|
|
|
4
4
|
import { Catalog, CatalogListParams, CatalogListResponse } from "./catalog.mjs";
|
|
5
5
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
9
|
+
*/
|
|
7
10
|
export declare class Providers extends APIResource {
|
|
8
11
|
catalog: CatalogAPI.Catalog;
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
13
|
+
* Configures a provider integration from a Courier provider key and its settings.
|
|
14
|
+
* Check the catalog endpoint for the schema each provider expects.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const provider = await client.providers.create({
|
|
19
|
+
* provider: 'provider',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(params: ProviderCreateParams, options?: RequestOptions): APIPromise<Provider>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns one configured provider by id, including its channel, provider key,
|
|
26
|
+
* alias, title, and current settings.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const provider = await client.providers.retrieve('id');
|
|
31
|
+
* ```
|
|
16
32
|
*/
|
|
17
33
|
retrieve(id: string, options?: RequestOptions): APIPromise<Provider>;
|
|
18
34
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
35
|
+
* Replaces a provider's configuration in full, clearing any field you omit rather
|
|
36
|
+
* than merging it. Send the complete settings object.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const provider = await client.providers.update('id', {
|
|
41
|
+
* provider: 'provider',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
24
44
|
*/
|
|
25
45
|
update(id: string, body: ProviderUpdateParams, options?: RequestOptions): APIPromise<Provider>;
|
|
26
46
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
47
|
+
* Lists the provider integrations configured in the workspace, one entry per
|
|
48
|
+
* channel and provider key with its alias and settings.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const providers = await client.providers.list();
|
|
53
|
+
* ```
|
|
29
54
|
*/
|
|
30
55
|
list(query?: ProviderListParams | null | undefined, options?: RequestOptions): APIPromise<ProviderListResponse>;
|
|
31
56
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
57
|
+
* Deletes a provider configuration, which fails while routing strategies or
|
|
58
|
+
* templates still reference it. Update those references first.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await client.providers.delete('id');
|
|
63
|
+
* ```
|
|
34
64
|
*/
|
|
35
65
|
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
36
66
|
}
|
|
@@ -128,26 +158,42 @@ export interface ProviderListResponse {
|
|
|
128
158
|
}
|
|
129
159
|
export interface ProviderCreateParams {
|
|
130
160
|
/**
|
|
131
|
-
* The provider key identifying the type (e.g. "sendgrid", "twilio").
|
|
132
|
-
* known Courier provider — see the catalog endpoint for valid keys.
|
|
161
|
+
* Body param: The provider key identifying the type (e.g. "sendgrid", "twilio").
|
|
162
|
+
* Must be a known Courier provider — see the catalog endpoint for valid keys.
|
|
133
163
|
*/
|
|
134
164
|
provider: string;
|
|
135
165
|
/**
|
|
136
|
-
* Optional alias for this configuration.
|
|
166
|
+
* Body param: Optional alias for this configuration.
|
|
137
167
|
*/
|
|
138
168
|
alias?: string;
|
|
139
169
|
/**
|
|
140
|
-
* Provider-specific settings (snake_case keys). Defaults to an empty
|
|
141
|
-
* omitted. Use the catalog endpoint to discover required fields for a
|
|
142
|
-
* provider — omitting a required field returns a 400 validation error.
|
|
170
|
+
* Body param: Provider-specific settings (snake_case keys). Defaults to an empty
|
|
171
|
+
* object when omitted. Use the catalog endpoint to discover required fields for a
|
|
172
|
+
* given provider — omitting a required field returns a 400 validation error.
|
|
143
173
|
*/
|
|
144
174
|
settings?: {
|
|
145
175
|
[key: string]: unknown;
|
|
146
176
|
};
|
|
147
177
|
/**
|
|
148
|
-
* Optional display title. Omit to use "Default Configuration".
|
|
178
|
+
* Body param: Optional display title. Omit to use "Default Configuration".
|
|
149
179
|
*/
|
|
150
180
|
title?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
183
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
184
|
+
* response from the first request without performing the operation again
|
|
185
|
+
* (including the original status code and any error). Use it to safely retry
|
|
186
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
187
|
+
* is scoped to this endpoint.
|
|
188
|
+
*/
|
|
189
|
+
'Idempotency-Key'?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
192
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
193
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
194
|
+
* maximum is 1 year.
|
|
195
|
+
*/
|
|
196
|
+
'x-idempotency-expiration'?: string;
|
|
151
197
|
}
|
|
152
198
|
export interface ProviderUpdateParams {
|
|
153
199
|
/**
|