@lorikeetai/node-sdk 0.13.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 (199) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +17 -32
  3. package/core.d.ts +7 -4
  4. package/core.d.ts.map +1 -1
  5. package/core.js +16 -9
  6. package/core.js.map +1 -1
  7. package/core.mjs +16 -9
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +21 -3
  10. package/index.d.ts +21 -3
  11. package/index.d.ts.map +1 -1
  12. package/index.js +35 -7
  13. package/index.js.map +1 -1
  14. package/index.mjs +36 -8
  15. package/index.mjs.map +1 -1
  16. package/internal/qs/formats.d.ts +6 -0
  17. package/internal/qs/formats.d.ts.map +1 -0
  18. package/internal/qs/formats.js +11 -0
  19. package/internal/qs/formats.js.map +1 -0
  20. package/internal/qs/formats.mjs +8 -0
  21. package/internal/qs/formats.mjs.map +1 -0
  22. package/internal/qs/index.d.ts +10 -0
  23. package/internal/qs/index.d.ts.map +1 -0
  24. package/internal/qs/index.js +14 -0
  25. package/internal/qs/index.js.map +1 -0
  26. package/internal/qs/index.mjs +10 -0
  27. package/internal/qs/index.mjs.map +1 -0
  28. package/internal/qs/stringify.d.ts +3 -0
  29. package/internal/qs/stringify.d.ts.map +1 -0
  30. package/internal/qs/stringify.js +279 -0
  31. package/internal/qs/stringify.js.map +1 -0
  32. package/internal/qs/stringify.mjs +276 -0
  33. package/internal/qs/stringify.mjs.map +1 -0
  34. package/internal/qs/types.d.ts +57 -0
  35. package/internal/qs/types.d.ts.map +1 -0
  36. package/internal/qs/types.js +3 -0
  37. package/internal/qs/types.js.map +1 -0
  38. package/internal/qs/types.mjs +2 -0
  39. package/internal/qs/types.mjs.map +1 -0
  40. package/internal/qs/utils.d.ts +14 -0
  41. package/internal/qs/utils.d.ts.map +1 -0
  42. package/internal/qs/utils.js +229 -0
  43. package/internal/qs/utils.js.map +1 -0
  44. package/internal/qs/utils.mjs +217 -0
  45. package/internal/qs/utils.mjs.map +1 -0
  46. package/package.json +1 -5
  47. package/resource.d.ts +1 -1
  48. package/resource.d.ts.map +1 -1
  49. package/resource.js.map +1 -1
  50. package/resource.mjs.map +1 -1
  51. package/resources/conversation/chat.d.ts +19 -164
  52. package/resources/conversation/chat.d.ts.map +1 -1
  53. package/resources/conversation/chat.js.map +1 -1
  54. package/resources/conversation/chat.mjs.map +1 -1
  55. package/resources/conversation/conversation.d.ts +116 -0
  56. package/resources/conversation/conversation.d.ts.map +1 -1
  57. package/resources/conversation/conversation.js +36 -0
  58. package/resources/conversation/conversation.js.map +1 -1
  59. package/resources/conversation/conversation.mjs +36 -0
  60. package/resources/conversation/conversation.mjs.map +1 -1
  61. package/resources/conversation/email.d.ts +19 -164
  62. package/resources/conversation/email.d.ts.map +1 -1
  63. package/resources/conversation/email.js.map +1 -1
  64. package/resources/conversation/email.mjs.map +1 -1
  65. package/resources/conversation/index.d.ts +1 -1
  66. package/resources/conversation/index.d.ts.map +1 -1
  67. package/resources/conversation/index.js.map +1 -1
  68. package/resources/conversation/index.mjs +1 -1
  69. package/resources/conversation/index.mjs.map +1 -1
  70. package/resources/customer/customer.d.ts +296 -0
  71. package/resources/customer/customer.d.ts.map +1 -0
  72. package/resources/customer/customer.js +79 -0
  73. package/resources/customer/customer.js.map +1 -0
  74. package/resources/customer/customer.mjs +52 -0
  75. package/resources/customer/customer.mjs.map +1 -0
  76. package/resources/customer/index.d.ts +3 -0
  77. package/resources/customer/index.d.ts.map +1 -0
  78. package/resources/customer/index.js +9 -0
  79. package/resources/customer/index.js.map +1 -0
  80. package/resources/customer/index.mjs +4 -0
  81. package/resources/customer/index.mjs.map +1 -0
  82. package/resources/customer/profile.d.ts +71 -0
  83. package/resources/customer/profile.d.ts.map +1 -0
  84. package/resources/customer/profile.js +21 -0
  85. package/resources/customer/profile.js.map +1 -0
  86. package/resources/customer/profile.mjs +17 -0
  87. package/resources/customer/profile.mjs.map +1 -0
  88. package/resources/customer.d.ts +1 -291
  89. package/resources/customer.d.ts.map +1 -1
  90. package/resources/customer.js +15 -45
  91. package/resources/customer.js.map +1 -1
  92. package/resources/customer.mjs +1 -43
  93. package/resources/customer.mjs.map +1 -1
  94. package/resources/file.d.ts +7 -0
  95. package/resources/file.d.ts.map +1 -0
  96. package/resources/file.js +21 -0
  97. package/resources/file.js.map +1 -0
  98. package/resources/file.mjs +17 -0
  99. package/resources/file.mjs.map +1 -0
  100. package/resources/index.d.ts +6 -2
  101. package/resources/index.d.ts.map +1 -1
  102. package/resources/index.js +10 -2
  103. package/resources/index.js.map +1 -1
  104. package/resources/index.mjs +6 -2
  105. package/resources/index.mjs.map +1 -1
  106. package/resources/ingest.d.ts +2 -0
  107. package/resources/ingest.d.ts.map +1 -1
  108. package/resources/ingest.js +9 -0
  109. package/resources/ingest.js.map +1 -1
  110. package/resources/ingest.mjs +9 -0
  111. package/resources/ingest.mjs.map +1 -1
  112. package/resources/oauth/authorization.d.ts +6 -0
  113. package/resources/oauth/authorization.d.ts.map +1 -0
  114. package/resources/oauth/authorization.js +15 -0
  115. package/resources/oauth/authorization.js.map +1 -0
  116. package/resources/oauth/authorization.mjs +11 -0
  117. package/resources/oauth/authorization.mjs.map +1 -0
  118. package/resources/oauth/index.d.ts +3 -0
  119. package/resources/oauth/index.d.ts.map +1 -0
  120. package/resources/oauth/index.js +9 -0
  121. package/resources/oauth/index.js.map +1 -0
  122. package/resources/oauth/index.mjs +4 -0
  123. package/resources/oauth/index.mjs.map +1 -0
  124. package/resources/oauth/oauth.d.ts +24 -0
  125. package/resources/oauth/oauth.d.ts.map +1 -0
  126. package/resources/oauth/oauth.js +65 -0
  127. package/resources/oauth/oauth.js.map +1 -0
  128. package/resources/oauth/oauth.mjs +38 -0
  129. package/resources/oauth/oauth.mjs.map +1 -0
  130. package/resources/oauth.d.ts +2 -0
  131. package/resources/oauth.d.ts.map +1 -0
  132. package/resources/oauth.js +19 -0
  133. package/resources/oauth.js.map +1 -0
  134. package/resources/oauth.mjs +3 -0
  135. package/resources/oauth.mjs.map +1 -0
  136. package/resources/suggestion.d.ts +7 -0
  137. package/resources/suggestion.d.ts.map +1 -0
  138. package/resources/suggestion.js +21 -0
  139. package/resources/suggestion.js.map +1 -0
  140. package/resources/suggestion.mjs +17 -0
  141. package/resources/suggestion.mjs.map +1 -0
  142. package/resources/ticket.d.ts +14 -0
  143. package/resources/ticket.d.ts.map +1 -0
  144. package/resources/ticket.js +16 -0
  145. package/resources/ticket.js.map +1 -0
  146. package/resources/ticket.mjs +12 -0
  147. package/resources/ticket.mjs.map +1 -0
  148. package/resources/top-level.d.ts +2 -0
  149. package/resources/top-level.d.ts.map +1 -0
  150. package/resources/top-level.js +4 -0
  151. package/resources/top-level.js.map +1 -0
  152. package/resources/top-level.mjs +3 -0
  153. package/resources/top-level.mjs.map +1 -0
  154. package/resources/webhooks.d.ts +6 -0
  155. package/resources/webhooks.d.ts.map +1 -0
  156. package/resources/webhooks.js +15 -0
  157. package/resources/webhooks.js.map +1 -0
  158. package/resources/webhooks.mjs +11 -0
  159. package/resources/webhooks.mjs.map +1 -0
  160. package/resources/workflow.d.ts +1 -0
  161. package/resources/workflow.d.ts.map +1 -1
  162. package/resources/workflow.js +3 -0
  163. package/resources/workflow.js.map +1 -1
  164. package/resources/workflow.mjs +3 -0
  165. package/resources/workflow.mjs.map +1 -1
  166. package/src/core.ts +17 -8
  167. package/src/index.ts +77 -10
  168. package/src/internal/qs/LICENSE.md +13 -0
  169. package/src/internal/qs/README.md +3 -0
  170. package/src/internal/qs/formats.ts +9 -0
  171. package/src/internal/qs/index.ts +13 -0
  172. package/src/internal/qs/stringify.ts +388 -0
  173. package/src/internal/qs/types.ts +71 -0
  174. package/src/internal/qs/utils.ts +265 -0
  175. package/src/resource.ts +1 -1
  176. package/src/resources/conversation/chat.ts +21 -217
  177. package/src/resources/conversation/conversation.ts +175 -0
  178. package/src/resources/conversation/email.ts +21 -217
  179. package/src/resources/conversation/index.ts +10 -1
  180. package/src/resources/customer/customer.ts +386 -0
  181. package/src/resources/customer/index.ts +13 -0
  182. package/src/resources/customer/profile.ts +89 -0
  183. package/src/resources/customer.ts +1 -372
  184. package/src/resources/file.ts +20 -0
  185. package/src/resources/index.ts +15 -2
  186. package/src/resources/ingest.ts +17 -0
  187. package/src/resources/oauth/authorization.ts +13 -0
  188. package/src/resources/oauth/index.ts +4 -0
  189. package/src/resources/oauth/oauth.ts +63 -0
  190. package/src/resources/oauth.ts +3 -0
  191. package/src/resources/suggestion.ts +20 -0
  192. package/src/resources/ticket.ts +30 -0
  193. package/src/resources/top-level.ts +3 -0
  194. package/src/resources/webhooks.ts +13 -0
  195. package/src/resources/workflow.ts +4 -0
  196. package/src/version.ts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
4
5
  import * as ChatAPI from './chat';
5
6
  import {
6
7
  Chat,
@@ -25,12 +26,186 @@ import {
25
26
  export class Conversation extends APIResource {
26
27
  email: EmailAPI.Email = new EmailAPI.Email(this._client);
27
28
  chat: ChatAPI.Chat = new ChatAPI.Chat(this._client);
29
+
30
+ /**
31
+ * @example
32
+ * ```ts
33
+ * const conversation = await client.conversation.create({
34
+ * customerId: '1234567890',
35
+ * phoneNumber: '0412745903',
36
+ * 'x-lorikeet-voice-public-key':
37
+ * 'x-lorikeet-voice-public-key',
38
+ * });
39
+ * ```
40
+ */
41
+ create(
42
+ params: ConversationCreateParams,
43
+ options?: Core.RequestOptions,
44
+ ): Core.APIPromise<ConversationCreateResponse> {
45
+ const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...body } = params;
46
+ return this._client.post('/v1/conversation/new', {
47
+ body,
48
+ ...options,
49
+ headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
50
+ });
51
+ }
52
+
53
+ /**
54
+ * @example
55
+ * ```ts
56
+ * const response =
57
+ * await client.conversation.retrieveTranscript('ticketId', {
58
+ * 'x-lorikeet-voice-public-key':
59
+ * 'x-lorikeet-voice-public-key',
60
+ * });
61
+ * ```
62
+ */
63
+ retrieveTranscript(
64
+ ticketId: string,
65
+ params: ConversationRetrieveTranscriptParams,
66
+ options?: Core.RequestOptions,
67
+ ): Core.APIPromise<ConversationRetrieveTranscriptResponse> {
68
+ const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey } = params;
69
+ return this._client.get(`/v1/conversation/transcript/${ticketId}`, {
70
+ ...options,
71
+ headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
72
+ });
73
+ }
74
+ }
75
+
76
+ export interface AttachmentDto {
77
+ /**
78
+ * The name of the attachment
79
+ */
80
+ name: string;
81
+
82
+ /**
83
+ * The type of the attachment
84
+ */
85
+ type: string;
86
+
87
+ /**
88
+ * The URL of the attachment
89
+ */
90
+ url: string;
91
+ }
92
+
93
+ export interface TicketEvent {
94
+ /**
95
+ * The ID of the event
96
+ */
97
+ id: string;
98
+
99
+ /**
100
+ * The timestamp of the event
101
+ */
102
+ createdAt: string;
103
+
104
+ /**
105
+ * Any specific data associated with the event
106
+ */
107
+ data: unknown;
108
+
109
+ /**
110
+ * The type of the event
111
+ */
112
+ type:
113
+ | 'ASSIGNED'
114
+ | 'CLOSED'
115
+ | 'ESCALATED'
116
+ | 'ESCALATION_REQUEST'
117
+ | 'PROCESSING_CANCELLED'
118
+ | 'HOSTILE_MESSAGE'
119
+ | 'NEW_TICKET'
120
+ | 'CALL_ENDED';
121
+ }
122
+
123
+ export interface TicketMessageDto {
124
+ /**
125
+ * The ID of the conversation message
126
+ */
127
+ id: string;
128
+
129
+ /**
130
+ * Attachments that were attached to the message
131
+ */
132
+ attachments: Array<AttachmentDto>;
133
+
134
+ /**
135
+ * The content of the message. Markdown on plain text.
136
+ */
137
+ content: string;
138
+
139
+ /**
140
+ * The timestamp of the message.
141
+ */
142
+ createdAt: string;
143
+
144
+ /**
145
+ * The raw content of the message. Usually HTML.
146
+ */
147
+ rawContent: string;
148
+
149
+ /**
150
+ * The type of the message
151
+ */
152
+ type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
153
+ }
154
+
155
+ export interface ConversationCreateResponse {
156
+ /**
157
+ * The id of the ticket created
158
+ */
159
+ ticketId: string;
160
+ }
161
+
162
+ export interface ConversationRetrieveTranscriptResponse {
163
+ /**
164
+ * The custom attributes of the conversation
165
+ */
166
+ customAttributes: unknown;
167
+
168
+ /**
169
+ * The transcript of the conversation
170
+ */
171
+ transcript: string;
172
+ }
173
+
174
+ export interface ConversationCreateParams {
175
+ /**
176
+ * Body param: The id of the customer in the ticketing system
177
+ */
178
+ customerId: string;
179
+
180
+ /**
181
+ * Body param: The phone number of the customer
182
+ */
183
+ phoneNumber: string;
184
+
185
+ /**
186
+ * Header param:
187
+ */
188
+ 'x-lorikeet-voice-public-key': string;
189
+ }
190
+
191
+ export interface ConversationRetrieveTranscriptParams {
192
+ 'x-lorikeet-voice-public-key': string;
28
193
  }
29
194
 
30
195
  Conversation.Email = Email;
31
196
  Conversation.Chat = Chat;
32
197
 
33
198
  export declare namespace Conversation {
199
+ export {
200
+ type AttachmentDto as AttachmentDto,
201
+ type TicketEvent as TicketEvent,
202
+ type TicketMessageDto as TicketMessageDto,
203
+ type ConversationCreateResponse as ConversationCreateResponse,
204
+ type ConversationRetrieveTranscriptResponse as ConversationRetrieveTranscriptResponse,
205
+ type ConversationCreateParams as ConversationCreateParams,
206
+ type ConversationRetrieveTranscriptParams as ConversationRetrieveTranscriptParams,
207
+ };
208
+
34
209
  export {
35
210
  Email as Email,
36
211
  type EmailGenerateResponse as EmailGenerateResponse,
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../../resource';
4
4
  import * as Core from '../../core';
5
5
  import { pollUntil } from "../../lib/poll-until";
6
+ import * as ConversationAPI from './conversation';
6
7
 
7
8
  export class Email extends APIResource {
8
9
  /**
@@ -96,7 +97,7 @@ export interface EmailGenerateResponse {
96
97
  * The events that have occurred in the conversation. Can be used for deriving more
97
98
  * information about the conversation.
98
99
  */
99
- events: Array<EmailGenerateResponse.Event>;
100
+ events: Array<ConversationAPI.TicketEvent>;
100
101
 
101
102
  /**
102
103
  * The latest message type - useful for polling
@@ -111,101 +112,24 @@ export interface EmailGenerateResponse {
111
112
  /**
112
113
  * The full list of messages. This endpoint supports markdown.
113
114
  */
114
- messages: Array<EmailGenerateResponse.Message>;
115
+ messages: Array<ConversationAPI.TicketMessageDto>;
115
116
 
116
117
  /**
117
118
  * The status of the conversation
118
119
  */
119
120
  status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
120
121
 
122
+ /**
123
+ * The tags of the conversation
124
+ */
125
+ tags: Array<string>;
126
+
121
127
  /**
122
128
  * The timestamp of when the ticket was last updated in our system.
123
129
  */
124
130
  updatedAt: string;
125
131
  }
126
132
 
127
- export namespace EmailGenerateResponse {
128
- export interface Event {
129
- /**
130
- * The ID of the event
131
- */
132
- id: string;
133
-
134
- /**
135
- * The timestamp of the event
136
- */
137
- createdAt: string;
138
-
139
- /**
140
- * Any specific data associated with the event
141
- */
142
- data: unknown;
143
-
144
- /**
145
- * The type of the event
146
- */
147
- type:
148
- | 'ASSIGNED'
149
- | 'CLOSED'
150
- | 'ESCALATED'
151
- | 'ESCALATION_REQUEST'
152
- | 'PROCESSING_CANCELLED'
153
- | 'HOSTILE_MESSAGE'
154
- | 'NEW_TICKET';
155
- }
156
-
157
- export interface Message {
158
- /**
159
- * The ID of the conversation message
160
- */
161
- id: string;
162
-
163
- /**
164
- * Attachments that were attached to the message
165
- */
166
- attachments: Array<Message.Attachment>;
167
-
168
- /**
169
- * The content of the message. Markdown on plain text.
170
- */
171
- content: string;
172
-
173
- /**
174
- * The timestamp of the message.
175
- */
176
- createdAt: string;
177
-
178
- /**
179
- * The raw content of the message. Usually HTML.
180
- */
181
- rawContent: string;
182
-
183
- /**
184
- * The type of the message
185
- */
186
- type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
187
- }
188
-
189
- export namespace Message {
190
- export interface Attachment {
191
- /**
192
- * The name of the attachment
193
- */
194
- name: string;
195
-
196
- /**
197
- * The type of the attachment
198
- */
199
- type: string;
200
-
201
- /**
202
- * The URL of the attachment
203
- */
204
- url: string;
205
- }
206
- }
207
- }
208
-
209
133
  export interface EmailGetResponse {
210
134
  /**
211
135
  * The ID of the conversation
@@ -221,7 +145,7 @@ export interface EmailGetResponse {
221
145
  * The events that have occurred in the conversation. Can be used for deriving more
222
146
  * information about the conversation.
223
147
  */
224
- events: Array<EmailGetResponse.Event>;
148
+ events: Array<ConversationAPI.TicketEvent>;
225
149
 
226
150
  /**
227
151
  * The latest message type - useful for polling
@@ -236,101 +160,24 @@ export interface EmailGetResponse {
236
160
  /**
237
161
  * The full list of messages. This endpoint supports markdown.
238
162
  */
239
- messages: Array<EmailGetResponse.Message>;
163
+ messages: Array<ConversationAPI.TicketMessageDto>;
240
164
 
241
165
  /**
242
166
  * The status of the conversation
243
167
  */
244
168
  status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
245
169
 
170
+ /**
171
+ * The tags of the conversation
172
+ */
173
+ tags: Array<string>;
174
+
246
175
  /**
247
176
  * The timestamp of when the ticket was last updated in our system.
248
177
  */
249
178
  updatedAt: string;
250
179
  }
251
180
 
252
- export namespace EmailGetResponse {
253
- export interface Event {
254
- /**
255
- * The ID of the event
256
- */
257
- id: string;
258
-
259
- /**
260
- * The timestamp of the event
261
- */
262
- createdAt: string;
263
-
264
- /**
265
- * Any specific data associated with the event
266
- */
267
- data: unknown;
268
-
269
- /**
270
- * The type of the event
271
- */
272
- type:
273
- | 'ASSIGNED'
274
- | 'CLOSED'
275
- | 'ESCALATED'
276
- | 'ESCALATION_REQUEST'
277
- | 'PROCESSING_CANCELLED'
278
- | 'HOSTILE_MESSAGE'
279
- | 'NEW_TICKET';
280
- }
281
-
282
- export interface Message {
283
- /**
284
- * The ID of the conversation message
285
- */
286
- id: string;
287
-
288
- /**
289
- * Attachments that were attached to the message
290
- */
291
- attachments: Array<Message.Attachment>;
292
-
293
- /**
294
- * The content of the message. Markdown on plain text.
295
- */
296
- content: string;
297
-
298
- /**
299
- * The timestamp of the message.
300
- */
301
- createdAt: string;
302
-
303
- /**
304
- * The raw content of the message. Usually HTML.
305
- */
306
- rawContent: string;
307
-
308
- /**
309
- * The type of the message
310
- */
311
- type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
312
- }
313
-
314
- export namespace Message {
315
- export interface Attachment {
316
- /**
317
- * The name of the attachment
318
- */
319
- name: string;
320
-
321
- /**
322
- * The type of the attachment
323
- */
324
- type: string;
325
-
326
- /**
327
- * The URL of the attachment
328
- */
329
- url: string;
330
- }
331
- }
332
- }
333
-
334
181
  export interface EmailStartResponse {
335
182
  /**
336
183
  * The ID of the conversation
@@ -346,7 +193,7 @@ export interface EmailStartResponse {
346
193
  * The events that have occurred in the conversation. Can be used for deriving more
347
194
  * information about the conversation.
348
195
  */
349
- events: Array<EmailStartResponse.Event>;
196
+ events: Array<ConversationAPI.TicketEvent>;
350
197
 
351
198
  /**
352
199
  * The url of the conversation in the Lorikeet dashboard
@@ -357,44 +204,18 @@ export interface EmailStartResponse {
357
204
  * The status of the conversation
358
205
  */
359
206
  status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
360
- }
361
-
362
- export namespace EmailStartResponse {
363
- export interface Event {
364
- /**
365
- * The ID of the event
366
- */
367
- id: string;
368
-
369
- /**
370
- * The timestamp of the event
371
- */
372
- createdAt: string;
373
207
 
374
- /**
375
- * Any specific data associated with the event
376
- */
377
- data: unknown;
378
-
379
- /**
380
- * The type of the event
381
- */
382
- type:
383
- | 'ASSIGNED'
384
- | 'CLOSED'
385
- | 'ESCALATED'
386
- | 'ESCALATION_REQUEST'
387
- | 'PROCESSING_CANCELLED'
388
- | 'HOSTILE_MESSAGE'
389
- | 'NEW_TICKET';
390
- }
208
+ /**
209
+ * The tags of the conversation
210
+ */
211
+ tags: Array<string>;
391
212
  }
392
213
 
393
214
  export interface EmailGenerateParams {
394
215
  /**
395
216
  * Attachments to be sent with the message
396
217
  */
397
- attachments: Array<EmailGenerateParams.Attachment>;
218
+ attachments: Array<ConversationAPI.AttachmentDto>;
398
219
 
399
220
  /**
400
221
  * The ID of the conversation
@@ -414,23 +235,6 @@ export interface EmailGenerateParams {
414
235
  }
415
236
 
416
237
  export namespace EmailGenerateParams {
417
- export interface Attachment {
418
- /**
419
- * The name of the attachment
420
- */
421
- name: string;
422
-
423
- /**
424
- * The type of the attachment
425
- */
426
- type: string;
427
-
428
- /**
429
- * The URL of the attachment
430
- */
431
- url: string;
432
- }
433
-
434
238
  /**
435
239
  * Any additional customer information, that has changed in the course of the
436
240
  * conversation.
@@ -9,7 +9,16 @@ export {
9
9
  type ChatGetParams,
10
10
  type ChatStartParams,
11
11
  } from './chat';
12
- export { Conversation } from './conversation';
12
+ export {
13
+ Conversation,
14
+ type AttachmentDto,
15
+ type TicketEvent,
16
+ type TicketMessageDto,
17
+ type ConversationCreateResponse,
18
+ type ConversationRetrieveTranscriptResponse,
19
+ type ConversationCreateParams,
20
+ type ConversationRetrieveTranscriptParams,
21
+ } from './conversation';
13
22
  export {
14
23
  Email,
15
24
  type EmailGenerateResponse,