@flashbacktech/tsclient 0.4.42 → 0.4.44
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 +35 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -1
- package/dist/index.d.ts +72 -1
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -365,6 +365,47 @@ interface SimpleOrgResponse {
|
|
|
365
365
|
message?: string;
|
|
366
366
|
data?: unknown;
|
|
367
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Platform-admin payload for adding a new member to an existing org.
|
|
370
|
+
* POST /orgs/:id/users — creates the user without a password and sends an
|
|
371
|
+
* invite email via the same TokenOrgInvite flow as the regular member invite.
|
|
372
|
+
*/
|
|
373
|
+
interface AddUserToOrgRequest {
|
|
374
|
+
email: string;
|
|
375
|
+
firstName: string;
|
|
376
|
+
lastName?: string;
|
|
377
|
+
/** Org role integer (e.g. OrgRoles.User). Defaults to the lowest non-owner role when omitted. */
|
|
378
|
+
orgRole?: number;
|
|
379
|
+
}
|
|
380
|
+
interface AddUserToOrgResult {
|
|
381
|
+
user: OrganizationUser;
|
|
382
|
+
}
|
|
383
|
+
/** Two-bucket credit balance for an org (USD micros, post-0019 schema). */
|
|
384
|
+
interface OrgCreditBalance {
|
|
385
|
+
permanentCreditMicros: number;
|
|
386
|
+
subscriptionCreditMicros: number;
|
|
387
|
+
/** ISO 8601 timestamp; null/undefined means the subscription bucket never expires. */
|
|
388
|
+
subscriptionCreditExpiresAt?: string | null;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Platform-admin payload for granting or revoking credits on an existing org.
|
|
392
|
+
* POST /orgs/:id/credits/adjust — records a CreditKindAdminAdjust ledger entry.
|
|
393
|
+
* amountMicros is signed: positive = grant, negative = revoke.
|
|
394
|
+
*/
|
|
395
|
+
interface AdjustOrgCreditsRequest {
|
|
396
|
+
amountMicros: number;
|
|
397
|
+
bucket: 'permanent' | 'subscription';
|
|
398
|
+
description?: string;
|
|
399
|
+
}
|
|
400
|
+
interface AdjustOrgCreditsResult {
|
|
401
|
+
balance: OrgCreditBalance;
|
|
402
|
+
transaction: {
|
|
403
|
+
amountMicros: number;
|
|
404
|
+
kind: string;
|
|
405
|
+
bucket: string;
|
|
406
|
+
description?: string;
|
|
407
|
+
};
|
|
408
|
+
}
|
|
368
409
|
|
|
369
410
|
declare class OrganizationClient {
|
|
370
411
|
private readonly http;
|
|
@@ -407,6 +448,24 @@ declare class OrganizationClient {
|
|
|
407
448
|
name: string;
|
|
408
449
|
allowDebug: boolean;
|
|
409
450
|
}>;
|
|
451
|
+
/**
|
|
452
|
+
* Platform-admin only: add a new member to an existing org.
|
|
453
|
+
* Creates the user without a password and sends an invite email via the
|
|
454
|
+
* same TokenOrgInvite flow as the regular member invite.
|
|
455
|
+
* Returns 403 unless platform admin; 409 when the email already exists.
|
|
456
|
+
*/
|
|
457
|
+
addUserToOrg(orgId: string, body: AddUserToOrgRequest): Promise<AddUserToOrgResult>;
|
|
458
|
+
/**
|
|
459
|
+
* Platform-admin only: fetch an org's two-bucket credit balance.
|
|
460
|
+
* Returns 403 unless platform admin; 404 when the org doesn't exist.
|
|
461
|
+
*/
|
|
462
|
+
getOrgCreditBalance(orgId: string): Promise<OrgCreditBalance>;
|
|
463
|
+
/**
|
|
464
|
+
* Platform-admin only: grant or revoke credits on an org.
|
|
465
|
+
* amountMicros is signed: positive = grant, negative = revoke.
|
|
466
|
+
* Records a CreditKindAdminAdjust ledger entry and returns the updated balance.
|
|
467
|
+
*/
|
|
468
|
+
adjustOrgCredits(orgId: string, body: AdjustOrgCreditsRequest): Promise<AdjustOrgCreditsResult>;
|
|
410
469
|
}
|
|
411
470
|
|
|
412
471
|
interface ProjectMember {
|
|
@@ -654,6 +713,13 @@ interface ChatScope {
|
|
|
654
713
|
}
|
|
655
714
|
type ChatSessionSource = 'adhoc' | 'template';
|
|
656
715
|
type ChatMessageRole = 'user' | 'assistant' | 'system';
|
|
716
|
+
/**
|
|
717
|
+
* Status of a single chat turn (agent_chat_turns.status). The first four are
|
|
718
|
+
* in-progress phases; the last three are terminal. The Chats/Runs table folds
|
|
719
|
+
* the in-progress values into a single "running" badge and renders the
|
|
720
|
+
* terminal ones directly.
|
|
721
|
+
*/
|
|
722
|
+
type ChatTurnStatus = 'classifying' | 'clarifying' | 'planning' | 'executing' | 'completed' | 'failed' | 'cancelled';
|
|
657
723
|
type ChatMessageKind = 'text' | 'question' | 'answer' | 'tool_call' | 'tool_result';
|
|
658
724
|
interface ChatSession {
|
|
659
725
|
id: string;
|
|
@@ -682,6 +748,11 @@ interface ChatSession {
|
|
|
682
748
|
/** Sum of prompt + completion tokens across this session's LLM calls.
|
|
683
749
|
* Populated only by list endpoints; absent on single-session fetches. */
|
|
684
750
|
total_tokens?: number | null;
|
|
751
|
+
/** Status of this session's most recent turn. Populated only by list
|
|
752
|
+
* endpoints; null/absent when the session has no turns yet. The Runs
|
|
753
|
+
* table maps the in-progress phases to a "running" badge and surfaces
|
|
754
|
+
* completed / failed / cancelled directly. */
|
|
755
|
+
latest_turn_status?: ChatTurnStatus | null;
|
|
685
756
|
}
|
|
686
757
|
interface ChatMessage {
|
|
687
758
|
id: string;
|
|
@@ -2097,4 +2168,4 @@ declare class NotImplementedError extends Error {
|
|
|
2097
2168
|
constructor(method: string);
|
|
2098
2169
|
}
|
|
2099
2170
|
|
|
2100
|
-
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AuthUser, BaseClient, type BaseClientOptions, type BudgetScope, BudgetsClient, 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 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 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 CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, 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 GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, 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 ModeType, type MonthlyCreditStats, NotImplementedError, type OpenChatStreamOptions, type OrgBudget, OrgRoles, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, type PostChatMessageRequest, type PostChatMessageResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RefreshRequest, type RegisterRequest, type RequestOptions, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, 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 UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, 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 };
|
|
2171
|
+
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 AuthUser, BaseClient, type BaseClientOptions, type BudgetScope, BudgetsClient, 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 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 CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, 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 GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, 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 ModeType, type MonthlyCreditStats, NotImplementedError, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, OrgRoles, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, type PostChatMessageRequest, type PostChatMessageResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RefreshRequest, type RegisterRequest, type RequestOptions, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, 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 UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, 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
|
@@ -365,6 +365,47 @@ interface SimpleOrgResponse {
|
|
|
365
365
|
message?: string;
|
|
366
366
|
data?: unknown;
|
|
367
367
|
}
|
|
368
|
+
/**
|
|
369
|
+
* Platform-admin payload for adding a new member to an existing org.
|
|
370
|
+
* POST /orgs/:id/users — creates the user without a password and sends an
|
|
371
|
+
* invite email via the same TokenOrgInvite flow as the regular member invite.
|
|
372
|
+
*/
|
|
373
|
+
interface AddUserToOrgRequest {
|
|
374
|
+
email: string;
|
|
375
|
+
firstName: string;
|
|
376
|
+
lastName?: string;
|
|
377
|
+
/** Org role integer (e.g. OrgRoles.User). Defaults to the lowest non-owner role when omitted. */
|
|
378
|
+
orgRole?: number;
|
|
379
|
+
}
|
|
380
|
+
interface AddUserToOrgResult {
|
|
381
|
+
user: OrganizationUser;
|
|
382
|
+
}
|
|
383
|
+
/** Two-bucket credit balance for an org (USD micros, post-0019 schema). */
|
|
384
|
+
interface OrgCreditBalance {
|
|
385
|
+
permanentCreditMicros: number;
|
|
386
|
+
subscriptionCreditMicros: number;
|
|
387
|
+
/** ISO 8601 timestamp; null/undefined means the subscription bucket never expires. */
|
|
388
|
+
subscriptionCreditExpiresAt?: string | null;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Platform-admin payload for granting or revoking credits on an existing org.
|
|
392
|
+
* POST /orgs/:id/credits/adjust — records a CreditKindAdminAdjust ledger entry.
|
|
393
|
+
* amountMicros is signed: positive = grant, negative = revoke.
|
|
394
|
+
*/
|
|
395
|
+
interface AdjustOrgCreditsRequest {
|
|
396
|
+
amountMicros: number;
|
|
397
|
+
bucket: 'permanent' | 'subscription';
|
|
398
|
+
description?: string;
|
|
399
|
+
}
|
|
400
|
+
interface AdjustOrgCreditsResult {
|
|
401
|
+
balance: OrgCreditBalance;
|
|
402
|
+
transaction: {
|
|
403
|
+
amountMicros: number;
|
|
404
|
+
kind: string;
|
|
405
|
+
bucket: string;
|
|
406
|
+
description?: string;
|
|
407
|
+
};
|
|
408
|
+
}
|
|
368
409
|
|
|
369
410
|
declare class OrganizationClient {
|
|
370
411
|
private readonly http;
|
|
@@ -407,6 +448,24 @@ declare class OrganizationClient {
|
|
|
407
448
|
name: string;
|
|
408
449
|
allowDebug: boolean;
|
|
409
450
|
}>;
|
|
451
|
+
/**
|
|
452
|
+
* Platform-admin only: add a new member to an existing org.
|
|
453
|
+
* Creates the user without a password and sends an invite email via the
|
|
454
|
+
* same TokenOrgInvite flow as the regular member invite.
|
|
455
|
+
* Returns 403 unless platform admin; 409 when the email already exists.
|
|
456
|
+
*/
|
|
457
|
+
addUserToOrg(orgId: string, body: AddUserToOrgRequest): Promise<AddUserToOrgResult>;
|
|
458
|
+
/**
|
|
459
|
+
* Platform-admin only: fetch an org's two-bucket credit balance.
|
|
460
|
+
* Returns 403 unless platform admin; 404 when the org doesn't exist.
|
|
461
|
+
*/
|
|
462
|
+
getOrgCreditBalance(orgId: string): Promise<OrgCreditBalance>;
|
|
463
|
+
/**
|
|
464
|
+
* Platform-admin only: grant or revoke credits on an org.
|
|
465
|
+
* amountMicros is signed: positive = grant, negative = revoke.
|
|
466
|
+
* Records a CreditKindAdminAdjust ledger entry and returns the updated balance.
|
|
467
|
+
*/
|
|
468
|
+
adjustOrgCredits(orgId: string, body: AdjustOrgCreditsRequest): Promise<AdjustOrgCreditsResult>;
|
|
410
469
|
}
|
|
411
470
|
|
|
412
471
|
interface ProjectMember {
|
|
@@ -654,6 +713,13 @@ interface ChatScope {
|
|
|
654
713
|
}
|
|
655
714
|
type ChatSessionSource = 'adhoc' | 'template';
|
|
656
715
|
type ChatMessageRole = 'user' | 'assistant' | 'system';
|
|
716
|
+
/**
|
|
717
|
+
* Status of a single chat turn (agent_chat_turns.status). The first four are
|
|
718
|
+
* in-progress phases; the last three are terminal. The Chats/Runs table folds
|
|
719
|
+
* the in-progress values into a single "running" badge and renders the
|
|
720
|
+
* terminal ones directly.
|
|
721
|
+
*/
|
|
722
|
+
type ChatTurnStatus = 'classifying' | 'clarifying' | 'planning' | 'executing' | 'completed' | 'failed' | 'cancelled';
|
|
657
723
|
type ChatMessageKind = 'text' | 'question' | 'answer' | 'tool_call' | 'tool_result';
|
|
658
724
|
interface ChatSession {
|
|
659
725
|
id: string;
|
|
@@ -682,6 +748,11 @@ interface ChatSession {
|
|
|
682
748
|
/** Sum of prompt + completion tokens across this session's LLM calls.
|
|
683
749
|
* Populated only by list endpoints; absent on single-session fetches. */
|
|
684
750
|
total_tokens?: number | null;
|
|
751
|
+
/** Status of this session's most recent turn. Populated only by list
|
|
752
|
+
* endpoints; null/absent when the session has no turns yet. The Runs
|
|
753
|
+
* table maps the in-progress phases to a "running" badge and surfaces
|
|
754
|
+
* completed / failed / cancelled directly. */
|
|
755
|
+
latest_turn_status?: ChatTurnStatus | null;
|
|
685
756
|
}
|
|
686
757
|
interface ChatMessage {
|
|
687
758
|
id: string;
|
|
@@ -2097,4 +2168,4 @@ declare class NotImplementedError extends Error {
|
|
|
2097
2168
|
constructor(method: string);
|
|
2098
2169
|
}
|
|
2099
2170
|
|
|
2100
|
-
export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AuthUser, BaseClient, type BaseClientOptions, type BudgetScope, BudgetsClient, 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 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 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 CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, 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 GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, 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 ModeType, type MonthlyCreditStats, NotImplementedError, type OpenChatStreamOptions, type OrgBudget, OrgRoles, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, type PostChatMessageRequest, type PostChatMessageResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RefreshRequest, type RegisterRequest, type RequestOptions, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, 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 UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, 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 };
|
|
2171
|
+
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 AuthUser, BaseClient, type BaseClientOptions, type BudgetScope, BudgetsClient, 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 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 CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, 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 GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, 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 ModeType, type MonthlyCreditStats, NotImplementedError, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, OrgRoles, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, type PostChatMessageRequest, type PostChatMessageResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RefreshRequest, type RegisterRequest, type RequestOptions, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, 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 UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, 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
|
@@ -300,6 +300,41 @@ var OrganizationClient = class {
|
|
|
300
300
|
const res = await this.http.patch(`/orgs/${orgId}/allow-debug`, { body: { allow } });
|
|
301
301
|
return res.data;
|
|
302
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Platform-admin only: add a new member to an existing org.
|
|
305
|
+
* Creates the user without a password and sends an invite email via the
|
|
306
|
+
* same TokenOrgInvite flow as the regular member invite.
|
|
307
|
+
* Returns 403 unless platform admin; 409 when the email already exists.
|
|
308
|
+
*/
|
|
309
|
+
async addUserToOrg(orgId, body) {
|
|
310
|
+
const res = await this.http.post(
|
|
311
|
+
`/orgs/${orgId}/users`,
|
|
312
|
+
{ body }
|
|
313
|
+
);
|
|
314
|
+
return unwrapData(res);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Platform-admin only: fetch an org's two-bucket credit balance.
|
|
318
|
+
* Returns 403 unless platform admin; 404 when the org doesn't exist.
|
|
319
|
+
*/
|
|
320
|
+
async getOrgCreditBalance(orgId) {
|
|
321
|
+
const res = await this.http.get(
|
|
322
|
+
`/orgs/${orgId}/credits`
|
|
323
|
+
);
|
|
324
|
+
return unwrapData(res);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Platform-admin only: grant or revoke credits on an org.
|
|
328
|
+
* amountMicros is signed: positive = grant, negative = revoke.
|
|
329
|
+
* Records a CreditKindAdminAdjust ledger entry and returns the updated balance.
|
|
330
|
+
*/
|
|
331
|
+
async adjustOrgCredits(orgId, body) {
|
|
332
|
+
const res = await this.http.post(
|
|
333
|
+
`/orgs/${orgId}/credits/adjust`,
|
|
334
|
+
{ body }
|
|
335
|
+
);
|
|
336
|
+
return unwrapData(res);
|
|
337
|
+
}
|
|
303
338
|
};
|
|
304
339
|
|
|
305
340
|
// src/adapters/projectAdapter.ts
|