@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.
@@ -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
@@ -425908,7 +425908,7 @@ var state = {
425908
425908
  },
425909
425909
  integrationName: {
425910
425910
  type: "string",
425911
- description: "Name of the integration to which the conversation creation will be delegated"
425911
+ description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead."
425912
425912
  }
425913
425913
  },
425914
425914
  required: ["channel", "tags"],
@@ -426043,7 +426043,7 @@ var state = {
426043
426043
  },
426044
426044
  integrationName: {
426045
426045
  type: "string",
426046
- description: "Name of the integration to which the conversation creation will be delegated"
426046
+ description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead."
426047
426047
  }
426048
426048
  },
426049
426049
  required: ["channel", "tags"],
@@ -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.",
@@ -426615,7 +426764,7 @@ var state = {
426615
426764
  },
426616
426765
  integrationName: {
426617
426766
  type: "string",
426618
- description: "Name of the integration to which the user creation will be delegated"
426767
+ description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead."
426619
426768
  },
426620
426769
  name: {
426621
426770
  type: "string",
@@ -426754,7 +426903,7 @@ var state = {
426754
426903
  },
426755
426904
  integrationName: {
426756
426905
  type: "string",
426757
- description: "Name of the integration to which the user creation will be delegated"
426906
+ description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead."
426758
426907
  },
426759
426908
  name: {
426760
426909
  type: "string",
@@ -429007,7 +429156,8 @@ var state = {
429007
429156
  "workspace_member_count",
429008
429157
  "integrations_owned_count",
429009
429158
  "cognitive_calls",
429010
- "model_credit"
429159
+ "model_credit",
429160
+ "token_spend"
429011
429161
  ],
429012
429162
  required: true
429013
429163
  },
@@ -429066,7 +429216,8 @@ var state = {
429066
429216
  "workspace_member_count",
429067
429217
  "integrations_owned_count",
429068
429218
  "cognitive_calls",
429069
- "model_credit"
429219
+ "model_credit",
429220
+ "token_spend"
429070
429221
  ],
429071
429222
  required: true
429072
429223
  },
@@ -429106,7 +429257,8 @@ var state = {
429106
429257
  "workspace_member_count",
429107
429258
  "integrations_owned_count",
429108
429259
  "cognitive_calls",
429109
- "model_credit"
429260
+ "model_credit",
429261
+ "token_spend"
429110
429262
  ],
429111
429263
  description: "Usage type that can be used"
429112
429264
  }
@@ -429174,7 +429326,8 @@ var state = {
429174
429326
  "workspace_member_count",
429175
429327
  "integrations_owned_count",
429176
429328
  "cognitive_calls",
429177
- "model_credit"
429329
+ "model_credit",
429330
+ "token_spend"
429178
429331
  ],
429179
429332
  description: "Usage type that can be used"
429180
429333
  }
@@ -430774,7 +430927,8 @@ var state = {
430774
430927
  "workspace_member_count",
430775
430928
  "integrations_owned_count",
430776
430929
  "cognitive_calls",
430777
- "model_credit"
430930
+ "model_credit",
430931
+ "token_spend"
430778
430932
  ],
430779
430933
  required: true
430780
430934
  },
@@ -430826,7 +430980,8 @@ var state = {
430826
430980
  "workspace_member_count",
430827
430981
  "integrations_owned_count",
430828
430982
  "cognitive_calls",
430829
- "model_credit"
430983
+ "model_credit",
430984
+ "token_spend"
430830
430985
  ],
430831
430986
  required: true
430832
430987
  },
@@ -431072,7 +431227,7 @@ var state = {
431072
431227
  title: "Botpress API",
431073
431228
  description: "API for Botpress Cloud",
431074
431229
  server: "https://api.botpress.cloud",
431075
- version: "0.12.6",
431230
+ version: "0.13.1",
431076
431231
  prefix: "v1"
431077
431232
  },
431078
431233
  errors: [
@@ -431188,6 +431343,7 @@ var state = {
431188
431343
  createConversationBody: true,
431189
431344
  getOrCreateConversationBody: true,
431190
431345
  updateConversationBody: true,
431346
+ addParticipantBody: true,
431191
431347
  createEventBody: true,
431192
431348
  createMessageBody: true,
431193
431349
  getOrCreateMessageBody: true,
@@ -431222,6 +431378,10 @@ var state = {
431222
431378
  getOrCreateConversationResponse: true,
431223
431379
  updateConversationResponse: true,
431224
431380
  deleteConversationResponse: true,
431381
+ listParticipantsResponse: true,
431382
+ addParticipantResponse: true,
431383
+ getParticipantResponse: true,
431384
+ removeParticipantResponse: true,
431225
431385
  createEventResponse: true,
431226
431386
  getEventResponse: true,
431227
431387
  listEventsResponse: true,
@@ -432170,7 +432330,8 @@ var state = {
432170
432330
  "workspace_member_count",
432171
432331
  "integrations_owned_count",
432172
432332
  "cognitive_calls",
432173
- "model_credit"
432333
+ "model_credit",
432334
+ "token_spend"
432174
432335
  ],
432175
432336
  description: "Usage type that can be used"
432176
432337
  }
@@ -432591,7 +432752,11 @@ var state = {
432591
432752
  "listConversations",
432592
432753
  "getOrCreateConversation",
432593
432754
  "updateConversation",
432594
- "deleteConversation"
432755
+ "deleteConversation",
432756
+ "listParticipants",
432757
+ "addParticipant",
432758
+ "getParticipant",
432759
+ "removeParticipant"
432595
432760
  ],
432596
432761
  schema: "Conversation"
432597
432762
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.12.6",
3
+ "version": "0.13.1",
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."}]}