@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.
package/src/gen/state.ts CHANGED
@@ -272,6 +272,162 @@ export const state = {
272
272
  },
273
273
  },
274
274
  },
275
+ listParticipants: {
276
+ name: "listParticipants",
277
+ description:
278
+ "Retrieves a list of [Participant](#schema_participant) for a given [Conversation](#schema_conversation).",
279
+ method: "get",
280
+ path: "/v1/chat/conversations/{id}/participants",
281
+ parameters: {
282
+ nextToken: {
283
+ in: "query",
284
+ description:
285
+ "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
286
+ type: "string",
287
+ },
288
+ id: {
289
+ in: "path",
290
+ type: "string",
291
+ description: "Conversation id",
292
+ },
293
+ },
294
+ section: "conversation",
295
+ response: {
296
+ description:
297
+ "Returns a list of [Participant](#schema_participant) objects",
298
+ schema: {
299
+ type: "object",
300
+ properties: {
301
+ participants: {
302
+ type: "array",
303
+ items: {
304
+ $ref: "#/components/schemas/User",
305
+ },
306
+ },
307
+ meta: {
308
+ type: "object",
309
+ properties: {
310
+ nextToken: {
311
+ type: "string",
312
+ description:
313
+ "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.",
314
+ },
315
+ },
316
+ additionalProperties: false,
317
+ },
318
+ },
319
+ required: ["participants", "meta"],
320
+ title: "listParticipantsResponse",
321
+ additionalProperties: false,
322
+ },
323
+ },
324
+ },
325
+ addParticipant: {
326
+ name: "addParticipant",
327
+ description:
328
+ "Add a [Participant](#schema_participant) to a [Conversation](#schema_conversation).",
329
+ method: "post",
330
+ path: "/v1/chat/conversations/{id}/participants",
331
+ parameters: {
332
+ id: {
333
+ in: "path",
334
+ type: "string",
335
+ description: "Conversation id",
336
+ },
337
+ },
338
+ requestBody: {
339
+ description: "Participant data",
340
+ schema: {
341
+ type: "object",
342
+ properties: {
343
+ userId: {
344
+ type: "string",
345
+ description: "User id",
346
+ },
347
+ },
348
+ required: ["userId"],
349
+ title: "addParticipantBody",
350
+ additionalProperties: false,
351
+ },
352
+ },
353
+ section: "conversation",
354
+ response: {
355
+ description: "Returns the [Participant](#schema_participant) object",
356
+ schema: {
357
+ type: "object",
358
+ properties: {
359
+ participant: {
360
+ $ref: "#/components/schemas/User",
361
+ },
362
+ },
363
+ required: ["participant"],
364
+ title: "addParticipantResponse",
365
+ additionalProperties: false,
366
+ },
367
+ },
368
+ },
369
+ getParticipant: {
370
+ name: "getParticipant",
371
+ description:
372
+ "Retrieves a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
373
+ method: "get",
374
+ path: "/v1/chat/conversations/{id}/participants/{userId}",
375
+ parameters: {
376
+ id: {
377
+ in: "path",
378
+ type: "string",
379
+ description: "Conversation id",
380
+ },
381
+ userId: {
382
+ in: "path",
383
+ type: "string",
384
+ description: "User id",
385
+ },
386
+ },
387
+ section: "conversation",
388
+ response: {
389
+ description: "Returns the [Participant](#schema_participant) object",
390
+ schema: {
391
+ type: "object",
392
+ properties: {
393
+ participant: {
394
+ $ref: "#/components/schemas/User",
395
+ },
396
+ },
397
+ required: ["participant"],
398
+ title: "getParticipantResponse",
399
+ additionalProperties: false,
400
+ },
401
+ },
402
+ },
403
+ removeParticipant: {
404
+ name: "removeParticipant",
405
+ description:
406
+ "Remove a [Participant](#schema_participant) from a [Conversation](#schema_conversation).",
407
+ method: "delete",
408
+ path: "/v1/chat/conversations/{id}/participants/{userId}",
409
+ parameters: {
410
+ id: {
411
+ in: "path",
412
+ type: "string",
413
+ description: "Conversation id",
414
+ },
415
+ userId: {
416
+ in: "path",
417
+ type: "string",
418
+ description: "User id",
419
+ },
420
+ },
421
+ section: "conversation",
422
+ response: {
423
+ description: "Returns an empty object",
424
+ schema: {
425
+ type: "object",
426
+ title: "removeParticipantResponse",
427
+ additionalProperties: false,
428
+ },
429
+ },
430
+ },
275
431
  createEvent: {
276
432
  name: "createEvent",
277
433
  description:
@@ -1502,7 +1658,7 @@ export const state = {
1502
1658
  properties: {
1503
1659
  id: {
1504
1660
  type: "string",
1505
- description: "Id of the [Integration](#schema_integration)",
1661
+ description: "ID of the [Integration](#schema_integration)",
1506
1662
  },
1507
1663
  name: {
1508
1664
  type: "string",
@@ -4202,6 +4358,9 @@ export const state = {
4202
4358
  identifier: {
4203
4359
  type: "object",
4204
4360
  properties: {
4361
+ fallbackHandlerScript: {
4362
+ type: "string",
4363
+ },
4205
4364
  extractScript: {
4206
4365
  type: "string",
4207
4366
  },
@@ -4588,6 +4747,10 @@ export const state = {
4588
4747
  type: "string",
4589
4748
  nullable: true,
4590
4749
  },
4750
+ fallbackHandlerScript: {
4751
+ type: "string",
4752
+ nullable: true,
4753
+ },
4591
4754
  },
4592
4755
  additionalProperties: false,
4593
4756
  },
@@ -4823,7 +4986,7 @@ export const state = {
4823
4986
  properties: {
4824
4987
  id: {
4825
4988
  type: "string",
4826
- description: "Id of the [Integration](#schema_integration)",
4989
+ description: "ID of the [Integration](#schema_integration)",
4827
4990
  },
4828
4991
  name: {
4829
4992
  type: "string",
@@ -5367,7 +5530,7 @@ export const state = {
5367
5530
  title: "Botpress API",
5368
5531
  description: "API for Botpress Cloud",
5369
5532
  server: "https://api.botpress.cloud",
5370
- version: "0.12.5",
5533
+ version: "0.13.0",
5371
5534
  prefix: "v1",
5372
5535
  },
5373
5536
  errors: [
@@ -5492,6 +5655,7 @@ export const state = {
5492
5655
  createConversationBody: true,
5493
5656
  getOrCreateConversationBody: true,
5494
5657
  updateConversationBody: true,
5658
+ addParticipantBody: true,
5495
5659
  createEventBody: true,
5496
5660
  createMessageBody: true,
5497
5661
  getOrCreateMessageBody: true,
@@ -5526,6 +5690,10 @@ export const state = {
5526
5690
  getOrCreateConversationResponse: true,
5527
5691
  updateConversationResponse: true,
5528
5692
  deleteConversationResponse: true,
5693
+ listParticipantsResponse: true,
5694
+ addParticipantResponse: true,
5695
+ getParticipantResponse: true,
5696
+ removeParticipantResponse: true,
5529
5697
  createEventResponse: true,
5530
5698
  getEventResponse: true,
5531
5699
  listEventsResponse: true,
@@ -5690,7 +5858,7 @@ export const state = {
5690
5858
  },
5691
5859
  id: {
5692
5860
  type: "string",
5693
- description: "Id of the [Integration](#schema_integration)",
5861
+ description: "ID of the [Integration](#schema_integration)",
5694
5862
  },
5695
5863
  createdAt: {
5696
5864
  type: "string",
@@ -5997,7 +6165,7 @@ export const state = {
5997
6165
  properties: {
5998
6166
  id: {
5999
6167
  type: "string",
6000
- description: "Id of the [Integration](#schema_integration)",
6168
+ description: "ID of the [Integration](#schema_integration)",
6001
6169
  },
6002
6170
  createdAt: {
6003
6171
  type: "string",
@@ -6014,6 +6182,11 @@ export const state = {
6014
6182
  identifier: {
6015
6183
  type: "object",
6016
6184
  properties: {
6185
+ fallbackHandlerScript: {
6186
+ type: "string",
6187
+ description:
6188
+ "VRL Script of the [Integration](#schema_integration) to handle incoming requests for a request that doesn't have an identifier",
6189
+ },
6017
6190
  extractScript: {
6018
6191
  type: "string",
6019
6192
  description:
@@ -6959,6 +7132,10 @@ export const state = {
6959
7132
  "getOrCreateConversation",
6960
7133
  "updateConversation",
6961
7134
  "deleteConversation",
7135
+ "listParticipants",
7136
+ "addParticipant",
7137
+ "getParticipant",
7138
+ "removeParticipant",
6962
7139
  ],
6963
7140
  schema: "Conversation",
6964
7141
  },