@to11ai/sdk 3.0.0-rc.15 → 3.0.0-rc.17

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.
@@ -5258,22 +5258,15 @@ export type IntegrationsConnectGitHubIntegrationResponses = {
5258
5258
  };
5259
5259
  };
5260
5260
  export type IntegrationsConnectGitHubIntegrationResponse = IntegrationsConnectGitHubIntegrationResponses[keyof IntegrationsConnectGitHubIntegrationResponses];
5261
- export type OrganizationsListOrganizationInvitationsData = {
5261
+ export type IntegrationsRemoveGitHubUserLinkData = {
5262
5262
  body?: never;
5263
5263
  path: {
5264
5264
  orgId: string;
5265
5265
  };
5266
- query?: {
5267
- page?: number | null;
5268
- limit?: number | null;
5269
- search?: string | null;
5270
- sortDir?: 'asc' | 'desc' | null;
5271
- status?: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED' | null;
5272
- sortBy?: 'createdAt' | 'updatedAt' | 'email' | 'status' | 'expiresAt' | 'lastSentAt' | null;
5273
- };
5274
- url: '/v1/orgs/{orgId}/invitations';
5266
+ query?: never;
5267
+ url: '/v1/orgs/{orgId}/integrations/github/user-link';
5275
5268
  };
5276
- export type OrganizationsListOrganizationInvitationsErrors = {
5269
+ export type IntegrationsRemoveGitHubUserLinkErrors = {
5277
5270
  /**
5278
5271
  * BadRequestError
5279
5272
  */
@@ -5323,41 +5316,16 @@ export type OrganizationsListOrganizationInvitationsErrors = {
5323
5316
  */
5324
5317
  503: ServiceUnavailableError;
5325
5318
  };
5326
- export type OrganizationsListOrganizationInvitationsError = OrganizationsListOrganizationInvitationsErrors[keyof OrganizationsListOrganizationInvitationsErrors];
5327
- export type OrganizationsListOrganizationInvitationsResponses = {
5319
+ export type IntegrationsRemoveGitHubUserLinkError = IntegrationsRemoveGitHubUserLinkErrors[keyof IntegrationsRemoveGitHubUserLinkErrors];
5320
+ export type IntegrationsRemoveGitHubUserLinkResponses = {
5328
5321
  /**
5329
5322
  * Success
5330
5323
  */
5331
5324
  200: {
5332
5325
  code: number;
5333
- data: Array<{
5334
- acceptedAt: string | null;
5335
- acceptedByUserId: string | null;
5336
- createdAt: string;
5337
- deliveryError: string | null;
5338
- deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
5339
- email: string;
5340
- expiresAt: string;
5341
- id: string;
5342
- invitedByEmail: string | null;
5343
- invitedByFirstName: string | null;
5344
- invitedByImage: string | null;
5345
- invitedByLastName: string | null;
5346
- invitedByUserId: string;
5347
- lastSentAt: string | null;
5348
- organizationId: string;
5349
- personalNote: string | null;
5350
- projectRoles: {
5351
- [key: string]: string;
5352
- } | null;
5353
- revokedAt: string | null;
5354
- roleId: string;
5355
- status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
5356
- updatedAt: string;
5357
- workspaceRoles: {
5358
- [key: string]: string;
5359
- } | null;
5360
- }> | null;
5326
+ data: {
5327
+ removed: boolean;
5328
+ } | null;
5361
5329
  error: {
5362
5330
  code: string;
5363
5331
  details?: unknown | null;
@@ -5383,27 +5351,16 @@ export type OrganizationsListOrganizationInvitationsResponses = {
5383
5351
  success: boolean;
5384
5352
  };
5385
5353
  };
5386
- export type OrganizationsListOrganizationInvitationsResponse = OrganizationsListOrganizationInvitationsResponses[keyof OrganizationsListOrganizationInvitationsResponses];
5387
- export type OrganizationsCreateOrganizationInvitationData = {
5388
- body: {
5389
- appOrigin: string;
5390
- email: string;
5391
- personalNote?: string | null;
5392
- projectRoles?: {
5393
- [key: string]: string;
5394
- } | null;
5395
- roleId: string;
5396
- workspaceRoles?: {
5397
- [key: string]: string;
5398
- } | null;
5399
- };
5354
+ export type IntegrationsRemoveGitHubUserLinkResponse = IntegrationsRemoveGitHubUserLinkResponses[keyof IntegrationsRemoveGitHubUserLinkResponses];
5355
+ export type IntegrationsGetGitHubUserLinkData = {
5356
+ body?: never;
5400
5357
  path: {
5401
5358
  orgId: string;
5402
5359
  };
5403
5360
  query?: never;
5404
- url: '/v1/orgs/{orgId}/invitations';
5361
+ url: '/v1/orgs/{orgId}/integrations/github/user-link';
5405
5362
  };
5406
- export type OrganizationsCreateOrganizationInvitationErrors = {
5363
+ export type IntegrationsGetGitHubUserLinkErrors = {
5407
5364
  /**
5408
5365
  * BadRequestError
5409
5366
  */
@@ -5453,39 +5410,24 @@ export type OrganizationsCreateOrganizationInvitationErrors = {
5453
5410
  */
5454
5411
  503: ServiceUnavailableError;
5455
5412
  };
5456
- export type OrganizationsCreateOrganizationInvitationError = OrganizationsCreateOrganizationInvitationErrors[keyof OrganizationsCreateOrganizationInvitationErrors];
5457
- export type OrganizationsCreateOrganizationInvitationResponses = {
5413
+ export type IntegrationsGetGitHubUserLinkError = IntegrationsGetGitHubUserLinkErrors[keyof IntegrationsGetGitHubUserLinkErrors];
5414
+ export type IntegrationsGetGitHubUserLinkResponses = {
5458
5415
  /**
5459
5416
  * Success
5460
5417
  */
5461
- 201: {
5418
+ 200: {
5462
5419
  code: number;
5463
5420
  data: {
5464
- acceptedAt: string | null;
5465
- acceptedByUserId: string | null;
5466
- createdAt: string;
5467
- deliveryError: string | null;
5468
- deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
5469
- email: string;
5470
- expiresAt: string;
5471
- id: string;
5472
- invitedByEmail: string | null;
5473
- invitedByFirstName: string | null;
5474
- invitedByImage: string | null;
5475
- invitedByLastName: string | null;
5476
- invitedByUserId: string;
5477
- lastSentAt: string | null;
5478
- organizationId: string;
5479
- personalNote: string | null;
5480
- projectRoles: {
5481
- [key: string]: string;
5421
+ configured: boolean;
5422
+ link: {
5423
+ githubLogin: string;
5424
+ githubUserId: string;
5425
+ linkedAt: string;
5426
+ source: 'user_authorization' | 'installation' | 'sign_in';
5482
5427
  } | null;
5483
- revokedAt: string | null;
5484
- roleId: string;
5485
- status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
5486
- updatedAt: string;
5487
- workspaceRoles: {
5488
- [key: string]: string;
5428
+ signInAccount: {
5429
+ githubLogin: string;
5430
+ githubUserId: string;
5489
5431
  } | null;
5490
5432
  } | null;
5491
5433
  error: {
@@ -5513,17 +5455,19 @@ export type OrganizationsCreateOrganizationInvitationResponses = {
5513
5455
  success: boolean;
5514
5456
  };
5515
5457
  };
5516
- export type OrganizationsCreateOrganizationInvitationResponse = OrganizationsCreateOrganizationInvitationResponses[keyof OrganizationsCreateOrganizationInvitationResponses];
5517
- export type OrganizationsRevokeOrganizationInvitationData = {
5518
- body?: never;
5458
+ export type IntegrationsGetGitHubUserLinkResponse = IntegrationsGetGitHubUserLinkResponses[keyof IntegrationsGetGitHubUserLinkResponses];
5459
+ export type IntegrationsCompleteGitHubUserLinkData = {
5460
+ body: {
5461
+ code: string;
5462
+ state: string;
5463
+ };
5519
5464
  path: {
5520
5465
  orgId: string;
5521
- invitationId: string;
5522
5466
  };
5523
5467
  query?: never;
5524
- url: '/v1/orgs/{orgId}/invitations/{invitationId}';
5468
+ url: '/v1/orgs/{orgId}/integrations/github/user-link/callback';
5525
5469
  };
5526
- export type OrganizationsRevokeOrganizationInvitationErrors = {
5470
+ export type IntegrationsCompleteGitHubUserLinkErrors = {
5527
5471
  /**
5528
5472
  * BadRequestError
5529
5473
  */
@@ -5573,15 +5517,20 @@ export type OrganizationsRevokeOrganizationInvitationErrors = {
5573
5517
  */
5574
5518
  503: ServiceUnavailableError;
5575
5519
  };
5576
- export type OrganizationsRevokeOrganizationInvitationError = OrganizationsRevokeOrganizationInvitationErrors[keyof OrganizationsRevokeOrganizationInvitationErrors];
5577
- export type OrganizationsRevokeOrganizationInvitationResponses = {
5520
+ export type IntegrationsCompleteGitHubUserLinkError = IntegrationsCompleteGitHubUserLinkErrors[keyof IntegrationsCompleteGitHubUserLinkErrors];
5521
+ export type IntegrationsCompleteGitHubUserLinkResponses = {
5578
5522
  /**
5579
5523
  * Success
5580
5524
  */
5581
5525
  200: {
5582
5526
  code: number;
5583
5527
  data: {
5584
- revoked: boolean;
5528
+ link: {
5529
+ githubLogin: string;
5530
+ githubUserId: string;
5531
+ linkedAt: string;
5532
+ source: 'user_authorization' | 'installation' | 'sign_in';
5533
+ };
5585
5534
  } | null;
5586
5535
  error: {
5587
5536
  code: string;
@@ -5608,19 +5557,16 @@ export type OrganizationsRevokeOrganizationInvitationResponses = {
5608
5557
  success: boolean;
5609
5558
  };
5610
5559
  };
5611
- export type OrganizationsRevokeOrganizationInvitationResponse = OrganizationsRevokeOrganizationInvitationResponses[keyof OrganizationsRevokeOrganizationInvitationResponses];
5612
- export type OrganizationsResendOrganizationInvitationData = {
5613
- body: {
5614
- appOrigin: string;
5615
- };
5560
+ export type IntegrationsCompleteGitHubUserLinkResponse = IntegrationsCompleteGitHubUserLinkResponses[keyof IntegrationsCompleteGitHubUserLinkResponses];
5561
+ export type IntegrationsConnectGitHubUserLinkData = {
5562
+ body?: never;
5616
5563
  path: {
5617
5564
  orgId: string;
5618
- invitationId: string;
5619
5565
  };
5620
5566
  query?: never;
5621
- url: '/v1/orgs/{orgId}/invitations/{invitationId}/resend';
5567
+ url: '/v1/orgs/{orgId}/integrations/github/user-link/connect';
5622
5568
  };
5623
- export type OrganizationsResendOrganizationInvitationErrors = {
5569
+ export type IntegrationsConnectGitHubUserLinkErrors = {
5624
5570
  /**
5625
5571
  * BadRequestError
5626
5572
  */
@@ -5670,40 +5616,16 @@ export type OrganizationsResendOrganizationInvitationErrors = {
5670
5616
  */
5671
5617
  503: ServiceUnavailableError;
5672
5618
  };
5673
- export type OrganizationsResendOrganizationInvitationError = OrganizationsResendOrganizationInvitationErrors[keyof OrganizationsResendOrganizationInvitationErrors];
5674
- export type OrganizationsResendOrganizationInvitationResponses = {
5619
+ export type IntegrationsConnectGitHubUserLinkError = IntegrationsConnectGitHubUserLinkErrors[keyof IntegrationsConnectGitHubUserLinkErrors];
5620
+ export type IntegrationsConnectGitHubUserLinkResponses = {
5675
5621
  /**
5676
5622
  * Success
5677
5623
  */
5678
5624
  200: {
5679
5625
  code: number;
5680
5626
  data: {
5681
- acceptedAt: string | null;
5682
- acceptedByUserId: string | null;
5683
- createdAt: string;
5684
- deliveryError: string | null;
5685
- deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
5686
- email: string;
5687
- expiresAt: string;
5688
- id: string;
5689
- invitedByEmail: string | null;
5690
- invitedByFirstName: string | null;
5691
- invitedByImage: string | null;
5692
- invitedByLastName: string | null;
5693
- invitedByUserId: string;
5694
- lastSentAt: string | null;
5695
- organizationId: string;
5696
- personalNote: string | null;
5697
- projectRoles: {
5698
- [key: string]: string;
5699
- } | null;
5700
- revokedAt: string | null;
5701
- roleId: string;
5702
- status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
5703
- updatedAt: string;
5704
- workspaceRoles: {
5705
- [key: string]: string;
5706
- } | null;
5627
+ state: string;
5628
+ url: string;
5707
5629
  } | null;
5708
5630
  error: {
5709
5631
  code: string;
@@ -5730,22 +5652,16 @@ export type OrganizationsResendOrganizationInvitationResponses = {
5730
5652
  success: boolean;
5731
5653
  };
5732
5654
  };
5733
- export type OrganizationsResendOrganizationInvitationResponse = OrganizationsResendOrganizationInvitationResponses[keyof OrganizationsResendOrganizationInvitationResponses];
5734
- export type ApiKeysCreateApiKeyOrgData = {
5735
- body: {
5736
- environment: 'live' | 'test';
5737
- expiresAt?: string | null;
5738
- ipAllowlist?: Array<string>;
5739
- name: string;
5740
- scopes: Array<string>;
5741
- };
5655
+ export type IntegrationsConnectGitHubUserLinkResponse = IntegrationsConnectGitHubUserLinkResponses[keyof IntegrationsConnectGitHubUserLinkResponses];
5656
+ export type IntegrationsLinkGitHubSignInAccountData = {
5657
+ body?: never;
5742
5658
  path: {
5743
5659
  orgId: string;
5744
5660
  };
5745
5661
  query?: never;
5746
- url: '/v1/orgs/{orgId}/keys';
5662
+ url: '/v1/orgs/{orgId}/integrations/github/user-link/sign-in-account';
5747
5663
  };
5748
- export type ApiKeysCreateApiKeyOrgErrors = {
5664
+ export type IntegrationsLinkGitHubSignInAccountErrors = {
5749
5665
  /**
5750
5666
  * BadRequestError
5751
5667
  */
@@ -5795,29 +5711,20 @@ export type ApiKeysCreateApiKeyOrgErrors = {
5795
5711
  */
5796
5712
  503: ServiceUnavailableError;
5797
5713
  };
5798
- export type ApiKeysCreateApiKeyOrgError = ApiKeysCreateApiKeyOrgErrors[keyof ApiKeysCreateApiKeyOrgErrors];
5799
- export type ApiKeysCreateApiKeyOrgResponses = {
5714
+ export type IntegrationsLinkGitHubSignInAccountError = IntegrationsLinkGitHubSignInAccountErrors[keyof IntegrationsLinkGitHubSignInAccountErrors];
5715
+ export type IntegrationsLinkGitHubSignInAccountResponses = {
5800
5716
  /**
5801
5717
  * Success
5802
5718
  */
5803
- 201: {
5719
+ 200: {
5804
5720
  code: number;
5805
5721
  data: {
5806
- createdAt: string;
5807
- environment: 'live' | 'test';
5808
- expiresAt: string | null;
5809
- id: string;
5810
- ipAllowlist: Array<string>;
5811
- jwt: string;
5812
- key: string;
5813
- keyPreview: string;
5814
- name: string;
5815
- orgId: string | null;
5816
- projectId: string | null;
5817
- scopeTier: 'platform' | 'org' | 'workspace' | 'project';
5818
- scopes: Array<string>;
5819
- status: 'active';
5820
- workspaceId: string | null;
5722
+ link: {
5723
+ githubLogin: string;
5724
+ githubUserId: string;
5725
+ linkedAt: string;
5726
+ source: 'user_authorization' | 'installation' | 'sign_in';
5727
+ };
5821
5728
  } | null;
5822
5729
  error: {
5823
5730
  code: string;
@@ -5844,17 +5751,23 @@ export type ApiKeysCreateApiKeyOrgResponses = {
5844
5751
  success: boolean;
5845
5752
  };
5846
5753
  };
5847
- export type ApiKeysCreateApiKeyOrgResponse = ApiKeysCreateApiKeyOrgResponses[keyof ApiKeysCreateApiKeyOrgResponses];
5848
- export type ApiKeysRevokeApiKeyOrgData = {
5754
+ export type IntegrationsLinkGitHubSignInAccountResponse = IntegrationsLinkGitHubSignInAccountResponses[keyof IntegrationsLinkGitHubSignInAccountResponses];
5755
+ export type OrganizationsListOrganizationInvitationsData = {
5849
5756
  body?: never;
5850
5757
  path: {
5851
5758
  orgId: string;
5852
- id: string;
5853
5759
  };
5854
- query?: never;
5855
- url: '/v1/orgs/{orgId}/keys/{id}';
5760
+ query?: {
5761
+ page?: number | null;
5762
+ limit?: number | null;
5763
+ search?: string | null;
5764
+ sortDir?: 'asc' | 'desc' | null;
5765
+ status?: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED' | null;
5766
+ sortBy?: 'createdAt' | 'updatedAt' | 'email' | 'status' | 'expiresAt' | 'lastSentAt' | null;
5767
+ };
5768
+ url: '/v1/orgs/{orgId}/invitations';
5856
5769
  };
5857
- export type ApiKeysRevokeApiKeyOrgErrors = {
5770
+ export type OrganizationsListOrganizationInvitationsErrors = {
5858
5771
  /**
5859
5772
  * BadRequestError
5860
5773
  */
@@ -5904,16 +5817,41 @@ export type ApiKeysRevokeApiKeyOrgErrors = {
5904
5817
  */
5905
5818
  503: ServiceUnavailableError;
5906
5819
  };
5907
- export type ApiKeysRevokeApiKeyOrgError = ApiKeysRevokeApiKeyOrgErrors[keyof ApiKeysRevokeApiKeyOrgErrors];
5908
- export type ApiKeysRevokeApiKeyOrgResponses = {
5820
+ export type OrganizationsListOrganizationInvitationsError = OrganizationsListOrganizationInvitationsErrors[keyof OrganizationsListOrganizationInvitationsErrors];
5821
+ export type OrganizationsListOrganizationInvitationsResponses = {
5909
5822
  /**
5910
5823
  * Success
5911
5824
  */
5912
5825
  200: {
5913
5826
  code: number;
5914
- data: {
5915
- revoked: boolean;
5916
- } | null;
5827
+ data: Array<{
5828
+ acceptedAt: string | null;
5829
+ acceptedByUserId: string | null;
5830
+ createdAt: string;
5831
+ deliveryError: string | null;
5832
+ deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
5833
+ email: string;
5834
+ expiresAt: string;
5835
+ id: string;
5836
+ invitedByEmail: string | null;
5837
+ invitedByFirstName: string | null;
5838
+ invitedByImage: string | null;
5839
+ invitedByLastName: string | null;
5840
+ invitedByUserId: string;
5841
+ lastSentAt: string | null;
5842
+ organizationId: string;
5843
+ personalNote: string | null;
5844
+ projectRoles: {
5845
+ [key: string]: string;
5846
+ } | null;
5847
+ revokedAt: string | null;
5848
+ roleId: string;
5849
+ status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
5850
+ updatedAt: string;
5851
+ workspaceRoles: {
5852
+ [key: string]: string;
5853
+ } | null;
5854
+ }> | null;
5917
5855
  error: {
5918
5856
  code: string;
5919
5857
  details?: unknown | null;
@@ -5939,24 +5877,27 @@ export type ApiKeysRevokeApiKeyOrgResponses = {
5939
5877
  success: boolean;
5940
5878
  };
5941
5879
  };
5942
- export type ApiKeysRevokeApiKeyOrgResponse = ApiKeysRevokeApiKeyOrgResponses[keyof ApiKeysRevokeApiKeyOrgResponses];
5943
- export type CostRatesListOrgCostRatesData = {
5944
- body?: never;
5880
+ export type OrganizationsListOrganizationInvitationsResponse = OrganizationsListOrganizationInvitationsResponses[keyof OrganizationsListOrganizationInvitationsResponses];
5881
+ export type OrganizationsCreateOrganizationInvitationData = {
5882
+ body: {
5883
+ appOrigin: string;
5884
+ email: string;
5885
+ personalNote?: string | null;
5886
+ projectRoles?: {
5887
+ [key: string]: string;
5888
+ } | null;
5889
+ roleId: string;
5890
+ workspaceRoles?: {
5891
+ [key: string]: string;
5892
+ } | null;
5893
+ };
5945
5894
  path: {
5946
5895
  orgId: string;
5947
5896
  };
5948
- query?: {
5949
- provider?: string | null;
5950
- model?: string | null;
5951
- tokenType?: 'input' | 'output' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'cache_read' | 'reasoning' | null;
5952
- asOf?: string | null;
5953
- page?: number | null;
5954
- limit?: number | null;
5955
- includeDeleted?: 'true' | 'false' | null;
5956
- };
5957
- url: '/v1/orgs/{orgId}/llm-cost-rates';
5958
- };
5959
- export type CostRatesListOrgCostRatesErrors = {
5897
+ query?: never;
5898
+ url: '/v1/orgs/{orgId}/invitations';
5899
+ };
5900
+ export type OrganizationsCreateOrganizationInvitationErrors = {
5960
5901
  /**
5961
5902
  * BadRequestError
5962
5903
  */
@@ -6006,35 +5947,41 @@ export type CostRatesListOrgCostRatesErrors = {
6006
5947
  */
6007
5948
  503: ServiceUnavailableError;
6008
5949
  };
6009
- export type CostRatesListOrgCostRatesError = CostRatesListOrgCostRatesErrors[keyof CostRatesListOrgCostRatesErrors];
6010
- export type CostRatesListOrgCostRatesResponses = {
5950
+ export type OrganizationsCreateOrganizationInvitationError = OrganizationsCreateOrganizationInvitationErrors[keyof OrganizationsCreateOrganizationInvitationErrors];
5951
+ export type OrganizationsCreateOrganizationInvitationResponses = {
6011
5952
  /**
6012
5953
  * Success
6013
5954
  */
6014
- 200: {
5955
+ 201: {
6015
5956
  code: number;
6016
- data: Array<{
5957
+ data: {
5958
+ acceptedAt: string | null;
5959
+ acceptedByUserId: string | null;
6017
5960
  createdAt: string;
6018
- createdByUserId: string | null;
5961
+ deliveryError: string | null;
5962
+ deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
5963
+ email: string;
5964
+ expiresAt: string;
6019
5965
  id: string;
6020
- inputIncludesCacheCreation: boolean | null;
6021
- inputIncludesCacheRead: boolean | null;
6022
- matchType: 'exact' | 'prefix';
6023
- modelMatch: string;
6024
- organizationId: string | null;
6025
- outputIncludesReasoning: boolean | null;
6026
- pricePerMillion: number;
6027
- projectId: string | null;
6028
- provider: string;
6029
- rowVersion: number;
6030
- source: string;
6031
- tierMaxTokens: number | null;
6032
- tierMinTokens: number | null;
6033
- tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
5966
+ invitedByEmail: string | null;
5967
+ invitedByFirstName: string | null;
5968
+ invitedByImage: string | null;
5969
+ invitedByLastName: string | null;
5970
+ invitedByUserId: string;
5971
+ lastSentAt: string | null;
5972
+ organizationId: string;
5973
+ personalNote: string | null;
5974
+ projectRoles: {
5975
+ [key: string]: string;
5976
+ } | null;
5977
+ revokedAt: string | null;
5978
+ roleId: string;
5979
+ status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
6034
5980
  updatedAt: string;
6035
- validFrom: string;
6036
- workspaceId: string | null;
6037
- }> | null;
5981
+ workspaceRoles: {
5982
+ [key: string]: string;
5983
+ } | null;
5984
+ } | null;
6038
5985
  error: {
6039
5986
  code: string;
6040
5987
  details?: unknown | null;
@@ -6060,28 +6007,17 @@ export type CostRatesListOrgCostRatesResponses = {
6060
6007
  success: boolean;
6061
6008
  };
6062
6009
  };
6063
- export type CostRatesListOrgCostRatesResponse = CostRatesListOrgCostRatesResponses[keyof CostRatesListOrgCostRatesResponses];
6064
- export type CostRatesCreateOrgCostRateData = {
6065
- body: {
6066
- inputIncludesCacheCreation?: boolean | null;
6067
- inputIncludesCacheRead?: boolean | null;
6068
- matchType: 'exact' | 'prefix';
6069
- modelMatch: string;
6070
- outputIncludesReasoning?: boolean | null;
6071
- pricePerMillion: number;
6072
- provider: string;
6073
- tierMaxTokens?: number | null;
6074
- tierMinTokens?: number | null;
6075
- tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6076
- validFrom: string;
6077
- };
6010
+ export type OrganizationsCreateOrganizationInvitationResponse = OrganizationsCreateOrganizationInvitationResponses[keyof OrganizationsCreateOrganizationInvitationResponses];
6011
+ export type OrganizationsRevokeOrganizationInvitationData = {
6012
+ body?: never;
6078
6013
  path: {
6079
6014
  orgId: string;
6015
+ invitationId: string;
6080
6016
  };
6081
6017
  query?: never;
6082
- url: '/v1/orgs/{orgId}/llm-cost-rates';
6018
+ url: '/v1/orgs/{orgId}/invitations/{invitationId}';
6083
6019
  };
6084
- export type CostRatesCreateOrgCostRateErrors = {
6020
+ export type OrganizationsRevokeOrganizationInvitationErrors = {
6085
6021
  /**
6086
6022
  * BadRequestError
6087
6023
  */
@@ -6131,33 +6067,15 @@ export type CostRatesCreateOrgCostRateErrors = {
6131
6067
  */
6132
6068
  503: ServiceUnavailableError;
6133
6069
  };
6134
- export type CostRatesCreateOrgCostRateError = CostRatesCreateOrgCostRateErrors[keyof CostRatesCreateOrgCostRateErrors];
6135
- export type CostRatesCreateOrgCostRateResponses = {
6070
+ export type OrganizationsRevokeOrganizationInvitationError = OrganizationsRevokeOrganizationInvitationErrors[keyof OrganizationsRevokeOrganizationInvitationErrors];
6071
+ export type OrganizationsRevokeOrganizationInvitationResponses = {
6136
6072
  /**
6137
6073
  * Success
6138
6074
  */
6139
- 201: {
6075
+ 200: {
6140
6076
  code: number;
6141
6077
  data: {
6142
- createdAt: string;
6143
- createdByUserId: string | null;
6144
- id: string;
6145
- inputIncludesCacheCreation: boolean | null;
6146
- inputIncludesCacheRead: boolean | null;
6147
- matchType: 'exact' | 'prefix';
6148
- modelMatch: string;
6149
- organizationId: string | null;
6150
- outputIncludesReasoning: boolean | null;
6151
- pricePerMillion: number;
6152
- projectId: string | null;
6153
- provider: string;
6154
- rowVersion: number;
6155
- tierMaxTokens: number | null;
6156
- tierMinTokens: number | null;
6157
- tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6158
- updatedAt: string;
6159
- validFrom: string;
6160
- workspaceId: string | null;
6078
+ revoked: boolean;
6161
6079
  } | null;
6162
6080
  error: {
6163
6081
  code: string;
@@ -6184,17 +6102,19 @@ export type CostRatesCreateOrgCostRateResponses = {
6184
6102
  success: boolean;
6185
6103
  };
6186
6104
  };
6187
- export type CostRatesCreateOrgCostRateResponse = CostRatesCreateOrgCostRateResponses[keyof CostRatesCreateOrgCostRateResponses];
6188
- export type CostRatesDeleteOrgCostRateData = {
6189
- body?: never;
6105
+ export type OrganizationsRevokeOrganizationInvitationResponse = OrganizationsRevokeOrganizationInvitationResponses[keyof OrganizationsRevokeOrganizationInvitationResponses];
6106
+ export type OrganizationsResendOrganizationInvitationData = {
6107
+ body: {
6108
+ appOrigin: string;
6109
+ };
6190
6110
  path: {
6191
6111
  orgId: string;
6192
- rateId: string;
6112
+ invitationId: string;
6193
6113
  };
6194
6114
  query?: never;
6195
- url: '/v1/orgs/{orgId}/llm-cost-rates/{rateId}';
6115
+ url: '/v1/orgs/{orgId}/invitations/{invitationId}/resend';
6196
6116
  };
6197
- export type CostRatesDeleteOrgCostRateErrors = {
6117
+ export type OrganizationsResendOrganizationInvitationErrors = {
6198
6118
  /**
6199
6119
  * BadRequestError
6200
6120
  */
@@ -6244,15 +6164,40 @@ export type CostRatesDeleteOrgCostRateErrors = {
6244
6164
  */
6245
6165
  503: ServiceUnavailableError;
6246
6166
  };
6247
- export type CostRatesDeleteOrgCostRateError = CostRatesDeleteOrgCostRateErrors[keyof CostRatesDeleteOrgCostRateErrors];
6248
- export type CostRatesDeleteOrgCostRateResponses = {
6167
+ export type OrganizationsResendOrganizationInvitationError = OrganizationsResendOrganizationInvitationErrors[keyof OrganizationsResendOrganizationInvitationErrors];
6168
+ export type OrganizationsResendOrganizationInvitationResponses = {
6249
6169
  /**
6250
6170
  * Success
6251
6171
  */
6252
6172
  200: {
6253
6173
  code: number;
6254
6174
  data: {
6255
- deleted: boolean;
6175
+ acceptedAt: string | null;
6176
+ acceptedByUserId: string | null;
6177
+ createdAt: string;
6178
+ deliveryError: string | null;
6179
+ deliveryStatus: 'PENDING' | 'SENT' | 'FAILED';
6180
+ email: string;
6181
+ expiresAt: string;
6182
+ id: string;
6183
+ invitedByEmail: string | null;
6184
+ invitedByFirstName: string | null;
6185
+ invitedByImage: string | null;
6186
+ invitedByLastName: string | null;
6187
+ invitedByUserId: string;
6188
+ lastSentAt: string | null;
6189
+ organizationId: string;
6190
+ personalNote: string | null;
6191
+ projectRoles: {
6192
+ [key: string]: string;
6193
+ } | null;
6194
+ revokedAt: string | null;
6195
+ roleId: string;
6196
+ status: 'PENDING' | 'ACCEPTED' | 'REVOKED' | 'EXPIRED' | 'SUPERSEDED';
6197
+ updatedAt: string;
6198
+ workspaceRoles: {
6199
+ [key: string]: string;
6200
+ } | null;
6256
6201
  } | null;
6257
6202
  error: {
6258
6203
  code: string;
@@ -6279,20 +6224,22 @@ export type CostRatesDeleteOrgCostRateResponses = {
6279
6224
  success: boolean;
6280
6225
  };
6281
6226
  };
6282
- export type CostRatesDeleteOrgCostRateResponse = CostRatesDeleteOrgCostRateResponses[keyof CostRatesDeleteOrgCostRateResponses];
6283
- export type CostRatesUpdateOrgCostRateData = {
6227
+ export type OrganizationsResendOrganizationInvitationResponse = OrganizationsResendOrganizationInvitationResponses[keyof OrganizationsResendOrganizationInvitationResponses];
6228
+ export type ApiKeysCreateApiKeyOrgData = {
6284
6229
  body: {
6285
- pricePerMillion?: number | null;
6286
- validFrom?: string | null;
6230
+ environment: 'live' | 'test';
6231
+ expiresAt?: string | null;
6232
+ ipAllowlist?: Array<string>;
6233
+ name: string;
6234
+ scopes: Array<string>;
6287
6235
  };
6288
6236
  path: {
6289
6237
  orgId: string;
6290
- rateId: string;
6291
6238
  };
6292
6239
  query?: never;
6293
- url: '/v1/orgs/{orgId}/llm-cost-rates/{rateId}';
6240
+ url: '/v1/orgs/{orgId}/keys';
6294
6241
  };
6295
- export type CostRatesUpdateOrgCostRateErrors = {
6242
+ export type ApiKeysCreateApiKeyOrgErrors = {
6296
6243
  /**
6297
6244
  * BadRequestError
6298
6245
  */
@@ -6342,32 +6289,28 @@ export type CostRatesUpdateOrgCostRateErrors = {
6342
6289
  */
6343
6290
  503: ServiceUnavailableError;
6344
6291
  };
6345
- export type CostRatesUpdateOrgCostRateError = CostRatesUpdateOrgCostRateErrors[keyof CostRatesUpdateOrgCostRateErrors];
6346
- export type CostRatesUpdateOrgCostRateResponses = {
6292
+ export type ApiKeysCreateApiKeyOrgError = ApiKeysCreateApiKeyOrgErrors[keyof ApiKeysCreateApiKeyOrgErrors];
6293
+ export type ApiKeysCreateApiKeyOrgResponses = {
6347
6294
  /**
6348
6295
  * Success
6349
6296
  */
6350
- 200: {
6297
+ 201: {
6351
6298
  code: number;
6352
6299
  data: {
6353
6300
  createdAt: string;
6354
- createdByUserId: string | null;
6301
+ environment: 'live' | 'test';
6302
+ expiresAt: string | null;
6355
6303
  id: string;
6356
- inputIncludesCacheCreation: boolean | null;
6357
- inputIncludesCacheRead: boolean | null;
6358
- matchType: 'exact' | 'prefix';
6359
- modelMatch: string;
6360
- organizationId: string | null;
6361
- outputIncludesReasoning: boolean | null;
6362
- pricePerMillion: number;
6304
+ ipAllowlist: Array<string>;
6305
+ jwt: string;
6306
+ key: string;
6307
+ keyPreview: string;
6308
+ name: string;
6309
+ orgId: string | null;
6363
6310
  projectId: string | null;
6364
- provider: string;
6365
- rowVersion: number;
6366
- tierMaxTokens: number | null;
6367
- tierMinTokens: number | null;
6368
- tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6369
- updatedAt: string;
6370
- validFrom: string;
6311
+ scopeTier: 'platform' | 'org' | 'workspace' | 'project';
6312
+ scopes: Array<string>;
6313
+ status: 'active';
6371
6314
  workspaceId: string | null;
6372
6315
  } | null;
6373
6316
  error: {
@@ -6395,23 +6338,17 @@ export type CostRatesUpdateOrgCostRateResponses = {
6395
6338
  success: boolean;
6396
6339
  };
6397
6340
  };
6398
- export type CostRatesUpdateOrgCostRateResponse = CostRatesUpdateOrgCostRateResponses[keyof CostRatesUpdateOrgCostRateResponses];
6399
- export type OrganizationsListOrganizationMembersData = {
6341
+ export type ApiKeysCreateApiKeyOrgResponse = ApiKeysCreateApiKeyOrgResponses[keyof ApiKeysCreateApiKeyOrgResponses];
6342
+ export type ApiKeysRevokeApiKeyOrgData = {
6400
6343
  body?: never;
6401
6344
  path: {
6402
6345
  orgId: string;
6346
+ id: string;
6403
6347
  };
6404
- query?: {
6405
- page?: number | null;
6406
- limit?: number | null;
6407
- search?: string | null;
6408
- sortDir?: 'asc' | 'desc' | null;
6409
- sortBy?: 'createdAt' | 'updatedAt' | 'userId' | 'roleId' | null;
6410
- include?: string | null;
6411
- };
6412
- url: '/v1/orgs/{orgId}/members';
6348
+ query?: never;
6349
+ url: '/v1/orgs/{orgId}/keys/{id}';
6413
6350
  };
6414
- export type OrganizationsListOrganizationMembersErrors = {
6351
+ export type ApiKeysRevokeApiKeyOrgErrors = {
6415
6352
  /**
6416
6353
  * BadRequestError
6417
6354
  */
@@ -6461,33 +6398,16 @@ export type OrganizationsListOrganizationMembersErrors = {
6461
6398
  */
6462
6399
  503: ServiceUnavailableError;
6463
6400
  };
6464
- export type OrganizationsListOrganizationMembersError = OrganizationsListOrganizationMembersErrors[keyof OrganizationsListOrganizationMembersErrors];
6465
- export type OrganizationsListOrganizationMembersResponses = {
6401
+ export type ApiKeysRevokeApiKeyOrgError = ApiKeysRevokeApiKeyOrgErrors[keyof ApiKeysRevokeApiKeyOrgErrors];
6402
+ export type ApiKeysRevokeApiKeyOrgResponses = {
6466
6403
  /**
6467
6404
  * Success
6468
6405
  */
6469
6406
  200: {
6470
6407
  code: number;
6471
- data: Array<{
6472
- authMethod?: 'saml' | 'oauth_google' | 'password' | null;
6473
- createdAt?: string | null;
6474
- email?: string | null | null;
6475
- emailVerified?: boolean | null;
6476
- firstName: string | null;
6477
- image: string | null;
6478
- lastActiveAt?: string | null | null;
6479
- lastName: string | null;
6480
- organizationId: string;
6481
- projectRoles?: {
6482
- [key: string]: string;
6483
- } | null;
6484
- roleId: string;
6485
- updatedAt?: string | null;
6486
- userId: string;
6487
- workspaceRoles?: {
6488
- [key: string]: string;
6489
- } | null;
6490
- }> | null;
6408
+ data: {
6409
+ revoked: boolean;
6410
+ } | null;
6491
6411
  error: {
6492
6412
  code: string;
6493
6413
  details?: unknown | null;
@@ -6513,22 +6433,29 @@ export type OrganizationsListOrganizationMembersResponses = {
6513
6433
  success: boolean;
6514
6434
  };
6515
6435
  };
6516
- export type OrganizationsListOrganizationMembersResponse = OrganizationsListOrganizationMembersResponses[keyof OrganizationsListOrganizationMembersResponses];
6517
- export type OrganizationsRemoveOrganizationMemberData = {
6436
+ export type ApiKeysRevokeApiKeyOrgResponse = ApiKeysRevokeApiKeyOrgResponses[keyof ApiKeysRevokeApiKeyOrgResponses];
6437
+ export type CostRatesListOrgCostRatesData = {
6518
6438
  body?: never;
6519
6439
  path: {
6520
6440
  orgId: string;
6521
- userId: string;
6522
6441
  };
6523
- query?: never;
6524
- url: '/v1/orgs/{orgId}/members/{userId}';
6525
- };
6526
- export type OrganizationsRemoveOrganizationMemberErrors = {
6527
- /**
6528
- * BadRequestError
6529
- */
6530
- 400: BadRequestError;
6531
- /**
6442
+ query?: {
6443
+ provider?: string | null;
6444
+ model?: string | null;
6445
+ tokenType?: 'input' | 'output' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'cache_read' | 'reasoning' | null;
6446
+ asOf?: string | null;
6447
+ page?: number | null;
6448
+ limit?: number | null;
6449
+ includeDeleted?: 'true' | 'false' | null;
6450
+ };
6451
+ url: '/v1/orgs/{orgId}/llm-cost-rates';
6452
+ };
6453
+ export type CostRatesListOrgCostRatesErrors = {
6454
+ /**
6455
+ * BadRequestError
6456
+ */
6457
+ 400: BadRequestError;
6458
+ /**
6532
6459
  * UnauthorizedError
6533
6460
  */
6534
6461
  401: UnauthorizedError;
@@ -6573,16 +6500,35 @@ export type OrganizationsRemoveOrganizationMemberErrors = {
6573
6500
  */
6574
6501
  503: ServiceUnavailableError;
6575
6502
  };
6576
- export type OrganizationsRemoveOrganizationMemberError = OrganizationsRemoveOrganizationMemberErrors[keyof OrganizationsRemoveOrganizationMemberErrors];
6577
- export type OrganizationsRemoveOrganizationMemberResponses = {
6503
+ export type CostRatesListOrgCostRatesError = CostRatesListOrgCostRatesErrors[keyof CostRatesListOrgCostRatesErrors];
6504
+ export type CostRatesListOrgCostRatesResponses = {
6578
6505
  /**
6579
6506
  * Success
6580
6507
  */
6581
6508
  200: {
6582
6509
  code: number;
6583
- data: {
6584
- removed: boolean;
6585
- } | null;
6510
+ data: Array<{
6511
+ createdAt: string;
6512
+ createdByUserId: string | null;
6513
+ id: string;
6514
+ inputIncludesCacheCreation: boolean | null;
6515
+ inputIncludesCacheRead: boolean | null;
6516
+ matchType: 'exact' | 'prefix';
6517
+ modelMatch: string;
6518
+ organizationId: string | null;
6519
+ outputIncludesReasoning: boolean | null;
6520
+ pricePerMillion: number;
6521
+ projectId: string | null;
6522
+ provider: string;
6523
+ rowVersion: number;
6524
+ source: string;
6525
+ tierMaxTokens: number | null;
6526
+ tierMinTokens: number | null;
6527
+ tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6528
+ updatedAt: string;
6529
+ validFrom: string;
6530
+ workspaceId: string | null;
6531
+ }> | null;
6586
6532
  error: {
6587
6533
  code: string;
6588
6534
  details?: unknown | null;
@@ -6608,19 +6554,28 @@ export type OrganizationsRemoveOrganizationMemberResponses = {
6608
6554
  success: boolean;
6609
6555
  };
6610
6556
  };
6611
- export type OrganizationsRemoveOrganizationMemberResponse = OrganizationsRemoveOrganizationMemberResponses[keyof OrganizationsRemoveOrganizationMemberResponses];
6612
- export type OrganizationsUpsertOrganizationMemberData = {
6557
+ export type CostRatesListOrgCostRatesResponse = CostRatesListOrgCostRatesResponses[keyof CostRatesListOrgCostRatesResponses];
6558
+ export type CostRatesCreateOrgCostRateData = {
6613
6559
  body: {
6614
- roleId: string;
6560
+ inputIncludesCacheCreation?: boolean | null;
6561
+ inputIncludesCacheRead?: boolean | null;
6562
+ matchType: 'exact' | 'prefix';
6563
+ modelMatch: string;
6564
+ outputIncludesReasoning?: boolean | null;
6565
+ pricePerMillion: number;
6566
+ provider: string;
6567
+ tierMaxTokens?: number | null;
6568
+ tierMinTokens?: number | null;
6569
+ tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6570
+ validFrom: string;
6615
6571
  };
6616
6572
  path: {
6617
6573
  orgId: string;
6618
- userId: string;
6619
6574
  };
6620
6575
  query?: never;
6621
- url: '/v1/orgs/{orgId}/members/{userId}';
6576
+ url: '/v1/orgs/{orgId}/llm-cost-rates';
6622
6577
  };
6623
- export type OrganizationsUpsertOrganizationMemberErrors = {
6578
+ export type CostRatesCreateOrgCostRateErrors = {
6624
6579
  /**
6625
6580
  * BadRequestError
6626
6581
  */
@@ -6670,32 +6625,33 @@ export type OrganizationsUpsertOrganizationMemberErrors = {
6670
6625
  */
6671
6626
  503: ServiceUnavailableError;
6672
6627
  };
6673
- export type OrganizationsUpsertOrganizationMemberError = OrganizationsUpsertOrganizationMemberErrors[keyof OrganizationsUpsertOrganizationMemberErrors];
6674
- export type OrganizationsUpsertOrganizationMemberResponses = {
6628
+ export type CostRatesCreateOrgCostRateError = CostRatesCreateOrgCostRateErrors[keyof CostRatesCreateOrgCostRateErrors];
6629
+ export type CostRatesCreateOrgCostRateResponses = {
6675
6630
  /**
6676
6631
  * Success
6677
6632
  */
6678
- 200: {
6633
+ 201: {
6679
6634
  code: number;
6680
6635
  data: {
6681
- authMethod?: 'saml' | 'oauth_google' | 'password' | null;
6682
- createdAt?: string | null;
6683
- email?: string | null | null;
6684
- emailVerified?: boolean | null;
6685
- firstName: string | null;
6686
- image: string | null;
6687
- lastActiveAt?: string | null | null;
6688
- lastName: string | null;
6689
- organizationId: string;
6690
- projectRoles?: {
6691
- [key: string]: string;
6692
- } | null;
6693
- roleId: string;
6694
- updatedAt?: string | null;
6695
- userId: string;
6696
- workspaceRoles?: {
6697
- [key: string]: string;
6698
- } | null;
6636
+ createdAt: string;
6637
+ createdByUserId: string | null;
6638
+ id: string;
6639
+ inputIncludesCacheCreation: boolean | null;
6640
+ inputIncludesCacheRead: boolean | null;
6641
+ matchType: 'exact' | 'prefix';
6642
+ modelMatch: string;
6643
+ organizationId: string | null;
6644
+ outputIncludesReasoning: boolean | null;
6645
+ pricePerMillion: number;
6646
+ projectId: string | null;
6647
+ provider: string;
6648
+ rowVersion: number;
6649
+ tierMaxTokens: number | null;
6650
+ tierMinTokens: number | null;
6651
+ tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6652
+ updatedAt: string;
6653
+ validFrom: string;
6654
+ workspaceId: string | null;
6699
6655
  } | null;
6700
6656
  error: {
6701
6657
  code: string;
@@ -6722,22 +6678,17 @@ export type OrganizationsUpsertOrganizationMemberResponses = {
6722
6678
  success: boolean;
6723
6679
  };
6724
6680
  };
6725
- export type OrganizationsUpsertOrganizationMemberResponse = OrganizationsUpsertOrganizationMemberResponses[keyof OrganizationsUpsertOrganizationMemberResponses];
6726
- export type RbacListPermissionsData = {
6681
+ export type CostRatesCreateOrgCostRateResponse = CostRatesCreateOrgCostRateResponses[keyof CostRatesCreateOrgCostRateResponses];
6682
+ export type CostRatesDeleteOrgCostRateData = {
6727
6683
  body?: never;
6728
6684
  path: {
6729
6685
  orgId: string;
6686
+ rateId: string;
6730
6687
  };
6731
- query?: {
6732
- page?: number | null;
6733
- limit?: number | null;
6734
- search?: string | null;
6735
- sortDir?: 'asc' | 'desc' | null;
6736
- sortBy?: 'createdAt' | 'updatedAt' | 'name' | 'slug' | null;
6737
- };
6738
- url: '/v1/orgs/{orgId}/permissions';
6688
+ query?: never;
6689
+ url: '/v1/orgs/{orgId}/llm-cost-rates/{rateId}';
6739
6690
  };
6740
- export type RbacListPermissionsErrors = {
6691
+ export type CostRatesDeleteOrgCostRateErrors = {
6741
6692
  /**
6742
6693
  * BadRequestError
6743
6694
  */
@@ -6787,23 +6738,16 @@ export type RbacListPermissionsErrors = {
6787
6738
  */
6788
6739
  503: ServiceUnavailableError;
6789
6740
  };
6790
- export type RbacListPermissionsError = RbacListPermissionsErrors[keyof RbacListPermissionsErrors];
6791
- export type RbacListPermissionsResponses = {
6741
+ export type CostRatesDeleteOrgCostRateError = CostRatesDeleteOrgCostRateErrors[keyof CostRatesDeleteOrgCostRateErrors];
6742
+ export type CostRatesDeleteOrgCostRateResponses = {
6792
6743
  /**
6793
6744
  * Success
6794
6745
  */
6795
6746
  200: {
6796
6747
  code: number;
6797
- data: Array<{
6798
- createdAt: string;
6799
- description: string | null;
6800
- id: string;
6801
- name: string;
6802
- organizationId: string | null;
6803
- slug: string;
6804
- updatedAt: string;
6805
- visibility: 'SYSTEM' | 'PLATFORM';
6806
- }> | null;
6748
+ data: {
6749
+ deleted: boolean;
6750
+ } | null;
6807
6751
  error: {
6808
6752
  code: string;
6809
6753
  details?: unknown | null;
@@ -6829,23 +6773,20 @@ export type RbacListPermissionsResponses = {
6829
6773
  success: boolean;
6830
6774
  };
6831
6775
  };
6832
- export type RbacListPermissionsResponse = RbacListPermissionsResponses[keyof RbacListPermissionsResponses];
6833
- export type ProjectsListProjectsByOrgData = {
6834
- body?: never;
6776
+ export type CostRatesDeleteOrgCostRateResponse = CostRatesDeleteOrgCostRateResponses[keyof CostRatesDeleteOrgCostRateResponses];
6777
+ export type CostRatesUpdateOrgCostRateData = {
6778
+ body: {
6779
+ pricePerMillion?: number | null;
6780
+ validFrom?: string | null;
6781
+ };
6835
6782
  path: {
6836
6783
  orgId: string;
6784
+ rateId: string;
6837
6785
  };
6838
- query?: {
6839
- cursor?: string | null;
6840
- limit?: number | null;
6841
- search?: string | null;
6842
- status?: string | null;
6843
- workspaceSlug?: string | null;
6844
- slug?: string | null;
6845
- };
6846
- url: '/v1/orgs/{orgId}/projects';
6786
+ query?: never;
6787
+ url: '/v1/orgs/{orgId}/llm-cost-rates/{rateId}';
6847
6788
  };
6848
- export type ProjectsListProjectsByOrgErrors = {
6789
+ export type CostRatesUpdateOrgCostRateErrors = {
6849
6790
  /**
6850
6791
  * BadRequestError
6851
6792
  */
@@ -6895,31 +6836,33 @@ export type ProjectsListProjectsByOrgErrors = {
6895
6836
  */
6896
6837
  503: ServiceUnavailableError;
6897
6838
  };
6898
- export type ProjectsListProjectsByOrgError = ProjectsListProjectsByOrgErrors[keyof ProjectsListProjectsByOrgErrors];
6899
- export type ProjectsListProjectsByOrgResponses = {
6839
+ export type CostRatesUpdateOrgCostRateError = CostRatesUpdateOrgCostRateErrors[keyof CostRatesUpdateOrgCostRateErrors];
6840
+ export type CostRatesUpdateOrgCostRateResponses = {
6900
6841
  /**
6901
6842
  * Success
6902
6843
  */
6903
6844
  200: {
6904
6845
  code: number;
6905
6846
  data: {
6906
- items: Array<{
6907
- createdAt: string;
6908
- id: string;
6909
- name: string;
6910
- organizationId: string;
6911
- slug: string;
6912
- status: 'active' | 'archived' | 'deleted';
6913
- updatedAt: string;
6914
- workspaceId: string;
6915
- workspaceName: string;
6916
- workspaceSlug: string;
6917
- workspaceStatus: 'active' | 'archived' | 'deleted';
6918
- }>;
6919
- pagination: {
6920
- limit: number;
6921
- nextCursor: string | null;
6922
- };
6847
+ createdAt: string;
6848
+ createdByUserId: string | null;
6849
+ id: string;
6850
+ inputIncludesCacheCreation: boolean | null;
6851
+ inputIncludesCacheRead: boolean | null;
6852
+ matchType: 'exact' | 'prefix';
6853
+ modelMatch: string;
6854
+ organizationId: string | null;
6855
+ outputIncludesReasoning: boolean | null;
6856
+ pricePerMillion: number;
6857
+ projectId: string | null;
6858
+ provider: string;
6859
+ rowVersion: number;
6860
+ tierMaxTokens: number | null;
6861
+ tierMinTokens: number | null;
6862
+ tokenType: 'input' | 'output' | 'cache_read' | 'cache_creation' | 'cache_creation_5m' | 'cache_creation_1h' | 'reasoning';
6863
+ updatedAt: string;
6864
+ validFrom: string;
6865
+ workspaceId: string | null;
6923
6866
  } | null;
6924
6867
  error: {
6925
6868
  code: string;
@@ -6946,20 +6889,23 @@ export type ProjectsListProjectsByOrgResponses = {
6946
6889
  success: boolean;
6947
6890
  };
6948
6891
  };
6949
- export type ProjectsListProjectsByOrgResponse = ProjectsListProjectsByOrgResponses[keyof ProjectsListProjectsByOrgResponses];
6950
- export type ProjectsCreateProjectByOrgData = {
6951
- body: {
6952
- dataCenterId?: string | null;
6953
- name: string;
6954
- slug: string;
6955
- };
6892
+ export type CostRatesUpdateOrgCostRateResponse = CostRatesUpdateOrgCostRateResponses[keyof CostRatesUpdateOrgCostRateResponses];
6893
+ export type OrganizationsListOrganizationMembersData = {
6894
+ body?: never;
6956
6895
  path: {
6957
6896
  orgId: string;
6958
6897
  };
6959
- query?: never;
6960
- url: '/v1/orgs/{orgId}/projects';
6898
+ query?: {
6899
+ page?: number | null;
6900
+ limit?: number | null;
6901
+ search?: string | null;
6902
+ sortDir?: 'asc' | 'desc' | null;
6903
+ sortBy?: 'createdAt' | 'updatedAt' | 'userId' | 'roleId' | null;
6904
+ include?: string | null;
6905
+ };
6906
+ url: '/v1/orgs/{orgId}/members';
6961
6907
  };
6962
- export type ProjectsCreateProjectByOrgErrors = {
6908
+ export type OrganizationsListOrganizationMembersErrors = {
6963
6909
  /**
6964
6910
  * BadRequestError
6965
6911
  */
@@ -7009,24 +6955,1000 @@ export type ProjectsCreateProjectByOrgErrors = {
7009
6955
  */
7010
6956
  503: ServiceUnavailableError;
7011
6957
  };
7012
- export type ProjectsCreateProjectByOrgError = ProjectsCreateProjectByOrgErrors[keyof ProjectsCreateProjectByOrgErrors];
7013
- export type ProjectsCreateProjectByOrgResponses = {
6958
+ export type OrganizationsListOrganizationMembersError = OrganizationsListOrganizationMembersErrors[keyof OrganizationsListOrganizationMembersErrors];
6959
+ export type OrganizationsListOrganizationMembersResponses = {
7014
6960
  /**
7015
6961
  * Success
7016
6962
  */
7017
- 201: {
6963
+ 200: {
7018
6964
  code: number;
7019
- data: {
7020
- createdAt: string;
7021
- dataCenterId: string | null;
7022
- id: string;
7023
- name: string;
6965
+ data: Array<{
6966
+ authMethod?: 'saml' | 'oauth_google' | 'password' | null;
6967
+ createdAt?: string | null;
6968
+ email?: string | null | null;
6969
+ emailVerified?: boolean | null;
6970
+ firstName: string | null;
6971
+ image: string | null;
6972
+ lastActiveAt?: string | null | null;
6973
+ lastName: string | null;
7024
6974
  organizationId: string;
7025
- slug: string;
7026
- status: 'active' | 'archived' | 'deleted';
7027
- updatedAt: string;
7028
- workspaceId: string;
7029
- workspaceSlug: string;
6975
+ projectRoles?: {
6976
+ [key: string]: string;
6977
+ } | null;
6978
+ roleId: string;
6979
+ updatedAt?: string | null;
6980
+ userId: string;
6981
+ workspaceRoles?: {
6982
+ [key: string]: string;
6983
+ } | null;
6984
+ }> | null;
6985
+ error: {
6986
+ code: string;
6987
+ details?: unknown | null;
6988
+ message: string;
6989
+ rowErrors?: Array<{
6990
+ code: string;
6991
+ message: string;
6992
+ path: Array<string | number>;
6993
+ }> | null;
6994
+ } | null;
6995
+ pagination: {
6996
+ limit: number;
6997
+ page: number;
6998
+ total: number;
6999
+ totalPages: number;
7000
+ } | null;
7001
+ sdkBehavior?: {
7002
+ flags: {
7003
+ [key: string]: unknown;
7004
+ };
7005
+ v: number;
7006
+ } | null;
7007
+ success: boolean;
7008
+ };
7009
+ };
7010
+ export type OrganizationsListOrganizationMembersResponse = OrganizationsListOrganizationMembersResponses[keyof OrganizationsListOrganizationMembersResponses];
7011
+ export type OrganizationsRemoveOrganizationMemberData = {
7012
+ body?: never;
7013
+ path: {
7014
+ orgId: string;
7015
+ userId: string;
7016
+ };
7017
+ query?: never;
7018
+ url: '/v1/orgs/{orgId}/members/{userId}';
7019
+ };
7020
+ export type OrganizationsRemoveOrganizationMemberErrors = {
7021
+ /**
7022
+ * BadRequestError
7023
+ */
7024
+ 400: BadRequestError;
7025
+ /**
7026
+ * UnauthorizedError
7027
+ */
7028
+ 401: UnauthorizedError;
7029
+ /**
7030
+ * ForbiddenError
7031
+ */
7032
+ 403: ForbiddenError;
7033
+ /**
7034
+ * NotFoundError
7035
+ */
7036
+ 404: NotFoundError;
7037
+ /**
7038
+ * ConflictError
7039
+ */
7040
+ 409: ConflictError;
7041
+ /**
7042
+ * GoneError
7043
+ */
7044
+ 410: GoneError;
7045
+ /**
7046
+ * ContentTooLargeError
7047
+ */
7048
+ 413: ContentTooLargeError;
7049
+ /**
7050
+ * MisdirectedRequestError
7051
+ */
7052
+ 421: MisdirectedRequestError;
7053
+ /**
7054
+ * UnprocessableEntityError
7055
+ */
7056
+ 422: UnprocessableEntityError;
7057
+ /**
7058
+ * TooManyRequestsError
7059
+ */
7060
+ 429: TooManyRequestsError;
7061
+ /**
7062
+ * InternalServerError
7063
+ */
7064
+ 500: InternalServerError;
7065
+ /**
7066
+ * ServiceUnavailableError
7067
+ */
7068
+ 503: ServiceUnavailableError;
7069
+ };
7070
+ export type OrganizationsRemoveOrganizationMemberError = OrganizationsRemoveOrganizationMemberErrors[keyof OrganizationsRemoveOrganizationMemberErrors];
7071
+ export type OrganizationsRemoveOrganizationMemberResponses = {
7072
+ /**
7073
+ * Success
7074
+ */
7075
+ 200: {
7076
+ code: number;
7077
+ data: {
7078
+ removed: boolean;
7079
+ } | null;
7080
+ error: {
7081
+ code: string;
7082
+ details?: unknown | null;
7083
+ message: string;
7084
+ rowErrors?: Array<{
7085
+ code: string;
7086
+ message: string;
7087
+ path: Array<string | number>;
7088
+ }> | null;
7089
+ } | null;
7090
+ pagination: {
7091
+ limit: number;
7092
+ page: number;
7093
+ total: number;
7094
+ totalPages: number;
7095
+ } | null;
7096
+ sdkBehavior?: {
7097
+ flags: {
7098
+ [key: string]: unknown;
7099
+ };
7100
+ v: number;
7101
+ } | null;
7102
+ success: boolean;
7103
+ };
7104
+ };
7105
+ export type OrganizationsRemoveOrganizationMemberResponse = OrganizationsRemoveOrganizationMemberResponses[keyof OrganizationsRemoveOrganizationMemberResponses];
7106
+ export type OrganizationsUpsertOrganizationMemberData = {
7107
+ body: {
7108
+ roleId: string;
7109
+ };
7110
+ path: {
7111
+ orgId: string;
7112
+ userId: string;
7113
+ };
7114
+ query?: never;
7115
+ url: '/v1/orgs/{orgId}/members/{userId}';
7116
+ };
7117
+ export type OrganizationsUpsertOrganizationMemberErrors = {
7118
+ /**
7119
+ * BadRequestError
7120
+ */
7121
+ 400: BadRequestError;
7122
+ /**
7123
+ * UnauthorizedError
7124
+ */
7125
+ 401: UnauthorizedError;
7126
+ /**
7127
+ * ForbiddenError
7128
+ */
7129
+ 403: ForbiddenError;
7130
+ /**
7131
+ * NotFoundError
7132
+ */
7133
+ 404: NotFoundError;
7134
+ /**
7135
+ * ConflictError
7136
+ */
7137
+ 409: ConflictError;
7138
+ /**
7139
+ * GoneError
7140
+ */
7141
+ 410: GoneError;
7142
+ /**
7143
+ * ContentTooLargeError
7144
+ */
7145
+ 413: ContentTooLargeError;
7146
+ /**
7147
+ * MisdirectedRequestError
7148
+ */
7149
+ 421: MisdirectedRequestError;
7150
+ /**
7151
+ * UnprocessableEntityError
7152
+ */
7153
+ 422: UnprocessableEntityError;
7154
+ /**
7155
+ * TooManyRequestsError
7156
+ */
7157
+ 429: TooManyRequestsError;
7158
+ /**
7159
+ * InternalServerError
7160
+ */
7161
+ 500: InternalServerError;
7162
+ /**
7163
+ * ServiceUnavailableError
7164
+ */
7165
+ 503: ServiceUnavailableError;
7166
+ };
7167
+ export type OrganizationsUpsertOrganizationMemberError = OrganizationsUpsertOrganizationMemberErrors[keyof OrganizationsUpsertOrganizationMemberErrors];
7168
+ export type OrganizationsUpsertOrganizationMemberResponses = {
7169
+ /**
7170
+ * Success
7171
+ */
7172
+ 200: {
7173
+ code: number;
7174
+ data: {
7175
+ authMethod?: 'saml' | 'oauth_google' | 'password' | null;
7176
+ createdAt?: string | null;
7177
+ email?: string | null | null;
7178
+ emailVerified?: boolean | null;
7179
+ firstName: string | null;
7180
+ image: string | null;
7181
+ lastActiveAt?: string | null | null;
7182
+ lastName: string | null;
7183
+ organizationId: string;
7184
+ projectRoles?: {
7185
+ [key: string]: string;
7186
+ } | null;
7187
+ roleId: string;
7188
+ updatedAt?: string | null;
7189
+ userId: string;
7190
+ workspaceRoles?: {
7191
+ [key: string]: string;
7192
+ } | null;
7193
+ } | null;
7194
+ error: {
7195
+ code: string;
7196
+ details?: unknown | null;
7197
+ message: string;
7198
+ rowErrors?: Array<{
7199
+ code: string;
7200
+ message: string;
7201
+ path: Array<string | number>;
7202
+ }> | null;
7203
+ } | null;
7204
+ pagination: {
7205
+ limit: number;
7206
+ page: number;
7207
+ total: number;
7208
+ totalPages: number;
7209
+ } | null;
7210
+ sdkBehavior?: {
7211
+ flags: {
7212
+ [key: string]: unknown;
7213
+ };
7214
+ v: number;
7215
+ } | null;
7216
+ success: boolean;
7217
+ };
7218
+ };
7219
+ export type OrganizationsUpsertOrganizationMemberResponse = OrganizationsUpsertOrganizationMemberResponses[keyof OrganizationsUpsertOrganizationMemberResponses];
7220
+ export type RbacListPermissionsData = {
7221
+ body?: never;
7222
+ path: {
7223
+ orgId: string;
7224
+ };
7225
+ query?: {
7226
+ page?: number | null;
7227
+ limit?: number | null;
7228
+ search?: string | null;
7229
+ sortDir?: 'asc' | 'desc' | null;
7230
+ sortBy?: 'createdAt' | 'updatedAt' | 'name' | 'slug' | null;
7231
+ };
7232
+ url: '/v1/orgs/{orgId}/permissions';
7233
+ };
7234
+ export type RbacListPermissionsErrors = {
7235
+ /**
7236
+ * BadRequestError
7237
+ */
7238
+ 400: BadRequestError;
7239
+ /**
7240
+ * UnauthorizedError
7241
+ */
7242
+ 401: UnauthorizedError;
7243
+ /**
7244
+ * ForbiddenError
7245
+ */
7246
+ 403: ForbiddenError;
7247
+ /**
7248
+ * NotFoundError
7249
+ */
7250
+ 404: NotFoundError;
7251
+ /**
7252
+ * ConflictError
7253
+ */
7254
+ 409: ConflictError;
7255
+ /**
7256
+ * GoneError
7257
+ */
7258
+ 410: GoneError;
7259
+ /**
7260
+ * ContentTooLargeError
7261
+ */
7262
+ 413: ContentTooLargeError;
7263
+ /**
7264
+ * MisdirectedRequestError
7265
+ */
7266
+ 421: MisdirectedRequestError;
7267
+ /**
7268
+ * UnprocessableEntityError
7269
+ */
7270
+ 422: UnprocessableEntityError;
7271
+ /**
7272
+ * TooManyRequestsError
7273
+ */
7274
+ 429: TooManyRequestsError;
7275
+ /**
7276
+ * InternalServerError
7277
+ */
7278
+ 500: InternalServerError;
7279
+ /**
7280
+ * ServiceUnavailableError
7281
+ */
7282
+ 503: ServiceUnavailableError;
7283
+ };
7284
+ export type RbacListPermissionsError = RbacListPermissionsErrors[keyof RbacListPermissionsErrors];
7285
+ export type RbacListPermissionsResponses = {
7286
+ /**
7287
+ * Success
7288
+ */
7289
+ 200: {
7290
+ code: number;
7291
+ data: Array<{
7292
+ createdAt: string;
7293
+ description: string | null;
7294
+ id: string;
7295
+ name: string;
7296
+ organizationId: string | null;
7297
+ slug: string;
7298
+ updatedAt: string;
7299
+ visibility: 'SYSTEM' | 'PLATFORM';
7300
+ }> | null;
7301
+ error: {
7302
+ code: string;
7303
+ details?: unknown | null;
7304
+ message: string;
7305
+ rowErrors?: Array<{
7306
+ code: string;
7307
+ message: string;
7308
+ path: Array<string | number>;
7309
+ }> | null;
7310
+ } | null;
7311
+ pagination: {
7312
+ limit: number;
7313
+ page: number;
7314
+ total: number;
7315
+ totalPages: number;
7316
+ } | null;
7317
+ sdkBehavior?: {
7318
+ flags: {
7319
+ [key: string]: unknown;
7320
+ };
7321
+ v: number;
7322
+ } | null;
7323
+ success: boolean;
7324
+ };
7325
+ };
7326
+ export type RbacListPermissionsResponse = RbacListPermissionsResponses[keyof RbacListPermissionsResponses];
7327
+ export type ProjectsListProjectsByOrgData = {
7328
+ body?: never;
7329
+ path: {
7330
+ orgId: string;
7331
+ };
7332
+ query?: {
7333
+ cursor?: string | null;
7334
+ limit?: number | null;
7335
+ search?: string | null;
7336
+ status?: string | null;
7337
+ workspaceSlug?: string | null;
7338
+ slug?: string | null;
7339
+ };
7340
+ url: '/v1/orgs/{orgId}/projects';
7341
+ };
7342
+ export type ProjectsListProjectsByOrgErrors = {
7343
+ /**
7344
+ * BadRequestError
7345
+ */
7346
+ 400: BadRequestError;
7347
+ /**
7348
+ * UnauthorizedError
7349
+ */
7350
+ 401: UnauthorizedError;
7351
+ /**
7352
+ * ForbiddenError
7353
+ */
7354
+ 403: ForbiddenError;
7355
+ /**
7356
+ * NotFoundError
7357
+ */
7358
+ 404: NotFoundError;
7359
+ /**
7360
+ * ConflictError
7361
+ */
7362
+ 409: ConflictError;
7363
+ /**
7364
+ * GoneError
7365
+ */
7366
+ 410: GoneError;
7367
+ /**
7368
+ * ContentTooLargeError
7369
+ */
7370
+ 413: ContentTooLargeError;
7371
+ /**
7372
+ * MisdirectedRequestError
7373
+ */
7374
+ 421: MisdirectedRequestError;
7375
+ /**
7376
+ * UnprocessableEntityError
7377
+ */
7378
+ 422: UnprocessableEntityError;
7379
+ /**
7380
+ * TooManyRequestsError
7381
+ */
7382
+ 429: TooManyRequestsError;
7383
+ /**
7384
+ * InternalServerError
7385
+ */
7386
+ 500: InternalServerError;
7387
+ /**
7388
+ * ServiceUnavailableError
7389
+ */
7390
+ 503: ServiceUnavailableError;
7391
+ };
7392
+ export type ProjectsListProjectsByOrgError = ProjectsListProjectsByOrgErrors[keyof ProjectsListProjectsByOrgErrors];
7393
+ export type ProjectsListProjectsByOrgResponses = {
7394
+ /**
7395
+ * Success
7396
+ */
7397
+ 200: {
7398
+ code: number;
7399
+ data: {
7400
+ items: Array<{
7401
+ createdAt: string;
7402
+ id: string;
7403
+ name: string;
7404
+ organizationId: string;
7405
+ slug: string;
7406
+ status: 'active' | 'archived' | 'deleted';
7407
+ updatedAt: string;
7408
+ workspaceId: string;
7409
+ workspaceName: string;
7410
+ workspaceSlug: string;
7411
+ workspaceStatus: 'active' | 'archived' | 'deleted';
7412
+ }>;
7413
+ pagination: {
7414
+ limit: number;
7415
+ nextCursor: string | null;
7416
+ };
7417
+ } | null;
7418
+ error: {
7419
+ code: string;
7420
+ details?: unknown | null;
7421
+ message: string;
7422
+ rowErrors?: Array<{
7423
+ code: string;
7424
+ message: string;
7425
+ path: Array<string | number>;
7426
+ }> | null;
7427
+ } | null;
7428
+ pagination: {
7429
+ limit: number;
7430
+ page: number;
7431
+ total: number;
7432
+ totalPages: number;
7433
+ } | null;
7434
+ sdkBehavior?: {
7435
+ flags: {
7436
+ [key: string]: unknown;
7437
+ };
7438
+ v: number;
7439
+ } | null;
7440
+ success: boolean;
7441
+ };
7442
+ };
7443
+ export type ProjectsListProjectsByOrgResponse = ProjectsListProjectsByOrgResponses[keyof ProjectsListProjectsByOrgResponses];
7444
+ export type ProjectsCreateProjectByOrgData = {
7445
+ body: {
7446
+ dataCenterId?: string | null;
7447
+ name: string;
7448
+ slug: string;
7449
+ };
7450
+ path: {
7451
+ orgId: string;
7452
+ };
7453
+ query?: never;
7454
+ url: '/v1/orgs/{orgId}/projects';
7455
+ };
7456
+ export type ProjectsCreateProjectByOrgErrors = {
7457
+ /**
7458
+ * BadRequestError
7459
+ */
7460
+ 400: BadRequestError;
7461
+ /**
7462
+ * UnauthorizedError
7463
+ */
7464
+ 401: UnauthorizedError;
7465
+ /**
7466
+ * ForbiddenError
7467
+ */
7468
+ 403: ForbiddenError;
7469
+ /**
7470
+ * NotFoundError
7471
+ */
7472
+ 404: NotFoundError;
7473
+ /**
7474
+ * ConflictError
7475
+ */
7476
+ 409: ConflictError;
7477
+ /**
7478
+ * GoneError
7479
+ */
7480
+ 410: GoneError;
7481
+ /**
7482
+ * ContentTooLargeError
7483
+ */
7484
+ 413: ContentTooLargeError;
7485
+ /**
7486
+ * MisdirectedRequestError
7487
+ */
7488
+ 421: MisdirectedRequestError;
7489
+ /**
7490
+ * UnprocessableEntityError
7491
+ */
7492
+ 422: UnprocessableEntityError;
7493
+ /**
7494
+ * TooManyRequestsError
7495
+ */
7496
+ 429: TooManyRequestsError;
7497
+ /**
7498
+ * InternalServerError
7499
+ */
7500
+ 500: InternalServerError;
7501
+ /**
7502
+ * ServiceUnavailableError
7503
+ */
7504
+ 503: ServiceUnavailableError;
7505
+ };
7506
+ export type ProjectsCreateProjectByOrgError = ProjectsCreateProjectByOrgErrors[keyof ProjectsCreateProjectByOrgErrors];
7507
+ export type ProjectsCreateProjectByOrgResponses = {
7508
+ /**
7509
+ * Success
7510
+ */
7511
+ 201: {
7512
+ code: number;
7513
+ data: {
7514
+ createdAt: string;
7515
+ dataCenterId: string | null;
7516
+ id: string;
7517
+ name: string;
7518
+ organizationId: string;
7519
+ slug: string;
7520
+ status: 'active' | 'archived' | 'deleted';
7521
+ updatedAt: string;
7522
+ workspaceId: string;
7523
+ workspaceSlug: string;
7524
+ } | null;
7525
+ error: {
7526
+ code: string;
7527
+ details?: unknown | null;
7528
+ message: string;
7529
+ rowErrors?: Array<{
7530
+ code: string;
7531
+ message: string;
7532
+ path: Array<string | number>;
7533
+ }> | null;
7534
+ } | null;
7535
+ pagination: {
7536
+ limit: number;
7537
+ page: number;
7538
+ total: number;
7539
+ totalPages: number;
7540
+ } | null;
7541
+ sdkBehavior?: {
7542
+ flags: {
7543
+ [key: string]: unknown;
7544
+ };
7545
+ v: number;
7546
+ } | null;
7547
+ success: boolean;
7548
+ };
7549
+ };
7550
+ export type ProjectsCreateProjectByOrgResponse = ProjectsCreateProjectByOrgResponses[keyof ProjectsCreateProjectByOrgResponses];
7551
+ export type OrganizationsListProjectMembersForOrgData = {
7552
+ body?: never;
7553
+ path: {
7554
+ orgId: string;
7555
+ projectId: string;
7556
+ };
7557
+ query?: {
7558
+ page?: number | null;
7559
+ limit?: number | null;
7560
+ search?: string | null;
7561
+ sortDir?: 'asc' | 'desc' | null;
7562
+ sortBy?: 'createdAt' | 'updatedAt' | 'userId' | 'roleId' | null;
7563
+ };
7564
+ url: '/v1/orgs/{orgId}/projects/{projectId}/members';
7565
+ };
7566
+ export type OrganizationsListProjectMembersForOrgErrors = {
7567
+ /**
7568
+ * BadRequestError
7569
+ */
7570
+ 400: BadRequestError;
7571
+ /**
7572
+ * UnauthorizedError
7573
+ */
7574
+ 401: UnauthorizedError;
7575
+ /**
7576
+ * ForbiddenError
7577
+ */
7578
+ 403: ForbiddenError;
7579
+ /**
7580
+ * NotFoundError
7581
+ */
7582
+ 404: NotFoundError;
7583
+ /**
7584
+ * ConflictError
7585
+ */
7586
+ 409: ConflictError;
7587
+ /**
7588
+ * GoneError
7589
+ */
7590
+ 410: GoneError;
7591
+ /**
7592
+ * ContentTooLargeError
7593
+ */
7594
+ 413: ContentTooLargeError;
7595
+ /**
7596
+ * MisdirectedRequestError
7597
+ */
7598
+ 421: MisdirectedRequestError;
7599
+ /**
7600
+ * UnprocessableEntityError
7601
+ */
7602
+ 422: UnprocessableEntityError;
7603
+ /**
7604
+ * TooManyRequestsError
7605
+ */
7606
+ 429: TooManyRequestsError;
7607
+ /**
7608
+ * InternalServerError
7609
+ */
7610
+ 500: InternalServerError;
7611
+ /**
7612
+ * ServiceUnavailableError
7613
+ */
7614
+ 503: ServiceUnavailableError;
7615
+ };
7616
+ export type OrganizationsListProjectMembersForOrgError = OrganizationsListProjectMembersForOrgErrors[keyof OrganizationsListProjectMembersForOrgErrors];
7617
+ export type OrganizationsListProjectMembersForOrgResponses = {
7618
+ /**
7619
+ * Success
7620
+ */
7621
+ 200: {
7622
+ code: number;
7623
+ data: Array<{
7624
+ createdAt: string;
7625
+ projectId: string;
7626
+ roleId: string;
7627
+ updatedAt: string;
7628
+ userId: string;
7629
+ }> | null;
7630
+ error: {
7631
+ code: string;
7632
+ details?: unknown | null;
7633
+ message: string;
7634
+ rowErrors?: Array<{
7635
+ code: string;
7636
+ message: string;
7637
+ path: Array<string | number>;
7638
+ }> | null;
7639
+ } | null;
7640
+ pagination: {
7641
+ limit: number;
7642
+ page: number;
7643
+ total: number;
7644
+ totalPages: number;
7645
+ } | null;
7646
+ sdkBehavior?: {
7647
+ flags: {
7648
+ [key: string]: unknown;
7649
+ };
7650
+ v: number;
7651
+ } | null;
7652
+ success: boolean;
7653
+ };
7654
+ };
7655
+ export type OrganizationsListProjectMembersForOrgResponse = OrganizationsListProjectMembersForOrgResponses[keyof OrganizationsListProjectMembersForOrgResponses];
7656
+ export type OrganizationsRemoveProjectMemberForOrgData = {
7657
+ body?: never;
7658
+ path: {
7659
+ orgId: string;
7660
+ projectId: string;
7661
+ userId: string;
7662
+ };
7663
+ query?: never;
7664
+ url: '/v1/orgs/{orgId}/projects/{projectId}/members/{userId}';
7665
+ };
7666
+ export type OrganizationsRemoveProjectMemberForOrgErrors = {
7667
+ /**
7668
+ * BadRequestError
7669
+ */
7670
+ 400: BadRequestError;
7671
+ /**
7672
+ * UnauthorizedError
7673
+ */
7674
+ 401: UnauthorizedError;
7675
+ /**
7676
+ * ForbiddenError
7677
+ */
7678
+ 403: ForbiddenError;
7679
+ /**
7680
+ * NotFoundError
7681
+ */
7682
+ 404: NotFoundError;
7683
+ /**
7684
+ * ConflictError
7685
+ */
7686
+ 409: ConflictError;
7687
+ /**
7688
+ * GoneError
7689
+ */
7690
+ 410: GoneError;
7691
+ /**
7692
+ * ContentTooLargeError
7693
+ */
7694
+ 413: ContentTooLargeError;
7695
+ /**
7696
+ * MisdirectedRequestError
7697
+ */
7698
+ 421: MisdirectedRequestError;
7699
+ /**
7700
+ * UnprocessableEntityError
7701
+ */
7702
+ 422: UnprocessableEntityError;
7703
+ /**
7704
+ * TooManyRequestsError
7705
+ */
7706
+ 429: TooManyRequestsError;
7707
+ /**
7708
+ * InternalServerError
7709
+ */
7710
+ 500: InternalServerError;
7711
+ /**
7712
+ * ServiceUnavailableError
7713
+ */
7714
+ 503: ServiceUnavailableError;
7715
+ };
7716
+ export type OrganizationsRemoveProjectMemberForOrgError = OrganizationsRemoveProjectMemberForOrgErrors[keyof OrganizationsRemoveProjectMemberForOrgErrors];
7717
+ export type OrganizationsRemoveProjectMemberForOrgResponses = {
7718
+ /**
7719
+ * Success
7720
+ */
7721
+ 200: {
7722
+ code: number;
7723
+ data: {
7724
+ removed: boolean;
7725
+ } | null;
7726
+ error: {
7727
+ code: string;
7728
+ details?: unknown | null;
7729
+ message: string;
7730
+ rowErrors?: Array<{
7731
+ code: string;
7732
+ message: string;
7733
+ path: Array<string | number>;
7734
+ }> | null;
7735
+ } | null;
7736
+ pagination: {
7737
+ limit: number;
7738
+ page: number;
7739
+ total: number;
7740
+ totalPages: number;
7741
+ } | null;
7742
+ sdkBehavior?: {
7743
+ flags: {
7744
+ [key: string]: unknown;
7745
+ };
7746
+ v: number;
7747
+ } | null;
7748
+ success: boolean;
7749
+ };
7750
+ };
7751
+ export type OrganizationsRemoveProjectMemberForOrgResponse = OrganizationsRemoveProjectMemberForOrgResponses[keyof OrganizationsRemoveProjectMemberForOrgResponses];
7752
+ export type OrganizationsUpsertProjectMemberForOrgData = {
7753
+ body: {
7754
+ roleId: string;
7755
+ };
7756
+ path: {
7757
+ orgId: string;
7758
+ projectId: string;
7759
+ userId: string;
7760
+ };
7761
+ query?: never;
7762
+ url: '/v1/orgs/{orgId}/projects/{projectId}/members/{userId}';
7763
+ };
7764
+ export type OrganizationsUpsertProjectMemberForOrgErrors = {
7765
+ /**
7766
+ * BadRequestError
7767
+ */
7768
+ 400: BadRequestError;
7769
+ /**
7770
+ * UnauthorizedError
7771
+ */
7772
+ 401: UnauthorizedError;
7773
+ /**
7774
+ * ForbiddenError
7775
+ */
7776
+ 403: ForbiddenError;
7777
+ /**
7778
+ * NotFoundError
7779
+ */
7780
+ 404: NotFoundError;
7781
+ /**
7782
+ * ConflictError
7783
+ */
7784
+ 409: ConflictError;
7785
+ /**
7786
+ * GoneError
7787
+ */
7788
+ 410: GoneError;
7789
+ /**
7790
+ * ContentTooLargeError
7791
+ */
7792
+ 413: ContentTooLargeError;
7793
+ /**
7794
+ * MisdirectedRequestError
7795
+ */
7796
+ 421: MisdirectedRequestError;
7797
+ /**
7798
+ * UnprocessableEntityError
7799
+ */
7800
+ 422: UnprocessableEntityError;
7801
+ /**
7802
+ * TooManyRequestsError
7803
+ */
7804
+ 429: TooManyRequestsError;
7805
+ /**
7806
+ * InternalServerError
7807
+ */
7808
+ 500: InternalServerError;
7809
+ /**
7810
+ * ServiceUnavailableError
7811
+ */
7812
+ 503: ServiceUnavailableError;
7813
+ };
7814
+ export type OrganizationsUpsertProjectMemberForOrgError = OrganizationsUpsertProjectMemberForOrgErrors[keyof OrganizationsUpsertProjectMemberForOrgErrors];
7815
+ export type OrganizationsUpsertProjectMemberForOrgResponses = {
7816
+ /**
7817
+ * Success
7818
+ */
7819
+ 200: {
7820
+ code: number;
7821
+ data: {
7822
+ createdAt: string;
7823
+ projectId: string;
7824
+ roleId: string;
7825
+ updatedAt: string;
7826
+ userId: string;
7827
+ } | null;
7828
+ error: {
7829
+ code: string;
7830
+ details?: unknown | null;
7831
+ message: string;
7832
+ rowErrors?: Array<{
7833
+ code: string;
7834
+ message: string;
7835
+ path: Array<string | number>;
7836
+ }> | null;
7837
+ } | null;
7838
+ pagination: {
7839
+ limit: number;
7840
+ page: number;
7841
+ total: number;
7842
+ totalPages: number;
7843
+ } | null;
7844
+ sdkBehavior?: {
7845
+ flags: {
7846
+ [key: string]: unknown;
7847
+ };
7848
+ v: number;
7849
+ } | null;
7850
+ success: boolean;
7851
+ };
7852
+ };
7853
+ export type OrganizationsUpsertProjectMemberForOrgResponse = OrganizationsUpsertProjectMemberForOrgResponses[keyof OrganizationsUpsertProjectMemberForOrgResponses];
7854
+ export type RbacIntrospectEffectivePermissionsData = {
7855
+ body?: never;
7856
+ path: {
7857
+ orgId: string;
7858
+ };
7859
+ query: {
7860
+ userId: string;
7861
+ organizationId?: string | null;
7862
+ workspaceId?: string | null;
7863
+ projectId?: string | null;
7864
+ };
7865
+ url: '/v1/orgs/{orgId}/rbac/effective';
7866
+ };
7867
+ export type RbacIntrospectEffectivePermissionsErrors = {
7868
+ /**
7869
+ * BadRequestError
7870
+ */
7871
+ 400: BadRequestError;
7872
+ /**
7873
+ * UnauthorizedError
7874
+ */
7875
+ 401: UnauthorizedError;
7876
+ /**
7877
+ * ForbiddenError
7878
+ */
7879
+ 403: ForbiddenError;
7880
+ /**
7881
+ * NotFoundError
7882
+ */
7883
+ 404: NotFoundError;
7884
+ /**
7885
+ * ConflictError
7886
+ */
7887
+ 409: ConflictError;
7888
+ /**
7889
+ * GoneError
7890
+ */
7891
+ 410: GoneError;
7892
+ /**
7893
+ * ContentTooLargeError
7894
+ */
7895
+ 413: ContentTooLargeError;
7896
+ /**
7897
+ * MisdirectedRequestError
7898
+ */
7899
+ 421: MisdirectedRequestError;
7900
+ /**
7901
+ * UnprocessableEntityError
7902
+ */
7903
+ 422: UnprocessableEntityError;
7904
+ /**
7905
+ * TooManyRequestsError
7906
+ */
7907
+ 429: TooManyRequestsError;
7908
+ /**
7909
+ * InternalServerError
7910
+ */
7911
+ 500: InternalServerError;
7912
+ /**
7913
+ * ServiceUnavailableError
7914
+ */
7915
+ 503: ServiceUnavailableError;
7916
+ };
7917
+ export type RbacIntrospectEffectivePermissionsError = RbacIntrospectEffectivePermissionsErrors[keyof RbacIntrospectEffectivePermissionsErrors];
7918
+ export type RbacIntrospectEffectivePermissionsResponses = {
7919
+ /**
7920
+ * Success
7921
+ */
7922
+ 200: {
7923
+ code: number;
7924
+ data: {
7925
+ allowed: Array<string>;
7926
+ denied: Array<string>;
7927
+ isSuperAdmin: boolean;
7928
+ organizationRoleId: string | null;
7929
+ projectGrants: {
7930
+ [key: string]: {
7931
+ allowed: Array<string>;
7932
+ denied: Array<string>;
7933
+ roleId: string | null;
7934
+ };
7935
+ };
7936
+ projectRoleId: string | null;
7937
+ scope: {
7938
+ organizationId?: string | null;
7939
+ projectId?: string | null;
7940
+ workspaceId?: string | null;
7941
+ };
7942
+ systemRoleIds: Array<string>;
7943
+ userId: string;
7944
+ workspaceGrants: {
7945
+ [key: string]: {
7946
+ allowed: Array<string>;
7947
+ denied: Array<string>;
7948
+ roleId: string | null;
7949
+ };
7950
+ };
7951
+ workspaceRoleId: string | null;
7030
7952
  } | null;
7031
7953
  error: {
7032
7954
  code: string;
@@ -7053,23 +7975,16 @@ export type ProjectsCreateProjectByOrgResponses = {
7053
7975
  success: boolean;
7054
7976
  };
7055
7977
  };
7056
- export type ProjectsCreateProjectByOrgResponse = ProjectsCreateProjectByOrgResponses[keyof ProjectsCreateProjectByOrgResponses];
7057
- export type OrganizationsListProjectMembersForOrgData = {
7978
+ export type RbacIntrospectEffectivePermissionsResponse = RbacIntrospectEffectivePermissionsResponses[keyof RbacIntrospectEffectivePermissionsResponses];
7979
+ export type RbacGetSelfEffectivePermissionsData = {
7058
7980
  body?: never;
7059
7981
  path: {
7060
7982
  orgId: string;
7061
- projectId: string;
7062
- };
7063
- query?: {
7064
- page?: number | null;
7065
- limit?: number | null;
7066
- search?: string | null;
7067
- sortDir?: 'asc' | 'desc' | null;
7068
- sortBy?: 'createdAt' | 'updatedAt' | 'userId' | 'roleId' | null;
7069
7983
  };
7070
- url: '/v1/orgs/{orgId}/projects/{projectId}/members';
7984
+ query?: never;
7985
+ url: '/v1/orgs/{orgId}/rbac/effective-self';
7071
7986
  };
7072
- export type OrganizationsListProjectMembersForOrgErrors = {
7987
+ export type RbacGetSelfEffectivePermissionsErrors = {
7073
7988
  /**
7074
7989
  * BadRequestError
7075
7990
  */
@@ -7119,20 +8034,42 @@ export type OrganizationsListProjectMembersForOrgErrors = {
7119
8034
  */
7120
8035
  503: ServiceUnavailableError;
7121
8036
  };
7122
- export type OrganizationsListProjectMembersForOrgError = OrganizationsListProjectMembersForOrgErrors[keyof OrganizationsListProjectMembersForOrgErrors];
7123
- export type OrganizationsListProjectMembersForOrgResponses = {
8037
+ export type RbacGetSelfEffectivePermissionsError = RbacGetSelfEffectivePermissionsErrors[keyof RbacGetSelfEffectivePermissionsErrors];
8038
+ export type RbacGetSelfEffectivePermissionsResponses = {
7124
8039
  /**
7125
8040
  * Success
7126
8041
  */
7127
8042
  200: {
7128
8043
  code: number;
7129
- data: Array<{
7130
- createdAt: string;
7131
- projectId: string;
7132
- roleId: string;
7133
- updatedAt: string;
8044
+ data: {
8045
+ allowed: Array<string>;
8046
+ denied: Array<string>;
8047
+ isSuperAdmin: boolean;
8048
+ organizationRoleId: string | null;
8049
+ projectGrants: {
8050
+ [key: string]: {
8051
+ allowed: Array<string>;
8052
+ denied: Array<string>;
8053
+ roleId: string | null;
8054
+ };
8055
+ };
8056
+ projectRoleId: string | null;
8057
+ scope: {
8058
+ organizationId?: string | null;
8059
+ projectId?: string | null;
8060
+ workspaceId?: string | null;
8061
+ };
8062
+ systemRoleIds: Array<string>;
7134
8063
  userId: string;
7135
- }> | null;
8064
+ workspaceGrants: {
8065
+ [key: string]: {
8066
+ allowed: Array<string>;
8067
+ denied: Array<string>;
8068
+ roleId: string | null;
8069
+ };
8070
+ };
8071
+ workspaceRoleId: string | null;
8072
+ } | null;
7136
8073
  error: {
7137
8074
  code: string;
7138
8075
  details?: unknown | null;
@@ -7158,18 +8095,23 @@ export type OrganizationsListProjectMembersForOrgResponses = {
7158
8095
  success: boolean;
7159
8096
  };
7160
8097
  };
7161
- export type OrganizationsListProjectMembersForOrgResponse = OrganizationsListProjectMembersForOrgResponses[keyof OrganizationsListProjectMembersForOrgResponses];
7162
- export type OrganizationsRemoveProjectMemberForOrgData = {
8098
+ export type RbacGetSelfEffectivePermissionsResponse = RbacGetSelfEffectivePermissionsResponses[keyof RbacGetSelfEffectivePermissionsResponses];
8099
+ export type RbacListRolesData = {
7163
8100
  body?: never;
7164
8101
  path: {
7165
8102
  orgId: string;
7166
- projectId: string;
7167
- userId: string;
7168
8103
  };
7169
- query?: never;
7170
- url: '/v1/orgs/{orgId}/projects/{projectId}/members/{userId}';
8104
+ query?: {
8105
+ page?: number | null;
8106
+ limit?: number | null;
8107
+ search?: string | null;
8108
+ sortDir?: 'asc' | 'desc' | null;
8109
+ sortBy?: 'createdAt' | 'updatedAt' | 'name' | 'slug' | null;
8110
+ scopeType?: 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT' | null;
8111
+ };
8112
+ url: '/v1/orgs/{orgId}/roles';
7171
8113
  };
7172
- export type OrganizationsRemoveProjectMemberForOrgErrors = {
8114
+ export type RbacListRolesErrors = {
7173
8115
  /**
7174
8116
  * BadRequestError
7175
8117
  */
@@ -7219,16 +8161,25 @@ export type OrganizationsRemoveProjectMemberForOrgErrors = {
7219
8161
  */
7220
8162
  503: ServiceUnavailableError;
7221
8163
  };
7222
- export type OrganizationsRemoveProjectMemberForOrgError = OrganizationsRemoveProjectMemberForOrgErrors[keyof OrganizationsRemoveProjectMemberForOrgErrors];
7223
- export type OrganizationsRemoveProjectMemberForOrgResponses = {
8164
+ export type RbacListRolesError = RbacListRolesErrors[keyof RbacListRolesErrors];
8165
+ export type RbacListRolesResponses = {
7224
8166
  /**
7225
8167
  * Success
7226
8168
  */
7227
8169
  200: {
7228
8170
  code: number;
7229
- data: {
7230
- removed: boolean;
7231
- } | null;
8171
+ data: Array<{
8172
+ createdAt: string;
8173
+ description: string | null;
8174
+ id: string;
8175
+ immutable: boolean;
8176
+ isSystem: boolean;
8177
+ name: string;
8178
+ organizationId: string | null;
8179
+ scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
8180
+ slug: string;
8181
+ updatedAt: string;
8182
+ }> | null;
7232
8183
  error: {
7233
8184
  code: string;
7234
8185
  details?: unknown | null;
@@ -7254,20 +8205,21 @@ export type OrganizationsRemoveProjectMemberForOrgResponses = {
7254
8205
  success: boolean;
7255
8206
  };
7256
8207
  };
7257
- export type OrganizationsRemoveProjectMemberForOrgResponse = OrganizationsRemoveProjectMemberForOrgResponses[keyof OrganizationsRemoveProjectMemberForOrgResponses];
7258
- export type OrganizationsUpsertProjectMemberForOrgData = {
8208
+ export type RbacListRolesResponse = RbacListRolesResponses[keyof RbacListRolesResponses];
8209
+ export type RbacCreateRoleData = {
7259
8210
  body: {
7260
- roleId: string;
8211
+ description?: string | null;
8212
+ name: string;
8213
+ scopeType: 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
8214
+ slug: string;
7261
8215
  };
7262
8216
  path: {
7263
8217
  orgId: string;
7264
- projectId: string;
7265
- userId: string;
7266
8218
  };
7267
8219
  query?: never;
7268
- url: '/v1/orgs/{orgId}/projects/{projectId}/members/{userId}';
8220
+ url: '/v1/orgs/{orgId}/roles';
7269
8221
  };
7270
- export type OrganizationsUpsertProjectMemberForOrgErrors = {
8222
+ export type RbacCreateRoleErrors = {
7271
8223
  /**
7272
8224
  * BadRequestError
7273
8225
  */
@@ -7317,19 +8269,24 @@ export type OrganizationsUpsertProjectMemberForOrgErrors = {
7317
8269
  */
7318
8270
  503: ServiceUnavailableError;
7319
8271
  };
7320
- export type OrganizationsUpsertProjectMemberForOrgError = OrganizationsUpsertProjectMemberForOrgErrors[keyof OrganizationsUpsertProjectMemberForOrgErrors];
7321
- export type OrganizationsUpsertProjectMemberForOrgResponses = {
8272
+ export type RbacCreateRoleError = RbacCreateRoleErrors[keyof RbacCreateRoleErrors];
8273
+ export type RbacCreateRoleResponses = {
7322
8274
  /**
7323
8275
  * Success
7324
8276
  */
7325
- 200: {
8277
+ 201: {
7326
8278
  code: number;
7327
8279
  data: {
7328
8280
  createdAt: string;
7329
- projectId: string;
7330
- roleId: string;
8281
+ description: string | null;
8282
+ id: string;
8283
+ immutable: boolean;
8284
+ isSystem: boolean;
8285
+ name: string;
8286
+ organizationId: string | null;
8287
+ scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
8288
+ slug: string;
7331
8289
  updatedAt: string;
7332
- userId: string;
7333
8290
  } | null;
7334
8291
  error: {
7335
8292
  code: string;
@@ -7356,21 +8313,17 @@ export type OrganizationsUpsertProjectMemberForOrgResponses = {
7356
8313
  success: boolean;
7357
8314
  };
7358
8315
  };
7359
- export type OrganizationsUpsertProjectMemberForOrgResponse = OrganizationsUpsertProjectMemberForOrgResponses[keyof OrganizationsUpsertProjectMemberForOrgResponses];
7360
- export type RbacIntrospectEffectivePermissionsData = {
8316
+ export type RbacCreateRoleResponse = RbacCreateRoleResponses[keyof RbacCreateRoleResponses];
8317
+ export type RbacDeleteRoleData = {
7361
8318
  body?: never;
7362
8319
  path: {
7363
8320
  orgId: string;
8321
+ roleId: string;
7364
8322
  };
7365
- query: {
7366
- userId: string;
7367
- organizationId?: string | null;
7368
- workspaceId?: string | null;
7369
- projectId?: string | null;
7370
- };
7371
- url: '/v1/orgs/{orgId}/rbac/effective';
8323
+ query?: never;
8324
+ url: '/v1/orgs/{orgId}/roles/{roleId}';
7372
8325
  };
7373
- export type RbacIntrospectEffectivePermissionsErrors = {
8326
+ export type RbacDeleteRoleErrors = {
7374
8327
  /**
7375
8328
  * BadRequestError
7376
8329
  */
@@ -7420,41 +8373,15 @@ export type RbacIntrospectEffectivePermissionsErrors = {
7420
8373
  */
7421
8374
  503: ServiceUnavailableError;
7422
8375
  };
7423
- export type RbacIntrospectEffectivePermissionsError = RbacIntrospectEffectivePermissionsErrors[keyof RbacIntrospectEffectivePermissionsErrors];
7424
- export type RbacIntrospectEffectivePermissionsResponses = {
8376
+ export type RbacDeleteRoleError = RbacDeleteRoleErrors[keyof RbacDeleteRoleErrors];
8377
+ export type RbacDeleteRoleResponses = {
7425
8378
  /**
7426
8379
  * Success
7427
8380
  */
7428
8381
  200: {
7429
8382
  code: number;
7430
8383
  data: {
7431
- allowed: Array<string>;
7432
- denied: Array<string>;
7433
- isSuperAdmin: boolean;
7434
- organizationRoleId: string | null;
7435
- projectGrants: {
7436
- [key: string]: {
7437
- allowed: Array<string>;
7438
- denied: Array<string>;
7439
- roleId: string | null;
7440
- };
7441
- };
7442
- projectRoleId: string | null;
7443
- scope: {
7444
- organizationId?: string | null;
7445
- projectId?: string | null;
7446
- workspaceId?: string | null;
7447
- };
7448
- systemRoleIds: Array<string>;
7449
- userId: string;
7450
- workspaceGrants: {
7451
- [key: string]: {
7452
- allowed: Array<string>;
7453
- denied: Array<string>;
7454
- roleId: string | null;
7455
- };
7456
- };
7457
- workspaceRoleId: string | null;
8384
+ deleted: boolean;
7458
8385
  } | null;
7459
8386
  error: {
7460
8387
  code: string;
@@ -7481,16 +8408,20 @@ export type RbacIntrospectEffectivePermissionsResponses = {
7481
8408
  success: boolean;
7482
8409
  };
7483
8410
  };
7484
- export type RbacIntrospectEffectivePermissionsResponse = RbacIntrospectEffectivePermissionsResponses[keyof RbacIntrospectEffectivePermissionsResponses];
7485
- export type RbacGetSelfEffectivePermissionsData = {
7486
- body?: never;
8411
+ export type RbacDeleteRoleResponse = RbacDeleteRoleResponses[keyof RbacDeleteRoleResponses];
8412
+ export type RbacUpdateRoleData = {
8413
+ body: {
8414
+ description?: string | null;
8415
+ name?: string | null;
8416
+ };
7487
8417
  path: {
7488
8418
  orgId: string;
8419
+ roleId: string;
7489
8420
  };
7490
8421
  query?: never;
7491
- url: '/v1/orgs/{orgId}/rbac/effective-self';
8422
+ url: '/v1/orgs/{orgId}/roles/{roleId}';
7492
8423
  };
7493
- export type RbacGetSelfEffectivePermissionsErrors = {
8424
+ export type RbacUpdateRoleErrors = {
7494
8425
  /**
7495
8426
  * BadRequestError
7496
8427
  */
@@ -7528,53 +8459,36 @@ export type RbacGetSelfEffectivePermissionsErrors = {
7528
8459
  */
7529
8460
  422: UnprocessableEntityError;
7530
8461
  /**
7531
- * TooManyRequestsError
7532
- */
7533
- 429: TooManyRequestsError;
7534
- /**
7535
- * InternalServerError
7536
- */
7537
- 500: InternalServerError;
7538
- /**
7539
- * ServiceUnavailableError
7540
- */
7541
- 503: ServiceUnavailableError;
7542
- };
7543
- export type RbacGetSelfEffectivePermissionsError = RbacGetSelfEffectivePermissionsErrors[keyof RbacGetSelfEffectivePermissionsErrors];
7544
- export type RbacGetSelfEffectivePermissionsResponses = {
7545
- /**
7546
- * Success
7547
- */
7548
- 200: {
7549
- code: number;
7550
- data: {
7551
- allowed: Array<string>;
7552
- denied: Array<string>;
7553
- isSuperAdmin: boolean;
7554
- organizationRoleId: string | null;
7555
- projectGrants: {
7556
- [key: string]: {
7557
- allowed: Array<string>;
7558
- denied: Array<string>;
7559
- roleId: string | null;
7560
- };
7561
- };
7562
- projectRoleId: string | null;
7563
- scope: {
7564
- organizationId?: string | null;
7565
- projectId?: string | null;
7566
- workspaceId?: string | null;
7567
- };
7568
- systemRoleIds: Array<string>;
7569
- userId: string;
7570
- workspaceGrants: {
7571
- [key: string]: {
7572
- allowed: Array<string>;
7573
- denied: Array<string>;
7574
- roleId: string | null;
7575
- };
7576
- };
7577
- workspaceRoleId: string | null;
8462
+ * TooManyRequestsError
8463
+ */
8464
+ 429: TooManyRequestsError;
8465
+ /**
8466
+ * InternalServerError
8467
+ */
8468
+ 500: InternalServerError;
8469
+ /**
8470
+ * ServiceUnavailableError
8471
+ */
8472
+ 503: ServiceUnavailableError;
8473
+ };
8474
+ export type RbacUpdateRoleError = RbacUpdateRoleErrors[keyof RbacUpdateRoleErrors];
8475
+ export type RbacUpdateRoleResponses = {
8476
+ /**
8477
+ * Success
8478
+ */
8479
+ 200: {
8480
+ code: number;
8481
+ data: {
8482
+ createdAt: string;
8483
+ description: string | null;
8484
+ id: string;
8485
+ immutable: boolean;
8486
+ isSystem: boolean;
8487
+ name: string;
8488
+ organizationId: string | null;
8489
+ scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
8490
+ slug: string;
8491
+ updatedAt: string;
7578
8492
  } | null;
7579
8493
  error: {
7580
8494
  code: string;
@@ -7601,23 +8515,19 @@ export type RbacGetSelfEffectivePermissionsResponses = {
7601
8515
  success: boolean;
7602
8516
  };
7603
8517
  };
7604
- export type RbacGetSelfEffectivePermissionsResponse = RbacGetSelfEffectivePermissionsResponses[keyof RbacGetSelfEffectivePermissionsResponses];
7605
- export type RbacListRolesData = {
7606
- body?: never;
8518
+ export type RbacUpdateRoleResponse = RbacUpdateRoleResponses[keyof RbacUpdateRoleResponses];
8519
+ export type RbacSetRolePermissionsData = {
8520
+ body: {
8521
+ permissionIds: Array<string>;
8522
+ };
7607
8523
  path: {
7608
8524
  orgId: string;
8525
+ roleId: string;
7609
8526
  };
7610
- query?: {
7611
- page?: number | null;
7612
- limit?: number | null;
7613
- search?: string | null;
7614
- sortDir?: 'asc' | 'desc' | null;
7615
- sortBy?: 'createdAt' | 'updatedAt' | 'name' | 'slug' | null;
7616
- scopeType?: 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT' | null;
7617
- };
7618
- url: '/v1/orgs/{orgId}/roles';
8527
+ query?: never;
8528
+ url: '/v1/orgs/{orgId}/roles/{roleId}/permissions';
7619
8529
  };
7620
- export type RbacListRolesErrors = {
8530
+ export type RbacSetRolePermissionsErrors = {
7621
8531
  /**
7622
8532
  * BadRequestError
7623
8533
  */
@@ -7667,25 +8577,16 @@ export type RbacListRolesErrors = {
7667
8577
  */
7668
8578
  503: ServiceUnavailableError;
7669
8579
  };
7670
- export type RbacListRolesError = RbacListRolesErrors[keyof RbacListRolesErrors];
7671
- export type RbacListRolesResponses = {
8580
+ export type RbacSetRolePermissionsError = RbacSetRolePermissionsErrors[keyof RbacSetRolePermissionsErrors];
8581
+ export type RbacSetRolePermissionsResponses = {
7672
8582
  /**
7673
8583
  * Success
7674
8584
  */
7675
8585
  200: {
7676
8586
  code: number;
7677
- data: Array<{
7678
- createdAt: string;
7679
- description: string | null;
7680
- id: string;
7681
- immutable: boolean;
7682
- isSystem: boolean;
7683
- name: string;
7684
- organizationId: string | null;
7685
- scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
7686
- slug: string;
7687
- updatedAt: string;
7688
- }> | null;
8587
+ data: {
8588
+ updated: boolean;
8589
+ } | null;
7689
8590
  error: {
7690
8591
  code: string;
7691
8592
  details?: unknown | null;
@@ -7711,21 +8612,33 @@ export type RbacListRolesResponses = {
7711
8612
  success: boolean;
7712
8613
  };
7713
8614
  };
7714
- export type RbacListRolesResponse = RbacListRolesResponses[keyof RbacListRolesResponses];
7715
- export type RbacCreateRoleData = {
7716
- body: {
7717
- description?: string | null;
7718
- name: string;
7719
- scopeType: 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
7720
- slug: string;
7721
- };
8615
+ export type RbacSetRolePermissionsResponse = RbacSetRolePermissionsResponses[keyof RbacSetRolePermissionsResponses];
8616
+ export type UsageListTopTracesData = {
8617
+ body?: never;
7722
8618
  path: {
7723
8619
  orgId: string;
7724
8620
  };
7725
- query?: never;
7726
- url: '/v1/orgs/{orgId}/roles';
8621
+ query: {
8622
+ from?: string | null;
8623
+ to?: string | null;
8624
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
8625
+ n?: number | null;
8626
+ timezone?: string | null;
8627
+ /**
8628
+ * `latency` ranks by duration, `cost` by the API-price equivalent (so subscription traffic ranks by what it consumed), `tokens` by `totalTokens` (input + output).
8629
+ */
8630
+ sort: 'latency' | 'cost' | 'tokens';
8631
+ principalId?: string | null;
8632
+ projectId?: string | null;
8633
+ vendor?: string | null;
8634
+ provider?: string | null;
8635
+ model?: string | null;
8636
+ status?: 'ok' | 'error' | 'timeout' | null;
8637
+ limit?: number | null;
8638
+ };
8639
+ url: '/v1/orgs/{orgId}/traces/top';
7727
8640
  };
7728
- export type RbacCreateRoleErrors = {
8641
+ export type UsageListTopTracesErrors = {
7729
8642
  /**
7730
8643
  * BadRequestError
7731
8644
  */
@@ -7775,24 +8688,45 @@ export type RbacCreateRoleErrors = {
7775
8688
  */
7776
8689
  503: ServiceUnavailableError;
7777
8690
  };
7778
- export type RbacCreateRoleError = RbacCreateRoleErrors[keyof RbacCreateRoleErrors];
7779
- export type RbacCreateRoleResponses = {
8691
+ export type UsageListTopTracesError = UsageListTopTracesErrors[keyof UsageListTopTracesErrors];
8692
+ export type UsageListTopTracesResponses = {
7780
8693
  /**
7781
8694
  * Success
7782
8695
  */
7783
- 201: {
8696
+ 200: {
7784
8697
  code: number;
7785
8698
  data: {
7786
- createdAt: string;
7787
- description: string | null;
7788
- id: string;
7789
- immutable: boolean;
7790
- isSystem: boolean;
7791
- name: string;
7792
- organizationId: string | null;
7793
- scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
7794
- slug: string;
7795
- updatedAt: string;
8699
+ excludedProjects: Array<{
8700
+ projectId: string;
8701
+ reason: 'other_data_center';
8702
+ }>;
8703
+ items: Array<{
8704
+ apiEquivalentUsd: number | null;
8705
+ billedUsd: number | null;
8706
+ durationMs: number;
8707
+ inputTokens: number;
8708
+ model: string;
8709
+ outputTokens: number;
8710
+ projectId: string;
8711
+ provider: string;
8712
+ sessionId: string | null;
8713
+ sessionLink: string | null;
8714
+ startTime: string;
8715
+ status: 'ok' | 'error' | 'timeout';
8716
+ /**
8717
+ * `inputTokens + outputTokens`, the trace list's definition. Unlike the usage endpoints' `tokens.total`, it leaves out cache reads, cache writes and reasoning tokens.
8718
+ */
8719
+ totalTokens: number;
8720
+ traceId: string;
8721
+ }>;
8722
+ sort: 'latency' | 'cost' | 'tokens';
8723
+ window: {
8724
+ from: string;
8725
+ n?: number | null;
8726
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
8727
+ timezone?: string | null;
8728
+ to: string;
8729
+ };
7796
8730
  } | null;
7797
8731
  error: {
7798
8732
  code: string;
@@ -7819,17 +8753,30 @@ export type RbacCreateRoleResponses = {
7819
8753
  success: boolean;
7820
8754
  };
7821
8755
  };
7822
- export type RbacCreateRoleResponse = RbacCreateRoleResponses[keyof RbacCreateRoleResponses];
7823
- export type RbacDeleteRoleData = {
8756
+ export type UsageListTopTracesResponse = UsageListTopTracesResponses[keyof UsageListTopTracesResponses];
8757
+ export type UsageGetUsageCostsData = {
7824
8758
  body?: never;
7825
8759
  path: {
7826
8760
  orgId: string;
7827
- roleId: string;
7828
8761
  };
7829
- query?: never;
7830
- url: '/v1/orgs/{orgId}/roles/{roleId}';
8762
+ query?: {
8763
+ from?: string | null;
8764
+ to?: string | null;
8765
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
8766
+ n?: number | null;
8767
+ timezone?: string | null;
8768
+ groupBy?: 'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode' | Array<'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode'> | null;
8769
+ principalId?: string | null;
8770
+ vendor?: string | null;
8771
+ provider?: string | null;
8772
+ model?: string | null;
8773
+ projectId?: string | null;
8774
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
8775
+ limit?: number | null;
8776
+ };
8777
+ url: '/v1/orgs/{orgId}/usage/costs';
7831
8778
  };
7832
- export type RbacDeleteRoleErrors = {
8779
+ export type UsageGetUsageCostsErrors = {
7833
8780
  /**
7834
8781
  * BadRequestError
7835
8782
  */
@@ -7879,15 +8826,112 @@ export type RbacDeleteRoleErrors = {
7879
8826
  */
7880
8827
  503: ServiceUnavailableError;
7881
8828
  };
7882
- export type RbacDeleteRoleError = RbacDeleteRoleErrors[keyof RbacDeleteRoleErrors];
7883
- export type RbacDeleteRoleResponses = {
8829
+ export type UsageGetUsageCostsError = UsageGetUsageCostsErrors[keyof UsageGetUsageCostsErrors];
8830
+ export type UsageGetUsageCostsResponses = {
7884
8831
  /**
7885
8832
  * Success
7886
8833
  */
7887
8834
  200: {
7888
8835
  code: number;
7889
8836
  data: {
7890
- deleted: boolean;
8837
+ byProvider?: Array<{
8838
+ apiEquivalentUsd: number | null;
8839
+ /**
8840
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
8841
+ */
8842
+ billedUsd: number | null;
8843
+ provider: string;
8844
+ requests: number;
8845
+ tokens: {
8846
+ cacheRead: number;
8847
+ cacheWrite: number;
8848
+ input: number;
8849
+ output: number;
8850
+ reasoning: number;
8851
+ total: number;
8852
+ };
8853
+ unpricedRequests: number;
8854
+ }> | null;
8855
+ excludedProjects: Array<{
8856
+ projectId: string;
8857
+ reason: 'other_data_center';
8858
+ }>;
8859
+ groupBy: Array<'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode'>;
8860
+ groups: Array<{
8861
+ apiEquivalentUsd: number | null;
8862
+ /**
8863
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
8864
+ */
8865
+ billedUsd: number | null;
8866
+ /**
8867
+ * Present when grouped by `billingMode`. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode: it forms no group then, as the cost views give it no billing-mode line, but it still counts in `totals`.
8868
+ */
8869
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
8870
+ model?: string | null;
8871
+ principal?: {
8872
+ displayName: string | null;
8873
+ id: string;
8874
+ } | null | null;
8875
+ project?: {
8876
+ id: string;
8877
+ name: string;
8878
+ } | null;
8879
+ provider?: string | null;
8880
+ requests: number;
8881
+ tokens: {
8882
+ cacheRead: number;
8883
+ cacheWrite: number;
8884
+ input: number;
8885
+ output: number;
8886
+ reasoning: number;
8887
+ total: number;
8888
+ };
8889
+ unpricedRequests: number;
8890
+ vendor?: string | null;
8891
+ }>;
8892
+ otherGroups: number;
8893
+ totals: {
8894
+ apiEquivalentUsd: number | null;
8895
+ /**
8896
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
8897
+ */
8898
+ billedUsd: number | null;
8899
+ byBillingMode: Array<{
8900
+ apiEquivalentUsd: number | null;
8901
+ /**
8902
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
8903
+ */
8904
+ billedUsd: number | null;
8905
+ billingMode: 'subscription' | 'api' | 'unknown';
8906
+ requests: number;
8907
+ tokens: {
8908
+ cacheRead: number;
8909
+ cacheWrite: number;
8910
+ input: number;
8911
+ output: number;
8912
+ reasoning: number;
8913
+ total: number;
8914
+ };
8915
+ unpricedRequests: number;
8916
+ }>;
8917
+ requests: number;
8918
+ tokens: {
8919
+ cacheRead: number;
8920
+ cacheWrite: number;
8921
+ input: number;
8922
+ output: number;
8923
+ reasoning: number;
8924
+ total: number;
8925
+ };
8926
+ unpricedRequests: number;
8927
+ };
8928
+ window: {
8929
+ from: string;
8930
+ n?: number | null;
8931
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
8932
+ timezone?: string | null;
8933
+ to: string;
8934
+ };
7891
8935
  } | null;
7892
8936
  error: {
7893
8937
  code: string;
@@ -7914,20 +8958,19 @@ export type RbacDeleteRoleResponses = {
7914
8958
  success: boolean;
7915
8959
  };
7916
8960
  };
7917
- export type RbacDeleteRoleResponse = RbacDeleteRoleResponses[keyof RbacDeleteRoleResponses];
7918
- export type RbacUpdateRoleData = {
7919
- body: {
7920
- description?: string | null;
7921
- name?: string | null;
7922
- };
8961
+ export type UsageGetUsageCostsResponse = UsageGetUsageCostsResponses[keyof UsageGetUsageCostsResponses];
8962
+ export type UsageListUsagePrincipalsData = {
8963
+ body?: never;
7923
8964
  path: {
7924
8965
  orgId: string;
7925
- roleId: string;
7926
8966
  };
7927
- query?: never;
7928
- url: '/v1/orgs/{orgId}/roles/{roleId}';
8967
+ query?: {
8968
+ query?: string | null;
8969
+ email?: string | null;
8970
+ };
8971
+ url: '/v1/orgs/{orgId}/usage/principals';
7929
8972
  };
7930
- export type RbacUpdateRoleErrors = {
8973
+ export type UsageListUsagePrincipalsErrors = {
7931
8974
  /**
7932
8975
  * BadRequestError
7933
8976
  */
@@ -7977,24 +9020,22 @@ export type RbacUpdateRoleErrors = {
7977
9020
  */
7978
9021
  503: ServiceUnavailableError;
7979
9022
  };
7980
- export type RbacUpdateRoleError = RbacUpdateRoleErrors[keyof RbacUpdateRoleErrors];
7981
- export type RbacUpdateRoleResponses = {
9023
+ export type UsageListUsagePrincipalsError = UsageListUsagePrincipalsErrors[keyof UsageListUsagePrincipalsErrors];
9024
+ export type UsageListUsagePrincipalsResponses = {
7982
9025
  /**
7983
9026
  * Success
7984
9027
  */
7985
9028
  200: {
7986
9029
  code: number;
7987
9030
  data: {
7988
- createdAt: string;
7989
- description: string | null;
7990
- id: string;
7991
- immutable: boolean;
7992
- isSystem: boolean;
7993
- name: string;
7994
- organizationId: string | null;
7995
- scopeType: 'SYSTEM' | 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT';
7996
- slug: string;
7997
- updatedAt: string;
9031
+ excludedProjects: Array<{
9032
+ projectId: string;
9033
+ reason: 'other_data_center';
9034
+ }>;
9035
+ items: Array<{
9036
+ displayName: string;
9037
+ principalId: string;
9038
+ }>;
7998
9039
  } | null;
7999
9040
  error: {
8000
9041
  code: string;
@@ -8021,19 +9062,34 @@ export type RbacUpdateRoleResponses = {
8021
9062
  success: boolean;
8022
9063
  };
8023
9064
  };
8024
- export type RbacUpdateRoleResponse = RbacUpdateRoleResponses[keyof RbacUpdateRoleResponses];
8025
- export type RbacSetRolePermissionsData = {
8026
- body: {
8027
- permissionIds: Array<string>;
8028
- };
9065
+ export type UsageListUsagePrincipalsResponse = UsageListUsagePrincipalsResponses[keyof UsageListUsagePrincipalsResponses];
9066
+ export type UsageListUsageSessionsData = {
9067
+ body?: never;
8029
9068
  path: {
8030
9069
  orgId: string;
8031
- roleId: string;
8032
9070
  };
8033
- query?: never;
8034
- url: '/v1/orgs/{orgId}/roles/{roleId}/permissions';
9071
+ query?: {
9072
+ from?: string | null;
9073
+ to?: string | null;
9074
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
9075
+ n?: number | null;
9076
+ timezone?: string | null;
9077
+ /**
9078
+ * `session` (default) or `run`. A session's owner is whoever sent its first request ever, stored with the session. A run stores no owner, so under `run` the owner and the `principalId` filter use the first sender inside the window.
9079
+ */
9080
+ groupBy?: 'session' | 'run' | null;
9081
+ /**
9082
+ * Only sessions (runs) this principal owns. Under `groupBy=session`: the session's stored owner, its first sender ever. Under `groupBy=run`: the run's first sender inside the window, since a run stores no owner.
9083
+ */
9084
+ principalId?: string | null;
9085
+ projectId?: string | null;
9086
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
9087
+ cursor?: string | null;
9088
+ limit?: number | null;
9089
+ };
9090
+ url: '/v1/orgs/{orgId}/usage/sessions';
8035
9091
  };
8036
- export type RbacSetRolePermissionsErrors = {
9092
+ export type UsageListUsageSessionsErrors = {
8037
9093
  /**
8038
9094
  * BadRequestError
8039
9095
  */
@@ -8083,15 +9139,197 @@ export type RbacSetRolePermissionsErrors = {
8083
9139
  */
8084
9140
  503: ServiceUnavailableError;
8085
9141
  };
8086
- export type RbacSetRolePermissionsError = RbacSetRolePermissionsErrors[keyof RbacSetRolePermissionsErrors];
8087
- export type RbacSetRolePermissionsResponses = {
9142
+ export type UsageListUsageSessionsError = UsageListUsageSessionsErrors[keyof UsageListUsageSessionsErrors];
9143
+ export type UsageListUsageSessionsResponses = {
8088
9144
  /**
8089
9145
  * Success
8090
9146
  */
8091
9147
  200: {
8092
9148
  code: number;
8093
9149
  data: {
8094
- updated: boolean;
9150
+ excludedProjects: Array<{
9151
+ projectId: string;
9152
+ reason: 'other_data_center';
9153
+ }>;
9154
+ groupBy: 'session' | 'run';
9155
+ pagination: {
9156
+ limit: number;
9157
+ nextCursor: string | null;
9158
+ };
9159
+ runs?: Array<{
9160
+ apiEquivalentUsd: number | null;
9161
+ /**
9162
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9163
+ */
9164
+ billedUsd: number | null;
9165
+ byBillingMode: Array<{
9166
+ apiEquivalentUsd: number | null;
9167
+ /**
9168
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9169
+ */
9170
+ billedUsd: number | null;
9171
+ billingMode: 'subscription' | 'api' | 'unknown';
9172
+ requests: number;
9173
+ tokens: {
9174
+ cacheRead: number;
9175
+ cacheWrite: number;
9176
+ input: number;
9177
+ output: number;
9178
+ reasoning: number;
9179
+ total: number;
9180
+ };
9181
+ unpricedRequests: number;
9182
+ }>;
9183
+ conversationId: string;
9184
+ firstSeen: string;
9185
+ lastActivity: string;
9186
+ models: Array<string>;
9187
+ /**
9188
+ * The run's first sender inside the window, not its first ever: a run stores no owner. `null` when no span in the window carried one.
9189
+ */
9190
+ owner: {
9191
+ displayName: string | null;
9192
+ id: string;
9193
+ } | null;
9194
+ projectId: string;
9195
+ requests: number;
9196
+ startedInWindow: boolean;
9197
+ tokens: {
9198
+ cacheRead: number;
9199
+ cacheWrite: number;
9200
+ input: number;
9201
+ output: number;
9202
+ reasoning: number;
9203
+ total: number;
9204
+ };
9205
+ unpricedRequests: number;
9206
+ }> | null;
9207
+ sessions?: Array<{
9208
+ apiEquivalentUsd: number | null;
9209
+ /**
9210
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9211
+ */
9212
+ billedUsd: number | null;
9213
+ byBillingMode: Array<{
9214
+ apiEquivalentUsd: number | null;
9215
+ /**
9216
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9217
+ */
9218
+ billedUsd: number | null;
9219
+ billingMode: 'subscription' | 'api' | 'unknown';
9220
+ requests: number;
9221
+ tokens: {
9222
+ cacheRead: number;
9223
+ cacheWrite: number;
9224
+ input: number;
9225
+ output: number;
9226
+ reasoning: number;
9227
+ total: number;
9228
+ };
9229
+ unpricedRequests: number;
9230
+ }>;
9231
+ firstSeen: string;
9232
+ lastActivity: string;
9233
+ link: string;
9234
+ models: Array<string>;
9235
+ owner: {
9236
+ displayName: string | null;
9237
+ id: string;
9238
+ } | null;
9239
+ projectId: string;
9240
+ requests: number;
9241
+ sessionId: string;
9242
+ startedInWindow: boolean;
9243
+ tokens: {
9244
+ cacheRead: number;
9245
+ cacheWrite: number;
9246
+ input: number;
9247
+ output: number;
9248
+ reasoning: number;
9249
+ total: number;
9250
+ };
9251
+ unpricedRequests: number;
9252
+ }> | null;
9253
+ totals: {
9254
+ active: number;
9255
+ apiEquivalentUsd: number | null;
9256
+ /**
9257
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9258
+ */
9259
+ billedUsd: number | null;
9260
+ byBillingMode: Array<{
9261
+ apiEquivalentUsd: number | null;
9262
+ /**
9263
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9264
+ */
9265
+ billedUsd: number | null;
9266
+ billingMode: 'subscription' | 'api' | 'unknown';
9267
+ requests: number;
9268
+ tokens: {
9269
+ cacheRead: number;
9270
+ cacheWrite: number;
9271
+ input: number;
9272
+ output: number;
9273
+ reasoning: number;
9274
+ total: number;
9275
+ };
9276
+ unpricedRequests: number;
9277
+ }>;
9278
+ requests: number;
9279
+ startedInWindow: number;
9280
+ tokens: {
9281
+ cacheRead: number;
9282
+ cacheWrite: number;
9283
+ input: number;
9284
+ output: number;
9285
+ reasoning: number;
9286
+ total: number;
9287
+ };
9288
+ unpricedRequests: number;
9289
+ };
9290
+ ungrouped: {
9291
+ apiEquivalentUsd: number | null;
9292
+ /**
9293
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9294
+ */
9295
+ billedUsd: number | null;
9296
+ byBillingMode: Array<{
9297
+ apiEquivalentUsd: number | null;
9298
+ /**
9299
+ * Per-token cost of `api` traffic at the org's rates. Subscription traffic is billed 0. `unknown` traffic (Anthropic calls from before the billing-mode stamp) is never folded in. A request that never reached the provider (a response-cache hit or a guardrail block) has no billing mode and adds nothing here; its tokens are still in `tokens` and `apiEquivalentUsd`, as in the cost views, and it forms no `byBillingMode` line. `null` when the group's `api` traffic has no rate; when the group is only `unknown` traffic, as the `unknown` billing-mode line always is: that traffic can't be classified as subscription or API, so it has no billed figure (its `apiEquivalentUsd` still prices it); or when the group is only requests that never reached the provider.
9300
+ */
9301
+ billedUsd: number | null;
9302
+ billingMode: 'subscription' | 'api' | 'unknown';
9303
+ requests: number;
9304
+ tokens: {
9305
+ cacheRead: number;
9306
+ cacheWrite: number;
9307
+ input: number;
9308
+ output: number;
9309
+ reasoning: number;
9310
+ total: number;
9311
+ };
9312
+ unpricedRequests: number;
9313
+ }>;
9314
+ label: string;
9315
+ requests: number;
9316
+ tokens: {
9317
+ cacheRead: number;
9318
+ cacheWrite: number;
9319
+ input: number;
9320
+ output: number;
9321
+ reasoning: number;
9322
+ total: number;
9323
+ };
9324
+ unpricedRequests: number;
9325
+ };
9326
+ window: {
9327
+ from: string;
9328
+ n?: number | null;
9329
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
9330
+ timezone?: string | null;
9331
+ to: string;
9332
+ };
8095
9333
  } | null;
8096
9334
  error: {
8097
9335
  code: string;
@@ -8118,7 +9356,7 @@ export type RbacSetRolePermissionsResponses = {
8118
9356
  success: boolean;
8119
9357
  };
8120
9358
  };
8121
- export type RbacSetRolePermissionsResponse = RbacSetRolePermissionsResponses[keyof RbacSetRolePermissionsResponses];
9359
+ export type UsageListUsageSessionsResponse = UsageListUsageSessionsResponses[keyof UsageListUsageSessionsResponses];
8122
9360
  export type RbacSetUserPermissionOverridesData = {
8123
9361
  body: {
8124
9362
  overrides: Array<{
@@ -23257,7 +24495,7 @@ export type TracesListTracesData = {
23257
24495
  query?: {
23258
24496
  page?: string | null;
23259
24497
  limit?: string | null;
23260
- sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | null;
24498
+ sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | 'totalTokens' | 'apiEquivalentUsd' | null;
23261
24499
  order?: 'asc' | 'desc' | null;
23262
24500
  status?: 'ok' | 'error' | 'timeout' | null;
23263
24501
  provider?: string | Array<string> | null;
@@ -23268,6 +24506,8 @@ export type TracesListTracesData = {
23268
24506
  vcsHeadName?: string | null;
23269
24507
  vcsHeadRevision?: string | null;
23270
24508
  billingMode?: 'subscription' | 'api' | 'unknown' | Array<'subscription' | 'api' | 'unknown'> | null;
24509
+ principalId?: string | null;
24510
+ vendor?: string | null;
23271
24511
  minTokens?: string | null;
23272
24512
  maxTokens?: string | null;
23273
24513
  minCost?: string | null;
@@ -23427,6 +24667,7 @@ export type TracesListTracesResponses = {
23427
24667
  cost_usd: number | null;
23428
24668
  duration_ms: number;
23429
24669
  input_tokens: number;
24670
+ llm_call_count: number;
23430
24671
  model: string;
23431
24672
  output_tokens: number;
23432
24673
  prompt_id: string | null;
@@ -23573,7 +24814,7 @@ export type TracesListTracePromptFacetsData = {
23573
24814
  query?: {
23574
24815
  page?: string | null;
23575
24816
  limit?: string | null;
23576
- sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | null;
24817
+ sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | 'totalTokens' | 'apiEquivalentUsd' | null;
23577
24818
  order?: 'asc' | 'desc' | null;
23578
24819
  status?: 'ok' | 'error' | 'timeout' | null;
23579
24820
  provider?: string | Array<string> | null;
@@ -23584,6 +24825,8 @@ export type TracesListTracePromptFacetsData = {
23584
24825
  vcsHeadName?: string | null;
23585
24826
  vcsHeadRevision?: string | null;
23586
24827
  billingMode?: 'subscription' | 'api' | 'unknown' | Array<'subscription' | 'api' | 'unknown'> | null;
24828
+ principalId?: string | null;
24829
+ vendor?: string | null;
23587
24830
  minTokens?: string | null;
23588
24831
  maxTokens?: string | null;
23589
24832
  minCost?: string | null;