@sentdm/sentdm 0.34.0 → 0.35.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 (120) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +53 -22
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +53 -22
  5. package/client.d.ts.map +1 -1
  6. package/client.js +39 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +39 -8
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/contacts.d.mts +606 -89
  12. package/resources/contacts.d.mts.map +1 -1
  13. package/resources/contacts.d.ts +606 -89
  14. package/resources/contacts.d.ts.map +1 -1
  15. package/resources/contacts.js +21 -15
  16. package/resources/contacts.js.map +1 -1
  17. package/resources/contacts.mjs +21 -15
  18. package/resources/contacts.mjs.map +1 -1
  19. package/resources/conversations.d.mts +335 -69
  20. package/resources/conversations.d.mts.map +1 -1
  21. package/resources/conversations.d.ts +335 -69
  22. package/resources/conversations.d.ts.map +1 -1
  23. package/resources/conversations.js +15 -10
  24. package/resources/conversations.js.map +1 -1
  25. package/resources/conversations.mjs +15 -10
  26. package/resources/conversations.mjs.map +1 -1
  27. package/resources/index.d.mts +7 -7
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +7 -7
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js.map +1 -1
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/me.d.mts +132 -41
  34. package/resources/me.d.mts.map +1 -1
  35. package/resources/me.d.ts +132 -41
  36. package/resources/me.d.ts.map +1 -1
  37. package/resources/me.js +3 -1
  38. package/resources/me.js.map +1 -1
  39. package/resources/me.mjs +3 -1
  40. package/resources/me.mjs.map +1 -1
  41. package/resources/messages.d.mts +206 -27
  42. package/resources/messages.d.mts.map +1 -1
  43. package/resources/messages.d.ts +206 -27
  44. package/resources/messages.d.ts.map +1 -1
  45. package/resources/messages.js +5 -1
  46. package/resources/messages.js.map +1 -1
  47. package/resources/messages.mjs +5 -1
  48. package/resources/messages.mjs.map +1 -1
  49. package/resources/numbers.d.mts +45 -4
  50. package/resources/numbers.d.mts.map +1 -1
  51. package/resources/numbers.d.ts +45 -4
  52. package/resources/numbers.d.ts.map +1 -1
  53. package/resources/numbers.js +3 -1
  54. package/resources/numbers.js.map +1 -1
  55. package/resources/numbers.mjs +3 -1
  56. package/resources/numbers.mjs.map +1 -1
  57. package/resources/profiles/campaigns.d.mts +579 -209
  58. package/resources/profiles/campaigns.d.mts.map +1 -1
  59. package/resources/profiles/campaigns.d.ts +579 -209
  60. package/resources/profiles/campaigns.d.ts.map +1 -1
  61. package/resources/profiles/campaigns.js +33 -64
  62. package/resources/profiles/campaigns.js.map +1 -1
  63. package/resources/profiles/campaigns.mjs +33 -64
  64. package/resources/profiles/campaigns.mjs.map +1 -1
  65. package/resources/profiles/index.d.mts +2 -2
  66. package/resources/profiles/index.d.mts.map +1 -1
  67. package/resources/profiles/index.d.ts +2 -2
  68. package/resources/profiles/index.d.ts.map +1 -1
  69. package/resources/profiles/index.js.map +1 -1
  70. package/resources/profiles/index.mjs.map +1 -1
  71. package/resources/profiles/profiles.d.mts +2006 -508
  72. package/resources/profiles/profiles.d.mts.map +1 -1
  73. package/resources/profiles/profiles.d.ts +2006 -508
  74. package/resources/profiles/profiles.d.ts.map +1 -1
  75. package/resources/profiles/profiles.js +98 -75
  76. package/resources/profiles/profiles.js.map +1 -1
  77. package/resources/profiles/profiles.mjs +98 -75
  78. package/resources/profiles/profiles.mjs.map +1 -1
  79. package/resources/templates.d.mts +497 -84
  80. package/resources/templates.d.mts.map +1 -1
  81. package/resources/templates.d.ts +497 -84
  82. package/resources/templates.d.ts.map +1 -1
  83. package/resources/templates.js +6 -4
  84. package/resources/templates.js.map +1 -1
  85. package/resources/templates.mjs +6 -4
  86. package/resources/templates.mjs.map +1 -1
  87. package/resources/users.d.mts +444 -43
  88. package/resources/users.d.mts.map +1 -1
  89. package/resources/users.d.ts +444 -43
  90. package/resources/users.d.ts.map +1 -1
  91. package/resources/users.js +6 -4
  92. package/resources/users.js.map +1 -1
  93. package/resources/users.mjs +6 -4
  94. package/resources/users.mjs.map +1 -1
  95. package/resources/webhooks.d.mts +770 -169
  96. package/resources/webhooks.d.mts.map +1 -1
  97. package/resources/webhooks.d.ts +770 -169
  98. package/resources/webhooks.d.ts.map +1 -1
  99. package/resources/webhooks.js +11 -8
  100. package/resources/webhooks.js.map +1 -1
  101. package/resources/webhooks.mjs +11 -8
  102. package/resources/webhooks.mjs.map +1 -1
  103. package/src/client.ts +78 -60
  104. package/src/resources/contacts.ts +696 -92
  105. package/src/resources/conversations.ts +400 -77
  106. package/src/resources/index.ts +20 -26
  107. package/src/resources/me.ts +151 -52
  108. package/src/resources/messages.ts +230 -27
  109. package/src/resources/numbers.ts +50 -4
  110. package/src/resources/profiles/campaigns.ts +706 -232
  111. package/src/resources/profiles/index.ts +6 -14
  112. package/src/resources/profiles/profiles.ts +2421 -646
  113. package/src/resources/templates.ts +583 -99
  114. package/src/resources/users.ts +514 -44
  115. package/src/resources/webhooks.ts +1006 -283
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -1,7 +1,13 @@
1
1
  import { APIResource } from "../core/resource.js";
2
- import * as WebhooksAPI from "./webhooks.js";
3
2
  import { APIPromise } from "../core/api-promise.js";
4
3
  import { RequestOptions } from "../internal/request-options.js";
4
+ /**
5
+ * Inbound and outbound messages, grouped by the person they are with.
6
+ *
7
+ * A conversation is the thread for one contact across every channel — a reply by SMS and one by WhatsApp belong to the same conversation, because they are the same person talking to you.
8
+ *
9
+ * Read-only. Sending is **Messages**; a reply arrives here and through your webhooks.
10
+ */
5
11
  export declare class Conversations extends APIResource {
6
12
  /**
7
13
  * Retrieves a paginated list of the authenticated customer's messages across all
@@ -9,118 +15,378 @@ export declare class Conversations extends APIResource {
9
15
  *
10
16
  * @example
11
17
  * ```ts
12
- * const apiResponseOfConversationMessagesList =
13
- * await client.conversations.list({
14
- * page: 0,
15
- * page_size: 0,
16
- * });
18
+ * const conversations = await client.conversations.list({
19
+ * page: 0,
20
+ * page_size: 0,
21
+ * });
17
22
  * ```
18
23
  */
19
- list(params: ConversationListParams, options?: RequestOptions): APIPromise<APIResponseOfConversationMessagesList>;
24
+ list(params: ConversationListParams, options?: RequestOptions): APIPromise<ConversationListResponse>;
20
25
  /**
21
26
  * Retrieves a paginated list of the messages in a single conversation (scoped to
22
27
  * the authenticated customer), ordered by created date (most recent first).
23
28
  *
24
29
  * @example
25
30
  * ```ts
26
- * const apiResponseOfConversationMessagesList =
27
- * await client.conversations.listMessages(
28
- * '08fab313-c9e2-502c-975e-08b0356c432e',
29
- * { page: 0, page_size: 0 },
30
- * );
31
+ * const response = await client.conversations.listMessages(
32
+ * '08fab313-c9e2-502c-975e-08b0356c432e',
33
+ * { page: 0, page_size: 0 },
34
+ * );
31
35
  * ```
32
36
  */
33
- listMessages(id: string, params: ConversationListMessagesParams, options?: RequestOptions): APIPromise<APIResponseOfConversationMessagesList>;
37
+ listMessages(id: string, params: ConversationListMessagesParams, options?: RequestOptions): APIPromise<ConversationListMessagesResponse>;
34
38
  }
35
39
  /**
36
40
  * Standard API response envelope for all v3 endpoints
37
41
  */
38
- export interface APIResponseOfConversationMessagesList {
42
+ export interface ConversationListResponse {
39
43
  /**
40
44
  * A paginated list of messages — used by both conversation read endpoints.
41
45
  */
42
- data?: ConversationMessagesList | null;
46
+ data?: ConversationListResponse.Data | null;
43
47
  /**
44
48
  * Error information
45
49
  */
46
- error?: WebhooksAPI.ErrorDetail | null;
50
+ error?: ConversationListResponse.Error | null;
47
51
  /**
48
52
  * Request and response metadata
49
53
  */
50
- meta?: WebhooksAPI.APIMeta;
54
+ meta?: ConversationListResponse.Meta;
51
55
  /**
52
56
  * Indicates whether the request was successful
53
57
  */
54
58
  success?: boolean;
55
59
  }
60
+ export declare namespace ConversationListResponse {
61
+ /**
62
+ * A paginated list of messages — used by both conversation read endpoints.
63
+ */
64
+ interface Data {
65
+ /**
66
+ * The messages on this page.
67
+ */
68
+ messages?: Array<Data.Message>;
69
+ /**
70
+ * Pagination metadata for list responses
71
+ */
72
+ pagination?: Data.Pagination;
73
+ }
74
+ namespace Data {
75
+ /**
76
+ * Message response for v3 API — same shape as v2 with snake_case JSON conventions
77
+ */
78
+ interface Message {
79
+ id?: string;
80
+ active_contact_price?: number | null;
81
+ channel?: string;
82
+ contact_id?: string;
83
+ created_at?: string;
84
+ customer_id?: string;
85
+ direction?: string;
86
+ events?: Array<Message.Event> | null;
87
+ /**
88
+ * Structured message body format for database storage. Preserves channel-specific
89
+ * components (header, body, footer, buttons).
90
+ */
91
+ message_body?: Message.MessageBody | null;
92
+ phone?: string;
93
+ phone_international?: string;
94
+ price?: number | null;
95
+ region_code?: string;
96
+ status?: string;
97
+ template_category?: string | null;
98
+ template_id?: string | null;
99
+ template_name?: string | null;
100
+ }
101
+ namespace Message {
102
+ /**
103
+ * Represents a status change event in a message's lifecycle (v3)
104
+ */
105
+ interface Event {
106
+ status: string;
107
+ timestamp: string;
108
+ description?: string | null;
109
+ }
110
+ /**
111
+ * Structured message body format for database storage. Preserves channel-specific
112
+ * components (header, body, footer, buttons).
113
+ */
114
+ interface MessageBody {
115
+ buttons?: Array<MessageBody.Button> | null;
116
+ content?: string;
117
+ footer?: string | null;
118
+ header?: string | null;
119
+ }
120
+ namespace MessageBody {
121
+ interface Button {
122
+ postbackData?: string | null;
123
+ text?: string | null;
124
+ type?: string;
125
+ value?: string;
126
+ }
127
+ }
128
+ }
129
+ /**
130
+ * Pagination metadata for list responses
131
+ */
132
+ interface Pagination {
133
+ /**
134
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
135
+ */
136
+ cursors?: Pagination.Cursors | null;
137
+ /**
138
+ * Whether there are more pages after this one
139
+ */
140
+ has_more?: boolean;
141
+ /**
142
+ * Current page number (1-indexed)
143
+ */
144
+ page?: number;
145
+ /**
146
+ * Number of items per page
147
+ */
148
+ page_size?: number;
149
+ /**
150
+ * Total number of items across all pages
151
+ */
152
+ total_count?: number;
153
+ /**
154
+ * Total number of pages
155
+ */
156
+ total_pages?: number;
157
+ }
158
+ namespace Pagination {
159
+ /**
160
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
161
+ */
162
+ interface Cursors {
163
+ /**
164
+ * Cursor to fetch the next page.
165
+ */
166
+ after?: string | null;
167
+ /**
168
+ * Cursor to fetch the previous page.
169
+ */
170
+ before?: string | null;
171
+ }
172
+ }
173
+ }
174
+ /**
175
+ * Error information
176
+ */
177
+ interface Error {
178
+ /**
179
+ * Machine-readable error code (e.g., "RESOURCE_001")
180
+ */
181
+ code?: string;
182
+ /**
183
+ * Additional validation error details (field-level errors)
184
+ */
185
+ details?: {
186
+ [key: string]: Array<string>;
187
+ } | null;
188
+ /**
189
+ * URL to documentation about this error
190
+ */
191
+ doc_url?: string | null;
192
+ /**
193
+ * Human-readable error message
194
+ */
195
+ message?: string;
196
+ }
197
+ /**
198
+ * Request and response metadata
199
+ */
200
+ interface Meta {
201
+ /**
202
+ * Unique identifier for this request (for tracing and support)
203
+ */
204
+ request_id?: string;
205
+ /**
206
+ * Server timestamp when the response was generated
207
+ */
208
+ timestamp?: string;
209
+ /**
210
+ * API version used for this request
211
+ */
212
+ version?: string;
213
+ }
214
+ }
56
215
  /**
57
- * A paginated list of messages — used by both conversation read endpoints.
216
+ * Standard API response envelope for all v3 endpoints
58
217
  */
59
- export interface ConversationMessagesList {
218
+ export interface ConversationListMessagesResponse {
60
219
  /**
61
- * The messages on this page, most recent first.
220
+ * A paginated list of messages — used by both conversation read endpoints.
62
221
  */
63
- messages?: Array<ConversationMessagesList.Message>;
222
+ data?: ConversationListMessagesResponse.Data | null;
64
223
  /**
65
- * Pagination metadata for list responses
224
+ * Error information
66
225
  */
67
- pagination?: WebhooksAPI.PaginationMeta;
226
+ error?: ConversationListMessagesResponse.Error | null;
227
+ /**
228
+ * Request and response metadata
229
+ */
230
+ meta?: ConversationListMessagesResponse.Meta;
231
+ /**
232
+ * Indicates whether the request was successful
233
+ */
234
+ success?: boolean;
68
235
  }
69
- export declare namespace ConversationMessagesList {
70
- /**
71
- * Message response for v3 API — same shape as v2 with snake_case JSON conventions
72
- */
73
- interface Message {
74
- id?: string;
75
- active_contact_price?: number | null;
76
- channel?: string;
77
- contact_id?: string;
78
- created_at?: string;
79
- customer_id?: string;
80
- direction?: string;
81
- events?: Array<Message.Event> | null;
82
- /**
83
- * Structured message body format for database storage. Preserves channel-specific
84
- * components (header, body, footer, buttons).
85
- */
86
- message_body?: Message.MessageBody | null;
87
- phone?: string;
88
- phone_international?: string;
89
- price?: number | null;
90
- region_code?: string;
91
- status?: string;
92
- template_category?: string | null;
93
- template_id?: string | null;
94
- template_name?: string | null;
236
+ export declare namespace ConversationListMessagesResponse {
237
+ /**
238
+ * A paginated list of messages — used by both conversation read endpoints.
239
+ */
240
+ interface Data {
241
+ /**
242
+ * The messages on this page.
243
+ */
244
+ messages?: Array<Data.Message>;
245
+ /**
246
+ * Pagination metadata for list responses
247
+ */
248
+ pagination?: Data.Pagination;
95
249
  }
96
- namespace Message {
250
+ namespace Data {
97
251
  /**
98
- * Represents a status change event in a message's lifecycle (v3)
252
+ * Message response for v3 API — same shape as v2 with snake_case JSON conventions
99
253
  */
100
- interface Event {
101
- status: string;
102
- timestamp: string;
103
- description?: string | null;
254
+ interface Message {
255
+ id?: string;
256
+ active_contact_price?: number | null;
257
+ channel?: string;
258
+ contact_id?: string;
259
+ created_at?: string;
260
+ customer_id?: string;
261
+ direction?: string;
262
+ events?: Array<Message.Event> | null;
263
+ /**
264
+ * Structured message body format for database storage. Preserves channel-specific
265
+ * components (header, body, footer, buttons).
266
+ */
267
+ message_body?: Message.MessageBody | null;
268
+ phone?: string;
269
+ phone_international?: string;
270
+ price?: number | null;
271
+ region_code?: string;
272
+ status?: string;
273
+ template_category?: string | null;
274
+ template_id?: string | null;
275
+ template_name?: string | null;
276
+ }
277
+ namespace Message {
278
+ /**
279
+ * Represents a status change event in a message's lifecycle (v3)
280
+ */
281
+ interface Event {
282
+ status: string;
283
+ timestamp: string;
284
+ description?: string | null;
285
+ }
286
+ /**
287
+ * Structured message body format for database storage. Preserves channel-specific
288
+ * components (header, body, footer, buttons).
289
+ */
290
+ interface MessageBody {
291
+ buttons?: Array<MessageBody.Button> | null;
292
+ content?: string;
293
+ footer?: string | null;
294
+ header?: string | null;
295
+ }
296
+ namespace MessageBody {
297
+ interface Button {
298
+ postbackData?: string | null;
299
+ text?: string | null;
300
+ type?: string;
301
+ value?: string;
302
+ }
303
+ }
104
304
  }
105
305
  /**
106
- * Structured message body format for database storage. Preserves channel-specific
107
- * components (header, body, footer, buttons).
306
+ * Pagination metadata for list responses
108
307
  */
109
- interface MessageBody {
110
- buttons?: Array<MessageBody.Button> | null;
111
- content?: string;
112
- footer?: string | null;
113
- header?: string | null;
308
+ interface Pagination {
309
+ /**
310
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
311
+ */
312
+ cursors?: Pagination.Cursors | null;
313
+ /**
314
+ * Whether there are more pages after this one
315
+ */
316
+ has_more?: boolean;
317
+ /**
318
+ * Current page number (1-indexed)
319
+ */
320
+ page?: number;
321
+ /**
322
+ * Number of items per page
323
+ */
324
+ page_size?: number;
325
+ /**
326
+ * Total number of items across all pages
327
+ */
328
+ total_count?: number;
329
+ /**
330
+ * Total number of pages
331
+ */
332
+ total_pages?: number;
114
333
  }
115
- namespace MessageBody {
116
- interface Button {
117
- postbackData?: string | null;
118
- text?: string | null;
119
- type?: string;
120
- value?: string;
334
+ namespace Pagination {
335
+ /**
336
+ * @deprecated Cursor-based pagination. Never populated — see Cursors.
337
+ */
338
+ interface Cursors {
339
+ /**
340
+ * Cursor to fetch the next page.
341
+ */
342
+ after?: string | null;
343
+ /**
344
+ * Cursor to fetch the previous page.
345
+ */
346
+ before?: string | null;
121
347
  }
122
348
  }
123
349
  }
350
+ /**
351
+ * Error information
352
+ */
353
+ interface Error {
354
+ /**
355
+ * Machine-readable error code (e.g., "RESOURCE_001")
356
+ */
357
+ code?: string;
358
+ /**
359
+ * Additional validation error details (field-level errors)
360
+ */
361
+ details?: {
362
+ [key: string]: Array<string>;
363
+ } | null;
364
+ /**
365
+ * URL to documentation about this error
366
+ */
367
+ doc_url?: string | null;
368
+ /**
369
+ * Human-readable error message
370
+ */
371
+ message?: string;
372
+ }
373
+ /**
374
+ * Request and response metadata
375
+ */
376
+ interface Meta {
377
+ /**
378
+ * Unique identifier for this request (for tracing and support)
379
+ */
380
+ request_id?: string;
381
+ /**
382
+ * Server timestamp when the response was generated
383
+ */
384
+ timestamp?: string;
385
+ /**
386
+ * API version used for this request
387
+ */
388
+ version?: string;
389
+ }
124
390
  }
125
391
  export interface ConversationListParams {
126
392
  /**
@@ -155,6 +421,6 @@ export interface ConversationListMessagesParams {
155
421
  'x-profile-id'?: string;
156
422
  }
157
423
  export declare namespace Conversations {
158
- export { type APIResponseOfConversationMessagesList as APIResponseOfConversationMessagesList, type ConversationMessagesList as ConversationMessagesList, type ConversationListParams as ConversationListParams, type ConversationListMessagesParams as ConversationListMessagesParams, };
424
+ export { type ConversationListResponse as ConversationListResponse, type ConversationListMessagesResponse as ConversationListMessagesResponse, type ConversationListParams as ConversationListParams, type ConversationListMessagesParams as ConversationListMessagesParams, };
159
425
  }
160
426
  //# sourceMappingURL=conversations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,sBAAsB,EAC9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AAI,gCAAgC,EACzE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -5,6 +5,13 @@ exports.Conversations = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
6
  const headers_1 = require("../internal/headers.js");
7
7
  const path_1 = require("../internal/utils/path.js");
8
+ /**
9
+ * Inbound and outbound messages, grouped by the person they are with.
10
+ *
11
+ * A conversation is the thread for one contact across every channel — a reply by SMS and one by WhatsApp belong to the same conversation, because they are the same person talking to you.
12
+ *
13
+ * Read-only. Sending is **Messages**; a reply arrives here and through your webhooks.
14
+ */
8
15
  class Conversations extends resource_1.APIResource {
9
16
  /**
10
17
  * Retrieves a paginated list of the authenticated customer's messages across all
@@ -12,11 +19,10 @@ class Conversations extends resource_1.APIResource {
12
19
  *
13
20
  * @example
14
21
  * ```ts
15
- * const apiResponseOfConversationMessagesList =
16
- * await client.conversations.list({
17
- * page: 0,
18
- * page_size: 0,
19
- * });
22
+ * const conversations = await client.conversations.list({
23
+ * page: 0,
24
+ * page_size: 0,
25
+ * });
20
26
  * ```
21
27
  */
22
28
  list(params, options) {
@@ -36,11 +42,10 @@ class Conversations extends resource_1.APIResource {
36
42
  *
37
43
  * @example
38
44
  * ```ts
39
- * const apiResponseOfConversationMessagesList =
40
- * await client.conversations.listMessages(
41
- * '08fab313-c9e2-502c-975e-08b0356c432e',
42
- * { page: 0, page_size: 0 },
43
- * );
45
+ * const response = await client.conversations.listMessages(
46
+ * '08fab313-c9e2-502c-975e-08b0356c432e',
47
+ * { page: 0, page_size: 0 },
48
+ * );
44
49
  * ```
45
50
  */
46
51
  listMessages(id, params, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;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AAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;YAC3C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,YAAY,CACV,EAAU,EACV,MAAsC,EACtC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,EAAE,EAAE;YACrD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AApDD,sCAoDC"}
@@ -2,6 +2,13 @@
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  import { buildHeaders } from "../internal/headers.mjs";
4
4
  import { path } from "../internal/utils/path.mjs";
5
+ /**
6
+ * Inbound and outbound messages, grouped by the person they are with.
7
+ *
8
+ * A conversation is the thread for one contact across every channel — a reply by SMS and one by WhatsApp belong to the same conversation, because they are the same person talking to you.
9
+ *
10
+ * Read-only. Sending is **Messages**; a reply arrives here and through your webhooks.
11
+ */
5
12
  export class Conversations extends APIResource {
6
13
  /**
7
14
  * Retrieves a paginated list of the authenticated customer's messages across all
@@ -9,11 +16,10 @@ export class Conversations extends APIResource {
9
16
  *
10
17
  * @example
11
18
  * ```ts
12
- * const apiResponseOfConversationMessagesList =
13
- * await client.conversations.list({
14
- * page: 0,
15
- * page_size: 0,
16
- * });
19
+ * const conversations = await client.conversations.list({
20
+ * page: 0,
21
+ * page_size: 0,
22
+ * });
17
23
  * ```
18
24
  */
19
25
  list(params, options) {
@@ -33,11 +39,10 @@ export class Conversations extends APIResource {
33
39
  *
34
40
  * @example
35
41
  * ```ts
36
- * const apiResponseOfConversationMessagesList =
37
- * await client.conversations.listMessages(
38
- * '08fab313-c9e2-502c-975e-08b0356c432e',
39
- * { page: 0, page_size: 0 },
40
- * );
42
+ * const response = await client.conversations.listMessages(
43
+ * '08fab313-c9e2-502c-975e-08b0356c432e',
44
+ * { page: 0, page_size: 0 },
45
+ * );
41
46
  * ```
42
47
  */
43
48
  listMessages(id, params, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../src/resources/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;YAC3C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAA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OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,YAAY,CACV,EAAU,EACV,MAAsC,EACtC,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,EAAE,EAAE;YACrD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,10 +1,10 @@
1
- export { Contacts, type APIResponseOfContact, type APIResponseOfContactMessageSummary, type ContactMessageSummary, type ContactResponse, type ContactListResponse, type ContactCreateParams, type ContactRetrieveParams, type ContactUpdateParams, type ContactListParams, type ContactDeleteParams, type ContactRetrieveMessageSummaryParams, } from "./contacts.mjs";
2
- export { Conversations, type APIResponseOfConversationMessagesList, type ConversationMessagesList, type ConversationListParams, type ConversationListMessagesParams, } from "./conversations.mjs";
3
- export { Me, type ProfileSettings, type MeRetrieveResponse, type MeRetrieveParams } from "./me.mjs";
1
+ export { Contacts, type ContactCreateResponse, type ContactRetrieveResponse, type ContactUpdateResponse, type ContactListResponse, type ContactRetrieveMessageSummaryResponse, type ContactCreateParams, type ContactRetrieveParams, type ContactUpdateParams, type ContactListParams, type ContactDeleteParams, type ContactRetrieveMessageSummaryParams, } from "./contacts.mjs";
2
+ export { Conversations, type ConversationListResponse, type ConversationListMessagesResponse, type ConversationListParams, type ConversationListMessagesParams, } from "./conversations.mjs";
3
+ export { Me, type MeRetrieveResponse, type MeRetrieveParams } from "./me.mjs";
4
4
  export { Messages, type MessageRetrieveActivitiesResponse, type MessageRetrieveStatusResponse, type MessageSendResponse, type MessageRetrieveActivitiesParams, type MessageRetrieveStatusParams, type MessageSendParams, } from "./messages.mjs";
5
5
  export { Numbers, type NumberLookupResponse, type NumberLookupParams } from "./numbers.mjs";
6
- export { Profiles, type APIResponseOfProfileDetail, type BillingContactInfo, type BrandBusinessInfo, type BrandComplianceInfo, type BrandContactInfo, type BrandsBrandData, type DestinationCountry, type PaymentDetails, type ProfileDetail, type TcrBrandRelationship, type TcrVertical, type ProfileListResponse, type ProfileCompleteResponse, type ProfileCreateParams, type ProfileRetrieveParams, type ProfileUpdateParams, type ProfileListParams, type ProfileDeleteParams, type ProfileCompleteParams, } from "./profiles/profiles.mjs";
7
- export { Templates, type APIResponseTemplate, type AuthenticationConfig, type Template, type TemplateBody, type TemplateBodyContent, type TemplateButton, type TemplateButtonProps, type TemplateDefinition, type TemplateFooter, type TemplateHeader, type TemplateVariable, type TemplateListResponse, type TemplateCreateParams, type TemplateRetrieveParams, type TemplateUpdateParams, type TemplateListParams, type TemplateDeleteParams, } from "./templates.mjs";
8
- export { Users, type APIResponseOfUser, type UserResponse, type UserListResponse, type UserRetrieveParams, type UserListParams, type UserInviteParams, type UserRemoveParams, type UserUpdateRoleParams, } from "./users.mjs";
9
- export { Webhooks, type APIMeta, type APIResponseWebhook, type ErrorDetail, type InboundMessageEvent, type InboundMessageEventPayload, type MessageEvent, type MessageEventPayload, type MutationRequest, type PaginationMeta, type TemplateEvent, type TemplateEventPayload, type WebhookEventType, type WebhookResponse, type WebhookListResponse, type WebhookListEventTypesResponse, type WebhookListEventsResponse, type WebhookRotateSecretResponse, type WebhookTestResponse, type WebhookCreateParams, type WebhookRetrieveParams, type WebhookUpdateParams, type WebhookListParams, type WebhookDeleteParams, type WebhookListEventTypesParams, type WebhookListEventsParams, type WebhookRotateSecretParams, type WebhookTestParams, type WebhookToggleStatusParams, } from "./webhooks.mjs";
6
+ export { Profiles, type DestinationCountry, type TcrBrandRelationship, type TcrVertical, type ProfileCreateResponse, type ProfileRetrieveResponse, type ProfileUpdateResponse, type ProfileListResponse, type ProfileCompleteResponse, type ProfileCreateParams, type ProfileRetrieveParams, type ProfileUpdateParams, type ProfileListParams, type ProfileDeleteParams, type ProfileCompleteParams, } from "./profiles/profiles.mjs";
7
+ export { Templates, type AuthenticationConfig, type TemplateBody, type TemplateBodyContent, type TemplateButton, type TemplateButtonProps, type TemplateDefinition, type TemplateFooter, type TemplateHeader, type TemplateVariable, type TemplateCreateResponse, type TemplateRetrieveResponse, type TemplateUpdateResponse, type TemplateListResponse, type TemplateCreateParams, type TemplateRetrieveParams, type TemplateUpdateParams, type TemplateListParams, type TemplateDeleteParams, } from "./templates.mjs";
8
+ export { Users, type UserRetrieveResponse, type UserListResponse, type UserInviteResponse, type UserUpdateRoleResponse, type UserRetrieveParams, type UserListParams, type UserInviteParams, type UserRemoveParams, type UserUpdateRoleParams, } from "./users.mjs";
9
+ export { Webhooks, type InboundMessageEvent, type InboundMessageEventPayload, type MessageEvent, type MessageEventPayload, type TemplateEvent, type TemplateEventPayload, type WebhookCreateResponse, type WebhookRetrieveResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookListEventTypesResponse, type WebhookListEventsResponse, type WebhookRotateSecretResponse, type WebhookTestResponse, type WebhookToggleStatusResponse, type WebhookCreateParams, type WebhookRetrieveParams, type WebhookUpdateParams, type WebhookListParams, type WebhookDeleteParams, type WebhookListEventTypesParams, type WebhookListEventsParams, type WebhookRotateSecretParams, type WebhookTestParams, type WebhookToggleStatusParams, } from "./webhooks.mjs";
10
10
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,kCAAkC,EACvC,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK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,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,wBAAoB;AACrB,OAAO,EACL,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,oBAAgB;AACjB,OAAO,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,GAC/B,uBAAmB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qCAAqC,EAC1C,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAC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