@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.
- package/CHANGELOG.md +40 -0
- package/README.md +17 -32
- package/core.d.ts +7 -4
- package/core.d.ts.map +1 -1
- package/core.js +16 -9
- package/core.js.map +1 -1
- package/core.mjs +16 -9
- package/core.mjs.map +1 -1
- package/index.d.mts +21 -3
- package/index.d.ts +21 -3
- package/index.d.ts.map +1 -1
- package/index.js +35 -7
- package/index.js.map +1 -1
- package/index.mjs +36 -8
- package/index.mjs.map +1 -1
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +279 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +1 -5
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/conversation/chat.d.ts +19 -164
- package/resources/conversation/chat.d.ts.map +1 -1
- package/resources/conversation/chat.js.map +1 -1
- package/resources/conversation/chat.mjs.map +1 -1
- package/resources/conversation/conversation.d.ts +116 -0
- package/resources/conversation/conversation.d.ts.map +1 -1
- package/resources/conversation/conversation.js +36 -0
- package/resources/conversation/conversation.js.map +1 -1
- package/resources/conversation/conversation.mjs +36 -0
- package/resources/conversation/conversation.mjs.map +1 -1
- package/resources/conversation/email.d.ts +19 -164
- package/resources/conversation/email.d.ts.map +1 -1
- package/resources/conversation/email.js.map +1 -1
- package/resources/conversation/email.mjs.map +1 -1
- package/resources/conversation/index.d.ts +1 -1
- package/resources/conversation/index.d.ts.map +1 -1
- package/resources/conversation/index.js.map +1 -1
- package/resources/conversation/index.mjs +1 -1
- package/resources/conversation/index.mjs.map +1 -1
- package/resources/customer/customer.d.ts +296 -0
- package/resources/customer/customer.d.ts.map +1 -0
- package/resources/customer/customer.js +79 -0
- package/resources/customer/customer.js.map +1 -0
- package/resources/customer/customer.mjs +52 -0
- package/resources/customer/customer.mjs.map +1 -0
- package/resources/customer/index.d.ts +3 -0
- package/resources/customer/index.d.ts.map +1 -0
- package/resources/customer/index.js +9 -0
- package/resources/customer/index.js.map +1 -0
- package/resources/customer/index.mjs +4 -0
- package/resources/customer/index.mjs.map +1 -0
- package/resources/customer/profile.d.ts +71 -0
- package/resources/customer/profile.d.ts.map +1 -0
- package/resources/customer/profile.js +21 -0
- package/resources/customer/profile.js.map +1 -0
- package/resources/customer/profile.mjs +17 -0
- package/resources/customer/profile.mjs.map +1 -0
- package/resources/customer.d.ts +1 -291
- package/resources/customer.d.ts.map +1 -1
- package/resources/customer.js +15 -45
- package/resources/customer.js.map +1 -1
- package/resources/customer.mjs +1 -43
- package/resources/customer.mjs.map +1 -1
- package/resources/file.d.ts +7 -0
- package/resources/file.d.ts.map +1 -0
- package/resources/file.js +21 -0
- package/resources/file.js.map +1 -0
- package/resources/file.mjs +17 -0
- package/resources/file.mjs.map +1 -0
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/ingest.d.ts +2 -0
- package/resources/ingest.d.ts.map +1 -1
- package/resources/ingest.js +9 -0
- package/resources/ingest.js.map +1 -1
- package/resources/ingest.mjs +9 -0
- package/resources/ingest.mjs.map +1 -1
- package/resources/oauth/authorization.d.ts +6 -0
- package/resources/oauth/authorization.d.ts.map +1 -0
- package/resources/oauth/authorization.js +15 -0
- package/resources/oauth/authorization.js.map +1 -0
- package/resources/oauth/authorization.mjs +11 -0
- package/resources/oauth/authorization.mjs.map +1 -0
- package/resources/oauth/index.d.ts +3 -0
- package/resources/oauth/index.d.ts.map +1 -0
- package/resources/oauth/index.js +9 -0
- package/resources/oauth/index.js.map +1 -0
- package/resources/oauth/index.mjs +4 -0
- package/resources/oauth/index.mjs.map +1 -0
- package/resources/oauth/oauth.d.ts +24 -0
- package/resources/oauth/oauth.d.ts.map +1 -0
- package/resources/oauth/oauth.js +65 -0
- package/resources/oauth/oauth.js.map +1 -0
- package/resources/oauth/oauth.mjs +38 -0
- package/resources/oauth/oauth.mjs.map +1 -0
- package/resources/oauth.d.ts +2 -0
- package/resources/oauth.d.ts.map +1 -0
- package/resources/oauth.js +19 -0
- package/resources/oauth.js.map +1 -0
- package/resources/oauth.mjs +3 -0
- package/resources/oauth.mjs.map +1 -0
- package/resources/suggestion.d.ts +7 -0
- package/resources/suggestion.d.ts.map +1 -0
- package/resources/suggestion.js +21 -0
- package/resources/suggestion.js.map +1 -0
- package/resources/suggestion.mjs +17 -0
- package/resources/suggestion.mjs.map +1 -0
- package/resources/ticket.d.ts +14 -0
- package/resources/ticket.d.ts.map +1 -0
- package/resources/ticket.js +16 -0
- package/resources/ticket.js.map +1 -0
- package/resources/ticket.mjs +12 -0
- package/resources/ticket.mjs.map +1 -0
- package/resources/top-level.d.ts +2 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources/webhooks.d.ts +6 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +15 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +11 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources/workflow.d.ts +1 -0
- package/resources/workflow.d.ts.map +1 -1
- package/resources/workflow.js +3 -0
- package/resources/workflow.js.map +1 -1
- package/resources/workflow.mjs +3 -0
- package/resources/workflow.mjs.map +1 -1
- package/src/core.ts +17 -8
- package/src/index.ts +77 -10
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/resource.ts +1 -1
- package/src/resources/conversation/chat.ts +21 -217
- package/src/resources/conversation/conversation.ts +175 -0
- package/src/resources/conversation/email.ts +21 -217
- package/src/resources/conversation/index.ts +10 -1
- package/src/resources/customer/customer.ts +386 -0
- package/src/resources/customer/index.ts +13 -0
- package/src/resources/customer/profile.ts +89 -0
- package/src/resources/customer.ts +1 -372
- package/src/resources/file.ts +20 -0
- package/src/resources/index.ts +15 -2
- package/src/resources/ingest.ts +17 -0
- package/src/resources/oauth/authorization.ts +13 -0
- package/src/resources/oauth/index.ts +4 -0
- package/src/resources/oauth/oauth.ts +63 -0
- package/src/resources/oauth.ts +3 -0
- package/src/resources/suggestion.ts +20 -0
- package/src/resources/ticket.ts +30 -0
- package/src/resources/top-level.ts +3 -0
- package/src/resources/webhooks.ts +13 -0
- package/src/resources/workflow.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../resource.js";
|
|
2
2
|
import * as Core from "../../core.js";
|
|
3
|
+
import * as ConversationAPI from "./conversation.js";
|
|
3
4
|
export declare class Chat extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* __chat.generate__
|
|
@@ -93,7 +94,7 @@ export interface ChatGenerateResponse {
|
|
|
93
94
|
* The events that have occurred in the conversation. Can be used for deriving more
|
|
94
95
|
* information about the conversation.
|
|
95
96
|
*/
|
|
96
|
-
events: Array<
|
|
97
|
+
events: Array<ConversationAPI.TicketEvent>;
|
|
97
98
|
/**
|
|
98
99
|
* The latest message type - useful for polling
|
|
99
100
|
*/
|
|
@@ -105,78 +106,20 @@ export interface ChatGenerateResponse {
|
|
|
105
106
|
/**
|
|
106
107
|
* The full list of messages. This endpoint supports markdown.
|
|
107
108
|
*/
|
|
108
|
-
messages: Array<
|
|
109
|
+
messages: Array<ConversationAPI.TicketMessageDto>;
|
|
109
110
|
/**
|
|
110
111
|
* The status of the conversation
|
|
111
112
|
*/
|
|
112
113
|
status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
|
|
114
|
+
/**
|
|
115
|
+
* The tags of the conversation
|
|
116
|
+
*/
|
|
117
|
+
tags: Array<string>;
|
|
113
118
|
/**
|
|
114
119
|
* The timestamp of when the ticket was last updated in our system.
|
|
115
120
|
*/
|
|
116
121
|
updatedAt: string;
|
|
117
122
|
}
|
|
118
|
-
export declare namespace ChatGenerateResponse {
|
|
119
|
-
interface Event {
|
|
120
|
-
/**
|
|
121
|
-
* The ID of the event
|
|
122
|
-
*/
|
|
123
|
-
id: string;
|
|
124
|
-
/**
|
|
125
|
-
* The timestamp of the event
|
|
126
|
-
*/
|
|
127
|
-
createdAt: string;
|
|
128
|
-
/**
|
|
129
|
-
* Any specific data associated with the event
|
|
130
|
-
*/
|
|
131
|
-
data: unknown;
|
|
132
|
-
/**
|
|
133
|
-
* The type of the event
|
|
134
|
-
*/
|
|
135
|
-
type: 'ASSIGNED' | 'CLOSED' | 'ESCALATED' | 'ESCALATION_REQUEST' | 'PROCESSING_CANCELLED' | 'HOSTILE_MESSAGE' | 'NEW_TICKET';
|
|
136
|
-
}
|
|
137
|
-
interface Message {
|
|
138
|
-
/**
|
|
139
|
-
* The ID of the conversation message
|
|
140
|
-
*/
|
|
141
|
-
id: string;
|
|
142
|
-
/**
|
|
143
|
-
* Attachments that were attached to the message
|
|
144
|
-
*/
|
|
145
|
-
attachments: Array<Message.Attachment>;
|
|
146
|
-
/**
|
|
147
|
-
* The content of the message. Markdown on plain text.
|
|
148
|
-
*/
|
|
149
|
-
content: string;
|
|
150
|
-
/**
|
|
151
|
-
* The timestamp of the message.
|
|
152
|
-
*/
|
|
153
|
-
createdAt: string;
|
|
154
|
-
/**
|
|
155
|
-
* The raw content of the message. Usually HTML.
|
|
156
|
-
*/
|
|
157
|
-
rawContent: string;
|
|
158
|
-
/**
|
|
159
|
-
* The type of the message
|
|
160
|
-
*/
|
|
161
|
-
type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
|
|
162
|
-
}
|
|
163
|
-
namespace Message {
|
|
164
|
-
interface Attachment {
|
|
165
|
-
/**
|
|
166
|
-
* The name of the attachment
|
|
167
|
-
*/
|
|
168
|
-
name: string;
|
|
169
|
-
/**
|
|
170
|
-
* The type of the attachment
|
|
171
|
-
*/
|
|
172
|
-
type: string;
|
|
173
|
-
/**
|
|
174
|
-
* The URL of the attachment
|
|
175
|
-
*/
|
|
176
|
-
url: string;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
123
|
export interface ChatGetResponse {
|
|
181
124
|
/**
|
|
182
125
|
* The ID of the conversation
|
|
@@ -190,7 +133,7 @@ export interface ChatGetResponse {
|
|
|
190
133
|
* The events that have occurred in the conversation. Can be used for deriving more
|
|
191
134
|
* information about the conversation.
|
|
192
135
|
*/
|
|
193
|
-
events: Array<
|
|
136
|
+
events: Array<ConversationAPI.TicketEvent>;
|
|
194
137
|
/**
|
|
195
138
|
* The latest message type - useful for polling
|
|
196
139
|
*/
|
|
@@ -202,78 +145,20 @@ export interface ChatGetResponse {
|
|
|
202
145
|
/**
|
|
203
146
|
* The full list of messages. This endpoint supports markdown.
|
|
204
147
|
*/
|
|
205
|
-
messages: Array<
|
|
148
|
+
messages: Array<ConversationAPI.TicketMessageDto>;
|
|
206
149
|
/**
|
|
207
150
|
* The status of the conversation
|
|
208
151
|
*/
|
|
209
152
|
status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
|
|
153
|
+
/**
|
|
154
|
+
* The tags of the conversation
|
|
155
|
+
*/
|
|
156
|
+
tags: Array<string>;
|
|
210
157
|
/**
|
|
211
158
|
* The timestamp of when the ticket was last updated in our system.
|
|
212
159
|
*/
|
|
213
160
|
updatedAt: string;
|
|
214
161
|
}
|
|
215
|
-
export declare namespace ChatGetResponse {
|
|
216
|
-
interface Event {
|
|
217
|
-
/**
|
|
218
|
-
* The ID of the event
|
|
219
|
-
*/
|
|
220
|
-
id: string;
|
|
221
|
-
/**
|
|
222
|
-
* The timestamp of the event
|
|
223
|
-
*/
|
|
224
|
-
createdAt: string;
|
|
225
|
-
/**
|
|
226
|
-
* Any specific data associated with the event
|
|
227
|
-
*/
|
|
228
|
-
data: unknown;
|
|
229
|
-
/**
|
|
230
|
-
* The type of the event
|
|
231
|
-
*/
|
|
232
|
-
type: 'ASSIGNED' | 'CLOSED' | 'ESCALATED' | 'ESCALATION_REQUEST' | 'PROCESSING_CANCELLED' | 'HOSTILE_MESSAGE' | 'NEW_TICKET';
|
|
233
|
-
}
|
|
234
|
-
interface Message {
|
|
235
|
-
/**
|
|
236
|
-
* The ID of the conversation message
|
|
237
|
-
*/
|
|
238
|
-
id: string;
|
|
239
|
-
/**
|
|
240
|
-
* Attachments that were attached to the message
|
|
241
|
-
*/
|
|
242
|
-
attachments: Array<Message.Attachment>;
|
|
243
|
-
/**
|
|
244
|
-
* The content of the message. Markdown on plain text.
|
|
245
|
-
*/
|
|
246
|
-
content: string;
|
|
247
|
-
/**
|
|
248
|
-
* The timestamp of the message.
|
|
249
|
-
*/
|
|
250
|
-
createdAt: string;
|
|
251
|
-
/**
|
|
252
|
-
* The raw content of the message. Usually HTML.
|
|
253
|
-
*/
|
|
254
|
-
rawContent: string;
|
|
255
|
-
/**
|
|
256
|
-
* The type of the message
|
|
257
|
-
*/
|
|
258
|
-
type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
|
|
259
|
-
}
|
|
260
|
-
namespace Message {
|
|
261
|
-
interface Attachment {
|
|
262
|
-
/**
|
|
263
|
-
* The name of the attachment
|
|
264
|
-
*/
|
|
265
|
-
name: string;
|
|
266
|
-
/**
|
|
267
|
-
* The type of the attachment
|
|
268
|
-
*/
|
|
269
|
-
type: string;
|
|
270
|
-
/**
|
|
271
|
-
* The URL of the attachment
|
|
272
|
-
*/
|
|
273
|
-
url: string;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
162
|
export interface ChatStartResponse {
|
|
278
163
|
/**
|
|
279
164
|
* The ID of the conversation
|
|
@@ -287,7 +172,7 @@ export interface ChatStartResponse {
|
|
|
287
172
|
* The events that have occurred in the conversation. Can be used for deriving more
|
|
288
173
|
* information about the conversation.
|
|
289
174
|
*/
|
|
290
|
-
events: Array<
|
|
175
|
+
events: Array<ConversationAPI.TicketEvent>;
|
|
291
176
|
/**
|
|
292
177
|
* The url of the conversation in the Lorikeet dashboard
|
|
293
178
|
*/
|
|
@@ -296,32 +181,16 @@ export interface ChatStartResponse {
|
|
|
296
181
|
* The status of the conversation
|
|
297
182
|
*/
|
|
298
183
|
status: 'Unprocessed' | 'Processing' | 'Unhandled' | 'Responded' | 'Error' | 'Escalated' | 'Processed';
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* The ID of the event
|
|
304
|
-
*/
|
|
305
|
-
id: string;
|
|
306
|
-
/**
|
|
307
|
-
* The timestamp of the event
|
|
308
|
-
*/
|
|
309
|
-
createdAt: string;
|
|
310
|
-
/**
|
|
311
|
-
* Any specific data associated with the event
|
|
312
|
-
*/
|
|
313
|
-
data: unknown;
|
|
314
|
-
/**
|
|
315
|
-
* The type of the event
|
|
316
|
-
*/
|
|
317
|
-
type: 'ASSIGNED' | 'CLOSED' | 'ESCALATED' | 'ESCALATION_REQUEST' | 'PROCESSING_CANCELLED' | 'HOSTILE_MESSAGE' | 'NEW_TICKET';
|
|
318
|
-
}
|
|
184
|
+
/**
|
|
185
|
+
* The tags of the conversation
|
|
186
|
+
*/
|
|
187
|
+
tags: Array<string>;
|
|
319
188
|
}
|
|
320
189
|
export interface ChatGenerateParams {
|
|
321
190
|
/**
|
|
322
191
|
* Attachments to be sent with the message
|
|
323
192
|
*/
|
|
324
|
-
attachments: Array<
|
|
193
|
+
attachments: Array<ConversationAPI.AttachmentDto>;
|
|
325
194
|
/**
|
|
326
195
|
* The ID of the conversation
|
|
327
196
|
*/
|
|
@@ -337,20 +206,6 @@ export interface ChatGenerateParams {
|
|
|
337
206
|
customer?: ChatGenerateParams.Customer;
|
|
338
207
|
}
|
|
339
208
|
export declare namespace ChatGenerateParams {
|
|
340
|
-
interface Attachment {
|
|
341
|
-
/**
|
|
342
|
-
* The name of the attachment
|
|
343
|
-
*/
|
|
344
|
-
name: string;
|
|
345
|
-
/**
|
|
346
|
-
* The type of the attachment
|
|
347
|
-
*/
|
|
348
|
-
type: string;
|
|
349
|
-
/**
|
|
350
|
-
* The URL of the attachment
|
|
351
|
-
*/
|
|
352
|
-
url: string;
|
|
353
|
-
}
|
|
354
209
|
/**
|
|
355
210
|
* Any additional customer information, that has changed in the course of the
|
|
356
211
|
* conversation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAElD,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;OAaG;IAEH;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAIxG;;;;OAIG;IAEH;;;;;;;OAOG;IACH,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IAI1F;;;;;;;;OAQG;IAEH;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAI/F;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IAMlG;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;CAwB5F;AAED,MAAM,WAAW,oBAAoB;IACnC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EG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/conversation/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAE7C,oEAAgE;
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/conversation/chat.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAE7C,oEAAgE;AAGhE,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;OAaG;IAEH;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;OAIG;IAEH;;;;;;;OAOG;IACH,GAAG,CAAC,KAAoB,EAAE,OAA6B;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;OAQG;IAEH;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAqB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,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,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,EAC9E;YACE,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,MAAO;YACpC,QAAQ,EAAE,IAAK;YACf,SAAS,EAAE,CAAC,YAAY,EAAE,EAAE;gBAC1B,0DAA0D;gBAC1D,IAAI,YAAY,CAAC,MAAM,KAAK,WAAW,IAAI,YAAY,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;oBAC3E,OAAO,IAAI,CAAC;gBACd,CAAC;gBAED,IACE,YAAY,CAAC,iBAAiB,KAAK,cAAc;oBACjD,YAAY,CAAC,iBAAiB,KAAK,kBAAkB,EACrD,CAAC;oBACD,OAAO,IAAI,CAAC;gBACd,CAAC;gBAED,OAAO,KAAK,CAAC;YACf,CAAC;SACF,CACkC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
2
3
|
import * as ChatAPI from "./chat.js";
|
|
3
4
|
import { Chat, ChatGenerateParams, ChatGenerateResponse, ChatGetParams, ChatGetResponse, ChatStartParams, ChatStartResponse } from "./chat.js";
|
|
4
5
|
import * as EmailAPI from "./email.js";
|
|
@@ -6,8 +7,123 @@ import { Email, EmailGenerateParams, EmailGenerateResponse, EmailGetParams, Emai
|
|
|
6
7
|
export declare class Conversation extends APIResource {
|
|
7
8
|
email: EmailAPI.Email;
|
|
8
9
|
chat: ChatAPI.Chat;
|
|
10
|
+
/**
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const conversation = await client.conversation.create({
|
|
14
|
+
* customerId: '1234567890',
|
|
15
|
+
* phoneNumber: '0412745903',
|
|
16
|
+
* 'x-lorikeet-voice-public-key':
|
|
17
|
+
* 'x-lorikeet-voice-public-key',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(params: ConversationCreateParams, options?: Core.RequestOptions): Core.APIPromise<ConversationCreateResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response =
|
|
26
|
+
* await client.conversation.retrieveTranscript('ticketId', {
|
|
27
|
+
* 'x-lorikeet-voice-public-key':
|
|
28
|
+
* 'x-lorikeet-voice-public-key',
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
retrieveTranscript(ticketId: string, params: ConversationRetrieveTranscriptParams, options?: Core.RequestOptions): Core.APIPromise<ConversationRetrieveTranscriptResponse>;
|
|
33
|
+
}
|
|
34
|
+
export interface AttachmentDto {
|
|
35
|
+
/**
|
|
36
|
+
* The name of the attachment
|
|
37
|
+
*/
|
|
38
|
+
name: string;
|
|
39
|
+
/**
|
|
40
|
+
* The type of the attachment
|
|
41
|
+
*/
|
|
42
|
+
type: string;
|
|
43
|
+
/**
|
|
44
|
+
* The URL of the attachment
|
|
45
|
+
*/
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TicketEvent {
|
|
49
|
+
/**
|
|
50
|
+
* The ID of the event
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* The timestamp of the event
|
|
55
|
+
*/
|
|
56
|
+
createdAt: string;
|
|
57
|
+
/**
|
|
58
|
+
* Any specific data associated with the event
|
|
59
|
+
*/
|
|
60
|
+
data: unknown;
|
|
61
|
+
/**
|
|
62
|
+
* The type of the event
|
|
63
|
+
*/
|
|
64
|
+
type: 'ASSIGNED' | 'CLOSED' | 'ESCALATED' | 'ESCALATION_REQUEST' | 'PROCESSING_CANCELLED' | 'HOSTILE_MESSAGE' | 'NEW_TICKET' | 'CALL_ENDED';
|
|
65
|
+
}
|
|
66
|
+
export interface TicketMessageDto {
|
|
67
|
+
/**
|
|
68
|
+
* The ID of the conversation message
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
/**
|
|
72
|
+
* Attachments that were attached to the message
|
|
73
|
+
*/
|
|
74
|
+
attachments: Array<AttachmentDto>;
|
|
75
|
+
/**
|
|
76
|
+
* The content of the message. Markdown on plain text.
|
|
77
|
+
*/
|
|
78
|
+
content: string;
|
|
79
|
+
/**
|
|
80
|
+
* The timestamp of the message.
|
|
81
|
+
*/
|
|
82
|
+
createdAt: string;
|
|
83
|
+
/**
|
|
84
|
+
* The raw content of the message. Usually HTML.
|
|
85
|
+
*/
|
|
86
|
+
rawContent: string;
|
|
87
|
+
/**
|
|
88
|
+
* The type of the message
|
|
89
|
+
*/
|
|
90
|
+
type: 'CUSTOMER' | 'BOT_RESPONSE' | 'PENDING_RESPONSE' | 'DRAFT_RESPONSE';
|
|
91
|
+
}
|
|
92
|
+
export interface ConversationCreateResponse {
|
|
93
|
+
/**
|
|
94
|
+
* The id of the ticket created
|
|
95
|
+
*/
|
|
96
|
+
ticketId: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ConversationRetrieveTranscriptResponse {
|
|
99
|
+
/**
|
|
100
|
+
* The custom attributes of the conversation
|
|
101
|
+
*/
|
|
102
|
+
customAttributes: unknown;
|
|
103
|
+
/**
|
|
104
|
+
* The transcript of the conversation
|
|
105
|
+
*/
|
|
106
|
+
transcript: string;
|
|
107
|
+
}
|
|
108
|
+
export interface ConversationCreateParams {
|
|
109
|
+
/**
|
|
110
|
+
* Body param: The id of the customer in the ticketing system
|
|
111
|
+
*/
|
|
112
|
+
customerId: string;
|
|
113
|
+
/**
|
|
114
|
+
* Body param: The phone number of the customer
|
|
115
|
+
*/
|
|
116
|
+
phoneNumber: string;
|
|
117
|
+
/**
|
|
118
|
+
* Header param:
|
|
119
|
+
*/
|
|
120
|
+
'x-lorikeet-voice-public-key': string;
|
|
121
|
+
}
|
|
122
|
+
export interface ConversationRetrieveTranscriptParams {
|
|
123
|
+
'x-lorikeet-voice-public-key': string;
|
|
9
124
|
}
|
|
10
125
|
export declare namespace Conversation {
|
|
126
|
+
export { type AttachmentDto as AttachmentDto, type TicketEvent as TicketEvent, type TicketMessageDto as TicketMessageDto, type ConversationCreateResponse as ConversationCreateResponse, type ConversationRetrieveTranscriptResponse as ConversationRetrieveTranscriptResponse, type ConversationCreateParams as ConversationCreateParams, type ConversationRetrieveTranscriptParams as ConversationRetrieveTranscriptParams, };
|
|
11
127
|
export { Email as Email, type EmailGenerateResponse as EmailGenerateResponse, type EmailGetResponse as EmailGetResponse, type EmailStartResponse as EmailStartResponse, type EmailGenerateParams as EmailGenerateParams, type EmailGetParams as EmailGetParams, type EmailStartParams as EmailStartParams, };
|
|
12
128
|
export { Chat as Chat, type ChatGenerateResponse as ChatGenerateResponse, type ChatGetResponse as ChatGetResponse, type ChatStartResponse as ChatStartResponse, type ChatGenerateParams as ChatGenerateParams, type ChatGetParams as ChatGetParams, type ChatStartParams as ChatStartParams, };
|
|
13
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAClC,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,KAAK,EACL,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"A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B,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -36,6 +36,42 @@ class Conversation extends resource_1.APIResource {
|
|
|
36
36
|
this.email = new EmailAPI.Email(this._client);
|
|
37
37
|
this.chat = new ChatAPI.Chat(this._client);
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const conversation = await client.conversation.create({
|
|
43
|
+
* customerId: '1234567890',
|
|
44
|
+
* phoneNumber: '0412745903',
|
|
45
|
+
* 'x-lorikeet-voice-public-key':
|
|
46
|
+
* 'x-lorikeet-voice-public-key',
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
create(params, options) {
|
|
51
|
+
const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...body } = params;
|
|
52
|
+
return this._client.post('/v1/conversation/new', {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response =
|
|
62
|
+
* await client.conversation.retrieveTranscript('ticketId', {
|
|
63
|
+
* 'x-lorikeet-voice-public-key':
|
|
64
|
+
* 'x-lorikeet-voice-public-key',
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
retrieveTranscript(ticketId, params, options) {
|
|
69
|
+
const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey } = params;
|
|
70
|
+
return this._client.get(`/v1/conversation/transcript/${ticketId}`, {
|
|
71
|
+
...options,
|
|
72
|
+
headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
|
|
73
|
+
});
|
|
74
|
+
}
|
|
39
75
|
}
|
|
40
76
|
exports.Conversation = Conversation;
|
|
41
77
|
Conversation.Email = email_1.Email;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;
|
|
1
|
+
{"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,mDAAkC;AAClC,oCAQgB;AAChB,qDAAoC;AACpC,sCAQiB;AAEjB,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA8CtD,CAAC;IA5CC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,MAAgC,EAChC,OAA6B;QAE7B,MAAM,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACnF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACzF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,kBAAkB,CAChB,QAAgB,EAChB,MAA4C,EAC5C,OAA6B;QAE7B,MAAM,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,QAAQ,EAAE,EAAE;YACjE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACzF,CAAC,CAAC;IACL,CAAC;CACF;AAhDD,oCAgDC;AAyHD,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC;AAC3B,YAAY,CAAC,IAAI,GAAG,WAAI,CAAC"}
|
|
@@ -10,6 +10,42 @@ export class Conversation extends APIResource {
|
|
|
10
10
|
this.email = new EmailAPI.Email(this._client);
|
|
11
11
|
this.chat = new ChatAPI.Chat(this._client);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const conversation = await client.conversation.create({
|
|
17
|
+
* customerId: '1234567890',
|
|
18
|
+
* phoneNumber: '0412745903',
|
|
19
|
+
* 'x-lorikeet-voice-public-key':
|
|
20
|
+
* 'x-lorikeet-voice-public-key',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(params, options) {
|
|
25
|
+
const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...body } = params;
|
|
26
|
+
return this._client.post('/v1/conversation/new', {
|
|
27
|
+
body,
|
|
28
|
+
...options,
|
|
29
|
+
headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response =
|
|
36
|
+
* await client.conversation.retrieveTranscript('ticketId', {
|
|
37
|
+
* 'x-lorikeet-voice-public-key':
|
|
38
|
+
* 'x-lorikeet-voice-public-key',
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
retrieveTranscript(ticketId, params, options) {
|
|
43
|
+
const { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey } = params;
|
|
44
|
+
return this._client.get(`/v1/conversation/transcript/${ticketId}`, {
|
|
45
|
+
...options,
|
|
46
|
+
headers: { 'x-lorikeet-voice-public-key': xLorikeetVoicePublicKey, ...options?.headers },
|
|
47
|
+
});
|
|
48
|
+
}
|
|
13
49
|
}
|
|
14
50
|
Conversation.Email = Email;
|
|
15
51
|
Conversation.Chat = Chat;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../../src/resources/conversation/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,OAAO;OACZ,EACL,IAAI,GAOL;OACM,KAAK,QAAQ;OACb,EACL,KAAK,GAON;AAED,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA8CtD,CAAC;IA5CC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,MAAgC,EAChC,OAA6B;QAE7B,MAAM,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAA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