@trycourier/courier 7.7.1 → 7.9.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 +45 -0
- package/client.d.mts +19 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -2
- package/client.d.ts.map +1 -1
- package/client.js +15 -5
- package/client.js.map +1 -1
- package/client.mjs +15 -5
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/index.d.mts +4 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/journeys.d.mts +143 -0
- package/resources/journeys.d.mts.map +1 -0
- package/resources/journeys.d.ts +143 -0
- package/resources/journeys.d.ts.map +1 -0
- package/resources/journeys.js +38 -0
- package/resources/journeys.js.map +1 -0
- package/resources/journeys.mjs +34 -0
- package/resources/journeys.mjs.map +1 -0
- package/resources/messages.d.mts +20 -20
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +20 -20
- package/resources/messages.d.ts.map +1 -1
- package/resources/notifications/checks.d.mts +35 -0
- package/resources/notifications/checks.d.mts.map +1 -1
- package/resources/notifications/checks.d.ts +35 -0
- package/resources/notifications/checks.d.ts.map +1 -1
- package/resources/notifications/checks.js +35 -0
- package/resources/notifications/checks.js.map +1 -1
- package/resources/notifications/checks.mjs +35 -0
- package/resources/notifications/checks.mjs.map +1 -1
- package/resources/notifications/draft.d.mts +7 -0
- package/resources/notifications/draft.d.mts.map +1 -1
- package/resources/notifications/draft.d.ts +7 -0
- package/resources/notifications/draft.d.ts.map +1 -1
- package/resources/notifications/draft.js +7 -0
- package/resources/notifications/draft.js.map +1 -1
- package/resources/notifications/draft.mjs +7 -0
- package/resources/notifications/draft.mjs.map +1 -1
- package/resources/notifications/index.d.mts +1 -1
- package/resources/notifications/index.d.mts.map +1 -1
- package/resources/notifications/index.d.ts +1 -1
- package/resources/notifications/index.d.ts.map +1 -1
- package/resources/notifications/index.js.map +1 -1
- package/resources/notifications/index.mjs.map +1 -1
- package/resources/notifications/notifications.d.mts +369 -6
- package/resources/notifications/notifications.d.mts.map +1 -1
- package/resources/notifications/notifications.d.ts +369 -6
- package/resources/notifications/notifications.d.ts.map +1 -1
- package/resources/notifications/notifications.js +122 -0
- package/resources/notifications/notifications.js.map +1 -1
- package/resources/notifications/notifications.mjs +122 -0
- package/resources/notifications/notifications.mjs.map +1 -1
- package/resources/providers/catalog.d.mts +40 -0
- package/resources/providers/catalog.d.mts.map +1 -0
- package/resources/providers/catalog.d.ts +40 -0
- package/resources/providers/catalog.d.ts.map +1 -0
- package/resources/providers/catalog.js +18 -0
- package/resources/providers/catalog.js.map +1 -0
- package/resources/providers/catalog.mjs +14 -0
- package/resources/providers/catalog.mjs.map +1 -0
- package/resources/providers/index.d.mts +3 -0
- package/resources/providers/index.d.mts.map +1 -0
- package/resources/providers/index.d.ts +3 -0
- package/resources/providers/index.d.ts.map +1 -0
- package/resources/providers/index.js +9 -0
- package/resources/providers/index.js.map +1 -0
- package/resources/providers/index.mjs +4 -0
- package/resources/providers/index.mjs.map +1 -0
- package/resources/providers/providers.d.mts +182 -0
- package/resources/providers/providers.d.mts.map +1 -0
- package/resources/providers/providers.d.ts +182 -0
- package/resources/providers/providers.d.ts.map +1 -0
- package/resources/providers/providers.js +57 -0
- package/resources/providers/providers.js.map +1 -0
- package/resources/providers/providers.mjs +52 -0
- package/resources/providers/providers.mjs.map +1 -0
- package/resources/providers.d.mts +2 -0
- package/resources/providers.d.mts.map +1 -0
- package/resources/providers.d.ts +2 -0
- package/resources/providers.d.ts.map +1 -0
- package/resources/providers.js +6 -0
- package/resources/providers.js.map +1 -0
- package/resources/providers.mjs +3 -0
- package/resources/providers.mjs.map +1 -0
- package/resources/routing-strategies.d.mts +304 -0
- package/resources/routing-strategies.d.mts.map +1 -0
- package/resources/routing-strategies.d.ts +304 -0
- package/resources/routing-strategies.d.ts.map +1 -0
- package/resources/routing-strategies.js +94 -0
- package/resources/routing-strategies.js.map +1 -0
- package/resources/routing-strategies.mjs +90 -0
- package/resources/routing-strategies.mjs.map +1 -0
- package/resources/send.d.mts +2 -60
- package/resources/send.d.mts.map +1 -1
- package/resources/send.d.ts +2 -60
- package/resources/send.d.ts.map +1 -1
- package/resources/shared.d.mts +60 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +60 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/tenants/tenants.d.mts +2 -62
- package/resources/tenants/tenants.d.mts.map +1 -1
- package/resources/tenants/tenants.d.ts +2 -62
- package/resources/tenants/tenants.d.ts.map +1 -1
- package/resources/tenants/tenants.js.map +1 -1
- package/resources/tenants/tenants.mjs.map +1 -1
- package/src/client.ts +111 -5
- package/src/resources/index.ts +44 -0
- package/src/resources/journeys.ts +174 -0
- package/src/resources/messages.ts +24 -24
- package/src/resources/notifications/checks.ts +35 -0
- package/src/resources/notifications/draft.ts +7 -0
- package/src/resources/notifications/index.ts +14 -0
- package/src/resources/notifications/notifications.ts +474 -5
- package/src/resources/providers/catalog.ts +53 -0
- package/src/resources/providers/index.ts +12 -0
- package/src/resources/providers/providers.ts +240 -0
- package/src/resources/providers.ts +3 -0
- package/src/resources/routing-strategies.ts +394 -0
- package/src/resources/send.ts +2 -67
- package/src/resources/shared.ts +71 -1
- package/src/resources/tenants/tenants.ts +2 -69
- 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
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as Shared from "./shared.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class RoutingStrategies extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a routing strategy. Requires a name and routing configuration at minimum.
|
|
8
|
+
* Channels and providers default to empty if omitted.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const routingStrategyMutationResponse =
|
|
13
|
+
* await client.routingStrategies.create({
|
|
14
|
+
* name: 'Email via SendGrid',
|
|
15
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
16
|
+
* channels: { email: { providers: ['sendgrid', 'ses'] } },
|
|
17
|
+
* description:
|
|
18
|
+
* 'Routes email through sendgrid with SES failover',
|
|
19
|
+
* providers: { sendgrid: { override: {} } },
|
|
20
|
+
* tags: ['production', 'email'],
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: RoutingStrategyCreateParams, options?: RequestOptions): APIPromise<RoutingStrategyMutationResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieve a routing strategy by ID. Returns the full entity including routing
|
|
27
|
+
* content and metadata.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const routingStrategyGetResponse =
|
|
32
|
+
* await client.routingStrategies.retrieve('id');
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<RoutingStrategyGetResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* List routing strategies in your workspace. Returns metadata only (no
|
|
38
|
+
* routing/channels/providers content). Use GET /routing-strategies/{id} for full
|
|
39
|
+
* details.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const routingStrategyListResponse =
|
|
44
|
+
* await client.routingStrategies.list();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
list(query?: RoutingStrategyListParams | null | undefined, options?: RequestOptions): APIPromise<RoutingStrategyListResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Archive a routing strategy. The strategy must not have associated notification
|
|
50
|
+
* templates. Unlink all templates before archiving.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* await client.routingStrategies.archive('id');
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
archive(id: string, options?: RequestOptions): APIPromise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Replace a routing strategy. Full document replacement; the caller must send the
|
|
60
|
+
* complete desired state. Missing optional fields are cleared.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const routingStrategyMutationResponse =
|
|
65
|
+
* await client.routingStrategies.replace('id', {
|
|
66
|
+
* name: 'Email via SendGrid v2',
|
|
67
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
68
|
+
* channels: { email: { providers: ['ses', 'sendgrid'] } },
|
|
69
|
+
* description: 'Updated routing with SES primary',
|
|
70
|
+
* providers: { ses: { override: {} } },
|
|
71
|
+
* tags: ['production', 'email', 'v2'],
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
replace(id: string, body: RoutingStrategyReplaceParams, options?: RequestOptions): APIPromise<RoutingStrategyMutationResponse>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Request body for creating a routing strategy.
|
|
79
|
+
*/
|
|
80
|
+
export interface RoutingStrategyCreateRequest {
|
|
81
|
+
/**
|
|
82
|
+
* Human-readable name for the routing strategy.
|
|
83
|
+
*/
|
|
84
|
+
name: string;
|
|
85
|
+
/**
|
|
86
|
+
* Routing tree defining channel selection method and order.
|
|
87
|
+
*/
|
|
88
|
+
routing: Shared.MessageRouting;
|
|
89
|
+
/**
|
|
90
|
+
* Per-channel delivery configuration. Defaults to empty if omitted.
|
|
91
|
+
*/
|
|
92
|
+
channels?: Shared.MessageChannels | null;
|
|
93
|
+
/**
|
|
94
|
+
* Optional description of the routing strategy.
|
|
95
|
+
*/
|
|
96
|
+
description?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Per-provider delivery configuration. Defaults to empty if omitted.
|
|
99
|
+
*/
|
|
100
|
+
providers?: Shared.MessageProviders | null;
|
|
101
|
+
/**
|
|
102
|
+
* Optional tags for categorization.
|
|
103
|
+
*/
|
|
104
|
+
tags?: Array<string> | null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Full routing strategy entity returned by GET.
|
|
108
|
+
*/
|
|
109
|
+
export interface RoutingStrategyGetResponse {
|
|
110
|
+
/**
|
|
111
|
+
* The routing strategy ID (rs\_ prefix).
|
|
112
|
+
*/
|
|
113
|
+
id: string;
|
|
114
|
+
/**
|
|
115
|
+
* Per-channel delivery configuration. May be empty.
|
|
116
|
+
*/
|
|
117
|
+
channels: Shared.MessageChannels;
|
|
118
|
+
/**
|
|
119
|
+
* Epoch milliseconds when the strategy was created.
|
|
120
|
+
*/
|
|
121
|
+
created: number;
|
|
122
|
+
/**
|
|
123
|
+
* User ID of the creator.
|
|
124
|
+
*/
|
|
125
|
+
creator: string;
|
|
126
|
+
/**
|
|
127
|
+
* Human-readable name.
|
|
128
|
+
*/
|
|
129
|
+
name: string;
|
|
130
|
+
/**
|
|
131
|
+
* Per-provider delivery configuration. May be empty.
|
|
132
|
+
*/
|
|
133
|
+
providers: Shared.MessageProviders;
|
|
134
|
+
/**
|
|
135
|
+
* Routing tree defining channel selection method and order.
|
|
136
|
+
*/
|
|
137
|
+
routing: Shared.MessageRouting;
|
|
138
|
+
/**
|
|
139
|
+
* Description of the routing strategy.
|
|
140
|
+
*/
|
|
141
|
+
description?: string | null;
|
|
142
|
+
/**
|
|
143
|
+
* Tags for categorization.
|
|
144
|
+
*/
|
|
145
|
+
tags?: Array<string> | null;
|
|
146
|
+
/**
|
|
147
|
+
* Epoch milliseconds of last update.
|
|
148
|
+
*/
|
|
149
|
+
updated?: number | null;
|
|
150
|
+
/**
|
|
151
|
+
* User ID of the last updater.
|
|
152
|
+
*/
|
|
153
|
+
updater?: string | null;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Paginated list of routing strategy summaries.
|
|
157
|
+
*/
|
|
158
|
+
export interface RoutingStrategyListResponse {
|
|
159
|
+
paging: Shared.Paging;
|
|
160
|
+
results: Array<RoutingStrategySummary>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Response returned by create and replace operations.
|
|
164
|
+
*/
|
|
165
|
+
export interface RoutingStrategyMutationResponse {
|
|
166
|
+
/**
|
|
167
|
+
* The routing strategy ID (rs\_ prefix).
|
|
168
|
+
*/
|
|
169
|
+
id: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Request body for replacing a routing strategy. Full document replacement;
|
|
173
|
+
* missing optional fields are cleared.
|
|
174
|
+
*/
|
|
175
|
+
export interface RoutingStrategyReplaceRequest {
|
|
176
|
+
/**
|
|
177
|
+
* Human-readable name for the routing strategy.
|
|
178
|
+
*/
|
|
179
|
+
name: string;
|
|
180
|
+
/**
|
|
181
|
+
* Routing tree defining channel selection method and order.
|
|
182
|
+
*/
|
|
183
|
+
routing: Shared.MessageRouting;
|
|
184
|
+
/**
|
|
185
|
+
* Per-channel delivery configuration. Omit to clear.
|
|
186
|
+
*/
|
|
187
|
+
channels?: Shared.MessageChannels | null;
|
|
188
|
+
/**
|
|
189
|
+
* Optional description. Omit or null to clear.
|
|
190
|
+
*/
|
|
191
|
+
description?: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* Per-provider delivery configuration. Omit to clear.
|
|
194
|
+
*/
|
|
195
|
+
providers?: Shared.MessageProviders | null;
|
|
196
|
+
/**
|
|
197
|
+
* Optional tags. Omit or null to clear.
|
|
198
|
+
*/
|
|
199
|
+
tags?: Array<string> | null;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Routing strategy metadata returned in list responses. Does not include
|
|
203
|
+
* routing/channels/providers content.
|
|
204
|
+
*/
|
|
205
|
+
export interface RoutingStrategySummary {
|
|
206
|
+
/**
|
|
207
|
+
* The routing strategy ID (rs\_ prefix).
|
|
208
|
+
*/
|
|
209
|
+
id: string;
|
|
210
|
+
/**
|
|
211
|
+
* Epoch milliseconds when the strategy was created.
|
|
212
|
+
*/
|
|
213
|
+
created: number;
|
|
214
|
+
/**
|
|
215
|
+
* User ID of the creator.
|
|
216
|
+
*/
|
|
217
|
+
creator: string;
|
|
218
|
+
/**
|
|
219
|
+
* Human-readable name.
|
|
220
|
+
*/
|
|
221
|
+
name: string;
|
|
222
|
+
/**
|
|
223
|
+
* Description of the routing strategy.
|
|
224
|
+
*/
|
|
225
|
+
description?: string | null;
|
|
226
|
+
/**
|
|
227
|
+
* Tags for categorization.
|
|
228
|
+
*/
|
|
229
|
+
tags?: Array<string> | null;
|
|
230
|
+
/**
|
|
231
|
+
* Epoch milliseconds of last update.
|
|
232
|
+
*/
|
|
233
|
+
updated?: number | null;
|
|
234
|
+
/**
|
|
235
|
+
* User ID of the last updater.
|
|
236
|
+
*/
|
|
237
|
+
updater?: string | null;
|
|
238
|
+
}
|
|
239
|
+
export interface RoutingStrategyCreateParams {
|
|
240
|
+
/**
|
|
241
|
+
* Human-readable name for the routing strategy.
|
|
242
|
+
*/
|
|
243
|
+
name: string;
|
|
244
|
+
/**
|
|
245
|
+
* Routing tree defining channel selection method and order.
|
|
246
|
+
*/
|
|
247
|
+
routing: Shared.MessageRouting;
|
|
248
|
+
/**
|
|
249
|
+
* Per-channel delivery configuration. Defaults to empty if omitted.
|
|
250
|
+
*/
|
|
251
|
+
channels?: Shared.MessageChannels | null;
|
|
252
|
+
/**
|
|
253
|
+
* Optional description of the routing strategy.
|
|
254
|
+
*/
|
|
255
|
+
description?: string | null;
|
|
256
|
+
/**
|
|
257
|
+
* Per-provider delivery configuration. Defaults to empty if omitted.
|
|
258
|
+
*/
|
|
259
|
+
providers?: Shared.MessageProviders | null;
|
|
260
|
+
/**
|
|
261
|
+
* Optional tags for categorization.
|
|
262
|
+
*/
|
|
263
|
+
tags?: Array<string> | null;
|
|
264
|
+
}
|
|
265
|
+
export interface RoutingStrategyListParams {
|
|
266
|
+
/**
|
|
267
|
+
* Opaque pagination cursor from a previous response. Omit for the first page.
|
|
268
|
+
*/
|
|
269
|
+
cursor?: string | null;
|
|
270
|
+
/**
|
|
271
|
+
* Maximum number of results per page. Default 20, max 100.
|
|
272
|
+
*/
|
|
273
|
+
limit?: number;
|
|
274
|
+
}
|
|
275
|
+
export interface RoutingStrategyReplaceParams {
|
|
276
|
+
/**
|
|
277
|
+
* Human-readable name for the routing strategy.
|
|
278
|
+
*/
|
|
279
|
+
name: string;
|
|
280
|
+
/**
|
|
281
|
+
* Routing tree defining channel selection method and order.
|
|
282
|
+
*/
|
|
283
|
+
routing: Shared.MessageRouting;
|
|
284
|
+
/**
|
|
285
|
+
* Per-channel delivery configuration. Omit to clear.
|
|
286
|
+
*/
|
|
287
|
+
channels?: Shared.MessageChannels | null;
|
|
288
|
+
/**
|
|
289
|
+
* Optional description. Omit or null to clear.
|
|
290
|
+
*/
|
|
291
|
+
description?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
* Per-provider delivery configuration. Omit to clear.
|
|
294
|
+
*/
|
|
295
|
+
providers?: Shared.MessageProviders | null;
|
|
296
|
+
/**
|
|
297
|
+
* Optional tags. Omit or null to clear.
|
|
298
|
+
*/
|
|
299
|
+
tags?: Array<string> | null;
|
|
300
|
+
}
|
|
301
|
+
export declare namespace RoutingStrategies {
|
|
302
|
+
export { type RoutingStrategyCreateRequest as RoutingStrategyCreateRequest, type RoutingStrategyGetResponse as RoutingStrategyGetResponse, type RoutingStrategyListResponse as RoutingStrategyListResponse, type RoutingStrategyMutationResponse as RoutingStrategyMutationResponse, type RoutingStrategyReplaceRequest as RoutingStrategyReplaceRequest, type RoutingStrategySummary as RoutingStrategySummary, type RoutingStrategyCreateParams as RoutingStrategyCreateParams, type RoutingStrategyListParams as RoutingStrategyListParams, type RoutingStrategyReplaceParams as RoutingStrategyReplaceParams, };
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=routing-strategies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing-strategies.d.ts","sourceRoot":"","sources":["../src/resources/routing-strategies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAItF;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAI1C;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO/D;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;CAG/C;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE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AChB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,iBAAiB,CAAC;IACzC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RoutingStrategies = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class RoutingStrategies extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a routing strategy. Requires a name and routing configuration at minimum.
|
|
11
|
+
* Channels and providers default to empty if omitted.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const routingStrategyMutationResponse =
|
|
16
|
+
* await client.routingStrategies.create({
|
|
17
|
+
* name: 'Email via SendGrid',
|
|
18
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
19
|
+
* channels: { email: { providers: ['sendgrid', 'ses'] } },
|
|
20
|
+
* description:
|
|
21
|
+
* 'Routes email through sendgrid with SES failover',
|
|
22
|
+
* providers: { sendgrid: { override: {} } },
|
|
23
|
+
* tags: ['production', 'email'],
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
create(body, options) {
|
|
28
|
+
return this._client.post('/routing-strategies', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Retrieve a routing strategy by ID. Returns the full entity including routing
|
|
32
|
+
* content and metadata.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const routingStrategyGetResponse =
|
|
37
|
+
* await client.routingStrategies.retrieve('id');
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
retrieve(id, options) {
|
|
41
|
+
return this._client.get((0, path_1.path) `/routing-strategies/${id}`, options);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* List routing strategies in your workspace. Returns metadata only (no
|
|
45
|
+
* routing/channels/providers content). Use GET /routing-strategies/{id} for full
|
|
46
|
+
* details.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const routingStrategyListResponse =
|
|
51
|
+
* await client.routingStrategies.list();
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
list(query = {}, options) {
|
|
55
|
+
return this._client.get('/routing-strategies', { query, ...options });
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Archive a routing strategy. The strategy must not have associated notification
|
|
59
|
+
* templates. Unlink all templates before archiving.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* await client.routingStrategies.archive('id');
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
archive(id, options) {
|
|
67
|
+
return this._client.delete((0, path_1.path) `/routing-strategies/${id}`, {
|
|
68
|
+
...options,
|
|
69
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Replace a routing strategy. Full document replacement; the caller must send the
|
|
74
|
+
* complete desired state. Missing optional fields are cleared.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const routingStrategyMutationResponse =
|
|
79
|
+
* await client.routingStrategies.replace('id', {
|
|
80
|
+
* name: 'Email via SendGrid v2',
|
|
81
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
82
|
+
* channels: { email: { providers: ['ses', 'sendgrid'] } },
|
|
83
|
+
* description: 'Updated routing with SES primary',
|
|
84
|
+
* providers: { ses: { override: {} } },
|
|
85
|
+
* tags: ['production', 'email', 'v2'],
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
replace(id, body, options) {
|
|
90
|
+
return this._client.put((0, path_1.path) `/routing-strategies/${id}`, { body, ...options });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.RoutingStrategies = RoutingStrategies;
|
|
94
|
+
//# sourceMappingURL=routing-strategies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing-strategies.js","sourceRoot":"","sources":["../src/resources/routing-strategies.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAU,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,EAAU,EACV,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAlGD,8CAkGC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class RoutingStrategies extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a routing strategy. Requires a name and routing configuration at minimum.
|
|
8
|
+
* Channels and providers default to empty if omitted.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const routingStrategyMutationResponse =
|
|
13
|
+
* await client.routingStrategies.create({
|
|
14
|
+
* name: 'Email via SendGrid',
|
|
15
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
16
|
+
* channels: { email: { providers: ['sendgrid', 'ses'] } },
|
|
17
|
+
* description:
|
|
18
|
+
* 'Routes email through sendgrid with SES failover',
|
|
19
|
+
* providers: { sendgrid: { override: {} } },
|
|
20
|
+
* tags: ['production', 'email'],
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body, options) {
|
|
25
|
+
return this._client.post('/routing-strategies', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a routing strategy by ID. Returns the full entity including routing
|
|
29
|
+
* content and metadata.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const routingStrategyGetResponse =
|
|
34
|
+
* await client.routingStrategies.retrieve('id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(id, options) {
|
|
38
|
+
return this._client.get(path `/routing-strategies/${id}`, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* List routing strategies in your workspace. Returns metadata only (no
|
|
42
|
+
* routing/channels/providers content). Use GET /routing-strategies/{id} for full
|
|
43
|
+
* details.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const routingStrategyListResponse =
|
|
48
|
+
* await client.routingStrategies.list();
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
list(query = {}, options) {
|
|
52
|
+
return this._client.get('/routing-strategies', { query, ...options });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Archive a routing strategy. The strategy must not have associated notification
|
|
56
|
+
* templates. Unlink all templates before archiving.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* await client.routingStrategies.archive('id');
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
archive(id, options) {
|
|
64
|
+
return this._client.delete(path `/routing-strategies/${id}`, {
|
|
65
|
+
...options,
|
|
66
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Replace a routing strategy. Full document replacement; the caller must send the
|
|
71
|
+
* complete desired state. Missing optional fields are cleared.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const routingStrategyMutationResponse =
|
|
76
|
+
* await client.routingStrategies.replace('id', {
|
|
77
|
+
* name: 'Email via SendGrid v2',
|
|
78
|
+
* routing: { method: 'single', channels: ['email'] },
|
|
79
|
+
* channels: { email: { providers: ['ses', 'sendgrid'] } },
|
|
80
|
+
* description: 'Updated routing with SES primary',
|
|
81
|
+
* providers: { ses: { override: {} } },
|
|
82
|
+
* tags: ['production', 'email', 'v2'],
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
replace(id, body, options) {
|
|
87
|
+
return this._client.put(path `/routing-strategies/${id}`, { body, ...options });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=routing-strategies.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing-strategies.mjs","sourceRoot":"","sources":["../src/resources/routing-strategies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAU,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,EAAU,EACV,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF"}
|
package/resources/send.d.mts
CHANGED
|
@@ -46,9 +46,7 @@ export declare namespace SendMessageParams {
|
|
|
46
46
|
* Define run-time configuration for channels. Valid ChannelId's: email, sms, push,
|
|
47
47
|
* inbox, direct_message, banner, webhook.
|
|
48
48
|
*/
|
|
49
|
-
channels?:
|
|
50
|
-
[key: string]: Message.Channels;
|
|
51
|
-
} | null;
|
|
49
|
+
channels?: Shared.MessageChannels | null;
|
|
52
50
|
/**
|
|
53
51
|
* Describes content that will work for email, inbox, push, chat, or any channel
|
|
54
52
|
* id.
|
|
@@ -62,9 +60,7 @@ export declare namespace SendMessageParams {
|
|
|
62
60
|
expiry?: Message.Expiry | null;
|
|
63
61
|
metadata?: Message.Metadata | null;
|
|
64
62
|
preferences?: Message.Preferences | null;
|
|
65
|
-
providers?:
|
|
66
|
-
[key: string]: Message.Providers;
|
|
67
|
-
} | null;
|
|
63
|
+
providers?: Shared.MessageProviders | null;
|
|
68
64
|
/**
|
|
69
65
|
* Customize which channels/providers Courier may deliver the message through.
|
|
70
66
|
*/
|
|
@@ -77,41 +73,6 @@ export declare namespace SendMessageParams {
|
|
|
77
73
|
to?: Shared.UserRecipient | Shared.AudienceRecipient | Shared.ListRecipient | Shared.ListPatternRecipient | Shared.SlackRecipient | Shared.MsTeamsRecipient | Shared.PagerdutyRecipient | Shared.WebhookRecipient | Array<Shared.UserRecipient | Shared.AudienceRecipient | Shared.ListRecipient | Shared.ListPatternRecipient | Shared.SlackRecipient | Shared.MsTeamsRecipient | Shared.PagerdutyRecipient | Shared.WebhookRecipient> | null;
|
|
78
74
|
}
|
|
79
75
|
namespace Message {
|
|
80
|
-
interface Channels {
|
|
81
|
-
/**
|
|
82
|
-
* Brand id used for rendering.
|
|
83
|
-
*/
|
|
84
|
-
brand_id?: string | null;
|
|
85
|
-
/**
|
|
86
|
-
* JS conditional with access to data/profile.
|
|
87
|
-
*/
|
|
88
|
-
if?: string | null;
|
|
89
|
-
metadata?: Channels.Metadata | null;
|
|
90
|
-
/**
|
|
91
|
-
* Channel specific overrides.
|
|
92
|
-
*/
|
|
93
|
-
override?: {
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
} | null;
|
|
96
|
-
/**
|
|
97
|
-
* Providers enabled for this channel.
|
|
98
|
-
*/
|
|
99
|
-
providers?: Array<string> | null;
|
|
100
|
-
/**
|
|
101
|
-
* Defaults to `single`.
|
|
102
|
-
*/
|
|
103
|
-
routing_method?: 'all' | 'single' | null;
|
|
104
|
-
timeouts?: Channels.Timeouts | null;
|
|
105
|
-
}
|
|
106
|
-
namespace Channels {
|
|
107
|
-
interface Metadata {
|
|
108
|
-
utm?: Shared.Utm | null;
|
|
109
|
-
}
|
|
110
|
-
interface Timeouts {
|
|
111
|
-
channel?: number | null;
|
|
112
|
-
provider?: number | null;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
76
|
interface Delay {
|
|
116
77
|
/**
|
|
117
78
|
* The duration of the delay in milliseconds.
|
|
@@ -150,25 +111,6 @@ export declare namespace SendMessageParams {
|
|
|
150
111
|
*/
|
|
151
112
|
subscription_topic_id: string;
|
|
152
113
|
}
|
|
153
|
-
interface Providers {
|
|
154
|
-
/**
|
|
155
|
-
* JS conditional with access to data/profile.
|
|
156
|
-
*/
|
|
157
|
-
if?: string | null;
|
|
158
|
-
metadata?: Providers.Metadata | null;
|
|
159
|
-
/**
|
|
160
|
-
* Provider-specific overrides.
|
|
161
|
-
*/
|
|
162
|
-
override?: {
|
|
163
|
-
[key: string]: unknown;
|
|
164
|
-
} | null;
|
|
165
|
-
timeouts?: number | null;
|
|
166
|
-
}
|
|
167
|
-
namespace Providers {
|
|
168
|
-
interface Metadata {
|
|
169
|
-
utm?: Shared.Utm | null;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
114
|
/**
|
|
173
115
|
* Customize which channels/providers Courier may deliver the message through.
|
|
174
116
|
*/
|
package/resources/send.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.mts","sourceRoot":"","sources":["../src/resources/send.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;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