@botpress/api 0.12.5 → 0.13.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.
@@ -252,6 +252,155 @@ export declare const state: {
252
252
  };
253
253
  };
254
254
  };
255
+ listParticipants: {
256
+ name: string;
257
+ description: string;
258
+ method: "get";
259
+ path: string;
260
+ parameters: {
261
+ nextToken: {
262
+ in: "query";
263
+ description: string;
264
+ type: "string";
265
+ };
266
+ id: {
267
+ in: "path";
268
+ type: "string";
269
+ description: string;
270
+ };
271
+ };
272
+ section: "conversation";
273
+ response: {
274
+ description: string;
275
+ schema: {
276
+ type: "object";
277
+ properties: {
278
+ participants: {
279
+ type: "array";
280
+ items: {
281
+ $ref: string;
282
+ };
283
+ };
284
+ meta: {
285
+ type: "object";
286
+ properties: {
287
+ nextToken: {
288
+ type: "string";
289
+ description: string;
290
+ };
291
+ };
292
+ additionalProperties: false;
293
+ };
294
+ };
295
+ required: string[];
296
+ title: string;
297
+ additionalProperties: false;
298
+ };
299
+ };
300
+ };
301
+ addParticipant: {
302
+ name: string;
303
+ description: string;
304
+ method: "post";
305
+ path: string;
306
+ parameters: {
307
+ id: {
308
+ in: "path";
309
+ type: "string";
310
+ description: string;
311
+ };
312
+ };
313
+ requestBody: {
314
+ description: string;
315
+ schema: {
316
+ type: "object";
317
+ properties: {
318
+ userId: {
319
+ type: "string";
320
+ description: string;
321
+ };
322
+ };
323
+ required: string[];
324
+ title: string;
325
+ additionalProperties: false;
326
+ };
327
+ };
328
+ section: "conversation";
329
+ response: {
330
+ description: string;
331
+ schema: {
332
+ type: "object";
333
+ properties: {
334
+ participant: {
335
+ $ref: string;
336
+ };
337
+ };
338
+ required: string[];
339
+ title: string;
340
+ additionalProperties: false;
341
+ };
342
+ };
343
+ };
344
+ getParticipant: {
345
+ name: string;
346
+ description: string;
347
+ method: "get";
348
+ path: string;
349
+ parameters: {
350
+ id: {
351
+ in: "path";
352
+ type: "string";
353
+ description: string;
354
+ };
355
+ userId: {
356
+ in: "path";
357
+ type: "string";
358
+ description: string;
359
+ };
360
+ };
361
+ section: "conversation";
362
+ response: {
363
+ description: string;
364
+ schema: {
365
+ type: "object";
366
+ properties: {
367
+ participant: {
368
+ $ref: string;
369
+ };
370
+ };
371
+ required: string[];
372
+ title: string;
373
+ additionalProperties: false;
374
+ };
375
+ };
376
+ };
377
+ removeParticipant: {
378
+ name: string;
379
+ description: string;
380
+ method: "delete";
381
+ path: string;
382
+ parameters: {
383
+ id: {
384
+ in: "path";
385
+ type: "string";
386
+ description: string;
387
+ };
388
+ userId: {
389
+ in: "path";
390
+ type: "string";
391
+ description: string;
392
+ };
393
+ };
394
+ section: "conversation";
395
+ response: {
396
+ description: string;
397
+ schema: {
398
+ type: "object";
399
+ title: string;
400
+ additionalProperties: false;
401
+ };
402
+ };
403
+ };
255
404
  createEvent: {
256
405
  name: string;
257
406
  description: string;
@@ -3840,6 +3989,9 @@ export declare const state: {
3840
3989
  identifier: {
3841
3990
  type: "object";
3842
3991
  properties: {
3992
+ fallbackHandlerScript: {
3993
+ type: "string";
3994
+ };
3843
3995
  extractScript: {
3844
3996
  type: "string";
3845
3997
  };
@@ -4208,6 +4360,10 @@ export declare const state: {
4208
4360
  type: "string";
4209
4361
  nullable: true;
4210
4362
  };
4363
+ fallbackHandlerScript: {
4364
+ type: "string";
4365
+ nullable: true;
4366
+ };
4211
4367
  };
4212
4368
  additionalProperties: false;
4213
4369
  };
@@ -4984,6 +5140,7 @@ export declare const state: {
4984
5140
  createConversationBody: true;
4985
5141
  getOrCreateConversationBody: true;
4986
5142
  updateConversationBody: true;
5143
+ addParticipantBody: true;
4987
5144
  createEventBody: true;
4988
5145
  createMessageBody: true;
4989
5146
  getOrCreateMessageBody: true;
@@ -5018,6 +5175,10 @@ export declare const state: {
5018
5175
  getOrCreateConversationResponse: true;
5019
5176
  updateConversationResponse: true;
5020
5177
  deleteConversationResponse: true;
5178
+ listParticipantsResponse: true;
5179
+ addParticipantResponse: true;
5180
+ getParticipantResponse: true;
5181
+ removeParticipantResponse: true;
5021
5182
  createEventResponse: true;
5022
5183
  getEventResponse: true;
5023
5184
  listEventsResponse: true;
@@ -5449,6 +5610,10 @@ export declare const state: {
5449
5610
  identifier: {
5450
5611
  type: "object";
5451
5612
  properties: {
5613
+ fallbackHandlerScript: {
5614
+ type: "string";
5615
+ description: string;
5616
+ };
5452
5617
  extractScript: {
5453
5618
  type: "string";
5454
5619
  description: string;
package/dist/index.js CHANGED
@@ -426136,6 +426136,155 @@ var state = {
426136
426136
  }
426137
426137
  }
426138
426138
  },
426139
+ listParticipants: {
426140
+ name: "listParticipants",
426141
+ description: "Retrieves a list of [Participant](#schema_participant) for a given [Conversation](#schema_conversation).",
426142
+ method: "get",
426143
+ path: "/v1/chat/conversations/{id}/participants",
426144
+ parameters: {
426145
+ nextToken: {
426146
+ in: "query",
426147
+ description: "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
426148
+ type: "string"
426149
+ },
426150
+ id: {
426151
+ in: "path",
426152
+ type: "string",
426153
+ description: "Conversation id"
426154
+ }
426155
+ },
426156
+ section: "conversation",
426157
+ response: {
426158
+ description: "Returns a list of [Participant](#schema_participant) objects",
426159
+ schema: {
426160
+ type: "object",
426161
+ properties: {
426162
+ participants: {
426163
+ type: "array",
426164
+ items: {
426165
+ $ref: "#/components/schemas/User"
426166
+ }
426167
+ },
426168
+ meta: {
426169
+ type: "object",
426170
+ properties: {
426171
+ nextToken: {
426172
+ type: "string",
426173
+ description: "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
426174
+ }
426175
+ },
426176
+ additionalProperties: false
426177
+ }
426178
+ },
426179
+ required: ["participants", "meta"],
426180
+ title: "listParticipantsResponse",
426181
+ additionalProperties: false
426182
+ }
426183
+ }
426184
+ },
426185
+ addParticipant: {
426186
+ name: "addParticipant",
426187
+ description: "Add a [Participant](#schema_participant) to a [Conversation](#schema_conversation).",
426188
+ method: "post",
426189
+ path: "/v1/chat/conversations/{id}/participants",
426190
+ parameters: {
426191
+ id: {
426192
+ in: "path",
426193
+ type: "string",
426194
+ description: "Conversation id"
426195
+ }
426196
+ },
426197
+ requestBody: {
426198
+ description: "Participant data",
426199
+ schema: {
426200
+ type: "object",
426201
+ properties: {
426202
+ userId: {
426203
+ type: "string",
426204
+ description: "User id"
426205
+ }
426206
+ },
426207
+ required: ["userId"],
426208
+ title: "addParticipantBody",
426209
+ additionalProperties: false
426210
+ }
426211
+ },
426212
+ section: "conversation",
426213
+ response: {
426214
+ description: "Returns the [Participant](#schema_participant) object",
426215
+ schema: {
426216
+ type: "object",
426217
+ properties: {
426218
+ participant: {
426219
+ $ref: "#/components/schemas/User"
426220
+ }
426221
+ },
426222
+ required: ["participant"],
426223
+ title: "addParticipantResponse",
426224
+ additionalProperties: false
426225
+ }
426226
+ }
426227
+ },
426228
+ getParticipant: {
426229
+ name: "getParticipant",
426230
+ description: "Retrieves a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
426231
+ method: "get",
426232
+ path: "/v1/chat/conversations/{id}/participants/{userId}",
426233
+ parameters: {
426234
+ id: {
426235
+ in: "path",
426236
+ type: "string",
426237
+ description: "Conversation id"
426238
+ },
426239
+ userId: {
426240
+ in: "path",
426241
+ type: "string",
426242
+ description: "User id"
426243
+ }
426244
+ },
426245
+ section: "conversation",
426246
+ response: {
426247
+ description: "Returns the [Participant](#schema_participant) object",
426248
+ schema: {
426249
+ type: "object",
426250
+ properties: {
426251
+ participant: {
426252
+ $ref: "#/components/schemas/User"
426253
+ }
426254
+ },
426255
+ required: ["participant"],
426256
+ title: "getParticipantResponse",
426257
+ additionalProperties: false
426258
+ }
426259
+ }
426260
+ },
426261
+ removeParticipant: {
426262
+ name: "removeParticipant",
426263
+ description: "Remove a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
426264
+ method: "delete",
426265
+ path: "/v1/chat/conversations/{id}/participants/{userId}",
426266
+ parameters: {
426267
+ id: {
426268
+ in: "path",
426269
+ type: "string",
426270
+ description: "Conversation id"
426271
+ },
426272
+ userId: {
426273
+ in: "path",
426274
+ type: "string",
426275
+ description: "User id"
426276
+ }
426277
+ },
426278
+ section: "conversation",
426279
+ response: {
426280
+ description: "Returns an empty object",
426281
+ schema: {
426282
+ type: "object",
426283
+ title: "removeParticipantResponse",
426284
+ additionalProperties: false
426285
+ }
426286
+ }
426287
+ },
426139
426288
  createEvent: {
426140
426289
  name: "createEvent",
426141
426290
  description: "Creates a new [Event](#schema_event). When creating a new [Event](#schema_event), the required tags must be provided. See the specific integration for more details.",
@@ -427298,7 +427447,7 @@ var state = {
427298
427447
  properties: {
427299
427448
  id: {
427300
427449
  type: "string",
427301
- description: "Id of the [Integration](#schema_integration)"
427450
+ description: "ID of the [Integration](#schema_integration)"
427302
427451
  },
427303
427452
  name: {
427304
427453
  type: "string",
@@ -429942,6 +430091,9 @@ var state = {
429942
430091
  identifier: {
429943
430092
  type: "object",
429944
430093
  properties: {
430094
+ fallbackHandlerScript: {
430095
+ type: "string"
430096
+ },
429945
430097
  extractScript: {
429946
430098
  type: "string"
429947
430099
  }
@@ -430309,6 +430461,10 @@ var state = {
430309
430461
  extractScript: {
430310
430462
  type: "string",
430311
430463
  nullable: true
430464
+ },
430465
+ fallbackHandlerScript: {
430466
+ type: "string",
430467
+ nullable: true
430312
430468
  }
430313
430469
  },
430314
430470
  additionalProperties: false
@@ -430533,7 +430689,7 @@ var state = {
430533
430689
  properties: {
430534
430690
  id: {
430535
430691
  type: "string",
430536
- description: "Id of the [Integration](#schema_integration)"
430692
+ description: "ID of the [Integration](#schema_integration)"
430537
430693
  },
430538
430694
  name: {
430539
430695
  type: "string",
@@ -431065,7 +431221,7 @@ var state = {
431065
431221
  title: "Botpress API",
431066
431222
  description: "API for Botpress Cloud",
431067
431223
  server: "https://api.botpress.cloud",
431068
- version: "0.12.5",
431224
+ version: "0.13.0",
431069
431225
  prefix: "v1"
431070
431226
  },
431071
431227
  errors: [
@@ -431181,6 +431337,7 @@ var state = {
431181
431337
  createConversationBody: true,
431182
431338
  getOrCreateConversationBody: true,
431183
431339
  updateConversationBody: true,
431340
+ addParticipantBody: true,
431184
431341
  createEventBody: true,
431185
431342
  createMessageBody: true,
431186
431343
  getOrCreateMessageBody: true,
@@ -431215,6 +431372,10 @@ var state = {
431215
431372
  getOrCreateConversationResponse: true,
431216
431373
  updateConversationResponse: true,
431217
431374
  deleteConversationResponse: true,
431375
+ listParticipantsResponse: true,
431376
+ addParticipantResponse: true,
431377
+ getParticipantResponse: true,
431378
+ removeParticipantResponse: true,
431218
431379
  createEventResponse: true,
431219
431380
  getEventResponse: true,
431220
431381
  listEventsResponse: true,
@@ -431376,7 +431537,7 @@ var state = {
431376
431537
  },
431377
431538
  id: {
431378
431539
  type: "string",
431379
- description: "Id of the [Integration](#schema_integration)"
431540
+ description: "ID of the [Integration](#schema_integration)"
431380
431541
  },
431381
431542
  createdAt: {
431382
431543
  type: "string",
@@ -431669,7 +431830,7 @@ var state = {
431669
431830
  properties: {
431670
431831
  id: {
431671
431832
  type: "string",
431672
- description: "Id of the [Integration](#schema_integration)"
431833
+ description: "ID of the [Integration](#schema_integration)"
431673
431834
  },
431674
431835
  createdAt: {
431675
431836
  type: "string",
@@ -431684,6 +431845,10 @@ var state = {
431684
431845
  identifier: {
431685
431846
  type: "object",
431686
431847
  properties: {
431848
+ fallbackHandlerScript: {
431849
+ type: "string",
431850
+ description: "VRL Script of the [Integration](#schema_integration) to handle incoming requests for a request that doesn't have an identifier"
431851
+ },
431687
431852
  extractScript: {
431688
431853
  type: "string",
431689
431854
  description: "VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook often use for OAuth"
@@ -432580,7 +432745,11 @@ var state = {
432580
432745
  "listConversations",
432581
432746
  "getOrCreateConversation",
432582
432747
  "updateConversation",
432583
- "deleteConversation"
432748
+ "deleteConversation",
432749
+ "listParticipants",
432750
+ "addParticipant",
432751
+ "getParticipant",
432752
+ "removeParticipant"
432584
432753
  ],
432585
432754
  schema: "Conversation"
432586
432755
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.12.5",
3
+ "version": "0.13.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1 +1 @@
1
- {"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"File","name":"file","operations":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"description":"","title":"Hub","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Bot","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","listBotIssues","deleteBotIssue","listBotIssueEvents"],"schema":"Bot"},{"description":"","title":"Integration","name":"integration","operations":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"description":"","title":"Workspace","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","getWorkspace","listWorkspaceUsages","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"description":"","title":"Workspace Member","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"description":"","title":"Account","name":"account","operations":["getAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken"],"schema":"Account"},{"description":"","title":"Usage","name":"usage","operations":["getUsage"],"schema":"Usage"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."},{"status":409,"type":"RelationConflict","description":"The resource is not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."}]}
1
+ {"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation","listParticipants","addParticipant","getParticipant","removeParticipant"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"File","name":"file","operations":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"description":"","title":"Hub","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Bot","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","listBotIssues","deleteBotIssue","listBotIssueEvents"],"schema":"Bot"},{"description":"","title":"Integration","name":"integration","operations":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"description":"","title":"Workspace","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","getWorkspace","listWorkspaceUsages","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"description":"","title":"Workspace Member","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"description":"","title":"Account","name":"account","operations":["getAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken"],"schema":"Account"},{"description":"","title":"Usage","name":"usage","operations":["getUsage"],"schema":"Usage"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters."},{"status":409,"type":"RelationConflict","description":"The resource is not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."}]}