@trycourier/courier 7.8.0 → 7.10.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 (127) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/client.d.mts +16 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +16 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +3 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +3 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +5 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +2 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/notifications/checks.d.mts +35 -0
  20. package/resources/notifications/checks.d.mts.map +1 -1
  21. package/resources/notifications/checks.d.ts +35 -0
  22. package/resources/notifications/checks.d.ts.map +1 -1
  23. package/resources/notifications/checks.js +35 -0
  24. package/resources/notifications/checks.js.map +1 -1
  25. package/resources/notifications/checks.mjs +35 -0
  26. package/resources/notifications/checks.mjs.map +1 -1
  27. package/resources/notifications/index.d.mts +1 -2
  28. package/resources/notifications/index.d.mts.map +1 -1
  29. package/resources/notifications/index.d.ts +1 -2
  30. package/resources/notifications/index.d.ts.map +1 -1
  31. package/resources/notifications/index.js +1 -3
  32. package/resources/notifications/index.js.map +1 -1
  33. package/resources/notifications/index.mjs +0 -1
  34. package/resources/notifications/index.mjs.map +1 -1
  35. package/resources/notifications/notifications.d.mts +667 -11
  36. package/resources/notifications/notifications.d.mts.map +1 -1
  37. package/resources/notifications/notifications.d.ts +667 -11
  38. package/resources/notifications/notifications.d.ts.map +1 -1
  39. package/resources/notifications/notifications.js +191 -6
  40. package/resources/notifications/notifications.js.map +1 -1
  41. package/resources/notifications/notifications.mjs +191 -6
  42. package/resources/notifications/notifications.mjs.map +1 -1
  43. package/resources/providers/catalog.d.mts +40 -0
  44. package/resources/providers/catalog.d.mts.map +1 -0
  45. package/resources/providers/catalog.d.ts +40 -0
  46. package/resources/providers/catalog.d.ts.map +1 -0
  47. package/resources/providers/catalog.js +18 -0
  48. package/resources/providers/catalog.js.map +1 -0
  49. package/resources/providers/catalog.mjs +14 -0
  50. package/resources/providers/catalog.mjs.map +1 -0
  51. package/resources/providers/index.d.mts +3 -0
  52. package/resources/providers/index.d.mts.map +1 -0
  53. package/resources/providers/index.d.ts +3 -0
  54. package/resources/providers/index.d.ts.map +1 -0
  55. package/resources/providers/index.js +9 -0
  56. package/resources/providers/index.js.map +1 -0
  57. package/resources/providers/index.mjs +4 -0
  58. package/resources/providers/index.mjs.map +1 -0
  59. package/resources/providers/providers.d.mts +182 -0
  60. package/resources/providers/providers.d.mts.map +1 -0
  61. package/resources/providers/providers.d.ts +182 -0
  62. package/resources/providers/providers.d.ts.map +1 -0
  63. package/resources/providers/providers.js +57 -0
  64. package/resources/providers/providers.js.map +1 -0
  65. package/resources/providers/providers.mjs +52 -0
  66. package/resources/providers/providers.mjs.map +1 -0
  67. package/resources/providers.d.mts +2 -0
  68. package/resources/providers.d.mts.map +1 -0
  69. package/resources/providers.d.ts +2 -0
  70. package/resources/providers.d.ts.map +1 -0
  71. package/resources/providers.js +6 -0
  72. package/resources/providers.js.map +1 -0
  73. package/resources/providers.mjs +3 -0
  74. package/resources/providers.mjs.map +1 -0
  75. package/resources/routing-strategies.d.mts +333 -0
  76. package/resources/routing-strategies.d.mts.map +1 -0
  77. package/resources/routing-strategies.d.ts +333 -0
  78. package/resources/routing-strategies.d.ts.map +1 -0
  79. package/resources/routing-strategies.js +107 -0
  80. package/resources/routing-strategies.js.map +1 -0
  81. package/resources/routing-strategies.mjs +103 -0
  82. package/resources/routing-strategies.mjs.map +1 -0
  83. package/resources/send.d.mts +2 -60
  84. package/resources/send.d.mts.map +1 -1
  85. package/resources/send.d.ts +2 -60
  86. package/resources/send.d.ts.map +1 -1
  87. package/resources/shared.d.mts +60 -1
  88. package/resources/shared.d.mts.map +1 -1
  89. package/resources/shared.d.ts +60 -1
  90. package/resources/shared.d.ts.map +1 -1
  91. package/resources/tenants/tenants.d.mts +2 -62
  92. package/resources/tenants/tenants.d.mts.map +1 -1
  93. package/resources/tenants/tenants.d.ts +2 -62
  94. package/resources/tenants/tenants.d.ts.map +1 -1
  95. package/resources/tenants/tenants.js.map +1 -1
  96. package/resources/tenants/tenants.mjs.map +1 -1
  97. package/src/client.ts +112 -0
  98. package/src/resources/index.ts +49 -0
  99. package/src/resources/notifications/checks.ts +35 -0
  100. package/src/resources/notifications/index.ts +26 -1
  101. package/src/resources/notifications/notifications.ts +858 -13
  102. package/src/resources/providers/catalog.ts +53 -0
  103. package/src/resources/providers/index.ts +12 -0
  104. package/src/resources/providers/providers.ts +240 -0
  105. package/src/resources/providers.ts +3 -0
  106. package/src/resources/routing-strategies.ts +436 -0
  107. package/src/resources/send.ts +2 -67
  108. package/src/resources/shared.ts +71 -1
  109. package/src/resources/tenants/tenants.ts +2 -69
  110. package/src/version.ts +1 -1
  111. package/version.d.mts +1 -1
  112. package/version.d.mts.map +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.d.ts.map +1 -1
  115. package/version.js +1 -1
  116. package/version.js.map +1 -1
  117. package/version.mjs +1 -1
  118. package/version.mjs.map +1 -1
  119. package/resources/notifications/draft.d.mts +0 -8
  120. package/resources/notifications/draft.d.mts.map +0 -1
  121. package/resources/notifications/draft.d.ts +0 -8
  122. package/resources/notifications/draft.d.ts.map +0 -1
  123. package/resources/notifications/draft.js +0 -13
  124. package/resources/notifications/draft.js.map +0 -1
  125. package/resources/notifications/draft.mjs +0 -9
  126. package/resources/notifications/draft.mjs.map +0 -1
  127. package/src/resources/notifications/draft.ts +0 -13
@@ -90,9 +90,35 @@ export {
90
90
  Notifications,
91
91
  type BaseCheck,
92
92
  type Check,
93
+ type ElementWithChecksums,
94
+ type NotificationContentGetResponse,
95
+ type NotificationContentMutationResponse,
96
+ type NotificationContentPutRequest,
97
+ type NotificationElementPutRequest,
93
98
  type NotificationGetContent,
99
+ type NotificationLocalePutRequest,
100
+ type NotificationTemplateCreateRequest,
101
+ type NotificationTemplateGetResponse,
102
+ type NotificationTemplateMutationResponse,
103
+ type NotificationTemplatePayload,
104
+ type NotificationTemplatePublishRequest,
105
+ type NotificationTemplateState,
106
+ type NotificationTemplateSummary,
107
+ type NotificationTemplateUpdateRequest,
108
+ type NotificationTemplateVersionListResponse,
109
+ type VersionNode,
94
110
  type NotificationListResponse,
111
+ type NotificationRetrieveContentResponse,
112
+ type NotificationCreateParams,
113
+ type NotificationRetrieveParams,
95
114
  type NotificationListParams,
115
+ type NotificationListVersionsParams,
116
+ type NotificationPublishParams,
117
+ type NotificationPutContentParams,
118
+ type NotificationPutElementParams,
119
+ type NotificationPutLocaleParams,
120
+ type NotificationReplaceParams,
121
+ type NotificationRetrieveContentParams,
96
122
  } from './notifications/notifications';
97
123
  export {
98
124
  Profiles,
@@ -104,7 +130,30 @@ export {
104
130
  type ProfileUpdateParams,
105
131
  type ProfileReplaceParams,
106
132
  } from './profiles/profiles';
133
+ export {
134
+ Providers,
135
+ type Provider,
136
+ type ProvidersCatalogEntry,
137
+ type ProviderListResponse,
138
+ type ProviderCreateParams,
139
+ type ProviderUpdateParams,
140
+ type ProviderListParams,
141
+ } from './providers/providers';
107
142
  export { Requests } from './requests';
143
+ export {
144
+ RoutingStrategies,
145
+ type AssociatedNotificationListResponse,
146
+ type RoutingStrategyCreateRequest,
147
+ type RoutingStrategyGetResponse,
148
+ type RoutingStrategyListResponse,
149
+ type RoutingStrategyMutationResponse,
150
+ type RoutingStrategyReplaceRequest,
151
+ type RoutingStrategySummary,
152
+ type RoutingStrategyCreateParams,
153
+ type RoutingStrategyListParams,
154
+ type RoutingStrategyListNotificationsParams,
155
+ type RoutingStrategyReplaceParams,
156
+ } from './routing-strategies';
108
157
  export { Send, type SendMessageResponse, type SendMessageParams } from './send';
109
158
  export {
110
159
  Tenants,
@@ -8,6 +8,24 @@ import { RequestOptions } from '../../internal/request-options';
8
8
  import { path } from '../../internal/utils/path';
9
9
 
10
10
  export class Checks extends APIResource {
11
+ /**
12
+ * @example
13
+ * ```ts
14
+ * const check = await client.notifications.checks.update(
15
+ * 'submissionId',
16
+ * {
17
+ * id: 'id',
18
+ * checks: [
19
+ * {
20
+ * id: 'id',
21
+ * status: 'RESOLVED',
22
+ * type: 'custom',
23
+ * },
24
+ * ],
25
+ * },
26
+ * );
27
+ * ```
28
+ */
11
29
  update(
12
30
  submissionID: string,
13
31
  params: CheckUpdateParams,
@@ -17,6 +35,15 @@ export class Checks extends APIResource {
17
35
  return this._client.put(path`/notifications/${id}/${submissionID}/checks`, { body, ...options });
18
36
  }
19
37
 
38
+ /**
39
+ * @example
40
+ * ```ts
41
+ * const checks = await client.notifications.checks.list(
42
+ * 'submissionId',
43
+ * { id: 'id' },
44
+ * );
45
+ * ```
46
+ */
20
47
  list(
21
48
  submissionID: string,
22
49
  params: CheckListParams,
@@ -26,6 +53,14 @@ export class Checks extends APIResource {
26
53
  return this._client.get(path`/notifications/${id}/${submissionID}/checks`, options);
27
54
  }
28
55
 
56
+ /**
57
+ * @example
58
+ * ```ts
59
+ * await client.notifications.checks.delete('submissionId', {
60
+ * id: 'id',
61
+ * });
62
+ * ```
63
+ */
29
64
  delete(submissionID: string, params: CheckDeleteParams, options?: RequestOptions): APIPromise<void> {
30
65
  const { id } = params;
31
66
  return this._client.delete(path`/notifications/${id}/${submissionID}/checks`, {
@@ -8,12 +8,37 @@ export {
8
8
  type CheckListParams,
9
9
  type CheckDeleteParams,
10
10
  } from './checks';
11
- export { Draft } from './draft';
12
11
  export {
13
12
  Notifications,
14
13
  type BaseCheck,
15
14
  type Check,
15
+ type ElementWithChecksums,
16
+ type NotificationContentGetResponse,
17
+ type NotificationContentMutationResponse,
18
+ type NotificationContentPutRequest,
19
+ type NotificationElementPutRequest,
16
20
  type NotificationGetContent,
21
+ type NotificationLocalePutRequest,
22
+ type NotificationTemplateCreateRequest,
23
+ type NotificationTemplateGetResponse,
24
+ type NotificationTemplateMutationResponse,
25
+ type NotificationTemplatePayload,
26
+ type NotificationTemplatePublishRequest,
27
+ type NotificationTemplateState,
28
+ type NotificationTemplateSummary,
29
+ type NotificationTemplateUpdateRequest,
30
+ type NotificationTemplateVersionListResponse,
31
+ type VersionNode,
17
32
  type NotificationListResponse,
33
+ type NotificationRetrieveContentResponse,
34
+ type NotificationCreateParams,
35
+ type NotificationRetrieveParams,
18
36
  type NotificationListParams,
37
+ type NotificationListVersionsParams,
38
+ type NotificationPublishParams,
39
+ type NotificationPutContentParams,
40
+ type NotificationPutElementParams,
41
+ type NotificationPutLocaleParams,
42
+ type NotificationReplaceParams,
43
+ type NotificationRetrieveContentParams,
19
44
  } from './notifications';