@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.
Files changed (135) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/client.d.mts +19 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +19 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -5
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -5
  9. package/client.mjs.map +1 -1
  10. package/package.json +12 -1
  11. package/resources/index.d.mts +4 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +4 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +7 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +3 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/journeys.d.mts +143 -0
  20. package/resources/journeys.d.mts.map +1 -0
  21. package/resources/journeys.d.ts +143 -0
  22. package/resources/journeys.d.ts.map +1 -0
  23. package/resources/journeys.js +38 -0
  24. package/resources/journeys.js.map +1 -0
  25. package/resources/journeys.mjs +34 -0
  26. package/resources/journeys.mjs.map +1 -0
  27. package/resources/messages.d.mts +20 -20
  28. package/resources/messages.d.mts.map +1 -1
  29. package/resources/messages.d.ts +20 -20
  30. package/resources/messages.d.ts.map +1 -1
  31. package/resources/notifications/checks.d.mts +35 -0
  32. package/resources/notifications/checks.d.mts.map +1 -1
  33. package/resources/notifications/checks.d.ts +35 -0
  34. package/resources/notifications/checks.d.ts.map +1 -1
  35. package/resources/notifications/checks.js +35 -0
  36. package/resources/notifications/checks.js.map +1 -1
  37. package/resources/notifications/checks.mjs +35 -0
  38. package/resources/notifications/checks.mjs.map +1 -1
  39. package/resources/notifications/draft.d.mts +7 -0
  40. package/resources/notifications/draft.d.mts.map +1 -1
  41. package/resources/notifications/draft.d.ts +7 -0
  42. package/resources/notifications/draft.d.ts.map +1 -1
  43. package/resources/notifications/draft.js +7 -0
  44. package/resources/notifications/draft.js.map +1 -1
  45. package/resources/notifications/draft.mjs +7 -0
  46. package/resources/notifications/draft.mjs.map +1 -1
  47. package/resources/notifications/index.d.mts +1 -1
  48. package/resources/notifications/index.d.mts.map +1 -1
  49. package/resources/notifications/index.d.ts +1 -1
  50. package/resources/notifications/index.d.ts.map +1 -1
  51. package/resources/notifications/index.js.map +1 -1
  52. package/resources/notifications/index.mjs.map +1 -1
  53. package/resources/notifications/notifications.d.mts +369 -6
  54. package/resources/notifications/notifications.d.mts.map +1 -1
  55. package/resources/notifications/notifications.d.ts +369 -6
  56. package/resources/notifications/notifications.d.ts.map +1 -1
  57. package/resources/notifications/notifications.js +122 -0
  58. package/resources/notifications/notifications.js.map +1 -1
  59. package/resources/notifications/notifications.mjs +122 -0
  60. package/resources/notifications/notifications.mjs.map +1 -1
  61. package/resources/providers/catalog.d.mts +40 -0
  62. package/resources/providers/catalog.d.mts.map +1 -0
  63. package/resources/providers/catalog.d.ts +40 -0
  64. package/resources/providers/catalog.d.ts.map +1 -0
  65. package/resources/providers/catalog.js +18 -0
  66. package/resources/providers/catalog.js.map +1 -0
  67. package/resources/providers/catalog.mjs +14 -0
  68. package/resources/providers/catalog.mjs.map +1 -0
  69. package/resources/providers/index.d.mts +3 -0
  70. package/resources/providers/index.d.mts.map +1 -0
  71. package/resources/providers/index.d.ts +3 -0
  72. package/resources/providers/index.d.ts.map +1 -0
  73. package/resources/providers/index.js +9 -0
  74. package/resources/providers/index.js.map +1 -0
  75. package/resources/providers/index.mjs +4 -0
  76. package/resources/providers/index.mjs.map +1 -0
  77. package/resources/providers/providers.d.mts +182 -0
  78. package/resources/providers/providers.d.mts.map +1 -0
  79. package/resources/providers/providers.d.ts +182 -0
  80. package/resources/providers/providers.d.ts.map +1 -0
  81. package/resources/providers/providers.js +57 -0
  82. package/resources/providers/providers.js.map +1 -0
  83. package/resources/providers/providers.mjs +52 -0
  84. package/resources/providers/providers.mjs.map +1 -0
  85. package/resources/providers.d.mts +2 -0
  86. package/resources/providers.d.mts.map +1 -0
  87. package/resources/providers.d.ts +2 -0
  88. package/resources/providers.d.ts.map +1 -0
  89. package/resources/providers.js +6 -0
  90. package/resources/providers.js.map +1 -0
  91. package/resources/providers.mjs +3 -0
  92. package/resources/providers.mjs.map +1 -0
  93. package/resources/routing-strategies.d.mts +304 -0
  94. package/resources/routing-strategies.d.mts.map +1 -0
  95. package/resources/routing-strategies.d.ts +304 -0
  96. package/resources/routing-strategies.d.ts.map +1 -0
  97. package/resources/routing-strategies.js +94 -0
  98. package/resources/routing-strategies.js.map +1 -0
  99. package/resources/routing-strategies.mjs +90 -0
  100. package/resources/routing-strategies.mjs.map +1 -0
  101. package/resources/send.d.mts +2 -60
  102. package/resources/send.d.mts.map +1 -1
  103. package/resources/send.d.ts +2 -60
  104. package/resources/send.d.ts.map +1 -1
  105. package/resources/shared.d.mts +60 -1
  106. package/resources/shared.d.mts.map +1 -1
  107. package/resources/shared.d.ts +60 -1
  108. package/resources/shared.d.ts.map +1 -1
  109. package/resources/tenants/tenants.d.mts +2 -62
  110. package/resources/tenants/tenants.d.mts.map +1 -1
  111. package/resources/tenants/tenants.d.ts +2 -62
  112. package/resources/tenants/tenants.d.ts.map +1 -1
  113. package/resources/tenants/tenants.js.map +1 -1
  114. package/resources/tenants/tenants.mjs.map +1 -1
  115. package/src/client.ts +111 -5
  116. package/src/resources/index.ts +44 -0
  117. package/src/resources/journeys.ts +174 -0
  118. package/src/resources/messages.ts +24 -24
  119. package/src/resources/notifications/checks.ts +35 -0
  120. package/src/resources/notifications/draft.ts +7 -0
  121. package/src/resources/notifications/index.ts +14 -0
  122. package/src/resources/notifications/notifications.ts +474 -5
  123. package/src/resources/providers/catalog.ts +53 -0
  124. package/src/resources/providers/index.ts +12 -0
  125. package/src/resources/providers/providers.ts +240 -0
  126. package/src/resources/providers.ts +3 -0
  127. package/src/resources/routing-strategies.ts +394 -0
  128. package/src/resources/send.ts +2 -67
  129. package/src/resources/shared.ts +71 -1
  130. package/src/resources/tenants/tenants.ts +2 -69
  131. package/src/version.ts +1 -1
  132. package/version.d.mts +1 -1
  133. package/version.d.ts +1 -1
  134. package/version.js +1 -1
  135. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as NotificationsAPI from './notifications';
4
5
  import * as Shared from '../shared';
5
6
  import * as ChecksAPI from './checks';
6
7
  import {
@@ -14,6 +15,7 @@ import {
14
15
  import * as DraftAPI from './draft';
15
16
  import { Draft } from './draft';
16
17
  import { APIPromise } from '../../core/api-promise';
18
+ import { buildHeaders } from '../../internal/headers';
17
19
  import { RequestOptions } from '../../internal/request-options';
18
20
  import { path } from '../../internal/utils/path';
19
21
 
@@ -21,6 +23,62 @@ export class Notifications extends APIResource {
21
23
  draft: DraftAPI.Draft = new DraftAPI.Draft(this._client);
22
24
  checks: ChecksAPI.Checks = new ChecksAPI.Checks(this._client);
23
25
 
26
+ /**
27
+ * Create a notification template. Requires all fields in the notification object.
28
+ * Templates are created in draft state by default.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const notificationTemplateMutationResponse =
33
+ * await client.notifications.create({
34
+ * notification: {
35
+ * name: 'Welcome Email',
36
+ * tags: ['onboarding', 'welcome'],
37
+ * brand: { id: 'brand_abc' },
38
+ * subscription: { topic_id: 'marketing' },
39
+ * routing: { strategy_id: 'rs_123' },
40
+ * content: {
41
+ * version: '2022-01-01',
42
+ * elements: [{ type: 'channel' }],
43
+ * },
44
+ * },
45
+ * state: 'DRAFT',
46
+ * });
47
+ * ```
48
+ */
49
+ create(
50
+ body: NotificationCreateParams,
51
+ options?: RequestOptions,
52
+ ): APIPromise<NotificationTemplateMutationResponse> {
53
+ return this._client.post('/notifications', { body, ...options });
54
+ }
55
+
56
+ /**
57
+ * Retrieve a notification template by ID. Returns the published version by
58
+ * default. Pass version=draft to retrieve an unpublished template.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const notificationTemplateGetResponse =
63
+ * await client.notifications.retrieve('id');
64
+ * ```
65
+ */
66
+ retrieve(
67
+ id: string,
68
+ query: NotificationRetrieveParams | null | undefined = {},
69
+ options?: RequestOptions,
70
+ ): APIPromise<NotificationTemplateGetResponse> {
71
+ return this._client.get(path`/notifications/${id}`, { query, ...options });
72
+ }
73
+
74
+ /**
75
+ * List notification templates in your workspace.
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const notifications = await client.notifications.list();
80
+ * ```
81
+ */
24
82
  list(
25
83
  query: NotificationListParams | null | undefined = {},
26
84
  options?: RequestOptions,
@@ -28,6 +86,96 @@ export class Notifications extends APIResource {
28
86
  return this._client.get('/notifications', { query, ...options });
29
87
  }
30
88
 
89
+ /**
90
+ * Archive a notification template.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * await client.notifications.archive('id');
95
+ * ```
96
+ */
97
+ archive(id: string, options?: RequestOptions): APIPromise<void> {
98
+ return this._client.delete(path`/notifications/${id}`, {
99
+ ...options,
100
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
101
+ });
102
+ }
103
+
104
+ /**
105
+ * List versions of a notification template.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const notificationTemplateVersionListResponse =
110
+ * await client.notifications.listVersions('id');
111
+ * ```
112
+ */
113
+ listVersions(
114
+ id: string,
115
+ query: NotificationListVersionsParams | null | undefined = {},
116
+ options?: RequestOptions,
117
+ ): APIPromise<NotificationTemplateVersionListResponse> {
118
+ return this._client.get(path`/notifications/${id}/versions`, { query, ...options });
119
+ }
120
+
121
+ /**
122
+ * Publish a notification template. Publishes the current draft by default. Pass a
123
+ * version in the request body to publish a specific historical version.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * await client.notifications.publish('id');
128
+ * ```
129
+ */
130
+ publish(
131
+ id: string,
132
+ body: NotificationPublishParams | null | undefined = {},
133
+ options?: RequestOptions,
134
+ ): APIPromise<void> {
135
+ return this._client.post(path`/notifications/${id}/publish`, {
136
+ body,
137
+ ...options,
138
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
139
+ });
140
+ }
141
+
142
+ /**
143
+ * Replace a notification template. All fields are required.
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const notificationTemplateMutationResponse =
148
+ * await client.notifications.replace('id', {
149
+ * notification: {
150
+ * name: 'Updated Name',
151
+ * tags: ['updated'],
152
+ * brand: null,
153
+ * subscription: null,
154
+ * routing: null,
155
+ * content: {
156
+ * version: '2022-01-01',
157
+ * elements: [{ type: 'channel' }],
158
+ * },
159
+ * },
160
+ * state: 'PUBLISHED',
161
+ * });
162
+ * ```
163
+ */
164
+ replace(
165
+ id: string,
166
+ body: NotificationReplaceParams,
167
+ options?: RequestOptions,
168
+ ): APIPromise<NotificationTemplateMutationResponse> {
169
+ return this._client.put(path`/notifications/${id}`, { body, ...options });
170
+ }
171
+
172
+ /**
173
+ * @example
174
+ * ```ts
175
+ * const notificationGetContent =
176
+ * await client.notifications.retrieveContent('id');
177
+ * ```
178
+ */
31
179
  retrieveContent(id: string, options?: RequestOptions): APIPromise<NotificationGetContent> {
32
180
  return this._client.get(path`/notifications/${id}/content`, options);
33
181
  }
@@ -111,14 +259,258 @@ export namespace NotificationGetContent {
111
259
  }
112
260
  }
113
261
 
262
+ /**
263
+ * Request body for creating a notification template.
264
+ */
265
+ export interface NotificationTemplateCreateRequest {
266
+ /**
267
+ * Full document shape used in POST and PUT request bodies, and returned inside the
268
+ * GET response envelope.
269
+ */
270
+ notification: NotificationTemplatePayload;
271
+
272
+ /**
273
+ * Template state after creation. Case-insensitive input, normalized to uppercase
274
+ * in the response. Defaults to "DRAFT".
275
+ */
276
+ state?: 'DRAFT' | 'PUBLISHED';
277
+ }
278
+
279
+ /**
280
+ * Envelope response for GET /notifications/{id}. The notification object mirrors
281
+ * the POST/PUT input shape. Nullable fields return null when unset.
282
+ */
283
+ export interface NotificationTemplateGetResponse {
284
+ /**
285
+ * Epoch milliseconds when the template was created.
286
+ */
287
+ created: number;
288
+
289
+ /**
290
+ * User ID of the creator.
291
+ */
292
+ creator: string;
293
+
294
+ /**
295
+ * Full document shape used in POST and PUT request bodies, and returned inside the
296
+ * GET response envelope.
297
+ */
298
+ notification: NotificationTemplateGetResponse.Notification;
299
+
300
+ /**
301
+ * The template state. Always uppercase.
302
+ */
303
+ state: 'DRAFT' | 'PUBLISHED';
304
+
305
+ /**
306
+ * Epoch milliseconds of last update.
307
+ */
308
+ updated?: number;
309
+
310
+ /**
311
+ * User ID of the last updater.
312
+ */
313
+ updater?: string;
314
+ }
315
+
316
+ export namespace NotificationTemplateGetResponse {
317
+ /**
318
+ * Full document shape used in POST and PUT request bodies, and returned inside the
319
+ * GET response envelope.
320
+ */
321
+ export interface Notification extends NotificationsAPI.NotificationTemplatePayload {
322
+ /**
323
+ * The template ID.
324
+ */
325
+ id: string;
326
+ }
327
+ }
328
+
329
+ /**
330
+ * Response returned by POST and PUT operations.
331
+ */
332
+ export interface NotificationTemplateMutationResponse {
333
+ notification: NotificationTemplateMutationResponse.Notification;
334
+
335
+ /**
336
+ * The template state after the operation. Always uppercase.
337
+ */
338
+ state: 'DRAFT' | 'PUBLISHED';
339
+ }
340
+
341
+ export namespace NotificationTemplateMutationResponse {
342
+ export interface Notification {
343
+ /**
344
+ * The ID of the created or updated template.
345
+ */
346
+ id: string;
347
+ }
348
+ }
349
+
350
+ /**
351
+ * Full document shape used in POST and PUT request bodies, and returned inside the
352
+ * GET response envelope.
353
+ */
354
+ export interface NotificationTemplatePayload {
355
+ /**
356
+ * Brand reference, or null for no brand.
357
+ */
358
+ brand: NotificationTemplatePayload.Brand | null;
359
+
360
+ /**
361
+ * Elemental content definition.
362
+ */
363
+ content: Shared.ElementalContent;
364
+
365
+ /**
366
+ * Display name for the template.
367
+ */
368
+ name: string;
369
+
370
+ /**
371
+ * Routing strategy reference, or null for none.
372
+ */
373
+ routing: NotificationTemplatePayload.Routing | null;
374
+
375
+ /**
376
+ * Subscription topic reference, or null for none.
377
+ */
378
+ subscription: NotificationTemplatePayload.Subscription | null;
379
+
380
+ /**
381
+ * Tags for categorization. Send empty array for none.
382
+ */
383
+ tags: Array<string>;
384
+ }
385
+
386
+ export namespace NotificationTemplatePayload {
387
+ /**
388
+ * Brand reference, or null for no brand.
389
+ */
390
+ export interface Brand {
391
+ id: string;
392
+ }
393
+
394
+ /**
395
+ * Routing strategy reference, or null for none.
396
+ */
397
+ export interface Routing {
398
+ strategy_id: string;
399
+ }
400
+
401
+ /**
402
+ * Subscription topic reference, or null for none.
403
+ */
404
+ export interface Subscription {
405
+ topic_id: string;
406
+ }
407
+ }
408
+
409
+ /**
410
+ * Optional request body for publishing a notification template. Omit or send an
411
+ * empty object to publish the current draft.
412
+ */
413
+ export interface NotificationTemplatePublishRequest {
414
+ /**
415
+ * Historical version to publish (e.g. "v001"). Omit to publish the current draft.
416
+ */
417
+ version?: string;
418
+ }
419
+
420
+ /**
421
+ * V2 (CDS) template summary returned in list responses.
422
+ */
423
+ export interface NotificationTemplateSummary {
424
+ id: string;
425
+
426
+ /**
427
+ * Epoch milliseconds when the template was created.
428
+ */
429
+ created: number;
430
+
431
+ /**
432
+ * User ID of the creator.
433
+ */
434
+ creator: string;
435
+
436
+ name: string;
437
+
438
+ state: 'DRAFT' | 'PUBLISHED';
439
+
440
+ tags: Array<string>;
441
+
442
+ /**
443
+ * Epoch milliseconds of last update.
444
+ */
445
+ updated?: number;
446
+
447
+ /**
448
+ * User ID of the last updater.
449
+ */
450
+ updater?: string;
451
+ }
452
+
453
+ /**
454
+ * Request body for replacing a notification template. Same shape as create. All
455
+ * fields required (PUT = full replacement).
456
+ */
457
+ export interface NotificationTemplateUpdateRequest {
458
+ /**
459
+ * Full document shape used in POST and PUT request bodies, and returned inside the
460
+ * GET response envelope.
461
+ */
462
+ notification: NotificationTemplatePayload;
463
+
464
+ /**
465
+ * Template state after update. Case-insensitive input, normalized to uppercase in
466
+ * the response. Defaults to "DRAFT".
467
+ */
468
+ state?: 'DRAFT' | 'PUBLISHED';
469
+ }
470
+
471
+ export interface NotificationTemplateVersionListResponse {
472
+ paging: Shared.Paging;
473
+
474
+ versions: Array<VersionNode>;
475
+ }
476
+
477
+ /**
478
+ * A version entry for a notification template.
479
+ */
480
+ export interface VersionNode {
481
+ /**
482
+ * Epoch milliseconds when this version was created.
483
+ */
484
+ created: number;
485
+
486
+ /**
487
+ * User ID of the version creator.
488
+ */
489
+ creator: string;
490
+
491
+ /**
492
+ * Version identifier. One of "draft", "published:vNNN" (current published
493
+ * version), or "vNNN" (historical version).
494
+ */
495
+ version: string;
496
+
497
+ /**
498
+ * Whether the draft has unpublished changes. Only present on the draft version.
499
+ */
500
+ has_changes?: boolean;
501
+ }
502
+
114
503
  export interface NotificationListResponse {
115
504
  paging: Shared.Paging;
116
505
 
117
- results: Array<NotificationListResponse.Result>;
506
+ /**
507
+ * Notification templates in this workspace.
508
+ */
509
+ results: Array<NotificationListResponse.Notification | NotificationTemplateSummary>;
118
510
  }
119
511
 
120
512
  export namespace NotificationListResponse {
121
- export interface Result {
513
+ export interface Notification {
122
514
  id: string;
123
515
 
124
516
  created_at: number;
@@ -136,12 +528,12 @@ export namespace NotificationListResponse {
136
528
 
137
529
  updated_at: number;
138
530
 
139
- tags?: Result.Tags | null;
531
+ tags?: Notification.Tags | null;
140
532
 
141
533
  title?: string | null;
142
534
  }
143
535
 
144
- export namespace Result {
536
+ export namespace Notification {
145
537
  export interface Tags {
146
538
  data: Array<Tags.Data>;
147
539
  }
@@ -156,15 +548,78 @@ export namespace NotificationListResponse {
156
548
  }
157
549
  }
158
550
 
551
+ export interface NotificationCreateParams {
552
+ /**
553
+ * Full document shape used in POST and PUT request bodies, and returned inside the
554
+ * GET response envelope.
555
+ */
556
+ notification: NotificationTemplatePayload;
557
+
558
+ /**
559
+ * Template state after creation. Case-insensitive input, normalized to uppercase
560
+ * in the response. Defaults to "DRAFT".
561
+ */
562
+ state?: 'DRAFT' | 'PUBLISHED';
563
+ }
564
+
565
+ export interface NotificationRetrieveParams {
566
+ /**
567
+ * Version to retrieve. One of "draft", "published", or a version string like
568
+ * "v001". Defaults to "published".
569
+ */
570
+ version?: string;
571
+ }
572
+
159
573
  export interface NotificationListParams {
574
+ /**
575
+ * Opaque pagination cursor from a previous response. Omit for the first page.
576
+ */
160
577
  cursor?: string | null;
161
578
 
162
579
  /**
163
- * Retrieve the notes from the Notification template settings.
580
+ * Filter to templates linked to this event map ID.
581
+ */
582
+ event_id?: string;
583
+
584
+ /**
585
+ * Include template notes in the response. Only applies to legacy templates.
164
586
  */
165
587
  notes?: boolean | null;
166
588
  }
167
589
 
590
+ export interface NotificationListVersionsParams {
591
+ /**
592
+ * Opaque pagination cursor from a previous response. Omit for the first page.
593
+ */
594
+ cursor?: string;
595
+
596
+ /**
597
+ * Maximum number of versions to return per page. Default 10, max 10.
598
+ */
599
+ limit?: number;
600
+ }
601
+
602
+ export interface NotificationPublishParams {
603
+ /**
604
+ * Historical version to publish (e.g. "v001"). Omit to publish the current draft.
605
+ */
606
+ version?: string;
607
+ }
608
+
609
+ export interface NotificationReplaceParams {
610
+ /**
611
+ * Full document shape used in POST and PUT request bodies, and returned inside the
612
+ * GET response envelope.
613
+ */
614
+ notification: NotificationTemplatePayload;
615
+
616
+ /**
617
+ * Template state after update. Case-insensitive input, normalized to uppercase in
618
+ * the response. Defaults to "DRAFT".
619
+ */
620
+ state?: 'DRAFT' | 'PUBLISHED';
621
+ }
622
+
168
623
  Notifications.Draft = Draft;
169
624
  Notifications.Checks = Checks;
170
625
 
@@ -173,8 +628,22 @@ export declare namespace Notifications {
173
628
  type BaseCheck as BaseCheck,
174
629
  type Check as Check,
175
630
  type NotificationGetContent as NotificationGetContent,
631
+ type NotificationTemplateCreateRequest as NotificationTemplateCreateRequest,
632
+ type NotificationTemplateGetResponse as NotificationTemplateGetResponse,
633
+ type NotificationTemplateMutationResponse as NotificationTemplateMutationResponse,
634
+ type NotificationTemplatePayload as NotificationTemplatePayload,
635
+ type NotificationTemplatePublishRequest as NotificationTemplatePublishRequest,
636
+ type NotificationTemplateSummary as NotificationTemplateSummary,
637
+ type NotificationTemplateUpdateRequest as NotificationTemplateUpdateRequest,
638
+ type NotificationTemplateVersionListResponse as NotificationTemplateVersionListResponse,
639
+ type VersionNode as VersionNode,
176
640
  type NotificationListResponse as NotificationListResponse,
641
+ type NotificationCreateParams as NotificationCreateParams,
642
+ type NotificationRetrieveParams as NotificationRetrieveParams,
177
643
  type NotificationListParams as NotificationListParams,
644
+ type NotificationListVersionsParams as NotificationListVersionsParams,
645
+ type NotificationPublishParams as NotificationPublishParams,
646
+ type NotificationReplaceParams as NotificationReplaceParams,
178
647
  };
179
648
 
180
649
  export { Draft as Draft };
@@ -0,0 +1,53 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import * as ProvidersAPI from './providers';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+
9
+ export class Catalog extends APIResource {
10
+ /**
11
+ * Returns the catalog of available provider types with their display names,
12
+ * descriptions, and configuration schema fields (snake_case, with `type` and
13
+ * `required`). Providers with no configurable schema return only `provider`,
14
+ * `name`, and `description`.
15
+ */
16
+ list(
17
+ query: CatalogListParams | null | undefined = {},
18
+ options?: RequestOptions,
19
+ ): APIPromise<CatalogListResponse> {
20
+ return this._client.get('/providers/catalog', { query, ...options });
21
+ }
22
+ }
23
+
24
+ /**
25
+ * Paginated list of available provider types with their configuration schemas.
26
+ */
27
+ export interface CatalogListResponse {
28
+ paging: Shared.Paging;
29
+
30
+ results: Array<ProvidersAPI.ProvidersCatalogEntry>;
31
+ }
32
+
33
+ export interface CatalogListParams {
34
+ /**
35
+ * Exact match (case-insensitive) against the provider channel taxonomy (e.g.
36
+ * `email`, `sms`, `push`).
37
+ */
38
+ channel?: string;
39
+
40
+ /**
41
+ * Comma-separated provider keys to filter by (e.g. `sendgrid,twilio`).
42
+ */
43
+ keys?: string;
44
+
45
+ /**
46
+ * Case-insensitive substring match against the provider display name.
47
+ */
48
+ name?: string;
49
+ }
50
+
51
+ export declare namespace Catalog {
52
+ export { type CatalogListResponse as CatalogListResponse, type CatalogListParams as CatalogListParams };
53
+ }
@@ -0,0 +1,12 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Catalog, type CatalogListResponse, type CatalogListParams } from './catalog';
4
+ export {
5
+ Providers,
6
+ type Provider,
7
+ type ProvidersCatalogEntry,
8
+ type ProviderListResponse,
9
+ type ProviderCreateParams,
10
+ type ProviderUpdateParams,
11
+ type ProviderListParams,
12
+ } from './providers';