@botpress/api 0.12.6 → 0.13.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.
package/src/gen/state.ts CHANGED
@@ -30,7 +30,7 @@ export const state = {
30
30
  integrationName: {
31
31
  type: "string",
32
32
  description:
33
- "Name of the integration to which the conversation creation will be delegated",
33
+ "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
34
34
  },
35
35
  },
36
36
  required: ["channel", "tags"],
@@ -174,7 +174,7 @@ export const state = {
174
174
  integrationName: {
175
175
  type: "string",
176
176
  description:
177
- "Name of the integration to which the conversation creation will be delegated",
177
+ "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
178
178
  },
179
179
  },
180
180
  required: ["channel", "tags"],
@@ -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:
@@ -791,7 +947,7 @@ export const state = {
791
947
  integrationName: {
792
948
  type: "string",
793
949
  description:
794
- "Name of the integration to which the user creation will be delegated",
950
+ "[DEPRECATED] To create a user from within a bot, call an action of the integration instead.",
795
951
  },
796
952
  name: {
797
953
  type: "string",
@@ -939,7 +1095,7 @@ export const state = {
939
1095
  integrationName: {
940
1096
  type: "string",
941
1097
  description:
942
- "Name of the integration to which the user creation will be delegated",
1098
+ "[DEPRECATED] To create a user from within a bot, call an action of the integration instead.",
943
1099
  },
944
1100
  name: {
945
1101
  type: "string",
@@ -3258,6 +3414,7 @@ export const state = {
3258
3414
  "integrations_owned_count",
3259
3415
  "cognitive_calls",
3260
3416
  "model_credit",
3417
+ "token_spend",
3261
3418
  ],
3262
3419
  required: true,
3263
3420
  },
@@ -3317,6 +3474,7 @@ export const state = {
3317
3474
  "integrations_owned_count",
3318
3475
  "cognitive_calls",
3319
3476
  "model_credit",
3477
+ "token_spend",
3320
3478
  ],
3321
3479
  required: true,
3322
3480
  },
@@ -3357,6 +3515,7 @@ export const state = {
3357
3515
  "integrations_owned_count",
3358
3516
  "cognitive_calls",
3359
3517
  "model_credit",
3518
+ "token_spend",
3360
3519
  ],
3361
3520
  description: "Usage type that can be used",
3362
3521
  },
@@ -3425,6 +3584,7 @@ export const state = {
3425
3584
  "integrations_owned_count",
3426
3585
  "cognitive_calls",
3427
3586
  "model_credit",
3587
+ "token_spend",
3428
3588
  ],
3429
3589
  description: "Usage type that can be used",
3430
3590
  },
@@ -5074,6 +5234,7 @@ export const state = {
5074
5234
  "integrations_owned_count",
5075
5235
  "cognitive_calls",
5076
5236
  "model_credit",
5237
+ "token_spend",
5077
5238
  ],
5078
5239
  required: true,
5079
5240
  },
@@ -5126,6 +5287,7 @@ export const state = {
5126
5287
  "integrations_owned_count",
5127
5288
  "cognitive_calls",
5128
5289
  "model_credit",
5290
+ "token_spend",
5129
5291
  ],
5130
5292
  required: true,
5131
5293
  },
@@ -5374,7 +5536,7 @@ export const state = {
5374
5536
  title: "Botpress API",
5375
5537
  description: "API for Botpress Cloud",
5376
5538
  server: "https://api.botpress.cloud",
5377
- version: "0.12.6",
5539
+ version: "0.13.1",
5378
5540
  prefix: "v1",
5379
5541
  },
5380
5542
  errors: [
@@ -5499,6 +5661,7 @@ export const state = {
5499
5661
  createConversationBody: true,
5500
5662
  getOrCreateConversationBody: true,
5501
5663
  updateConversationBody: true,
5664
+ addParticipantBody: true,
5502
5665
  createEventBody: true,
5503
5666
  createMessageBody: true,
5504
5667
  getOrCreateMessageBody: true,
@@ -5533,6 +5696,10 @@ export const state = {
5533
5696
  getOrCreateConversationResponse: true,
5534
5697
  updateConversationResponse: true,
5535
5698
  deleteConversationResponse: true,
5699
+ listParticipantsResponse: true,
5700
+ addParticipantResponse: true,
5701
+ getParticipantResponse: true,
5702
+ removeParticipantResponse: true,
5536
5703
  createEventResponse: true,
5537
5704
  getEventResponse: true,
5538
5705
  listEventsResponse: true,
@@ -6522,6 +6689,7 @@ export const state = {
6522
6689
  "integrations_owned_count",
6523
6690
  "cognitive_calls",
6524
6691
  "model_credit",
6692
+ "token_spend",
6525
6693
  ],
6526
6694
  description: "Usage type that can be used",
6527
6695
  },
@@ -6971,6 +7139,10 @@ export const state = {
6971
7139
  "getOrCreateConversation",
6972
7140
  "updateConversation",
6973
7141
  "deleteConversation",
7142
+ "listParticipants",
7143
+ "addParticipant",
7144
+ "getParticipant",
7145
+ "removeParticipant",
6974
7146
  ],
6975
7147
  schema: "Conversation",
6976
7148
  },