@botpress/webchat 2.5.0 → 2.5.1

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 (168) hide show
  1. package/.storybook/main.ts +6 -1
  2. package/.turbo/turbo-build.log +12 -9
  3. package/dist/index.d.ts +14197 -15
  4. package/dist/index.js +11301 -10261
  5. package/dist/index.umd.cjs +72 -68
  6. package/dist/style.css +1 -1
  7. package/package.json +4 -2
  8. package/dist/adapters/index.d.ts +0 -2
  9. package/dist/adapters/target.d.ts +0 -83
  10. package/dist/adapters/typings.d.ts +0 -7
  11. package/dist/adapters/webchat-to-target.d.ts +0 -8
  12. package/dist/adapters/webchat.d.ts +0 -5
  13. package/dist/client/client.d.ts +0 -37
  14. package/dist/client/index.d.ts +0 -4
  15. package/dist/client/legacyClient.d.ts +0 -55
  16. package/dist/client/state-machine.d.ts +0 -40
  17. package/dist/client/types.d.ts +0 -35
  18. package/dist/components/Avatar.d.ts +0 -8
  19. package/dist/components/Block.d.ts +0 -9
  20. package/dist/components/Chat.d.ts +0 -30
  21. package/dist/components/CloseWindowButton.d.ts +0 -7
  22. package/dist/components/Composer/Composer.d.ts +0 -18
  23. package/dist/components/Composer/index.d.ts +0 -1
  24. package/dist/components/Composer/parts/FileAttachment.d.ts +0 -11
  25. package/dist/components/Composer/parts/FileInputButton.d.ts +0 -7
  26. package/dist/components/Composer/parts/SpeechRecognition.d.ts +0 -6
  27. package/dist/components/Composer/parts/TextInput.d.ts +0 -13
  28. package/dist/components/Composer/parts/index.d.ts +0 -4
  29. package/dist/components/Container/Container.d.ts +0 -16
  30. package/dist/components/Container/index.d.ts +0 -1
  31. package/dist/components/Fab/Fab.d.ts +0 -1
  32. package/dist/components/Fab/index.d.ts +0 -1
  33. package/dist/components/Header/Header.d.ts +0 -12
  34. package/dist/components/Header/index.d.ts +0 -1
  35. package/dist/components/Loader/Loader.d.ts +0 -5
  36. package/dist/components/Loader/index.d.ts +0 -1
  37. package/dist/components/Marquee/Marquee.d.ts +0 -7
  38. package/dist/components/Marquee/index.d.ts +0 -1
  39. package/dist/components/Message/Message.d.ts +0 -12
  40. package/dist/components/Message/index.d.ts +0 -1
  41. package/dist/components/MessageList/MessageList.d.ts +0 -16
  42. package/dist/components/MessageList/index.d.ts +0 -1
  43. package/dist/components/Modal/Modal.d.ts +0 -17
  44. package/dist/components/Modal/index.d.ts +0 -1
  45. package/dist/components/RestartConversationButton.d.ts +0 -7
  46. package/dist/components/TypingIndicator/TypingIndicator.d.ts +0 -2
  47. package/dist/components/TypingIndicator/index.d.ts +0 -1
  48. package/dist/components/Webchat.d.ts +0 -13
  49. package/dist/components/index.d.ts +0 -14
  50. package/dist/components/renderers/Audio/Audio.d.ts +0 -6
  51. package/dist/components/renderers/Audio/index.d.ts +0 -1
  52. package/dist/components/renderers/Bubble/Bubble.d.ts +0 -5
  53. package/dist/components/renderers/Bubble/index.d.ts +0 -1
  54. package/dist/components/renderers/Button/Button.d.ts +0 -4
  55. package/dist/components/renderers/Button/index.d.ts +0 -1
  56. package/dist/components/renderers/Carousel/Carousel.d.ts +0 -6
  57. package/dist/components/renderers/Carousel/index.d.ts +0 -1
  58. package/dist/components/renderers/Column/Column.d.ts +0 -5
  59. package/dist/components/renderers/Column/index.d.ts +0 -1
  60. package/dist/components/renderers/Custom/Custom.d.ts +0 -14
  61. package/dist/components/renderers/Custom/index.d.ts +0 -1
  62. package/dist/components/renderers/Dropdown/Dropdown.d.ts +0 -5
  63. package/dist/components/renderers/Dropdown/index.d.ts +0 -1
  64. package/dist/components/renderers/File/File.d.ts +0 -6
  65. package/dist/components/renderers/File/index.d.ts +0 -1
  66. package/dist/components/renderers/Image/Image.d.ts +0 -6
  67. package/dist/components/renderers/Image/index.d.ts +0 -1
  68. package/dist/components/renderers/Location/Location.d.ts +0 -6
  69. package/dist/components/renderers/Location/index.d.ts +0 -1
  70. package/dist/components/renderers/Row/Row.d.ts +0 -5
  71. package/dist/components/renderers/Row/index.d.ts +0 -1
  72. package/dist/components/renderers/Text/Text.d.ts +0 -4
  73. package/dist/components/renderers/Text/index.d.ts +0 -1
  74. package/dist/components/renderers/Video/Video.d.ts +0 -6
  75. package/dist/components/renderers/Video/index.d.ts +0 -1
  76. package/dist/components/renderers/index.d.ts +0 -2
  77. package/dist/contexts/MessageContext.d.ts +0 -8
  78. package/dist/contexts/ModalContext.d.ts +0 -14
  79. package/dist/contexts/index.d.ts +0 -2
  80. package/dist/gen/client/errors.d.ts +0 -211
  81. package/dist/gen/client/index.d.ts +0 -71
  82. package/dist/gen/client/models.d.ts +0 -259
  83. package/dist/gen/client/operations/addParticipant.d.ts +0 -57
  84. package/dist/gen/client/operations/createConversation.d.ts +0 -39
  85. package/dist/gen/client/operations/createEvent.d.ts +0 -79
  86. package/dist/gen/client/operations/createFile.d.ts +0 -65
  87. package/dist/gen/client/operations/createMessage.d.ts +0 -324
  88. package/dist/gen/client/operations/createUser.d.ts +0 -66
  89. package/dist/gen/client/operations/deleteConversation.d.ts +0 -22
  90. package/dist/gen/client/operations/deleteMessage.d.ts +0 -22
  91. package/dist/gen/client/operations/deleteUser.d.ts +0 -21
  92. package/dist/gen/client/operations/getConversation.d.ts +0 -36
  93. package/dist/gen/client/operations/getEvent.d.ts +0 -58
  94. package/dist/gen/client/operations/getMessage.d.ts +0 -182
  95. package/dist/gen/client/operations/getParticipant.d.ts +0 -54
  96. package/dist/gen/client/operations/getUser.d.ts +0 -52
  97. package/dist/gen/client/operations/listConversationMessages.d.ts +0 -186
  98. package/dist/gen/client/operations/listConversations.d.ts +0 -42
  99. package/dist/gen/client/operations/listParticipants.d.ts +0 -57
  100. package/dist/gen/client/operations/listenConversation.d.ts +0 -22
  101. package/dist/gen/client/operations/removeParticipant.d.ts +0 -23
  102. package/dist/gen/client/operations/updateUser.d.ts +0 -66
  103. package/dist/gen/client/to-axios.d.ts +0 -16
  104. package/dist/gen/signals/custom.t.d.ts +0 -8
  105. package/dist/gen/signals/custom.z.d.ts +0 -22
  106. package/dist/gen/signals/index.d.ts +0 -1035
  107. package/dist/gen/signals/messageCreated.t.d.ts +0 -163
  108. package/dist/gen/signals/messageCreated.z.d.ts +0 -930
  109. package/dist/gen/signals/typingStarted.t.d.ts +0 -6
  110. package/dist/gen/signals/typingStarted.z.d.ts +0 -22
  111. package/dist/gen/signals/typingStopped.t.d.ts +0 -4
  112. package/dist/gen/signals/typingStopped.z.d.ts +0 -12
  113. package/dist/gen/signals/webchatConfig.t.d.ts +0 -8
  114. package/dist/gen/signals/webchatConfig.z.d.ts +0 -22
  115. package/dist/gen/signals/webchatVisibility.t.d.ts +0 -6
  116. package/dist/gen/signals/webchatVisibility.z.d.ts +0 -22
  117. package/dist/get-client.d.ts +0 -7
  118. package/dist/hooks/index.d.ts +0 -5
  119. package/dist/hooks/useClient.d.ts +0 -6
  120. package/dist/hooks/useImageSize.d.ts +0 -2
  121. package/dist/hooks/useIsTyping.d.ts +0 -4
  122. package/dist/hooks/useRefresh.d.ts +0 -10
  123. package/dist/hooks/useWebchatClient.d.ts +0 -50
  124. package/dist/providers/ModalProvider.d.ts +0 -8
  125. package/dist/providers/StylesheetProvider.d.ts +0 -4
  126. package/dist/providers/index.d.ts +0 -2
  127. package/dist/schemas/configuration.d.ts +0 -157
  128. package/dist/schemas/index.d.ts +0 -3
  129. package/dist/schemas/init.d.ts +0 -8487
  130. package/dist/schemas/theme.d.ts +0 -4358
  131. package/dist/stores/composerFileStore.d.ts +0 -21
  132. package/dist/stores/customComponentsStore.d.ts +0 -9
  133. package/dist/stores/index.d.ts +0 -5
  134. package/dist/stores/messageHistoryStore.d.ts +0 -20
  135. package/dist/stores/messagesStore.d.ts +0 -21
  136. package/dist/stores/userStore.d.ts +0 -32
  137. package/dist/stores/webchatStore.d.ts +0 -13
  138. package/dist/stories/Messages/Audio.stories.d.ts +0 -6
  139. package/dist/stories/Messages/Bloc.stories.d.ts +0 -6
  140. package/dist/stories/Messages/Card.stories.d.ts +0 -6
  141. package/dist/stories/Messages/Carousel.stories.d.ts +0 -6
  142. package/dist/stories/Messages/Choice.stories.d.ts +0 -6
  143. package/dist/stories/Messages/Custom.stories.d.ts +0 -12
  144. package/dist/stories/Messages/Dropdown.stories.d.ts +0 -6
  145. package/dist/stories/Messages/File.stories.d.ts +0 -6
  146. package/dist/stories/Messages/FileAttachmentCard.stories.d.ts +0 -6
  147. package/dist/stories/Messages/Image.stories.d.ts +0 -6
  148. package/dist/stories/Messages/Location.stories.d.ts +0 -6
  149. package/dist/stories/Messages/Text.stories.d.ts +0 -6
  150. package/dist/stories/Messages/Video.stories.d.ts +0 -6
  151. package/dist/styles/classes.d.ts +0 -410
  152. package/dist/styles/index.d.ts +0 -1
  153. package/dist/types/block-type.d.ts +0 -58
  154. package/dist/types/configuration.d.ts +0 -5
  155. package/dist/types/image.d.ts +0 -11
  156. package/dist/types/index.d.ts +0 -5
  157. package/dist/types/init.d.ts +0 -6
  158. package/dist/types/theme.d.ts +0 -7
  159. package/dist/utils/colors.d.ts +0 -21
  160. package/dist/utils/colors.test.d.ts +0 -1
  161. package/dist/utils/eventEmitter.d.ts +0 -12
  162. package/dist/utils/generateCSS.d.ts +0 -1
  163. package/dist/utils/hashStringToInt.d.ts +0 -1
  164. package/dist/utils/images.d.ts +0 -2
  165. package/dist/utils/index.d.ts +0 -7
  166. package/dist/utils/message.d.ts +0 -8
  167. package/dist/utils/message.test.d.ts +0 -1
  168. package/dist/utils/theme.d.ts +0 -2
@@ -1,71 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- import { toAxiosRequest } from './to-axios';
3
- import * as addParticipant from './operations/addParticipant';
4
- import * as createConversation from './operations/createConversation';
5
- import * as deleteConversation from './operations/deleteConversation';
6
- import * as getConversation from './operations/getConversation';
7
- import * as getParticipant from './operations/getParticipant';
8
- import * as listConversationMessages from './operations/listConversationMessages';
9
- import * as listConversations from './operations/listConversations';
10
- import * as listParticipants from './operations/listParticipants';
11
- import * as listenConversation from './operations/listenConversation';
12
- import * as removeParticipant from './operations/removeParticipant';
13
- import * as createMessage from './operations/createMessage';
14
- import * as deleteMessage from './operations/deleteMessage';
15
- import * as getMessage from './operations/getMessage';
16
- import * as createUser from './operations/createUser';
17
- import * as deleteUser from './operations/deleteUser';
18
- import * as getUser from './operations/getUser';
19
- import * as updateUser from './operations/updateUser';
20
- import * as createEvent from './operations/createEvent';
21
- import * as getEvent from './operations/getEvent';
22
- import * as createFile from './operations/createFile';
23
- export * from './models';
24
- export * as addParticipant from './operations/addParticipant';
25
- export * as createConversation from './operations/createConversation';
26
- export * as deleteConversation from './operations/deleteConversation';
27
- export * as getConversation from './operations/getConversation';
28
- export * as getParticipant from './operations/getParticipant';
29
- export * as listConversationMessages from './operations/listConversationMessages';
30
- export * as listConversations from './operations/listConversations';
31
- export * as listParticipants from './operations/listParticipants';
32
- export * as listenConversation from './operations/listenConversation';
33
- export * as removeParticipant from './operations/removeParticipant';
34
- export * as createMessage from './operations/createMessage';
35
- export * as deleteMessage from './operations/deleteMessage';
36
- export * as getMessage from './operations/getMessage';
37
- export * as createUser from './operations/createUser';
38
- export * as deleteUser from './operations/deleteUser';
39
- export * as getUser from './operations/getUser';
40
- export * as updateUser from './operations/updateUser';
41
- export * as createEvent from './operations/createEvent';
42
- export * as getEvent from './operations/getEvent';
43
- export * as createFile from './operations/createFile';
44
- export type ClientProps = {
45
- toAxiosRequest: typeof toAxiosRequest;
46
- };
47
- export declare class Client {
48
- private axiosInstance;
49
- private props;
50
- constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps>);
51
- readonly addParticipant: (input: addParticipant.AddParticipantInput) => Promise<addParticipant.AddParticipantResponse>;
52
- readonly createConversation: (input: createConversation.CreateConversationInput) => Promise<createConversation.CreateConversationResponse>;
53
- readonly deleteConversation: (input: deleteConversation.DeleteConversationInput) => Promise<deleteConversation.DeleteConversationResponse>;
54
- readonly getConversation: (input: getConversation.GetConversationInput) => Promise<getConversation.GetConversationResponse>;
55
- readonly getParticipant: (input: getParticipant.GetParticipantInput) => Promise<getParticipant.GetParticipantResponse>;
56
- readonly listConversationMessages: (input: listConversationMessages.ListConversationMessagesInput) => Promise<listConversationMessages.ListConversationMessagesResponse>;
57
- readonly listConversations: (input: listConversations.ListConversationsInput) => Promise<listConversations.ListConversationsResponse>;
58
- readonly listParticipants: (input: listParticipants.ListParticipantsInput) => Promise<listParticipants.ListParticipantsResponse>;
59
- readonly listenConversation: (input: listenConversation.ListenConversationInput) => Promise<listenConversation.ListenConversationResponse>;
60
- readonly removeParticipant: (input: removeParticipant.RemoveParticipantInput) => Promise<removeParticipant.RemoveParticipantResponse>;
61
- readonly createMessage: (input: createMessage.CreateMessageInput) => Promise<createMessage.CreateMessageResponse>;
62
- readonly deleteMessage: (input: deleteMessage.DeleteMessageInput) => Promise<deleteMessage.DeleteMessageResponse>;
63
- readonly getMessage: (input: getMessage.GetMessageInput) => Promise<getMessage.GetMessageResponse>;
64
- readonly createUser: (input: createUser.CreateUserInput) => Promise<createUser.CreateUserResponse>;
65
- readonly deleteUser: (input: deleteUser.DeleteUserInput) => Promise<deleteUser.DeleteUserResponse>;
66
- readonly getUser: (input: getUser.GetUserInput) => Promise<getUser.GetUserResponse>;
67
- readonly updateUser: (input: updateUser.UpdateUserInput) => Promise<updateUser.UpdateUserResponse>;
68
- readonly createEvent: (input: createEvent.CreateEventInput) => Promise<createEvent.CreateEventResponse>;
69
- readonly getEvent: (input: getEvent.GetEventInput) => Promise<getEvent.GetEventResponse>;
70
- readonly createFile: (input: createFile.CreateFileInput) => Promise<createFile.CreateFileResponse>;
71
- }
@@ -1,259 +0,0 @@
1
- /**
2
- * 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.
3
- */
4
- export interface User {
5
- /**
6
- * Name of the [User](#schema_user)
7
- */
8
- name?: string;
9
- /**
10
- * Picture url of the [User](#schema_user)
11
- */
12
- pictureUrl?: string;
13
- /**
14
- * User data
15
- */
16
- data?: {
17
- [k: string]: any;
18
- };
19
- /**
20
- * Id of the [User](#schema_user)
21
- */
22
- id: string;
23
- /**
24
- * Creation date of the [User](#schema_user) in ISO 8601 format
25
- */
26
- createdAt: string;
27
- /**
28
- * Updating date of the [User](#schema_user) in ISO 8601 format
29
- */
30
- updatedAt: string;
31
- }
32
- export interface Conversation {
33
- /**
34
- * Id of the [Conversation](#schema_conversation)
35
- */
36
- id: string;
37
- /**
38
- * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
39
- */
40
- createdAt: string;
41
- /**
42
- * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
43
- */
44
- updatedAt: string;
45
- }
46
- /**
47
- * The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
48
- */
49
- export interface Message {
50
- /**
51
- * Id of the [Message](#schema_message)
52
- */
53
- id: string;
54
- /**
55
- * Creation date of the [Message](#schema_message) in ISO 8601 format
56
- */
57
- createdAt: string;
58
- /**
59
- * Payload is the content type of the message.
60
- */
61
- payload: {
62
- audioUrl: string;
63
- type: "audio";
64
- [k: string]: any;
65
- } | {
66
- title: string;
67
- subtitle?: string;
68
- imageUrl?: string;
69
- actions: {
70
- action: "postback" | "url" | "say";
71
- label: string;
72
- value: string;
73
- [k: string]: any;
74
- }[];
75
- type: "card";
76
- [k: string]: any;
77
- } | {
78
- items: {
79
- title: string;
80
- subtitle?: string;
81
- imageUrl?: string;
82
- actions: {
83
- action: "postback" | "url" | "say";
84
- label: string;
85
- value: string;
86
- [k: string]: any;
87
- }[];
88
- [k: string]: any;
89
- }[];
90
- type: "carousel";
91
- [k: string]: any;
92
- } | {
93
- text: string;
94
- options: {
95
- label: string;
96
- value: string;
97
- [k: string]: any;
98
- }[];
99
- type: "choice";
100
- disableFreeText?: boolean;
101
- [k: string]: any;
102
- } | {
103
- text: string;
104
- options: {
105
- label: string;
106
- value: string;
107
- [k: string]: any;
108
- }[];
109
- type: "dropdown";
110
- [k: string]: any;
111
- } | {
112
- fileUrl: string;
113
- title?: string;
114
- type: "file";
115
- [k: string]: any;
116
- } | {
117
- imageUrl: string;
118
- type: "image";
119
- [k: string]: any;
120
- } | {
121
- latitude: number;
122
- longitude: number;
123
- address?: string;
124
- title?: string;
125
- type: "location";
126
- [k: string]: any;
127
- } | {
128
- markdown: string;
129
- type: "markdown";
130
- [k: string]: any;
131
- } | {
132
- text: string;
133
- type: "text";
134
- [k: string]: any;
135
- } | {
136
- videoUrl: string;
137
- type: "video";
138
- [k: string]: any;
139
- } | {
140
- items: ({
141
- type: "text";
142
- payload: {
143
- text: string;
144
- [k: string]: any;
145
- };
146
- [k: string]: any;
147
- } | {
148
- type: "markdown";
149
- payload: {
150
- markdown: string;
151
- [k: string]: any;
152
- };
153
- [k: string]: any;
154
- } | {
155
- type: "image";
156
- payload: {
157
- imageUrl: string;
158
- [k: string]: any;
159
- };
160
- [k: string]: any;
161
- } | {
162
- type: "audio";
163
- payload: {
164
- audioUrl: string;
165
- [k: string]: any;
166
- };
167
- [k: string]: any;
168
- } | {
169
- type: "video";
170
- payload: {
171
- videoUrl: string;
172
- [k: string]: any;
173
- };
174
- [k: string]: any;
175
- } | {
176
- type: "file";
177
- payload: {
178
- fileUrl: string;
179
- title?: string;
180
- [k: string]: any;
181
- };
182
- [k: string]: any;
183
- } | {
184
- type: "location";
185
- payload: {
186
- latitude: number;
187
- longitude: number;
188
- address?: string;
189
- title?: string;
190
- [k: string]: any;
191
- };
192
- [k: string]: any;
193
- })[];
194
- type: "bloc";
195
- [k: string]: any;
196
- };
197
- /**
198
- * ID of the [User](#schema_user)
199
- */
200
- userId: string;
201
- /**
202
- * ID of the [Conversation](#schema_conversation)
203
- */
204
- conversationId: string;
205
- }
206
- export interface Event {
207
- /**
208
- * ID of the [Event](#schema_event).
209
- */
210
- id: string;
211
- /**
212
- * Creation date of the [Event](#schema_event) in ISO 8601 format
213
- */
214
- createdAt: string;
215
- /**
216
- * Payload is the content of the event.
217
- */
218
- payload: {
219
- type: "custom";
220
- data: {
221
- [k: string]: any;
222
- };
223
- [k: string]: any;
224
- } | {
225
- type: "conversation_started";
226
- data: {
227
- [k: string]: {
228
- [k: string]: any;
229
- };
230
- };
231
- [k: string]: any;
232
- };
233
- /**
234
- * ID of the [Conversation](#schema_conversation).
235
- */
236
- conversationId: string;
237
- /**
238
- * ID of the [User](#schema_user).
239
- */
240
- userId: string;
241
- }
242
- export interface File {
243
- id: string;
244
- botId: string;
245
- key: string;
246
- size: number | null;
247
- contentType: string;
248
- tags: {
249
- [k: string]: string;
250
- };
251
- createdAt: string;
252
- updatedAt: string;
253
- accessPolicies: ("integrations" | "public_content")[];
254
- index: boolean;
255
- url: string;
256
- status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
257
- failedStatusReason?: string;
258
- uploadUrl: string;
259
- }
@@ -1,57 +0,0 @@
1
- export interface AddParticipantRequestHeaders {
2
- "x-user-key": string;
3
- }
4
- export interface AddParticipantRequestQuery {
5
- }
6
- export interface AddParticipantRequestParams {
7
- id: string;
8
- }
9
- export interface AddParticipantRequestBody {
10
- /**
11
- * User id
12
- */
13
- userId: string;
14
- }
15
- export type AddParticipantInput = AddParticipantRequestBody & AddParticipantRequestHeaders & AddParticipantRequestQuery & AddParticipantRequestParams;
16
- export type AddParticipantRequest = {
17
- headers: AddParticipantRequestHeaders;
18
- query: AddParticipantRequestQuery;
19
- params: AddParticipantRequestParams;
20
- body: AddParticipantRequestBody;
21
- };
22
- export declare const parseReq: (input: AddParticipantInput) => AddParticipantRequest & {
23
- path: string;
24
- };
25
- export interface AddParticipantResponse {
26
- /**
27
- * 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.
28
- */
29
- participant: {
30
- /**
31
- * Name of the [User](#schema_user)
32
- */
33
- name?: string;
34
- /**
35
- * Picture url of the [User](#schema_user)
36
- */
37
- pictureUrl?: string;
38
- /**
39
- * User data
40
- */
41
- data?: {
42
- [k: string]: any;
43
- };
44
- /**
45
- * Id of the [User](#schema_user)
46
- */
47
- id: string;
48
- /**
49
- * Creation date of the [User](#schema_user) in ISO 8601 format
50
- */
51
- createdAt: string;
52
- /**
53
- * Updating date of the [User](#schema_user) in ISO 8601 format
54
- */
55
- updatedAt: string;
56
- };
57
- }
@@ -1,39 +0,0 @@
1
- export interface CreateConversationRequestHeaders {
2
- "x-user-key": string;
3
- }
4
- export interface CreateConversationRequestQuery {
5
- }
6
- export interface CreateConversationRequestParams {
7
- }
8
- /**
9
- * Conversation properties
10
- */
11
- export interface CreateConversationRequestBody {
12
- _?: string;
13
- }
14
- export type CreateConversationInput = CreateConversationRequestBody & CreateConversationRequestHeaders & CreateConversationRequestQuery & CreateConversationRequestParams;
15
- export type CreateConversationRequest = {
16
- headers: CreateConversationRequestHeaders;
17
- query: CreateConversationRequestQuery;
18
- params: CreateConversationRequestParams;
19
- body: CreateConversationRequestBody;
20
- };
21
- export declare const parseReq: (input: CreateConversationInput) => CreateConversationRequest & {
22
- path: string;
23
- };
24
- export interface CreateConversationResponse {
25
- conversation: {
26
- /**
27
- * Id of the [Conversation](#schema_conversation)
28
- */
29
- id: string;
30
- /**
31
- * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
32
- */
33
- createdAt: string;
34
- /**
35
- * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
36
- */
37
- updatedAt: string;
38
- };
39
- }
@@ -1,79 +0,0 @@
1
- export interface CreateEventRequestHeaders {
2
- "x-user-key": string;
3
- }
4
- export interface CreateEventRequestQuery {
5
- }
6
- export interface CreateEventRequestParams {
7
- }
8
- export interface CreateEventRequestBody {
9
- /**
10
- * Payload is the content type of the event.
11
- */
12
- payload: {
13
- type: "custom";
14
- data: {
15
- [k: string]: any;
16
- };
17
- [k: string]: any;
18
- } | {
19
- type: "conversation_started";
20
- data: {
21
- [k: string]: {
22
- [k: string]: any;
23
- };
24
- };
25
- [k: string]: any;
26
- };
27
- /**
28
- * ID of the [Conversation](#schema_conversation)
29
- */
30
- conversationId: string;
31
- }
32
- export type CreateEventInput = CreateEventRequestBody & CreateEventRequestHeaders & CreateEventRequestQuery & CreateEventRequestParams;
33
- export type CreateEventRequest = {
34
- headers: CreateEventRequestHeaders;
35
- query: CreateEventRequestQuery;
36
- params: CreateEventRequestParams;
37
- body: CreateEventRequestBody;
38
- };
39
- export declare const parseReq: (input: CreateEventInput) => CreateEventRequest & {
40
- path: string;
41
- };
42
- export interface CreateEventResponse {
43
- event: {
44
- /**
45
- * ID of the [Event](#schema_event).
46
- */
47
- id: string;
48
- /**
49
- * Creation date of the [Event](#schema_event) in ISO 8601 format
50
- */
51
- createdAt: string;
52
- /**
53
- * Payload is the content of the event.
54
- */
55
- payload: {
56
- type: "custom";
57
- data: {
58
- [k: string]: any;
59
- };
60
- [k: string]: any;
61
- } | {
62
- type: "conversation_started";
63
- data: {
64
- [k: string]: {
65
- [k: string]: any;
66
- };
67
- };
68
- [k: string]: any;
69
- };
70
- /**
71
- * ID of the [Conversation](#schema_conversation).
72
- */
73
- conversationId: string;
74
- /**
75
- * ID of the [User](#schema_user).
76
- */
77
- userId: string;
78
- };
79
- }
@@ -1,65 +0,0 @@
1
- export interface CreateFileRequestHeaders {
2
- "x-user-key": string;
3
- }
4
- export interface CreateFileRequestQuery {
5
- }
6
- export interface CreateFileRequestParams {
7
- }
8
- export interface CreateFileRequestBody {
9
- /**
10
- * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
11
- */
12
- key: string;
13
- /**
14
- * File size in bytes. This will count against your File Storage quota. If the index parameter is set to true, this will also count against your Vector DB Storage quota.
15
- */
16
- size: number;
17
- /**
18
- * File access policies. Add "public_content" to allow public access to the file content. Add "integrations" to allow read, search and list operations for any integration installed in the bot.
19
- */
20
- accessPolicies?: ("integrations" | "public_content")[];
21
- /**
22
- * Whether the file should be indexed. If true, the file content will be searchable in the Vector DB. This will count against your Vector DB Storage quota.
23
- */
24
- index?: boolean;
25
- /**
26
- * File content type. If omitted, the content type will be inferred from the file extension (if any) specified in key. If a content type cannot be inferred, the default is "application/octet-stream".
27
- */
28
- contentType?: string;
29
- /**
30
- * File tags. These are used for search and filtering operations.
31
- */
32
- tags?: {
33
- [k: string]: string;
34
- };
35
- }
36
- export type CreateFileInput = CreateFileRequestBody & CreateFileRequestHeaders & CreateFileRequestQuery & CreateFileRequestParams;
37
- export type CreateFileRequest = {
38
- headers: CreateFileRequestHeaders;
39
- query: CreateFileRequestQuery;
40
- params: CreateFileRequestParams;
41
- body: CreateFileRequestBody;
42
- };
43
- export declare const parseReq: (input: CreateFileInput) => CreateFileRequest & {
44
- path: string;
45
- };
46
- export interface CreateFileResponse {
47
- file: {
48
- id: string;
49
- botId: string;
50
- key: string;
51
- size: number | null;
52
- contentType: string;
53
- tags: {
54
- [k: string]: string;
55
- };
56
- createdAt: string;
57
- updatedAt: string;
58
- accessPolicies: ("integrations" | "public_content")[];
59
- index: boolean;
60
- url: string;
61
- status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
62
- failedStatusReason?: string;
63
- uploadUrl: string;
64
- };
65
- }