@botpress/api 0.3.2 → 0.4.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 +203 -5
- package/dist/index.js +237 -11
- package/package.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +238 -6
package/src/gen/state.ts
CHANGED
|
@@ -1904,7 +1904,6 @@ export const state = {
|
|
|
1904
1904
|
additionalProperties: true,
|
|
1905
1905
|
},
|
|
1906
1906
|
},
|
|
1907
|
-
required: ["enabled", "configuration"],
|
|
1908
1907
|
nullable: true,
|
|
1909
1908
|
additionalProperties: false,
|
|
1910
1909
|
},
|
|
@@ -2268,6 +2267,79 @@ export const state = {
|
|
|
2268
2267
|
},
|
|
2269
2268
|
},
|
|
2270
2269
|
},
|
|
2270
|
+
createWorkspace: {
|
|
2271
|
+
name: "createWorkspace",
|
|
2272
|
+
description: "Create workspace",
|
|
2273
|
+
method: "post",
|
|
2274
|
+
path: "/v1/admin/workspaces",
|
|
2275
|
+
disableDefaultParameters: {
|
|
2276
|
+
"x-workspace-id": true,
|
|
2277
|
+
},
|
|
2278
|
+
requestBody: {
|
|
2279
|
+
description: "Workspace metadata",
|
|
2280
|
+
schema: {
|
|
2281
|
+
type: "object",
|
|
2282
|
+
properties: {
|
|
2283
|
+
name: {
|
|
2284
|
+
type: "string",
|
|
2285
|
+
},
|
|
2286
|
+
},
|
|
2287
|
+
required: ["name"],
|
|
2288
|
+
title: "createWorkspaceBody",
|
|
2289
|
+
additionalProperties: false,
|
|
2290
|
+
},
|
|
2291
|
+
},
|
|
2292
|
+
response: {
|
|
2293
|
+
description: "Success",
|
|
2294
|
+
schema: {
|
|
2295
|
+
type: "object",
|
|
2296
|
+
properties: {
|
|
2297
|
+
id: {
|
|
2298
|
+
type: "string",
|
|
2299
|
+
},
|
|
2300
|
+
name: {
|
|
2301
|
+
type: "string",
|
|
2302
|
+
},
|
|
2303
|
+
ownerId: {
|
|
2304
|
+
type: "string",
|
|
2305
|
+
},
|
|
2306
|
+
createdAt: {
|
|
2307
|
+
type: "string",
|
|
2308
|
+
},
|
|
2309
|
+
updatedAt: {
|
|
2310
|
+
type: "string",
|
|
2311
|
+
},
|
|
2312
|
+
botCount: {
|
|
2313
|
+
type: "number",
|
|
2314
|
+
},
|
|
2315
|
+
accountType: {
|
|
2316
|
+
type: "string",
|
|
2317
|
+
enum: ["free", "premium"],
|
|
2318
|
+
},
|
|
2319
|
+
blocked: {
|
|
2320
|
+
type: "boolean",
|
|
2321
|
+
},
|
|
2322
|
+
spendingLimit: {
|
|
2323
|
+
type: "number",
|
|
2324
|
+
},
|
|
2325
|
+
},
|
|
2326
|
+
required: [
|
|
2327
|
+
"id",
|
|
2328
|
+
"name",
|
|
2329
|
+
"ownerId",
|
|
2330
|
+
"createdAt",
|
|
2331
|
+
"updatedAt",
|
|
2332
|
+
"botCount",
|
|
2333
|
+
"accountType",
|
|
2334
|
+
"blocked",
|
|
2335
|
+
"spendingLimit",
|
|
2336
|
+
],
|
|
2337
|
+
title: "createWorkspaceResponse",
|
|
2338
|
+
additionalProperties: false,
|
|
2339
|
+
},
|
|
2340
|
+
},
|
|
2341
|
+
parameters: {},
|
|
2342
|
+
},
|
|
2271
2343
|
getWorkspace: {
|
|
2272
2344
|
name: "getWorkspace",
|
|
2273
2345
|
description: "Get workspace details",
|
|
@@ -2338,6 +2410,9 @@ export const state = {
|
|
|
2338
2410
|
description: "Update workspace",
|
|
2339
2411
|
method: "put",
|
|
2340
2412
|
path: "/v1/admin/workspaces/{id}",
|
|
2413
|
+
disableDefaultParameters: {
|
|
2414
|
+
"x-workspace-id": true,
|
|
2415
|
+
},
|
|
2341
2416
|
parameters: {
|
|
2342
2417
|
id: {
|
|
2343
2418
|
type: "string",
|
|
@@ -2355,10 +2430,6 @@ export const state = {
|
|
|
2355
2430
|
minLength: 1,
|
|
2356
2431
|
maxLength: 64,
|
|
2357
2432
|
},
|
|
2358
|
-
accountType: {
|
|
2359
|
-
type: "string",
|
|
2360
|
-
enum: ["free", "premium"],
|
|
2361
|
-
},
|
|
2362
2433
|
spendingLimit: {
|
|
2363
2434
|
type: "number",
|
|
2364
2435
|
minimum: 5,
|
|
@@ -2467,6 +2538,12 @@ export const state = {
|
|
|
2467
2538
|
type: "string",
|
|
2468
2539
|
enum: ["free", "premium"],
|
|
2469
2540
|
},
|
|
2541
|
+
blocked: {
|
|
2542
|
+
type: "boolean",
|
|
2543
|
+
},
|
|
2544
|
+
spendingLimit: {
|
|
2545
|
+
type: "number",
|
|
2546
|
+
},
|
|
2470
2547
|
},
|
|
2471
2548
|
required: [
|
|
2472
2549
|
"id",
|
|
@@ -2476,7 +2553,10 @@ export const state = {
|
|
|
2476
2553
|
"updatedAt",
|
|
2477
2554
|
"botCount",
|
|
2478
2555
|
"accountType",
|
|
2556
|
+
"blocked",
|
|
2557
|
+
"spendingLimit",
|
|
2479
2558
|
],
|
|
2559
|
+
title: "updateWorkspaceResponse",
|
|
2480
2560
|
},
|
|
2481
2561
|
},
|
|
2482
2562
|
meta: {
|
|
@@ -2497,6 +2577,110 @@ export const state = {
|
|
|
2497
2577
|
},
|
|
2498
2578
|
},
|
|
2499
2579
|
},
|
|
2580
|
+
changeWorkspacePlan: {
|
|
2581
|
+
name: "changeWorkspacePlan",
|
|
2582
|
+
description: "Change workspace billing plan",
|
|
2583
|
+
method: "put",
|
|
2584
|
+
path: "/v1/admin/workspaces/{id}/change-plan",
|
|
2585
|
+
disableDefaultParameters: {
|
|
2586
|
+
"x-workspace-id": true,
|
|
2587
|
+
},
|
|
2588
|
+
parameters: {
|
|
2589
|
+
id: {
|
|
2590
|
+
type: "string",
|
|
2591
|
+
description: "Workspace ID",
|
|
2592
|
+
in: "path",
|
|
2593
|
+
},
|
|
2594
|
+
},
|
|
2595
|
+
requestBody: {
|
|
2596
|
+
description: "Billing plan to change the workspace to",
|
|
2597
|
+
schema: {
|
|
2598
|
+
type: "object",
|
|
2599
|
+
properties: {
|
|
2600
|
+
plan: {
|
|
2601
|
+
type: "string",
|
|
2602
|
+
enum: ["free", "premium"],
|
|
2603
|
+
},
|
|
2604
|
+
},
|
|
2605
|
+
required: ["plan"],
|
|
2606
|
+
title: "changeWorkspacePlanBody",
|
|
2607
|
+
additionalProperties: false,
|
|
2608
|
+
},
|
|
2609
|
+
},
|
|
2610
|
+
response: {
|
|
2611
|
+
description: "Success",
|
|
2612
|
+
schema: {
|
|
2613
|
+
type: "object",
|
|
2614
|
+
properties: {
|
|
2615
|
+
id: {
|
|
2616
|
+
type: "string",
|
|
2617
|
+
},
|
|
2618
|
+
name: {
|
|
2619
|
+
type: "string",
|
|
2620
|
+
},
|
|
2621
|
+
ownerId: {
|
|
2622
|
+
type: "string",
|
|
2623
|
+
},
|
|
2624
|
+
createdAt: {
|
|
2625
|
+
type: "string",
|
|
2626
|
+
},
|
|
2627
|
+
updatedAt: {
|
|
2628
|
+
type: "string",
|
|
2629
|
+
},
|
|
2630
|
+
botCount: {
|
|
2631
|
+
type: "number",
|
|
2632
|
+
},
|
|
2633
|
+
accountType: {
|
|
2634
|
+
type: "string",
|
|
2635
|
+
enum: ["free", "premium"],
|
|
2636
|
+
},
|
|
2637
|
+
blocked: {
|
|
2638
|
+
type: "boolean",
|
|
2639
|
+
},
|
|
2640
|
+
spendingLimit: {
|
|
2641
|
+
type: "number",
|
|
2642
|
+
},
|
|
2643
|
+
},
|
|
2644
|
+
required: [
|
|
2645
|
+
"id",
|
|
2646
|
+
"name",
|
|
2647
|
+
"ownerId",
|
|
2648
|
+
"createdAt",
|
|
2649
|
+
"updatedAt",
|
|
2650
|
+
"botCount",
|
|
2651
|
+
"accountType",
|
|
2652
|
+
"blocked",
|
|
2653
|
+
"spendingLimit",
|
|
2654
|
+
],
|
|
2655
|
+
title: "changeWorkspacePlanResponse",
|
|
2656
|
+
additionalProperties: false,
|
|
2657
|
+
},
|
|
2658
|
+
},
|
|
2659
|
+
},
|
|
2660
|
+
deleteWorkspace: {
|
|
2661
|
+
name: "deleteWorkspace",
|
|
2662
|
+
description: "Delete workspace",
|
|
2663
|
+
method: "delete",
|
|
2664
|
+
path: "/v1/admin/workspaces/{id}",
|
|
2665
|
+
disableDefaultParameters: {
|
|
2666
|
+
"x-workspace-id": true,
|
|
2667
|
+
},
|
|
2668
|
+
parameters: {
|
|
2669
|
+
id: {
|
|
2670
|
+
type: "string",
|
|
2671
|
+
description: "Workspace ID",
|
|
2672
|
+
in: "path",
|
|
2673
|
+
},
|
|
2674
|
+
},
|
|
2675
|
+
response: {
|
|
2676
|
+
description: "Success",
|
|
2677
|
+
schema: {
|
|
2678
|
+
type: "object",
|
|
2679
|
+
title: "deleteWorkspaceResponse",
|
|
2680
|
+
additionalProperties: false,
|
|
2681
|
+
},
|
|
2682
|
+
},
|
|
2683
|
+
},
|
|
2500
2684
|
createIntegration: {
|
|
2501
2685
|
name: "createIntegration",
|
|
2502
2686
|
description: "Create integration",
|
|
@@ -3854,7 +4038,7 @@ export const state = {
|
|
|
3854
4038
|
title: "Botpress API",
|
|
3855
4039
|
description: "API for Botpress Cloud",
|
|
3856
4040
|
server: "https://api.botpress.cloud",
|
|
3857
|
-
version: "0.
|
|
4041
|
+
version: "0.4.0",
|
|
3858
4042
|
prefix: "v1",
|
|
3859
4043
|
},
|
|
3860
4044
|
errors: [
|
|
@@ -3976,7 +4160,9 @@ export const state = {
|
|
|
3976
4160
|
createBotBody: true,
|
|
3977
4161
|
updateBotBody: true,
|
|
3978
4162
|
transferBotBody: true,
|
|
4163
|
+
createWorkspaceBody: true,
|
|
3979
4164
|
updateWorkspaceBody: true,
|
|
4165
|
+
changeWorkspacePlanBody: true,
|
|
3980
4166
|
createIntegrationBody: true,
|
|
3981
4167
|
updateIntegrationBody: true,
|
|
3982
4168
|
createWorkspaceMemberBody: true,
|
|
@@ -4023,9 +4209,12 @@ export const state = {
|
|
|
4023
4209
|
getBotLogsResponse: true,
|
|
4024
4210
|
getBotWebchatResponse: true,
|
|
4025
4211
|
getBotAnalyticsResponse: true,
|
|
4212
|
+
createWorkspaceResponse: true,
|
|
4026
4213
|
getWorkspaceResponse: true,
|
|
4027
4214
|
updateWorkspaceResponse: true,
|
|
4028
4215
|
listWorkspacesResponse: true,
|
|
4216
|
+
changeWorkspacePlanResponse: true,
|
|
4217
|
+
deleteWorkspaceResponse: true,
|
|
4029
4218
|
createIntegrationResponse: true,
|
|
4030
4219
|
updateIntegrationResponse: true,
|
|
4031
4220
|
listIntegrationsResponse: true,
|
|
@@ -4093,9 +4282,12 @@ export const state = {
|
|
|
4093
4282
|
},
|
|
4094
4283
|
name: {
|
|
4095
4284
|
type: "string",
|
|
4285
|
+
description: "Name of the [Integration](#schema_integration)",
|
|
4096
4286
|
},
|
|
4097
4287
|
version: {
|
|
4098
4288
|
type: "string",
|
|
4289
|
+
description:
|
|
4290
|
+
"Version of the [Integration](#schema_integration)",
|
|
4099
4291
|
},
|
|
4100
4292
|
webhookUrl: {
|
|
4101
4293
|
type: "string",
|
|
@@ -4119,6 +4311,40 @@ export const state = {
|
|
|
4119
4311
|
type: "string",
|
|
4120
4312
|
nullable: true,
|
|
4121
4313
|
},
|
|
4314
|
+
id: {
|
|
4315
|
+
type: "string",
|
|
4316
|
+
description: "Id of the [Integration](#schema_integration)",
|
|
4317
|
+
},
|
|
4318
|
+
createdAt: {
|
|
4319
|
+
type: "string",
|
|
4320
|
+
format: "date-time",
|
|
4321
|
+
description:
|
|
4322
|
+
"Creation date of the [Integration](#schema_integration) in the ISO 8601 format",
|
|
4323
|
+
},
|
|
4324
|
+
updatedAt: {
|
|
4325
|
+
type: "string",
|
|
4326
|
+
format: "date-time",
|
|
4327
|
+
description:
|
|
4328
|
+
"Updating date of the [Integration](#schema_integration) in the ISO 8601 format",
|
|
4329
|
+
},
|
|
4330
|
+
title: {
|
|
4331
|
+
type: "string",
|
|
4332
|
+
minLength: 1,
|
|
4333
|
+
maxLength: 64,
|
|
4334
|
+
description:
|
|
4335
|
+
"Title of the integration. This is the name that will be displayed in the UI",
|
|
4336
|
+
},
|
|
4337
|
+
description: {
|
|
4338
|
+
type: "string",
|
|
4339
|
+
maxLength: 256,
|
|
4340
|
+
description:
|
|
4341
|
+
"Description of the integration. This is the description that will be displayed in the UI",
|
|
4342
|
+
},
|
|
4343
|
+
iconUrl: {
|
|
4344
|
+
type: "string",
|
|
4345
|
+
description:
|
|
4346
|
+
"URL of the icon of the integration. This is the icon that will be displayed in the UI",
|
|
4347
|
+
},
|
|
4122
4348
|
},
|
|
4123
4349
|
required: [
|
|
4124
4350
|
"enabled",
|
|
@@ -4128,6 +4354,12 @@ export const state = {
|
|
|
4128
4354
|
"configuration",
|
|
4129
4355
|
"status",
|
|
4130
4356
|
"statusReason",
|
|
4357
|
+
"id",
|
|
4358
|
+
"createdAt",
|
|
4359
|
+
"updatedAt",
|
|
4360
|
+
"title",
|
|
4361
|
+
"description",
|
|
4362
|
+
"iconUrl",
|
|
4131
4363
|
],
|
|
4132
4364
|
additionalProperties: false,
|
|
4133
4365
|
},
|