@schematichq/schematic-typescript-node 1.5.10 → 1.5.13
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/api/errors/PaymentRequiredError.d.ts +7 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +2 -0
- package/dist/api/resources/billing/client/Client.d.ts +43 -0
- package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
- package/dist/api/resources/billing/client/requests/ListCompanyBillingProfilesRequest.d.ts +20 -0
- package/dist/api/resources/billing/client/requests/UpdateCompanyBillingProfileRequestBody.d.ts +15 -0
- package/dist/api/resources/billing/client/requests/index.d.ts +2 -0
- package/dist/api/resources/billing/types/ListCompanyBillingProfilesParams.d.ts +13 -0
- package/dist/api/resources/billing/types/ListCompanyBillingProfilesResponse.d.ts +6 -0
- package/dist/api/resources/billing/types/UpdateCompanyBillingProfileResponse.d.ts +6 -0
- package/dist/api/resources/billing/types/index.d.ts +3 -0
- package/dist/api/resources/credits/client/Client.d.ts +123 -0
- package/dist/api/resources/credits/client/requests/CountCreditSpendPoliciesRequest.d.ts +24 -0
- package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -0
- package/dist/api/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +17 -0
- package/dist/api/resources/credits/client/requests/ListCreditSpendPoliciesRequest.d.ts +24 -0
- package/dist/api/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +8 -0
- package/dist/api/resources/credits/client/requests/index.d.ts +4 -0
- package/dist/api/resources/credits/types/CountCreditSpendPoliciesParams.d.ts +15 -0
- package/dist/api/resources/credits/types/CountCreditSpendPoliciesResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/CreateCreditSpendPolicyResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/DeleteCreditSpendPolicyResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/GetCreditSpendPolicyResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/ListCreditSpendPoliciesParams.d.ts +15 -0
- package/dist/api/resources/credits/types/ListCreditSpendPoliciesResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/UpdateCreditSpendPolicyResponse.d.ts +6 -0
- package/dist/api/resources/credits/types/index.d.ts +8 -0
- package/dist/api/resources/events/client/Client.d.ts +50 -0
- package/dist/api/resources/events/client/requests/UpsertOtlpEnvironmentSettingsRequestBody.d.ts +13 -0
- package/dist/api/resources/events/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/types/DeleteOtlpEnvironmentSettingsResponse.d.ts +6 -0
- package/dist/api/resources/events/types/GetOtlpEnvironmentSettingsResponse.d.ts +6 -0
- package/dist/api/resources/events/types/UpsertOtlpEnvironmentSettingsResponse.d.ts +6 -0
- package/dist/api/resources/events/types/index.d.ts +3 -0
- package/dist/api/resources/integrationsapi/client/Client.d.ts +83 -0
- package/dist/api/resources/integrationsapi/client/requests/ClaimStripeSandboxKeysRequestBody.d.ts +9 -0
- package/dist/api/resources/integrationsapi/client/requests/InstallStripeSandboxRequestBody.d.ts +12 -0
- package/dist/api/resources/integrationsapi/client/requests/index.d.ts +2 -0
- package/dist/api/resources/integrationsapi/types/ClaimStripeSandboxKeysResponse.d.ts +6 -0
- package/dist/api/resources/integrationsapi/types/GetStripeSandboxClaimLinkResponse.d.ts +6 -0
- package/dist/api/resources/integrationsapi/types/GetStripeSandboxKeysResponse.d.ts +6 -0
- package/dist/api/resources/integrationsapi/types/InstallStripeClaimableSandboxResponse.d.ts +6 -0
- package/dist/api/resources/integrationsapi/types/ListStripeSandboxCountriesResponse.d.ts +6 -0
- package/dist/api/resources/integrationsapi/types/index.d.ts +5 -0
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
- package/dist/api/resources/planmigrations/client/Client.d.ts +40 -5
- package/dist/api/resources/planmigrations/client/requests/CompleteMigrationNowRequestBody.d.ts +8 -0
- package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +1 -1
- package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +1 -1
- package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +1 -1
- package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +1 -1
- package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +1 -1
- package/dist/api/resources/planmigrations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/planmigrations/types/CancelMigrationResponse.d.ts +6 -0
- package/dist/api/resources/planmigrations/types/CompleteMigrationNowResponse.d.ts +6 -0
- package/dist/api/resources/planmigrations/types/index.d.ts +2 -0
- package/dist/api/resources/plans/client/Client.d.ts +3 -1
- package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +3 -0
- package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +3 -0
- package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +5 -1
- package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +4 -0
- package/dist/api/resources/plans/types/CountPlansParams.d.ts +2 -0
- package/dist/api/resources/plans/types/ListPlansParams.d.ts +2 -0
- package/dist/api/types/BillingArrearsAnchor.d.ts +5 -0
- package/dist/api/types/BillingArrearsCadence.d.ts +5 -0
- package/dist/api/types/BillingCreditGrantResponseData.d.ts +7 -0
- package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +12 -0
- package/dist/api/types/CheckoutDataResponseData.d.ts +2 -0
- package/dist/api/types/ClaimedStripeSandboxKeysResponseData.d.ts +5 -0
- package/dist/api/types/CompanyBillingProfileResponseData.d.ts +17 -0
- package/dist/api/types/CompanyDetailResponseData.d.ts +3 -0
- package/dist/api/types/CompanyOverrideResponseData.d.ts +2 -0
- package/dist/api/types/CompanyPlanCreditGrantView.d.ts +6 -0
- package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +12 -0
- package/dist/api/types/CreditCompanyGrantView.d.ts +7 -0
- package/dist/api/types/CreditLeaseResponseData.d.ts +1 -0
- package/dist/api/types/CreditSpendPolicyResponseData.d.ts +12 -0
- package/dist/api/types/CreditSpendPolicyScope.d.ts +6 -0
- package/dist/api/types/CustomPlanBillingResponseData.d.ts +2 -0
- package/dist/api/types/EventBodyInference.d.ts +4 -2
- package/dist/api/types/GetOnboardingStateResp.d.ts +8 -0
- package/dist/api/types/IssueTemporaryAccessTokenResponseData.d.ts +2 -1
- package/dist/api/types/OnboardingRequirement.d.ts +2 -0
- package/dist/api/types/OnboardingRoadmapView.d.ts +4 -0
- package/dist/api/types/OnboardingStripeImport.d.ts +6 -0
- package/dist/api/types/OtlpEnvironmentSettingsResponseData.d.ts +10 -0
- package/dist/api/types/PendingMigrationResponseData.d.ts +8 -0
- package/dist/api/types/PlanCreditGrantView.d.ts +6 -0
- package/dist/api/types/PlanGroupDetailResponseData.d.ts +1 -0
- package/dist/api/types/PlanGroupResponseData.d.ts +1 -0
- package/dist/api/types/PlanVersionCompanyMigrationResponseData.d.ts +2 -0
- package/dist/api/types/PlanVersionCompanyMigrationStatus.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationStatus.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationStrategy.d.ts +1 -0
- package/dist/api/types/RuleConditionDetailResponseData.d.ts +1 -0
- package/dist/api/types/RuleConditionPlanVersionResponseData.d.ts +7 -0
- package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/api/types/RulesengineCompany.d.ts +1 -0
- package/dist/api/types/RulesengineCreditPostpaidConfig.d.ts +3 -0
- package/dist/api/types/SlackConnectInviteStatus.d.ts +8 -0
- package/dist/api/types/SlackConnectInviteView.d.ts +7 -0
- package/dist/api/types/StripeIntegrationConfig.d.ts +6 -0
- package/dist/api/types/StripeSandboxClaimLink.d.ts +6 -0
- package/dist/api/types/StripeSandboxCountriesResponseData.d.ts +3 -0
- package/dist/api/types/StripeSandboxInstallResponseData.d.ts +10 -0
- package/dist/api/types/StripeSandboxKeysResponseData.d.ts +5 -0
- package/dist/api/types/TemporaryAccessTokenIssuerType.d.ts +5 -0
- package/dist/api/types/TemporaryAccessTokenResponseData.d.ts +2 -1
- package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +12 -0
- package/dist/api/types/WebhookEventDetailResponseData.d.ts +1 -0
- package/dist/api/types/WebhookEventResponseData.d.ts +1 -0
- package/dist/api/types/index.d.ts +19 -0
- package/dist/credits/lease-store.d.ts +17 -8
- package/dist/index.js +25 -9
- package/dist/serialization/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +2 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
- package/dist/serialization/resources/billing/client/requests/UpdateCompanyBillingProfileRequestBody.d.ts +16 -0
- package/dist/serialization/resources/billing/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/billing/types/ListCompanyBillingProfilesParams.d.ts +14 -0
- package/dist/serialization/resources/billing/types/ListCompanyBillingProfilesResponse.d.ts +12 -0
- package/dist/serialization/resources/billing/types/UpdateCompanyBillingProfileResponse.d.ts +11 -0
- package/dist/serialization/resources/billing/types/index.d.ts +3 -0
- package/dist/serialization/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -0
- package/dist/serialization/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +13 -0
- package/dist/serialization/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +10 -0
- package/dist/serialization/resources/credits/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/credits/types/CountCreditSpendPoliciesParams.d.ts +16 -0
- package/dist/serialization/resources/credits/types/CountCreditSpendPoliciesResponse.d.ts +12 -0
- package/dist/serialization/resources/credits/types/CreateCreditSpendPolicyResponse.d.ts +11 -0
- package/dist/serialization/resources/credits/types/DeleteCreditSpendPolicyResponse.d.ts +11 -0
- package/dist/serialization/resources/credits/types/GetCreditSpendPolicyResponse.d.ts +11 -0
- package/dist/serialization/resources/credits/types/ListCreditSpendPoliciesParams.d.ts +16 -0
- package/dist/serialization/resources/credits/types/ListCreditSpendPoliciesResponse.d.ts +12 -0
- package/dist/serialization/resources/credits/types/UpdateCreditSpendPolicyResponse.d.ts +11 -0
- package/dist/serialization/resources/credits/types/index.d.ts +8 -0
- package/dist/serialization/resources/events/client/requests/UpsertOtlpEnvironmentSettingsRequestBody.d.ts +13 -0
- package/dist/serialization/resources/events/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/events/types/DeleteOtlpEnvironmentSettingsResponse.d.ts +11 -0
- package/dist/serialization/resources/events/types/GetOtlpEnvironmentSettingsResponse.d.ts +11 -0
- package/dist/serialization/resources/events/types/UpsertOtlpEnvironmentSettingsResponse.d.ts +11 -0
- package/dist/serialization/resources/events/types/index.d.ts +3 -0
- package/dist/serialization/resources/integrationsapi/client/requests/ClaimStripeSandboxKeysRequestBody.d.ts +9 -0
- package/dist/serialization/resources/integrationsapi/client/requests/InstallStripeSandboxRequestBody.d.ts +12 -0
- package/dist/serialization/resources/integrationsapi/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/integrationsapi/types/ClaimStripeSandboxKeysResponse.d.ts +11 -0
- package/dist/serialization/resources/integrationsapi/types/GetStripeSandboxClaimLinkResponse.d.ts +11 -0
- package/dist/serialization/resources/integrationsapi/types/GetStripeSandboxKeysResponse.d.ts +11 -0
- package/dist/serialization/resources/integrationsapi/types/InstallStripeClaimableSandboxResponse.d.ts +11 -0
- package/dist/serialization/resources/integrationsapi/types/ListStripeSandboxCountriesResponse.d.ts +11 -0
- package/dist/serialization/resources/integrationsapi/types/index.d.ts +5 -0
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
- package/dist/serialization/resources/planmigrations/client/requests/CompleteMigrationNowRequestBody.d.ts +10 -0
- package/dist/serialization/resources/planmigrations/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/planmigrations/types/CancelMigrationResponse.d.ts +11 -0
- package/dist/serialization/resources/planmigrations/types/CompleteMigrationNowResponse.d.ts +11 -0
- package/dist/serialization/resources/planmigrations/types/index.d.ts +2 -0
- package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +2 -0
- package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
- package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
- package/dist/serialization/types/BillingArrearsAnchor.d.ts +7 -0
- package/dist/serialization/types/BillingArrearsCadence.d.ts +7 -0
- package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +4 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +8 -0
- package/dist/serialization/types/CheckoutDataResponseData.d.ts +2 -0
- package/dist/serialization/types/ClaimedStripeSandboxKeysResponseData.d.ts +11 -0
- package/dist/serialization/types/CompanyBillingProfileResponseData.d.ts +25 -0
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +5 -0
- package/dist/serialization/types/CompanyOverrideResponseData.d.ts +3 -0
- package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +8 -0
- package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +8 -0
- package/dist/serialization/types/CreditCompanyGrantView.d.ts +8 -0
- package/dist/serialization/types/CreditLeaseResponseData.d.ts +1 -0
- package/dist/serialization/types/CreditSpendPolicyResponseData.d.ts +18 -0
- package/dist/serialization/types/CreditSpendPolicyScope.d.ts +7 -0
- package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +1 -0
- package/dist/serialization/types/EventBodyInference.d.ts +1 -0
- package/dist/serialization/types/GetOnboardingStateResp.d.ts +11 -0
- package/dist/serialization/types/IssueTemporaryAccessTokenResponseData.d.ts +3 -1
- package/dist/serialization/types/OnboardingRequirement.d.ts +1 -1
- package/dist/serialization/types/OnboardingRoadmapView.d.ts +10 -0
- package/dist/serialization/types/OnboardingStripeImport.d.ts +7 -0
- package/dist/serialization/types/OtlpEnvironmentSettingsResponseData.d.ts +16 -0
- package/dist/serialization/types/PendingMigrationResponseData.d.ts +14 -0
- package/dist/serialization/types/PlanCreditGrantView.d.ts +8 -0
- package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanGroupResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanVersionCompanyMigrationResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanVersionCompanyMigrationStatus.d.ts +1 -1
- package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanVersionMigrationStatus.d.ts +1 -1
- package/dist/serialization/types/PlanVersionMigrationStrategy.d.ts +1 -1
- package/dist/serialization/types/RuleConditionDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/RuleConditionPlanVersionResponseData.d.ts +13 -0
- package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/serialization/types/RulesengineCompany.d.ts +2 -0
- package/dist/serialization/types/RulesengineCreditPostpaidConfig.d.ts +9 -0
- package/dist/serialization/types/SlackConnectInviteStatus.d.ts +7 -0
- package/dist/serialization/types/SlackConnectInviteView.d.ts +13 -0
- package/dist/serialization/types/StripeIntegrationConfig.d.ts +3 -0
- package/dist/serialization/types/StripeSandboxClaimLink.d.ts +12 -0
- package/dist/serialization/types/StripeSandboxCountriesResponseData.d.ts +9 -0
- package/dist/serialization/types/StripeSandboxInstallResponseData.d.ts +17 -0
- package/dist/serialization/types/StripeSandboxKeysResponseData.d.ts +11 -0
- package/dist/serialization/types/TemporaryAccessTokenIssuerType.d.ts +7 -0
- package/dist/serialization/types/TemporaryAccessTokenResponseData.d.ts +3 -1
- package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +8 -0
- package/dist/serialization/types/WebhookEventDetailResponseData.d.ts +1 -0
- package/dist/serialization/types/WebhookEventResponseData.d.ts +1 -0
- package/dist/serialization/types/index.d.ts +19 -0
- package/dist/wasm/rulesengine.d.ts +1 -1
- package/dist/wasm/rulesengine.js +30 -30
- package/package.json +1 -4
|
@@ -2,6 +2,8 @@ import type * as Schematic from "../index";
|
|
|
2
2
|
export interface CompanyDetailResponseData {
|
|
3
3
|
addOns: Schematic.CompanyPlanWithBillingSubView[];
|
|
4
4
|
billingCreditBalances?: Record<string, number>;
|
|
5
|
+
billingProfile?: Schematic.CompanyBillingProfileResponseData;
|
|
6
|
+
billingProfiles?: Schematic.CompanyBillingProfileResponseData[];
|
|
5
7
|
billingSubscription?: Schematic.BillingSubscriptionView;
|
|
6
8
|
billingSubscriptions: Schematic.BillingSubscriptionView[];
|
|
7
9
|
createdAt: Date;
|
|
@@ -17,6 +19,7 @@ export interface CompanyDetailResponseData {
|
|
|
17
19
|
metrics: Schematic.CompanyEventPeriodMetricsResponseData[];
|
|
18
20
|
name: string;
|
|
19
21
|
paymentMethods: Schematic.PaymentMethodResponseData[];
|
|
22
|
+
pendingMigration?: Schematic.PendingMigrationResponseData;
|
|
20
23
|
plan?: Schematic.CompanyPlanWithBillingSubView;
|
|
21
24
|
plans: Schematic.GenericPreviewObject[];
|
|
22
25
|
rules: Schematic.Rule[];
|
|
@@ -16,6 +16,8 @@ export interface CompanyOverrideResponseData {
|
|
|
16
16
|
ruleIdUsageExceeded?: string;
|
|
17
17
|
updatedAt: Date;
|
|
18
18
|
valueBool?: boolean;
|
|
19
|
+
valueCredit?: Schematic.BillingCreditResponseData;
|
|
20
|
+
valueCreditId?: string;
|
|
19
21
|
valueNumeric?: number;
|
|
20
22
|
valueTrait?: Schematic.EntityTraitDefinitionResponseData;
|
|
21
23
|
valueTraitId?: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface CompanyPlanCreditGrantView {
|
|
3
|
+
billingCreditArrearsAnchor?: Schematic.BillingArrearsAnchor;
|
|
4
|
+
billingCreditArrearsCadence?: Schematic.BillingArrearsCadence;
|
|
3
5
|
billingCreditAutoTopupAmount?: number;
|
|
4
6
|
billingCreditAutoTopupAmountType?: string;
|
|
5
7
|
billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
|
|
@@ -11,6 +13,10 @@ export interface CompanyPlanCreditGrantView {
|
|
|
11
13
|
billingCreditAutoTopupThresholdCredits?: number;
|
|
12
14
|
billingCreditAutoTopupThresholdPercent?: number;
|
|
13
15
|
billingCreditCanBuyBundles: boolean;
|
|
16
|
+
billingCreditOverdraftLimit?: number;
|
|
17
|
+
billingCreditPostpaidEnabled: boolean;
|
|
18
|
+
billingCreditPostpaidRatePerUnit?: number;
|
|
19
|
+
billingCreditPostpaidRatePerUnitDecimal?: string;
|
|
14
20
|
companyAutoTopupAmount?: number;
|
|
15
21
|
companyAutoTopupEnabled?: boolean;
|
|
16
22
|
companyAutoTopupThresholdCredits?: number;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface CreateBillingPlanCreditGrantRequestBody {
|
|
3
3
|
applyToExisting?: boolean;
|
|
4
|
+
/** Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. */
|
|
5
|
+
arrearsAnchor?: Schematic.BillingArrearsAnchor;
|
|
6
|
+
/** How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. */
|
|
7
|
+
arrearsCadence?: Schematic.BillingArrearsCadence;
|
|
4
8
|
autoTopupAmount?: number;
|
|
5
9
|
autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
|
|
6
10
|
autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
|
|
@@ -22,8 +26,16 @@ export interface CreateBillingPlanCreditGrantRequestBody {
|
|
|
22
26
|
expiryUnitCount?: number;
|
|
23
27
|
/** The license whose quantity scales this grant. Required when scaling is per_license. */
|
|
24
28
|
licenseId?: string;
|
|
29
|
+
/** Optional limit on how far the balance may go below zero, in credits. It is a floor on the balance rather than an allowance per invoice window: the balance may run down to minus this figure, and beyond it the flag check denies the same way an exhausted balance does with postpaid off. Nothing resets when an invoice window rolls, so a company that reaches the limit stays denied until a new grant lands or the negative balance is settled. Omit for no limit. */
|
|
30
|
+
overdraftLimit?: number;
|
|
25
31
|
planId: string;
|
|
26
32
|
planVersionId?: string;
|
|
33
|
+
/** Whether consumption may continue past a zero balance. When false (the default) the flag check denies once the balance is exhausted, which is the existing behavior. When true, consumption continues and accrues at postpaid_rate_per_unit, settled on arrears_cadence. Intended for invoice-billed customers on net terms, who have no card for auto top-up to charge. */
|
|
34
|
+
postpaidEnabled?: boolean;
|
|
35
|
+
/** Amount charged per credit consumed past a zero balance, in the currency's minor unit. Optional: defaults to the credit's own cost basis (price_per_unit) when postpaid_enabled is true. */
|
|
36
|
+
postpaidRatePerUnit?: number;
|
|
37
|
+
/** Decimal string form of postpaid_rate_per_unit, for rates finer than one minor unit (for example 0.0002). Takes precedence over postpaid_rate_per_unit when both are set, matching how the credit's own price_per_unit_decimal behaves. */
|
|
38
|
+
postpaidRatePerUnitDecimal?: string;
|
|
27
39
|
resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
|
|
28
40
|
resetStart: Schematic.BillingPlanCreditGrantResetStart;
|
|
29
41
|
resetType?: Schematic.BillingPlanCreditGrantResetType;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface CreditCompanyGrantView {
|
|
3
|
+
arrearsCadence?: Schematic.BillingArrearsCadence;
|
|
3
4
|
billingCreditBundleId?: string;
|
|
4
5
|
billingCreditId: string;
|
|
5
6
|
companyId: string;
|
|
@@ -21,6 +22,12 @@ export interface CreditCompanyGrantView {
|
|
|
21
22
|
planId?: string;
|
|
22
23
|
planName?: string;
|
|
23
24
|
pluralName?: string;
|
|
25
|
+
postpaidChargeAmount?: number;
|
|
26
|
+
postpaidChargeCurrency?: string;
|
|
27
|
+
postpaidChargedCredits?: number;
|
|
28
|
+
postpaidPeriodEnd?: Date;
|
|
29
|
+
postpaidRate?: number;
|
|
30
|
+
postpaidRateDecimal?: string;
|
|
24
31
|
price?: Schematic.BillingProductPriceResponseData;
|
|
25
32
|
quantity: number;
|
|
26
33
|
quantityRemaining: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Schematic from "../index";
|
|
2
|
+
export interface CreditSpendPolicyResponseData {
|
|
3
|
+
billingCreditId: string;
|
|
4
|
+
companyId?: string;
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
id: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
maxPerDraw?: number;
|
|
9
|
+
scopeType: Schematic.CreditSpendPolicyScope;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
userId?: string;
|
|
12
|
+
}
|
|
@@ -12,6 +12,8 @@ export interface CustomPlanBillingResponseData {
|
|
|
12
12
|
/** The flow that created this billing record: a custom plan, or a standard plan assigned by invoice through Manage Plan. */
|
|
13
13
|
planBillingSource: Schematic.PlanBillingSource;
|
|
14
14
|
planId: string;
|
|
15
|
+
/** Whether the shortened period the renewal date created was billed pro rata when the subscription started. False means that period is free and the first invoice is the one raised on the renewal date. */
|
|
16
|
+
prorateFirstPeriod?: boolean;
|
|
15
17
|
publishedAt?: Date;
|
|
16
18
|
sendInvoice: boolean;
|
|
17
19
|
status: Schematic.CustomPlanBillingStatus;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface EventBodyInference {
|
|
2
|
-
/** Number of input tokens
|
|
2
|
+
/** Number of input tokens written to a prompt cache; a subset of input_tokens */
|
|
3
|
+
cacheCreationInputTokens?: number;
|
|
4
|
+
/** Number of input tokens served from cache; a subset of input_tokens */
|
|
3
5
|
cachedInputTokens?: number;
|
|
4
6
|
/** Key-value pairs to identify the company associated with the inference event */
|
|
5
7
|
company: Record<string, string>;
|
|
@@ -9,7 +11,7 @@ export interface EventBodyInference {
|
|
|
9
11
|
currency?: string;
|
|
10
12
|
/** Optional track event name to fan out for usage-based billing */
|
|
11
13
|
event?: string;
|
|
12
|
-
/**
|
|
14
|
+
/** Total number of input tokens for the inference request, including those served from and written to a prompt cache */
|
|
13
15
|
inputTokens: number;
|
|
14
16
|
/** The inference operation; defaults to 'chat' */
|
|
15
17
|
operation?: string;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface GetOnboardingStateResp {
|
|
3
|
+
agentConnectedAt?: Date;
|
|
4
|
+
country?: string;
|
|
5
|
+
dismissedAt?: Date;
|
|
3
6
|
environmentId?: string;
|
|
4
7
|
milestones: Schematic.OnboardingMilestoneView[];
|
|
5
8
|
path?: Schematic.OnboardingPath;
|
|
9
|
+
pricingPageUrl?: string;
|
|
6
10
|
requirements: Schematic.OnboardingRequirementView[];
|
|
11
|
+
roadmap?: Schematic.OnboardingRoadmapView;
|
|
12
|
+
slackConnect?: Schematic.SlackConnectInviteView;
|
|
13
|
+
stripeImport?: Schematic.OnboardingStripeImport;
|
|
7
14
|
suggestedNext: Schematic.OnboardingRequirement[];
|
|
8
15
|
track?: Schematic.OnboardingTrack;
|
|
16
|
+
websiteUrl?: string;
|
|
9
17
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface IssueTemporaryAccessTokenResponseData {
|
|
3
|
-
apiKeyId
|
|
3
|
+
apiKeyId?: string;
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
environmentId: string;
|
|
6
6
|
expiredAt: Date;
|
|
7
7
|
id: string;
|
|
8
|
+
issuerType: Schematic.TemporaryAccessTokenIssuerType;
|
|
8
9
|
resourceType: Schematic.TemporaryAccessTokenResourceType;
|
|
9
10
|
token: string;
|
|
10
11
|
updatedAt: Date;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const OnboardingRequirement: {
|
|
2
|
+
readonly ConnectAgent: "connect_agent";
|
|
2
3
|
readonly ConnectBilling: "connect_billing";
|
|
3
4
|
readonly CreateApiKey: "create_api_key";
|
|
4
5
|
readonly FirstFlagCheck: "first_flag_check";
|
|
6
|
+
readonly GenerateRoadmap: "generate_roadmap";
|
|
5
7
|
readonly ImportCompanies: "import_companies";
|
|
6
8
|
readonly ModelPackaging: "model_packaging";
|
|
7
9
|
readonly SendEvents: "send_events";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface PlanCreditGrantView {
|
|
3
|
+
billingCreditArrearsAnchor?: Schematic.BillingArrearsAnchor;
|
|
4
|
+
billingCreditArrearsCadence?: Schematic.BillingArrearsCadence;
|
|
3
5
|
billingCreditAutoTopupAmount?: number;
|
|
4
6
|
billingCreditAutoTopupAmountType?: string;
|
|
5
7
|
billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
|
|
@@ -11,6 +13,10 @@ export interface PlanCreditGrantView {
|
|
|
11
13
|
billingCreditAutoTopupThresholdCredits?: number;
|
|
12
14
|
billingCreditAutoTopupThresholdPercent?: number;
|
|
13
15
|
billingCreditCanBuyBundles: boolean;
|
|
16
|
+
billingCreditOverdraftLimit?: number;
|
|
17
|
+
billingCreditPostpaidEnabled: boolean;
|
|
18
|
+
billingCreditPostpaidRatePerUnit?: number;
|
|
19
|
+
billingCreditPostpaidRatePerUnitDecimal?: string;
|
|
14
20
|
companyCreditAmount: number;
|
|
15
21
|
createdAt: Date;
|
|
16
22
|
credit?: Schematic.BillingCreditView;
|
|
@@ -33,6 +33,7 @@ export interface PlanGroupDetailResponseData {
|
|
|
33
33
|
syncCustomerBillingDetails: boolean;
|
|
34
34
|
taxCollectionEnabled: boolean;
|
|
35
35
|
trialDays?: number;
|
|
36
|
+
trialEligibilityPerPlan: boolean;
|
|
36
37
|
trialExpiryPlan?: Schematic.PlanGroupPlanDetailResponseData;
|
|
37
38
|
trialExpiryPlanId?: string;
|
|
38
39
|
trialExpiryPlanPrice?: Schematic.BillingPriceView;
|
|
@@ -25,6 +25,7 @@ export interface PlanGroupResponseData {
|
|
|
25
25
|
syncCustomerBillingDetails: boolean;
|
|
26
26
|
taxCollectionEnabled: boolean;
|
|
27
27
|
trialDays?: number;
|
|
28
|
+
trialEligibilityPerPlan: boolean;
|
|
28
29
|
trialExpiryPlanId?: string;
|
|
29
30
|
trialExpiryPlanPriceId?: string;
|
|
30
31
|
trialPaymentMethodRequired?: boolean;
|
|
@@ -9,6 +9,8 @@ export interface PlanVersionCompanyMigrationResponseData {
|
|
|
9
9
|
id: string;
|
|
10
10
|
migrationId: string;
|
|
11
11
|
planVersionIdFrom?: string;
|
|
12
|
+
/** When this company is expected to migrate, for a migration scheduled at the end of the billing period: the end of the company's current billing period. Only set while both the company and the migration are still pending. A value at or before the time of the request means the company has no active subscription and migrates as soon as processing runs. Null means no upcoming renewal could be determined from the company's current billing status (for example, a past-due subscription or one set to cancel); it does not mean the company will never migrate. */
|
|
13
|
+
scheduledFor?: Date;
|
|
12
14
|
startedAt?: Date;
|
|
13
15
|
status: Schematic.PlanVersionCompanyMigrationStatus;
|
|
14
16
|
updatedAt: Date;
|
|
@@ -13,6 +13,7 @@ export interface RuleConditionDetailResponseData {
|
|
|
13
13
|
metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
|
|
14
14
|
metricValue?: number;
|
|
15
15
|
operator: Schematic.ComparableOperator;
|
|
16
|
+
planVersions?: Schematic.RuleConditionPlanVersionResponseData[];
|
|
16
17
|
resourceIds: string[];
|
|
17
18
|
resources: Schematic.PreviewObjectResponseData[];
|
|
18
19
|
ruleId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** The current schema version hash for rules engine types. The first enum value is always the current version. */
|
|
2
2
|
export declare const RulesEngineSchemaVersion: {
|
|
3
|
-
readonly
|
|
3
|
+
readonly V94B8F7A7: "v94b8f7a7";
|
|
4
4
|
readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
|
|
5
5
|
};
|
|
6
6
|
export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
|
|
@@ -4,6 +4,7 @@ export interface RulesengineCompany {
|
|
|
4
4
|
basePlanId?: string;
|
|
5
5
|
billingProductIds: string[];
|
|
6
6
|
creditBalances: Record<string, number>;
|
|
7
|
+
creditPostpaid?: Record<string, Schematic.RulesengineCreditPostpaidConfig>;
|
|
7
8
|
entitlements?: Schematic.RulesengineFeatureEntitlement[];
|
|
8
9
|
environmentId: string;
|
|
9
10
|
id: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SlackConnectInviteStatus: {
|
|
2
|
+
readonly Accepted: "accepted";
|
|
3
|
+
readonly Declined: "declined";
|
|
4
|
+
readonly Dismissed: "dismissed";
|
|
5
|
+
readonly Expired: "expired";
|
|
6
|
+
readonly Pending: "pending";
|
|
7
|
+
};
|
|
8
|
+
export type SlackConnectInviteStatus = (typeof SlackConnectInviteStatus)[keyof typeof SlackConnectInviteStatus];
|
|
@@ -3,6 +3,12 @@ export interface StripeIntegrationConfig {
|
|
|
3
3
|
accountId?: string;
|
|
4
4
|
/** Display name of the connected Stripe account */
|
|
5
5
|
accountName?: string;
|
|
6
|
+
/** When Stripe deletes the sandbox if nobody claims it, 60 days from creation; absent on sandboxes created before it was recorded */
|
|
7
|
+
claimableSandboxExpiresAt?: Date;
|
|
8
|
+
/** Stripe claimable sandbox this connection was provisioned from; absent for an OAuth connect */
|
|
9
|
+
claimableSandboxId?: string;
|
|
10
|
+
/** Stripe's claim status for the sandbox: unclaimed, claimed, or live */
|
|
11
|
+
claimableSandboxStatus?: string;
|
|
6
12
|
/** When importing Stripe customers, only update existing companies, do not create new companies */
|
|
7
13
|
companyUpdateOnly?: boolean;
|
|
8
14
|
/** Whether the integration is connected to a Stripe sandbox account */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Schematic from "../index";
|
|
2
|
+
export interface StripeSandboxInstallResponseData {
|
|
3
|
+
apiKeys?: Schematic.StripeSandboxKeysResponseData;
|
|
4
|
+
claimUrl: string;
|
|
5
|
+
claimUrlExpiresAt?: Date;
|
|
6
|
+
expiresAt?: Date;
|
|
7
|
+
install: Schematic.IntegrationInstallResponseData;
|
|
8
|
+
sandboxId: string;
|
|
9
|
+
stripeAccountId: string;
|
|
10
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface TemporaryAccessTokenResponseData {
|
|
3
|
-
apiKeyId
|
|
3
|
+
apiKeyId?: string;
|
|
4
4
|
createdAt: Date;
|
|
5
5
|
environmentId: string;
|
|
6
6
|
expiredAt: Date;
|
|
7
7
|
id: string;
|
|
8
|
+
issuerType: Schematic.TemporaryAccessTokenIssuerType;
|
|
8
9
|
resourceType: Schematic.TemporaryAccessTokenResourceType;
|
|
9
10
|
updatedAt: Date;
|
|
10
11
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface UpdateBillingPlanCreditGrantRequestBody {
|
|
3
3
|
applyToExisting?: boolean;
|
|
4
|
+
/** Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default. */
|
|
5
|
+
arrearsAnchor?: Schematic.BillingArrearsAnchor;
|
|
6
|
+
/** How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default. */
|
|
7
|
+
arrearsCadence?: Schematic.BillingArrearsCadence;
|
|
4
8
|
autoTopupAmount?: number;
|
|
5
9
|
autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
|
|
6
10
|
autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
|
|
@@ -21,6 +25,14 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
|
|
|
21
25
|
expiryUnitCount?: number;
|
|
22
26
|
/** The license whose quantity scales this grant. Cleared when the grant moves off per-license scaling. */
|
|
23
27
|
licenseId?: string;
|
|
28
|
+
/** Optional limit on how far the balance may go below zero, in credits. It is a floor on the balance rather than an allowance per invoice window: the balance may run down to minus this figure, and beyond it the flag check denies the same way an exhausted balance does with postpaid off. Nothing resets when an invoice window rolls, so a company that reaches the limit stays denied until a new grant lands or the negative balance is settled. Send null to remove the limit. */
|
|
29
|
+
overdraftLimit?: number;
|
|
30
|
+
/** Whether consumption may continue past a zero balance. When false (the default) the flag check denies once the balance is exhausted, which is the existing behavior. When true, consumption continues and accrues at postpaid_rate_per_unit, settled on arrears_cadence. Intended for invoice-billed customers on net terms, who have no card for auto top-up to charge. */
|
|
31
|
+
postpaidEnabled?: boolean;
|
|
32
|
+
/** Amount charged per credit consumed past a zero balance, in the currency's minor unit. Send null to clear it, in which case an enabled grant falls back to the credit's own cost basis (price_per_unit). */
|
|
33
|
+
postpaidRatePerUnit?: number;
|
|
34
|
+
/** Decimal string form of postpaid_rate_per_unit, for rates finer than one minor unit (for example 0.0002). Takes precedence over postpaid_rate_per_unit when both are set, matching how the credit's own price_per_unit_decimal behaves. Send null to clear it. */
|
|
35
|
+
postpaidRatePerUnitDecimal?: string;
|
|
24
36
|
resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
|
|
25
37
|
resetStart: Schematic.BillingPlanCreditGrantResetStart;
|
|
26
38
|
resetType?: Schematic.BillingPlanCreditGrantResetType;
|
|
@@ -12,6 +12,8 @@ export * from "./ApiKeyScope";
|
|
|
12
12
|
export * from "./AuditLogExportMetadata";
|
|
13
13
|
export * from "./AuditLogListResponseData";
|
|
14
14
|
export * from "./AuditLogResponseData";
|
|
15
|
+
export * from "./BillingArrearsAnchor";
|
|
16
|
+
export * from "./BillingArrearsCadence";
|
|
15
17
|
export * from "./BillingCollectionMethod";
|
|
16
18
|
export * from "./BillingCouponResponseData";
|
|
17
19
|
export * from "./BillingCreditAutoTopupAvailability";
|
|
@@ -89,6 +91,7 @@ export * from "./CheckoutFieldValue";
|
|
|
89
91
|
export * from "./CheckoutFieldWithValue";
|
|
90
92
|
export * from "./CheckoutSettingsResponseData";
|
|
91
93
|
export * from "./CheckoutSubscription";
|
|
94
|
+
export * from "./ClaimedStripeSandboxKeysResponseData";
|
|
92
95
|
export * from "./ClerkIntegrationConfig";
|
|
93
96
|
export * from "./CompanyBillingAddressView";
|
|
94
97
|
export * from "./CompanyBillingCheckoutSettings";
|
|
@@ -96,6 +99,7 @@ export * from "./CompanyBillingDetailsResponseData";
|
|
|
96
99
|
export * from "./CompanyBillingDetailsView";
|
|
97
100
|
export * from "./CompanyBillingEntityResponseData";
|
|
98
101
|
export * from "./CompanyBillingEntitySubscriptionResponseData";
|
|
102
|
+
export * from "./CompanyBillingProfileResponseData";
|
|
99
103
|
export * from "./CompanyCreditBalance";
|
|
100
104
|
export * from "./CompanyCreditBalanceResponseData";
|
|
101
105
|
export * from "./CompanyDetailResponseData";
|
|
@@ -165,6 +169,8 @@ export * from "./CreditGrantDetail";
|
|
|
165
169
|
export * from "./CreditGrantExpiryRequestBody";
|
|
166
170
|
export * from "./CreditGrantSortOrder";
|
|
167
171
|
export * from "./CreditLeaseResponseData";
|
|
172
|
+
export * from "./CreditSpendPolicyResponseData";
|
|
173
|
+
export * from "./CreditSpendPolicyScope";
|
|
168
174
|
export * from "./CreditsAutoTopupCompanySummary";
|
|
169
175
|
export * from "./CreditsAutoTopupCreditSummary";
|
|
170
176
|
export * from "./CreditsAutoTopupHardFailure";
|
|
@@ -289,11 +295,15 @@ export * from "./OnboardingPath";
|
|
|
289
295
|
export * from "./OnboardingRequirement";
|
|
290
296
|
export * from "./OnboardingRequirementStatus";
|
|
291
297
|
export * from "./OnboardingRequirementView";
|
|
298
|
+
export * from "./OnboardingRoadmapView";
|
|
299
|
+
export * from "./OnboardingStripeImport";
|
|
292
300
|
export * from "./OnboardingTrack";
|
|
293
301
|
export * from "./OrbIntegrationConfig";
|
|
294
302
|
export * from "./OrderedPlansInGroup";
|
|
303
|
+
export * from "./OtlpEnvironmentSettingsResponseData";
|
|
295
304
|
export * from "./PaymentMethodRequestBody";
|
|
296
305
|
export * from "./PaymentMethodResponseData";
|
|
306
|
+
export * from "./PendingMigrationResponseData";
|
|
297
307
|
export * from "./PlanBillingSource";
|
|
298
308
|
export * from "./PlanBundleAction";
|
|
299
309
|
export * from "./PlanBundleCreditGrantRequestBody";
|
|
@@ -355,6 +365,7 @@ export * from "./Rule";
|
|
|
355
365
|
export * from "./RuleConditionDetailResponseData";
|
|
356
366
|
export * from "./RuleConditionGroupDetailResponseData";
|
|
357
367
|
export * from "./RuleConditionGroupResponseData";
|
|
368
|
+
export * from "./RuleConditionPlanVersionResponseData";
|
|
358
369
|
export * from "./RuleConditionResponseData";
|
|
359
370
|
export * from "./RuleDetailResponseData";
|
|
360
371
|
export * from "./RuleResponseData";
|
|
@@ -366,6 +377,7 @@ export * from "./RulesengineCompanyMetric";
|
|
|
366
377
|
export * from "./RulesengineCondition";
|
|
367
378
|
export * from "./RulesengineConditionGroup";
|
|
368
379
|
export * from "./RulesengineConditionType";
|
|
380
|
+
export * from "./RulesengineCreditPostpaidConfig";
|
|
369
381
|
export * from "./RulesengineEntitlementValueType";
|
|
370
382
|
export * from "./RulesengineEntityType";
|
|
371
383
|
export * from "./RulesengineFeatureEntitlement";
|
|
@@ -389,14 +401,21 @@ export * from "./ScheduledDowngradeResponseData";
|
|
|
389
401
|
export * from "./SegmentStatusResp";
|
|
390
402
|
export * from "./SkippedEntitlementErrorResponseData";
|
|
391
403
|
export * from "./SkippedEntitlementResponseData";
|
|
404
|
+
export * from "./SlackConnectInviteStatus";
|
|
405
|
+
export * from "./SlackConnectInviteView";
|
|
392
406
|
export * from "./SortDirection";
|
|
393
407
|
export * from "./StripeEmbedInfo";
|
|
394
408
|
export * from "./StripeIntegrationConfig";
|
|
409
|
+
export * from "./StripeSandboxClaimLink";
|
|
410
|
+
export * from "./StripeSandboxCountriesResponseData";
|
|
411
|
+
export * from "./StripeSandboxInstallResponseData";
|
|
412
|
+
export * from "./StripeSandboxKeysResponseData";
|
|
395
413
|
export * from "./SubscriptionStatus";
|
|
396
414
|
export * from "./SubscriptionTraitUpdate";
|
|
397
415
|
export * from "./SubscriptionType";
|
|
398
416
|
export * from "./TaxIdInput";
|
|
399
417
|
export * from "./TaxIdType";
|
|
418
|
+
export * from "./TemporaryAccessTokenIssuerType";
|
|
400
419
|
export * from "./TemporaryAccessTokenResourceType";
|
|
401
420
|
export * from "./TemporaryAccessTokenResponseData";
|
|
402
421
|
export * from "./TestWebhookResponseData";
|
|
@@ -30,11 +30,18 @@ export interface ILeaseStore {
|
|
|
30
30
|
* sharing the backend: if a live (unexpired) lease is already present —
|
|
31
31
|
* even one with a different `leaseId`, e.g. acquired by a sibling pod that
|
|
32
32
|
* raced this one — leave it untouched so its already-debited
|
|
33
|
-
* `localRemainingCredits` wins.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* `localRemainingCredits` wins. If the slot holds an *expired* row with
|
|
34
|
+
* the SAME `leaseId`, implementations must NOT rewrite it either:
|
|
35
|
+
* rewriting resets `localRemainingCredits` to the full grant, erasing
|
|
36
|
+
* debits whose reservations are still open (the idempotent server hands a
|
|
37
|
+
* racing acquire the same active lease back, and a stale response can
|
|
38
|
+
* land after the local row's expiry — especially when a concurrent extend
|
|
39
|
+
* pushed the server-side expiry forward). Instead, reconcile it like an
|
|
40
|
+
* extend: granted-to-total, expiry only forward, balance untouched.
|
|
41
|
+
* Returns `true` if it wrote a fresh row, `false` if it kept (or
|
|
42
|
+
* reconciled) an existing lease (the caller should release the lease it
|
|
43
|
+
* acquired ONLY if its ID differs from the installed one — releasing the
|
|
44
|
+
* shared lease would pull it out from under every sibling).
|
|
38
45
|
*/
|
|
39
46
|
replace(entry: Omit<LeaseEntry, "localRemainingCredits">): Promise<boolean>;
|
|
40
47
|
/**
|
|
@@ -98,9 +105,11 @@ export declare class LeaseStore implements ILeaseStore {
|
|
|
98
105
|
* Replace (or insert) the lease for the given (company, creditType).
|
|
99
106
|
* Resets `localRemainingCredits` to `grantedAmount` for a new lease.
|
|
100
107
|
* If a live lease already occupies the slot — regardless of `leaseId` — it
|
|
101
|
-
* is left alone so any already-debited `localRemainingCredits` wins.
|
|
102
|
-
*
|
|
103
|
-
*
|
|
108
|
+
* is left alone so any already-debited `localRemainingCredits` wins. If
|
|
109
|
+
* the slot holds an expired row with the SAME `leaseId`, the entry is
|
|
110
|
+
* reconciled (granted-to-total, expiry forward) instead of rewritten —
|
|
111
|
+
* see `ILeaseStore.replace`. Returns `true` if a fresh row was written,
|
|
112
|
+
* `false` if an existing lease was kept.
|
|
104
113
|
*/
|
|
105
114
|
replace(entry: Omit<LeaseEntry, "localRemainingCredits">): Promise<boolean>;
|
|
106
115
|
/**
|