@botpress/webchat 1.3.3 → 1.3.4
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/.turbo/turbo-build.log +23 -0
- package/dist/adapters/messaging-to-target.d.ts +15 -15
- package/dist/adapters/webchat-to-target.d.ts +3 -3
- package/dist/client/PushpinClient/inner-client/index.d.ts +2 -2
- package/dist/gen/client/index.d.ts +78 -13
- package/dist/gen/client/models.d.ts +210 -0
- package/dist/gen/client/operations/addParticipant.d.ts +51 -0
- package/dist/gen/client/operations/createConversation.d.ts +39 -0
- package/dist/gen/client/operations/createEvent.d.ts +79 -0
- package/dist/gen/client/operations/createMessage.d.ts +274 -0
- package/dist/gen/client/operations/createUser.d.ts +60 -0
- package/dist/gen/client/operations/deleteConversation.d.ts +22 -0
- package/dist/gen/client/operations/deleteMessage.d.ts +22 -0
- package/dist/gen/client/operations/deleteUser.d.ts +21 -0
- package/dist/gen/client/operations/getConversation.d.ts +36 -0
- package/dist/gen/client/operations/getEvent.d.ts +58 -0
- package/dist/gen/client/operations/getMessage.d.ts +157 -0
- package/dist/gen/client/operations/getParticipant.d.ts +48 -0
- package/dist/gen/client/operations/getUser.d.ts +46 -0
- package/dist/gen/client/operations/listConversationMessages.d.ts +161 -0
- package/dist/gen/client/operations/listConversations.d.ts +42 -0
- package/dist/gen/client/operations/listParticipants.d.ts +51 -0
- package/dist/gen/client/operations/listenConversation.d.ts +22 -0
- package/dist/gen/client/operations/removeParticipant.d.ts +23 -0
- package/dist/gen/client/operations/updateUser.d.ts +60 -0
- package/dist/index.js +32872 -21167
- package/dist/index.umd.cjs +278 -95
- package/openapi.ts +5 -9
- package/package.json +3 -1
- package/dist/gen/client/api.d.ts +0 -2039
- package/dist/gen/client/base.d.ts +0 -54
- package/dist/gen/client/client.d.ts +0 -61
- package/dist/gen/client/common.d.ts +0 -65
- package/dist/gen/client/configuration.d.ts +0 -83
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
export interface CreateMessageRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface CreateMessageRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface CreateMessageRequestParams {
|
|
7
|
+
}
|
|
8
|
+
export interface CreateMessageRequestBody {
|
|
9
|
+
/**
|
|
10
|
+
* Payload is the content type of the message.
|
|
11
|
+
*/
|
|
12
|
+
payload: {
|
|
13
|
+
audioUrl: string;
|
|
14
|
+
/**
|
|
15
|
+
* CSS className to apply to the message
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
type: "audio";
|
|
19
|
+
} | {
|
|
20
|
+
title: string;
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
imageUrl?: string;
|
|
23
|
+
actions: {
|
|
24
|
+
action: "postback" | "url" | "say";
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}[];
|
|
28
|
+
type: "card";
|
|
29
|
+
/**
|
|
30
|
+
* CSS className to apply to the message
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
} | {
|
|
34
|
+
items: {
|
|
35
|
+
title: string;
|
|
36
|
+
subtitle?: string;
|
|
37
|
+
imageUrl?: string;
|
|
38
|
+
actions: {
|
|
39
|
+
action: "postback" | "url" | "say";
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
/**
|
|
44
|
+
* CSS className to apply to the message
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
}[];
|
|
48
|
+
/**
|
|
49
|
+
* CSS className to apply to the message
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
type: "carousel";
|
|
53
|
+
} | {
|
|
54
|
+
text: string;
|
|
55
|
+
options: {
|
|
56
|
+
label: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}[];
|
|
59
|
+
/**
|
|
60
|
+
* CSS className to apply to the message
|
|
61
|
+
*/
|
|
62
|
+
className?: string;
|
|
63
|
+
type: "choice";
|
|
64
|
+
disableFreeText?: boolean;
|
|
65
|
+
} | {
|
|
66
|
+
text: string;
|
|
67
|
+
options: {
|
|
68
|
+
label: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}[];
|
|
71
|
+
/**
|
|
72
|
+
* CSS className to apply to the message
|
|
73
|
+
*/
|
|
74
|
+
className?: string;
|
|
75
|
+
type: "dropdown";
|
|
76
|
+
} | {
|
|
77
|
+
fileUrl: string;
|
|
78
|
+
title?: string;
|
|
79
|
+
/**
|
|
80
|
+
* CSS className to apply to the message
|
|
81
|
+
*/
|
|
82
|
+
className?: string;
|
|
83
|
+
type: "file";
|
|
84
|
+
} | {
|
|
85
|
+
imageUrl: string;
|
|
86
|
+
/**
|
|
87
|
+
* CSS className to apply to the message
|
|
88
|
+
*/
|
|
89
|
+
className?: string;
|
|
90
|
+
type: "image";
|
|
91
|
+
} | {
|
|
92
|
+
latitude: number;
|
|
93
|
+
longitude: number;
|
|
94
|
+
address?: string;
|
|
95
|
+
title?: string;
|
|
96
|
+
/**
|
|
97
|
+
* CSS className to apply to the message
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
type: "location";
|
|
101
|
+
} | {
|
|
102
|
+
markdown: string;
|
|
103
|
+
/**
|
|
104
|
+
* CSS className to apply to the message
|
|
105
|
+
*/
|
|
106
|
+
className?: string;
|
|
107
|
+
type: "markdown";
|
|
108
|
+
} | {
|
|
109
|
+
text: string;
|
|
110
|
+
/**
|
|
111
|
+
* CSS className to apply to the message
|
|
112
|
+
*/
|
|
113
|
+
className?: string;
|
|
114
|
+
type: "text";
|
|
115
|
+
} | {
|
|
116
|
+
videoUrl: string;
|
|
117
|
+
/**
|
|
118
|
+
* CSS className to apply to the message
|
|
119
|
+
*/
|
|
120
|
+
className?: string;
|
|
121
|
+
type: "video";
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* ID of the [Conversation](#schema_conversation)
|
|
125
|
+
*/
|
|
126
|
+
conversationId: string;
|
|
127
|
+
}
|
|
128
|
+
export type CreateMessageInput = CreateMessageRequestBody & CreateMessageRequestHeaders & CreateMessageRequestQuery & CreateMessageRequestParams;
|
|
129
|
+
export type CreateMessageRequest = {
|
|
130
|
+
headers: CreateMessageRequestHeaders;
|
|
131
|
+
query: CreateMessageRequestQuery;
|
|
132
|
+
params: CreateMessageRequestParams;
|
|
133
|
+
body: CreateMessageRequestBody;
|
|
134
|
+
};
|
|
135
|
+
export declare const parseReq: (input: CreateMessageInput) => CreateMessageRequest & {
|
|
136
|
+
path: string;
|
|
137
|
+
};
|
|
138
|
+
export interface CreateMessageResponse {
|
|
139
|
+
/**
|
|
140
|
+
* The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
|
|
141
|
+
*/
|
|
142
|
+
message: {
|
|
143
|
+
/**
|
|
144
|
+
* Id of the [Message](#schema_message)
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
/**
|
|
148
|
+
* Creation date of the [Message](#schema_message) in ISO 8601 format
|
|
149
|
+
*/
|
|
150
|
+
createdAt: string;
|
|
151
|
+
/**
|
|
152
|
+
* Payload is the content type of the message.
|
|
153
|
+
*/
|
|
154
|
+
payload: {
|
|
155
|
+
audioUrl: string;
|
|
156
|
+
/**
|
|
157
|
+
* CSS className to apply to the message
|
|
158
|
+
*/
|
|
159
|
+
className?: string;
|
|
160
|
+
type: "audio";
|
|
161
|
+
} | {
|
|
162
|
+
title: string;
|
|
163
|
+
subtitle?: string;
|
|
164
|
+
imageUrl?: string;
|
|
165
|
+
actions: {
|
|
166
|
+
action: "postback" | "url" | "say";
|
|
167
|
+
label: string;
|
|
168
|
+
value: string;
|
|
169
|
+
}[];
|
|
170
|
+
type: "card";
|
|
171
|
+
/**
|
|
172
|
+
* CSS className to apply to the message
|
|
173
|
+
*/
|
|
174
|
+
className?: string;
|
|
175
|
+
} | {
|
|
176
|
+
items: {
|
|
177
|
+
title: string;
|
|
178
|
+
subtitle?: string;
|
|
179
|
+
imageUrl?: string;
|
|
180
|
+
actions: {
|
|
181
|
+
action: "postback" | "url" | "say";
|
|
182
|
+
label: string;
|
|
183
|
+
value: string;
|
|
184
|
+
}[];
|
|
185
|
+
/**
|
|
186
|
+
* CSS className to apply to the message
|
|
187
|
+
*/
|
|
188
|
+
className?: string;
|
|
189
|
+
}[];
|
|
190
|
+
/**
|
|
191
|
+
* CSS className to apply to the message
|
|
192
|
+
*/
|
|
193
|
+
className?: string;
|
|
194
|
+
type: "carousel";
|
|
195
|
+
} | {
|
|
196
|
+
text: string;
|
|
197
|
+
options: {
|
|
198
|
+
label: string;
|
|
199
|
+
value: string;
|
|
200
|
+
}[];
|
|
201
|
+
/**
|
|
202
|
+
* CSS className to apply to the message
|
|
203
|
+
*/
|
|
204
|
+
className?: string;
|
|
205
|
+
type: "choice";
|
|
206
|
+
disableFreeText?: boolean;
|
|
207
|
+
} | {
|
|
208
|
+
text: string;
|
|
209
|
+
options: {
|
|
210
|
+
label: string;
|
|
211
|
+
value: string;
|
|
212
|
+
}[];
|
|
213
|
+
/**
|
|
214
|
+
* CSS className to apply to the message
|
|
215
|
+
*/
|
|
216
|
+
className?: string;
|
|
217
|
+
type: "dropdown";
|
|
218
|
+
} | {
|
|
219
|
+
fileUrl: string;
|
|
220
|
+
title?: string;
|
|
221
|
+
/**
|
|
222
|
+
* CSS className to apply to the message
|
|
223
|
+
*/
|
|
224
|
+
className?: string;
|
|
225
|
+
type: "file";
|
|
226
|
+
} | {
|
|
227
|
+
imageUrl: string;
|
|
228
|
+
/**
|
|
229
|
+
* CSS className to apply to the message
|
|
230
|
+
*/
|
|
231
|
+
className?: string;
|
|
232
|
+
type: "image";
|
|
233
|
+
} | {
|
|
234
|
+
latitude: number;
|
|
235
|
+
longitude: number;
|
|
236
|
+
address?: string;
|
|
237
|
+
title?: string;
|
|
238
|
+
/**
|
|
239
|
+
* CSS className to apply to the message
|
|
240
|
+
*/
|
|
241
|
+
className?: string;
|
|
242
|
+
type: "location";
|
|
243
|
+
} | {
|
|
244
|
+
markdown: string;
|
|
245
|
+
/**
|
|
246
|
+
* CSS className to apply to the message
|
|
247
|
+
*/
|
|
248
|
+
className?: string;
|
|
249
|
+
type: "markdown";
|
|
250
|
+
} | {
|
|
251
|
+
text: string;
|
|
252
|
+
/**
|
|
253
|
+
* CSS className to apply to the message
|
|
254
|
+
*/
|
|
255
|
+
className?: string;
|
|
256
|
+
type: "text";
|
|
257
|
+
} | {
|
|
258
|
+
videoUrl: string;
|
|
259
|
+
/**
|
|
260
|
+
* CSS className to apply to the message
|
|
261
|
+
*/
|
|
262
|
+
className?: string;
|
|
263
|
+
type: "video";
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* ID of the [User](#schema_user)
|
|
267
|
+
*/
|
|
268
|
+
userId: string;
|
|
269
|
+
/**
|
|
270
|
+
* ID of the [Conversation](#schema_conversation)
|
|
271
|
+
*/
|
|
272
|
+
conversationId: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface CreateUserRequestHeaders {
|
|
2
|
+
}
|
|
3
|
+
export interface CreateUserRequestQuery {
|
|
4
|
+
}
|
|
5
|
+
export interface CreateUserRequestParams {
|
|
6
|
+
}
|
|
7
|
+
export interface CreateUserRequestBody {
|
|
8
|
+
/**
|
|
9
|
+
* Name of the [User](#schema_user) (not a unique identifier)
|
|
10
|
+
*/
|
|
11
|
+
name?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Picture url of the [User](#schema_user)
|
|
14
|
+
*/
|
|
15
|
+
pictureUrl?: string;
|
|
16
|
+
/**
|
|
17
|
+
* User data
|
|
18
|
+
*/
|
|
19
|
+
userData?: {
|
|
20
|
+
[k: string]: any;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export type CreateUserInput = CreateUserRequestBody & CreateUserRequestHeaders & CreateUserRequestQuery & CreateUserRequestParams;
|
|
24
|
+
export type CreateUserRequest = {
|
|
25
|
+
headers: CreateUserRequestHeaders;
|
|
26
|
+
query: CreateUserRequestQuery;
|
|
27
|
+
params: CreateUserRequestParams;
|
|
28
|
+
body: CreateUserRequestBody;
|
|
29
|
+
};
|
|
30
|
+
export declare const parseReq: (input: CreateUserInput) => CreateUserRequest & {
|
|
31
|
+
path: string;
|
|
32
|
+
};
|
|
33
|
+
export interface CreateUserResponse {
|
|
34
|
+
/**
|
|
35
|
+
* The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.
|
|
36
|
+
*/
|
|
37
|
+
user: {
|
|
38
|
+
/**
|
|
39
|
+
* Name of the [User](#schema_user)
|
|
40
|
+
*/
|
|
41
|
+
name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Picture url of the [User](#schema_user)
|
|
44
|
+
*/
|
|
45
|
+
pictureUrl?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Id of the [User](#schema_user)
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Creation date of the [User](#schema_user) in ISO 8601 format
|
|
52
|
+
*/
|
|
53
|
+
createdAt: string;
|
|
54
|
+
/**
|
|
55
|
+
* Updating date of the [User](#schema_user) in ISO 8601 format
|
|
56
|
+
*/
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
};
|
|
59
|
+
key: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DeleteConversationRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface DeleteConversationRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface DeleteConversationRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DeleteConversationRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type DeleteConversationInput = DeleteConversationRequestBody & DeleteConversationRequestHeaders & DeleteConversationRequestQuery & DeleteConversationRequestParams;
|
|
12
|
+
export type DeleteConversationRequest = {
|
|
13
|
+
headers: DeleteConversationRequestHeaders;
|
|
14
|
+
query: DeleteConversationRequestQuery;
|
|
15
|
+
params: DeleteConversationRequestParams;
|
|
16
|
+
body: DeleteConversationRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: DeleteConversationInput) => DeleteConversationRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface DeleteConversationResponse {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DeleteMessageRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface DeleteMessageRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface DeleteMessageRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DeleteMessageRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type DeleteMessageInput = DeleteMessageRequestBody & DeleteMessageRequestHeaders & DeleteMessageRequestQuery & DeleteMessageRequestParams;
|
|
12
|
+
export type DeleteMessageRequest = {
|
|
13
|
+
headers: DeleteMessageRequestHeaders;
|
|
14
|
+
query: DeleteMessageRequestQuery;
|
|
15
|
+
params: DeleteMessageRequestParams;
|
|
16
|
+
body: DeleteMessageRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: DeleteMessageInput) => DeleteMessageRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface DeleteMessageResponse {
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DeleteUserRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface DeleteUserRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface DeleteUserRequestParams {
|
|
7
|
+
}
|
|
8
|
+
export interface DeleteUserRequestBody {
|
|
9
|
+
}
|
|
10
|
+
export type DeleteUserInput = DeleteUserRequestBody & DeleteUserRequestHeaders & DeleteUserRequestQuery & DeleteUserRequestParams;
|
|
11
|
+
export type DeleteUserRequest = {
|
|
12
|
+
headers: DeleteUserRequestHeaders;
|
|
13
|
+
query: DeleteUserRequestQuery;
|
|
14
|
+
params: DeleteUserRequestParams;
|
|
15
|
+
body: DeleteUserRequestBody;
|
|
16
|
+
};
|
|
17
|
+
export declare const parseReq: (input: DeleteUserInput) => DeleteUserRequest & {
|
|
18
|
+
path: string;
|
|
19
|
+
};
|
|
20
|
+
export interface DeleteUserResponse {
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface GetConversationRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface GetConversationRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface GetConversationRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetConversationRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type GetConversationInput = GetConversationRequestBody & GetConversationRequestHeaders & GetConversationRequestQuery & GetConversationRequestParams;
|
|
12
|
+
export type GetConversationRequest = {
|
|
13
|
+
headers: GetConversationRequestHeaders;
|
|
14
|
+
query: GetConversationRequestQuery;
|
|
15
|
+
params: GetConversationRequestParams;
|
|
16
|
+
body: GetConversationRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: GetConversationInput) => GetConversationRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface GetConversationResponse {
|
|
22
|
+
conversation: {
|
|
23
|
+
/**
|
|
24
|
+
* Id of the [Conversation](#schema_conversation)
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
|
|
29
|
+
*/
|
|
30
|
+
createdAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
|
|
33
|
+
*/
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface GetEventRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface GetEventRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface GetEventRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetEventRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type GetEventInput = GetEventRequestBody & GetEventRequestHeaders & GetEventRequestQuery & GetEventRequestParams;
|
|
12
|
+
export type GetEventRequest = {
|
|
13
|
+
headers: GetEventRequestHeaders;
|
|
14
|
+
query: GetEventRequestQuery;
|
|
15
|
+
params: GetEventRequestParams;
|
|
16
|
+
body: GetEventRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: GetEventInput) => GetEventRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface GetEventResponse {
|
|
22
|
+
event: {
|
|
23
|
+
/**
|
|
24
|
+
* ID of the [Event](#schema_event).
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Creation date of the [Event](#schema_event) in ISO 8601 format
|
|
29
|
+
*/
|
|
30
|
+
createdAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* Payload is the content of the event.
|
|
33
|
+
*/
|
|
34
|
+
payload: {
|
|
35
|
+
type: "custom";
|
|
36
|
+
data: {
|
|
37
|
+
[k: string]: {
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
type: "conversation_started";
|
|
43
|
+
data: {
|
|
44
|
+
[k: string]: {
|
|
45
|
+
[k: string]: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* ID of the [Conversation](#schema_conversation).
|
|
51
|
+
*/
|
|
52
|
+
conversationId: string;
|
|
53
|
+
/**
|
|
54
|
+
* ID of the [User](#schema_user).
|
|
55
|
+
*/
|
|
56
|
+
userId: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export interface GetMessageRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface GetMessageRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface GetMessageRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetMessageRequestBody {
|
|
10
|
+
}
|
|
11
|
+
export type GetMessageInput = GetMessageRequestBody & GetMessageRequestHeaders & GetMessageRequestQuery & GetMessageRequestParams;
|
|
12
|
+
export type GetMessageRequest = {
|
|
13
|
+
headers: GetMessageRequestHeaders;
|
|
14
|
+
query: GetMessageRequestQuery;
|
|
15
|
+
params: GetMessageRequestParams;
|
|
16
|
+
body: GetMessageRequestBody;
|
|
17
|
+
};
|
|
18
|
+
export declare const parseReq: (input: GetMessageInput) => GetMessageRequest & {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface GetMessageResponse {
|
|
22
|
+
/**
|
|
23
|
+
* The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
|
|
24
|
+
*/
|
|
25
|
+
message: {
|
|
26
|
+
/**
|
|
27
|
+
* Id of the [Message](#schema_message)
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* Creation date of the [Message](#schema_message) in ISO 8601 format
|
|
32
|
+
*/
|
|
33
|
+
createdAt: string;
|
|
34
|
+
/**
|
|
35
|
+
* Payload is the content type of the message.
|
|
36
|
+
*/
|
|
37
|
+
payload: {
|
|
38
|
+
audioUrl: string;
|
|
39
|
+
/**
|
|
40
|
+
* CSS className to apply to the message
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
type: "audio";
|
|
44
|
+
} | {
|
|
45
|
+
title: string;
|
|
46
|
+
subtitle?: string;
|
|
47
|
+
imageUrl?: string;
|
|
48
|
+
actions: {
|
|
49
|
+
action: "postback" | "url" | "say";
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[];
|
|
53
|
+
type: "card";
|
|
54
|
+
/**
|
|
55
|
+
* CSS className to apply to the message
|
|
56
|
+
*/
|
|
57
|
+
className?: string;
|
|
58
|
+
} | {
|
|
59
|
+
items: {
|
|
60
|
+
title: string;
|
|
61
|
+
subtitle?: string;
|
|
62
|
+
imageUrl?: string;
|
|
63
|
+
actions: {
|
|
64
|
+
action: "postback" | "url" | "say";
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
}[];
|
|
68
|
+
/**
|
|
69
|
+
* CSS className to apply to the message
|
|
70
|
+
*/
|
|
71
|
+
className?: string;
|
|
72
|
+
}[];
|
|
73
|
+
/**
|
|
74
|
+
* CSS className to apply to the message
|
|
75
|
+
*/
|
|
76
|
+
className?: string;
|
|
77
|
+
type: "carousel";
|
|
78
|
+
} | {
|
|
79
|
+
text: string;
|
|
80
|
+
options: {
|
|
81
|
+
label: string;
|
|
82
|
+
value: string;
|
|
83
|
+
}[];
|
|
84
|
+
/**
|
|
85
|
+
* CSS className to apply to the message
|
|
86
|
+
*/
|
|
87
|
+
className?: string;
|
|
88
|
+
type: "choice";
|
|
89
|
+
disableFreeText?: boolean;
|
|
90
|
+
} | {
|
|
91
|
+
text: string;
|
|
92
|
+
options: {
|
|
93
|
+
label: string;
|
|
94
|
+
value: string;
|
|
95
|
+
}[];
|
|
96
|
+
/**
|
|
97
|
+
* CSS className to apply to the message
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
type: "dropdown";
|
|
101
|
+
} | {
|
|
102
|
+
fileUrl: string;
|
|
103
|
+
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* CSS className to apply to the message
|
|
106
|
+
*/
|
|
107
|
+
className?: string;
|
|
108
|
+
type: "file";
|
|
109
|
+
} | {
|
|
110
|
+
imageUrl: string;
|
|
111
|
+
/**
|
|
112
|
+
* CSS className to apply to the message
|
|
113
|
+
*/
|
|
114
|
+
className?: string;
|
|
115
|
+
type: "image";
|
|
116
|
+
} | {
|
|
117
|
+
latitude: number;
|
|
118
|
+
longitude: number;
|
|
119
|
+
address?: string;
|
|
120
|
+
title?: string;
|
|
121
|
+
/**
|
|
122
|
+
* CSS className to apply to the message
|
|
123
|
+
*/
|
|
124
|
+
className?: string;
|
|
125
|
+
type: "location";
|
|
126
|
+
} | {
|
|
127
|
+
markdown: string;
|
|
128
|
+
/**
|
|
129
|
+
* CSS className to apply to the message
|
|
130
|
+
*/
|
|
131
|
+
className?: string;
|
|
132
|
+
type: "markdown";
|
|
133
|
+
} | {
|
|
134
|
+
text: string;
|
|
135
|
+
/**
|
|
136
|
+
* CSS className to apply to the message
|
|
137
|
+
*/
|
|
138
|
+
className?: string;
|
|
139
|
+
type: "text";
|
|
140
|
+
} | {
|
|
141
|
+
videoUrl: string;
|
|
142
|
+
/**
|
|
143
|
+
* CSS className to apply to the message
|
|
144
|
+
*/
|
|
145
|
+
className?: string;
|
|
146
|
+
type: "video";
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* ID of the [User](#schema_user)
|
|
150
|
+
*/
|
|
151
|
+
userId: string;
|
|
152
|
+
/**
|
|
153
|
+
* ID of the [Conversation](#schema_conversation)
|
|
154
|
+
*/
|
|
155
|
+
conversationId: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface GetParticipantRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface GetParticipantRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface GetParticipantRequestParams {
|
|
7
|
+
id: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetParticipantRequestBody {
|
|
11
|
+
}
|
|
12
|
+
export type GetParticipantInput = GetParticipantRequestBody & GetParticipantRequestHeaders & GetParticipantRequestQuery & GetParticipantRequestParams;
|
|
13
|
+
export type GetParticipantRequest = {
|
|
14
|
+
headers: GetParticipantRequestHeaders;
|
|
15
|
+
query: GetParticipantRequestQuery;
|
|
16
|
+
params: GetParticipantRequestParams;
|
|
17
|
+
body: GetParticipantRequestBody;
|
|
18
|
+
};
|
|
19
|
+
export declare const parseReq: (input: GetParticipantInput) => GetParticipantRequest & {
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
export interface GetParticipantResponse {
|
|
23
|
+
/**
|
|
24
|
+
* The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.
|
|
25
|
+
*/
|
|
26
|
+
participant: {
|
|
27
|
+
/**
|
|
28
|
+
* Name of the [User](#schema_user)
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Picture url of the [User](#schema_user)
|
|
33
|
+
*/
|
|
34
|
+
pictureUrl?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Id of the [User](#schema_user)
|
|
37
|
+
*/
|
|
38
|
+
id: string;
|
|
39
|
+
/**
|
|
40
|
+
* Creation date of the [User](#schema_user) in ISO 8601 format
|
|
41
|
+
*/
|
|
42
|
+
createdAt: string;
|
|
43
|
+
/**
|
|
44
|
+
* Updating date of the [User](#schema_user) in ISO 8601 format
|
|
45
|
+
*/
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
};
|
|
48
|
+
}
|