@trycourier/courier 9.4.0 → 9.4.2
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 +14 -0
- package/client.d.mts +8 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -0
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +265 -17
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +265 -17
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +8 -0
- package/src/resources/shared.ts +308 -17
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/shared.ts
CHANGED
|
@@ -121,7 +121,78 @@ export type DeviceType = string;
|
|
|
121
121
|
|
|
122
122
|
export type Discord = SendToChannel | SendDirectMessage;
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Allows the user to execute an action. Can be a button or a link.
|
|
126
|
+
*/
|
|
127
|
+
export interface ElementalActionNode extends ElementalBaseNode {
|
|
128
|
+
/**
|
|
129
|
+
* The text content of the action shown to the user.
|
|
130
|
+
*/
|
|
131
|
+
content: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The target URL of the action.
|
|
135
|
+
*/
|
|
136
|
+
href: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* A unique id used to identify the action when it is executed.
|
|
140
|
+
*/
|
|
141
|
+
action_id?: string | null;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The alignment of the action button. Defaults to "center".
|
|
145
|
+
*/
|
|
146
|
+
align?: Alignment | null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The background color of the action button.
|
|
150
|
+
*/
|
|
151
|
+
background_color?: string | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* CSS border-radius applied to the action button. For example, `4px`
|
|
155
|
+
*/
|
|
156
|
+
border_radius?: string | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* CSS border width applied to the action button. For example, `1px`
|
|
160
|
+
*/
|
|
161
|
+
border_size?: string | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* When true, the action's href is not rewritten for click-through tracking, even
|
|
165
|
+
* when click-through tracking is enabled for the workspace.
|
|
166
|
+
*/
|
|
167
|
+
disable_tracking?: boolean | null;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* CSS font-size applied to the action button label. For example, `14px`
|
|
171
|
+
*/
|
|
172
|
+
font_size?: string | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Region specific content. See
|
|
176
|
+
* [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
|
|
177
|
+
* for more details.
|
|
178
|
+
*/
|
|
179
|
+
locales?: Locales | null;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* CSS padding applied to the action button. For example, `8px 16px`
|
|
183
|
+
*/
|
|
184
|
+
padding?: string | null;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Defaults to `button`.
|
|
188
|
+
*/
|
|
189
|
+
style?: 'button' | 'link' | null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Allows the user to execute an action. Can be a button or a link.
|
|
194
|
+
*/
|
|
195
|
+
export interface ElementalActionNodeWithType extends ElementalActionNode {
|
|
125
196
|
type?: 'action';
|
|
126
197
|
}
|
|
127
198
|
|
|
@@ -220,33 +291,126 @@ export interface ElementalContentSugar {
|
|
|
220
291
|
title: string;
|
|
221
292
|
}
|
|
222
293
|
|
|
223
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Renders a dividing line between elements.
|
|
296
|
+
*/
|
|
297
|
+
export interface ElementalDividerNode extends ElementalBaseNode {
|
|
298
|
+
/**
|
|
299
|
+
* The CSS color to render the line with. For example, `#fff`
|
|
300
|
+
*/
|
|
301
|
+
color?: string | null;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Renders a dividing line between elements.
|
|
306
|
+
*/
|
|
307
|
+
export interface ElementalDividerNodeWithType extends ElementalDividerNode {
|
|
224
308
|
type?: 'divider';
|
|
225
309
|
}
|
|
226
310
|
|
|
227
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Raw HTML string inside an Elemental document. When rendering a message, this
|
|
313
|
+
* node is turned into output only for the email channel; for other channels it
|
|
314
|
+
* produces no blocks.
|
|
315
|
+
*/
|
|
316
|
+
export interface ElementalHTMLNode extends ElementalBaseNode {
|
|
317
|
+
/**
|
|
318
|
+
* Raw HTML string to render inside the notification.
|
|
319
|
+
*/
|
|
320
|
+
content: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Region specific content. See
|
|
324
|
+
* [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
|
|
325
|
+
* for more details.
|
|
326
|
+
*/
|
|
327
|
+
locales?: Locales | null;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Raw HTML string inside an Elemental document. When rendering a message, this
|
|
332
|
+
* node is turned into output only for the email channel; for other channels it
|
|
333
|
+
* produces no blocks.
|
|
334
|
+
*/
|
|
335
|
+
export interface ElementalHTMLNodeWithType extends ElementalHTMLNode {
|
|
228
336
|
type?: 'html';
|
|
229
337
|
}
|
|
230
338
|
|
|
231
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Used to embed an image into the notification.
|
|
341
|
+
*/
|
|
342
|
+
export interface ElementalImageNode extends ElementalBaseNode {
|
|
343
|
+
/**
|
|
344
|
+
* The source of the image.
|
|
345
|
+
*/
|
|
346
|
+
src: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The alignment of the image.
|
|
350
|
+
*/
|
|
351
|
+
align?: Alignment | null;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Alternate text for the image.
|
|
355
|
+
*/
|
|
356
|
+
alt_text?: string | null;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* CSS border color applied to the image. For example, `#ccc`
|
|
360
|
+
*/
|
|
361
|
+
border_color?: string | null;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* CSS border width applied to the image. For example, `1px`
|
|
365
|
+
*/
|
|
366
|
+
border_size?: string | null;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* A URL to link to when the image is clicked.
|
|
370
|
+
*/
|
|
371
|
+
href?: string | null;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* CSS padding applied around the image. For example, `10px`
|
|
375
|
+
*/
|
|
376
|
+
padding?: string | null;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* CSS width properties to apply to the image. For example, 50px
|
|
380
|
+
*/
|
|
381
|
+
width?: string | null;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Used to embed an image into the notification.
|
|
386
|
+
*/
|
|
387
|
+
export interface ElementalImageNodeWithType extends ElementalImageNode {
|
|
232
388
|
type?: 'image';
|
|
233
389
|
}
|
|
234
390
|
|
|
235
|
-
|
|
391
|
+
/**
|
|
392
|
+
* The meta element contains information describing the notification that may be
|
|
393
|
+
* used by a particular channel or provider. One important field is the title field
|
|
394
|
+
* which will be used as the title for channels that support it.
|
|
395
|
+
*/
|
|
396
|
+
export interface ElementalMetaNode extends ElementalBaseNode {
|
|
397
|
+
/**
|
|
398
|
+
* The title to be displayed by supported channels. For example, the email subject.
|
|
399
|
+
*/
|
|
400
|
+
title?: string | null;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The meta element contains information describing the notification that may be
|
|
405
|
+
* used by a particular channel or provider. One important field is the title field
|
|
406
|
+
* which will be used as the title for channels that support it.
|
|
407
|
+
*/
|
|
408
|
+
export interface ElementalMetaNodeWithType extends ElementalMetaNode {
|
|
236
409
|
type?: 'meta';
|
|
237
410
|
}
|
|
238
411
|
|
|
239
412
|
/**
|
|
240
|
-
*
|
|
241
|
-
* channel it is sent through. For example, you may want to display a detailed
|
|
242
|
-
* message when the notification is sent through email, and a more concise message
|
|
243
|
-
* in a push notification. Channel elements are only valid as top-level elements;
|
|
244
|
-
* you cannot nest channel elements. If there is a channel element specified at the
|
|
245
|
-
* top-level of the document, all sibling elements must be channel elements. Note:
|
|
246
|
-
* As an alternative, most elements support a `channel` property. Which allows you
|
|
247
|
-
* to selectively display an individual element on a per channel basis. See the
|
|
248
|
-
* [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
|
|
249
|
-
* for more details.
|
|
413
|
+
* Represents a body of text to be rendered inside of the notification.
|
|
250
414
|
*/
|
|
251
415
|
export type ElementalNode =
|
|
252
416
|
| ElementalTextNodeWithType
|
|
@@ -258,11 +422,125 @@ export type ElementalNode =
|
|
|
258
422
|
| ElementalQuoteNodeWithType
|
|
259
423
|
| ElementalHTMLNodeWithType;
|
|
260
424
|
|
|
261
|
-
|
|
425
|
+
/**
|
|
426
|
+
* Renders a quote block.
|
|
427
|
+
*/
|
|
428
|
+
export interface ElementalQuoteNode extends ElementalBaseNode {
|
|
429
|
+
/**
|
|
430
|
+
* The text value of the quote.
|
|
431
|
+
*/
|
|
432
|
+
content: string;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Alignment of the quote.
|
|
436
|
+
*/
|
|
437
|
+
align?: Alignment | null;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* CSS border color property. For example, `#fff`
|
|
441
|
+
*/
|
|
442
|
+
border_color?: string | null;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* CSS px font size for this quote block, e.g. `16px`. Overrides the size of the
|
|
446
|
+
* `text_style` preset. Email only.
|
|
447
|
+
*/
|
|
448
|
+
font_size?: string | null;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* CSS line height for this quote block, as a px value or a unitless multiplier,
|
|
452
|
+
* e.g. `24px` or `1.5`. Email only.
|
|
453
|
+
*/
|
|
454
|
+
line_height?: string | null;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Region specific content. See
|
|
458
|
+
* [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
|
|
459
|
+
* for more details.
|
|
460
|
+
*/
|
|
461
|
+
locales?: Locales | null;
|
|
462
|
+
|
|
463
|
+
text_style?: TextStyle;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Renders a quote block.
|
|
468
|
+
*/
|
|
469
|
+
export interface ElementalQuoteNodeWithType extends ElementalQuoteNode {
|
|
262
470
|
type?: 'quote';
|
|
263
471
|
}
|
|
264
472
|
|
|
265
|
-
|
|
473
|
+
/**
|
|
474
|
+
* Represents a body of text to be rendered inside of the notification.
|
|
475
|
+
*/
|
|
476
|
+
export interface ElementalTextNode extends ElementalBaseNode {
|
|
477
|
+
/**
|
|
478
|
+
* The text content displayed in the notification. Either this field must be
|
|
479
|
+
* specified, or the elements field
|
|
480
|
+
*/
|
|
481
|
+
content: string;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Text alignment.
|
|
485
|
+
*/
|
|
486
|
+
align?: 'left' | 'center' | 'right';
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Apply bold to the text
|
|
490
|
+
*/
|
|
491
|
+
bold?: string | null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Specifies the color of text. Can be any valid css color value
|
|
495
|
+
*/
|
|
496
|
+
color?: string | null;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* CSS px font size for this text block, e.g. `16px`. Overrides the size of the
|
|
500
|
+
* `text_style` preset. Email only.
|
|
501
|
+
*/
|
|
502
|
+
font_size?: string | null;
|
|
503
|
+
|
|
504
|
+
format?: 'markdown' | null;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Apply italics to the text
|
|
508
|
+
*/
|
|
509
|
+
italic?: string | null;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* CSS line height for this text block, as a px value or a unitless multiplier,
|
|
513
|
+
* e.g. `24px` or `1.5`. Email only.
|
|
514
|
+
*/
|
|
515
|
+
line_height?: string | null;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Region specific content. See
|
|
519
|
+
* [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
|
|
520
|
+
* for more details.
|
|
521
|
+
*/
|
|
522
|
+
locales?: Locales | null;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Apply a strike through the text
|
|
526
|
+
*/
|
|
527
|
+
strikethrough?: string | null;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Allows the text to be rendered as a heading level.
|
|
531
|
+
*/
|
|
532
|
+
text_style?: TextStyle | null;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Apply an underline to the text
|
|
536
|
+
*/
|
|
537
|
+
underline?: string | null;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Represents a body of text to be rendered inside of the notification.
|
|
542
|
+
*/
|
|
543
|
+
export interface ElementalTextNodeWithType extends ElementalTextNode {
|
|
266
544
|
type?: 'text';
|
|
267
545
|
}
|
|
268
546
|
|
|
@@ -344,6 +622,19 @@ export interface ListRecipient {
|
|
|
344
622
|
list_id?: string | null;
|
|
345
623
|
}
|
|
346
624
|
|
|
625
|
+
/**
|
|
626
|
+
* Region specific content. See
|
|
627
|
+
* [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
|
|
628
|
+
* for more details.
|
|
629
|
+
*/
|
|
630
|
+
export type Locales = { [key: string]: Locales.item };
|
|
631
|
+
|
|
632
|
+
export namespace Locales {
|
|
633
|
+
export interface item {
|
|
634
|
+
content: string;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
347
638
|
export type MessageChannels = { [key: string]: Channel };
|
|
348
639
|
|
|
349
640
|
export interface MessageContext {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '9.4.
|
|
1
|
+
export const VERSION = '9.4.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "9.4.
|
|
1
|
+
export declare const VERSION = "9.4.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "9.4.
|
|
1
|
+
export declare const VERSION = "9.4.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '9.4.
|
|
1
|
+
export const VERSION = '9.4.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|