@trycourier/courier 7.20.0 → 7.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/client.d.mts +57 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +57 -3
- package/client.d.ts.map +1 -1
- package/client.js +57 -3
- package/client.js.map +1 -1
- package/client.mjs +57 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +13 -5
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +13 -5
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +13 -5
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +13 -5
- package/resources/audiences.mjs.map +1 -1
- package/resources/audit-events.d.mts +7 -2
- package/resources/audit-events.d.mts.map +1 -1
- package/resources/audit-events.d.ts +7 -2
- package/resources/audit-events.d.ts.map +1 -1
- package/resources/audit-events.js +7 -2
- package/resources/audit-events.js.map +1 -1
- package/resources/audit-events.mjs +7 -2
- package/resources/audit-events.mjs.map +1 -1
- package/resources/auth.d.mts +5 -1
- package/resources/auth.d.mts.map +1 -1
- package/resources/auth.d.ts +5 -1
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +5 -1
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +5 -1
- package/resources/auth.mjs.map +1 -1
- package/resources/automations/automations.d.mts +5 -1
- package/resources/automations/automations.d.mts.map +1 -1
- package/resources/automations/automations.d.ts +5 -1
- package/resources/automations/automations.d.ts.map +1 -1
- package/resources/automations/automations.js +5 -1
- package/resources/automations/automations.js.map +1 -1
- package/resources/automations/automations.mjs +5 -1
- package/resources/automations/automations.mjs.map +1 -1
- package/resources/automations/invoke.d.mts +74 -7
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts +74 -7
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.js +38 -9
- package/resources/automations/invoke.js.map +1 -1
- package/resources/automations/invoke.mjs +38 -9
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/brands.d.mts +42 -7
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +42 -7
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +28 -8
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +28 -8
- package/resources/brands.mjs.map +1 -1
- package/resources/digests/schedules.d.mts +5 -3
- package/resources/digests/schedules.d.mts.map +1 -1
- package/resources/digests/schedules.d.ts +5 -3
- package/resources/digests/schedules.d.ts.map +1 -1
- package/resources/digests/schedules.js +5 -3
- package/resources/digests/schedules.js.map +1 -1
- package/resources/digests/schedules.mjs +5 -3
- package/resources/digests/schedules.mjs.map +1 -1
- package/resources/inbound.d.mts +5 -1
- package/resources/inbound.d.mts.map +1 -1
- package/resources/inbound.d.ts +5 -1
- package/resources/inbound.d.ts.map +1 -1
- package/resources/inbound.js +5 -1
- package/resources/inbound.js.map +1 -1
- package/resources/inbound.mjs +5 -1
- package/resources/inbound.mjs.map +1 -1
- package/resources/inbox/inbox.d.mts +10 -0
- package/resources/inbox/inbox.d.mts.map +1 -0
- package/resources/inbox/inbox.d.ts +10 -0
- package/resources/inbox/inbox.d.ts.map +1 -0
- package/resources/inbox/inbox.js +17 -0
- package/resources/inbox/inbox.js.map +1 -0
- package/resources/inbox/inbox.mjs +12 -0
- package/resources/inbox/inbox.mjs.map +1 -0
- package/resources/inbox/index.d.mts +3 -0
- package/resources/inbox/index.d.mts.map +1 -0
- package/resources/inbox/index.d.ts +3 -0
- package/resources/inbox/index.d.ts.map +1 -0
- package/resources/inbox/index.js +9 -0
- package/resources/inbox/index.js.map +1 -0
- package/resources/inbox/index.mjs +4 -0
- package/resources/inbox/index.mjs.map +1 -0
- package/resources/inbox/messages.d.mts +23 -0
- package/resources/inbox/messages.d.mts.map +1 -0
- package/resources/inbox/messages.d.ts +23 -0
- package/resources/inbox/messages.d.ts.map +1 -0
- package/resources/inbox/messages.js +34 -0
- package/resources/inbox/messages.js.map +1 -0
- package/resources/inbox/messages.mjs +30 -0
- package/resources/inbox/messages.mjs.map +1 -0
- package/resources/inbox.d.mts +2 -0
- package/resources/inbox.d.mts.map +1 -0
- package/resources/inbox.d.ts +2 -0
- package/resources/inbox.d.ts.map +1 -0
- package/resources/inbox.js +6 -0
- package/resources/inbox.js.map +1 -0
- package/resources/inbox.mjs +3 -0
- package/resources/inbox.mjs.map +1 -0
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +130 -39
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +130 -39
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +79 -34
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +79 -34
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/templates.d.mts +60 -17
- package/resources/journeys/templates.d.mts.map +1 -1
- package/resources/journeys/templates.d.ts +60 -17
- package/resources/journeys/templates.d.ts.map +1 -1
- package/resources/journeys/templates.js +41 -20
- package/resources/journeys/templates.js.map +1 -1
- package/resources/journeys/templates.mjs +41 -20
- package/resources/journeys/templates.mjs.map +1 -1
- package/resources/lists/lists.d.mts +40 -5
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts +40 -5
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.js +40 -5
- package/resources/lists/lists.js.map +1 -1
- package/resources/lists/lists.mjs +40 -5
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +65 -5
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts +65 -5
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.js +57 -6
- package/resources/lists/subscriptions.js.map +1 -1
- package/resources/lists/subscriptions.mjs +57 -6
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/messages.d.mts +15 -14
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +15 -14
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +15 -14
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +15 -14
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +9 -3
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +9 -3
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +9 -3
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +9 -3
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +62 -29
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +62 -29
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +49 -26
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +49 -26
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/profiles/lists.d.mts +49 -5
- package/resources/profiles/lists.d.mts.map +1 -1
- package/resources/profiles/lists.d.ts +49 -5
- package/resources/profiles/lists.d.ts.map +1 -1
- package/resources/profiles/lists.js +45 -6
- package/resources/profiles/lists.js.map +1 -1
- package/resources/profiles/lists.mjs +45 -6
- package/resources/profiles/lists.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +70 -11
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +70 -11
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +65 -12
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +65 -12
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/providers/catalog.d.mts +10 -4
- package/resources/providers/catalog.d.mts.map +1 -1
- package/resources/providers/catalog.d.ts +10 -4
- package/resources/providers/catalog.d.ts.map +1 -1
- package/resources/providers/catalog.js +10 -4
- package/resources/providers/catalog.js.map +1 -1
- package/resources/providers/catalog.mjs +10 -4
- package/resources/providers/catalog.mjs.map +1 -1
- package/resources/providers/providers.d.mts +68 -22
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +68 -22
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +57 -14
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +57 -14
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/requests.d.mts +5 -1
- package/resources/requests.d.mts.map +1 -1
- package/resources/requests.d.ts +5 -1
- package/resources/requests.d.ts.map +1 -1
- package/resources/requests.js +5 -1
- package/resources/requests.js.map +1 -1
- package/resources/requests.mjs +5 -1
- package/resources/requests.mjs.map +1 -1
- package/resources/routing-strategies.d.mts +30 -11
- package/resources/routing-strategies.d.mts.map +1 -1
- package/resources/routing-strategies.d.ts +30 -11
- package/resources/routing-strategies.d.ts.map +1 -1
- package/resources/routing-strategies.js +22 -6
- package/resources/routing-strategies.js.map +1 -1
- package/resources/routing-strategies.mjs +22 -6
- package/resources/routing-strategies.mjs.map +1 -1
- package/resources/send.d.mts +24 -4
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +24 -4
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +21 -3
- package/resources/send.js.map +1 -1
- package/resources/send.mjs +21 -3
- package/resources/send.mjs.map +1 -1
- package/resources/tenants/preferences/items.d.mts +7 -2
- package/resources/tenants/preferences/items.d.mts.map +1 -1
- package/resources/tenants/preferences/items.d.ts +7 -2
- package/resources/tenants/preferences/items.d.ts.map +1 -1
- package/resources/tenants/preferences/items.js +7 -2
- package/resources/tenants/preferences/items.js.map +1 -1
- package/resources/tenants/preferences/items.mjs +7 -2
- package/resources/tenants/preferences/items.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +13 -19
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +13 -19
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +13 -19
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +13 -19
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/templates/versions.d.mts +5 -7
- package/resources/tenants/templates/versions.d.mts.map +1 -1
- package/resources/tenants/templates/versions.d.ts +5 -7
- package/resources/tenants/templates/versions.d.ts.map +1 -1
- package/resources/tenants/templates/versions.js +5 -7
- package/resources/tenants/templates/versions.js.map +1 -1
- package/resources/tenants/templates/versions.mjs +5 -7
- package/resources/tenants/templates/versions.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +13 -5
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +13 -5
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +13 -5
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +13 -5
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +7 -2
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts +7 -2
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.js +7 -2
- package/resources/translations.js.map +1 -1
- package/resources/translations.mjs +7 -2
- package/resources/translations.mjs.map +1 -1
- package/resources/users/preferences.d.mts +64 -42
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +64 -42
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.js +30 -42
- package/resources/users/preferences.js.map +1 -1
- package/resources/users/preferences.mjs +30 -42
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/tenants.d.mts +13 -10
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts +13 -10
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.js +13 -10
- package/resources/users/tenants.js.map +1 -1
- package/resources/users/tenants.mjs +13 -10
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts +15 -6
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +15 -6
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +15 -6
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +15 -6
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/workspace-preferences/topics.d.mts +40 -18
- package/resources/workspace-preferences/topics.d.mts.map +1 -1
- package/resources/workspace-preferences/topics.d.ts +40 -18
- package/resources/workspace-preferences/topics.d.ts.map +1 -1
- package/resources/workspace-preferences/topics.js +26 -11
- package/resources/workspace-preferences/topics.js.map +1 -1
- package/resources/workspace-preferences/topics.mjs +26 -11
- package/resources/workspace-preferences/topics.mjs.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.mts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.ts +56 -19
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.js +41 -13
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.mjs +41 -13
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
- package/src/client.ts +59 -25
- package/src/resources/audiences.ts +13 -5
- package/src/resources/audit-events.ts +7 -2
- package/src/resources/auth.ts +5 -1
- package/src/resources/automations/automations.ts +5 -1
- package/src/resources/automations/invoke.ts +115 -9
- package/src/resources/brands.ts +62 -8
- package/src/resources/digests/schedules.ts +5 -3
- package/src/resources/inbound.ts +5 -1
- package/src/resources/inbox/inbox.ts +15 -0
- package/src/resources/inbox/index.ts +4 -0
- package/src/resources/inbox/messages.ts +40 -0
- package/src/resources/inbox.ts +3 -0
- package/src/resources/index.ts +1 -11
- package/src/resources/journeys/journeys.ts +212 -43
- package/src/resources/journeys/templates.ts +98 -20
- package/src/resources/lists/lists.ts +40 -5
- package/src/resources/lists/subscriptions.ts +82 -6
- package/src/resources/messages.ts +15 -14
- package/src/resources/notifications/checks.ts +9 -3
- package/src/resources/notifications/notifications.ts +102 -31
- package/src/resources/profiles/lists.ts +70 -6
- package/src/resources/profiles/profiles.ts +90 -12
- package/src/resources/providers/catalog.ts +10 -4
- package/src/resources/providers/providers.ts +86 -21
- package/src/resources/requests.ts +5 -1
- package/src/resources/routing-strategies.ts +50 -12
- package/src/resources/send.ts +45 -5
- package/src/resources/tenants/preferences/items.ts +7 -2
- package/src/resources/tenants/templates/templates.ts +13 -19
- package/src/resources/tenants/templates/versions.ts +5 -7
- package/src/resources/tenants/tenants.ts +13 -5
- package/src/resources/translations.ts +7 -2
- package/src/resources/users/preferences.ts +86 -44
- package/src/resources/users/tenants.ts +13 -10
- package/src/resources/users/tokens.ts +15 -6
- package/src/resources/workspace-preferences/topics.ts +60 -19
- package/src/resources/workspace-preferences/workspace-preferences.ts +96 -21
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/bulk.d.mts +0 -155
- package/resources/bulk.d.mts.map +0 -1
- package/resources/bulk.d.ts +0 -155
- package/resources/bulk.d.ts.map +0 -1
- package/resources/bulk.js +0 -58
- package/resources/bulk.js.map +0 -1
- package/resources/bulk.mjs +0 -54
- package/resources/bulk.mjs.map +0 -1
- package/src/resources/bulk.ts +0 -210
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-preferences.mjs","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAKL,MAAM,GACP,qBAAiB;AAElB,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAArD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-preferences.mjs","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":"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"}
|
package/src/client.ts
CHANGED
|
@@ -55,17 +55,6 @@ import {
|
|
|
55
55
|
Logo,
|
|
56
56
|
WidgetBackground,
|
|
57
57
|
} from './resources/brands';
|
|
58
|
-
import {
|
|
59
|
-
Bulk,
|
|
60
|
-
BulkAddUsersParams,
|
|
61
|
-
BulkCreateJobParams,
|
|
62
|
-
BulkCreateJobResponse,
|
|
63
|
-
BulkListUsersParams,
|
|
64
|
-
BulkListUsersResponse,
|
|
65
|
-
BulkRetrieveJobResponse,
|
|
66
|
-
InboundBulkMessage,
|
|
67
|
-
InboundBulkMessageUser,
|
|
68
|
-
} from './resources/bulk';
|
|
69
58
|
import { Inbound, InboundTrackEventParams, InboundTrackEventResponse } from './resources/inbound';
|
|
70
59
|
import {
|
|
71
60
|
MessageContentResponse,
|
|
@@ -112,6 +101,7 @@ import {
|
|
|
112
101
|
DigestInstanceListResponse,
|
|
113
102
|
Digests,
|
|
114
103
|
} from './resources/digests/digests';
|
|
104
|
+
import { Inbox } from './resources/inbox/inbox';
|
|
115
105
|
import {
|
|
116
106
|
CancelJourneyRequest,
|
|
117
107
|
CancelJourneyResponse,
|
|
@@ -972,25 +962,79 @@ export class Courier {
|
|
|
972
962
|
|
|
973
963
|
static toFile = Uploads.toFile;
|
|
974
964
|
|
|
965
|
+
/**
|
|
966
|
+
* Send a message to one or more recipients — users, lists, audiences, or tenants — across every channel you have configured.
|
|
967
|
+
*/
|
|
975
968
|
send: API.Send = new API.Send(this);
|
|
969
|
+
/**
|
|
970
|
+
* Define filter-based groups whose membership Courier recalculates as user profiles change.
|
|
971
|
+
*/
|
|
976
972
|
audiences: API.Audiences = new API.Audiences(this);
|
|
973
|
+
/**
|
|
974
|
+
* Configure the channel providers Courier delivers through, and browse the provider types it supports.
|
|
975
|
+
*/
|
|
977
976
|
providers: API.Providers = new API.Providers(this);
|
|
977
|
+
/**
|
|
978
|
+
* Read the audit trail of configuration and access changes in your workspace.
|
|
979
|
+
*/
|
|
978
980
|
auditEvents: API.AuditEvents = new API.AuditEvents(this);
|
|
981
|
+
/**
|
|
982
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
983
|
+
*/
|
|
979
984
|
auth: API.Auth = new API.Auth(this);
|
|
985
|
+
/**
|
|
986
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
987
|
+
*/
|
|
980
988
|
automations: API.Automations = new API.Automations(this);
|
|
989
|
+
/**
|
|
990
|
+
* Build, version, publish, invoke, and cancel multi-step notification workflows, along with the templates scoped to them.
|
|
991
|
+
*/
|
|
981
992
|
journeys: API.Journeys = new API.Journeys(this);
|
|
993
|
+
/**
|
|
994
|
+
* Manage the logos, colors, and layout that give the templates you send a consistent look.
|
|
995
|
+
*/
|
|
982
996
|
brands: API.Brands = new API.Brands(this);
|
|
983
|
-
bulk: API.Bulk = new API.Bulk(this);
|
|
984
997
|
digests: API.Digests = new API.Digests(this);
|
|
998
|
+
/**
|
|
999
|
+
* Record an inbound event that triggers the journeys and automations mapped to it.
|
|
1000
|
+
*/
|
|
985
1001
|
inbound: API.Inbound = new API.Inbound(this);
|
|
1002
|
+
/**
|
|
1003
|
+
* Manage static groups of users that you subscribe explicitly, and send to them by list id or list pattern.
|
|
1004
|
+
*/
|
|
986
1005
|
lists: API.Lists = new API.Lists(this);
|
|
1006
|
+
inbox: API.Inbox = new API.Inbox(this);
|
|
1007
|
+
/**
|
|
1008
|
+
* Look up the messages Courier has accepted, inspect their delivery history and rendered output, and cancel, resend, or archive them.
|
|
1009
|
+
*/
|
|
987
1010
|
messages: API.Messages = new API.Messages(this);
|
|
1011
|
+
/**
|
|
1012
|
+
* Look up the messages Courier has accepted, inspect their delivery history and rendered output, and cancel, resend, or archive them.
|
|
1013
|
+
*/
|
|
988
1014
|
requests: API.Requests = new API.Requests(this);
|
|
1015
|
+
/**
|
|
1016
|
+
* Create, update, version, publish, and localize notification templates and their content.
|
|
1017
|
+
*/
|
|
989
1018
|
notifications: API.Notifications = new API.Notifications(this);
|
|
1019
|
+
/**
|
|
1020
|
+
* Define reusable channel routing and failover strategies, and see which templates use them.
|
|
1021
|
+
*/
|
|
990
1022
|
routingStrategies: API.RoutingStrategies = new API.RoutingStrategies(this);
|
|
1023
|
+
/**
|
|
1024
|
+
* Manage the workspace catalog of subscription topics, the sections that group them, and publishing the preference page.
|
|
1025
|
+
*/
|
|
991
1026
|
workspacePreferences: API.WorkspacePreferences = new API.WorkspacePreferences(this);
|
|
1027
|
+
/**
|
|
1028
|
+
* Store the contact information Courier delivers to for each user — email, phone number, push tokens, and any custom data you send to.
|
|
1029
|
+
*/
|
|
992
1030
|
profiles: API.Profiles = new API.Profiles(this);
|
|
1031
|
+
/**
|
|
1032
|
+
* Manage tenants — the organizations, teams, or accounts your users belong to — along with their users and default preferences.
|
|
1033
|
+
*/
|
|
993
1034
|
tenants: API.Tenants = new API.Tenants(this);
|
|
1035
|
+
/**
|
|
1036
|
+
* Store and retrieve the translation strings Courier uses to render localized template content.
|
|
1037
|
+
*/
|
|
994
1038
|
translations: API.Translations = new API.Translations(this);
|
|
995
1039
|
users: API.Users = new API.Users(this);
|
|
996
1040
|
}
|
|
@@ -1003,10 +1047,10 @@ Courier.Auth = Auth;
|
|
|
1003
1047
|
Courier.Automations = Automations;
|
|
1004
1048
|
Courier.Journeys = Journeys;
|
|
1005
1049
|
Courier.Brands = Brands;
|
|
1006
|
-
Courier.Bulk = Bulk;
|
|
1007
1050
|
Courier.Digests = Digests;
|
|
1008
1051
|
Courier.Inbound = Inbound;
|
|
1009
1052
|
Courier.Lists = Lists;
|
|
1053
|
+
Courier.Inbox = Inbox;
|
|
1010
1054
|
Courier.Messages = Messages;
|
|
1011
1055
|
Courier.Requests = Requests;
|
|
1012
1056
|
Courier.Notifications = Notifications;
|
|
@@ -1138,18 +1182,6 @@ export declare namespace Courier {
|
|
|
1138
1182
|
type BrandListParams as BrandListParams,
|
|
1139
1183
|
};
|
|
1140
1184
|
|
|
1141
|
-
export {
|
|
1142
|
-
Bulk as Bulk,
|
|
1143
|
-
type InboundBulkMessage as InboundBulkMessage,
|
|
1144
|
-
type InboundBulkMessageUser as InboundBulkMessageUser,
|
|
1145
|
-
type BulkCreateJobResponse as BulkCreateJobResponse,
|
|
1146
|
-
type BulkListUsersResponse as BulkListUsersResponse,
|
|
1147
|
-
type BulkRetrieveJobResponse as BulkRetrieveJobResponse,
|
|
1148
|
-
type BulkAddUsersParams as BulkAddUsersParams,
|
|
1149
|
-
type BulkCreateJobParams as BulkCreateJobParams,
|
|
1150
|
-
type BulkListUsersParams as BulkListUsersParams,
|
|
1151
|
-
};
|
|
1152
|
-
|
|
1153
1185
|
export {
|
|
1154
1186
|
Digests as Digests,
|
|
1155
1187
|
type DigestCategory as DigestCategory,
|
|
@@ -1173,6 +1205,8 @@ export declare namespace Courier {
|
|
|
1173
1205
|
type ListRestoreParams as ListRestoreParams,
|
|
1174
1206
|
};
|
|
1175
1207
|
|
|
1208
|
+
export { Inbox as Inbox };
|
|
1209
|
+
|
|
1176
1210
|
export {
|
|
1177
1211
|
Messages as Messages,
|
|
1178
1212
|
type MessageDetails as MessageDetails,
|
|
@@ -7,16 +7,21 @@ import { buildHeaders } from '../internal/headers';
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Define filter-based groups whose membership Courier recalculates as user profiles change.
|
|
12
|
+
*/
|
|
10
13
|
export class Audiences extends APIResource {
|
|
11
14
|
/**
|
|
12
|
-
* Returns the
|
|
15
|
+
* Returns one audience with its name, description, and the filter and AND or OR
|
|
16
|
+
* operator that decide which users belong to it.
|
|
13
17
|
*/
|
|
14
18
|
retrieve(audienceID: string, options?: RequestOptions): APIPromise<Audience> {
|
|
15
19
|
return this._client.get(path`/audiences/${audienceID}`, options);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
|
-
* Creates or
|
|
23
|
+
* Creates or replaces an audience from a filter and an AND or OR operator.
|
|
24
|
+
* Membership recalculates automatically as profiles change.
|
|
20
25
|
*/
|
|
21
26
|
update(
|
|
22
27
|
audienceID: string,
|
|
@@ -27,7 +32,8 @@ export class Audiences extends APIResource {
|
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
/**
|
|
30
|
-
*
|
|
35
|
+
* Returns the audiences in the workspace with paging. Audiences are filter-based
|
|
36
|
+
* groups that recalculate as user profiles change.
|
|
31
37
|
*/
|
|
32
38
|
list(
|
|
33
39
|
query: AudienceListParams | null | undefined = {},
|
|
@@ -37,7 +43,8 @@ export class Audiences extends APIResource {
|
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
/**
|
|
40
|
-
* Deletes
|
|
46
|
+
* Deletes an audience permanently, so update any caller sending to it by audience
|
|
47
|
+
* id first. Those sends fail once the audience is gone.
|
|
41
48
|
*/
|
|
42
49
|
delete(audienceID: string, options?: RequestOptions): APIPromise<void> {
|
|
43
50
|
return this._client.delete(path`/audiences/${audienceID}`, {
|
|
@@ -47,7 +54,8 @@ export class Audiences extends APIResource {
|
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
/**
|
|
50
|
-
*
|
|
57
|
+
* Returns the users currently matching an audience filter, with paging. Membership
|
|
58
|
+
* is recalculated, so results shift as profiles change.
|
|
51
59
|
*/
|
|
52
60
|
listMembers(
|
|
53
61
|
audienceID: string,
|
|
@@ -6,16 +6,21 @@ import { APIPromise } from '../core/api-promise';
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Read the audit trail of configuration and access changes in your workspace.
|
|
11
|
+
*/
|
|
9
12
|
export class AuditEvents extends APIResource {
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Returns one audit event by id, including the actor who performed it, the target
|
|
15
|
+
* they changed, the source, the event type, and a timestamp.
|
|
12
16
|
*/
|
|
13
17
|
retrieve(auditEventID: string, options?: RequestOptions): APIPromise<AuditEvent> {
|
|
14
18
|
return this._client.get(path`/audit-events/${auditEventID}`, options);
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* Returns the workspace's audit event log with cursor paging. Each event records
|
|
23
|
+
* the actor, target, source, type, and timestamp of a change.
|
|
19
24
|
*/
|
|
20
25
|
list(
|
|
21
26
|
query: AuditEventListParams | null | undefined = {},
|
package/src/resources/auth.ts
CHANGED
|
@@ -4,9 +4,13 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the embedded designer — can call Courier as a single user. Server-side requests authenticate with your workspace API key instead.
|
|
9
|
+
*/
|
|
7
10
|
export class Auth extends APIResource {
|
|
8
11
|
/**
|
|
9
|
-
* Returns a
|
|
12
|
+
* Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
13
|
+
* the scope and an expires_in duration, both required.
|
|
10
14
|
*
|
|
11
15
|
* @example
|
|
12
16
|
* ```ts
|
|
@@ -6,11 +6,15 @@ import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from '.
|
|
|
6
6
|
import { APIPromise } from '../../core/api-promise';
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
11
|
+
*/
|
|
9
12
|
export class Automations extends APIResource {
|
|
10
13
|
invoke: InvokeAPI.Invoke = new InvokeAPI.Invoke(this._client);
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
16
|
+
* Lists the workspace's saved automation templates, each with its id and a cursor
|
|
17
|
+
* for paging to the next page of results.
|
|
14
18
|
*
|
|
15
19
|
* @example
|
|
16
20
|
* ```ts
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as AutomationsAPI from './automations';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Invoke a stored automation template or an ad hoc automation defined in the request.
|
|
12
|
+
*/
|
|
9
13
|
export class Invoke extends APIResource {
|
|
10
14
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* checkout the ad hoc automation guide
|
|
14
|
-
* [here](https://www.courier.com/docs/automations/steps/).
|
|
15
|
+
* Runs a series of automation steps supplied inline, without a saved template, and
|
|
16
|
+
* returns a runId.
|
|
15
17
|
*
|
|
16
18
|
* @example
|
|
17
19
|
* ```ts
|
|
@@ -34,14 +36,32 @@ export class Invoke extends APIResource {
|
|
|
34
36
|
* ```
|
|
35
37
|
*/
|
|
36
38
|
invokeAdHoc(
|
|
37
|
-
|
|
39
|
+
params: InvokeInvokeAdHocParams,
|
|
38
40
|
options?: RequestOptions,
|
|
39
41
|
): APIPromise<AutomationsAPI.AutomationInvokeResponse> {
|
|
40
|
-
|
|
42
|
+
const {
|
|
43
|
+
'Idempotency-Key': idempotencyKey,
|
|
44
|
+
'x-idempotency-expiration': xIdempotencyExpiration,
|
|
45
|
+
...body
|
|
46
|
+
} = params;
|
|
47
|
+
return this._client.post('/automations/invoke', {
|
|
48
|
+
body,
|
|
49
|
+
...options,
|
|
50
|
+
headers: buildHeaders([
|
|
51
|
+
{
|
|
52
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
53
|
+
...(xIdempotencyExpiration != null ?
|
|
54
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
55
|
+
: undefined),
|
|
56
|
+
},
|
|
57
|
+
options?.headers,
|
|
58
|
+
]),
|
|
59
|
+
});
|
|
41
60
|
}
|
|
42
61
|
|
|
43
62
|
/**
|
|
44
|
-
*
|
|
63
|
+
* Starts an automation run from a saved template for one recipient, with optional
|
|
64
|
+
* data and profile, and returns a runId.
|
|
45
65
|
*
|
|
46
66
|
* @example
|
|
47
67
|
* ```ts
|
|
@@ -54,25 +74,78 @@ export class Invoke extends APIResource {
|
|
|
54
74
|
*/
|
|
55
75
|
invokeByTemplate(
|
|
56
76
|
templateID: string,
|
|
57
|
-
|
|
77
|
+
params: InvokeInvokeByTemplateParams,
|
|
58
78
|
options?: RequestOptions,
|
|
59
79
|
): APIPromise<AutomationsAPI.AutomationInvokeResponse> {
|
|
60
|
-
|
|
80
|
+
const {
|
|
81
|
+
'Idempotency-Key': idempotencyKey,
|
|
82
|
+
'x-idempotency-expiration': xIdempotencyExpiration,
|
|
83
|
+
...body
|
|
84
|
+
} = params;
|
|
85
|
+
return this._client.post(path`/automations/${templateID}/invoke`, {
|
|
86
|
+
body,
|
|
87
|
+
...options,
|
|
88
|
+
headers: buildHeaders([
|
|
89
|
+
{
|
|
90
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
91
|
+
...(xIdempotencyExpiration != null ?
|
|
92
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
93
|
+
: undefined),
|
|
94
|
+
},
|
|
95
|
+
options?.headers,
|
|
96
|
+
]),
|
|
97
|
+
});
|
|
61
98
|
}
|
|
62
99
|
}
|
|
63
100
|
|
|
64
101
|
export interface InvokeInvokeAdHocParams {
|
|
102
|
+
/**
|
|
103
|
+
* Body param
|
|
104
|
+
*/
|
|
65
105
|
automation: InvokeInvokeAdHocParams.Automation;
|
|
66
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Body param
|
|
109
|
+
*/
|
|
67
110
|
brand?: string | null;
|
|
68
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Body param
|
|
114
|
+
*/
|
|
69
115
|
data?: { [key: string]: unknown } | null;
|
|
70
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Body param
|
|
119
|
+
*/
|
|
71
120
|
profile?: { [key: string]: unknown } | null;
|
|
72
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Body param
|
|
124
|
+
*/
|
|
73
125
|
recipient?: string | null;
|
|
74
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Body param
|
|
129
|
+
*/
|
|
75
130
|
template?: string | null;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
134
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
135
|
+
* response from the first request without performing the operation again
|
|
136
|
+
* (including the original status code and any error). Use it to safely retry
|
|
137
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
138
|
+
* is scoped to this endpoint.
|
|
139
|
+
*/
|
|
140
|
+
'Idempotency-Key'?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
144
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
145
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
146
|
+
* maximum is 1 year.
|
|
147
|
+
*/
|
|
148
|
+
'x-idempotency-expiration'?: string;
|
|
76
149
|
}
|
|
77
150
|
|
|
78
151
|
export namespace InvokeInvokeAdHocParams {
|
|
@@ -168,15 +241,48 @@ export namespace InvokeInvokeAdHocParams {
|
|
|
168
241
|
}
|
|
169
242
|
|
|
170
243
|
export interface InvokeInvokeByTemplateParams {
|
|
244
|
+
/**
|
|
245
|
+
* Body param
|
|
246
|
+
*/
|
|
171
247
|
recipient: string | null;
|
|
172
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Body param
|
|
251
|
+
*/
|
|
173
252
|
brand?: string | null;
|
|
174
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Body param
|
|
256
|
+
*/
|
|
175
257
|
data?: { [key: string]: unknown } | null;
|
|
176
258
|
|
|
259
|
+
/**
|
|
260
|
+
* Body param
|
|
261
|
+
*/
|
|
177
262
|
profile?: { [key: string]: unknown } | null;
|
|
178
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Body param
|
|
266
|
+
*/
|
|
179
267
|
template?: string | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
271
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
272
|
+
* response from the first request without performing the operation again
|
|
273
|
+
* (including the original status code and any error). Use it to safely retry
|
|
274
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
275
|
+
* is scoped to this endpoint.
|
|
276
|
+
*/
|
|
277
|
+
'Idempotency-Key'?: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
281
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
282
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
283
|
+
* maximum is 1 year.
|
|
284
|
+
*/
|
|
285
|
+
'x-idempotency-expiration'?: string;
|
|
180
286
|
}
|
|
181
287
|
|
|
182
288
|
export declare namespace Invoke {
|
package/src/resources/brands.ts
CHANGED
|
@@ -8,10 +8,13 @@ import { buildHeaders } from '../internal/headers';
|
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Manage the logos, colors, and layout that give the templates you send a consistent look.
|
|
13
|
+
*/
|
|
11
14
|
export class Brands extends APIResource {
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
16
|
+
* Creates a brand from a name and settings, including primary and secondary
|
|
17
|
+
* colors. Brands supply the logo, colors, and styling that templates render with.
|
|
15
18
|
*
|
|
16
19
|
* @example
|
|
17
20
|
* ```ts
|
|
@@ -23,12 +26,30 @@ export class Brands extends APIResource {
|
|
|
23
26
|
* });
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
|
-
create(
|
|
27
|
-
|
|
29
|
+
create(params: BrandCreateParams, options?: RequestOptions): APIPromise<Brand> {
|
|
30
|
+
const {
|
|
31
|
+
'Idempotency-Key': idempotencyKey,
|
|
32
|
+
'x-idempotency-expiration': xIdempotencyExpiration,
|
|
33
|
+
...body
|
|
34
|
+
} = params;
|
|
35
|
+
return this._client.post('/brands', {
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
headers: buildHeaders([
|
|
39
|
+
{
|
|
40
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
41
|
+
...(xIdempotencyExpiration != null ?
|
|
42
|
+
{ 'x-idempotency-expiration': xIdempotencyExpiration }
|
|
43
|
+
: undefined),
|
|
44
|
+
},
|
|
45
|
+
options?.headers,
|
|
46
|
+
]),
|
|
47
|
+
});
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
/**
|
|
31
|
-
*
|
|
51
|
+
* Returns one brand by id, including its colors, logo and styling settings,
|
|
52
|
+
* Handlebars snippets, and published version.
|
|
32
53
|
*
|
|
33
54
|
* @example
|
|
34
55
|
* ```ts
|
|
@@ -40,7 +61,8 @@ export class Brands extends APIResource {
|
|
|
40
61
|
}
|
|
41
62
|
|
|
42
63
|
/**
|
|
43
|
-
*
|
|
64
|
+
* Replaces a brand with the values you supply, so send the complete settings and
|
|
65
|
+
* snippets rather than only the fields you want changed.
|
|
44
66
|
*
|
|
45
67
|
* @example
|
|
46
68
|
* ```ts
|
|
@@ -54,7 +76,8 @@ export class Brands extends APIResource {
|
|
|
54
76
|
}
|
|
55
77
|
|
|
56
78
|
/**
|
|
57
|
-
*
|
|
79
|
+
* Lists the workspace's brands. Every entry carries its name, styling settings,
|
|
80
|
+
* snippets, and published version.
|
|
58
81
|
*
|
|
59
82
|
* @example
|
|
60
83
|
* ```ts
|
|
@@ -69,7 +92,8 @@ export class Brands extends APIResource {
|
|
|
69
92
|
}
|
|
70
93
|
|
|
71
94
|
/**
|
|
72
|
-
*
|
|
95
|
+
* Deletes a brand by id. Reassign any template or tenant that references it before
|
|
96
|
+
* deleting to keep their styling intact.
|
|
73
97
|
*
|
|
74
98
|
* @example
|
|
75
99
|
* ```ts
|
|
@@ -225,13 +249,43 @@ export interface BrandListResponse {
|
|
|
225
249
|
}
|
|
226
250
|
|
|
227
251
|
export interface BrandCreateParams {
|
|
252
|
+
/**
|
|
253
|
+
* Body param
|
|
254
|
+
*/
|
|
228
255
|
name: string;
|
|
229
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Body param
|
|
259
|
+
*/
|
|
230
260
|
settings: BrandSettings;
|
|
231
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Body param
|
|
264
|
+
*/
|
|
232
265
|
id?: string | null;
|
|
233
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Body param
|
|
269
|
+
*/
|
|
234
270
|
snippets?: BrandSnippets | null;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Header param: A unique key that makes this request idempotent. If Courier
|
|
274
|
+
* receives another request with the same `Idempotency-Key`, it returns the stored
|
|
275
|
+
* response from the first request without performing the operation again
|
|
276
|
+
* (including the original status code and any error). Use it to safely retry
|
|
277
|
+
* `POST` requests after network failures without risking duplicate sends. The key
|
|
278
|
+
* is scoped to this endpoint.
|
|
279
|
+
*/
|
|
280
|
+
'Idempotency-Key'?: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Header param: How long the idempotency key remains valid, as a Unix epoch
|
|
284
|
+
* timestamp in seconds or an ISO 8601 date string. Only applies when
|
|
285
|
+
* `Idempotency-Key` is provided. If omitted, the key is retained for 25 hours; the
|
|
286
|
+
* maximum is 1 year.
|
|
287
|
+
*/
|
|
288
|
+
'x-idempotency-expiration'?: string;
|
|
235
289
|
}
|
|
236
290
|
|
|
237
291
|
export interface BrandUpdateParams {
|
|
@@ -7,11 +7,13 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
8
|
import { path } from '../../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Inspect what has accumulated in a digest schedule and release a digest ahead of its next scheduled delivery.
|
|
12
|
+
*/
|
|
10
13
|
export class Schedules extends APIResource {
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* digest accumulation before the digest is released.
|
|
15
|
+
* Returns the digest instances for a schedule, one per user, with cursor paging.
|
|
16
|
+
* Use it to see what has accumulated before a digest releases.
|
|
15
17
|
*/
|
|
16
18
|
listInstances(
|
|
17
19
|
scheduleID: string,
|
package/src/resources/inbound.ts
CHANGED
|
@@ -4,9 +4,13 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Record an inbound event that triggers the journeys and automations mapped to it.
|
|
9
|
+
*/
|
|
7
10
|
export class Inbound extends APIResource {
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Records an inbound event that can trigger a journey. Requires an event name, a
|
|
13
|
+
* messageId you generate, a type, and a properties object.
|
|
10
14
|
*
|
|
11
15
|
* @example
|
|
12
16
|
* ```ts
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as MessagesAPI from './messages';
|
|
5
|
+
import { MessageRestoreParams, Messages } from './messages';
|
|
6
|
+
|
|
7
|
+
export class Inbox extends APIResource {
|
|
8
|
+
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Inbox.Messages = Messages;
|
|
12
|
+
|
|
13
|
+
export declare namespace Inbox {
|
|
14
|
+
export { Messages as Messages, type MessageRestoreParams as MessageRestoreParams };
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Manage the messages in a user's in-app inbox.
|
|
11
|
+
*/
|
|
12
|
+
export class Messages extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Delete a user's inbox message. The message is removed from every inbox read (it
|
|
15
|
+
* stops appearing in the recipient's Inbox); it can be restored.
|
|
16
|
+
*/
|
|
17
|
+
delete(messageID: string, options?: RequestOptions): APIPromise<void> {
|
|
18
|
+
return this._client.delete(path`/inbox/messages/${messageID}`, {
|
|
19
|
+
...options,
|
|
20
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Restore a previously deleted inbox message.
|
|
26
|
+
*/
|
|
27
|
+
restore(messageID: string, body: MessageRestoreParams, options?: RequestOptions): APIPromise<void> {
|
|
28
|
+
return this._client.put(path`/inbox/messages/${messageID}/restore`, {
|
|
29
|
+
body,
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface MessageRestoreParams {}
|
|
37
|
+
|
|
38
|
+
export declare namespace Messages {
|
|
39
|
+
export { type MessageRestoreParams as MessageRestoreParams };
|
|
40
|
+
}
|