@trycourier/courier 6.7.0-alpha4 → 7.0.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 (278) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +14 -8
  3. package/client.d.mts +32 -15
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +32 -15
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +2 -2
  11. package/resources/audiences.d.mts +4 -7
  12. package/resources/audiences.d.mts.map +1 -1
  13. package/resources/audiences.d.ts +4 -7
  14. package/resources/audiences.d.ts.map +1 -1
  15. package/resources/audiences.js.map +1 -1
  16. package/resources/audiences.mjs.map +1 -1
  17. package/resources/audit-events.d.mts +2 -2
  18. package/resources/audit-events.d.mts.map +1 -1
  19. package/resources/audit-events.d.ts +2 -2
  20. package/resources/audit-events.d.ts.map +1 -1
  21. package/resources/automations/automations.d.mts +6 -2
  22. package/resources/automations/automations.d.mts.map +1 -1
  23. package/resources/automations/automations.d.ts +6 -2
  24. package/resources/automations/automations.d.ts.map +1 -1
  25. package/resources/automations/automations.js.map +1 -1
  26. package/resources/automations/automations.mjs +1 -1
  27. package/resources/automations/automations.mjs.map +1 -1
  28. package/resources/automations/index.d.mts +2 -2
  29. package/resources/automations/index.d.mts.map +1 -1
  30. package/resources/automations/index.d.ts +2 -2
  31. package/resources/automations/index.d.ts.map +1 -1
  32. package/resources/automations/index.js.map +1 -1
  33. package/resources/automations/index.mjs +1 -1
  34. package/resources/automations/index.mjs.map +1 -1
  35. package/resources/automations/invoke.d.mts +4 -6
  36. package/resources/automations/invoke.d.mts.map +1 -1
  37. package/resources/automations/invoke.d.ts +4 -6
  38. package/resources/automations/invoke.d.ts.map +1 -1
  39. package/resources/automations/invoke.js.map +1 -1
  40. package/resources/automations/invoke.mjs.map +1 -1
  41. package/resources/brands.d.mts +2 -2
  42. package/resources/brands.d.mts.map +1 -1
  43. package/resources/brands.d.ts +2 -2
  44. package/resources/brands.d.ts.map +1 -1
  45. package/resources/bulk.d.mts +3 -6
  46. package/resources/bulk.d.mts.map +1 -1
  47. package/resources/bulk.d.ts +3 -6
  48. package/resources/bulk.d.ts.map +1 -1
  49. package/resources/bulk.js.map +1 -1
  50. package/resources/bulk.mjs.map +1 -1
  51. package/resources/index.d.mts +7 -7
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +7 -7
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js.map +1 -1
  56. package/resources/index.mjs +1 -1
  57. package/resources/index.mjs.map +1 -1
  58. package/resources/lists/index.d.mts +2 -2
  59. package/resources/lists/index.d.mts.map +1 -1
  60. package/resources/lists/index.d.ts +2 -2
  61. package/resources/lists/index.d.ts.map +1 -1
  62. package/resources/lists/index.js.map +1 -1
  63. package/resources/lists/index.mjs.map +1 -1
  64. package/resources/lists/lists.d.mts +13 -9
  65. package/resources/lists/lists.d.mts.map +1 -1
  66. package/resources/lists/lists.d.ts +13 -9
  67. package/resources/lists/lists.d.ts.map +1 -1
  68. package/resources/lists/lists.js.map +1 -1
  69. package/resources/lists/lists.mjs.map +1 -1
  70. package/resources/lists/subscriptions.d.mts +7 -26
  71. package/resources/lists/subscriptions.d.mts.map +1 -1
  72. package/resources/lists/subscriptions.d.ts +7 -26
  73. package/resources/lists/subscriptions.d.ts.map +1 -1
  74. package/resources/lists/subscriptions.js.map +1 -1
  75. package/resources/lists/subscriptions.mjs.map +1 -1
  76. package/resources/messages.d.mts +2 -2
  77. package/resources/messages.d.mts.map +1 -1
  78. package/resources/messages.d.ts +2 -2
  79. package/resources/messages.d.ts.map +1 -1
  80. package/resources/notifications/checks.d.mts +5 -12
  81. package/resources/notifications/checks.d.mts.map +1 -1
  82. package/resources/notifications/checks.d.ts +5 -12
  83. package/resources/notifications/checks.d.ts.map +1 -1
  84. package/resources/notifications/checks.js.map +1 -1
  85. package/resources/notifications/checks.mjs.map +1 -1
  86. package/resources/notifications/index.d.mts +2 -2
  87. package/resources/notifications/index.d.mts.map +1 -1
  88. package/resources/notifications/index.d.ts +2 -2
  89. package/resources/notifications/index.d.ts.map +1 -1
  90. package/resources/notifications/index.js.map +1 -1
  91. package/resources/notifications/index.mjs.map +1 -1
  92. package/resources/notifications/notifications.d.mts +12 -5
  93. package/resources/notifications/notifications.d.mts.map +1 -1
  94. package/resources/notifications/notifications.d.ts +12 -5
  95. package/resources/notifications/notifications.d.ts.map +1 -1
  96. package/resources/notifications/notifications.js.map +1 -1
  97. package/resources/notifications/notifications.mjs.map +1 -1
  98. package/resources/profiles/index.d.mts +1 -1
  99. package/resources/profiles/index.d.mts.map +1 -1
  100. package/resources/profiles/index.d.ts +1 -1
  101. package/resources/profiles/index.d.ts.map +1 -1
  102. package/resources/profiles/index.js.map +1 -1
  103. package/resources/profiles/index.mjs.map +1 -1
  104. package/resources/profiles/lists.d.mts +5 -11
  105. package/resources/profiles/lists.d.mts.map +1 -1
  106. package/resources/profiles/lists.d.ts +5 -11
  107. package/resources/profiles/lists.d.ts.map +1 -1
  108. package/resources/profiles/profiles.d.mts +7 -3
  109. package/resources/profiles/profiles.d.mts.map +1 -1
  110. package/resources/profiles/profiles.d.ts +7 -3
  111. package/resources/profiles/profiles.d.ts.map +1 -1
  112. package/resources/profiles/profiles.js.map +1 -1
  113. package/resources/profiles/profiles.mjs.map +1 -1
  114. package/resources/send.d.mts +9 -139
  115. package/resources/send.d.mts.map +1 -1
  116. package/resources/send.d.ts +9 -139
  117. package/resources/send.d.ts.map +1 -1
  118. package/resources/send.js +2 -2
  119. package/resources/send.js.map +1 -1
  120. package/resources/send.mjs +2 -2
  121. package/resources/send.mjs.map +1 -1
  122. package/resources/shared.d.mts +180 -13
  123. package/resources/shared.d.mts.map +1 -1
  124. package/resources/shared.d.ts +180 -13
  125. package/resources/shared.d.ts.map +1 -1
  126. package/resources/tenants/index.d.mts +3 -2
  127. package/resources/tenants/index.d.mts.map +1 -1
  128. package/resources/tenants/index.d.ts +3 -2
  129. package/resources/tenants/index.d.ts.map +1 -1
  130. package/resources/tenants/index.js +3 -1
  131. package/resources/tenants/index.js.map +1 -1
  132. package/resources/tenants/index.mjs +1 -0
  133. package/resources/tenants/index.mjs.map +1 -1
  134. package/resources/tenants/preferences/index.d.mts +3 -0
  135. package/resources/tenants/preferences/index.d.mts.map +1 -0
  136. package/resources/tenants/preferences/index.d.ts +3 -0
  137. package/resources/tenants/preferences/index.d.ts.map +1 -0
  138. package/resources/tenants/{default-preferences → preferences}/index.js +3 -3
  139. package/resources/tenants/preferences/index.js.map +1 -0
  140. package/resources/tenants/preferences/index.mjs +4 -0
  141. package/resources/tenants/preferences/index.mjs.map +1 -0
  142. package/resources/tenants/{default-preferences → preferences}/items.d.mts +12 -29
  143. package/resources/tenants/preferences/items.d.mts.map +1 -0
  144. package/resources/tenants/{default-preferences → preferences}/items.d.ts +12 -29
  145. package/resources/tenants/preferences/items.d.ts.map +1 -0
  146. package/resources/tenants/{default-preferences → preferences}/items.js +9 -13
  147. package/resources/tenants/preferences/items.js.map +1 -0
  148. package/resources/tenants/{default-preferences → preferences}/items.mjs +9 -13
  149. package/resources/tenants/preferences/items.mjs.map +1 -0
  150. package/resources/tenants/preferences/preferences.d.mts +10 -0
  151. package/resources/tenants/preferences/preferences.d.mts.map +1 -0
  152. package/resources/tenants/preferences/preferences.d.ts +10 -0
  153. package/resources/tenants/preferences/preferences.d.ts.map +1 -0
  154. package/resources/tenants/{default-preferences/default-preferences.js → preferences/preferences.js} +5 -5
  155. package/resources/tenants/preferences/preferences.js.map +1 -0
  156. package/resources/tenants/{default-preferences/default-preferences.mjs → preferences/preferences.mjs} +4 -4
  157. package/resources/tenants/preferences/preferences.mjs.map +1 -0
  158. package/resources/tenants/preferences.d.mts +2 -0
  159. package/resources/tenants/preferences.d.mts.map +1 -0
  160. package/resources/tenants/preferences.d.ts +2 -0
  161. package/resources/tenants/preferences.d.ts.map +1 -0
  162. package/resources/tenants/{default-preferences.js → preferences.js} +2 -2
  163. package/resources/tenants/preferences.js.map +1 -0
  164. package/resources/tenants/preferences.mjs +3 -0
  165. package/resources/tenants/preferences.mjs.map +1 -0
  166. package/resources/tenants/templates.d.mts +4 -35
  167. package/resources/tenants/templates.d.mts.map +1 -1
  168. package/resources/tenants/templates.d.ts +4 -35
  169. package/resources/tenants/templates.d.ts.map +1 -1
  170. package/resources/tenants/templates.js.map +1 -1
  171. package/resources/tenants/templates.mjs.map +1 -1
  172. package/resources/tenants/tenants.d.mts +64 -9
  173. package/resources/tenants/tenants.d.mts.map +1 -1
  174. package/resources/tenants/tenants.d.ts +64 -9
  175. package/resources/tenants/tenants.d.ts.map +1 -1
  176. package/resources/tenants/tenants.js +4 -2
  177. package/resources/tenants/tenants.js.map +1 -1
  178. package/resources/tenants/tenants.mjs +5 -3
  179. package/resources/tenants/tenants.mjs.map +1 -1
  180. package/resources/users/index.d.mts +2 -2
  181. package/resources/users/index.d.mts.map +1 -1
  182. package/resources/users/index.d.ts +2 -2
  183. package/resources/users/index.d.ts.map +1 -1
  184. package/resources/users/index.js.map +1 -1
  185. package/resources/users/index.mjs.map +1 -1
  186. package/resources/users/preferences.d.mts +8 -11
  187. package/resources/users/preferences.d.mts.map +1 -1
  188. package/resources/users/preferences.d.ts +8 -11
  189. package/resources/users/preferences.d.ts.map +1 -1
  190. package/resources/users/preferences.js.map +1 -1
  191. package/resources/users/preferences.mjs.map +1 -1
  192. package/resources/users/tenants.d.mts +4 -21
  193. package/resources/users/tenants.d.mts.map +1 -1
  194. package/resources/users/tenants.d.ts +4 -21
  195. package/resources/users/tenants.d.ts.map +1 -1
  196. package/resources/users/tenants.js.map +1 -1
  197. package/resources/users/tenants.mjs.map +1 -1
  198. package/resources/users/tokens.d.mts +18 -17
  199. package/resources/users/tokens.d.mts.map +1 -1
  200. package/resources/users/tokens.d.ts +18 -17
  201. package/resources/users/tokens.d.ts.map +1 -1
  202. package/resources/users/tokens.js +1 -0
  203. package/resources/users/tokens.js.map +1 -1
  204. package/resources/users/tokens.mjs +1 -0
  205. package/resources/users/tokens.mjs.map +1 -1
  206. package/resources/users/users.d.mts +4 -4
  207. package/resources/users/users.d.mts.map +1 -1
  208. package/resources/users/users.d.ts +4 -4
  209. package/resources/users/users.d.ts.map +1 -1
  210. package/resources/users/users.js.map +1 -1
  211. package/resources/users/users.mjs.map +1 -1
  212. package/src/client.ts +37 -22
  213. package/src/resources/audiences.ts +3 -9
  214. package/src/resources/audit-events.ts +2 -2
  215. package/src/resources/automations/automations.ts +7 -7
  216. package/src/resources/automations/index.ts +2 -7
  217. package/src/resources/automations/invoke.ts +6 -7
  218. package/src/resources/brands.ts +2 -2
  219. package/src/resources/bulk.ts +3 -6
  220. package/src/resources/index.ts +10 -13
  221. package/src/resources/lists/index.ts +2 -4
  222. package/src/resources/lists/lists.ts +14 -13
  223. package/src/resources/lists/subscriptions.ts +6 -31
  224. package/src/resources/messages.ts +2 -2
  225. package/src/resources/notifications/checks.ts +4 -17
  226. package/src/resources/notifications/index.ts +2 -2
  227. package/src/resources/notifications/notifications.ts +15 -6
  228. package/src/resources/profiles/index.ts +1 -0
  229. package/src/resources/profiles/lists.ts +5 -13
  230. package/src/resources/profiles/profiles.ts +9 -2
  231. package/src/resources/send.ts +9 -175
  232. package/src/resources/shared.ts +215 -11
  233. package/src/resources/tenants/index.ts +4 -2
  234. package/src/resources/tenants/preferences/index.ts +4 -0
  235. package/src/resources/tenants/{default-preferences → preferences}/items.ts +12 -38
  236. package/src/resources/tenants/{default-preferences/default-preferences.ts → preferences/preferences.ts} +4 -12
  237. package/src/resources/tenants/{default-preferences.ts → preferences.ts} +1 -1
  238. package/src/resources/tenants/templates.ts +3 -44
  239. package/src/resources/tenants/tenants.ts +77 -18
  240. package/src/resources/users/index.ts +0 -2
  241. package/src/resources/users/preferences.ts +7 -12
  242. package/src/resources/users/tenants.ts +3 -23
  243. package/src/resources/users/tokens.ts +19 -18
  244. package/src/resources/users/users.ts +0 -4
  245. package/src/version.ts +1 -1
  246. package/version.d.mts +1 -1
  247. package/version.d.mts.map +1 -1
  248. package/version.d.ts +1 -1
  249. package/version.d.ts.map +1 -1
  250. package/version.js +1 -1
  251. package/version.js.map +1 -1
  252. package/version.mjs +1 -1
  253. package/version.mjs.map +1 -1
  254. package/resources/tenants/default-preferences/default-preferences.d.mts +0 -10
  255. package/resources/tenants/default-preferences/default-preferences.d.mts.map +0 -1
  256. package/resources/tenants/default-preferences/default-preferences.d.ts +0 -10
  257. package/resources/tenants/default-preferences/default-preferences.d.ts.map +0 -1
  258. package/resources/tenants/default-preferences/default-preferences.js.map +0 -1
  259. package/resources/tenants/default-preferences/default-preferences.mjs.map +0 -1
  260. package/resources/tenants/default-preferences/index.d.mts +0 -3
  261. package/resources/tenants/default-preferences/index.d.mts.map +0 -1
  262. package/resources/tenants/default-preferences/index.d.ts +0 -3
  263. package/resources/tenants/default-preferences/index.d.ts.map +0 -1
  264. package/resources/tenants/default-preferences/index.js.map +0 -1
  265. package/resources/tenants/default-preferences/index.mjs +0 -4
  266. package/resources/tenants/default-preferences/index.mjs.map +0 -1
  267. package/resources/tenants/default-preferences/items.d.mts.map +0 -1
  268. package/resources/tenants/default-preferences/items.d.ts.map +0 -1
  269. package/resources/tenants/default-preferences/items.js.map +0 -1
  270. package/resources/tenants/default-preferences/items.mjs.map +0 -1
  271. package/resources/tenants/default-preferences.d.mts +0 -2
  272. package/resources/tenants/default-preferences.d.mts.map +0 -1
  273. package/resources/tenants/default-preferences.d.ts +0 -2
  274. package/resources/tenants/default-preferences.d.ts.map +0 -1
  275. package/resources/tenants/default-preferences.js.map +0 -1
  276. package/resources/tenants/default-preferences.mjs +0 -3
  277. package/resources/tenants/default-preferences.mjs.map +0 -1
  278. package/src/resources/tenants/default-preferences/index.ts +0 -10
@@ -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 Shared from './shared';
4
5
  import { APIPromise } from '../core/api-promise';
5
6
  import { buildHeaders } from '../internal/headers';
6
7
  import { RequestOptions } from '../internal/request-options';
@@ -149,12 +150,6 @@ export interface FilterConfig {
149
150
  value: string;
150
151
  }
151
152
 
152
- export interface Paging {
153
- more: boolean;
154
-
155
- cursor?: string | null;
156
- }
157
-
158
153
  export interface AudienceUpdateResponse {
159
154
  audience: Audience;
160
155
  }
@@ -162,13 +157,13 @@ export interface AudienceUpdateResponse {
162
157
  export interface AudienceListResponse {
163
158
  items: Array<Audience>;
164
159
 
165
- paging: Paging;
160
+ paging: Shared.Paging;
166
161
  }
167
162
 
168
163
  export interface AudienceListMembersResponse {
169
164
  items: Array<AudienceListMembersResponse.Item>;
170
165
 
171
- paging: Paging;
166
+ paging: Shared.Paging;
172
167
  }
173
168
 
174
169
  export namespace AudienceListMembersResponse {
@@ -221,7 +216,6 @@ export declare namespace Audiences {
221
216
  type Audience as Audience,
222
217
  type Filter as Filter,
223
218
  type FilterConfig as FilterConfig,
224
- type Paging as Paging,
225
219
  type AudienceUpdateResponse as AudienceUpdateResponse,
226
220
  type AudienceListResponse as AudienceListResponse,
227
221
  type AudienceListMembersResponse as AudienceListMembersResponse,
@@ -1,7 +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 AudiencesAPI from './audiences';
4
+ import * as Shared from './shared';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
@@ -48,7 +48,7 @@ export namespace AuditEvent {
48
48
  }
49
49
 
50
50
  export interface AuditEventListResponse {
51
- paging: AudiencesAPI.Paging;
51
+ paging: Shared.Paging;
52
52
 
53
53
  results: Array<AuditEvent>;
54
54
  }
@@ -2,23 +2,23 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as InvokeAPI from './invoke';
5
- import {
6
- AutomationInvokeResponse,
7
- Invoke,
8
- InvokeInvokeAdHocParams,
9
- InvokeInvokeByTemplateParams,
10
- } from './invoke';
5
+ import { Invoke, InvokeInvokeAdHocParams, InvokeInvokeByTemplateParams } from './invoke';
11
6
 
12
7
  export class Automations extends APIResource {
13
8
  invoke: InvokeAPI.Invoke = new InvokeAPI.Invoke(this._client);
14
9
  }
15
10
 
11
+ export interface AutomationInvokeResponse {
12
+ runId: string;
13
+ }
14
+
16
15
  Automations.Invoke = Invoke;
17
16
 
18
17
  export declare namespace Automations {
18
+ export { type AutomationInvokeResponse as AutomationInvokeResponse };
19
+
19
20
  export {
20
21
  Invoke as Invoke,
21
- type AutomationInvokeResponse as AutomationInvokeResponse,
22
22
  type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams,
23
23
  type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams,
24
24
  };
@@ -1,9 +1,4 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Automations } from './automations';
4
- export {
5
- Invoke,
6
- type AutomationInvokeResponse,
7
- type InvokeInvokeAdHocParams,
8
- type InvokeInvokeByTemplateParams,
9
- } from './invoke';
3
+ export { Automations, type AutomationInvokeResponse } from './automations';
4
+ export { Invoke, type InvokeInvokeAdHocParams, type InvokeInvokeByTemplateParams } from './invoke';
@@ -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 AutomationsAPI from './automations';
4
5
  import { APIPromise } from '../../core/api-promise';
5
6
  import { RequestOptions } from '../../internal/request-options';
6
7
  import { path } from '../../internal/utils/path';
@@ -32,7 +33,10 @@ export class Invoke extends APIResource {
32
33
  * });
33
34
  * ```
34
35
  */
35
- invokeAdHoc(body: InvokeInvokeAdHocParams, options?: RequestOptions): APIPromise<AutomationInvokeResponse> {
36
+ invokeAdHoc(
37
+ body: InvokeInvokeAdHocParams,
38
+ options?: RequestOptions,
39
+ ): APIPromise<AutomationsAPI.AutomationInvokeResponse> {
36
40
  return this._client.post('/automations/invoke', { body, ...options });
37
41
  }
38
42
 
@@ -52,15 +56,11 @@ export class Invoke extends APIResource {
52
56
  templateID: string,
53
57
  body: InvokeInvokeByTemplateParams,
54
58
  options?: RequestOptions,
55
- ): APIPromise<AutomationInvokeResponse> {
59
+ ): APIPromise<AutomationsAPI.AutomationInvokeResponse> {
56
60
  return this._client.post(path`/automations/${templateID}/invoke`, { body, ...options });
57
61
  }
58
62
  }
59
63
 
60
- export interface AutomationInvokeResponse {
61
- runId: string;
62
- }
63
-
64
64
  export interface InvokeInvokeAdHocParams {
65
65
  automation: InvokeInvokeAdHocParams.Automation;
66
66
 
@@ -181,7 +181,6 @@ export interface InvokeInvokeByTemplateParams {
181
181
 
182
182
  export declare namespace Invoke {
183
183
  export {
184
- type AutomationInvokeResponse as AutomationInvokeResponse,
185
184
  type InvokeInvokeAdHocParams as InvokeInvokeAdHocParams,
186
185
  type InvokeInvokeByTemplateParams as InvokeInvokeByTemplateParams,
187
186
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as BrandsAPI from './brands';
5
- import * as AudiencesAPI from './audiences';
5
+ import * as Shared from './shared';
6
6
  import { APIPromise } from '../core/api-promise';
7
7
  import { buildHeaders } from '../internal/headers';
8
8
  import { RequestOptions } from '../internal/request-options';
@@ -186,7 +186,7 @@ export interface WidgetBackground {
186
186
  }
187
187
 
188
188
  export interface BrandListResponse {
189
- paging: AudiencesAPI.Paging;
189
+ paging: Shared.Paging;
190
190
 
191
191
  results: Array<Brand>;
192
192
  }
@@ -2,10 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as BulkAPI from './bulk';
5
- import * as AudiencesAPI from './audiences';
6
5
  import * as Shared from './shared';
7
- import * as SubscriptionsAPI from './lists/subscriptions';
8
- import * as TemplatesAPI from './tenants/templates';
9
6
  import { APIPromise } from '../core/api-promise';
10
7
  import { buildHeaders } from '../internal/headers';
11
8
  import { RequestOptions } from '../internal/request-options';
@@ -82,7 +79,7 @@ export namespace InboundBulkMessage {
82
79
  /**
83
80
  * Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
84
81
  */
85
- content: Shared.ElementalContentSugar | TemplatesAPI.ElementalContent;
82
+ content: Shared.ElementalContentSugar | Shared.ElementalContent;
86
83
 
87
84
  brand?: string | null;
88
85
 
@@ -99,7 +96,7 @@ export namespace InboundBulkMessage {
99
96
  export interface InboundBulkMessageUser {
100
97
  data?: unknown;
101
98
 
102
- preferences?: SubscriptionsAPI.RecipientPreferences | null;
99
+ preferences?: Shared.RecipientPreferences | null;
103
100
 
104
101
  profile?: unknown;
105
102
 
@@ -115,7 +112,7 @@ export interface BulkCreateJobResponse {
115
112
  export interface BulkListUsersResponse {
116
113
  items: Array<BulkListUsersResponse.Item>;
117
114
 
118
- paging: AudiencesAPI.Paging;
115
+ paging: Shared.Paging;
119
116
  }
120
117
 
121
118
  export namespace BulkListUsersResponse {
@@ -6,7 +6,6 @@ export {
6
6
  type Audience,
7
7
  type Filter,
8
8
  type FilterConfig,
9
- type Paging,
10
9
  type AudienceUpdateResponse,
11
10
  type AudienceListResponse,
12
11
  type AudienceListMembersResponse,
@@ -21,7 +20,7 @@ export {
21
20
  type AuditEventListParams,
22
21
  } from './audit-events';
23
22
  export { Auth, type AuthIssueTokenResponse, type AuthIssueTokenParams } from './auth';
24
- export { Automations } from './automations/automations';
23
+ export { Automations, type AutomationInvokeResponse } from './automations/automations';
25
24
  export {
26
25
  Brands,
27
26
  type Brand,
@@ -57,7 +56,8 @@ export {
57
56
  export { Inbound, type InboundTrackEventResponse, type InboundTrackEventParams } from './inbound';
58
57
  export {
59
58
  Lists,
60
- type List,
59
+ type PutSubscriptionsRecipient,
60
+ type SubscriptionList,
61
61
  type ListListResponse,
62
62
  type ListUpdateParams,
63
63
  type ListListParams,
@@ -75,12 +75,15 @@ export {
75
75
  } from './messages';
76
76
  export {
77
77
  Notifications,
78
+ type BaseCheck,
79
+ type Check,
78
80
  type NotificationGetContent,
79
81
  type NotificationListResponse,
80
82
  type NotificationListParams,
81
83
  } from './notifications/notifications';
82
84
  export {
83
85
  Profiles,
86
+ type SubscribeToListsRequestItem,
84
87
  type ProfileCreateResponse,
85
88
  type ProfileRetrieveResponse,
86
89
  type ProfileReplaceResponse,
@@ -89,20 +92,14 @@ export {
89
92
  type ProfileReplaceParams,
90
93
  } from './profiles/profiles';
91
94
  export { Requests } from './requests';
92
- export {
93
- Send,
94
- type ElementalChannelNode,
95
- type ElementalNode,
96
- type MessageContext,
97
- type Recipient,
98
- type Utm,
99
- type SendMessageResponse,
100
- type SendMessageParams,
101
- } from './send';
95
+ export { Send, type SendMessageResponse, type SendMessageParams } from './send';
102
96
  export {
103
97
  Tenants,
98
+ type BaseTemplateTenantAssociation,
104
99
  type DefaultPreferences,
100
+ type SubscriptionTopicNew,
105
101
  type Tenant,
102
+ type TenantAssociation,
106
103
  type TenantListResponse,
107
104
  type TenantListUsersResponse,
108
105
  type TenantUpdateParams,
@@ -2,7 +2,8 @@
2
2
 
3
3
  export {
4
4
  Lists,
5
- type List,
5
+ type PutSubscriptionsRecipient,
6
+ type SubscriptionList,
6
7
  type ListListResponse,
7
8
  type ListUpdateParams,
8
9
  type ListListParams,
@@ -10,9 +11,6 @@ export {
10
11
  } from './lists';
11
12
  export {
12
13
  Subscriptions,
13
- type NotificationPreferenceDetails,
14
- type PutSubscriptionsRecipient,
15
- type RecipientPreferences,
16
14
  type SubscriptionListResponse,
17
15
  type SubscriptionListParams,
18
16
  type SubscriptionAddParams,
@@ -1,12 +1,9 @@
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 AudiencesAPI from '../audiences';
4
+ import * as Shared from '../shared';
5
5
  import * as SubscriptionsAPI from './subscriptions';
6
6
  import {
7
- NotificationPreferenceDetails,
8
- PutSubscriptionsRecipient,
9
- RecipientPreferences,
10
7
  SubscriptionAddParams,
11
8
  SubscriptionListParams,
12
9
  SubscriptionListResponse,
@@ -26,7 +23,7 @@ export class Lists extends APIResource {
26
23
  /**
27
24
  * Returns a list based on the list ID provided.
28
25
  */
29
- retrieve(listID: string, options?: RequestOptions): APIPromise<List> {
26
+ retrieve(listID: string, options?: RequestOptions): APIPromise<SubscriptionList> {
30
27
  return this._client.get(path`/lists/${listID}`, options);
31
28
  }
32
29
 
@@ -73,7 +70,13 @@ export class Lists extends APIResource {
73
70
  }
74
71
  }
75
72
 
76
- export interface List {
73
+ export interface PutSubscriptionsRecipient {
74
+ recipientId: string;
75
+
76
+ preferences?: Shared.RecipientPreferences | null;
77
+ }
78
+
79
+ export interface SubscriptionList {
77
80
  id: string;
78
81
 
79
82
  name: string;
@@ -84,15 +87,15 @@ export interface List {
84
87
  }
85
88
 
86
89
  export interface ListListResponse {
87
- items: Array<List>;
90
+ items: Array<SubscriptionList>;
88
91
 
89
- paging: AudiencesAPI.Paging;
92
+ paging: Shared.Paging;
90
93
  }
91
94
 
92
95
  export interface ListUpdateParams {
93
96
  name: string;
94
97
 
95
- preferences?: SubscriptionsAPI.RecipientPreferences | null;
98
+ preferences?: Shared.RecipientPreferences | null;
96
99
  }
97
100
 
98
101
  export interface ListListParams {
@@ -116,7 +119,8 @@ Lists.Subscriptions = Subscriptions;
116
119
 
117
120
  export declare namespace Lists {
118
121
  export {
119
- type List as List,
122
+ type PutSubscriptionsRecipient as PutSubscriptionsRecipient,
123
+ type SubscriptionList as SubscriptionList,
120
124
  type ListListResponse as ListListResponse,
121
125
  type ListUpdateParams as ListUpdateParams,
122
126
  type ListListParams as ListListParams,
@@ -125,9 +129,6 @@ export declare namespace Lists {
125
129
 
126
130
  export {
127
131
  Subscriptions as Subscriptions,
128
- type NotificationPreferenceDetails as NotificationPreferenceDetails,
129
- type PutSubscriptionsRecipient as PutSubscriptionsRecipient,
130
- type RecipientPreferences as RecipientPreferences,
131
132
  type SubscriptionListResponse as SubscriptionListResponse,
132
133
  type SubscriptionListParams as SubscriptionListParams,
133
134
  type SubscriptionAddParams as SubscriptionAddParams,
@@ -1,10 +1,8 @@
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 SubscriptionsAPI from './subscriptions';
5
- import * as AudiencesAPI from '../audiences';
6
4
  import * as Shared from '../shared';
7
- import * as PreferencesAPI from '../users/preferences';
5
+ import * as ListsAPI from './lists';
8
6
  import { APIPromise } from '../../core/api-promise';
9
7
  import { buildHeaders } from '../../internal/headers';
10
8
  import { RequestOptions } from '../../internal/request-options';
@@ -79,30 +77,10 @@ export class Subscriptions extends APIResource {
79
77
  }
80
78
  }
81
79
 
82
- export interface NotificationPreferenceDetails {
83
- status: PreferencesAPI.PreferenceStatus;
84
-
85
- channel_preferences?: Array<Shared.ChannelPreference> | null;
86
-
87
- rules?: Array<Shared.Rule> | null;
88
- }
89
-
90
- export interface PutSubscriptionsRecipient {
91
- recipientId: string;
92
-
93
- preferences?: RecipientPreferences | null;
94
- }
95
-
96
- export interface RecipientPreferences {
97
- categories?: { [key: string]: NotificationPreferenceDetails } | null;
98
-
99
- notifications?: { [key: string]: NotificationPreferenceDetails } | null;
100
- }
101
-
102
80
  export interface SubscriptionListResponse {
103
81
  items: Array<SubscriptionListResponse.Item>;
104
82
 
105
- paging: AudiencesAPI.Paging;
83
+ paging: Shared.Paging;
106
84
  }
107
85
 
108
86
  export namespace SubscriptionListResponse {
@@ -111,7 +89,7 @@ export namespace SubscriptionListResponse {
111
89
 
112
90
  created?: string | null;
113
91
 
114
- preferences?: SubscriptionsAPI.RecipientPreferences | null;
92
+ preferences?: Shared.RecipientPreferences | null;
115
93
  }
116
94
  }
117
95
 
@@ -123,11 +101,11 @@ export interface SubscriptionListParams {
123
101
  }
124
102
 
125
103
  export interface SubscriptionAddParams {
126
- recipients: Array<PutSubscriptionsRecipient>;
104
+ recipients: Array<ListsAPI.PutSubscriptionsRecipient>;
127
105
  }
128
106
 
129
107
  export interface SubscriptionSubscribeParams {
130
- recipients: Array<PutSubscriptionsRecipient>;
108
+ recipients: Array<ListsAPI.PutSubscriptionsRecipient>;
131
109
  }
132
110
 
133
111
  export interface SubscriptionSubscribeUserParams {
@@ -139,7 +117,7 @@ export interface SubscriptionSubscribeUserParams {
139
117
  /**
140
118
  * Body param:
141
119
  */
142
- preferences?: RecipientPreferences | null;
120
+ preferences?: Shared.RecipientPreferences | null;
143
121
  }
144
122
 
145
123
  export interface SubscriptionUnsubscribeUserParams {
@@ -151,9 +129,6 @@ export interface SubscriptionUnsubscribeUserParams {
151
129
 
152
130
  export declare namespace Subscriptions {
153
131
  export {
154
- type NotificationPreferenceDetails as NotificationPreferenceDetails,
155
- type PutSubscriptionsRecipient as PutSubscriptionsRecipient,
156
- type RecipientPreferences as RecipientPreferences,
157
132
  type SubscriptionListResponse as SubscriptionListResponse,
158
133
  type SubscriptionListParams as SubscriptionListParams,
159
134
  type SubscriptionAddParams as SubscriptionAddParams,
@@ -1,7 +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 AudiencesAPI from './audiences';
4
+ import * as Shared from './shared';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
@@ -155,7 +155,7 @@ export interface MessageListResponse {
155
155
  /**
156
156
  * Paging information for the result set.
157
157
  */
158
- paging: AudiencesAPI.Paging;
158
+ paging: Shared.Paging;
159
159
 
160
160
  /**
161
161
  * An array of messages with their details.
@@ -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 { APIPromise } from '../../core/api-promise';
5
6
  import { buildHeaders } from '../../internal/headers';
6
7
  import { RequestOptions } from '../../internal/request-options';
@@ -34,24 +35,12 @@ export class Checks extends APIResource {
34
35
  }
35
36
  }
36
37
 
37
- export interface BaseCheck {
38
- id: string;
39
-
40
- status: 'RESOLVED' | 'FAILED' | 'PENDING';
41
-
42
- type: 'custom';
43
- }
44
-
45
- export interface Check extends BaseCheck {
46
- updated: number;
47
- }
48
-
49
38
  export interface CheckUpdateResponse {
50
- checks: Array<Check>;
39
+ checks: Array<NotificationsAPI.Check>;
51
40
  }
52
41
 
53
42
  export interface CheckListResponse {
54
- checks: Array<Check>;
43
+ checks: Array<NotificationsAPI.Check>;
55
44
  }
56
45
 
57
46
  export interface CheckUpdateParams {
@@ -63,7 +52,7 @@ export interface CheckUpdateParams {
63
52
  /**
64
53
  * Body param:
65
54
  */
66
- checks: Array<BaseCheck>;
55
+ checks: Array<NotificationsAPI.BaseCheck>;
67
56
  }
68
57
 
69
58
  export interface CheckListParams {
@@ -76,8 +65,6 @@ export interface CheckDeleteParams {
76
65
 
77
66
  export declare namespace Checks {
78
67
  export {
79
- type BaseCheck as BaseCheck,
80
- type Check as Check,
81
68
  type CheckUpdateResponse as CheckUpdateResponse,
82
69
  type CheckListResponse as CheckListResponse,
83
70
  type CheckUpdateParams as CheckUpdateParams,
@@ -2,8 +2,6 @@
2
2
 
3
3
  export {
4
4
  Checks,
5
- type BaseCheck,
6
- type Check,
7
5
  type CheckUpdateResponse,
8
6
  type CheckListResponse,
9
7
  type CheckUpdateParams,
@@ -13,6 +11,8 @@ export {
13
11
  export { Draft } from './draft';
14
12
  export {
15
13
  Notifications,
14
+ type BaseCheck,
15
+ type Check,
16
16
  type NotificationGetContent,
17
17
  type NotificationListResponse,
18
18
  type NotificationListParams,
@@ -1,12 +1,9 @@
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 AudiencesAPI from '../audiences';
5
4
  import * as Shared from '../shared';
6
5
  import * as ChecksAPI from './checks';
7
6
  import {
8
- BaseCheck,
9
- Check,
10
7
  CheckDeleteParams,
11
8
  CheckListParams,
12
9
  CheckListResponse,
@@ -36,6 +33,18 @@ export class Notifications extends APIResource {
36
33
  }
37
34
  }
38
35
 
36
+ export interface BaseCheck {
37
+ id: string;
38
+
39
+ status: 'RESOLVED' | 'FAILED' | 'PENDING';
40
+
41
+ type: 'custom';
42
+ }
43
+
44
+ export interface Check extends BaseCheck {
45
+ updated: number;
46
+ }
47
+
39
48
  export interface NotificationGetContent {
40
49
  blocks?: Array<NotificationGetContent.Block> | null;
41
50
 
@@ -103,7 +112,7 @@ export namespace NotificationGetContent {
103
112
  }
104
113
 
105
114
  export interface NotificationListResponse {
106
- paging: AudiencesAPI.Paging;
115
+ paging: Shared.Paging;
107
116
 
108
117
  results: Array<NotificationListResponse.Result>;
109
118
  }
@@ -156,6 +165,8 @@ Notifications.Checks = Checks;
156
165
 
157
166
  export declare namespace Notifications {
158
167
  export {
168
+ type BaseCheck as BaseCheck,
169
+ type Check as Check,
159
170
  type NotificationGetContent as NotificationGetContent,
160
171
  type NotificationListResponse as NotificationListResponse,
161
172
  type NotificationListParams as NotificationListParams,
@@ -165,8 +176,6 @@ export declare namespace Notifications {
165
176
 
166
177
  export {
167
178
  Checks as Checks,
168
- type BaseCheck as BaseCheck,
169
- type Check as Check,
170
179
  type CheckUpdateResponse as CheckUpdateResponse,
171
180
  type CheckListResponse as CheckListResponse,
172
181
  type CheckUpdateParams as CheckUpdateParams,
@@ -10,6 +10,7 @@ export {
10
10
  } from './lists';
11
11
  export {
12
12
  Profiles,
13
+ type SubscribeToListsRequestItem,
13
14
  type ProfileCreateResponse,
14
15
  type ProfileRetrieveResponse,
15
16
  type ProfileReplaceResponse,
@@ -1,8 +1,8 @@
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 AudiencesAPI from '../audiences';
5
- import * as SubscriptionsAPI from '../lists/subscriptions';
4
+ import * as Shared from '../shared';
5
+ import * as ProfilesAPI from './profiles';
6
6
  import { APIPromise } from '../../core/api-promise';
7
7
  import { RequestOptions } from '../../internal/request-options';
8
8
  import { path } from '../../internal/utils/path';
@@ -40,7 +40,7 @@ export class Lists extends APIResource {
40
40
  }
41
41
 
42
42
  export interface ListRetrieveResponse {
43
- paging: AudiencesAPI.Paging;
43
+ paging: Shared.Paging;
44
44
 
45
45
  /**
46
46
  * An array of lists
@@ -69,7 +69,7 @@ export namespace ListRetrieveResponse {
69
69
  */
70
70
  updated: string;
71
71
 
72
- preferences?: SubscriptionsAPI.RecipientPreferences | null;
72
+ preferences?: Shared.RecipientPreferences | null;
73
73
  }
74
74
  }
75
75
 
@@ -89,15 +89,7 @@ export interface ListRetrieveParams {
89
89
  }
90
90
 
91
91
  export interface ListSubscribeParams {
92
- lists: Array<ListSubscribeParams.List>;
93
- }
94
-
95
- export namespace ListSubscribeParams {
96
- export interface List {
97
- listId: string;
98
-
99
- preferences?: SubscriptionsAPI.RecipientPreferences | null;
100
- }
92
+ lists: Array<ProfilesAPI.SubscribeToListsRequestItem>;
101
93
  }
102
94
 
103
95
  export declare namespace Lists {