@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.
@@ -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;
@@ -4991,6 +5140,7 @@ export declare const state: {
4991
5140
  createConversationBody: true;
4992
5141
  getOrCreateConversationBody: true;
4993
5142
  updateConversationBody: true;
5143
+ addParticipantBody: true;
4994
5144
  createEventBody: true;
4995
5145
  createMessageBody: true;
4996
5146
  getOrCreateMessageBody: true;
@@ -5025,6 +5175,10 @@ export declare const state: {
5025
5175
  getOrCreateConversationResponse: true;
5026
5176
  updateConversationResponse: true;
5027
5177
  deleteConversationResponse: true;
5178
+ listParticipantsResponse: true;
5179
+ addParticipantResponse: true;
5180
+ getParticipantResponse: true;
5181
+ removeParticipantResponse: true;
5028
5182
  createEventResponse: true;
5029
5183
  getEventResponse: true;
5030
5184
  listEventsResponse: true;
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.",
@@ -431072,7 +431221,7 @@ var state = {
431072
431221
  title: "Botpress API",
431073
431222
  description: "API for Botpress Cloud",
431074
431223
  server: "https://api.botpress.cloud",
431075
- version: "0.12.6",
431224
+ version: "0.13.0",
431076
431225
  prefix: "v1"
431077
431226
  },
431078
431227
  errors: [
@@ -431188,6 +431337,7 @@ var state = {
431188
431337
  createConversationBody: true,
431189
431338
  getOrCreateConversationBody: true,
431190
431339
  updateConversationBody: true,
431340
+ addParticipantBody: true,
431191
431341
  createEventBody: true,
431192
431342
  createMessageBody: true,
431193
431343
  getOrCreateMessageBody: true,
@@ -431222,6 +431372,10 @@ var state = {
431222
431372
  getOrCreateConversationResponse: true,
431223
431373
  updateConversationResponse: true,
431224
431374
  deleteConversationResponse: true,
431375
+ listParticipantsResponse: true,
431376
+ addParticipantResponse: true,
431377
+ getParticipantResponse: true,
431378
+ removeParticipantResponse: true,
431225
431379
  createEventResponse: true,
431226
431380
  getEventResponse: true,
431227
431381
  listEventsResponse: true,
@@ -432591,7 +432745,11 @@ var state = {
432591
432745
  "listConversations",
432592
432746
  "getOrCreateConversation",
432593
432747
  "updateConversation",
432594
- "deleteConversation"
432748
+ "deleteConversation",
432749
+ "listParticipants",
432750
+ "addParticipant",
432751
+ "getParticipant",
432752
+ "removeParticipant"
432595
432753
  ],
432596
432754
  schema: "Conversation"
432597
432755
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.12.6",
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."}]}