@schematichq/schematic-typescript-node 1.5.8 → 1.5.10
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/README.md +1 -1
- package/dist/BaseClient.d.ts +12 -0
- package/dist/Client.d.ts +3 -0
- package/dist/api/errors/BadRequestError.d.ts +1 -0
- package/dist/api/errors/ForbiddenError.d.ts +1 -0
- package/dist/api/errors/InternalServerError.d.ts +1 -0
- package/dist/api/errors/NotFoundError.d.ts +1 -0
- package/dist/api/errors/UnauthorizedError.d.ts +1 -0
- package/dist/api/resources/accesstokens/client/Client.d.ts +2 -0
- package/dist/api/resources/accounts/client/Client.d.ts +70 -0
- package/dist/api/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +11 -0
- package/dist/api/resources/accounts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/accounts/types/GetOnboardingStateResponse.d.ts +6 -0
- package/dist/api/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +6 -0
- package/dist/api/resources/accounts/types/index.d.ts +2 -0
- package/dist/api/resources/billing/client/Client.d.ts +48 -0
- package/dist/api/resources/catalogs/client/Client.d.ts +28 -0
- package/dist/api/resources/checkout/client/Client.d.ts +18 -0
- package/dist/api/resources/companies/client/Client.d.ts +139 -3
- package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +3 -0
- package/dist/api/resources/companies/client/requests/CountEntityTraitsRequest.d.ts +18 -0
- package/dist/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.d.ts +1 -1
- package/dist/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.d.ts +1 -1
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +3 -0
- package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +0 -2
- package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
- package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
- package/dist/api/resources/companies/types/CountEntityTraitsParams.d.ts +12 -0
- package/dist/api/resources/companies/types/CountEntityTraitsResponse.d.ts +6 -0
- package/dist/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +6 -0
- package/dist/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +6 -0
- package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
- package/dist/api/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
- package/dist/api/resources/companies/types/index.d.ts +4 -0
- package/dist/api/resources/components/client/Client.d.ts +16 -0
- package/dist/api/resources/componentspublic/client/Client.d.ts +2 -0
- package/dist/api/resources/credits/client/Client.d.ts +62 -2
- package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +1 -1
- package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -0
- package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +1 -1
- package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +2 -0
- package/dist/api/resources/dataexports/client/Client.d.ts +8 -0
- package/dist/api/resources/entitlements/client/Client.d.ts +73 -0
- package/dist/api/resources/entitlements/client/requests/ListFeatureUsageHistoryRequest.d.ts +29 -0
- package/dist/api/resources/entitlements/client/requests/index.d.ts +1 -0
- package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +20 -0
- package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +6 -0
- package/dist/api/resources/entitlements/types/index.d.ts +2 -0
- package/dist/api/resources/events/client/Client.d.ts +12 -0
- package/dist/api/resources/features/client/Client.d.ts +34 -0
- package/dist/api/resources/insights/client/Client.d.ts +12 -0
- package/dist/api/resources/integrationsapi/client/Client.d.ts +18 -0
- package/dist/api/resources/licenses/client/Client.d.ts +6 -0
- package/dist/api/resources/planbundle/client/Client.d.ts +27 -6
- package/dist/api/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +11 -3
- package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +6 -2
- package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +5 -2
- package/dist/api/resources/plangroups/client/Client.d.ts +8 -0
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
- package/dist/api/resources/planmigrations/client/Client.d.ts +22 -8
- 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 +4 -6
- 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/PreviewMigrationRequestBody.d.ts +2 -2
- package/dist/api/resources/plans/client/Client.d.ts +46 -12
- package/dist/api/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -2
- package/dist/api/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +2 -2
- package/dist/api/resources/plans/client/requests/ListCustomPlanBillingsRequest.d.ts +3 -0
- package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
- package/dist/api/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
- package/dist/api/resources/scheduledcheckout/client/Client.d.ts +8 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +20 -0
- package/dist/api/types/AuditLogResponseData.d.ts +1 -0
- package/dist/api/types/BillingCollectionMethod.d.ts +5 -0
- package/dist/api/types/BillingCreditBundleResponseData.d.ts +2 -0
- package/dist/api/types/BillingCreditBundleView.d.ts +1 -0
- package/dist/api/types/BillingCreditGrantResponseData.d.ts +4 -0
- package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +3 -1
- package/dist/api/types/CheckFlagRequestBody.d.ts +3 -0
- package/dist/api/types/CheckoutBundlePurchaseBehavior.d.ts +5 -0
- package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/api/types/CompanyBillingCheckoutSettings.d.ts +1 -0
- package/dist/api/types/CompanyFeatureUsageExportMetadata.d.ts +6 -0
- package/dist/api/types/CompanyPlanCreditGrantView.d.ts +1 -0
- package/dist/api/types/ComponentCheckoutSettings.d.ts +2 -0
- package/dist/api/types/ComponentHydrateResponseData.d.ts +1 -1
- package/dist/api/types/ComponentPreviewResponseData.d.ts +1 -1
- package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
- package/dist/api/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
- package/dist/api/types/CreatePlanRequestBody.d.ts +1 -1
- package/dist/api/types/CreditCompanyGrantView.d.ts +2 -0
- package/dist/api/types/CustomPlanBillingResponseData.d.ts +4 -0
- package/dist/api/types/EntityTraitDefinitionUsage.d.ts +8 -0
- package/dist/api/types/EventBodyFlagCheck.d.ts +2 -0
- package/dist/api/types/FeatureUsageHistoryResponseData.d.ts +12 -0
- package/dist/api/types/GetOnboardingStateResp.d.ts +9 -0
- package/dist/api/types/ManagePlanRequest.d.ts +14 -0
- package/dist/api/types/MigrationProrationBehavior.d.ts +6 -0
- package/dist/api/types/OnboardingMilestone.d.ts +5 -0
- package/dist/api/types/OnboardingMilestoneView.d.ts +7 -0
- package/dist/api/types/OnboardingPath.d.ts +5 -0
- package/dist/api/types/OnboardingRequirement.d.ts +9 -0
- package/dist/api/types/OnboardingRequirementStatus.d.ts +6 -0
- package/dist/api/types/OnboardingRequirementView.d.ts +8 -0
- package/dist/api/types/OnboardingTrack.d.ts +5 -0
- package/dist/api/types/PlanBillingSource.d.ts +5 -0
- package/dist/api/types/PlanBundleResponseData.d.ts +1 -0
- package/dist/api/types/PlanChangeResponseData.d.ts +6 -0
- package/dist/api/types/PlanCreditGrantView.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
- package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
- package/dist/api/types/PreflightEventUsageRequestBody.d.ts +6 -0
- package/dist/api/types/PreflightRequestBody.d.ts +9 -0
- package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -0
- package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/api/types/StripeIntegrationConfig.d.ts +2 -0
- package/dist/api/types/UpcomingInvoiceResponseData.d.ts +23 -0
- package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +5 -2
- package/dist/api/types/UpsertCompanyRequestBody.d.ts +2 -0
- package/dist/api/types/UpsertUserRequestBody.d.ts +2 -0
- package/dist/api/types/UpsertUserSubRequestBody.d.ts +2 -0
- package/dist/api/types/WhoAmIResponseData.d.ts +1 -0
- package/dist/api/types/index.d.ts +17 -0
- package/dist/core/fetcher/redactUrl.d.ts +2 -0
- package/dist/core/requestBody.d.ts +12 -0
- package/dist/core/runtime/index.d.ts +1 -1
- package/dist/core/runtime/runtime.d.ts +19 -0
- package/dist/errors/SchematicError.d.ts +1 -0
- package/dist/errors/SchematicTimeoutError.d.ts +2 -2
- package/dist/events.d.ts +6 -0
- package/dist/index.js +9 -9
- package/dist/serialization/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +14 -0
- package/dist/serialization/resources/accounts/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/accounts/types/GetOnboardingStateResponse.d.ts +11 -0
- package/dist/serialization/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +11 -0
- package/dist/serialization/resources/accounts/types/index.d.ts +2 -0
- package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/CountEntityTraitsParams.d.ts +13 -0
- package/dist/serialization/resources/companies/types/CountEntityTraitsResponse.d.ts +12 -0
- package/dist/serialization/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +11 -0
- package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +11 -0
- package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
- package/dist/serialization/resources/companies/types/index.d.ts +4 -0
- package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -0
- package/dist/serialization/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +16 -0
- package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +12 -0
- package/dist/serialization/resources/entitlements/types/index.d.ts +2 -0
- package/dist/serialization/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +2 -2
- package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +1 -1
- package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +1 -1
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +5 -3
- package/dist/serialization/resources/planmigrations/client/requests/PreviewMigrationRequestBody.d.ts +2 -1
- package/dist/serialization/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -1
- package/dist/serialization/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +2 -1
- package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
- package/dist/serialization/types/AuditLogResponseData.d.ts +1 -0
- package/dist/serialization/types/BillingCollectionMethod.d.ts +7 -0
- package/dist/serialization/types/BillingCreditBundleResponseData.d.ts +1 -0
- package/dist/serialization/types/BillingCreditBundleView.d.ts +1 -0
- package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +1 -0
- package/dist/serialization/types/CheckFlagRequestBody.d.ts +2 -0
- package/dist/serialization/types/CheckoutBundlePurchaseBehavior.d.ts +7 -0
- package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/serialization/types/CompanyBillingCheckoutSettings.d.ts +1 -0
- package/dist/serialization/types/CompanyFeatureUsageExportMetadata.d.ts +3 -0
- package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +1 -0
- package/dist/serialization/types/ComponentCheckoutSettings.d.ts +3 -0
- package/dist/serialization/types/ComponentHydrateResponseData.d.ts +2 -2
- package/dist/serialization/types/ComponentPreviewResponseData.d.ts +2 -1
- package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +1 -0
- package/dist/serialization/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
- package/dist/serialization/types/CreatePlanRequestBody.d.ts +1 -1
- package/dist/serialization/types/CreditCompanyGrantView.d.ts +2 -0
- package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +3 -0
- package/dist/serialization/types/EntityTraitDefinitionUsage.d.ts +14 -0
- package/dist/serialization/types/EventBodyFlagCheck.d.ts +1 -0
- package/dist/serialization/types/FeatureUsageHistoryResponseData.d.ts +14 -0
- package/dist/serialization/types/GetOnboardingStateResp.d.ts +19 -0
- package/dist/serialization/types/ManagePlanRequest.d.ts +8 -0
- package/dist/serialization/types/MigrationProrationBehavior.d.ts +7 -0
- package/dist/serialization/types/OnboardingMilestone.d.ts +7 -0
- package/dist/serialization/types/OnboardingMilestoneView.d.ts +14 -0
- package/dist/serialization/types/OnboardingPath.d.ts +7 -0
- package/dist/serialization/types/OnboardingRequirement.d.ts +7 -0
- package/dist/serialization/types/OnboardingRequirementStatus.d.ts +7 -0
- package/dist/serialization/types/OnboardingRequirementView.d.ts +15 -0
- package/dist/serialization/types/OnboardingTrack.d.ts +7 -0
- package/dist/serialization/types/PlanBillingSource.d.ts +7 -0
- package/dist/serialization/types/PlanBundleResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanChangeResponseData.d.ts +4 -0
- package/dist/serialization/types/PlanCreditGrantView.d.ts +1 -0
- package/dist/serialization/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +2 -0
- package/dist/serialization/types/PreflightEventUsageRequestBody.d.ts +10 -0
- package/dist/serialization/types/PreflightRequestBody.d.ts +12 -0
- package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -0
- package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/serialization/types/StripeIntegrationConfig.d.ts +1 -0
- package/dist/serialization/types/UpcomingInvoiceResponseData.d.ts +30 -0
- package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertCompanyRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertUserRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/dist/serialization/types/WhoAmIResponseData.d.ts +1 -0
- package/dist/serialization/types/index.d.ts +17 -0
- package/dist/wasm/rulesengine.js +4 -4
- package/package.json +4 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Schematic from "../index";
|
|
2
|
+
export interface PreflightRequestBody {
|
|
3
|
+
/** Cost in credits of the action, keyed by credit ID, for callers that have already computed it. Takes precedence over usage and event_usage on credit balance conditions for the same credit. A cost of zero means the action is free, not that the input is absent */
|
|
4
|
+
creditCost?: Record<string, number>;
|
|
5
|
+
/** Usage of a specific event subtype. Preferred over usage when the subtype is known, since it only affects conditions measuring that subtype */
|
|
6
|
+
eventUsage?: Schematic.PreflightEventUsageRequestBody;
|
|
7
|
+
/** Quantity of usage to simulate against any numeric condition encountered while evaluating the flag. Zero has no effect */
|
|
8
|
+
usage?: number;
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as Schematic from "../index";
|
|
2
2
|
export interface PreviewSubscriptionFinanceResponseData {
|
|
3
3
|
amountOff: number;
|
|
4
|
+
discountAmount: number;
|
|
4
5
|
discounts: Schematic.PreviewSubscriptionDiscountResponseData[];
|
|
5
6
|
dueNow: number;
|
|
6
7
|
newCharges: number;
|
|
@@ -9,6 +10,7 @@ export interface PreviewSubscriptionFinanceResponseData {
|
|
|
9
10
|
periodStart: Date;
|
|
10
11
|
promoCodeApplied: boolean;
|
|
11
12
|
proration: number;
|
|
13
|
+
prorationBilledAt?: Date;
|
|
12
14
|
taxAmount?: number;
|
|
13
15
|
taxDisplayName?: string;
|
|
14
16
|
taxRequireBillingDetails: boolean;
|
|
@@ -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 Vc8Eb8Df4: "vc8eb8df4";
|
|
4
4
|
readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
|
|
5
5
|
};
|
|
6
6
|
export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
|
|
@@ -11,4 +11,6 @@ export interface StripeIntegrationConfig {
|
|
|
11
11
|
liveMode: boolean;
|
|
12
12
|
/** Onboarding URL returned during the v2 (Connect) install flow before activation */
|
|
13
13
|
onboardUrl?: string;
|
|
14
|
+
/** App location that started the connect flow; the OAuth callback redirects back there on success */
|
|
15
|
+
returnTo?: string;
|
|
14
16
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as Schematic from "../index";
|
|
2
|
+
export interface UpcomingInvoiceResponseData {
|
|
3
|
+
amountDue: number;
|
|
4
|
+
amountPaid: number;
|
|
5
|
+
amountRemaining: number;
|
|
6
|
+
collectionMethod: string;
|
|
7
|
+
companyId?: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
currency: string;
|
|
10
|
+
customerExternalId: string;
|
|
11
|
+
dueDate?: Date;
|
|
12
|
+
endingBalance: number;
|
|
13
|
+
environmentId: string;
|
|
14
|
+
externalId?: string;
|
|
15
|
+
paymentMethodExternalId?: string;
|
|
16
|
+
providerType: Schematic.BillingProviderType;
|
|
17
|
+
startingBalance: number;
|
|
18
|
+
status?: Schematic.InvoiceStatus;
|
|
19
|
+
subscriptionExternalId?: string;
|
|
20
|
+
subtotal: number;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
url?: string;
|
|
23
|
+
}
|
|
@@ -11,18 +11,21 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
|
|
|
11
11
|
autoTopupSelfService?: boolean;
|
|
12
12
|
autoTopupThresholdCredits?: number;
|
|
13
13
|
autoTopupThresholdPercent?: number;
|
|
14
|
+
/** Deprecated: use compatible_plan_ids on credit bundles instead. Still accepted; writes through to the credit's bundle compatibility. */
|
|
14
15
|
canBuyBundles?: boolean;
|
|
16
|
+
/** Credits granted once per company on top of the per-license amount. Only valid when the grant scales per license. */
|
|
17
|
+
companyCreditAmount?: number;
|
|
15
18
|
creditAmount?: number;
|
|
16
19
|
expiryType?: Schematic.BillingCreditExpiryType;
|
|
17
20
|
expiryUnit?: Schematic.BillingCreditExpiryUnit;
|
|
18
21
|
expiryUnitCount?: number;
|
|
19
|
-
/** The license whose quantity scales this grant.
|
|
22
|
+
/** The license whose quantity scales this grant. Cleared when the grant moves off per-license scaling. */
|
|
20
23
|
licenseId?: string;
|
|
21
24
|
resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
|
|
22
25
|
resetStart: Schematic.BillingPlanCreditGrantResetStart;
|
|
23
26
|
resetType?: Schematic.BillingPlanCreditGrantResetType;
|
|
24
27
|
/** Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. */
|
|
25
28
|
rolloverPercentage?: number;
|
|
26
|
-
/** Whether the grant is a fixed amount per company, or issued once per license the company holds.
|
|
29
|
+
/** Whether the grant is a fixed amount per company, or issued once per license the company holds. Changing this re-issues the credits companies already hold for this grant. */
|
|
27
30
|
scaling?: Schematic.PlanCreditGrantScaling;
|
|
28
31
|
}
|
|
@@ -10,6 +10,8 @@ export interface UpsertCompanyRequestBody {
|
|
|
10
10
|
lastSeenAt?: Date;
|
|
11
11
|
name?: string;
|
|
12
12
|
preventKeyRemap?: boolean;
|
|
13
|
+
/** Names of keys to remove from the company. Removing a key the company does not have does nothing, and a company must keep at least one key. */
|
|
14
|
+
removeKeys?: string[];
|
|
13
15
|
/** A map of trait names to trait values */
|
|
14
16
|
traits?: Record<string, unknown>;
|
|
15
17
|
updateOnly?: boolean;
|
|
@@ -13,6 +13,8 @@ export interface UpsertUserRequestBody {
|
|
|
13
13
|
keys: Record<string, string>;
|
|
14
14
|
lastSeenAt?: Date;
|
|
15
15
|
name?: string;
|
|
16
|
+
/** Names of keys to remove from the user. Removing a key the user does not have does nothing, and a user must keep at least one key. */
|
|
17
|
+
removeKeys?: string[];
|
|
16
18
|
/** A map of trait names to trait values */
|
|
17
19
|
traits?: Record<string, unknown>;
|
|
18
20
|
updateOnly?: boolean;
|
|
@@ -9,6 +9,8 @@ export interface UpsertUserSubRequestBody {
|
|
|
9
9
|
keys: Record<string, string>;
|
|
10
10
|
lastSeenAt?: Date;
|
|
11
11
|
name?: string;
|
|
12
|
+
/** Names of keys to remove from the user. Removing a key the user does not have does nothing, and a user must keep at least one key. */
|
|
13
|
+
removeKeys?: string[];
|
|
12
14
|
/** A map of trait names to trait values */
|
|
13
15
|
traits?: Record<string, unknown>;
|
|
14
16
|
updateOnly?: boolean;
|
|
@@ -12,6 +12,7 @@ export * from "./ApiKeyScope";
|
|
|
12
12
|
export * from "./AuditLogExportMetadata";
|
|
13
13
|
export * from "./AuditLogListResponseData";
|
|
14
14
|
export * from "./AuditLogResponseData";
|
|
15
|
+
export * from "./BillingCollectionMethod";
|
|
15
16
|
export * from "./BillingCouponResponseData";
|
|
16
17
|
export * from "./BillingCreditAutoTopupAvailability";
|
|
17
18
|
export * from "./BillingCreditBundleResponseData";
|
|
@@ -80,6 +81,7 @@ export * from "./CheckFlagRequestBody";
|
|
|
80
81
|
export * from "./CheckFlagResponseData";
|
|
81
82
|
export * from "./CheckFlagsBulkResponseData";
|
|
82
83
|
export * from "./CheckFlagsResponseData";
|
|
84
|
+
export * from "./CheckoutBundlePurchaseBehavior";
|
|
83
85
|
export * from "./CheckoutDataResponseData";
|
|
84
86
|
export * from "./CheckoutFieldInput";
|
|
85
87
|
export * from "./CheckoutFieldResponseData";
|
|
@@ -204,6 +206,7 @@ export * from "./EntityKeyDefinitionResponseData";
|
|
|
204
206
|
export * from "./EntityKeyDetailResponseData";
|
|
205
207
|
export * from "./EntityKeyResponseData";
|
|
206
208
|
export * from "./EntityTraitDefinitionResponseData";
|
|
209
|
+
export * from "./EntityTraitDefinitionUsage";
|
|
207
210
|
export * from "./EntityTraitDetailResponseData";
|
|
208
211
|
export * from "./EntityTraitResponseData";
|
|
209
212
|
export * from "./EntityTraitValue";
|
|
@@ -237,6 +240,7 @@ export * from "./FeatureLifecyclePhase";
|
|
|
237
240
|
export * from "./FeatureResponseData";
|
|
238
241
|
export * from "./FeatureType";
|
|
239
242
|
export * from "./FeatureUsageDetailResponseData";
|
|
243
|
+
export * from "./FeatureUsageHistoryResponseData";
|
|
240
244
|
export * from "./FeatureUsageLegacyResponseData";
|
|
241
245
|
export * from "./FeatureUsageResponseData";
|
|
242
246
|
export * from "./FeatureUsageTimeSeriesResponseData";
|
|
@@ -247,6 +251,7 @@ export * from "./FlagResponseData";
|
|
|
247
251
|
export * from "./FlagType";
|
|
248
252
|
export * from "./FlagView";
|
|
249
253
|
export * from "./GenericPreviewObject";
|
|
254
|
+
export * from "./GetOnboardingStateResp";
|
|
250
255
|
export * from "./InsightsSummaryResponseData";
|
|
251
256
|
export * from "./InstallIntegrationRequestBody";
|
|
252
257
|
export * from "./IntegrationCapabilities";
|
|
@@ -276,11 +281,20 @@ export * from "./MetricPeriod";
|
|
|
276
281
|
export * from "./MetricPeriodMonthReset";
|
|
277
282
|
export * from "./MetronomeIntegrationConfig";
|
|
278
283
|
export * from "./MigrationErrorCode";
|
|
284
|
+
export * from "./MigrationProrationBehavior";
|
|
279
285
|
export * from "./MrrResponseData";
|
|
286
|
+
export * from "./OnboardingMilestone";
|
|
287
|
+
export * from "./OnboardingMilestoneView";
|
|
288
|
+
export * from "./OnboardingPath";
|
|
289
|
+
export * from "./OnboardingRequirement";
|
|
290
|
+
export * from "./OnboardingRequirementStatus";
|
|
291
|
+
export * from "./OnboardingRequirementView";
|
|
292
|
+
export * from "./OnboardingTrack";
|
|
280
293
|
export * from "./OrbIntegrationConfig";
|
|
281
294
|
export * from "./OrderedPlansInGroup";
|
|
282
295
|
export * from "./PaymentMethodRequestBody";
|
|
283
296
|
export * from "./PaymentMethodResponseData";
|
|
297
|
+
export * from "./PlanBillingSource";
|
|
284
298
|
export * from "./PlanBundleAction";
|
|
285
299
|
export * from "./PlanBundleCreditGrantRequestBody";
|
|
286
300
|
export * from "./PlanBundleEntitlementRequestBody";
|
|
@@ -323,6 +337,8 @@ export * from "./PlanVersionResponseData";
|
|
|
323
337
|
export * from "./PlanVersionSnapshotView";
|
|
324
338
|
export * from "./PlanVersionStatus";
|
|
325
339
|
export * from "./PlanViewPublicResponseData";
|
|
340
|
+
export * from "./PreflightEventUsageRequestBody";
|
|
341
|
+
export * from "./PreflightRequestBody";
|
|
326
342
|
export * from "./PreviewObject";
|
|
327
343
|
export * from "./PreviewObjectResponseData";
|
|
328
344
|
export * from "./PreviewSubscriptionChangeResponseData";
|
|
@@ -391,6 +407,7 @@ export * from "./TraitDefinition";
|
|
|
391
407
|
export * from "./TraitDefinitionComparableType";
|
|
392
408
|
export * from "./TraitType";
|
|
393
409
|
export * from "./TrialStatus";
|
|
410
|
+
export * from "./UpcomingInvoiceResponseData";
|
|
394
411
|
export * from "./UpdateAddOnRequestBody";
|
|
395
412
|
export * from "./UpdateAutoTopupOverrideRequestBody";
|
|
396
413
|
export * from "./UpdateBillingPlanCreditGrantRequestBody";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spreads caller-supplied `additionalBodyParameters` (from `requestOptions.additionalBodyParameters`)
|
|
3
|
+
* on top of the request body. Caller-supplied properties win over the endpoint body. When no
|
|
4
|
+
* additional body parameters are provided, the original body is returned unchanged so serialization
|
|
5
|
+
* is unaffected.
|
|
6
|
+
*
|
|
7
|
+
* The merge only applies to plain-object (JSON object) bodies. When the body is `null`/`undefined`
|
|
8
|
+
* the additional parameters become the body; when the body is an array or a primitive JSON value it
|
|
9
|
+
* is returned unchanged, since object properties cannot be spread into it. This mirrors the Python
|
|
10
|
+
* SDK, which only merges additional body parameters into mapping bodies.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeAdditionalBodyParameters(body: unknown, additionalBodyParameters: Record<string, unknown> | undefined): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RUNTIME } from "./runtime";
|
|
1
|
+
export { getUserAgent, RUNTIME } from "./runtime";
|
|
@@ -6,4 +6,23 @@ export interface Runtime {
|
|
|
6
6
|
type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
|
|
7
7
|
version?: string;
|
|
8
8
|
parsedVersion?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The operating system the SDK is running on, when it can be determined
|
|
11
|
+
* (e.g. "linux", "darwin", "win32" on server runtimes). Undefined in
|
|
12
|
+
* environments where the OS is not observable (e.g. browsers).
|
|
13
|
+
*/
|
|
14
|
+
os?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The CPU architecture the SDK is running on, when it can be determined
|
|
17
|
+
* (e.g. "x64", "arm64" on server runtimes). Undefined in environments where
|
|
18
|
+
* the architecture is not observable (e.g. browsers).
|
|
19
|
+
*/
|
|
20
|
+
arch?: string;
|
|
9
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds a structured User-Agent string of the form
|
|
24
|
+
* `{sdkName}/{sdkVersion} ({os}; {arch}) {runtime}/{runtimeVersion}`
|
|
25
|
+
* where the platform group and runtime segment are omitted gracefully when the
|
|
26
|
+
* underlying values cannot be determined (e.g. in a browser).
|
|
27
|
+
*/
|
|
28
|
+
export declare function getUserAgent(sdkName: string, sdkVersion: string): string;
|
package/dist/events.d.ts
CHANGED
|
@@ -24,6 +24,12 @@ declare class EventBuffer {
|
|
|
24
24
|
private flushing;
|
|
25
25
|
constructor(captureClient: EventCaptureClient, opts?: EventBufferOptions);
|
|
26
26
|
flush(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Sends a single request's worth of events, retrying with exponential
|
|
29
|
+
* backoff. Failures are logged and the chunk is dropped, matching the
|
|
30
|
+
* buffer's contract that tracking never throws to the caller.
|
|
31
|
+
*/
|
|
32
|
+
private sendChunk;
|
|
27
33
|
push(event: CreateEventRequestBody): Promise<void>;
|
|
28
34
|
stop(): Promise<void>;
|
|
29
35
|
private startPeriodicFlush;
|