@botpress/api 0.3.0 → 0.3.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.
package/src/gen/state.ts CHANGED
@@ -2271,8 +2271,12 @@ export const state = {
2271
2271
  updatedAt: {
2272
2272
  type: "string",
2273
2273
  },
2274
+ botCount: {
2275
+ type: "number",
2276
+ },
2274
2277
  accountType: {
2275
2278
  type: "string",
2279
+ enum: ["free", "premium"],
2276
2280
  },
2277
2281
  blocked: {
2278
2282
  type: "boolean",
@@ -2287,6 +2291,7 @@ export const state = {
2287
2291
  "ownerId",
2288
2292
  "createdAt",
2289
2293
  "updatedAt",
2294
+ "botCount",
2290
2295
  "accountType",
2291
2296
  "blocked",
2292
2297
  "spendingLimit",
@@ -2296,6 +2301,92 @@ export const state = {
2296
2301
  },
2297
2302
  },
2298
2303
  },
2304
+ updateWorkspace: {
2305
+ name: "updateWorkspace",
2306
+ description: "Update workspace",
2307
+ method: "put",
2308
+ path: "/v1/admin/workspaces/{id}",
2309
+ parameters: {
2310
+ id: {
2311
+ type: "string",
2312
+ description: "Workspace ID",
2313
+ in: "path",
2314
+ },
2315
+ },
2316
+ requestBody: {
2317
+ description: "Workspace metadata",
2318
+ schema: {
2319
+ type: "object",
2320
+ properties: {
2321
+ name: {
2322
+ type: "string",
2323
+ minLength: 1,
2324
+ maxLength: 64,
2325
+ },
2326
+ accountType: {
2327
+ type: "string",
2328
+ enum: ["free", "premium"],
2329
+ },
2330
+ spendingLimit: {
2331
+ type: "number",
2332
+ minimum: 5,
2333
+ maximum: 1000,
2334
+ },
2335
+ },
2336
+ title: "updateWorkspaceBody",
2337
+ additionalProperties: false,
2338
+ },
2339
+ },
2340
+ response: {
2341
+ description: "Success",
2342
+ schema: {
2343
+ type: "object",
2344
+ properties: {
2345
+ id: {
2346
+ type: "string",
2347
+ },
2348
+ name: {
2349
+ type: "string",
2350
+ },
2351
+ ownerId: {
2352
+ type: "string",
2353
+ },
2354
+ createdAt: {
2355
+ type: "string",
2356
+ },
2357
+ updatedAt: {
2358
+ type: "string",
2359
+ },
2360
+ botCount: {
2361
+ type: "number",
2362
+ },
2363
+ accountType: {
2364
+ type: "string",
2365
+ enum: ["free", "premium"],
2366
+ },
2367
+ blocked: {
2368
+ type: "boolean",
2369
+ },
2370
+ spendingLimit: {
2371
+ type: "number",
2372
+ },
2373
+ },
2374
+ required: [
2375
+ "id",
2376
+ "name",
2377
+ "ownerId",
2378
+ "createdAt",
2379
+ "updatedAt",
2380
+ "botCount",
2381
+ "accountType",
2382
+ "blocked",
2383
+ "spendingLimit",
2384
+ ],
2385
+ title: "updateWorkspaceResponse",
2386
+ additionalProperties: false,
2387
+ },
2388
+ },
2389
+ },
2299
2390
  listWorkspaces: {
2300
2391
  name: "listWorkspaces",
2301
2392
  description: "List workspaces the user has access to",
@@ -2337,8 +2428,23 @@ export const state = {
2337
2428
  updatedAt: {
2338
2429
  type: "string",
2339
2430
  },
2431
+ botCount: {
2432
+ type: "number",
2433
+ },
2434
+ accountType: {
2435
+ type: "string",
2436
+ enum: ["free", "premium"],
2437
+ },
2340
2438
  },
2341
- required: ["id", "name", "ownerId", "createdAt", "updatedAt"],
2439
+ required: [
2440
+ "id",
2441
+ "name",
2442
+ "ownerId",
2443
+ "createdAt",
2444
+ "updatedAt",
2445
+ "botCount",
2446
+ "accountType",
2447
+ ],
2342
2448
  },
2343
2449
  },
2344
2450
  meta: {
@@ -3204,6 +3310,224 @@ export const state = {
3204
3310
  },
3205
3311
  },
3206
3312
  },
3313
+ listWorkspaceMembers: {
3314
+ name: "listWorkspaceMembers",
3315
+ description: "Lists all the members in a workspace",
3316
+ method: "get",
3317
+ path: "/v1/admin/workspace-members",
3318
+ parameters: {
3319
+ nextToken: {
3320
+ in: "query",
3321
+ description:
3322
+ "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
3323
+ type: "string",
3324
+ },
3325
+ },
3326
+ response: {
3327
+ description: "Success",
3328
+ schema: {
3329
+ type: "object",
3330
+ properties: {
3331
+ members: {
3332
+ type: "array",
3333
+ items: {
3334
+ type: "object",
3335
+ properties: {
3336
+ id: {
3337
+ type: "string",
3338
+ },
3339
+ userId: {
3340
+ type: "string",
3341
+ format: "uuid",
3342
+ },
3343
+ email: {
3344
+ type: "string",
3345
+ },
3346
+ role: {
3347
+ type: "string",
3348
+ enum: [
3349
+ "viewer",
3350
+ "billing",
3351
+ "developer",
3352
+ "manager",
3353
+ "administrator",
3354
+ "owner",
3355
+ ],
3356
+ },
3357
+ },
3358
+ required: ["id", "email", "role"],
3359
+ },
3360
+ },
3361
+ meta: {
3362
+ type: "object",
3363
+ properties: {
3364
+ nextToken: {
3365
+ type: "string",
3366
+ description:
3367
+ "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.",
3368
+ },
3369
+ },
3370
+ additionalProperties: false,
3371
+ },
3372
+ },
3373
+ required: ["members", "meta"],
3374
+ title: "listWorkspaceMembersResponse",
3375
+ additionalProperties: false,
3376
+ },
3377
+ },
3378
+ },
3379
+ deleteWorkspaceMember: {
3380
+ name: "deleteWorkspaceMember",
3381
+ description: "Remove a member of a workspace",
3382
+ method: "delete",
3383
+ path: "/v1/admin/workspace-members/{id}",
3384
+ parameters: {
3385
+ id: {
3386
+ type: "string",
3387
+ description: "Workspace member ID",
3388
+ in: "path",
3389
+ },
3390
+ },
3391
+ response: {
3392
+ description: "Success",
3393
+ schema: {
3394
+ type: "object",
3395
+ title: "deleteWorkspaceMemberResponse",
3396
+ additionalProperties: false,
3397
+ },
3398
+ },
3399
+ },
3400
+ createWorkspaceMember: {
3401
+ name: "createWorkspaceMember",
3402
+ description: "Add a member to the workspace",
3403
+ method: "post",
3404
+ path: "/v1/admin/workspace-members",
3405
+ requestBody: {
3406
+ description: "Workspace member metadata",
3407
+ schema: {
3408
+ type: "object",
3409
+ properties: {
3410
+ email: {
3411
+ type: "string",
3412
+ format: "email",
3413
+ },
3414
+ role: {
3415
+ type: "string",
3416
+ enum: [
3417
+ "viewer",
3418
+ "billing",
3419
+ "developer",
3420
+ "manager",
3421
+ "administrator",
3422
+ "owner",
3423
+ ],
3424
+ },
3425
+ },
3426
+ required: ["email", "role"],
3427
+ title: "createWorkspaceMemberBody",
3428
+ additionalProperties: false,
3429
+ },
3430
+ },
3431
+ response: {
3432
+ description: "Success",
3433
+ schema: {
3434
+ type: "object",
3435
+ properties: {
3436
+ id: {
3437
+ type: "string",
3438
+ },
3439
+ userId: {
3440
+ type: "string",
3441
+ format: "uuid",
3442
+ },
3443
+ email: {
3444
+ type: "string",
3445
+ },
3446
+ role: {
3447
+ type: "string",
3448
+ enum: [
3449
+ "viewer",
3450
+ "billing",
3451
+ "developer",
3452
+ "manager",
3453
+ "administrator",
3454
+ "owner",
3455
+ ],
3456
+ },
3457
+ },
3458
+ required: ["id", "email", "role"],
3459
+ title: "createWorkspaceMemberResponse",
3460
+ additionalProperties: false,
3461
+ },
3462
+ },
3463
+ parameters: {},
3464
+ },
3465
+ updateWorkspaceMember: {
3466
+ name: "updateWorkspaceMember",
3467
+ description: "Update the member of a workspace",
3468
+ method: "put",
3469
+ path: "/v1/admin/workspace-members/{id}",
3470
+ parameters: {
3471
+ id: {
3472
+ type: "string",
3473
+ description: "Workspace member ID",
3474
+ in: "path",
3475
+ },
3476
+ },
3477
+ requestBody: {
3478
+ description: "Workspace member metadata",
3479
+ schema: {
3480
+ type: "object",
3481
+ properties: {
3482
+ role: {
3483
+ type: "string",
3484
+ enum: [
3485
+ "viewer",
3486
+ "billing",
3487
+ "developer",
3488
+ "manager",
3489
+ "administrator",
3490
+ "owner",
3491
+ ],
3492
+ },
3493
+ },
3494
+ title: "updateWorkspaceMemberBody",
3495
+ additionalProperties: false,
3496
+ },
3497
+ },
3498
+ response: {
3499
+ description: "Success",
3500
+ schema: {
3501
+ type: "object",
3502
+ properties: {
3503
+ id: {
3504
+ type: "string",
3505
+ },
3506
+ userId: {
3507
+ type: "string",
3508
+ format: "uuid",
3509
+ },
3510
+ email: {
3511
+ type: "string",
3512
+ },
3513
+ role: {
3514
+ type: "string",
3515
+ enum: [
3516
+ "viewer",
3517
+ "billing",
3518
+ "developer",
3519
+ "manager",
3520
+ "administrator",
3521
+ "owner",
3522
+ ],
3523
+ },
3524
+ },
3525
+ required: ["id", "email", "role"],
3526
+ title: "updateWorkspaceMemberResponse",
3527
+ additionalProperties: false,
3528
+ },
3529
+ },
3530
+ },
3207
3531
  introspect: {
3208
3532
  name: "introspect",
3209
3533
  description: "Introspect the API",
@@ -3425,7 +3749,7 @@ export const state = {
3425
3749
  title: "Botpress API",
3426
3750
  description: "API for Botpress Cloud",
3427
3751
  server: "https://api.botpress.cloud",
3428
- version: "0.2.2",
3752
+ version: "0.3.1",
3429
3753
  prefix: "v1",
3430
3754
  },
3431
3755
  errors: [
@@ -3537,8 +3861,11 @@ export const state = {
3537
3861
  createBotBody: true,
3538
3862
  updateBotBody: true,
3539
3863
  transferBotBody: true,
3864
+ updateWorkspaceBody: true,
3540
3865
  createIntegrationBody: true,
3541
3866
  updateIntegrationBody: true,
3867
+ createWorkspaceMemberBody: true,
3868
+ updateWorkspaceMemberBody: true,
3542
3869
  introspectBody: true,
3543
3870
  createFileBody: true,
3544
3871
  },
@@ -3582,6 +3909,7 @@ export const state = {
3582
3909
  getBotWebchatResponse: true,
3583
3910
  getBotAnalyticsResponse: true,
3584
3911
  getWorkspaceResponse: true,
3912
+ updateWorkspaceResponse: true,
3585
3913
  listWorkspacesResponse: true,
3586
3914
  createIntegrationResponse: true,
3587
3915
  updateIntegrationResponse: true,
@@ -3590,6 +3918,10 @@ export const state = {
3590
3918
  getIntegrationLogsResponse: true,
3591
3919
  getIntegrationByNameResponse: true,
3592
3920
  deleteIntegrationResponse: true,
3921
+ listWorkspaceMembersResponse: true,
3922
+ deleteWorkspaceMemberResponse: true,
3923
+ createWorkspaceMemberResponse: true,
3924
+ updateWorkspaceMemberResponse: true,
3593
3925
  introspectResponse: true,
3594
3926
  createFileResponse: true,
3595
3927
  getFileResponse: true,
@@ -4245,8 +4577,12 @@ export const state = {
4245
4577
  updatedAt: {
4246
4578
  type: "string",
4247
4579
  },
4580
+ botCount: {
4581
+ type: "number",
4582
+ },
4248
4583
  accountType: {
4249
4584
  type: "string",
4585
+ enum: ["free", "premium"],
4250
4586
  },
4251
4587
  blocked: {
4252
4588
  type: "boolean",
@@ -4261,6 +4597,7 @@ export const state = {
4261
4597
  "ownerId",
4262
4598
  "createdAt",
4263
4599
  "updatedAt",
4600
+ "botCount",
4264
4601
  "accountType",
4265
4602
  "blocked",
4266
4603
  "spendingLimit",