@flashbacktech/tsclient 0.4.65 → 0.4.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +29 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -2
- package/dist/index.d.ts +69 -2
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -498,6 +498,52 @@ interface AdjustOrgCreditsResult {
|
|
|
498
498
|
description?: string;
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
+
/** Sortable columns on the platform-admin org summary. */
|
|
502
|
+
type AdminOrgSummarySort = 'name' | 'users' | 'projects' | 'sandboxes' | 'billed' | 'purchases' | 'balance';
|
|
503
|
+
/** Query for GET /admin/orgs/summary (platform-admin only). */
|
|
504
|
+
interface AdminOrgSummaryQuery {
|
|
505
|
+
/** Case-insensitive name substring; empty/omitted returns all orgs. */
|
|
506
|
+
q?: string;
|
|
507
|
+
/** Page size (default 25, max 200). */
|
|
508
|
+
limit?: number;
|
|
509
|
+
/** Page offset (default 0). */
|
|
510
|
+
offset?: number;
|
|
511
|
+
sort?: AdminOrgSummarySort;
|
|
512
|
+
order?: 'asc' | 'desc';
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* One organization's row on the platform-admin summary screen. Counts and
|
|
516
|
+
* billing come from the backend DB; usage7d/30d are stitched in from the
|
|
517
|
+
* cloud-agent usage service (zero when that relay is unavailable). All money
|
|
518
|
+
* fields are USD micros.
|
|
519
|
+
*/
|
|
520
|
+
interface AdminOrgSummaryRow {
|
|
521
|
+
orgId: string;
|
|
522
|
+
orgName: string;
|
|
523
|
+
isBusiness: boolean;
|
|
524
|
+
isReseller: boolean;
|
|
525
|
+
userCount: number;
|
|
526
|
+
projectCount: number;
|
|
527
|
+
sandboxCount: number;
|
|
528
|
+
/** Total metered LLM/agent cost (byok+platform+agent), trailing windows. */
|
|
529
|
+
usage7dMicros: number;
|
|
530
|
+
usage30dMicros: number;
|
|
531
|
+
/** Billed-to-balance (credit debits), trailing windows. */
|
|
532
|
+
billed7dMicros: number;
|
|
533
|
+
billed30dMicros: number;
|
|
534
|
+
/** Lifetime COMPLETED payments (subscriptions + credit packs). */
|
|
535
|
+
purchasesMicros: number;
|
|
536
|
+
/** Current standing balance (permanent + subscription buckets). */
|
|
537
|
+
creditBalanceMicros: number;
|
|
538
|
+
}
|
|
539
|
+
/** Paged response for GET /admin/orgs/summary. */
|
|
540
|
+
interface AdminOrgSummaryResponse {
|
|
541
|
+
rows: AdminOrgSummaryRow[];
|
|
542
|
+
/** Total orgs matching the search (for pagination), across all pages. */
|
|
543
|
+
total: number;
|
|
544
|
+
limit: number;
|
|
545
|
+
offset: number;
|
|
546
|
+
}
|
|
501
547
|
|
|
502
548
|
declare class OrganizationClient {
|
|
503
549
|
private readonly http;
|
|
@@ -549,6 +595,14 @@ declare class OrganizationClient {
|
|
|
549
595
|
* can show "N more — refine your search". Returns 403 unless platform admin.
|
|
550
596
|
*/
|
|
551
597
|
searchOrgs(q?: string, limit?: number): Promise<OrgSearchResult>;
|
|
598
|
+
/**
|
|
599
|
+
* Platform-admin only: one page of the service-wide org summary — per-org
|
|
600
|
+
* user/project/sandbox counts, trailing 7d/30d metered usage, billed-to-
|
|
601
|
+
* balance, lifetime purchases and current credit balance — searchable by
|
|
602
|
+
* name and pageable. Backs the admin Summary screen. Returns 403 unless the
|
|
603
|
+
* caller's home org is the configured ADMIN_ORGANIZATION.
|
|
604
|
+
*/
|
|
605
|
+
adminOrgSummary(query?: AdminOrgSummaryQuery): Promise<AdminOrgSummaryResponse>;
|
|
552
606
|
/**
|
|
553
607
|
* Platform-admin only: provision a new organization + founding owner and
|
|
554
608
|
* email the owner an invite link. The invite-only counterpart to public
|
|
@@ -2666,6 +2720,15 @@ interface PlatformSettings {
|
|
|
2666
2720
|
freeTierCreditsIndividualMicros: number;
|
|
2667
2721
|
updatedAt: string;
|
|
2668
2722
|
updatedBy?: string | null;
|
|
2723
|
+
/** Display name of the updater (resolved server-side from updatedBy). */
|
|
2724
|
+
updatedByName?: string | null;
|
|
2725
|
+
}
|
|
2726
|
+
/** Models the aigateway currently exposes — used to validate selection/pricing. */
|
|
2727
|
+
interface AvailableModels {
|
|
2728
|
+
/** Flat, de-duplicated, sorted list of every reachable model id. */
|
|
2729
|
+
models: string[];
|
|
2730
|
+
/** Same models grouped by provider (OPENAI/ANTHROPIC/GEMINI/BEDROCK/…). */
|
|
2731
|
+
byProvider: Record<string, string[]>;
|
|
2669
2732
|
}
|
|
2670
2733
|
/** Body for PUT /admin/platform-settings. */
|
|
2671
2734
|
interface UpdatePlatformSettingsRequest {
|
|
@@ -2714,6 +2777,8 @@ declare class PlatformAdminClient {
|
|
|
2714
2777
|
getPlatformSettings(): Promise<PlatformSettings>;
|
|
2715
2778
|
/** Update the global settings. */
|
|
2716
2779
|
updatePlatformSettings(body: UpdatePlatformSettingsRequest): Promise<PlatformSettings>;
|
|
2780
|
+
/** Models the aigateway currently exposes (for validating selection/pricing). */
|
|
2781
|
+
listAvailableModels(): Promise<AvailableModels>;
|
|
2717
2782
|
/** Current model selection (provider priority + per-provider/role models). */
|
|
2718
2783
|
getModelSelection(): Promise<ModelSelection>;
|
|
2719
2784
|
/** Full replace of the model selection. Returns the fresh selection. */
|
|
@@ -2722,8 +2787,10 @@ declare class PlatformAdminClient {
|
|
|
2722
2787
|
patchModelSelection(body: PatchModelSelectionRequest): Promise<ModelSelection>;
|
|
2723
2788
|
/** All model_pricing rows. */
|
|
2724
2789
|
listModelPricing(): Promise<ModelPricingRow[]>;
|
|
2725
|
-
/** Upsert one model_pricing row. Returns the fresh list. */
|
|
2790
|
+
/** Upsert one model_pricing row (also used to add a new row). Returns the fresh list. */
|
|
2726
2791
|
putModelPricing(row: ModelPricingRow): Promise<ModelPricingRow[]>;
|
|
2792
|
+
/** Delete a model_pricing row by model id. Returns the fresh list. */
|
|
2793
|
+
deleteModelPricing(model: string): Promise<ModelPricingRow[]>;
|
|
2727
2794
|
}
|
|
2728
2795
|
|
|
2729
2796
|
type CloudAgentClientOptions = BaseClientOptions;
|
|
@@ -2770,4 +2837,4 @@ declare class NotImplementedError extends Error {
|
|
|
2770
2837
|
constructor(method: string);
|
|
2771
2838
|
}
|
|
2772
2839
|
|
|
2773
|
-
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
|
|
2840
|
+
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
|
package/dist/index.d.ts
CHANGED
|
@@ -498,6 +498,52 @@ interface AdjustOrgCreditsResult {
|
|
|
498
498
|
description?: string;
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
+
/** Sortable columns on the platform-admin org summary. */
|
|
502
|
+
type AdminOrgSummarySort = 'name' | 'users' | 'projects' | 'sandboxes' | 'billed' | 'purchases' | 'balance';
|
|
503
|
+
/** Query for GET /admin/orgs/summary (platform-admin only). */
|
|
504
|
+
interface AdminOrgSummaryQuery {
|
|
505
|
+
/** Case-insensitive name substring; empty/omitted returns all orgs. */
|
|
506
|
+
q?: string;
|
|
507
|
+
/** Page size (default 25, max 200). */
|
|
508
|
+
limit?: number;
|
|
509
|
+
/** Page offset (default 0). */
|
|
510
|
+
offset?: number;
|
|
511
|
+
sort?: AdminOrgSummarySort;
|
|
512
|
+
order?: 'asc' | 'desc';
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* One organization's row on the platform-admin summary screen. Counts and
|
|
516
|
+
* billing come from the backend DB; usage7d/30d are stitched in from the
|
|
517
|
+
* cloud-agent usage service (zero when that relay is unavailable). All money
|
|
518
|
+
* fields are USD micros.
|
|
519
|
+
*/
|
|
520
|
+
interface AdminOrgSummaryRow {
|
|
521
|
+
orgId: string;
|
|
522
|
+
orgName: string;
|
|
523
|
+
isBusiness: boolean;
|
|
524
|
+
isReseller: boolean;
|
|
525
|
+
userCount: number;
|
|
526
|
+
projectCount: number;
|
|
527
|
+
sandboxCount: number;
|
|
528
|
+
/** Total metered LLM/agent cost (byok+platform+agent), trailing windows. */
|
|
529
|
+
usage7dMicros: number;
|
|
530
|
+
usage30dMicros: number;
|
|
531
|
+
/** Billed-to-balance (credit debits), trailing windows. */
|
|
532
|
+
billed7dMicros: number;
|
|
533
|
+
billed30dMicros: number;
|
|
534
|
+
/** Lifetime COMPLETED payments (subscriptions + credit packs). */
|
|
535
|
+
purchasesMicros: number;
|
|
536
|
+
/** Current standing balance (permanent + subscription buckets). */
|
|
537
|
+
creditBalanceMicros: number;
|
|
538
|
+
}
|
|
539
|
+
/** Paged response for GET /admin/orgs/summary. */
|
|
540
|
+
interface AdminOrgSummaryResponse {
|
|
541
|
+
rows: AdminOrgSummaryRow[];
|
|
542
|
+
/** Total orgs matching the search (for pagination), across all pages. */
|
|
543
|
+
total: number;
|
|
544
|
+
limit: number;
|
|
545
|
+
offset: number;
|
|
546
|
+
}
|
|
501
547
|
|
|
502
548
|
declare class OrganizationClient {
|
|
503
549
|
private readonly http;
|
|
@@ -549,6 +595,14 @@ declare class OrganizationClient {
|
|
|
549
595
|
* can show "N more — refine your search". Returns 403 unless platform admin.
|
|
550
596
|
*/
|
|
551
597
|
searchOrgs(q?: string, limit?: number): Promise<OrgSearchResult>;
|
|
598
|
+
/**
|
|
599
|
+
* Platform-admin only: one page of the service-wide org summary — per-org
|
|
600
|
+
* user/project/sandbox counts, trailing 7d/30d metered usage, billed-to-
|
|
601
|
+
* balance, lifetime purchases and current credit balance — searchable by
|
|
602
|
+
* name and pageable. Backs the admin Summary screen. Returns 403 unless the
|
|
603
|
+
* caller's home org is the configured ADMIN_ORGANIZATION.
|
|
604
|
+
*/
|
|
605
|
+
adminOrgSummary(query?: AdminOrgSummaryQuery): Promise<AdminOrgSummaryResponse>;
|
|
552
606
|
/**
|
|
553
607
|
* Platform-admin only: provision a new organization + founding owner and
|
|
554
608
|
* email the owner an invite link. The invite-only counterpart to public
|
|
@@ -2666,6 +2720,15 @@ interface PlatformSettings {
|
|
|
2666
2720
|
freeTierCreditsIndividualMicros: number;
|
|
2667
2721
|
updatedAt: string;
|
|
2668
2722
|
updatedBy?: string | null;
|
|
2723
|
+
/** Display name of the updater (resolved server-side from updatedBy). */
|
|
2724
|
+
updatedByName?: string | null;
|
|
2725
|
+
}
|
|
2726
|
+
/** Models the aigateway currently exposes — used to validate selection/pricing. */
|
|
2727
|
+
interface AvailableModels {
|
|
2728
|
+
/** Flat, de-duplicated, sorted list of every reachable model id. */
|
|
2729
|
+
models: string[];
|
|
2730
|
+
/** Same models grouped by provider (OPENAI/ANTHROPIC/GEMINI/BEDROCK/…). */
|
|
2731
|
+
byProvider: Record<string, string[]>;
|
|
2669
2732
|
}
|
|
2670
2733
|
/** Body for PUT /admin/platform-settings. */
|
|
2671
2734
|
interface UpdatePlatformSettingsRequest {
|
|
@@ -2714,6 +2777,8 @@ declare class PlatformAdminClient {
|
|
|
2714
2777
|
getPlatformSettings(): Promise<PlatformSettings>;
|
|
2715
2778
|
/** Update the global settings. */
|
|
2716
2779
|
updatePlatformSettings(body: UpdatePlatformSettingsRequest): Promise<PlatformSettings>;
|
|
2780
|
+
/** Models the aigateway currently exposes (for validating selection/pricing). */
|
|
2781
|
+
listAvailableModels(): Promise<AvailableModels>;
|
|
2717
2782
|
/** Current model selection (provider priority + per-provider/role models). */
|
|
2718
2783
|
getModelSelection(): Promise<ModelSelection>;
|
|
2719
2784
|
/** Full replace of the model selection. Returns the fresh selection. */
|
|
@@ -2722,8 +2787,10 @@ declare class PlatformAdminClient {
|
|
|
2722
2787
|
patchModelSelection(body: PatchModelSelectionRequest): Promise<ModelSelection>;
|
|
2723
2788
|
/** All model_pricing rows. */
|
|
2724
2789
|
listModelPricing(): Promise<ModelPricingRow[]>;
|
|
2725
|
-
/** Upsert one model_pricing row. Returns the fresh list. */
|
|
2790
|
+
/** Upsert one model_pricing row (also used to add a new row). Returns the fresh list. */
|
|
2726
2791
|
putModelPricing(row: ModelPricingRow): Promise<ModelPricingRow[]>;
|
|
2792
|
+
/** Delete a model_pricing row by model id. Returns the fresh list. */
|
|
2793
|
+
deleteModelPricing(model: string): Promise<ModelPricingRow[]>;
|
|
2727
2794
|
}
|
|
2728
2795
|
|
|
2729
2796
|
type CloudAgentClientOptions = BaseClientOptions;
|
|
@@ -2770,4 +2837,4 @@ declare class NotImplementedError extends Error {
|
|
|
2770
2837
|
constructor(method: string);
|
|
2771
2838
|
}
|
|
2772
2839
|
|
|
2773
|
-
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
|
|
2840
|
+
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
|
package/dist/index.js
CHANGED
|
@@ -319,6 +319,20 @@ var OrganizationClient = class {
|
|
|
319
319
|
});
|
|
320
320
|
return unwrapData(res);
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Platform-admin only: one page of the service-wide org summary — per-org
|
|
324
|
+
* user/project/sandbox counts, trailing 7d/30d metered usage, billed-to-
|
|
325
|
+
* balance, lifetime purchases and current credit balance — searchable by
|
|
326
|
+
* name and pageable. Backs the admin Summary screen. Returns 403 unless the
|
|
327
|
+
* caller's home org is the configured ADMIN_ORGANIZATION.
|
|
328
|
+
*/
|
|
329
|
+
async adminOrgSummary(query = {}) {
|
|
330
|
+
const res = await this.http.get(
|
|
331
|
+
"/admin/orgs/summary",
|
|
332
|
+
{ query }
|
|
333
|
+
);
|
|
334
|
+
return unwrapData(res);
|
|
335
|
+
}
|
|
322
336
|
/**
|
|
323
337
|
* Platform-admin only: provision a new organization + founding owner and
|
|
324
338
|
* email the owner an invite link. The invite-only counterpart to public
|
|
@@ -1469,6 +1483,13 @@ var PlatformAdminClient = class {
|
|
|
1469
1483
|
});
|
|
1470
1484
|
return unwrapData(res);
|
|
1471
1485
|
}
|
|
1486
|
+
/** Models the aigateway currently exposes (for validating selection/pricing). */
|
|
1487
|
+
async listAvailableModels() {
|
|
1488
|
+
const res = await this.http.get(
|
|
1489
|
+
"/admin/available-models"
|
|
1490
|
+
);
|
|
1491
|
+
return unwrapData(res);
|
|
1492
|
+
}
|
|
1472
1493
|
// --- Chat-model selection (bridged to cloud-agent) ---
|
|
1473
1494
|
/** Current model selection (provider priority + per-provider/role models). */
|
|
1474
1495
|
async getModelSelection() {
|
|
@@ -1495,7 +1516,7 @@ var PlatformAdminClient = class {
|
|
|
1495
1516
|
);
|
|
1496
1517
|
return unwrapData(res).pricing ?? [];
|
|
1497
1518
|
}
|
|
1498
|
-
/** Upsert one model_pricing row. Returns the fresh list. */
|
|
1519
|
+
/** Upsert one model_pricing row (also used to add a new row). Returns the fresh list. */
|
|
1499
1520
|
async putModelPricing(row) {
|
|
1500
1521
|
const res = await this.http.put(
|
|
1501
1522
|
"/admin/model-pricing",
|
|
@@ -1503,6 +1524,13 @@ var PlatformAdminClient = class {
|
|
|
1503
1524
|
);
|
|
1504
1525
|
return unwrapData(res).pricing ?? [];
|
|
1505
1526
|
}
|
|
1527
|
+
/** Delete a model_pricing row by model id. Returns the fresh list. */
|
|
1528
|
+
async deleteModelPricing(model) {
|
|
1529
|
+
const res = await this.http.delete(
|
|
1530
|
+
`/admin/model-pricing?model=${encodeURIComponent(model)}`
|
|
1531
|
+
);
|
|
1532
|
+
return unwrapData(res).pricing ?? [];
|
|
1533
|
+
}
|
|
1506
1534
|
};
|
|
1507
1535
|
|
|
1508
1536
|
// src/client.ts
|