@trycourier/courier 7.11.0 → 7.19.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 +114 -0
- package/README.md +1 -0
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -1
- package/client.js.map +1 -1
- package/client.mjs +15 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audiences.d.mts +5 -2
- package/resources/audiences.d.mts.map +1 -1
- package/resources/audiences.d.ts +5 -2
- package/resources/audiences.d.ts.map +1 -1
- package/resources/brands.d.mts +35 -2
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +35 -2
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +34 -1
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +34 -1
- package/resources/brands.mjs.map +1 -1
- package/resources/digests/digests.d.mts +94 -0
- package/resources/digests/digests.d.mts.map +1 -0
- package/resources/digests/digests.d.ts +94 -0
- package/resources/digests/digests.d.ts.map +1 -0
- package/resources/digests/digests.js +17 -0
- package/resources/digests/digests.js.map +1 -0
- package/resources/digests/digests.mjs +12 -0
- package/resources/digests/digests.mjs.map +1 -0
- package/resources/digests/index.d.mts +3 -0
- package/resources/digests/index.d.mts.map +1 -0
- package/resources/digests/index.d.ts +3 -0
- package/resources/digests/index.d.ts.map +1 -0
- package/resources/digests/index.js +9 -0
- package/resources/digests/index.js.map +1 -0
- package/resources/digests/index.mjs +4 -0
- package/resources/digests/index.mjs.map +1 -0
- package/resources/digests/schedules.d.mts +32 -0
- package/resources/digests/schedules.d.mts.map +1 -0
- package/resources/digests/schedules.d.ts +32 -0
- package/resources/digests/schedules.d.ts.map +1 -0
- package/resources/digests/schedules.js +29 -0
- package/resources/digests/schedules.js.map +1 -0
- package/resources/digests/schedules.mjs +25 -0
- package/resources/digests/schedules.mjs.map +1 -0
- package/resources/digests.d.mts +2 -0
- package/resources/digests.d.mts.map +1 -0
- package/resources/digests.d.ts +2 -0
- package/resources/digests.d.ts.map +1 -0
- package/resources/digests.js +6 -0
- package/resources/digests.js.map +1 -0
- package/resources/digests.mjs +3 -0
- package/resources/digests.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/journeys/index.d.mts +2 -2
- package/resources/journeys/index.d.mts.map +1 -1
- package/resources/journeys/index.d.ts +2 -2
- package/resources/journeys/index.d.ts.map +1 -1
- package/resources/journeys/index.js.map +1 -1
- package/resources/journeys/index.mjs.map +1 -1
- package/resources/journeys/journeys.d.mts +198 -7
- package/resources/journeys/journeys.d.mts.map +1 -1
- package/resources/journeys/journeys.d.ts +198 -7
- package/resources/journeys/journeys.d.ts.map +1 -1
- package/resources/journeys/journeys.js +18 -0
- package/resources/journeys/journeys.js.map +1 -1
- package/resources/journeys/journeys.mjs +18 -0
- package/resources/journeys/journeys.mjs.map +1 -1
- package/resources/journeys/templates.d.mts +120 -1
- package/resources/journeys/templates.d.mts.map +1 -1
- package/resources/journeys/templates.d.ts +120 -1
- package/resources/journeys/templates.d.ts.map +1 -1
- package/resources/journeys/templates.js +71 -0
- package/resources/journeys/templates.js.map +1 -1
- package/resources/journeys/templates.mjs +71 -0
- package/resources/journeys/templates.mjs.map +1 -1
- package/resources/messages.d.mts +16 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +16 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +10 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +10 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications/checks.d.mts +3 -3
- package/resources/notifications/checks.d.ts +3 -3
- package/resources/notifications/checks.js +3 -3
- package/resources/notifications/checks.mjs +3 -3
- package/resources/shared.d.mts +6 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +6 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/users/index.d.mts +1 -1
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/preferences.d.mts +211 -1
- package/resources/users/preferences.d.mts.map +1 -1
- package/resources/users/preferences.d.ts +211 -1
- package/resources/users/preferences.d.ts.map +1 -1
- package/resources/users/preferences.js +105 -0
- package/resources/users/preferences.js.map +1 -1
- package/resources/users/preferences.mjs +105 -0
- package/resources/users/preferences.mjs.map +1 -1
- package/resources/users/users.d.mts +2 -2
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +2 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/workspace-preferences/index.d.mts +3 -0
- package/resources/workspace-preferences/index.d.mts.map +1 -0
- package/resources/workspace-preferences/index.d.ts +3 -0
- package/resources/workspace-preferences/index.d.ts.map +1 -0
- package/resources/workspace-preferences/index.js +9 -0
- package/resources/workspace-preferences/index.js.map +1 -0
- package/resources/workspace-preferences/index.mjs +4 -0
- package/resources/workspace-preferences/index.mjs.map +1 -0
- package/resources/workspace-preferences/topics.d.mts +168 -0
- package/resources/workspace-preferences/topics.d.mts.map +1 -0
- package/resources/workspace-preferences/topics.d.ts +168 -0
- package/resources/workspace-preferences/topics.d.ts.map +1 -0
- package/resources/workspace-preferences/topics.js +103 -0
- package/resources/workspace-preferences/topics.js.map +1 -0
- package/resources/workspace-preferences/topics.mjs +99 -0
- package/resources/workspace-preferences/topics.mjs.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.d.mts +410 -0
- package/resources/workspace-preferences/workspace-preferences.d.mts.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.d.ts +410 -0
- package/resources/workspace-preferences/workspace-preferences.d.ts.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.js +104 -0
- package/resources/workspace-preferences/workspace-preferences.js.map +1 -0
- package/resources/workspace-preferences/workspace-preferences.mjs +99 -0
- package/resources/workspace-preferences/workspace-preferences.mjs.map +1 -0
- package/resources/workspace-preferences.d.mts +2 -0
- package/resources/workspace-preferences.d.mts.map +1 -0
- package/resources/workspace-preferences.d.ts +2 -0
- package/resources/workspace-preferences.d.ts.map +1 -0
- package/resources/workspace-preferences.js +6 -0
- package/resources/workspace-preferences.js.map +1 -0
- package/resources/workspace-preferences.mjs +3 -0
- package/resources/workspace-preferences.mjs.map +1 -0
- package/src/client.ts +71 -1
- package/src/resources/audiences.ts +5 -2
- package/src/resources/brands.ts +36 -3
- package/src/resources/digests/digests.ts +120 -0
- package/src/resources/digests/index.ts +9 -0
- package/src/resources/digests/schedules.ts +51 -0
- package/src/resources/digests.ts +3 -0
- package/src/resources/index.ts +28 -0
- package/src/resources/journeys/index.ts +8 -0
- package/src/resources/journeys/journeys.ts +246 -4
- package/src/resources/journeys/templates.ts +168 -0
- package/src/resources/messages.ts +20 -0
- package/src/resources/notifications/checks.ts +3 -3
- package/src/resources/shared.ts +7 -0
- package/src/resources/users/index.ts +6 -0
- package/src/resources/users/preferences.ts +269 -0
- package/src/resources/users/users.ts +12 -0
- package/src/resources/workspace-preferences/index.ts +25 -0
- package/src/resources/workspace-preferences/topics.ts +229 -0
- package/src/resources/workspace-preferences/workspace-preferences.ts +534 -0
- package/src/resources/workspace-preferences.ts +3 -0
- 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
|
@@ -91,6 +91,43 @@ export declare class Templates extends APIResource {
|
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
93
|
publish(notificationID: string, params: TemplatePublishParams, options?: RequestOptions): APIPromise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Replace the elemental content of a journey-scoped notification template.
|
|
96
|
+
* Overwrites all elements in the template draft with the provided content.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const notificationContentMutationResponse =
|
|
101
|
+
* await client.journeys.templates.putContent('x', {
|
|
102
|
+
* templateId: 'x',
|
|
103
|
+
* content: {
|
|
104
|
+
* version: '2022-01-01',
|
|
105
|
+
* elements: [{ type: 'channel' }],
|
|
106
|
+
* },
|
|
107
|
+
* state: 'DRAFT',
|
|
108
|
+
* });
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
putContent(notificationID: string, params: TemplatePutContentParams, options?: RequestOptions): APIPromise<NotificationsAPI.NotificationContentMutationResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* Set locale-specific content overrides for a journey-scoped notification
|
|
114
|
+
* template. Each element override must reference an existing element by ID.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts
|
|
118
|
+
* const notificationContentMutationResponse =
|
|
119
|
+
* await client.journeys.templates.putLocale('x', {
|
|
120
|
+
* templateId: 'x',
|
|
121
|
+
* notificationId: 'x',
|
|
122
|
+
* elements: [
|
|
123
|
+
* { id: 'elem_1', content: 'Hola {{data.name}}.' },
|
|
124
|
+
* { id: 'elem_2', title: 'Bienvenido!' },
|
|
125
|
+
* ],
|
|
126
|
+
* state: 'DRAFT',
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
putLocale(localeID: string, params: TemplatePutLocaleParams, options?: RequestOptions): APIPromise<NotificationsAPI.NotificationContentMutationResponse>;
|
|
94
131
|
/**
|
|
95
132
|
* Replace the journey-scoped notification template draft.
|
|
96
133
|
*
|
|
@@ -110,6 +147,22 @@ export declare class Templates extends APIResource {
|
|
|
110
147
|
* ```
|
|
111
148
|
*/
|
|
112
149
|
replace(notificationID: string, params: TemplateReplaceParams, options?: RequestOptions): APIPromise<JourneysAPI.JourneyTemplateGetResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Retrieve the elemental content of a journey-scoped notification template. The
|
|
152
|
+
* response contains the versioned elements along with their content checksums,
|
|
153
|
+
* which can be used to detect changes between versions. Pass `?version=draft`
|
|
154
|
+
* (default `published`) to retrieve the working draft, or `?version=vN` for a
|
|
155
|
+
* historical version.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* const notificationContentGetResponse =
|
|
160
|
+
* await client.journeys.templates.retrieveContent('x', {
|
|
161
|
+
* templateId: 'x',
|
|
162
|
+
* });
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
retrieveContent(notificationID: string, params: TemplateRetrieveContentParams, options?: RequestOptions): APIPromise<NotificationsAPI.NotificationContentGetResponse>;
|
|
113
166
|
}
|
|
114
167
|
export interface TemplateCreateParams {
|
|
115
168
|
channel: string;
|
|
@@ -177,6 +230,61 @@ export interface TemplatePublishParams {
|
|
|
177
230
|
*/
|
|
178
231
|
version?: string;
|
|
179
232
|
}
|
|
233
|
+
export interface TemplatePutContentParams {
|
|
234
|
+
/**
|
|
235
|
+
* Path param: Journey id
|
|
236
|
+
*/
|
|
237
|
+
templateId: string;
|
|
238
|
+
/**
|
|
239
|
+
* Body param: Elemental content payload. The server defaults `version` when
|
|
240
|
+
* omitted.
|
|
241
|
+
*/
|
|
242
|
+
content: TemplatePutContentParams.Content;
|
|
243
|
+
/**
|
|
244
|
+
* Body param: Template state. Defaults to `DRAFT`.
|
|
245
|
+
*/
|
|
246
|
+
state?: NotificationsAPI.NotificationTemplateState;
|
|
247
|
+
}
|
|
248
|
+
export declare namespace TemplatePutContentParams {
|
|
249
|
+
/**
|
|
250
|
+
* Elemental content payload. The server defaults `version` when omitted.
|
|
251
|
+
*/
|
|
252
|
+
interface Content {
|
|
253
|
+
elements: Array<Shared.ElementalNode>;
|
|
254
|
+
/**
|
|
255
|
+
* Content version identifier (e.g., `2022-01-01`). Optional; server defaults when
|
|
256
|
+
* omitted.
|
|
257
|
+
*/
|
|
258
|
+
version?: string;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
export interface TemplatePutLocaleParams {
|
|
262
|
+
/**
|
|
263
|
+
* Path param: Journey id
|
|
264
|
+
*/
|
|
265
|
+
templateId: string;
|
|
266
|
+
/**
|
|
267
|
+
* Path param: Notification template id
|
|
268
|
+
*/
|
|
269
|
+
notificationId: string;
|
|
270
|
+
/**
|
|
271
|
+
* Body param: Elements with locale-specific content overrides.
|
|
272
|
+
*/
|
|
273
|
+
elements: Array<TemplatePutLocaleParams.Element>;
|
|
274
|
+
/**
|
|
275
|
+
* Body param: Template state. Defaults to `DRAFT`.
|
|
276
|
+
*/
|
|
277
|
+
state?: NotificationsAPI.NotificationTemplateState;
|
|
278
|
+
}
|
|
279
|
+
export declare namespace TemplatePutLocaleParams {
|
|
280
|
+
interface Element {
|
|
281
|
+
/**
|
|
282
|
+
* Target element ID.
|
|
283
|
+
*/
|
|
284
|
+
id: string;
|
|
285
|
+
[k: string]: unknown;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
180
288
|
export interface TemplateReplaceParams {
|
|
181
289
|
/**
|
|
182
290
|
* Path param: Journey id
|
|
@@ -213,7 +321,18 @@ export declare namespace TemplateReplaceParams {
|
|
|
213
321
|
}
|
|
214
322
|
}
|
|
215
323
|
}
|
|
324
|
+
export interface TemplateRetrieveContentParams {
|
|
325
|
+
/**
|
|
326
|
+
* Path param: Journey id
|
|
327
|
+
*/
|
|
328
|
+
templateId: string;
|
|
329
|
+
/**
|
|
330
|
+
* Query param: Accepts `draft`, `published`, or a version string (e.g., `v001`).
|
|
331
|
+
* Defaults to `published`.
|
|
332
|
+
*/
|
|
333
|
+
version?: string;
|
|
334
|
+
}
|
|
216
335
|
export declare namespace Templates {
|
|
217
|
-
export { type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateListParams as TemplateListParams, type TemplateArchiveParams as TemplateArchiveParams, type TemplateListVersionsParams as TemplateListVersionsParams, type TemplatePublishParams as TemplatePublishParams, type TemplateReplaceParams as TemplateReplaceParams, };
|
|
336
|
+
export { type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateListParams as TemplateListParams, type TemplateArchiveParams as TemplateArchiveParams, type TemplateListVersionsParams as TemplateListVersionsParams, type TemplatePublishParams as TemplatePublishParams, type TemplatePutContentParams as TemplatePutContentParams, type TemplatePutLocaleParams as TemplatePutLocaleParams, type TemplateReplaceParams as TemplateReplaceParams, type TemplateRetrieveContentParams as TemplateRetrieveContentParams, };
|
|
218
337
|
}
|
|
219
338
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/resources/journeys/templates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,KAAK,gBAAgB,0CAAuC;AACnE,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,0BAA0B,CAAC;IAIrD;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,0BAA0B,CAAC;IAKrD;;;;;;;;;OASG;IACH,IAAI,CACF,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,kBAAkB,GAAG,IA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ders)([{ Accept: '*/*' }, options?.headers]),
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Replace the elemental content of a journey-scoped notification template.
|
|
120
|
+
* Overwrites all elements in the template draft with the provided content.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* const notificationContentMutationResponse =
|
|
125
|
+
* await client.journeys.templates.putContent('x', {
|
|
126
|
+
* templateId: 'x',
|
|
127
|
+
* content: {
|
|
128
|
+
* version: '2022-01-01',
|
|
129
|
+
* elements: [{ type: 'channel' }],
|
|
130
|
+
* },
|
|
131
|
+
* state: 'DRAFT',
|
|
132
|
+
* });
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
putContent(notificationID, params, options) {
|
|
136
|
+
const { templateId, ...body } = params;
|
|
137
|
+
return this._client.put((0, path_1.path) `/journeys/${templateId}/templates/${notificationID}/content`, {
|
|
138
|
+
body,
|
|
139
|
+
...options,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Set locale-specific content overrides for a journey-scoped notification
|
|
144
|
+
* template. Each element override must reference an existing element by ID.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* const notificationContentMutationResponse =
|
|
149
|
+
* await client.journeys.templates.putLocale('x', {
|
|
150
|
+
* templateId: 'x',
|
|
151
|
+
* notificationId: 'x',
|
|
152
|
+
* elements: [
|
|
153
|
+
* { id: 'elem_1', content: 'Hola {{data.name}}.' },
|
|
154
|
+
* { id: 'elem_2', title: 'Bienvenido!' },
|
|
155
|
+
* ],
|
|
156
|
+
* state: 'DRAFT',
|
|
157
|
+
* });
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
putLocale(localeID, params, options) {
|
|
161
|
+
const { templateId, notificationId, ...body } = params;
|
|
162
|
+
return this._client.put((0, path_1.path) `/journeys/${templateId}/templates/${notificationId}/locales/${localeID}`, {
|
|
163
|
+
body,
|
|
164
|
+
...options,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
118
167
|
/**
|
|
119
168
|
* Replace the journey-scoped notification template draft.
|
|
120
169
|
*
|
|
@@ -137,6 +186,28 @@ class Templates extends resource_1.APIResource {
|
|
|
137
186
|
const { templateId, ...body } = params;
|
|
138
187
|
return this._client.put((0, path_1.path) `/journeys/${templateId}/templates/${notificationID}`, { body, ...options });
|
|
139
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Retrieve the elemental content of a journey-scoped notification template. The
|
|
191
|
+
* response contains the versioned elements along with their content checksums,
|
|
192
|
+
* which can be used to detect changes between versions. Pass `?version=draft`
|
|
193
|
+
* (default `published`) to retrieve the working draft, or `?version=vN` for a
|
|
194
|
+
* historical version.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```ts
|
|
198
|
+
* const notificationContentGetResponse =
|
|
199
|
+
* await client.journeys.templates.retrieveContent('x', {
|
|
200
|
+
* templateId: 'x',
|
|
201
|
+
* });
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
retrieveContent(notificationID, params, options) {
|
|
205
|
+
const { templateId, ...query } = params;
|
|
206
|
+
return this._client.get((0, path_1.path) `/journeys/${templateId}/templates/${notificationID}/content`, {
|
|
207
|
+
query,
|
|
208
|
+
...options,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
140
211
|
}
|
|
141
212
|
exports.Templates = Templates;
|
|
142
213
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/resources/journeys/templates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CACJ,UAAkB,EAClB,IAA0B,EAC1B,OAAwB;QAExB,OAAO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b,cAAsB,EACtB,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,UAAU,cAAc,cAAc,UAAU,EAAE;YACzF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AApPD,8BAoPC"}
|
|
@@ -112,6 +112,55 @@ export class Templates extends APIResource {
|
|
|
112
112
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Replace the elemental content of a journey-scoped notification template.
|
|
117
|
+
* Overwrites all elements in the template draft with the provided content.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const notificationContentMutationResponse =
|
|
122
|
+
* await client.journeys.templates.putContent('x', {
|
|
123
|
+
* templateId: 'x',
|
|
124
|
+
* content: {
|
|
125
|
+
* version: '2022-01-01',
|
|
126
|
+
* elements: [{ type: 'channel' }],
|
|
127
|
+
* },
|
|
128
|
+
* state: 'DRAFT',
|
|
129
|
+
* });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
putContent(notificationID, params, options) {
|
|
133
|
+
const { templateId, ...body } = params;
|
|
134
|
+
return this._client.put(path `/journeys/${templateId}/templates/${notificationID}/content`, {
|
|
135
|
+
body,
|
|
136
|
+
...options,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Set locale-specific content overrides for a journey-scoped notification
|
|
141
|
+
* template. Each element override must reference an existing element by ID.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```ts
|
|
145
|
+
* const notificationContentMutationResponse =
|
|
146
|
+
* await client.journeys.templates.putLocale('x', {
|
|
147
|
+
* templateId: 'x',
|
|
148
|
+
* notificationId: 'x',
|
|
149
|
+
* elements: [
|
|
150
|
+
* { id: 'elem_1', content: 'Hola {{data.name}}.' },
|
|
151
|
+
* { id: 'elem_2', title: 'Bienvenido!' },
|
|
152
|
+
* ],
|
|
153
|
+
* state: 'DRAFT',
|
|
154
|
+
* });
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
putLocale(localeID, params, options) {
|
|
158
|
+
const { templateId, notificationId, ...body } = params;
|
|
159
|
+
return this._client.put(path `/journeys/${templateId}/templates/${notificationId}/locales/${localeID}`, {
|
|
160
|
+
body,
|
|
161
|
+
...options,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
115
164
|
/**
|
|
116
165
|
* Replace the journey-scoped notification template draft.
|
|
117
166
|
*
|
|
@@ -134,5 +183,27 @@ export class Templates extends APIResource {
|
|
|
134
183
|
const { templateId, ...body } = params;
|
|
135
184
|
return this._client.put(path `/journeys/${templateId}/templates/${notificationID}`, { body, ...options });
|
|
136
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Retrieve the elemental content of a journey-scoped notification template. The
|
|
188
|
+
* response contains the versioned elements along with their content checksums,
|
|
189
|
+
* which can be used to detect changes between versions. Pass `?version=draft`
|
|
190
|
+
* (default `published`) to retrieve the working draft, or `?version=vN` for a
|
|
191
|
+
* historical version.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* const notificationContentGetResponse =
|
|
196
|
+
* await client.journeys.templates.retrieveContent('x', {
|
|
197
|
+
* templateId: 'x',
|
|
198
|
+
* });
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
retrieveContent(notificationID, params, options) {
|
|
202
|
+
const { templateId, ...query } = params;
|
|
203
|
+
return this._client.get(path `/journeys/${templateId}/templates/${notificationID}/content`, {
|
|
204
|
+
query,
|
|
205
|
+
...options,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
137
208
|
}
|
|
138
209
|
//# sourceMappingURL=templates.mjs.map
|
|
@@ -1 +1 @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ACH,OAAO,CACL,cAAsB,EACtB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,UAAU,cAAc,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CACb,cAAsB,EACtB,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,UAAU,cAAc,cAAc,UAAU,EAAE;YACzF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/messages.d.mts
CHANGED
|
@@ -27,6 +27,14 @@ export declare class Messages extends APIResource {
|
|
|
27
27
|
* Fetch the array of events of a message you've previously sent.
|
|
28
28
|
*/
|
|
29
29
|
history(messageID: string, query?: MessageHistoryParams | null | undefined, options?: RequestOptions): APIPromise<MessageHistoryResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Resend a previously sent message. The original send request is loaded from
|
|
32
|
+
* storage and a brand-new send is enqueued for the same recipient and content,
|
|
33
|
+
* producing a **new** `messageId` — the original message is not modified.
|
|
34
|
+
* Throttled by a per-message rate limit; a repeat inside the limit window returns
|
|
35
|
+
* `429 Too Many Requests`.
|
|
36
|
+
*/
|
|
37
|
+
resend(messageID: string, options?: RequestOptions): APIPromise<MessageResendResponse>;
|
|
30
38
|
}
|
|
31
39
|
export interface MessageDetails {
|
|
32
40
|
/**
|
|
@@ -169,6 +177,13 @@ export interface MessageHistoryResponse {
|
|
|
169
177
|
[key: string]: unknown;
|
|
170
178
|
}>;
|
|
171
179
|
}
|
|
180
|
+
export interface MessageResendResponse {
|
|
181
|
+
/**
|
|
182
|
+
* The new message id for the resent message. It is distinct from the id of the
|
|
183
|
+
* original message that was resent.
|
|
184
|
+
*/
|
|
185
|
+
messageId: string;
|
|
186
|
+
}
|
|
172
187
|
export interface MessageListParams {
|
|
173
188
|
/**
|
|
174
189
|
* A boolean value that indicates whether archived messages should be included in
|
|
@@ -243,6 +258,6 @@ export interface MessageHistoryParams {
|
|
|
243
258
|
type?: string | null;
|
|
244
259
|
}
|
|
245
260
|
export declare namespace Messages {
|
|
246
|
-
export { type MessageDetails as MessageDetails, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageContentResponse as MessageContentResponse, type MessageHistoryResponse as MessageHistoryResponse, type MessageListParams as MessageListParams, type MessageHistoryParams as MessageHistoryParams, };
|
|
261
|
+
export { type MessageDetails as MessageDetails, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageContentResponse as MessageContentResponse, type MessageHistoryResponse as MessageHistoryResponse, type MessageResendResponse as MessageResendResponse, type MessageListParams as MessageListParams, type MessageHistoryParams as MessageHistoryParams, };
|
|
247
262
|
}
|
|
248
263
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CA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ACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -27,6 +27,14 @@ export declare class Messages extends APIResource {
|
|
|
27
27
|
* Fetch the array of events of a message you've previously sent.
|
|
28
28
|
*/
|
|
29
29
|
history(messageID: string, query?: MessageHistoryParams | null | undefined, options?: RequestOptions): APIPromise<MessageHistoryResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Resend a previously sent message. The original send request is loaded from
|
|
32
|
+
* storage and a brand-new send is enqueued for the same recipient and content,
|
|
33
|
+
* producing a **new** `messageId` — the original message is not modified.
|
|
34
|
+
* Throttled by a per-message rate limit; a repeat inside the limit window returns
|
|
35
|
+
* `429 Too Many Requests`.
|
|
36
|
+
*/
|
|
37
|
+
resend(messageID: string, options?: RequestOptions): APIPromise<MessageResendResponse>;
|
|
30
38
|
}
|
|
31
39
|
export interface MessageDetails {
|
|
32
40
|
/**
|
|
@@ -169,6 +177,13 @@ export interface MessageHistoryResponse {
|
|
|
169
177
|
[key: string]: unknown;
|
|
170
178
|
}>;
|
|
171
179
|
}
|
|
180
|
+
export interface MessageResendResponse {
|
|
181
|
+
/**
|
|
182
|
+
* The new message id for the resent message. It is distinct from the id of the
|
|
183
|
+
* original message that was resent.
|
|
184
|
+
*/
|
|
185
|
+
messageId: string;
|
|
186
|
+
}
|
|
172
187
|
export interface MessageListParams {
|
|
173
188
|
/**
|
|
174
189
|
* A boolean value that indicates whether archived messages should be included in
|
|
@@ -243,6 +258,6 @@ export interface MessageHistoryParams {
|
|
|
243
258
|
type?: string | null;
|
|
244
259
|
}
|
|
245
260
|
export declare namespace Messages {
|
|
246
|
-
export { type MessageDetails as MessageDetails, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageContentResponse as MessageContentResponse, type MessageHistoryResponse as MessageHistoryResponse, type MessageListParams as MessageListParams, type MessageHistoryParams as MessageHistoryParams, };
|
|
261
|
+
export { type MessageDetails as MessageDetails, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageContentResponse as MessageContentResponse, type MessageHistoryResponse as MessageHistoryResponse, type MessageResendResponse as MessageResendResponse, type MessageListParams as MessageListParams, type MessageHistoryParams as MessageHistoryParams, };
|
|
247
262
|
}
|
|
248
263
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI1F;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAI/E;;OAEG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIxF;;OAEG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["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,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE9B;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/messages.js
CHANGED
|
@@ -39,6 +39,16 @@ class Messages extends resource_1.APIResource {
|
|
|
39
39
|
history(messageID, query = {}, options) {
|
|
40
40
|
return this._client.get((0, path_1.path) `/messages/${messageID}/history`, { query, ...options });
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Resend a previously sent message. The original send request is loaded from
|
|
44
|
+
* storage and a brand-new send is enqueued for the same recipient and content,
|
|
45
|
+
* producing a **new** `messageId` — the original message is not modified.
|
|
46
|
+
* Throttled by a per-message rate limit; a repeat inside the limit window returns
|
|
47
|
+
* `429 Too Many Requests`.
|
|
48
|
+
*/
|
|
49
|
+
resend(messageID, options) {
|
|
50
|
+
return this._client.post((0, path_1.path) `/messages/${messageID}/resend`, options);
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
exports.Messages = Messages;
|
|
44
54
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,SAAS,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,SAAiB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,SAAS,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,OAAO,CACL,SAAiB,EACjB,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CA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OAAO,CAAC,CAAC;IACzE,CAAC;CACF;AAzDD,4BAyDC"}
|
package/resources/messages.mjs
CHANGED
|
@@ -36,5 +36,15 @@ export class Messages extends APIResource {
|
|
|
36
36
|
history(messageID, query = {}, options) {
|
|
37
37
|
return this._client.get(path `/messages/${messageID}/history`, { query, ...options });
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Resend a previously sent message. The original send request is loaded from
|
|
41
|
+
* storage and a brand-new send is enqueued for the same recipient and content,
|
|
42
|
+
* producing a **new** `messageId` — the original message is not modified.
|
|
43
|
+
* Throttled by a per-message rate limit; a repeat inside the limit window returns
|
|
44
|
+
* `429 Too Many Requests`.
|
|
45
|
+
*/
|
|
46
|
+
resend(messageID, options) {
|
|
47
|
+
return this._client.post(path `/messages/${messageID}/resend`, options);
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
//# sourceMappingURL=messages.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IA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,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,SAAS,SAAS,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,OAAO,CACL,SAAiB,EACjB,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,SAAS,SAAS,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -4,7 +4,7 @@ import { APIPromise } from "../../core/api-promise.mjs";
|
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
5
|
export declare class Checks extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Replace the checks for a notification template
|
|
7
|
+
* Replace the submission checks for a notification template.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -25,7 +25,7 @@ export declare class Checks extends APIResource {
|
|
|
25
25
|
*/
|
|
26
26
|
update(submissionID: string, params: CheckUpdateParams, options?: RequestOptions): APIPromise<CheckUpdateResponse>;
|
|
27
27
|
/**
|
|
28
|
-
* Retrieve the checks for a notification template
|
|
28
|
+
* Retrieve the submission checks for a notification template.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* ```ts
|
|
@@ -37,7 +37,7 @@ export declare class Checks extends APIResource {
|
|
|
37
37
|
*/
|
|
38
38
|
list(submissionID: string, params: CheckListParams, options?: RequestOptions): APIPromise<CheckListResponse>;
|
|
39
39
|
/**
|
|
40
|
-
* Cancel a notification template
|
|
40
|
+
* Cancel a submission for a notification template.
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
@@ -4,7 +4,7 @@ import { APIPromise } from "../../core/api-promise.js";
|
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
5
|
export declare class Checks extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Replace the checks for a notification template
|
|
7
|
+
* Replace the submission checks for a notification template.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -25,7 +25,7 @@ export declare class Checks extends APIResource {
|
|
|
25
25
|
*/
|
|
26
26
|
update(submissionID: string, params: CheckUpdateParams, options?: RequestOptions): APIPromise<CheckUpdateResponse>;
|
|
27
27
|
/**
|
|
28
|
-
* Retrieve the checks for a notification template
|
|
28
|
+
* Retrieve the submission checks for a notification template.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* ```ts
|
|
@@ -37,7 +37,7 @@ export declare class Checks extends APIResource {
|
|
|
37
37
|
*/
|
|
38
38
|
list(submissionID: string, params: CheckListParams, options?: RequestOptions): APIPromise<CheckListResponse>;
|
|
39
39
|
/**
|
|
40
|
-
* Cancel a notification template
|
|
40
|
+
* Cancel a submission for a notification template.
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
@@ -7,7 +7,7 @@ const headers_1 = require("../../internal/headers.js");
|
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
8
|
class Checks extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Replace the checks for a notification template
|
|
10
|
+
* Replace the submission checks for a notification template.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
@@ -31,7 +31,7 @@ class Checks extends resource_1.APIResource {
|
|
|
31
31
|
return this._client.put((0, path_1.path) `/notifications/${id}/${submissionID}/checks`, { body, ...options });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Retrieve the checks for a notification template
|
|
34
|
+
* Retrieve the submission checks for a notification template.
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
@@ -46,7 +46,7 @@ class Checks extends resource_1.APIResource {
|
|
|
46
46
|
return this._client.get((0, path_1.path) `/notifications/${id}/${submissionID}/checks`, options);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Cancel a notification template
|
|
49
|
+
* Cancel a submission for a notification template.
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
52
|
* ```ts
|
|
@@ -4,7 +4,7 @@ import { buildHeaders } from "../../internal/headers.mjs";
|
|
|
4
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
5
|
export class Checks extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Replace the checks for a notification template
|
|
7
|
+
* Replace the submission checks for a notification template.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
@@ -28,7 +28,7 @@ export class Checks extends APIResource {
|
|
|
28
28
|
return this._client.put(path `/notifications/${id}/${submissionID}/checks`, { body, ...options });
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Retrieve the checks for a notification template
|
|
31
|
+
* Retrieve the submission checks for a notification template.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```ts
|
|
@@ -43,7 +43,7 @@ export class Checks extends APIResource {
|
|
|
43
43
|
return this._client.get(path `/notifications/${id}/${submissionID}/checks`, options);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Cancel a notification template
|
|
46
|
+
* Cancel a submission for a notification template.
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* ```ts
|