@sentdm/sentdm 0.7.2 → 0.14.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 (161) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/README.md +71 -34
  3. package/client.d.mts +49 -21
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +49 -21
  6. package/client.d.ts.map +1 -1
  7. package/client.js +52 -38
  8. package/client.js.map +1 -1
  9. package/client.mjs +52 -38
  10. package/client.mjs.map +1 -1
  11. package/internal/tslib.js +17 -17
  12. package/internal/utils/log.d.mts.map +1 -1
  13. package/internal/utils/log.d.ts.map +1 -1
  14. package/internal/utils/log.js +0 -1
  15. package/internal/utils/log.js.map +1 -1
  16. package/internal/utils/log.mjs +0 -1
  17. package/internal/utils/log.mjs.map +1 -1
  18. package/internal/utils/query.d.mts +5 -0
  19. package/internal/utils/query.d.mts.map +1 -0
  20. package/internal/utils/query.d.ts +5 -0
  21. package/internal/utils/query.d.ts.map +1 -0
  22. package/internal/utils/query.js +23 -0
  23. package/internal/utils/query.js.map +1 -0
  24. package/internal/utils/query.mjs +20 -0
  25. package/internal/utils/query.mjs.map +1 -0
  26. package/internal/utils.d.mts +1 -0
  27. package/internal/utils.d.ts +1 -0
  28. package/internal/utils.js +1 -0
  29. package/internal/utils.js.map +1 -1
  30. package/internal/utils.mjs +1 -0
  31. package/package.json +7 -1
  32. package/resources/contacts.d.mts +243 -49
  33. package/resources/contacts.d.mts.map +1 -1
  34. package/resources/contacts.d.ts +243 -49
  35. package/resources/contacts.d.ts.map +1 -1
  36. package/resources/contacts.js +112 -15
  37. package/resources/contacts.js.map +1 -1
  38. package/resources/contacts.mjs +112 -15
  39. package/resources/contacts.mjs.map +1 -1
  40. package/resources/index.d.mts +8 -4
  41. package/resources/index.d.mts.map +1 -1
  42. package/resources/index.d.ts +8 -4
  43. package/resources/index.d.ts.map +1 -1
  44. package/resources/index.js +11 -3
  45. package/resources/index.js.map +1 -1
  46. package/resources/index.mjs +5 -1
  47. package/resources/index.mjs.map +1 -1
  48. package/resources/me.d.mts +269 -0
  49. package/resources/me.d.mts.map +1 -0
  50. package/resources/me.d.ts +269 -0
  51. package/resources/me.d.ts.map +1 -0
  52. package/resources/me.js +40 -0
  53. package/resources/me.js.map +1 -0
  54. package/resources/me.mjs +36 -0
  55. package/resources/me.mjs.map +1 -0
  56. package/resources/messages.d.mts +239 -133
  57. package/resources/messages.d.mts.map +1 -1
  58. package/resources/messages.d.ts +239 -133
  59. package/resources/messages.d.ts.map +1 -1
  60. package/resources/messages.js +42 -50
  61. package/resources/messages.js.map +1 -1
  62. package/resources/messages.mjs +42 -50
  63. package/resources/messages.mjs.map +1 -1
  64. package/resources/numbers.d.mts +70 -0
  65. package/resources/numbers.d.mts.map +1 -0
  66. package/resources/numbers.d.ts +70 -0
  67. package/resources/numbers.d.ts.map +1 -0
  68. package/resources/numbers.js +36 -0
  69. package/resources/numbers.js.map +1 -0
  70. package/resources/numbers.mjs +32 -0
  71. package/resources/numbers.mjs.map +1 -0
  72. package/resources/profiles/campaigns.d.mts +339 -0
  73. package/resources/profiles/campaigns.d.mts.map +1 -0
  74. package/resources/profiles/campaigns.d.ts +339 -0
  75. package/resources/profiles/campaigns.d.ts.map +1 -0
  76. package/resources/profiles/campaigns.js +148 -0
  77. package/resources/profiles/campaigns.js.map +1 -0
  78. package/resources/profiles/campaigns.mjs +144 -0
  79. package/resources/profiles/campaigns.mjs.map +1 -0
  80. package/resources/profiles/index.d.mts +3 -0
  81. package/resources/profiles/index.d.mts.map +1 -0
  82. package/resources/profiles/index.d.ts +3 -0
  83. package/resources/profiles/index.d.ts.map +1 -0
  84. package/resources/profiles/index.js +9 -0
  85. package/resources/profiles/index.js.map +1 -0
  86. package/resources/profiles/index.mjs +4 -0
  87. package/resources/profiles/index.mjs.map +1 -0
  88. package/resources/profiles/profiles.d.mts +967 -0
  89. package/resources/profiles/profiles.d.mts.map +1 -0
  90. package/resources/profiles/profiles.d.ts +967 -0
  91. package/resources/profiles/profiles.d.ts.map +1 -0
  92. package/resources/profiles/profiles.js +227 -0
  93. package/resources/profiles/profiles.js.map +1 -0
  94. package/resources/profiles/profiles.mjs +222 -0
  95. package/resources/profiles/profiles.mjs.map +1 -0
  96. package/resources/profiles.d.mts +2 -0
  97. package/resources/profiles.d.mts.map +1 -0
  98. package/resources/profiles.d.ts +2 -0
  99. package/resources/profiles.d.ts.map +1 -0
  100. package/resources/profiles.js +6 -0
  101. package/resources/profiles.js.map +1 -0
  102. package/resources/profiles.mjs +3 -0
  103. package/resources/profiles.mjs.map +1 -0
  104. package/resources/templates.d.mts +327 -191
  105. package/resources/templates.d.mts.map +1 -1
  106. package/resources/templates.d.ts +327 -191
  107. package/resources/templates.d.ts.map +1 -1
  108. package/resources/templates.js +80 -35
  109. package/resources/templates.js.map +1 -1
  110. package/resources/templates.mjs +80 -35
  111. package/resources/templates.mjs.map +1 -1
  112. package/resources/users.d.mts +251 -0
  113. package/resources/users.d.mts.map +1 -0
  114. package/resources/users.d.ts +251 -0
  115. package/resources/users.d.ts.map +1 -0
  116. package/resources/users.js +124 -0
  117. package/resources/users.js.map +1 -0
  118. package/resources/users.mjs +120 -0
  119. package/resources/users.mjs.map +1 -0
  120. package/resources/webhooks.d.mts +639 -0
  121. package/resources/webhooks.d.mts.map +1 -0
  122. package/resources/webhooks.d.ts +639 -0
  123. package/resources/webhooks.d.ts.map +1 -0
  124. package/resources/webhooks.js +237 -0
  125. package/resources/webhooks.js.map +1 -0
  126. package/resources/webhooks.mjs +233 -0
  127. package/resources/webhooks.mjs.map +1 -0
  128. package/src/client.ts +228 -80
  129. package/src/internal/utils/log.ts +0 -1
  130. package/src/internal/utils/query.ts +23 -0
  131. package/src/internal/utils.ts +1 -0
  132. package/src/resources/contacts.ts +335 -57
  133. package/src/resources/index.ts +81 -12
  134. package/src/resources/me.ts +333 -0
  135. package/src/resources/messages.ts +306 -147
  136. package/src/resources/numbers.ts +102 -0
  137. package/src/resources/profiles/campaigns.ts +501 -0
  138. package/src/resources/profiles/index.ts +38 -0
  139. package/src/resources/profiles/profiles.ts +1302 -0
  140. package/src/resources/profiles.ts +3 -0
  141. package/src/resources/templates.ts +424 -202
  142. package/src/resources/users.ts +366 -0
  143. package/src/resources/webhooks.ts +923 -0
  144. package/src/version.ts +1 -1
  145. package/version.d.mts +1 -1
  146. package/version.d.mts.map +1 -1
  147. package/version.d.ts +1 -1
  148. package/version.d.ts.map +1 -1
  149. package/version.js +1 -1
  150. package/version.js.map +1 -1
  151. package/version.mjs +1 -1
  152. package/version.mjs.map +1 -1
  153. package/resources/number-lookup.d.mts +0 -59
  154. package/resources/number-lookup.d.mts.map +0 -1
  155. package/resources/number-lookup.d.ts +0 -59
  156. package/resources/number-lookup.d.ts.map +0 -1
  157. package/resources/number-lookup.js +0 -17
  158. package/resources/number-lookup.js.map +0 -1
  159. package/resources/number-lookup.mjs +0 -13
  160. package/resources/number-lookup.mjs.map +0 -1
  161. package/src/resources/number-lookup.ts +0 -80
@@ -0,0 +1,102 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as WebhooksAPI from './webhooks';
5
+ import { APIPromise } from '../core/api-promise';
6
+ import { buildHeaders } from '../internal/headers';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ /**
11
+ * Manage and lookup phone numbers
12
+ */
13
+ export class Numbers extends APIResource {
14
+ /**
15
+ * Retrieves detailed information about a phone number including carrier, line
16
+ * type, porting status, and VoIP detection. Uses the customer's messaging provider
17
+ * for rich data, with fallback to the internal index.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const response = await client.numbers.lookup(
22
+ * '+12025551234',
23
+ * );
24
+ * ```
25
+ */
26
+ lookup(
27
+ phoneNumber: string,
28
+ params: NumberLookupParams | null | undefined = {},
29
+ options?: RequestOptions,
30
+ ): APIPromise<NumberLookupResponse> {
31
+ const { 'x-profile-id': xProfileID } = params ?? {};
32
+ return this._client.get(path`/v3/numbers/lookup/${phoneNumber}`, {
33
+ ...options,
34
+ headers: buildHeaders([
35
+ { ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
36
+ options?.headers,
37
+ ]),
38
+ });
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Standard API response envelope for all v3 endpoints
44
+ */
45
+ export interface NumberLookupResponse {
46
+ /**
47
+ * The response data (null if error)
48
+ */
49
+ data?: NumberLookupResponse.Data | null;
50
+
51
+ /**
52
+ * Error information
53
+ */
54
+ error?: WebhooksAPI.ErrorDetail | null;
55
+
56
+ /**
57
+ * Request and response metadata
58
+ */
59
+ meta?: WebhooksAPI.APIMeta;
60
+
61
+ /**
62
+ * Indicates whether the request was successful
63
+ */
64
+ success?: boolean;
65
+ }
66
+
67
+ export namespace NumberLookupResponse {
68
+ /**
69
+ * The response data (null if error)
70
+ */
71
+ export interface Data {
72
+ carrier_name?: string | null;
73
+
74
+ country_code?: string | null;
75
+
76
+ is_ported?: boolean | null;
77
+
78
+ is_valid?: boolean;
79
+
80
+ is_voip?: boolean | null;
81
+
82
+ line_type?: string | null;
83
+
84
+ mobile_country_code?: string | null;
85
+
86
+ mobile_network_code?: string | null;
87
+
88
+ phone_number?: string;
89
+ }
90
+ }
91
+
92
+ export interface NumberLookupParams {
93
+ /**
94
+ * Profile UUID to scope the request to a child profile. Only organization API keys
95
+ * can use this header. The profile must belong to the calling organization.
96
+ */
97
+ 'x-profile-id'?: string;
98
+ }
99
+
100
+ export declare namespace Numbers {
101
+ export { type NumberLookupResponse as NumberLookupResponse, type NumberLookupParams as NumberLookupParams };
102
+ }
@@ -0,0 +1,501 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as CampaignsAPI from './campaigns';
5
+ import * as WebhooksAPI from '../webhooks';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { buildHeaders } from '../../internal/headers';
8
+ import { RequestOptions } from '../../internal/request-options';
9
+ import { path } from '../../internal/utils/path';
10
+
11
+ /**
12
+ * Manage organization profiles
13
+ */
14
+ export class Campaigns extends APIResource {
15
+ /**
16
+ * Creates a new campaign scoped under the brand of the specified profile. Each
17
+ * campaign must include at least one use case with sample messages.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const apiResponseOfTcrCampaignWithUseCases =
22
+ * await client.profiles.campaigns.create(
23
+ * '770e8400-e29b-41d4-a716-446655440002',
24
+ * {
25
+ * campaign: {
26
+ * description:
27
+ * 'Appointment reminders and account notifications',
28
+ * name: 'Customer Notifications',
29
+ * type: 'App',
30
+ * useCases: [
31
+ * {
32
+ * messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
33
+ * sampleMessages: [
34
+ * 'Hi {name}, your appointment is confirmed for {date} at {time}.',
35
+ * 'Your order #{order_id} has been shipped. Track at {url}',
36
+ * ],
37
+ * },
38
+ * ],
39
+ * },
40
+ * },
41
+ * );
42
+ * ```
43
+ */
44
+ create(
45
+ profileID: string,
46
+ params: CampaignCreateParams,
47
+ options?: RequestOptions,
48
+ ): APIPromise<APIResponseOfTcrCampaignWithUseCases> {
49
+ const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
50
+ return this._client.post(path`/v3/profiles/${profileID}/campaigns`, {
51
+ body,
52
+ ...options,
53
+ headers: buildHeaders([
54
+ {
55
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
56
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
57
+ },
58
+ options?.headers,
59
+ ]),
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Updates an existing campaign under the brand of the specified profile. Cannot
65
+ * update campaigns that have already been submitted to TCR.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const apiResponseOfTcrCampaignWithUseCases =
70
+ * await client.profiles.campaigns.update(
71
+ * 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
72
+ * {
73
+ * profileId: '770e8400-e29b-41d4-a716-446655440002',
74
+ * campaign: {
75
+ * description:
76
+ * 'Updated appointment reminders and account notifications',
77
+ * name: 'Customer Notifications Updated',
78
+ * type: 'App',
79
+ * useCases: [
80
+ * {
81
+ * messagingUseCaseUs: 'ACCOUNT_NOTIFICATION',
82
+ * sampleMessages: [
83
+ * 'Hi {name}, your appointment is confirmed for {date} at {time}.',
84
+ * 'Your order #{order_id} has been shipped. Track at {url}',
85
+ * ],
86
+ * },
87
+ * ],
88
+ * },
89
+ * },
90
+ * );
91
+ * ```
92
+ */
93
+ update(
94
+ campaignID: string,
95
+ params: CampaignUpdateParams,
96
+ options?: RequestOptions,
97
+ ): APIPromise<APIResponseOfTcrCampaignWithUseCases> {
98
+ const { profileId, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
99
+ return this._client.put(path`/v3/profiles/${profileId}/campaigns/${campaignID}`, {
100
+ body,
101
+ ...options,
102
+ headers: buildHeaders([
103
+ {
104
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
105
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
106
+ },
107
+ options?.headers,
108
+ ]),
109
+ });
110
+ }
111
+
112
+ /**
113
+ * Retrieves all campaigns linked to the profile's brand, including use cases and
114
+ * sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const campaigns = await client.profiles.campaigns.list(
119
+ * '770e8400-e29b-41d4-a716-446655440002',
120
+ * );
121
+ * ```
122
+ */
123
+ list(
124
+ profileID: string,
125
+ params: CampaignListParams | null | undefined = {},
126
+ options?: RequestOptions,
127
+ ): APIPromise<CampaignListResponse> {
128
+ const { 'x-profile-id': xProfileID } = params ?? {};
129
+ return this._client.get(path`/v3/profiles/${profileID}/campaigns`, {
130
+ ...options,
131
+ headers: buildHeaders([
132
+ { ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
133
+ options?.headers,
134
+ ]),
135
+ });
136
+ }
137
+
138
+ /**
139
+ * Deletes a campaign by ID from the brand of the specified profile. The profile
140
+ * must belong to the authenticated organization.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * await client.profiles.campaigns.delete(
145
+ * 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
146
+ * {
147
+ * profileId: '770e8400-e29b-41d4-a716-446655440002',
148
+ * body: {},
149
+ * },
150
+ * );
151
+ * ```
152
+ */
153
+ delete(campaignID: string, params: CampaignDeleteParams, options?: RequestOptions): APIPromise<void> {
154
+ const { profileId, body, 'x-profile-id': xProfileID } = params;
155
+ return this._client.delete(path`/v3/profiles/${profileId}/campaigns/${campaignID}`, {
156
+ body: body,
157
+ ...options,
158
+ headers: buildHeaders([
159
+ { Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
160
+ options?.headers,
161
+ ]),
162
+ });
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Standard API response envelope for all v3 endpoints
168
+ */
169
+ export interface APIResponseOfTcrCampaignWithUseCases {
170
+ /**
171
+ * The response data (null if error)
172
+ */
173
+ data?: TcrCampaignWithUseCases | null;
174
+
175
+ /**
176
+ * Error information
177
+ */
178
+ error?: WebhooksAPI.ErrorDetail | null;
179
+
180
+ /**
181
+ * Request and response metadata
182
+ */
183
+ meta?: WebhooksAPI.APIMeta;
184
+
185
+ /**
186
+ * Indicates whether the request was successful
187
+ */
188
+ success?: boolean;
189
+ }
190
+
191
+ export interface BaseDto {
192
+ /**
193
+ * Unique identifier
194
+ */
195
+ id?: string;
196
+
197
+ createdAt?: string;
198
+
199
+ updatedAt?: string | null;
200
+ }
201
+
202
+ /**
203
+ * Campaign data for create or update operation
204
+ */
205
+ export interface CampaignData {
206
+ /**
207
+ * Campaign description
208
+ */
209
+ description: string;
210
+
211
+ /**
212
+ * Campaign name
213
+ */
214
+ name: string;
215
+
216
+ /**
217
+ * Campaign type (e.g., "KYC", "App")
218
+ */
219
+ type: string;
220
+
221
+ /**
222
+ * List of use cases with sample messages
223
+ */
224
+ useCases: Array<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData>;
225
+
226
+ /**
227
+ * Comma-separated keywords that trigger help message (e.g., "HELP, INFO, SUPPORT")
228
+ */
229
+ helpKeywords?: string | null;
230
+
231
+ /**
232
+ * Message sent when user requests help
233
+ */
234
+ helpMessage?: string | null;
235
+
236
+ /**
237
+ * Description of how messages flow in the campaign
238
+ */
239
+ messageFlow?: string | null;
240
+
241
+ /**
242
+ * Comma-separated keywords that trigger opt-in (e.g., "YES, START, SUBSCRIBE")
243
+ */
244
+ optinKeywords?: string | null;
245
+
246
+ /**
247
+ * Message sent when user opts in
248
+ */
249
+ optinMessage?: string | null;
250
+
251
+ /**
252
+ * Comma-separated keywords that trigger opt-out (e.g., "STOP, UNSUBSCRIBE, END")
253
+ */
254
+ optoutKeywords?: string | null;
255
+
256
+ /**
257
+ * Message sent when user opts out
258
+ */
259
+ optoutMessage?: string | null;
260
+
261
+ /**
262
+ * URL to privacy policy
263
+ */
264
+ privacyPolicyLink?: string | null;
265
+
266
+ /**
267
+ * URL to terms and conditions
268
+ */
269
+ termsAndConditionsLink?: string | null;
270
+ }
271
+
272
+ export type MessagingUseCaseUs =
273
+ | 'MARKETING'
274
+ | 'ACCOUNT_NOTIFICATION'
275
+ | 'CUSTOMER_CARE'
276
+ | 'FRAUD_ALERT'
277
+ | 'TWO_FA'
278
+ | 'DELIVERY_NOTIFICATION'
279
+ | 'SECURITY_ALERT'
280
+ | 'M2M'
281
+ | 'MIXED'
282
+ | 'HIGHER_EDUCATION'
283
+ | 'POLLING_VOTING'
284
+ | 'PUBLIC_SERVICE_ANNOUNCEMENT'
285
+ | 'LOW_VOLUME';
286
+
287
+ /**
288
+ * Campaign use case with sample messages
289
+ */
290
+ export interface SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData {
291
+ messagingUseCaseUs: MessagingUseCaseUs;
292
+
293
+ /**
294
+ * Sample messages for this use case (1-5 messages, max 1024 characters each)
295
+ */
296
+ sampleMessages: Array<string>;
297
+ }
298
+
299
+ export interface TcrCampaignWithUseCases extends BaseDto {
300
+ billedDate?: string | null;
301
+
302
+ brandId?: string | null;
303
+
304
+ cost?: number | null;
305
+
306
+ cspId?: string | null;
307
+
308
+ customerId?: string;
309
+
310
+ description?: string;
311
+
312
+ helpKeywords?: string | null;
313
+
314
+ helpMessage?: string | null;
315
+
316
+ kycSubmissionFormId?: string | null;
317
+
318
+ messageFlow?: string | null;
319
+
320
+ name?: string;
321
+
322
+ optinKeywords?: string | null;
323
+
324
+ optinMessage?: string | null;
325
+
326
+ optoutKeywords?: string | null;
327
+
328
+ optoutMessage?: string | null;
329
+
330
+ privacyPolicyLink?: string | null;
331
+
332
+ resellerId?: string | null;
333
+
334
+ sharingStatus?: 'PENDING' | 'ACCEPTED' | 'DECLINED' | null;
335
+
336
+ status?: 'SENT_CREATED' | 'ACTIVE' | 'EXPIRED' | null;
337
+
338
+ submittedAt?: string | null;
339
+
340
+ submittedToTCR?: boolean;
341
+
342
+ tcrCampaignId?: string | null;
343
+
344
+ tcrSyncError?: string | null;
345
+
346
+ telnyxCampaignId?: string | null;
347
+
348
+ termsAndConditionsLink?: string | null;
349
+
350
+ type?: string;
351
+
352
+ upstreamCnpId?: string | null;
353
+
354
+ useCases?: Array<TcrCampaignWithUseCases.UseCase>;
355
+ }
356
+
357
+ export namespace TcrCampaignWithUseCases {
358
+ export interface UseCase extends CampaignsAPI.BaseDto {
359
+ campaignId?: string;
360
+
361
+ customerId?: string;
362
+
363
+ messagingUseCaseUs?: CampaignsAPI.MessagingUseCaseUs;
364
+
365
+ sampleMessages?: Array<string>;
366
+ }
367
+ }
368
+
369
+ /**
370
+ * Standard API response envelope for all v3 endpoints
371
+ */
372
+ export interface CampaignListResponse {
373
+ /**
374
+ * The response data (null if error)
375
+ */
376
+ data?: Array<TcrCampaignWithUseCases> | null;
377
+
378
+ /**
379
+ * Error information
380
+ */
381
+ error?: WebhooksAPI.ErrorDetail | null;
382
+
383
+ /**
384
+ * Request and response metadata
385
+ */
386
+ meta?: WebhooksAPI.APIMeta;
387
+
388
+ /**
389
+ * Indicates whether the request was successful
390
+ */
391
+ success?: boolean;
392
+ }
393
+
394
+ export interface CampaignCreateParams {
395
+ /**
396
+ * Body param: Campaign data for create or update operation
397
+ */
398
+ campaign: CampaignData;
399
+
400
+ /**
401
+ * Body param: Sandbox flag - when true, the operation is simulated without side
402
+ * effects Useful for testing integrations without actual execution
403
+ */
404
+ sandbox?: boolean;
405
+
406
+ /**
407
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
408
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
409
+ * hours per key per customer.
410
+ */
411
+ 'Idempotency-Key'?: string;
412
+
413
+ /**
414
+ * Header param: Profile UUID to scope the request to a child profile. Only
415
+ * organization API keys can use this header. The profile must belong to the
416
+ * calling organization.
417
+ */
418
+ 'x-profile-id'?: string;
419
+ }
420
+
421
+ export interface CampaignUpdateParams {
422
+ /**
423
+ * Path param: Profile ID from route
424
+ */
425
+ profileId: string;
426
+
427
+ /**
428
+ * Body param: Campaign data for create or update operation
429
+ */
430
+ campaign: CampaignData;
431
+
432
+ /**
433
+ * Body param: Sandbox flag - when true, the operation is simulated without side
434
+ * effects Useful for testing integrations without actual execution
435
+ */
436
+ sandbox?: boolean;
437
+
438
+ /**
439
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
440
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
441
+ * hours per key per customer.
442
+ */
443
+ 'Idempotency-Key'?: string;
444
+
445
+ /**
446
+ * Header param: Profile UUID to scope the request to a child profile. Only
447
+ * organization API keys can use this header. The profile must belong to the
448
+ * calling organization.
449
+ */
450
+ 'x-profile-id'?: string;
451
+ }
452
+
453
+ export interface CampaignListParams {
454
+ /**
455
+ * Profile UUID to scope the request to a child profile. Only organization API keys
456
+ * can use this header. The profile must belong to the calling organization.
457
+ */
458
+ 'x-profile-id'?: string;
459
+ }
460
+
461
+ export interface CampaignDeleteParams {
462
+ /**
463
+ * Path param: Profile ID from route parameter
464
+ */
465
+ profileId: string;
466
+
467
+ /**
468
+ * Body param: Request to delete a campaign from a brand
469
+ */
470
+ body: CampaignDeleteParams.Body;
471
+
472
+ /**
473
+ * Header param: Profile UUID to scope the request to a child profile. Only
474
+ * organization API keys can use this header. The profile must belong to the
475
+ * calling organization.
476
+ */
477
+ 'x-profile-id'?: string;
478
+ }
479
+
480
+ export namespace CampaignDeleteParams {
481
+ /**
482
+ * Request to delete a campaign from a brand
483
+ */
484
+ export interface Body extends WebhooksAPI.MutationRequest {}
485
+ }
486
+
487
+ export declare namespace Campaigns {
488
+ export {
489
+ type APIResponseOfTcrCampaignWithUseCases as APIResponseOfTcrCampaignWithUseCases,
490
+ type BaseDto as BaseDto,
491
+ type CampaignData as CampaignData,
492
+ type MessagingUseCaseUs as MessagingUseCaseUs,
493
+ type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData as SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
494
+ type TcrCampaignWithUseCases as TcrCampaignWithUseCases,
495
+ type CampaignListResponse as CampaignListResponse,
496
+ type CampaignCreateParams as CampaignCreateParams,
497
+ type CampaignUpdateParams as CampaignUpdateParams,
498
+ type CampaignListParams as CampaignListParams,
499
+ type CampaignDeleteParams as CampaignDeleteParams,
500
+ };
501
+ }
@@ -0,0 +1,38 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Campaigns,
5
+ type APIResponseOfTcrCampaignWithUseCases,
6
+ type BaseDto,
7
+ type CampaignData,
8
+ type MessagingUseCaseUs,
9
+ type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData,
10
+ type TcrCampaignWithUseCases,
11
+ type CampaignListResponse,
12
+ type CampaignCreateParams,
13
+ type CampaignUpdateParams,
14
+ type CampaignListParams,
15
+ type CampaignDeleteParams,
16
+ } from './campaigns';
17
+ export {
18
+ Profiles,
19
+ type APIResponseOfProfileDetail,
20
+ type BillingContactInfo,
21
+ type BrandsBrandData,
22
+ type DestinationCountry,
23
+ type PaymentDetails,
24
+ type ProfileDetail,
25
+ type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo,
26
+ type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo,
27
+ type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo,
28
+ type TcrBrandRelationship,
29
+ type TcrVertical,
30
+ type ProfileListResponse,
31
+ type ProfileCompleteResponse,
32
+ type ProfileCreateParams,
33
+ type ProfileRetrieveParams,
34
+ type ProfileUpdateParams,
35
+ type ProfileListParams,
36
+ type ProfileDeleteParams,
37
+ type ProfileCompleteParams,
38
+ } from './profiles';