@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,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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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<
|
|
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 {
|
|
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,
|