@botpress/api 0.3.3 → 0.5.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 +284 -4
- package/dist/index.js +345 -10
- package/package.json +1 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +347 -5
package/src/gen/state.ts
CHANGED
|
@@ -2267,6 +2267,79 @@ export const state = {
|
|
|
2267
2267
|
},
|
|
2268
2268
|
},
|
|
2269
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
|
+
},
|
|
2270
2343
|
getWorkspace: {
|
|
2271
2344
|
name: "getWorkspace",
|
|
2272
2345
|
description: "Get workspace details",
|
|
@@ -2337,6 +2410,9 @@ export const state = {
|
|
|
2337
2410
|
description: "Update workspace",
|
|
2338
2411
|
method: "put",
|
|
2339
2412
|
path: "/v1/admin/workspaces/{id}",
|
|
2413
|
+
disableDefaultParameters: {
|
|
2414
|
+
"x-workspace-id": true,
|
|
2415
|
+
},
|
|
2340
2416
|
parameters: {
|
|
2341
2417
|
id: {
|
|
2342
2418
|
type: "string",
|
|
@@ -2354,10 +2430,6 @@ export const state = {
|
|
|
2354
2430
|
minLength: 1,
|
|
2355
2431
|
maxLength: 64,
|
|
2356
2432
|
},
|
|
2357
|
-
accountType: {
|
|
2358
|
-
type: "string",
|
|
2359
|
-
enum: ["free", "premium"],
|
|
2360
|
-
},
|
|
2361
2433
|
spendingLimit: {
|
|
2362
2434
|
type: "number",
|
|
2363
2435
|
minimum: 5,
|
|
@@ -2466,6 +2538,12 @@ export const state = {
|
|
|
2466
2538
|
type: "string",
|
|
2467
2539
|
enum: ["free", "premium"],
|
|
2468
2540
|
},
|
|
2541
|
+
blocked: {
|
|
2542
|
+
type: "boolean",
|
|
2543
|
+
},
|
|
2544
|
+
spendingLimit: {
|
|
2545
|
+
type: "number",
|
|
2546
|
+
},
|
|
2469
2547
|
},
|
|
2470
2548
|
required: [
|
|
2471
2549
|
"id",
|
|
@@ -2475,7 +2553,10 @@ export const state = {
|
|
|
2475
2553
|
"updatedAt",
|
|
2476
2554
|
"botCount",
|
|
2477
2555
|
"accountType",
|
|
2556
|
+
"blocked",
|
|
2557
|
+
"spendingLimit",
|
|
2478
2558
|
],
|
|
2559
|
+
title: "updateWorkspaceResponse",
|
|
2479
2560
|
},
|
|
2480
2561
|
},
|
|
2481
2562
|
meta: {
|
|
@@ -2496,6 +2577,213 @@ export const state = {
|
|
|
2496
2577
|
},
|
|
2497
2578
|
},
|
|
2498
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
|
+
},
|
|
2684
|
+
getAuditRecords: {
|
|
2685
|
+
name: "getAuditRecords",
|
|
2686
|
+
description: "Get the audit records of a workspace",
|
|
2687
|
+
method: "get",
|
|
2688
|
+
path: "/v1/admin/workspaces/{id}/audit-records",
|
|
2689
|
+
parameters: {
|
|
2690
|
+
id: {
|
|
2691
|
+
type: "string",
|
|
2692
|
+
description: "Workspace ID",
|
|
2693
|
+
in: "path",
|
|
2694
|
+
},
|
|
2695
|
+
},
|
|
2696
|
+
disableDefaultParameters: {
|
|
2697
|
+
"x-workspace-id": true,
|
|
2698
|
+
},
|
|
2699
|
+
response: {
|
|
2700
|
+
description: "List of audit records",
|
|
2701
|
+
schema: {
|
|
2702
|
+
type: "object",
|
|
2703
|
+
properties: {
|
|
2704
|
+
records: {
|
|
2705
|
+
type: "array",
|
|
2706
|
+
items: {
|
|
2707
|
+
type: "object",
|
|
2708
|
+
properties: {
|
|
2709
|
+
id: {
|
|
2710
|
+
type: "string",
|
|
2711
|
+
format: "uuid",
|
|
2712
|
+
},
|
|
2713
|
+
recordedAt: {
|
|
2714
|
+
type: "string",
|
|
2715
|
+
format: "date-time",
|
|
2716
|
+
},
|
|
2717
|
+
userId: {
|
|
2718
|
+
type: "string",
|
|
2719
|
+
format: "uuid",
|
|
2720
|
+
nullable: true,
|
|
2721
|
+
},
|
|
2722
|
+
userEmail: {
|
|
2723
|
+
type: "string",
|
|
2724
|
+
nullable: true,
|
|
2725
|
+
},
|
|
2726
|
+
resourceId: {
|
|
2727
|
+
type: "string",
|
|
2728
|
+
format: "uuid",
|
|
2729
|
+
nullable: true,
|
|
2730
|
+
},
|
|
2731
|
+
resourceName: {
|
|
2732
|
+
type: "string",
|
|
2733
|
+
nullable: true,
|
|
2734
|
+
},
|
|
2735
|
+
action: {
|
|
2736
|
+
type: "string",
|
|
2737
|
+
enum: [
|
|
2738
|
+
"UNKNOWN",
|
|
2739
|
+
"ADD_COLLABORATOR",
|
|
2740
|
+
"REMOVE_COLLABORATOR",
|
|
2741
|
+
"UPDATE_WORKSPACE_MEMBER",
|
|
2742
|
+
"CLOSE_WORKSPACE",
|
|
2743
|
+
"CREATE_BOT",
|
|
2744
|
+
"CREATE_WORKSPACE",
|
|
2745
|
+
"DELETE_BOT",
|
|
2746
|
+
"DEPLOY_BOT",
|
|
2747
|
+
"TRANSFER_BOT",
|
|
2748
|
+
"DOWNGRADE_WORKSPACE_PLAN",
|
|
2749
|
+
"DOWNLOAD_BOT_ARCHIVE",
|
|
2750
|
+
"UPDATE_BOT",
|
|
2751
|
+
"UPDATE_BOT_CHANNEL",
|
|
2752
|
+
"UPDATE_BOT_CONFIG",
|
|
2753
|
+
"UPDATE_PAYMENT_METHOD",
|
|
2754
|
+
"UPDATE_WORKSPACE",
|
|
2755
|
+
"UPGRADE_WORKSPACE_PLAN",
|
|
2756
|
+
"SET_SPENDING_LIMIT",
|
|
2757
|
+
],
|
|
2758
|
+
},
|
|
2759
|
+
},
|
|
2760
|
+
required: [
|
|
2761
|
+
"id",
|
|
2762
|
+
"recordedAt",
|
|
2763
|
+
"userId",
|
|
2764
|
+
"resourceId",
|
|
2765
|
+
"action",
|
|
2766
|
+
],
|
|
2767
|
+
},
|
|
2768
|
+
},
|
|
2769
|
+
meta: {
|
|
2770
|
+
type: "object",
|
|
2771
|
+
properties: {
|
|
2772
|
+
nextToken: {
|
|
2773
|
+
type: "string",
|
|
2774
|
+
description:
|
|
2775
|
+
"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.",
|
|
2776
|
+
},
|
|
2777
|
+
},
|
|
2778
|
+
additionalProperties: false,
|
|
2779
|
+
},
|
|
2780
|
+
},
|
|
2781
|
+
required: ["records", "meta"],
|
|
2782
|
+
title: "getAuditRecordsResponse",
|
|
2783
|
+
additionalProperties: false,
|
|
2784
|
+
},
|
|
2785
|
+
},
|
|
2786
|
+
},
|
|
2499
2787
|
createIntegration: {
|
|
2500
2788
|
name: "createIntegration",
|
|
2501
2789
|
description: "Create integration",
|
|
@@ -3853,7 +4141,7 @@ export const state = {
|
|
|
3853
4141
|
title: "Botpress API",
|
|
3854
4142
|
description: "API for Botpress Cloud",
|
|
3855
4143
|
server: "https://api.botpress.cloud",
|
|
3856
|
-
version: "0.
|
|
4144
|
+
version: "0.5.0",
|
|
3857
4145
|
prefix: "v1",
|
|
3858
4146
|
},
|
|
3859
4147
|
errors: [
|
|
@@ -3954,6 +4242,11 @@ export const state = {
|
|
|
3954
4242
|
type: "RateLimited",
|
|
3955
4243
|
description: "The request has been rate limited.",
|
|
3956
4244
|
},
|
|
4245
|
+
{
|
|
4246
|
+
status: 402,
|
|
4247
|
+
type: "PaymentRequired",
|
|
4248
|
+
description: "A payment is required to perform this request.",
|
|
4249
|
+
},
|
|
3957
4250
|
],
|
|
3958
4251
|
refs: {
|
|
3959
4252
|
parameters: {},
|
|
@@ -3975,7 +4268,9 @@ export const state = {
|
|
|
3975
4268
|
createBotBody: true,
|
|
3976
4269
|
updateBotBody: true,
|
|
3977
4270
|
transferBotBody: true,
|
|
4271
|
+
createWorkspaceBody: true,
|
|
3978
4272
|
updateWorkspaceBody: true,
|
|
4273
|
+
changeWorkspacePlanBody: true,
|
|
3979
4274
|
createIntegrationBody: true,
|
|
3980
4275
|
updateIntegrationBody: true,
|
|
3981
4276
|
createWorkspaceMemberBody: true,
|
|
@@ -4022,9 +4317,13 @@ export const state = {
|
|
|
4022
4317
|
getBotLogsResponse: true,
|
|
4023
4318
|
getBotWebchatResponse: true,
|
|
4024
4319
|
getBotAnalyticsResponse: true,
|
|
4320
|
+
createWorkspaceResponse: true,
|
|
4025
4321
|
getWorkspaceResponse: true,
|
|
4026
4322
|
updateWorkspaceResponse: true,
|
|
4027
4323
|
listWorkspacesResponse: true,
|
|
4324
|
+
changeWorkspacePlanResponse: true,
|
|
4325
|
+
deleteWorkspaceResponse: true,
|
|
4326
|
+
getAuditRecordsResponse: true,
|
|
4028
4327
|
createIntegrationResponse: true,
|
|
4029
4328
|
updateIntegrationResponse: true,
|
|
4030
4329
|
listIntegrationsResponse: true,
|
|
@@ -4092,9 +4391,12 @@ export const state = {
|
|
|
4092
4391
|
},
|
|
4093
4392
|
name: {
|
|
4094
4393
|
type: "string",
|
|
4394
|
+
description: "Name of the [Integration](#schema_integration)",
|
|
4095
4395
|
},
|
|
4096
4396
|
version: {
|
|
4097
4397
|
type: "string",
|
|
4398
|
+
description:
|
|
4399
|
+
"Version of the [Integration](#schema_integration)",
|
|
4098
4400
|
},
|
|
4099
4401
|
webhookUrl: {
|
|
4100
4402
|
type: "string",
|
|
@@ -4118,6 +4420,40 @@ export const state = {
|
|
|
4118
4420
|
type: "string",
|
|
4119
4421
|
nullable: true,
|
|
4120
4422
|
},
|
|
4423
|
+
id: {
|
|
4424
|
+
type: "string",
|
|
4425
|
+
description: "Id of the [Integration](#schema_integration)",
|
|
4426
|
+
},
|
|
4427
|
+
createdAt: {
|
|
4428
|
+
type: "string",
|
|
4429
|
+
format: "date-time",
|
|
4430
|
+
description:
|
|
4431
|
+
"Creation date of the [Integration](#schema_integration) in the ISO 8601 format",
|
|
4432
|
+
},
|
|
4433
|
+
updatedAt: {
|
|
4434
|
+
type: "string",
|
|
4435
|
+
format: "date-time",
|
|
4436
|
+
description:
|
|
4437
|
+
"Updating date of the [Integration](#schema_integration) in the ISO 8601 format",
|
|
4438
|
+
},
|
|
4439
|
+
title: {
|
|
4440
|
+
type: "string",
|
|
4441
|
+
minLength: 1,
|
|
4442
|
+
maxLength: 64,
|
|
4443
|
+
description:
|
|
4444
|
+
"Title of the integration. This is the name that will be displayed in the UI",
|
|
4445
|
+
},
|
|
4446
|
+
description: {
|
|
4447
|
+
type: "string",
|
|
4448
|
+
maxLength: 256,
|
|
4449
|
+
description:
|
|
4450
|
+
"Description of the integration. This is the description that will be displayed in the UI",
|
|
4451
|
+
},
|
|
4452
|
+
iconUrl: {
|
|
4453
|
+
type: "string",
|
|
4454
|
+
description:
|
|
4455
|
+
"URL of the icon of the integration. This is the icon that will be displayed in the UI",
|
|
4456
|
+
},
|
|
4121
4457
|
},
|
|
4122
4458
|
required: [
|
|
4123
4459
|
"enabled",
|
|
@@ -4127,6 +4463,12 @@ export const state = {
|
|
|
4127
4463
|
"configuration",
|
|
4128
4464
|
"status",
|
|
4129
4465
|
"statusReason",
|
|
4466
|
+
"id",
|
|
4467
|
+
"createdAt",
|
|
4468
|
+
"updatedAt",
|
|
4469
|
+
"title",
|
|
4470
|
+
"description",
|
|
4471
|
+
"iconUrl",
|
|
4130
4472
|
],
|
|
4131
4473
|
additionalProperties: false,
|
|
4132
4474
|
},
|