@botpress/api 0.12.6 → 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/dist/gen/state.d.ts +154 -0
- package/dist/index.js +160 -2
- package/package.json +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +166 -1
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:
|
|
@@ -5374,7 +5530,7 @@ export const state = {
|
|
|
5374
5530
|
title: "Botpress API",
|
|
5375
5531
|
description: "API for Botpress Cloud",
|
|
5376
5532
|
server: "https://api.botpress.cloud",
|
|
5377
|
-
version: "0.
|
|
5533
|
+
version: "0.13.0",
|
|
5378
5534
|
prefix: "v1",
|
|
5379
5535
|
},
|
|
5380
5536
|
errors: [
|
|
@@ -5499,6 +5655,7 @@ export const state = {
|
|
|
5499
5655
|
createConversationBody: true,
|
|
5500
5656
|
getOrCreateConversationBody: true,
|
|
5501
5657
|
updateConversationBody: true,
|
|
5658
|
+
addParticipantBody: true,
|
|
5502
5659
|
createEventBody: true,
|
|
5503
5660
|
createMessageBody: true,
|
|
5504
5661
|
getOrCreateMessageBody: true,
|
|
@@ -5533,6 +5690,10 @@ export const state = {
|
|
|
5533
5690
|
getOrCreateConversationResponse: true,
|
|
5534
5691
|
updateConversationResponse: true,
|
|
5535
5692
|
deleteConversationResponse: true,
|
|
5693
|
+
listParticipantsResponse: true,
|
|
5694
|
+
addParticipantResponse: true,
|
|
5695
|
+
getParticipantResponse: true,
|
|
5696
|
+
removeParticipantResponse: true,
|
|
5536
5697
|
createEventResponse: true,
|
|
5537
5698
|
getEventResponse: true,
|
|
5538
5699
|
listEventsResponse: true,
|
|
@@ -6971,6 +7132,10 @@ export const state = {
|
|
|
6971
7132
|
"getOrCreateConversation",
|
|
6972
7133
|
"updateConversation",
|
|
6973
7134
|
"deleteConversation",
|
|
7135
|
+
"listParticipants",
|
|
7136
|
+
"addParticipant",
|
|
7137
|
+
"getParticipant",
|
|
7138
|
+
"removeParticipant",
|
|
6974
7139
|
],
|
|
6975
7140
|
schema: "Conversation",
|
|
6976
7141
|
},
|