@to11ai/sdk 3.0.0-rc.16 → 3.0.0-rc.18

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.
@@ -142,6 +142,25 @@ export type OAuthCredential = {
142
142
  tokenExpiry?: number | null;
143
143
  type: 'oauth';
144
144
  };
145
+ export type OrgPromptRow = {
146
+ description: string | null;
147
+ name: string;
148
+ projectId: string;
149
+ projectName: string;
150
+ promptId: string;
151
+ slug: string;
152
+ /**
153
+ * The version the `latest` label serves at listing time. Pass it to the by-version render route so the run uses exactly this version.
154
+ */
155
+ version: number;
156
+ };
157
+ export type OrgPromptsResponse = {
158
+ excludedProjects: Array<{
159
+ projectId: string;
160
+ reason: 'other_data_center';
161
+ }>;
162
+ items: Array<OrgPromptRow>;
163
+ };
145
164
  export type PrincipalApiKeyContextInvariant = {
146
165
  actorType?: 'oidc' | 'api_key' | null;
147
166
  apiKey?: {
@@ -434,6 +453,39 @@ export type TooManyRequestsError = {
434
453
  };
435
454
  success: false;
436
455
  };
456
+ export type TopTracesResponse = {
457
+ excludedProjects: Array<{
458
+ projectId: string;
459
+ reason: 'other_data_center';
460
+ }>;
461
+ items: Array<{
462
+ apiEquivalentUsd: number | null;
463
+ billedUsd: number | null;
464
+ durationMs: number;
465
+ inputTokens: number;
466
+ model: string;
467
+ outputTokens: number;
468
+ projectId: string;
469
+ provider: string;
470
+ sessionId: string | null;
471
+ sessionLink: string | null;
472
+ startTime: string;
473
+ status: 'ok' | 'error' | 'timeout';
474
+ /**
475
+ * `inputTokens + outputTokens`, the trace list's definition. Unlike the usage endpoints' `tokens.total`, it leaves out cache reads, cache writes and reasoning tokens.
476
+ */
477
+ totalTokens: number;
478
+ traceId: string;
479
+ }>;
480
+ sort: 'latency' | 'cost' | 'tokens';
481
+ window: {
482
+ from: string;
483
+ n?: number | null;
484
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
485
+ timezone?: string | null;
486
+ to: string;
487
+ };
488
+ };
437
489
  export type UnauthorizedError = {
438
490
  _tag: 'UnauthorizedError';
439
491
  code: number;
@@ -464,6 +516,301 @@ export type UnprocessableEntityError = {
464
516
  };
465
517
  success: false;
466
518
  };
519
+ export type UsageCostsResponse = {
520
+ byProvider?: Array<{
521
+ apiEquivalentUsd: number | null;
522
+ /**
523
+ * 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.
524
+ */
525
+ billedUsd: number | null;
526
+ provider: string;
527
+ requests: number;
528
+ tokens: {
529
+ cacheRead: number;
530
+ cacheWrite: number;
531
+ input: number;
532
+ output: number;
533
+ reasoning: number;
534
+ total: number;
535
+ };
536
+ unpricedRequests: number;
537
+ }> | null;
538
+ excludedProjects: Array<{
539
+ projectId: string;
540
+ reason: 'other_data_center';
541
+ }>;
542
+ groupBy: Array<'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode'>;
543
+ groups: Array<{
544
+ apiEquivalentUsd: number | null;
545
+ /**
546
+ * 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.
547
+ */
548
+ billedUsd: number | null;
549
+ /**
550
+ * 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`.
551
+ */
552
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
553
+ model?: string | null;
554
+ principal?: {
555
+ displayName: string | null;
556
+ id: string;
557
+ } | null | null;
558
+ project?: {
559
+ id: string;
560
+ name: string;
561
+ } | null;
562
+ provider?: string | null;
563
+ requests: number;
564
+ tokens: {
565
+ cacheRead: number;
566
+ cacheWrite: number;
567
+ input: number;
568
+ output: number;
569
+ reasoning: number;
570
+ total: number;
571
+ };
572
+ unpricedRequests: number;
573
+ vendor?: string | null;
574
+ }>;
575
+ otherGroups: number;
576
+ totals: {
577
+ apiEquivalentUsd: number | null;
578
+ /**
579
+ * 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.
580
+ */
581
+ billedUsd: number | null;
582
+ byBillingMode: Array<{
583
+ apiEquivalentUsd: number | null;
584
+ /**
585
+ * 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.
586
+ */
587
+ billedUsd: number | null;
588
+ billingMode: 'subscription' | 'api' | 'unknown';
589
+ requests: number;
590
+ tokens: {
591
+ cacheRead: number;
592
+ cacheWrite: number;
593
+ input: number;
594
+ output: number;
595
+ reasoning: number;
596
+ total: number;
597
+ };
598
+ unpricedRequests: number;
599
+ }>;
600
+ requests: number;
601
+ tokens: {
602
+ cacheRead: number;
603
+ cacheWrite: number;
604
+ input: number;
605
+ output: number;
606
+ reasoning: number;
607
+ total: number;
608
+ };
609
+ unpricedRequests: number;
610
+ };
611
+ window: {
612
+ from: string;
613
+ n?: number | null;
614
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
615
+ timezone?: string | null;
616
+ to: string;
617
+ };
618
+ };
619
+ export type UsagePrincipalsResponse = {
620
+ excludedProjects: Array<{
621
+ projectId: string;
622
+ reason: 'other_data_center';
623
+ }>;
624
+ items: Array<{
625
+ displayName: string;
626
+ principalId: string;
627
+ }>;
628
+ };
629
+ export type UsageSessionsResponse = {
630
+ excludedProjects: Array<{
631
+ projectId: string;
632
+ reason: 'other_data_center';
633
+ }>;
634
+ groupBy: 'session' | 'run';
635
+ pagination: {
636
+ limit: number;
637
+ nextCursor: string | null;
638
+ };
639
+ runs?: Array<{
640
+ apiEquivalentUsd: number | null;
641
+ /**
642
+ * 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.
643
+ */
644
+ billedUsd: number | null;
645
+ byBillingMode: Array<{
646
+ apiEquivalentUsd: number | null;
647
+ /**
648
+ * 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.
649
+ */
650
+ billedUsd: number | null;
651
+ billingMode: 'subscription' | 'api' | 'unknown';
652
+ requests: number;
653
+ tokens: {
654
+ cacheRead: number;
655
+ cacheWrite: number;
656
+ input: number;
657
+ output: number;
658
+ reasoning: number;
659
+ total: number;
660
+ };
661
+ unpricedRequests: number;
662
+ }>;
663
+ conversationId: string;
664
+ firstSeen: string;
665
+ lastActivity: string;
666
+ models: Array<string>;
667
+ /**
668
+ * 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.
669
+ */
670
+ owner: {
671
+ displayName: string | null;
672
+ id: string;
673
+ } | null;
674
+ projectId: string;
675
+ requests: number;
676
+ startedInWindow: boolean;
677
+ tokens: {
678
+ cacheRead: number;
679
+ cacheWrite: number;
680
+ input: number;
681
+ output: number;
682
+ reasoning: number;
683
+ total: number;
684
+ };
685
+ unpricedRequests: number;
686
+ }> | null;
687
+ sessions?: Array<{
688
+ apiEquivalentUsd: number | null;
689
+ /**
690
+ * 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.
691
+ */
692
+ billedUsd: number | null;
693
+ byBillingMode: Array<{
694
+ apiEquivalentUsd: number | null;
695
+ /**
696
+ * 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.
697
+ */
698
+ billedUsd: number | null;
699
+ billingMode: 'subscription' | 'api' | 'unknown';
700
+ requests: number;
701
+ tokens: {
702
+ cacheRead: number;
703
+ cacheWrite: number;
704
+ input: number;
705
+ output: number;
706
+ reasoning: number;
707
+ total: number;
708
+ };
709
+ unpricedRequests: number;
710
+ }>;
711
+ firstSeen: string;
712
+ lastActivity: string;
713
+ link: string;
714
+ models: Array<string>;
715
+ owner: {
716
+ displayName: string | null;
717
+ id: string;
718
+ } | null;
719
+ projectId: string;
720
+ requests: number;
721
+ sessionId: string;
722
+ startedInWindow: boolean;
723
+ tokens: {
724
+ cacheRead: number;
725
+ cacheWrite: number;
726
+ input: number;
727
+ output: number;
728
+ reasoning: number;
729
+ total: number;
730
+ };
731
+ unpricedRequests: number;
732
+ }> | null;
733
+ totals: {
734
+ active: number;
735
+ apiEquivalentUsd: number | null;
736
+ /**
737
+ * 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.
738
+ */
739
+ billedUsd: number | null;
740
+ byBillingMode: Array<{
741
+ apiEquivalentUsd: number | null;
742
+ /**
743
+ * 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.
744
+ */
745
+ billedUsd: number | null;
746
+ billingMode: 'subscription' | 'api' | 'unknown';
747
+ requests: number;
748
+ tokens: {
749
+ cacheRead: number;
750
+ cacheWrite: number;
751
+ input: number;
752
+ output: number;
753
+ reasoning: number;
754
+ total: number;
755
+ };
756
+ unpricedRequests: number;
757
+ }>;
758
+ requests: number;
759
+ startedInWindow: number;
760
+ tokens: {
761
+ cacheRead: number;
762
+ cacheWrite: number;
763
+ input: number;
764
+ output: number;
765
+ reasoning: number;
766
+ total: number;
767
+ };
768
+ unpricedRequests: number;
769
+ };
770
+ ungrouped: {
771
+ apiEquivalentUsd: number | null;
772
+ /**
773
+ * 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.
774
+ */
775
+ billedUsd: number | null;
776
+ byBillingMode: Array<{
777
+ apiEquivalentUsd: number | null;
778
+ /**
779
+ * 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.
780
+ */
781
+ billedUsd: number | null;
782
+ billingMode: 'subscription' | 'api' | 'unknown';
783
+ requests: number;
784
+ tokens: {
785
+ cacheRead: number;
786
+ cacheWrite: number;
787
+ input: number;
788
+ output: number;
789
+ reasoning: number;
790
+ total: number;
791
+ };
792
+ unpricedRequests: number;
793
+ }>;
794
+ label: string;
795
+ requests: number;
796
+ tokens: {
797
+ cacheRead: number;
798
+ cacheWrite: number;
799
+ input: number;
800
+ output: number;
801
+ reasoning: number;
802
+ total: number;
803
+ };
804
+ unpricedRequests: number;
805
+ };
806
+ window: {
807
+ from: string;
808
+ n?: number | null;
809
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
810
+ timezone?: string | null;
811
+ to: string;
812
+ };
813
+ };
467
814
  export type ApiKeysGetApiKeyJwksData = {
468
815
  body?: never;
469
816
  path?: never;
@@ -4523,6 +4870,109 @@ export type OrganizationsUpdateOrganizationResponses = {
4523
4870
  };
4524
4871
  };
4525
4872
  export type OrganizationsUpdateOrganizationResponse = OrganizationsUpdateOrganizationResponses[keyof OrganizationsUpdateOrganizationResponses];
4873
+ export type AssistantRunsRecordAssistantRunData = {
4874
+ body: {
4875
+ finishedAt: string;
4876
+ model: string;
4877
+ outcome: 'answered' | 'limit_tool_rounds' | 'limit_wall_clock' | 'limit_output_tokens' | 'refused' | 'credential_expired' | 'model_error' | 'disabled' | 'superseded';
4878
+ runId: string;
4879
+ runType: 'data_question' | 'skill_run';
4880
+ startedAt: string;
4881
+ surface: 'slack' | 'web_chat' | 'mcp';
4882
+ toolsCalled: Array<string>;
4883
+ };
4884
+ path: {
4885
+ orgId: string;
4886
+ };
4887
+ query?: never;
4888
+ url: '/v1/orgs/{orgId}/assistant/runs';
4889
+ };
4890
+ export type AssistantRunsRecordAssistantRunErrors = {
4891
+ /**
4892
+ * BadRequestError
4893
+ */
4894
+ 400: BadRequestError;
4895
+ /**
4896
+ * UnauthorizedError
4897
+ */
4898
+ 401: UnauthorizedError;
4899
+ /**
4900
+ * ForbiddenError
4901
+ */
4902
+ 403: ForbiddenError;
4903
+ /**
4904
+ * NotFoundError
4905
+ */
4906
+ 404: NotFoundError;
4907
+ /**
4908
+ * ConflictError
4909
+ */
4910
+ 409: ConflictError;
4911
+ /**
4912
+ * GoneError
4913
+ */
4914
+ 410: GoneError;
4915
+ /**
4916
+ * ContentTooLargeError
4917
+ */
4918
+ 413: ContentTooLargeError;
4919
+ /**
4920
+ * MisdirectedRequestError
4921
+ */
4922
+ 421: MisdirectedRequestError;
4923
+ /**
4924
+ * UnprocessableEntityError
4925
+ */
4926
+ 422: UnprocessableEntityError;
4927
+ /**
4928
+ * TooManyRequestsError
4929
+ */
4930
+ 429: TooManyRequestsError;
4931
+ /**
4932
+ * InternalServerError
4933
+ */
4934
+ 500: InternalServerError;
4935
+ /**
4936
+ * ServiceUnavailableError
4937
+ */
4938
+ 503: ServiceUnavailableError;
4939
+ };
4940
+ export type AssistantRunsRecordAssistantRunError = AssistantRunsRecordAssistantRunErrors[keyof AssistantRunsRecordAssistantRunErrors];
4941
+ export type AssistantRunsRecordAssistantRunResponses = {
4942
+ /**
4943
+ * Success
4944
+ */
4945
+ 201: {
4946
+ code: number;
4947
+ data: {
4948
+ id: string;
4949
+ } | null;
4950
+ error: {
4951
+ code: string;
4952
+ details?: unknown | null;
4953
+ message: string;
4954
+ rowErrors?: Array<{
4955
+ code: string;
4956
+ message: string;
4957
+ path: Array<string | number>;
4958
+ }> | null;
4959
+ } | null;
4960
+ pagination: {
4961
+ limit: number;
4962
+ page: number;
4963
+ total: number;
4964
+ totalPages: number;
4965
+ } | null;
4966
+ sdkBehavior?: {
4967
+ flags: {
4968
+ [key: string]: unknown;
4969
+ };
4970
+ v: number;
4971
+ } | null;
4972
+ success: boolean;
4973
+ };
4974
+ };
4975
+ export type AssistantRunsRecordAssistantRunResponse = AssistantRunsRecordAssistantRunResponses[keyof AssistantRunsRecordAssistantRunResponses];
4526
4976
  export type OrgAuditListOrgAuditEventsData = {
4527
4977
  body?: never;
4528
4978
  path: {
@@ -4609,7 +5059,7 @@ export type OrgAuditListOrgAuditEventsResponses = {
4609
5059
  organizationId: string | null;
4610
5060
  reason: string | null;
4611
5061
  resourceId: string;
4612
- resourceType: 'role' | 'organization' | 'organization_invitation' | 'workspace' | 'platform_setting' | 'api_key';
5062
+ resourceType: 'role' | 'organization' | 'organization_invitation' | 'workspace' | 'platform_setting' | 'api_key' | 'assistant_run';
4613
5063
  scope: 'organization' | 'system';
4614
5064
  workspaceId: string | null;
4615
5065
  }>;
@@ -7851,20 +8301,28 @@ export type OrganizationsUpsertProjectMemberForOrgResponses = {
7851
8301
  };
7852
8302
  };
7853
8303
  export type OrganizationsUpsertProjectMemberForOrgResponse = OrganizationsUpsertProjectMemberForOrgResponses[keyof OrganizationsUpsertProjectMemberForOrgResponses];
7854
- export type RbacIntrospectEffectivePermissionsData = {
8304
+ export type OrgPromptsListOrgPromptsData = {
7855
8305
  body?: never;
7856
8306
  path: {
7857
8307
  orgId: string;
7858
8308
  };
7859
- query: {
7860
- userId: string;
7861
- organizationId?: string | null;
7862
- workspaceId?: string | null;
7863
- projectId?: string | null;
8309
+ query?: {
8310
+ /**
8311
+ * `skill`, the only kind listed org-wide (and the default when omitted).
8312
+ */
8313
+ kind?: 'skill' | null;
8314
+ /**
8315
+ * Case-insensitive substring of the skill's name or slug. Matched as a bound parameter, with `%`, `_` and `\` taken literally.
8316
+ */
8317
+ query?: string | null;
8318
+ /**
8319
+ * At most this many rows across the org (default 20, max 50).
8320
+ */
8321
+ limit?: number | null;
7864
8322
  };
7865
- url: '/v1/orgs/{orgId}/rbac/effective';
8323
+ url: '/v1/orgs/{orgId}/prompts';
7866
8324
  };
7867
- export type RbacIntrospectEffectivePermissionsErrors = {
8325
+ export type OrgPromptsListOrgPromptsErrors = {
7868
8326
  /**
7869
8327
  * BadRequestError
7870
8328
  */
@@ -7914,42 +8372,14 @@ export type RbacIntrospectEffectivePermissionsErrors = {
7914
8372
  */
7915
8373
  503: ServiceUnavailableError;
7916
8374
  };
7917
- export type RbacIntrospectEffectivePermissionsError = RbacIntrospectEffectivePermissionsErrors[keyof RbacIntrospectEffectivePermissionsErrors];
7918
- export type RbacIntrospectEffectivePermissionsResponses = {
8375
+ export type OrgPromptsListOrgPromptsError = OrgPromptsListOrgPromptsErrors[keyof OrgPromptsListOrgPromptsErrors];
8376
+ export type OrgPromptsListOrgPromptsResponses = {
7919
8377
  /**
7920
8378
  * Success
7921
8379
  */
7922
8380
  200: {
7923
8381
  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;
7952
- } | null;
8382
+ data: OrgPromptsResponse | null;
7953
8383
  error: {
7954
8384
  code: string;
7955
8385
  details?: unknown | null;
@@ -7975,16 +8405,21 @@ export type RbacIntrospectEffectivePermissionsResponses = {
7975
8405
  success: boolean;
7976
8406
  };
7977
8407
  };
7978
- export type RbacIntrospectEffectivePermissionsResponse = RbacIntrospectEffectivePermissionsResponses[keyof RbacIntrospectEffectivePermissionsResponses];
7979
- export type RbacGetSelfEffectivePermissionsData = {
8408
+ export type OrgPromptsListOrgPromptsResponse = OrgPromptsListOrgPromptsResponses[keyof OrgPromptsListOrgPromptsResponses];
8409
+ export type RbacIntrospectEffectivePermissionsData = {
7980
8410
  body?: never;
7981
8411
  path: {
7982
8412
  orgId: string;
7983
8413
  };
7984
- query?: never;
7985
- url: '/v1/orgs/{orgId}/rbac/effective-self';
8414
+ query: {
8415
+ userId: string;
8416
+ organizationId?: string | null;
8417
+ workspaceId?: string | null;
8418
+ projectId?: string | null;
8419
+ };
8420
+ url: '/v1/orgs/{orgId}/rbac/effective';
7986
8421
  };
7987
- export type RbacGetSelfEffectivePermissionsErrors = {
8422
+ export type RbacIntrospectEffectivePermissionsErrors = {
7988
8423
  /**
7989
8424
  * BadRequestError
7990
8425
  */
@@ -8034,8 +8469,8 @@ export type RbacGetSelfEffectivePermissionsErrors = {
8034
8469
  */
8035
8470
  503: ServiceUnavailableError;
8036
8471
  };
8037
- export type RbacGetSelfEffectivePermissionsError = RbacGetSelfEffectivePermissionsErrors[keyof RbacGetSelfEffectivePermissionsErrors];
8038
- export type RbacGetSelfEffectivePermissionsResponses = {
8472
+ export type RbacIntrospectEffectivePermissionsError = RbacIntrospectEffectivePermissionsErrors[keyof RbacIntrospectEffectivePermissionsErrors];
8473
+ export type RbacIntrospectEffectivePermissionsResponses = {
8039
8474
  /**
8040
8475
  * Success
8041
8476
  */
@@ -8095,23 +8530,16 @@ export type RbacGetSelfEffectivePermissionsResponses = {
8095
8530
  success: boolean;
8096
8531
  };
8097
8532
  };
8098
- export type RbacGetSelfEffectivePermissionsResponse = RbacGetSelfEffectivePermissionsResponses[keyof RbacGetSelfEffectivePermissionsResponses];
8099
- export type RbacListRolesData = {
8533
+ export type RbacIntrospectEffectivePermissionsResponse = RbacIntrospectEffectivePermissionsResponses[keyof RbacIntrospectEffectivePermissionsResponses];
8534
+ export type RbacGetSelfEffectivePermissionsData = {
8100
8535
  body?: never;
8101
8536
  path: {
8102
8537
  orgId: string;
8103
8538
  };
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';
8539
+ query?: never;
8540
+ url: '/v1/orgs/{orgId}/rbac/effective-self';
8113
8541
  };
8114
- export type RbacListRolesErrors = {
8542
+ export type RbacGetSelfEffectivePermissionsErrors = {
8115
8543
  /**
8116
8544
  * BadRequestError
8117
8545
  */
@@ -8161,7 +8589,134 @@ export type RbacListRolesErrors = {
8161
8589
  */
8162
8590
  503: ServiceUnavailableError;
8163
8591
  };
8164
- export type RbacListRolesError = RbacListRolesErrors[keyof RbacListRolesErrors];
8592
+ export type RbacGetSelfEffectivePermissionsError = RbacGetSelfEffectivePermissionsErrors[keyof RbacGetSelfEffectivePermissionsErrors];
8593
+ export type RbacGetSelfEffectivePermissionsResponses = {
8594
+ /**
8595
+ * Success
8596
+ */
8597
+ 200: {
8598
+ code: number;
8599
+ data: {
8600
+ allowed: Array<string>;
8601
+ denied: Array<string>;
8602
+ isSuperAdmin: boolean;
8603
+ organizationRoleId: string | null;
8604
+ projectGrants: {
8605
+ [key: string]: {
8606
+ allowed: Array<string>;
8607
+ denied: Array<string>;
8608
+ roleId: string | null;
8609
+ };
8610
+ };
8611
+ projectRoleId: string | null;
8612
+ scope: {
8613
+ organizationId?: string | null;
8614
+ projectId?: string | null;
8615
+ workspaceId?: string | null;
8616
+ };
8617
+ systemRoleIds: Array<string>;
8618
+ userId: string;
8619
+ workspaceGrants: {
8620
+ [key: string]: {
8621
+ allowed: Array<string>;
8622
+ denied: Array<string>;
8623
+ roleId: string | null;
8624
+ };
8625
+ };
8626
+ workspaceRoleId: string | null;
8627
+ } | null;
8628
+ error: {
8629
+ code: string;
8630
+ details?: unknown | null;
8631
+ message: string;
8632
+ rowErrors?: Array<{
8633
+ code: string;
8634
+ message: string;
8635
+ path: Array<string | number>;
8636
+ }> | null;
8637
+ } | null;
8638
+ pagination: {
8639
+ limit: number;
8640
+ page: number;
8641
+ total: number;
8642
+ totalPages: number;
8643
+ } | null;
8644
+ sdkBehavior?: {
8645
+ flags: {
8646
+ [key: string]: unknown;
8647
+ };
8648
+ v: number;
8649
+ } | null;
8650
+ success: boolean;
8651
+ };
8652
+ };
8653
+ export type RbacGetSelfEffectivePermissionsResponse = RbacGetSelfEffectivePermissionsResponses[keyof RbacGetSelfEffectivePermissionsResponses];
8654
+ export type RbacListRolesData = {
8655
+ body?: never;
8656
+ path: {
8657
+ orgId: string;
8658
+ };
8659
+ query?: {
8660
+ page?: number | null;
8661
+ limit?: number | null;
8662
+ search?: string | null;
8663
+ sortDir?: 'asc' | 'desc' | null;
8664
+ sortBy?: 'createdAt' | 'updatedAt' | 'name' | 'slug' | null;
8665
+ scopeType?: 'ORGANIZATION' | 'WORKSPACE' | 'PROJECT' | null;
8666
+ };
8667
+ url: '/v1/orgs/{orgId}/roles';
8668
+ };
8669
+ export type RbacListRolesErrors = {
8670
+ /**
8671
+ * BadRequestError
8672
+ */
8673
+ 400: BadRequestError;
8674
+ /**
8675
+ * UnauthorizedError
8676
+ */
8677
+ 401: UnauthorizedError;
8678
+ /**
8679
+ * ForbiddenError
8680
+ */
8681
+ 403: ForbiddenError;
8682
+ /**
8683
+ * NotFoundError
8684
+ */
8685
+ 404: NotFoundError;
8686
+ /**
8687
+ * ConflictError
8688
+ */
8689
+ 409: ConflictError;
8690
+ /**
8691
+ * GoneError
8692
+ */
8693
+ 410: GoneError;
8694
+ /**
8695
+ * ContentTooLargeError
8696
+ */
8697
+ 413: ContentTooLargeError;
8698
+ /**
8699
+ * MisdirectedRequestError
8700
+ */
8701
+ 421: MisdirectedRequestError;
8702
+ /**
8703
+ * UnprocessableEntityError
8704
+ */
8705
+ 422: UnprocessableEntityError;
8706
+ /**
8707
+ * TooManyRequestsError
8708
+ */
8709
+ 429: TooManyRequestsError;
8710
+ /**
8711
+ * InternalServerError
8712
+ */
8713
+ 500: InternalServerError;
8714
+ /**
8715
+ * ServiceUnavailableError
8716
+ */
8717
+ 503: ServiceUnavailableError;
8718
+ };
8719
+ export type RbacListRolesError = RbacListRolesErrors[keyof RbacListRolesErrors];
8165
8720
  export type RbacListRolesResponses = {
8166
8721
  /**
8167
8722
  * Success
@@ -8613,6 +9168,426 @@ export type RbacSetRolePermissionsResponses = {
8613
9168
  };
8614
9169
  };
8615
9170
  export type RbacSetRolePermissionsResponse = RbacSetRolePermissionsResponses[keyof RbacSetRolePermissionsResponses];
9171
+ export type UsageListTopTracesData = {
9172
+ body?: never;
9173
+ path: {
9174
+ orgId: string;
9175
+ };
9176
+ query: {
9177
+ from?: string | null;
9178
+ to?: string | null;
9179
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
9180
+ n?: number | null;
9181
+ timezone?: string | null;
9182
+ /**
9183
+ * `latency` ranks by duration, `cost` by the API-price equivalent (so subscription traffic ranks by what it consumed), `tokens` by `totalTokens` (input + output).
9184
+ */
9185
+ sort: 'latency' | 'cost' | 'tokens';
9186
+ principalId?: string | null;
9187
+ projectId?: string | null;
9188
+ vendor?: string | null;
9189
+ provider?: string | null;
9190
+ model?: string | null;
9191
+ status?: 'ok' | 'error' | 'timeout' | null;
9192
+ limit?: number | null;
9193
+ };
9194
+ url: '/v1/orgs/{orgId}/traces/top';
9195
+ };
9196
+ export type UsageListTopTracesErrors = {
9197
+ /**
9198
+ * BadRequestError
9199
+ */
9200
+ 400: BadRequestError;
9201
+ /**
9202
+ * UnauthorizedError
9203
+ */
9204
+ 401: UnauthorizedError;
9205
+ /**
9206
+ * ForbiddenError
9207
+ */
9208
+ 403: ForbiddenError;
9209
+ /**
9210
+ * NotFoundError
9211
+ */
9212
+ 404: NotFoundError;
9213
+ /**
9214
+ * ConflictError
9215
+ */
9216
+ 409: ConflictError;
9217
+ /**
9218
+ * GoneError
9219
+ */
9220
+ 410: GoneError;
9221
+ /**
9222
+ * ContentTooLargeError
9223
+ */
9224
+ 413: ContentTooLargeError;
9225
+ /**
9226
+ * MisdirectedRequestError
9227
+ */
9228
+ 421: MisdirectedRequestError;
9229
+ /**
9230
+ * UnprocessableEntityError
9231
+ */
9232
+ 422: UnprocessableEntityError;
9233
+ /**
9234
+ * TooManyRequestsError
9235
+ */
9236
+ 429: TooManyRequestsError;
9237
+ /**
9238
+ * InternalServerError
9239
+ */
9240
+ 500: InternalServerError;
9241
+ /**
9242
+ * ServiceUnavailableError
9243
+ */
9244
+ 503: ServiceUnavailableError;
9245
+ };
9246
+ export type UsageListTopTracesError = UsageListTopTracesErrors[keyof UsageListTopTracesErrors];
9247
+ export type UsageListTopTracesResponses = {
9248
+ /**
9249
+ * Success
9250
+ */
9251
+ 200: {
9252
+ code: number;
9253
+ data: TopTracesResponse | null;
9254
+ error: {
9255
+ code: string;
9256
+ details?: unknown | null;
9257
+ message: string;
9258
+ rowErrors?: Array<{
9259
+ code: string;
9260
+ message: string;
9261
+ path: Array<string | number>;
9262
+ }> | null;
9263
+ } | null;
9264
+ pagination: {
9265
+ limit: number;
9266
+ page: number;
9267
+ total: number;
9268
+ totalPages: number;
9269
+ } | null;
9270
+ sdkBehavior?: {
9271
+ flags: {
9272
+ [key: string]: unknown;
9273
+ };
9274
+ v: number;
9275
+ } | null;
9276
+ success: boolean;
9277
+ };
9278
+ };
9279
+ export type UsageListTopTracesResponse = UsageListTopTracesResponses[keyof UsageListTopTracesResponses];
9280
+ export type UsageGetUsageCostsData = {
9281
+ body?: never;
9282
+ path: {
9283
+ orgId: string;
9284
+ };
9285
+ query?: {
9286
+ from?: string | null;
9287
+ to?: string | null;
9288
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
9289
+ n?: number | null;
9290
+ timezone?: string | null;
9291
+ groupBy?: 'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode' | Array<'principal' | 'vendor' | 'provider' | 'model' | 'project' | 'billingMode'> | null;
9292
+ principalId?: string | null;
9293
+ vendor?: string | null;
9294
+ provider?: string | null;
9295
+ model?: string | null;
9296
+ projectId?: string | null;
9297
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
9298
+ limit?: number | null;
9299
+ };
9300
+ url: '/v1/orgs/{orgId}/usage/costs';
9301
+ };
9302
+ export type UsageGetUsageCostsErrors = {
9303
+ /**
9304
+ * BadRequestError
9305
+ */
9306
+ 400: BadRequestError;
9307
+ /**
9308
+ * UnauthorizedError
9309
+ */
9310
+ 401: UnauthorizedError;
9311
+ /**
9312
+ * ForbiddenError
9313
+ */
9314
+ 403: ForbiddenError;
9315
+ /**
9316
+ * NotFoundError
9317
+ */
9318
+ 404: NotFoundError;
9319
+ /**
9320
+ * ConflictError
9321
+ */
9322
+ 409: ConflictError;
9323
+ /**
9324
+ * GoneError
9325
+ */
9326
+ 410: GoneError;
9327
+ /**
9328
+ * ContentTooLargeError
9329
+ */
9330
+ 413: ContentTooLargeError;
9331
+ /**
9332
+ * MisdirectedRequestError
9333
+ */
9334
+ 421: MisdirectedRequestError;
9335
+ /**
9336
+ * UnprocessableEntityError
9337
+ */
9338
+ 422: UnprocessableEntityError;
9339
+ /**
9340
+ * TooManyRequestsError
9341
+ */
9342
+ 429: TooManyRequestsError;
9343
+ /**
9344
+ * InternalServerError
9345
+ */
9346
+ 500: InternalServerError;
9347
+ /**
9348
+ * ServiceUnavailableError
9349
+ */
9350
+ 503: ServiceUnavailableError;
9351
+ };
9352
+ export type UsageGetUsageCostsError = UsageGetUsageCostsErrors[keyof UsageGetUsageCostsErrors];
9353
+ export type UsageGetUsageCostsResponses = {
9354
+ /**
9355
+ * Success
9356
+ */
9357
+ 200: {
9358
+ code: number;
9359
+ data: UsageCostsResponse | null;
9360
+ error: {
9361
+ code: string;
9362
+ details?: unknown | null;
9363
+ message: string;
9364
+ rowErrors?: Array<{
9365
+ code: string;
9366
+ message: string;
9367
+ path: Array<string | number>;
9368
+ }> | null;
9369
+ } | null;
9370
+ pagination: {
9371
+ limit: number;
9372
+ page: number;
9373
+ total: number;
9374
+ totalPages: number;
9375
+ } | null;
9376
+ sdkBehavior?: {
9377
+ flags: {
9378
+ [key: string]: unknown;
9379
+ };
9380
+ v: number;
9381
+ } | null;
9382
+ success: boolean;
9383
+ };
9384
+ };
9385
+ export type UsageGetUsageCostsResponse = UsageGetUsageCostsResponses[keyof UsageGetUsageCostsResponses];
9386
+ export type UsageListUsagePrincipalsData = {
9387
+ body?: never;
9388
+ path: {
9389
+ orgId: string;
9390
+ };
9391
+ query?: {
9392
+ query?: string | null;
9393
+ email?: string | null;
9394
+ };
9395
+ url: '/v1/orgs/{orgId}/usage/principals';
9396
+ };
9397
+ export type UsageListUsagePrincipalsErrors = {
9398
+ /**
9399
+ * BadRequestError
9400
+ */
9401
+ 400: BadRequestError;
9402
+ /**
9403
+ * UnauthorizedError
9404
+ */
9405
+ 401: UnauthorizedError;
9406
+ /**
9407
+ * ForbiddenError
9408
+ */
9409
+ 403: ForbiddenError;
9410
+ /**
9411
+ * NotFoundError
9412
+ */
9413
+ 404: NotFoundError;
9414
+ /**
9415
+ * ConflictError
9416
+ */
9417
+ 409: ConflictError;
9418
+ /**
9419
+ * GoneError
9420
+ */
9421
+ 410: GoneError;
9422
+ /**
9423
+ * ContentTooLargeError
9424
+ */
9425
+ 413: ContentTooLargeError;
9426
+ /**
9427
+ * MisdirectedRequestError
9428
+ */
9429
+ 421: MisdirectedRequestError;
9430
+ /**
9431
+ * UnprocessableEntityError
9432
+ */
9433
+ 422: UnprocessableEntityError;
9434
+ /**
9435
+ * TooManyRequestsError
9436
+ */
9437
+ 429: TooManyRequestsError;
9438
+ /**
9439
+ * InternalServerError
9440
+ */
9441
+ 500: InternalServerError;
9442
+ /**
9443
+ * ServiceUnavailableError
9444
+ */
9445
+ 503: ServiceUnavailableError;
9446
+ };
9447
+ export type UsageListUsagePrincipalsError = UsageListUsagePrincipalsErrors[keyof UsageListUsagePrincipalsErrors];
9448
+ export type UsageListUsagePrincipalsResponses = {
9449
+ /**
9450
+ * Success
9451
+ */
9452
+ 200: {
9453
+ code: number;
9454
+ data: UsagePrincipalsResponse | null;
9455
+ error: {
9456
+ code: string;
9457
+ details?: unknown | null;
9458
+ message: string;
9459
+ rowErrors?: Array<{
9460
+ code: string;
9461
+ message: string;
9462
+ path: Array<string | number>;
9463
+ }> | null;
9464
+ } | null;
9465
+ pagination: {
9466
+ limit: number;
9467
+ page: number;
9468
+ total: number;
9469
+ totalPages: number;
9470
+ } | null;
9471
+ sdkBehavior?: {
9472
+ flags: {
9473
+ [key: string]: unknown;
9474
+ };
9475
+ v: number;
9476
+ } | null;
9477
+ success: boolean;
9478
+ };
9479
+ };
9480
+ export type UsageListUsagePrincipalsResponse = UsageListUsagePrincipalsResponses[keyof UsageListUsagePrincipalsResponses];
9481
+ export type UsageListUsageSessionsData = {
9482
+ body?: never;
9483
+ path: {
9484
+ orgId: string;
9485
+ };
9486
+ query?: {
9487
+ from?: string | null;
9488
+ to?: string | null;
9489
+ preset?: 'last_n_hours' | 'last_n_days' | 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | null;
9490
+ n?: number | null;
9491
+ timezone?: string | null;
9492
+ /**
9493
+ * `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.
9494
+ */
9495
+ groupBy?: 'session' | 'run' | null;
9496
+ /**
9497
+ * 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.
9498
+ */
9499
+ principalId?: string | null;
9500
+ projectId?: string | null;
9501
+ billingMode?: 'subscription' | 'api' | 'unknown' | null;
9502
+ cursor?: string | null;
9503
+ limit?: number | null;
9504
+ };
9505
+ url: '/v1/orgs/{orgId}/usage/sessions';
9506
+ };
9507
+ export type UsageListUsageSessionsErrors = {
9508
+ /**
9509
+ * BadRequestError
9510
+ */
9511
+ 400: BadRequestError;
9512
+ /**
9513
+ * UnauthorizedError
9514
+ */
9515
+ 401: UnauthorizedError;
9516
+ /**
9517
+ * ForbiddenError
9518
+ */
9519
+ 403: ForbiddenError;
9520
+ /**
9521
+ * NotFoundError
9522
+ */
9523
+ 404: NotFoundError;
9524
+ /**
9525
+ * ConflictError
9526
+ */
9527
+ 409: ConflictError;
9528
+ /**
9529
+ * GoneError
9530
+ */
9531
+ 410: GoneError;
9532
+ /**
9533
+ * ContentTooLargeError
9534
+ */
9535
+ 413: ContentTooLargeError;
9536
+ /**
9537
+ * MisdirectedRequestError
9538
+ */
9539
+ 421: MisdirectedRequestError;
9540
+ /**
9541
+ * UnprocessableEntityError
9542
+ */
9543
+ 422: UnprocessableEntityError;
9544
+ /**
9545
+ * TooManyRequestsError
9546
+ */
9547
+ 429: TooManyRequestsError;
9548
+ /**
9549
+ * InternalServerError
9550
+ */
9551
+ 500: InternalServerError;
9552
+ /**
9553
+ * ServiceUnavailableError
9554
+ */
9555
+ 503: ServiceUnavailableError;
9556
+ };
9557
+ export type UsageListUsageSessionsError = UsageListUsageSessionsErrors[keyof UsageListUsageSessionsErrors];
9558
+ export type UsageListUsageSessionsResponses = {
9559
+ /**
9560
+ * Success
9561
+ */
9562
+ 200: {
9563
+ code: number;
9564
+ data: UsageSessionsResponse | null;
9565
+ error: {
9566
+ code: string;
9567
+ details?: unknown | null;
9568
+ message: string;
9569
+ rowErrors?: Array<{
9570
+ code: string;
9571
+ message: string;
9572
+ path: Array<string | number>;
9573
+ }> | null;
9574
+ } | null;
9575
+ pagination: {
9576
+ limit: number;
9577
+ page: number;
9578
+ total: number;
9579
+ totalPages: number;
9580
+ } | null;
9581
+ sdkBehavior?: {
9582
+ flags: {
9583
+ [key: string]: unknown;
9584
+ };
9585
+ v: number;
9586
+ } | null;
9587
+ success: boolean;
9588
+ };
9589
+ };
9590
+ export type UsageListUsageSessionsResponse = UsageListUsageSessionsResponses[keyof UsageListUsageSessionsResponses];
8616
9591
  export type RbacSetUserPermissionOverridesData = {
8617
9592
  body: {
8618
9593
  overrides: Array<{
@@ -23751,7 +24726,7 @@ export type TracesListTracesData = {
23751
24726
  query?: {
23752
24727
  page?: string | null;
23753
24728
  limit?: string | null;
23754
- sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | null;
24729
+ sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | 'totalTokens' | 'apiEquivalentUsd' | null;
23755
24730
  order?: 'asc' | 'desc' | null;
23756
24731
  status?: 'ok' | 'error' | 'timeout' | null;
23757
24732
  provider?: string | Array<string> | null;
@@ -23762,6 +24737,8 @@ export type TracesListTracesData = {
23762
24737
  vcsHeadName?: string | null;
23763
24738
  vcsHeadRevision?: string | null;
23764
24739
  billingMode?: 'subscription' | 'api' | 'unknown' | Array<'subscription' | 'api' | 'unknown'> | null;
24740
+ principalId?: string | null;
24741
+ vendor?: string | null;
23765
24742
  minTokens?: string | null;
23766
24743
  maxTokens?: string | null;
23767
24744
  minCost?: string | null;
@@ -24068,7 +25045,7 @@ export type TracesListTracePromptFacetsData = {
24068
25045
  query?: {
24069
25046
  page?: string | null;
24070
25047
  limit?: string | null;
24071
- sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | null;
25048
+ sort?: 'startTime' | 'durationMs' | 'inputTokens' | 'outputTokens' | 'model' | 'provider' | 'toolCalls' | 'costUsd' | 'totalTokens' | 'apiEquivalentUsd' | null;
24072
25049
  order?: 'asc' | 'desc' | null;
24073
25050
  status?: 'ok' | 'error' | 'timeout' | null;
24074
25051
  provider?: string | Array<string> | null;
@@ -24079,6 +25056,8 @@ export type TracesListTracePromptFacetsData = {
24079
25056
  vcsHeadName?: string | null;
24080
25057
  vcsHeadRevision?: string | null;
24081
25058
  billingMode?: 'subscription' | 'api' | 'unknown' | Array<'subscription' | 'api' | 'unknown'> | null;
25059
+ principalId?: string | null;
25060
+ vendor?: string | null;
24082
25061
  minTokens?: string | null;
24083
25062
  maxTokens?: string | null;
24084
25063
  minCost?: string | null;