@trycourier/courier 7.25.0 → 7.25.1
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 +13 -0
- package/README.md +0 -3
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +46 -0
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +46 -0
- package/resources/audiences.d.ts.map +1 -1
- package/resources/audiences.js +46 -0
- package/resources/audiences.js.map +1 -1
- package/resources/audiences.mjs +46 -0
- package/resources/audiences.mjs.map +1 -1
- package/resources/automations/invoke.d.mts +5 -1
- package/resources/automations/invoke.d.mts.map +1 -1
- package/resources/automations/invoke.d.ts +5 -1
- package/resources/automations/invoke.d.ts.map +1 -1
- package/resources/automations/invoke.js +5 -1
- package/resources/automations/invoke.js.map +1 -1
- package/resources/automations/invoke.mjs +5 -1
- package/resources/automations/invoke.mjs.map +1 -1
- package/resources/brands.d.mts +4 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +4 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +4 -1
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +4 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/bulk.d.mts +194 -0
- package/resources/bulk.d.mts.map +1 -0
- package/resources/bulk.d.ts +194 -0
- package/resources/bulk.d.ts.map +1 -0
- package/resources/bulk.js +97 -0
- package/resources/bulk.js.map +1 -0
- package/resources/bulk.mjs +93 -0
- package/resources/bulk.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/lists/lists.d.mts +3 -1
- package/resources/lists/lists.d.mts.map +1 -1
- package/resources/lists/lists.d.ts +3 -1
- package/resources/lists/lists.d.ts.map +1 -1
- package/resources/lists/lists.js +3 -1
- package/resources/lists/lists.js.map +1 -1
- package/resources/lists/lists.mjs +3 -1
- package/resources/lists/lists.mjs.map +1 -1
- package/resources/lists/subscriptions.d.mts +13 -2
- package/resources/lists/subscriptions.d.mts.map +1 -1
- package/resources/lists/subscriptions.d.ts +13 -2
- package/resources/lists/subscriptions.d.ts.map +1 -1
- package/resources/lists/subscriptions.js +13 -2
- package/resources/lists/subscriptions.js.map +1 -1
- package/resources/lists/subscriptions.mjs +13 -2
- package/resources/lists/subscriptions.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +2 -2
- package/resources/notifications/checks.d.ts +2 -2
- package/resources/notifications/checks.js +2 -2
- package/resources/notifications/checks.mjs +2 -2
- package/resources/profiles/lists.d.mts +1 -1
- package/resources/profiles/lists.d.ts +1 -1
- package/resources/profiles/lists.js +1 -1
- package/resources/profiles/lists.mjs +1 -1
- package/resources/profiles/profiles.d.mts +12 -5
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +12 -5
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +12 -5
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +12 -5
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/providers/providers.d.mts +6 -2
- package/resources/providers/providers.d.mts.map +1 -1
- package/resources/providers/providers.d.ts +6 -2
- package/resources/providers/providers.d.ts.map +1 -1
- package/resources/providers/providers.js +6 -2
- package/resources/providers/providers.js.map +1 -1
- package/resources/providers/providers.mjs +6 -2
- package/resources/providers/providers.mjs.map +1 -1
- package/resources/send.d.mts +2 -1
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +2 -1
- package/resources/send.d.ts.map +1 -1
- package/resources/send.js +2 -1
- package/resources/send.js.map +1 -1
- package/resources/send.mjs +2 -1
- package/resources/send.mjs.map +1 -1
- package/resources/tenants/templates/templates.d.mts +7 -1
- package/resources/tenants/templates/templates.d.mts.map +1 -1
- package/resources/tenants/templates/templates.d.ts +7 -1
- package/resources/tenants/templates/templates.d.ts.map +1 -1
- package/resources/tenants/templates/templates.js +7 -1
- package/resources/tenants/templates/templates.js.map +1 -1
- package/resources/tenants/templates/templates.mjs +7 -1
- package/resources/tenants/templates/templates.mjs.map +1 -1
- package/resources/tenants/tenants.d.mts +3 -1
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +3 -1
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js +3 -1
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs +3 -1
- package/resources/tenants/tenants.mjs.map +1 -1
- package/resources/translations.d.mts +16 -0
- package/resources/translations.d.mts.map +1 -1
- package/resources/translations.d.ts +16 -0
- package/resources/translations.d.ts.map +1 -1
- package/resources/translations.js +16 -0
- package/resources/translations.js.map +1 -1
- package/resources/translations.mjs +16 -0
- package/resources/translations.mjs.map +1 -1
- package/resources/users/tenants.d.mts +5 -1
- package/resources/users/tenants.d.mts.map +1 -1
- package/resources/users/tenants.d.ts +5 -1
- package/resources/users/tenants.d.ts.map +1 -1
- package/resources/users/tenants.js +5 -1
- package/resources/users/tenants.js.map +1 -1
- package/resources/users/tenants.mjs +5 -1
- package/resources/users/tenants.mjs.map +1 -1
- package/resources/users/tokens.d.mts +8 -1
- package/resources/users/tokens.d.mts.map +1 -1
- package/resources/users/tokens.d.ts +8 -1
- package/resources/users/tokens.d.ts.map +1 -1
- package/resources/users/tokens.js +8 -1
- package/resources/users/tokens.js.map +1 -1
- package/resources/users/tokens.mjs +8 -1
- package/resources/users/tokens.mjs.map +1 -1
- package/resources/workspace-preferences/topics.d.mts +5 -2
- package/resources/workspace-preferences/topics.d.mts.map +1 -1
- package/resources/workspace-preferences/topics.d.ts +5 -2
- package/resources/workspace-preferences/topics.d.ts.map +1 -1
- package/resources/workspace-preferences/topics.js +5 -2
- package/resources/workspace-preferences/topics.js.map +1 -1
- package/resources/workspace-preferences/topics.mjs +5 -2
- package/resources/workspace-preferences/topics.mjs.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.mts +8 -2
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.d.ts +8 -2
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.js +8 -2
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -1
- package/resources/workspace-preferences/workspace-preferences.mjs +8 -2
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -1
- package/src/client.ts +25 -0
- package/src/resources/audiences.ts +46 -0
- package/src/resources/automations/invoke.ts +5 -1
- package/src/resources/brands.ts +4 -1
- package/src/resources/bulk.ts +249 -0
- package/src/resources/index.ts +11 -0
- package/src/resources/lists/lists.ts +3 -1
- package/src/resources/lists/subscriptions.ts +13 -2
- package/src/resources/notifications/checks.ts +2 -2
- package/src/resources/profiles/lists.ts +1 -1
- package/src/resources/profiles/profiles.ts +12 -5
- package/src/resources/providers/providers.ts +6 -2
- package/src/resources/send.ts +2 -1
- package/src/resources/tenants/templates/templates.ts +7 -1
- package/src/resources/tenants/tenants.ts +3 -1
- package/src/resources/translations.ts +16 -0
- package/src/resources/users/tenants.ts +5 -1
- package/src/resources/users/tokens.ts +8 -1
- package/src/resources/workspace-preferences/topics.ts +5 -2
- package/src/resources/workspace-preferences/workspace-preferences.ts +8 -2
- 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":"workspace-preferences.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,EACP,oBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,MAAM,EAAE,+BAA+B,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;IAqB7C;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAIjG;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;IAI3E;;;;;;;;OAQG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOtE
|
|
1
|
+
{"version":3,"file":"workspace-preferences.d.ts","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,EACP,oBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;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BAA+B,EACvE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -92,7 +92,11 @@ class WorkspacePreferences extends resource_1.APIResource {
|
|
|
92
92
|
* @example
|
|
93
93
|
* ```ts
|
|
94
94
|
* const publishPreferencesResponse =
|
|
95
|
-
* await client.workspacePreferences.publish(
|
|
95
|
+
* await client.workspacePreferences.publish({
|
|
96
|
+
* brand_id: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
97
|
+
* description: 'Choose what you hear from us about.',
|
|
98
|
+
* heading: 'Notification Preferences',
|
|
99
|
+
* });
|
|
96
100
|
* ```
|
|
97
101
|
*/
|
|
98
102
|
publish(params = {}, options) {
|
|
@@ -119,7 +123,9 @@ class WorkspacePreferences extends resource_1.APIResource {
|
|
|
119
123
|
* ```ts
|
|
120
124
|
* const workspacePreferenceGetResponse =
|
|
121
125
|
* await client.workspacePreferences.replace('section_id', {
|
|
122
|
-
* name: '
|
|
126
|
+
* name: 'Account Notifications',
|
|
127
|
+
* has_custom_routing: true,
|
|
128
|
+
* routing_options: ['email', 'push'],
|
|
123
129
|
* });
|
|
124
130
|
* ```
|
|
125
131
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-preferences.js","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,+DAAsC;AACtC,wCAMkB;AAElB,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,sBAAW;IAArD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-preferences.js","sourceRoot":"","sources":["../../src/resources/workspace-preferences/workspace-preferences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,+DAAsC;AACtC,wCAMkB;AAElB,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,sBAAW;IAArD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6IhE,CAAC;IA3IC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,MAAuC,EACvC,OAAwB;QAExB,MAAM,EACJ,iBAAiB,EAAE,cAAc,EACjC,0BAA0B,EAAE,sBAAsB,EAClD,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;OASG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AAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF;AA9ID,oDA8IC;AA0aD,oBAAoB,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -88,7 +88,11 @@ export class WorkspacePreferences extends APIResource {
|
|
|
88
88
|
* @example
|
|
89
89
|
* ```ts
|
|
90
90
|
* const publishPreferencesResponse =
|
|
91
|
-
* await client.workspacePreferences.publish(
|
|
91
|
+
* await client.workspacePreferences.publish({
|
|
92
|
+
* brand_id: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
93
|
+
* description: 'Choose what you hear from us about.',
|
|
94
|
+
* heading: 'Notification Preferences',
|
|
95
|
+
* });
|
|
92
96
|
* ```
|
|
93
97
|
*/
|
|
94
98
|
publish(params = {}, options) {
|
|
@@ -115,7 +119,9 @@ export class WorkspacePreferences extends APIResource {
|
|
|
115
119
|
* ```ts
|
|
116
120
|
* const workspacePreferenceGetResponse =
|
|
117
121
|
* await client.workspacePreferences.replace('section_id', {
|
|
118
|
-
* name: '
|
|
122
|
+
* name: 'Account Notifications',
|
|
123
|
+
* has_custom_routing: true,
|
|
124
|
+
* routing_options: ['email', 'push'],
|
|
119
125
|
* });
|
|
120
126
|
* ```
|
|
121
127
|
*/
|
|
@@ -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;;GAEG;AACH,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":"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;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAArD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6IhE,CAAC;IA3IC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,MAAuC,EACvC,OAAwB;QAExB,MAAM,EACJ,iBAAiB,EAAE,cAAc,EACjC,0BAA0B,EAAE,sBAAsB,EAClD,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;wBAClC,EAAE,0BAA0B,EAAE,sBAAsB,EAAE;wBACxD,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yBAAyB,SAAS,EAAE,EAAE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AyB,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF;AA0aD,oBAAoB,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -72,6 +72,17 @@ import {
|
|
|
72
72
|
SendBroadcastRequest,
|
|
73
73
|
UpdateBroadcastRequest,
|
|
74
74
|
} from './resources/broadcasts';
|
|
75
|
+
import {
|
|
76
|
+
Bulk,
|
|
77
|
+
BulkAddUsersParams,
|
|
78
|
+
BulkCreateJobParams,
|
|
79
|
+
BulkCreateJobResponse,
|
|
80
|
+
BulkListUsersParams,
|
|
81
|
+
BulkListUsersResponse,
|
|
82
|
+
BulkRetrieveJobResponse,
|
|
83
|
+
InboundBulkMessage,
|
|
84
|
+
InboundBulkMessageUser,
|
|
85
|
+
} from './resources/bulk';
|
|
75
86
|
import { Inbound, InboundTrackEventParams, InboundTrackEventResponse } from './resources/inbound';
|
|
76
87
|
import {
|
|
77
88
|
MessageContentResponse,
|
|
@@ -1012,6 +1023,7 @@ export class Courier {
|
|
|
1012
1023
|
* Create a one-off send to a list or audience, author its content, then send it immediately or schedule it for later.
|
|
1013
1024
|
*/
|
|
1014
1025
|
broadcasts: API.Broadcasts = new API.Broadcasts(this);
|
|
1026
|
+
bulk: API.Bulk = new API.Bulk(this);
|
|
1015
1027
|
/**
|
|
1016
1028
|
* Manage the logos, colors, and layout that give the templates you send a consistent look.
|
|
1017
1029
|
*/
|
|
@@ -1068,6 +1080,7 @@ Courier.Auth = Auth;
|
|
|
1068
1080
|
Courier.Automations = Automations;
|
|
1069
1081
|
Courier.Journeys = Journeys;
|
|
1070
1082
|
Courier.Broadcasts = Broadcasts;
|
|
1083
|
+
Courier.Bulk = Bulk;
|
|
1071
1084
|
Courier.Brands = Brands;
|
|
1072
1085
|
Courier.Digests = Digests;
|
|
1073
1086
|
Courier.Inbound = Inbound;
|
|
@@ -1199,6 +1212,18 @@ export declare namespace Courier {
|
|
|
1199
1212
|
type BroadcastSendParams as BroadcastSendParams,
|
|
1200
1213
|
};
|
|
1201
1214
|
|
|
1215
|
+
export {
|
|
1216
|
+
Bulk as Bulk,
|
|
1217
|
+
type InboundBulkMessage as InboundBulkMessage,
|
|
1218
|
+
type InboundBulkMessageUser as InboundBulkMessageUser,
|
|
1219
|
+
type BulkCreateJobResponse as BulkCreateJobResponse,
|
|
1220
|
+
type BulkListUsersResponse as BulkListUsersResponse,
|
|
1221
|
+
type BulkRetrieveJobResponse as BulkRetrieveJobResponse,
|
|
1222
|
+
type BulkAddUsersParams as BulkAddUsersParams,
|
|
1223
|
+
type BulkCreateJobParams as BulkCreateJobParams,
|
|
1224
|
+
type BulkListUsersParams as BulkListUsersParams,
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1202
1227
|
export {
|
|
1203
1228
|
Brands as Brands,
|
|
1204
1229
|
type Brand as Brand,
|
|
@@ -14,6 +14,13 @@ export class Audiences extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Returns one audience with its name, description, and the filter and AND or OR
|
|
16
16
|
* operator that decide which users belong to it.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const audience = await client.audiences.retrieve(
|
|
21
|
+
* 'audience_id',
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
retrieve(audienceID: string, options?: RequestOptions): APIPromise<Audience> {
|
|
19
26
|
return this._client.get(path`/audiences/${audienceID}`, options);
|
|
@@ -22,6 +29,28 @@ export class Audiences extends APIResource {
|
|
|
22
29
|
/**
|
|
23
30
|
* Creates or replaces an audience from a filter and an AND or OR operator.
|
|
24
31
|
* Membership recalculates automatically as profiles change.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const audience = await client.audiences.update(
|
|
36
|
+
* 'audience_id',
|
|
37
|
+
* {
|
|
38
|
+
* description: 'Users located in the US',
|
|
39
|
+
* filter: {
|
|
40
|
+
* operator: 'AND',
|
|
41
|
+
* filters: [
|
|
42
|
+
* {
|
|
43
|
+
* operator: 'EQ',
|
|
44
|
+
* path: 'profile.location',
|
|
45
|
+
* value: 'US',
|
|
46
|
+
* },
|
|
47
|
+
* ],
|
|
48
|
+
* },
|
|
49
|
+
* name: 'Engaged US Users',
|
|
50
|
+
* operator: 'AND',
|
|
51
|
+
* },
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
25
54
|
*/
|
|
26
55
|
update(
|
|
27
56
|
audienceID: string,
|
|
@@ -34,6 +63,11 @@ export class Audiences extends APIResource {
|
|
|
34
63
|
/**
|
|
35
64
|
* Returns the audiences in the workspace with paging. Audiences are filter-based
|
|
36
65
|
* groups that recalculate as user profiles change.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const audiences = await client.audiences.list();
|
|
70
|
+
* ```
|
|
37
71
|
*/
|
|
38
72
|
list(
|
|
39
73
|
query: AudienceListParams | null | undefined = {},
|
|
@@ -45,6 +79,11 @@ export class Audiences extends APIResource {
|
|
|
45
79
|
/**
|
|
46
80
|
* Deletes an audience permanently, so update any caller sending to it by audience
|
|
47
81
|
* id first. Those sends fail once the audience is gone.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* await client.audiences.delete('audience_id');
|
|
86
|
+
* ```
|
|
48
87
|
*/
|
|
49
88
|
delete(audienceID: string, options?: RequestOptions): APIPromise<void> {
|
|
50
89
|
return this._client.delete(path`/audiences/${audienceID}`, {
|
|
@@ -56,6 +95,13 @@ export class Audiences extends APIResource {
|
|
|
56
95
|
/**
|
|
57
96
|
* Returns the users currently matching an audience filter, with paging. Membership
|
|
58
97
|
* is recalculated, so results shift as profiles change.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.audiences.listMembers(
|
|
102
|
+
* 'audience_id',
|
|
103
|
+
* );
|
|
104
|
+
* ```
|
|
59
105
|
*/
|
|
60
106
|
listMembers(
|
|
61
107
|
audienceID: string,
|
|
@@ -68,7 +68,11 @@ export class Invoke extends APIResource {
|
|
|
68
68
|
* const automationInvokeResponse =
|
|
69
69
|
* await client.automations.invoke.invokeByTemplate(
|
|
70
70
|
* 'templateId',
|
|
71
|
-
* {
|
|
71
|
+
* {
|
|
72
|
+
* recipient: 'user_abc',
|
|
73
|
+
* data: { orderId: '1234' },
|
|
74
|
+
* profile: { email: 'jdoe@example.com' },
|
|
75
|
+
* },
|
|
72
76
|
* );
|
|
73
77
|
* ```
|
|
74
78
|
*/
|
package/src/resources/brands.ts
CHANGED
|
@@ -67,7 +67,10 @@ export class Brands extends APIResource {
|
|
|
67
67
|
* @example
|
|
68
68
|
* ```ts
|
|
69
69
|
* const brand = await client.brands.update('brand_id', {
|
|
70
|
-
* name: '
|
|
70
|
+
* name: 'My Brand',
|
|
71
|
+
* settings: {
|
|
72
|
+
* colors: { primary: '#9D3789', secondary: '#FFFFFF' },
|
|
73
|
+
* },
|
|
71
74
|
* });
|
|
72
75
|
* ```
|
|
73
76
|
*/
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as BulkAPI from './bulk';
|
|
5
|
+
import * as Shared from './shared';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Bulk extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Ingest user data into a Bulk Job.
|
|
14
|
+
*
|
|
15
|
+
* **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
16
|
+
* for provider routing to work correctly. The `to.email` field is not sufficient
|
|
17
|
+
* for email provider routing.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* await client.bulk.addUsers('job_id', {
|
|
22
|
+
* users: [
|
|
23
|
+
* {
|
|
24
|
+
* recipient: 'user_abc',
|
|
25
|
+
* profile: { email: 'jdoe@example.com' },
|
|
26
|
+
* data: { name: 'Jane' },
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
addUsers(jobID: string, body: BulkAddUsersParams, options?: RequestOptions): APIPromise<void> {
|
|
33
|
+
return this._client.post(path`/bulk/${jobID}`, {
|
|
34
|
+
body,
|
|
35
|
+
...options,
|
|
36
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new bulk job for sending messages to multiple recipients.
|
|
42
|
+
*
|
|
43
|
+
* **Required**: `message.event` (event ID or notification ID)
|
|
44
|
+
*
|
|
45
|
+
* **Optional (V2 format)**: `message.template` (notification ID) or
|
|
46
|
+
* `message.content` (Elemental content) can be provided to override the
|
|
47
|
+
* notification associated with the event.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response = await client.bulk.createJob({
|
|
52
|
+
* message: {
|
|
53
|
+
* event: 'welcome-series',
|
|
54
|
+
* brand: 'bnd_01kx4mrd0pfzw8wt7pn7p2fzag',
|
|
55
|
+
* data: { campaign: 'spring-2024' },
|
|
56
|
+
* },
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
createJob(body: BulkCreateJobParams, options?: RequestOptions): APIPromise<BulkCreateJobResponse> {
|
|
61
|
+
return this._client.post('/bulk', { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get Bulk Job Users
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response = await client.bulk.listUsers('job_id');
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
listUsers(
|
|
73
|
+
jobID: string,
|
|
74
|
+
query: BulkListUsersParams | null | undefined = {},
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): APIPromise<BulkListUsersResponse> {
|
|
77
|
+
return this._client.get(path`/bulk/${jobID}/users`, { query, ...options });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get a bulk job
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const response = await client.bulk.retrieveJob('job_id');
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
retrieveJob(jobID: string, options?: RequestOptions): APIPromise<BulkRetrieveJobResponse> {
|
|
89
|
+
return this._client.get(path`/bulk/${jobID}`, options);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Run a bulk job
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* await client.bulk.runJob('job_id');
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
runJob(jobID: string, options?: RequestOptions): APIPromise<void> {
|
|
101
|
+
return this._client.post(path`/bulk/${jobID}/run`, {
|
|
102
|
+
...options,
|
|
103
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Bulk message definition. Supports two formats:
|
|
110
|
+
*
|
|
111
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
112
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
113
|
+
* content) in addition to `event`
|
|
114
|
+
*/
|
|
115
|
+
export interface InboundBulkMessage {
|
|
116
|
+
/**
|
|
117
|
+
* Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
118
|
+
* "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
119
|
+
* mapped to a notification.
|
|
120
|
+
*/
|
|
121
|
+
event: string;
|
|
122
|
+
|
|
123
|
+
brand?: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Elemental content (optional, for V2 format). When provided, this will be used
|
|
127
|
+
* instead of the notification associated with the `event` field.
|
|
128
|
+
*/
|
|
129
|
+
content?: Shared.ElementalContentSugar | Shared.ElementalContent | null;
|
|
130
|
+
|
|
131
|
+
data?: { [key: string]: unknown } | null;
|
|
132
|
+
|
|
133
|
+
locale?: { [key: string]: { [key: string]: unknown } } | null;
|
|
134
|
+
|
|
135
|
+
override?: { [key: string]: unknown } | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Notification ID or template ID (optional, for V2 format). When provided, this
|
|
139
|
+
* will be used instead of the notification associated with the `event` field.
|
|
140
|
+
*/
|
|
141
|
+
template?: string | null;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface InboundBulkMessageUser {
|
|
145
|
+
/**
|
|
146
|
+
* User-specific data that will be merged with message.data
|
|
147
|
+
*/
|
|
148
|
+
data?: unknown;
|
|
149
|
+
|
|
150
|
+
preferences?: Shared.RecipientPreferences | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* User profile information. For email-based bulk jobs, `profile.email` is required
|
|
154
|
+
* for provider routing to determine if the message can be delivered. The email
|
|
155
|
+
* address should be provided here rather than in `to.email`.
|
|
156
|
+
*/
|
|
157
|
+
profile?: { [key: string]: unknown } | null;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* User ID (legacy field, use profile or to.user_id instead)
|
|
161
|
+
*/
|
|
162
|
+
recipient?: string | null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Optional recipient information. Note: For email provider routing, use
|
|
166
|
+
* `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
167
|
+
* recipient identification and data merging.
|
|
168
|
+
*/
|
|
169
|
+
to?: Shared.UserRecipient | null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface BulkCreateJobResponse {
|
|
173
|
+
jobId: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface BulkListUsersResponse {
|
|
177
|
+
items: Array<BulkListUsersResponse.Item>;
|
|
178
|
+
|
|
179
|
+
paging: Shared.Paging;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export namespace BulkListUsersResponse {
|
|
183
|
+
export interface Item extends BulkAPI.InboundBulkMessageUser {
|
|
184
|
+
status: 'PENDING' | 'ENQUEUED' | 'ERROR';
|
|
185
|
+
|
|
186
|
+
messageId?: string | null;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface BulkRetrieveJobResponse {
|
|
191
|
+
job: BulkRetrieveJobResponse.Job;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export namespace BulkRetrieveJobResponse {
|
|
195
|
+
export interface Job {
|
|
196
|
+
/**
|
|
197
|
+
* Bulk message definition. Supports two formats:
|
|
198
|
+
*
|
|
199
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
200
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
201
|
+
* content) in addition to `event`
|
|
202
|
+
*/
|
|
203
|
+
definition: BulkAPI.InboundBulkMessage;
|
|
204
|
+
|
|
205
|
+
enqueued: number;
|
|
206
|
+
|
|
207
|
+
failures: number;
|
|
208
|
+
|
|
209
|
+
received: number;
|
|
210
|
+
|
|
211
|
+
status: 'CREATED' | 'PROCESSING' | 'COMPLETED' | 'ERROR';
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface BulkAddUsersParams {
|
|
216
|
+
users: Array<InboundBulkMessageUser>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface BulkCreateJobParams {
|
|
220
|
+
/**
|
|
221
|
+
* Bulk message definition. Supports two formats:
|
|
222
|
+
*
|
|
223
|
+
* - V1 format: Requires `event` field (event ID or notification ID)
|
|
224
|
+
* - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
225
|
+
* content) in addition to `event`
|
|
226
|
+
*/
|
|
227
|
+
message: InboundBulkMessage;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface BulkListUsersParams {
|
|
231
|
+
/**
|
|
232
|
+
* A unique identifier that allows for fetching the next set of users added to the
|
|
233
|
+
* bulk job
|
|
234
|
+
*/
|
|
235
|
+
cursor?: string | null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare namespace Bulk {
|
|
239
|
+
export {
|
|
240
|
+
type InboundBulkMessage as InboundBulkMessage,
|
|
241
|
+
type InboundBulkMessageUser as InboundBulkMessageUser,
|
|
242
|
+
type BulkCreateJobResponse as BulkCreateJobResponse,
|
|
243
|
+
type BulkListUsersResponse as BulkListUsersResponse,
|
|
244
|
+
type BulkRetrieveJobResponse as BulkRetrieveJobResponse,
|
|
245
|
+
type BulkAddUsersParams as BulkAddUsersParams,
|
|
246
|
+
type BulkCreateJobParams as BulkCreateJobParams,
|
|
247
|
+
type BulkListUsersParams as BulkListUsersParams,
|
|
248
|
+
};
|
|
249
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -63,6 +63,17 @@ export {
|
|
|
63
63
|
type BroadcastScheduleParams,
|
|
64
64
|
type BroadcastSendParams,
|
|
65
65
|
} from './broadcasts';
|
|
66
|
+
export {
|
|
67
|
+
Bulk,
|
|
68
|
+
type InboundBulkMessage,
|
|
69
|
+
type InboundBulkMessageUser,
|
|
70
|
+
type BulkCreateJobResponse,
|
|
71
|
+
type BulkListUsersResponse,
|
|
72
|
+
type BulkRetrieveJobResponse,
|
|
73
|
+
type BulkAddUsersParams,
|
|
74
|
+
type BulkCreateJobParams,
|
|
75
|
+
type BulkListUsersParams,
|
|
76
|
+
} from './bulk';
|
|
66
77
|
export {
|
|
67
78
|
Digests,
|
|
68
79
|
type DigestCategory,
|
|
@@ -44,7 +44,9 @@ export class Lists extends APIResource {
|
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
46
|
* ```ts
|
|
47
|
-
* await client.lists.update('list_id', {
|
|
47
|
+
* await client.lists.update('list_id', {
|
|
48
|
+
* name: 'Product Updates',
|
|
49
|
+
* });
|
|
48
50
|
* ```
|
|
49
51
|
*/
|
|
50
52
|
update(listID: string, body: ListUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
@@ -38,7 +38,10 @@ export class Subscriptions extends APIResource {
|
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
40
40
|
* await client.lists.subscriptions.add('list_id', {
|
|
41
|
-
* recipients: [
|
|
41
|
+
* recipients: [
|
|
42
|
+
* { recipientId: 'user_abc' },
|
|
43
|
+
* { recipientId: 'user_def' },
|
|
44
|
+
* ],
|
|
42
45
|
* });
|
|
43
46
|
* ```
|
|
44
47
|
*/
|
|
@@ -71,7 +74,10 @@ export class Subscriptions extends APIResource {
|
|
|
71
74
|
* @example
|
|
72
75
|
* ```ts
|
|
73
76
|
* await client.lists.subscriptions.subscribe('list_id', {
|
|
74
|
-
* recipients: [
|
|
77
|
+
* recipients: [
|
|
78
|
+
* { recipientId: 'user_abc' },
|
|
79
|
+
* { recipientId: 'user_def' },
|
|
80
|
+
* ],
|
|
75
81
|
* });
|
|
76
82
|
* ```
|
|
77
83
|
*/
|
|
@@ -91,6 +97,11 @@ export class Subscriptions extends APIResource {
|
|
|
91
97
|
* ```ts
|
|
92
98
|
* await client.lists.subscriptions.subscribeUser('user_id', {
|
|
93
99
|
* list_id: 'list_id',
|
|
100
|
+
* preferences: {
|
|
101
|
+
* notifications: {
|
|
102
|
+
* nt_01kx4h2jdafq8bk9aftxak4b40: { status: 'OPTED_IN' },
|
|
103
|
+
* },
|
|
104
|
+
* },
|
|
94
105
|
* });
|
|
95
106
|
* ```
|
|
96
107
|
*/
|
|
@@ -29,7 +29,10 @@ export class Profiles extends APIResource {
|
|
|
29
29
|
* @example
|
|
30
30
|
* ```ts
|
|
31
31
|
* const profile = await client.profiles.create('user_id', {
|
|
32
|
-
* profile: {
|
|
32
|
+
* profile: {
|
|
33
|
+
* email: 'jdoe@example.com',
|
|
34
|
+
* phone_number: '+15558675309',
|
|
35
|
+
* },
|
|
33
36
|
* });
|
|
34
37
|
* ```
|
|
35
38
|
*/
|
|
@@ -80,9 +83,9 @@ export class Profiles extends APIResource {
|
|
|
80
83
|
* await client.profiles.update('user_id', {
|
|
81
84
|
* patch: [
|
|
82
85
|
* {
|
|
83
|
-
* op: '
|
|
84
|
-
* path: '
|
|
85
|
-
* value: '
|
|
86
|
+
* op: 'replace',
|
|
87
|
+
* path: '/email',
|
|
88
|
+
* value: 'jdoe@example.com',
|
|
86
89
|
* },
|
|
87
90
|
* ],
|
|
88
91
|
* });
|
|
@@ -119,7 +122,11 @@ export class Profiles extends APIResource {
|
|
|
119
122
|
* @example
|
|
120
123
|
* ```ts
|
|
121
124
|
* const response = await client.profiles.replace('user_id', {
|
|
122
|
-
* profile: {
|
|
125
|
+
* profile: {
|
|
126
|
+
* email: 'jdoe@example.com',
|
|
127
|
+
* phone_number: '+15558675309',
|
|
128
|
+
* locale: 'en-US',
|
|
129
|
+
* },
|
|
123
130
|
* });
|
|
124
131
|
* ```
|
|
125
132
|
*/
|
|
@@ -22,7 +22,9 @@ export class Providers extends APIResource {
|
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
24
24
|
* const provider = await client.providers.create({
|
|
25
|
-
* provider: '
|
|
25
|
+
* provider: 'sendgrid',
|
|
26
|
+
* settings: { api_key: 'SG.xxxxxxxx' },
|
|
27
|
+
* title: 'Production SendGrid',
|
|
26
28
|
* });
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
@@ -67,7 +69,9 @@ export class Providers extends APIResource {
|
|
|
67
69
|
* @example
|
|
68
70
|
* ```ts
|
|
69
71
|
* const provider = await client.providers.update('id', {
|
|
70
|
-
* provider: '
|
|
72
|
+
* provider: 'sendgrid',
|
|
73
|
+
* settings: { api_key: 'SG.xxxxxxxx' },
|
|
74
|
+
* title: 'Production SendGrid',
|
|
71
75
|
* });
|
|
72
76
|
* ```
|
|
73
77
|
*/
|
package/src/resources/send.ts
CHANGED
|
@@ -12,7 +12,8 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
12
12
|
export class Send extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Sends a message to one or more recipients and returns a requestId. Courier
|
|
15
|
-
* routes it to email, SMS, push, chat, or in-app based on your rules.
|
|
15
|
+
* routes it to email, SMS, push, chat, or in-app based on your rules. Use the
|
|
16
|
+
* returned requestId to look up delivery status via the Messages API.
|
|
16
17
|
*
|
|
17
18
|
* @example
|
|
18
19
|
* ```ts
|