@flashbacktech/tsclient 0.4.62 → 0.4.63
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 +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1883,6 +1883,15 @@ interface Subscription {
|
|
|
1883
1883
|
capabilities: SubscriptionCapability[];
|
|
1884
1884
|
}
|
|
1885
1885
|
/** The org's currently active subscription (GET /subscriptions/my). */
|
|
1886
|
+
/**
|
|
1887
|
+
* A pending plan change deferred to the period boundary (a downgrade).
|
|
1888
|
+
* effectiveAt is when the lower plan takes over (= current period end).
|
|
1889
|
+
*/
|
|
1890
|
+
interface ScheduledChange {
|
|
1891
|
+
toSubscriptionId: string;
|
|
1892
|
+
toSubscriptionName: string;
|
|
1893
|
+
effectiveAt: string;
|
|
1894
|
+
}
|
|
1886
1895
|
interface OrgSubscription {
|
|
1887
1896
|
id: string;
|
|
1888
1897
|
name: string;
|
|
@@ -1894,7 +1903,10 @@ interface OrgSubscription {
|
|
|
1894
1903
|
dateFrom: string;
|
|
1895
1904
|
dateTo: string | null;
|
|
1896
1905
|
status: string;
|
|
1906
|
+
/** false once a cancel-at-period-end is pending (active until dateTo). */
|
|
1897
1907
|
autoRenew: boolean;
|
|
1908
|
+
/** Set when a downgrade is scheduled for the period boundary. */
|
|
1909
|
+
scheduledChange?: ScheduledChange | null;
|
|
1898
1910
|
}
|
|
1899
1911
|
interface BuySubscriptionRequest {
|
|
1900
1912
|
subscriptionPeriodId: string;
|
|
@@ -1909,6 +1921,29 @@ interface BuySubscriptionResponse {
|
|
|
1909
1921
|
name: string;
|
|
1910
1922
|
} | null;
|
|
1911
1923
|
isFreeSubscription?: boolean;
|
|
1924
|
+
/** Set when the change was a deferred downgrade (no charge now). */
|
|
1925
|
+
scheduledChange?: ScheduledChange | null;
|
|
1926
|
+
message?: string;
|
|
1927
|
+
}
|
|
1928
|
+
/** Request body for POST /subscriptions/preview-change. */
|
|
1929
|
+
interface PreviewChangeRequest {
|
|
1930
|
+
subscriptionPeriodId: string;
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Estimate of a plan change's impact, for the confirmation modal.
|
|
1934
|
+
* kind: "new" (first purchase via Checkout) | "upgrade" | "downgrade".
|
|
1935
|
+
* proratedChargeMicros is an estimate when estimated=true.
|
|
1936
|
+
*/
|
|
1937
|
+
interface PreviewChangeResponse {
|
|
1938
|
+
success: boolean;
|
|
1939
|
+
kind: 'new' | 'upgrade' | 'downgrade';
|
|
1940
|
+
proratedChargeMicros: number;
|
|
1941
|
+
creditDeltaMicros: number;
|
|
1942
|
+
newFullPriceMicros: number;
|
|
1943
|
+
effectiveAt?: string;
|
|
1944
|
+
nextRenewalAt?: string;
|
|
1945
|
+
estimated: boolean;
|
|
1946
|
+
error_code?: string;
|
|
1912
1947
|
message?: string;
|
|
1913
1948
|
}
|
|
1914
1949
|
interface CancelSubscriptionResponse {
|
|
@@ -1948,6 +1983,13 @@ interface CreditBalance {
|
|
|
1948
1983
|
subscriptionCreditMicros: number;
|
|
1949
1984
|
subscriptionCreditExpiresAt: string | null;
|
|
1950
1985
|
totalActiveMicros: number;
|
|
1986
|
+
/**
|
|
1987
|
+
* Subscription bucket AFTER expiry is applied (0 once expired). Display
|
|
1988
|
+
* THIS for the "Subscription" credit card so a lapsed/cancelled plan
|
|
1989
|
+
* never shows stale credits. (subscriptionCreditMicros is the raw stored
|
|
1990
|
+
* value, which can be non-zero past expiry until the next write.)
|
|
1991
|
+
*/
|
|
1992
|
+
activeSubscriptionMicros: number;
|
|
1951
1993
|
}
|
|
1952
1994
|
/** Source of a credit ledger row. Matches the kind enum from migration 0017. */
|
|
1953
1995
|
type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'debit_llm_platform' | 'meter_llm_byok' | 'admin_adjust';
|
|
@@ -2075,6 +2117,12 @@ declare class SubscriptionsClient {
|
|
|
2075
2117
|
listCatalog(): Promise<Subscription[]>;
|
|
2076
2118
|
getMine(): Promise<OrgSubscription | null>;
|
|
2077
2119
|
buy(body: BuySubscriptionRequest): Promise<BuySubscriptionResponse>;
|
|
2120
|
+
/**
|
|
2121
|
+
* Preview the cost/credit impact of a plan change (pro-rated charge,
|
|
2122
|
+
* credit delta, effective dates) for the confirmation modal — no change
|
|
2123
|
+
* is made. kind="new" means a first purchase that would go via Checkout.
|
|
2124
|
+
*/
|
|
2125
|
+
previewChange(body: PreviewChangeRequest): Promise<PreviewChangeResponse>;
|
|
2078
2126
|
cancel(): Promise<CancelSubscriptionResponse>;
|
|
2079
2127
|
listPayments(): Promise<Payment[]>;
|
|
2080
2128
|
/** Stripe-hosted billing portal URL. */
|
|
@@ -2610,4 +2658,4 @@ declare class NotImplementedError extends Error {
|
|
|
2610
2658
|
constructor(method: string);
|
|
2611
2659
|
}
|
|
2612
2660
|
|
|
2613
|
-
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 MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, 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 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 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 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 };
|
|
2661
|
+
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 MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, 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 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
|
@@ -1883,6 +1883,15 @@ interface Subscription {
|
|
|
1883
1883
|
capabilities: SubscriptionCapability[];
|
|
1884
1884
|
}
|
|
1885
1885
|
/** The org's currently active subscription (GET /subscriptions/my). */
|
|
1886
|
+
/**
|
|
1887
|
+
* A pending plan change deferred to the period boundary (a downgrade).
|
|
1888
|
+
* effectiveAt is when the lower plan takes over (= current period end).
|
|
1889
|
+
*/
|
|
1890
|
+
interface ScheduledChange {
|
|
1891
|
+
toSubscriptionId: string;
|
|
1892
|
+
toSubscriptionName: string;
|
|
1893
|
+
effectiveAt: string;
|
|
1894
|
+
}
|
|
1886
1895
|
interface OrgSubscription {
|
|
1887
1896
|
id: string;
|
|
1888
1897
|
name: string;
|
|
@@ -1894,7 +1903,10 @@ interface OrgSubscription {
|
|
|
1894
1903
|
dateFrom: string;
|
|
1895
1904
|
dateTo: string | null;
|
|
1896
1905
|
status: string;
|
|
1906
|
+
/** false once a cancel-at-period-end is pending (active until dateTo). */
|
|
1897
1907
|
autoRenew: boolean;
|
|
1908
|
+
/** Set when a downgrade is scheduled for the period boundary. */
|
|
1909
|
+
scheduledChange?: ScheduledChange | null;
|
|
1898
1910
|
}
|
|
1899
1911
|
interface BuySubscriptionRequest {
|
|
1900
1912
|
subscriptionPeriodId: string;
|
|
@@ -1909,6 +1921,29 @@ interface BuySubscriptionResponse {
|
|
|
1909
1921
|
name: string;
|
|
1910
1922
|
} | null;
|
|
1911
1923
|
isFreeSubscription?: boolean;
|
|
1924
|
+
/** Set when the change was a deferred downgrade (no charge now). */
|
|
1925
|
+
scheduledChange?: ScheduledChange | null;
|
|
1926
|
+
message?: string;
|
|
1927
|
+
}
|
|
1928
|
+
/** Request body for POST /subscriptions/preview-change. */
|
|
1929
|
+
interface PreviewChangeRequest {
|
|
1930
|
+
subscriptionPeriodId: string;
|
|
1931
|
+
}
|
|
1932
|
+
/**
|
|
1933
|
+
* Estimate of a plan change's impact, for the confirmation modal.
|
|
1934
|
+
* kind: "new" (first purchase via Checkout) | "upgrade" | "downgrade".
|
|
1935
|
+
* proratedChargeMicros is an estimate when estimated=true.
|
|
1936
|
+
*/
|
|
1937
|
+
interface PreviewChangeResponse {
|
|
1938
|
+
success: boolean;
|
|
1939
|
+
kind: 'new' | 'upgrade' | 'downgrade';
|
|
1940
|
+
proratedChargeMicros: number;
|
|
1941
|
+
creditDeltaMicros: number;
|
|
1942
|
+
newFullPriceMicros: number;
|
|
1943
|
+
effectiveAt?: string;
|
|
1944
|
+
nextRenewalAt?: string;
|
|
1945
|
+
estimated: boolean;
|
|
1946
|
+
error_code?: string;
|
|
1912
1947
|
message?: string;
|
|
1913
1948
|
}
|
|
1914
1949
|
interface CancelSubscriptionResponse {
|
|
@@ -1948,6 +1983,13 @@ interface CreditBalance {
|
|
|
1948
1983
|
subscriptionCreditMicros: number;
|
|
1949
1984
|
subscriptionCreditExpiresAt: string | null;
|
|
1950
1985
|
totalActiveMicros: number;
|
|
1986
|
+
/**
|
|
1987
|
+
* Subscription bucket AFTER expiry is applied (0 once expired). Display
|
|
1988
|
+
* THIS for the "Subscription" credit card so a lapsed/cancelled plan
|
|
1989
|
+
* never shows stale credits. (subscriptionCreditMicros is the raw stored
|
|
1990
|
+
* value, which can be non-zero past expiry until the next write.)
|
|
1991
|
+
*/
|
|
1992
|
+
activeSubscriptionMicros: number;
|
|
1951
1993
|
}
|
|
1952
1994
|
/** Source of a credit ledger row. Matches the kind enum from migration 0017. */
|
|
1953
1995
|
type CreditTransactionKind = 'grant_initial' | 'grant_renewal' | 'grant_pack' | 'debit_llm' | 'debit_sandbox' | 'debit_llm_platform' | 'meter_llm_byok' | 'admin_adjust';
|
|
@@ -2075,6 +2117,12 @@ declare class SubscriptionsClient {
|
|
|
2075
2117
|
listCatalog(): Promise<Subscription[]>;
|
|
2076
2118
|
getMine(): Promise<OrgSubscription | null>;
|
|
2077
2119
|
buy(body: BuySubscriptionRequest): Promise<BuySubscriptionResponse>;
|
|
2120
|
+
/**
|
|
2121
|
+
* Preview the cost/credit impact of a plan change (pro-rated charge,
|
|
2122
|
+
* credit delta, effective dates) for the confirmation modal — no change
|
|
2123
|
+
* is made. kind="new" means a first purchase that would go via Checkout.
|
|
2124
|
+
*/
|
|
2125
|
+
previewChange(body: PreviewChangeRequest): Promise<PreviewChangeResponse>;
|
|
2078
2126
|
cancel(): Promise<CancelSubscriptionResponse>;
|
|
2079
2127
|
listPayments(): Promise<Payment[]>;
|
|
2080
2128
|
/** Stripe-hosted billing portal URL. */
|
|
@@ -2610,4 +2658,4 @@ declare class NotImplementedError extends Error {
|
|
|
2610
2658
|
constructor(method: string);
|
|
2611
2659
|
}
|
|
2612
2660
|
|
|
2613
|
-
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 MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, 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 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 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 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 };
|
|
2661
|
+
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 MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type Payment, type PeekScanLeaseResponse, 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 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
|
@@ -1091,6 +1091,14 @@ var SubscriptionsClient = class {
|
|
|
1091
1091
|
buy(body) {
|
|
1092
1092
|
return this.http.post("/subscriptions/buy", { body });
|
|
1093
1093
|
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Preview the cost/credit impact of a plan change (pro-rated charge,
|
|
1096
|
+
* credit delta, effective dates) for the confirmation modal — no change
|
|
1097
|
+
* is made. kind="new" means a first purchase that would go via Checkout.
|
|
1098
|
+
*/
|
|
1099
|
+
previewChange(body) {
|
|
1100
|
+
return this.http.post("/subscriptions/preview-change", { body });
|
|
1101
|
+
}
|
|
1094
1102
|
cancel() {
|
|
1095
1103
|
return this.http.post("/subscriptions/cancel", {});
|
|
1096
1104
|
}
|