@botpress/client 0.16.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/bundle.cjs +13 -10
  2. package/dist/bundle.cjs.map +4 -4
  3. package/dist/gen/index.d.ts +372 -13
  4. package/dist/gen/models.d.ts +1160 -0
  5. package/dist/gen/operations/addParticipant.d.ts +56 -0
  6. package/dist/gen/operations/breakDownWorkspaceUsageByBot.d.ts +27 -0
  7. package/dist/gen/operations/callAction.d.ts +36 -0
  8. package/dist/gen/operations/changeAISpendQuota.d.ts +21 -0
  9. package/dist/gen/operations/chargeWorkspaceUnpaidInvoices.d.ts +40 -0
  10. package/dist/gen/operations/checkHandleAvailability.d.ts +24 -0
  11. package/dist/gen/operations/configureIntegration.d.ts +24 -0
  12. package/dist/gen/operations/createBot.d.ts +487 -0
  13. package/dist/gen/operations/createConversation.d.ts +70 -0
  14. package/dist/gen/operations/createEvent.d.ts +95 -0
  15. package/dist/gen/operations/createFile.d.ts +108 -0
  16. package/dist/gen/operations/createIntegration.d.ts +533 -0
  17. package/dist/gen/operations/createIntegrationApiKey.d.ts +29 -0
  18. package/dist/gen/operations/createMessage.d.ts +98 -0
  19. package/dist/gen/operations/createPersonalAccessToken.d.ts +33 -0
  20. package/dist/gen/operations/createTable.d.ts +151 -0
  21. package/dist/gen/operations/createTableRows.d.ts +71 -0
  22. package/dist/gen/operations/createTask.d.ts +125 -0
  23. package/dist/gen/operations/createUser.d.ts +70 -0
  24. package/dist/gen/operations/createWorkspace.d.ts +39 -0
  25. package/dist/gen/operations/createWorkspaceMember.d.ts +27 -0
  26. package/dist/gen/operations/deleteBot.d.ts +21 -0
  27. package/dist/gen/operations/deleteBotIssue.d.ts +22 -0
  28. package/dist/gen/operations/deleteConversation.d.ts +21 -0
  29. package/dist/gen/operations/deleteFile.d.ts +21 -0
  30. package/dist/gen/operations/deleteIntegration.d.ts +21 -0
  31. package/dist/gen/operations/deleteIntegrationApiKey.d.ts +21 -0
  32. package/dist/gen/operations/deleteMessage.d.ts +21 -0
  33. package/dist/gen/operations/deletePersonalAccessToken.d.ts +21 -0
  34. package/dist/gen/operations/deleteTable.d.ts +21 -0
  35. package/dist/gen/operations/deleteTableRows.d.ts +36 -0
  36. package/dist/gen/operations/deleteTask.d.ts +21 -0
  37. package/dist/gen/operations/deleteUser.d.ts +21 -0
  38. package/dist/gen/operations/deleteWorkspace.d.ts +21 -0
  39. package/dist/gen/operations/deleteWorkspaceMember.d.ts +21 -0
  40. package/dist/gen/operations/duplicateTable.d.ts +137 -0
  41. package/dist/gen/operations/findTableRows.d.ts +94 -0
  42. package/dist/gen/operations/getAccount.d.ts +31 -0
  43. package/dist/gen/operations/getAccountPreference.d.ts +22 -0
  44. package/dist/gen/operations/getAllWorkspaceQuotaCompletion.d.ts +24 -0
  45. package/dist/gen/operations/getAuditRecords.d.ts +38 -0
  46. package/dist/gen/operations/getBot.d.ts +308 -0
  47. package/dist/gen/operations/getBotAnalytics.d.ts +49 -0
  48. package/dist/gen/operations/getBotLogs.d.ts +30 -0
  49. package/dist/gen/operations/getBotWebchat.d.ts +23 -0
  50. package/dist/gen/operations/getConversation.d.ts +56 -0
  51. package/dist/gen/operations/getEvent.d.ts +61 -0
  52. package/dist/gen/operations/getFile.d.ts +85 -0
  53. package/dist/gen/operations/getIntegration.d.ts +295 -0
  54. package/dist/gen/operations/getIntegrationByName.d.ts +296 -0
  55. package/dist/gen/operations/getIntegrationLogs.d.ts +30 -0
  56. package/dist/gen/operations/getMessage.d.ts +62 -0
  57. package/dist/gen/operations/getOrCreateConversation.d.ts +70 -0
  58. package/dist/gen/operations/getOrCreateMessage.d.ts +98 -0
  59. package/dist/gen/operations/getOrCreateTable.d.ts +164 -0
  60. package/dist/gen/operations/getOrCreateUser.d.ts +70 -0
  61. package/dist/gen/operations/getOrSetState.d.ts +76 -0
  62. package/dist/gen/operations/getParticipant.d.ts +53 -0
  63. package/dist/gen/operations/getPublicIntegration.d.ts +301 -0
  64. package/dist/gen/operations/getPublicIntegrationById.d.ts +300 -0
  65. package/dist/gen/operations/getPublicWorkspace.d.ts +31 -0
  66. package/dist/gen/operations/getState.d.ts +66 -0
  67. package/dist/gen/operations/getTable.d.ts +136 -0
  68. package/dist/gen/operations/getTableRow.d.ts +53 -0
  69. package/dist/gen/operations/getTask.d.ts +86 -0
  70. package/dist/gen/operations/getUpcomingInvoice.d.ts +29 -0
  71. package/dist/gen/operations/getUsage.d.ts +45 -0
  72. package/dist/gen/operations/getUser.d.ts +52 -0
  73. package/dist/gen/operations/getWorkspace.d.ts +39 -0
  74. package/dist/gen/operations/getWorkspaceMember.d.ts +25 -0
  75. package/dist/gen/operations/getWorkspaceQuota.d.ts +37 -0
  76. package/dist/gen/operations/introspect.d.ts +24 -0
  77. package/dist/gen/operations/listActivities.d.ts +42 -0
  78. package/dist/gen/operations/listBotIssueEvents.d.ts +32 -0
  79. package/dist/gen/operations/listBotIssues.d.ts +45 -0
  80. package/dist/gen/operations/listBots.d.ts +44 -0
  81. package/dist/gen/operations/listConversations.d.ts +64 -0
  82. package/dist/gen/operations/listEvents.d.ts +69 -0
  83. package/dist/gen/operations/listFiles.d.ts +94 -0
  84. package/dist/gen/operations/listIntegrationApiKeys.d.ts +26 -0
  85. package/dist/gen/operations/listIntegrations.d.ts +68 -0
  86. package/dist/gen/operations/listMessages.d.ts +69 -0
  87. package/dist/gen/operations/listParticipants.d.ts +56 -0
  88. package/dist/gen/operations/listPersonalAccessTokens.d.ts +25 -0
  89. package/dist/gen/operations/listPublicIntegrations.d.ts +72 -0
  90. package/dist/gen/operations/listTables.d.ts +126 -0
  91. package/dist/gen/operations/listTasks.d.ts +97 -0
  92. package/dist/gen/operations/listUsageHistory.d.ts +44 -0
  93. package/dist/gen/operations/listUsers.d.ts +59 -0
  94. package/dist/gen/operations/listWorkspaceInvoices.d.ts +53 -0
  95. package/dist/gen/operations/listWorkspaceMembers.d.ts +34 -0
  96. package/dist/gen/operations/listWorkspaceQuotas.d.ts +36 -0
  97. package/dist/gen/operations/listWorkspaceUsages.d.ts +45 -0
  98. package/dist/gen/operations/listWorkspaces.d.ts +48 -0
  99. package/dist/gen/operations/patchState.d.ts +72 -0
  100. package/dist/gen/operations/removeParticipant.d.ts +22 -0
  101. package/dist/gen/operations/renameTableColumn.d.ts +132 -0
  102. package/dist/gen/operations/runVrl.d.ts +28 -0
  103. package/dist/gen/operations/searchFiles.d.ts +60 -0
  104. package/dist/gen/operations/setAccountPreference.d.ts +22 -0
  105. package/dist/gen/operations/setState.d.ts +76 -0
  106. package/dist/gen/operations/setWorkspacePaymentMethod.d.ts +37 -0
  107. package/dist/gen/operations/trackAnalytics.d.ts +22 -0
  108. package/dist/gen/operations/transferBot.d.ts +25 -0
  109. package/dist/gen/operations/updateAccount.d.ts +34 -0
  110. package/dist/gen/operations/updateBot.d.ts +486 -0
  111. package/dist/gen/operations/updateConversation.d.ts +63 -0
  112. package/dist/gen/operations/updateFile.d.ts +95 -0
  113. package/dist/gen/operations/updateIntegration.d.ts +522 -0
  114. package/dist/gen/operations/updateMessage.d.ts +68 -0
  115. package/dist/gen/operations/updateTable.d.ts +152 -0
  116. package/dist/gen/operations/updateTableRows.d.ts +74 -0
  117. package/dist/gen/operations/updateTask.d.ts +114 -0
  118. package/dist/gen/operations/updateUser.d.ts +66 -0
  119. package/dist/gen/operations/updateWorkspace.d.ts +51 -0
  120. package/dist/gen/operations/updateWorkspaceMember.d.ts +27 -0
  121. package/dist/gen/operations/upsertTableRows.d.ts +107 -0
  122. package/dist/index.cjs +4 -1
  123. package/dist/index.cjs.map +4 -4
  124. package/dist/index.d.ts +5 -14
  125. package/dist/index.mjs +4 -1
  126. package/dist/index.mjs.map +4 -4
  127. package/openapi.ts +3 -3
  128. package/package.json +4 -2
  129. package/readme.md +2 -3
  130. package/dist/gen/api.d.ts +0 -14072
  131. package/dist/gen/base.d.ts +0 -54
  132. package/dist/gen/client.d.ts +0 -255
  133. package/dist/gen/common.d.ts +0 -65
  134. package/dist/gen/configuration.d.ts +0 -83
@@ -0,0 +1,308 @@
1
+ export interface GetBotRequestHeaders {
2
+ }
3
+ export interface GetBotRequestQuery {
4
+ }
5
+ export interface GetBotRequestParams {
6
+ id: string;
7
+ }
8
+ export interface GetBotRequestBody {
9
+ }
10
+ export type GetBotInput = GetBotRequestBody & GetBotRequestHeaders & GetBotRequestQuery & GetBotRequestParams;
11
+ export type GetBotRequest = {
12
+ headers: GetBotRequestHeaders;
13
+ query: GetBotRequestQuery;
14
+ params: GetBotRequestParams;
15
+ body: GetBotRequestBody;
16
+ };
17
+ export declare const parseReq: (input: GetBotInput) => GetBotRequest & {
18
+ path: string;
19
+ };
20
+ export interface GetBotResponse {
21
+ bot: {
22
+ /**
23
+ * Id of the [Bot](#schema_bot)
24
+ */
25
+ id: string;
26
+ /**
27
+ * Creation date of the [Bot](#schema_bot) in ISO 8601 format
28
+ */
29
+ createdAt: string;
30
+ /**
31
+ * Updating date of the [Bot](#schema_bot) in ISO 8601 format
32
+ */
33
+ updatedAt: string;
34
+ /**
35
+ * Signing secret of the [Bot](#schema_bot)
36
+ */
37
+ signingSecret: string;
38
+ /**
39
+ * A mapping of integrations to their configuration
40
+ */
41
+ integrations: {
42
+ [k: string]: {
43
+ enabled: boolean;
44
+ /**
45
+ * Name of the [Integration](#schema_integration)
46
+ */
47
+ name: string;
48
+ /**
49
+ * Version of the [Integration](#schema_integration)
50
+ */
51
+ version: string;
52
+ webhookUrl: string;
53
+ webhookId: string;
54
+ identifier?: string;
55
+ configuration: {
56
+ [k: string]: any;
57
+ };
58
+ status: "registration_pending" | "registered" | "registration_failed" | "unregistration_pending" | "unregistered" | "unregistration_failed";
59
+ statusReason: string | null;
60
+ /**
61
+ * ID of the [Integration](#schema_integration)
62
+ */
63
+ id: string;
64
+ /**
65
+ * Creation date of the [Integration](#schema_integration) in ISO 8601 format
66
+ */
67
+ createdAt: string;
68
+ /**
69
+ * Updating date of the [Integration](#schema_integration) in ISO 8601 format
70
+ */
71
+ updatedAt: string;
72
+ /**
73
+ * Title of the integration. This is the name that will be displayed in the UI
74
+ */
75
+ title: string;
76
+ /**
77
+ * Description of the integration. This is the description that will be displayed in the UI
78
+ */
79
+ description: string;
80
+ /**
81
+ * URL of the icon of the integration. This is the icon that will be displayed in the UI
82
+ */
83
+ iconUrl: string;
84
+ /**
85
+ * Idicates if the integration is public. Public integrations are available to all and cannot be updated without creating a new version.
86
+ */
87
+ public: boolean;
88
+ };
89
+ };
90
+ /**
91
+ * User object configuration
92
+ */
93
+ user: {
94
+ tags: {
95
+ /**
96
+ * Definition of a tag that can be provided on the object
97
+ */
98
+ [k: string]: {
99
+ /**
100
+ * Title of the tag
101
+ */
102
+ title?: string;
103
+ /**
104
+ * Description of the tag
105
+ */
106
+ description?: string;
107
+ };
108
+ };
109
+ };
110
+ /**
111
+ * Conversation object configuration
112
+ */
113
+ conversation: {
114
+ tags: {
115
+ /**
116
+ * Definition of a tag that can be provided on the object
117
+ */
118
+ [k: string]: {
119
+ /**
120
+ * Title of the tag
121
+ */
122
+ title?: string;
123
+ /**
124
+ * Description of the tag
125
+ */
126
+ description?: string;
127
+ };
128
+ };
129
+ };
130
+ /**
131
+ * Message object configuration
132
+ */
133
+ message: {
134
+ tags: {
135
+ /**
136
+ * Definition of a tag that can be provided on the object
137
+ */
138
+ [k: string]: {
139
+ /**
140
+ * Title of the tag
141
+ */
142
+ title?: string;
143
+ /**
144
+ * Description of the tag
145
+ */
146
+ description?: string;
147
+ };
148
+ };
149
+ };
150
+ /**
151
+ * A mapping of states to their definition
152
+ */
153
+ states: {
154
+ [k: string]: {
155
+ /**
156
+ * Type of the [State](#schema_state) (`conversation`, `user`, `bot` or `task`)
157
+ */
158
+ type: "conversation" | "user" | "bot" | "task";
159
+ /**
160
+ * Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.
161
+ */
162
+ schema: {
163
+ [k: string]: any;
164
+ };
165
+ /**
166
+ * Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.
167
+ */
168
+ expiry?: number;
169
+ };
170
+ };
171
+ /**
172
+ * Configuration of the bot
173
+ */
174
+ configuration: {
175
+ /**
176
+ * Configuration data
177
+ */
178
+ data: {
179
+ [k: string]: any;
180
+ };
181
+ /**
182
+ * Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.
183
+ */
184
+ schema: {
185
+ [k: string]: any;
186
+ };
187
+ };
188
+ /**
189
+ * Events definition
190
+ */
191
+ events: {
192
+ /**
193
+ * Event Definition
194
+ */
195
+ [k: string]: {
196
+ /**
197
+ * Title of the event
198
+ */
199
+ title?: string;
200
+ /**
201
+ * Description of the event
202
+ */
203
+ description?: string;
204
+ schema: {
205
+ [k: string]: any;
206
+ };
207
+ };
208
+ };
209
+ /**
210
+ * Recurring events
211
+ */
212
+ recurringEvents: {
213
+ [k: string]: {
214
+ schedule: {
215
+ cron: string;
216
+ };
217
+ type: string;
218
+ payload: {
219
+ [k: string]: any;
220
+ };
221
+ /**
222
+ * The number of times the recurring event failed to run. This counter resets once the recurring event runs successfully.
223
+ */
224
+ failedAttempts: number;
225
+ /**
226
+ * The reason why the recurring event failed to run in the last attempt.
227
+ */
228
+ lastFailureReason: string | null;
229
+ };
230
+ };
231
+ /**
232
+ * Subscriptions of the bot
233
+ */
234
+ subscriptions: {
235
+ /**
236
+ * Events that the bot is currently subscribed on (ex: "slack:reactionAdded"). If null, the bot is subscribed to all events.
237
+ */
238
+ events: {
239
+ [k: string]: {};
240
+ } | null;
241
+ };
242
+ /**
243
+ * Actions definition
244
+ */
245
+ actions: {
246
+ /**
247
+ * Action definition
248
+ */
249
+ [k: string]: {
250
+ /**
251
+ * Title of the action
252
+ */
253
+ title?: string;
254
+ /**
255
+ * Description of the action
256
+ */
257
+ description?: string;
258
+ input: {
259
+ schema: {
260
+ [k: string]: any;
261
+ };
262
+ };
263
+ output: {
264
+ schema: {
265
+ [k: string]: any;
266
+ };
267
+ };
268
+ };
269
+ };
270
+ /**
271
+ * Name of the [Bot](#schema_bot)
272
+ */
273
+ name: string;
274
+ /**
275
+ * Last deployment date of the [Bot](#schema_bot) in the ISO 8601 format
276
+ */
277
+ deployedAt?: string;
278
+ /**
279
+ * Indicates if the [Bot](#schema_bot) is a development bot; Development bots run locally and can install dev integrations
280
+ */
281
+ dev: boolean;
282
+ /**
283
+ * Id of the user that created the bot
284
+ */
285
+ createdBy?: string;
286
+ /**
287
+ * Indicates if the [Bot](#schema_bot) should be in always alive mode
288
+ */
289
+ alwaysAlive: boolean;
290
+ /**
291
+ * Status of the bot
292
+ */
293
+ status: "active" | "deploying";
294
+ /**
295
+ * Media files associated with the [Bot](#schema_bot)
296
+ */
297
+ medias: {
298
+ /**
299
+ * URL of the media file
300
+ */
301
+ url: string;
302
+ /**
303
+ * Name of the media file
304
+ */
305
+ name: string;
306
+ }[];
307
+ };
308
+ }
@@ -0,0 +1,49 @@
1
+ export interface GetBotAnalyticsRequestHeaders {
2
+ }
3
+ export interface GetBotAnalyticsRequestQuery {
4
+ startDate: string;
5
+ endDate: string;
6
+ }
7
+ export interface GetBotAnalyticsRequestParams {
8
+ id: string;
9
+ }
10
+ export interface GetBotAnalyticsRequestBody {
11
+ }
12
+ export type GetBotAnalyticsInput = GetBotAnalyticsRequestBody & GetBotAnalyticsRequestHeaders & GetBotAnalyticsRequestQuery & GetBotAnalyticsRequestParams;
13
+ export type GetBotAnalyticsRequest = {
14
+ headers: GetBotAnalyticsRequestHeaders;
15
+ query: GetBotAnalyticsRequestQuery;
16
+ params: GetBotAnalyticsRequestParams;
17
+ body: GetBotAnalyticsRequestBody;
18
+ };
19
+ export declare const parseReq: (input: GetBotAnalyticsInput) => GetBotAnalyticsRequest & {
20
+ path: string;
21
+ };
22
+ export interface GetBotAnalyticsResponse {
23
+ records: {
24
+ /**
25
+ * ISO 8601 date string of the beginning (inclusive) of the period
26
+ */
27
+ startDateTimeUtc: string;
28
+ /**
29
+ * ISO 8601 date string of the end (exclusive) of the period
30
+ */
31
+ endDateTimeUtc: string;
32
+ returningUsers: number;
33
+ newUsers: number;
34
+ sessions: number;
35
+ /**
36
+ * Deprecated. Use `userMessages` instead.
37
+ */
38
+ messages: number;
39
+ userMessages: number;
40
+ botMessages: number;
41
+ events: number;
42
+ eventTypes: {
43
+ [k: string]: number;
44
+ };
45
+ customEvents: {
46
+ [k: string]: number;
47
+ };
48
+ }[];
49
+ }
@@ -0,0 +1,30 @@
1
+ export interface GetBotLogsRequestHeaders {
2
+ }
3
+ export interface GetBotLogsRequestQuery {
4
+ timeStart: string;
5
+ timeEnd: string;
6
+ nextToken?: string;
7
+ }
8
+ export interface GetBotLogsRequestParams {
9
+ id: string;
10
+ }
11
+ export interface GetBotLogsRequestBody {
12
+ }
13
+ export type GetBotLogsInput = GetBotLogsRequestBody & GetBotLogsRequestHeaders & GetBotLogsRequestQuery & GetBotLogsRequestParams;
14
+ export type GetBotLogsRequest = {
15
+ headers: GetBotLogsRequestHeaders;
16
+ query: GetBotLogsRequestQuery;
17
+ params: GetBotLogsRequestParams;
18
+ body: GetBotLogsRequestBody;
19
+ };
20
+ export declare const parseReq: (input: GetBotLogsInput) => GetBotLogsRequest & {
21
+ path: string;
22
+ };
23
+ export interface GetBotLogsResponse {
24
+ logs: {
25
+ timestamp: string;
26
+ level: string;
27
+ message: string;
28
+ }[];
29
+ nextToken?: string;
30
+ }
@@ -0,0 +1,23 @@
1
+ export interface GetBotWebchatRequestHeaders {
2
+ }
3
+ export interface GetBotWebchatRequestQuery {
4
+ type: "preconfigured" | "configurable" | "fullscreen" | "sharableUrl";
5
+ }
6
+ export interface GetBotWebchatRequestParams {
7
+ id: string;
8
+ }
9
+ export interface GetBotWebchatRequestBody {
10
+ }
11
+ export type GetBotWebchatInput = GetBotWebchatRequestBody & GetBotWebchatRequestHeaders & GetBotWebchatRequestQuery & GetBotWebchatRequestParams;
12
+ export type GetBotWebchatRequest = {
13
+ headers: GetBotWebchatRequestHeaders;
14
+ query: GetBotWebchatRequestQuery;
15
+ params: GetBotWebchatRequestParams;
16
+ body: GetBotWebchatRequestBody;
17
+ };
18
+ export declare const parseReq: (input: GetBotWebchatInput) => GetBotWebchatRequest & {
19
+ path: string;
20
+ };
21
+ export interface GetBotWebchatResponse {
22
+ code: string;
23
+ }
@@ -0,0 +1,56 @@
1
+ export interface GetConversationRequestHeaders {
2
+ }
3
+ export interface GetConversationRequestQuery {
4
+ }
5
+ export interface GetConversationRequestParams {
6
+ id: string;
7
+ }
8
+ export interface GetConversationRequestBody {
9
+ }
10
+ export type GetConversationInput = GetConversationRequestBody & GetConversationRequestHeaders & GetConversationRequestQuery & GetConversationRequestParams;
11
+ export type GetConversationRequest = {
12
+ headers: GetConversationRequestHeaders;
13
+ query: GetConversationRequestQuery;
14
+ params: GetConversationRequestParams;
15
+ body: GetConversationRequestBody;
16
+ };
17
+ export declare const parseReq: (input: GetConversationInput) => GetConversationRequest & {
18
+ path: string;
19
+ };
20
+ export interface GetConversationResponse {
21
+ /**
22
+ * The conversation object represents an exchange of messages between one or more users. A [Conversation](#schema_conversation) is always linked to an integration's channels. For example, a Slack channel represents a conversation.
23
+ */
24
+ conversation: {
25
+ /**
26
+ * Id of the [Conversation](#schema_conversation)
27
+ */
28
+ id: string;
29
+ /**
30
+ * Id of the current [Task](#schema_task)
31
+ */
32
+ currentTaskId?: string;
33
+ /**
34
+ * Creation date of the [Conversation](#schema_conversation) in ISO 8601 format
35
+ */
36
+ createdAt: string;
37
+ /**
38
+ * Updating date of the [Conversation](#schema_conversation) in ISO 8601 format
39
+ */
40
+ updatedAt: string;
41
+ /**
42
+ * Name of the channel where the [Conversation](#schema_conversation) is happening
43
+ */
44
+ channel: string;
45
+ /**
46
+ * Name of the integration that created the [Conversation](#schema_conversation)
47
+ */
48
+ integration: string;
49
+ /**
50
+ * Set of [Tags](/docs/developers/concepts/tags) that you can attach to a [Conversation](#schema_conversation). The set of [Tags](/docs/developers/concepts/tags) available on a [Conversation](#schema_conversation) is restricted by the list of [Tags](/docs/developers/concepts/tags) defined previously by the [Bot](#schema_bot). Individual keys can be unset by posting an empty value to them.
51
+ */
52
+ tags: {
53
+ [k: string]: string;
54
+ };
55
+ };
56
+ }
@@ -0,0 +1,61 @@
1
+ export interface GetEventRequestHeaders {
2
+ }
3
+ export interface GetEventRequestQuery {
4
+ }
5
+ export interface GetEventRequestParams {
6
+ id: string;
7
+ }
8
+ export interface GetEventRequestBody {
9
+ }
10
+ export type GetEventInput = GetEventRequestBody & GetEventRequestHeaders & GetEventRequestQuery & GetEventRequestParams;
11
+ export type GetEventRequest = {
12
+ headers: GetEventRequestHeaders;
13
+ query: GetEventRequestQuery;
14
+ params: GetEventRequestParams;
15
+ body: GetEventRequestBody;
16
+ };
17
+ export declare const parseReq: (input: GetEventInput) => GetEventRequest & {
18
+ path: string;
19
+ };
20
+ export interface GetEventResponse {
21
+ /**
22
+ * The event object represents an action or an occurrence.
23
+ */
24
+ event: {
25
+ /**
26
+ * Id of the [Event](#schema_event)
27
+ */
28
+ id: string;
29
+ /**
30
+ * Creation date of the [Event](#schema_event) in ISO 8601 format
31
+ */
32
+ createdAt: string;
33
+ /**
34
+ * Type of the [Event](#schema_event).
35
+ */
36
+ type: string;
37
+ /**
38
+ * Payload is the content of the event defined by the integration installed on your bot or one of the default events created by our api.
39
+ */
40
+ payload: {
41
+ [k: string]: any;
42
+ };
43
+ /**
44
+ * ID of the [Conversation](#schema_conversation) to link the event to.
45
+ */
46
+ conversationId?: string;
47
+ /**
48
+ * ID of the [User](#schema_user) to link the event to.
49
+ */
50
+ userId?: string;
51
+ /**
52
+ * ID of the [Message](#schema_message) to link the event to.
53
+ */
54
+ messageId?: string;
55
+ status: "pending" | "processed" | "ignored" | "failed";
56
+ /**
57
+ * Reason why the event failed to be processed
58
+ */
59
+ failureReason: string | null;
60
+ };
61
+ }
@@ -0,0 +1,85 @@
1
+ export interface GetFileRequestHeaders {
2
+ }
3
+ export interface GetFileRequestQuery {
4
+ }
5
+ export interface GetFileRequestParams {
6
+ id: string;
7
+ }
8
+ export interface GetFileRequestBody {
9
+ }
10
+ export type GetFileInput = GetFileRequestBody & GetFileRequestHeaders & GetFileRequestQuery & GetFileRequestParams;
11
+ export type GetFileRequest = {
12
+ headers: GetFileRequestHeaders;
13
+ query: GetFileRequestQuery;
14
+ params: GetFileRequestParams;
15
+ body: GetFileRequestBody;
16
+ };
17
+ export declare const parseReq: (input: GetFileInput) => GetFileRequest & {
18
+ path: string;
19
+ };
20
+ export interface GetFileResponse {
21
+ file: {
22
+ /**
23
+ * File ID
24
+ */
25
+ id: string;
26
+ /**
27
+ * The ID of the bot the file belongs to
28
+ */
29
+ botId: string;
30
+ /**
31
+ * File name
32
+ */
33
+ name: string | null;
34
+ /**
35
+ * If the file is not uploaded yet, this will be set to a `null` value.
36
+ *
37
+ * If the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.
38
+ */
39
+ url: string | null;
40
+ /**
41
+ * File size in bytes. Non-null if file upload status is "COMPLETE".
42
+ */
43
+ size: number | null;
44
+ /**
45
+ * MIME type of the file's content
46
+ */
47
+ contentType: string;
48
+ /**
49
+ * The tags of the file as an object of key/value pairs
50
+ */
51
+ tags: {
52
+ [k: string]: string;
53
+ };
54
+ /**
55
+ * File creation timestamp in ISO 8601 format
56
+ */
57
+ createdAt: string;
58
+ /**
59
+ * File last update timestamp in ISO 8601 format
60
+ */
61
+ updatedAt: string;
62
+ /**
63
+ * Access policies configured for the file.
64
+ */
65
+ accessPolicies: ("integrations" | "public_content")[];
66
+ /**
67
+ * Whether the file was requested to be indexed for search or not.
68
+ */
69
+ index: boolean;
70
+ /**
71
+ * Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.
72
+ *
73
+ * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.
74
+ *
75
+ * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).
76
+ *
77
+ * Once the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.
78
+ */
79
+ status: "UPLOAD_PENDING" | "UPLOAD_FAILED" | "UPLOAD_COMPLETED" | "INDEXING_PENDING" | "INDEXING_FAILED" | "INDEXING_COMPLETED";
80
+ /**
81
+ * If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.
82
+ */
83
+ failedStatusReason?: string;
84
+ };
85
+ }