From d0a7d04fd58eb8bc0268858e1facc9641a9c936d Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:45:53 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 8 +- .fern/verify.sh | 5 + package.json | 4 +- reference.md | 12 ++ src/BaseClient.ts | 29 ++- src/api/resources/checkout/client/Client.ts | 6 + src/api/resources/credits/client/Client.ts | 8 +- .../CountBillingPlanCreditGrantsRequest.ts | 2 + .../ListBillingPlanCreditGrantsRequest.ts | 2 + .../CountBillingPlanCreditGrantsParams.ts | 1 + .../ListBillingPlanCreditGrantsParams.ts | 1 + src/api/resources/features/client/Client.ts | 12 ++ .../client/requests/CountFeaturesRequest.ts | 3 + .../client/requests/ListFeaturesRequest.ts | 3 + .../features/types/CountFeaturesParams.ts | 2 + .../features/types/ListFeaturesParams.ts | 2 + src/api/resources/plans/client/Client.ts | 6 + .../client/requests/CountPlansRequest.ts | 3 + .../plans/client/requests/ListPlansRequest.ts | 3 + .../resources/plans/types/CountPlansParams.ts | 2 + .../resources/plans/types/ListPlansParams.ts | 2 + src/api/types/ApiKeyCreateResponseData.ts | 1 + .../types/ApiKeyIntegrationResponseData.ts | 9 + src/api/types/ApiKeyResponseData.ts | 1 + src/api/types/AuditLogListResponseData.ts | 1 + src/api/types/AuditLogResponseData.ts | 1 + .../BillingPlanCreditGrantResponseData.ts | 1 + .../ChangeSubscriptionInternalRequestBody.ts | 1 + .../types/ChangeSubscriptionRequestBody.ts | 1 + src/api/types/CompanyPlanCreditGrantView.ts | 43 ++++ .../types/CompanyPlanWithBillingSubView.ts | 2 +- ...CreateBillingPlanCreditGrantRequestBody.ts | 1 + ...atePlanEntitlementsResponseResponseData.ts | 1 + src/api/types/EventDetailResponseData.ts | 1 + src/api/types/PlanCreditGrantView.ts | 1 + .../UpdateAutoTopupOverrideRequestBody.ts | 8 + ...UpdateBillingPlanCreditGrantRequestBody.ts | 1 + src/api/types/index.ts | 3 + src/core/auth/AuthProvider.ts | 9 + src/core/auth/index.ts | 2 +- src/core/fetcher/requestWithRetries.ts | 6 +- .../CountBillingPlanCreditGrantsParams.ts | 5 + .../ListBillingPlanCreditGrantsParams.ts | 5 + .../features/types/CountFeaturesParams.ts | 3 + .../features/types/ListFeaturesParams.ts | 3 + .../resources/plans/types/CountPlansParams.ts | 2 + .../resources/plans/types/ListPlansParams.ts | 2 + .../types/ApiKeyCreateResponseData.ts | 3 + .../types/ApiKeyIntegrationResponseData.ts | 24 +++ src/serialization/types/ApiKeyResponseData.ts | 3 + .../types/AuditLogListResponseData.ts | 3 + .../types/AuditLogResponseData.ts | 3 + .../BillingPlanCreditGrantResponseData.ts | 2 + .../ChangeSubscriptionInternalRequestBody.ts | 6 + .../types/ChangeSubscriptionRequestBody.ts | 6 + .../types/CompanyPlanCreditGrantView.ts | 123 ++++++++++++ .../types/CompanyPlanWithBillingSubView.ts | 6 +- ...CreateBillingPlanCreditGrantRequestBody.ts | 5 + ...atePlanEntitlementsResponseResponseData.ts | 3 + .../types/EventDetailResponseData.ts | 3 + .../types/PlanCreditGrantView.ts | 5 + .../UpdateAutoTopupOverrideRequestBody.ts | 27 +++ ...UpdateBillingPlanCreditGrantRequestBody.ts | 5 + src/serialization/types/index.ts | 3 + .../fetcher/makePassthroughRequest.test.ts | 2 +- tests/unit/fetcher/requestWithRetries.test.ts | 66 +++++- tests/wire/accounts.test.ts | 82 ++++++++ tests/wire/checkout.test.ts | 148 ++++++++++++++ tests/wire/companies.test.ts | 90 +++++++++ tests/wire/components.test.ts | 12 ++ tests/wire/componentspublic.test.ts | 4 + tests/wire/credits.test.ts | 14 ++ tests/wire/entitlements.test.ts | 25 +++ tests/wire/events.test.ts | 58 ++++++ tests/wire/features.test.ts | 6 + tests/wire/planbundle.test.ts | 4 + tests/wire/plangroups.test.ts | 8 + tests/wire/plans.test.ts | 26 +++ yarn.lock | 190 +++++++++--------- 79 files changed, 1076 insertions(+), 119 deletions(-) create mode 100755 .fern/verify.sh create mode 100644 src/api/types/ApiKeyIntegrationResponseData.ts create mode 100644 src/api/types/CompanyPlanCreditGrantView.ts create mode 100644 src/api/types/UpdateAutoTopupOverrideRequestBody.ts create mode 100644 src/serialization/types/ApiKeyIntegrationResponseData.ts create mode 100644 src/serialization/types/CompanyPlanCreditGrantView.ts create mode 100644 src/serialization/types/UpdateAutoTopupOverrideRequestBody.ts diff --git a/.fern/metadata.json b/.fern/metadata.json index 064dc683..ff8a4a7d 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.6.0", "generatorName": "fernapi/fern-typescript-node-sdk", - "generatorVersion": "3.66.6", + "generatorVersion": "3.70.5", "generatorConfig": { "allowCustomFetcher": true, "includeApiReference": true, @@ -52,10 +52,10 @@ ] } }, - "originGitCommit": "e82d22946ead3625acd2ff64d8017582cdb1b791", + "originGitCommit": "4fd82021eff164a6f2484d4504850c46fe8f4a95", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "1.4.7", + "requestedVersion": "1.4.6", "ciProvider": "github", - "sdkVersion": "1.4.7" + "sdkVersion": "1.4.6" } diff --git a/.fern/verify.sh b/.fern/verify.sh new file mode 100755 index 00000000..6d2cc0ea --- /dev/null +++ b/.fern/verify.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -euo pipefail +yarn install +yarn build +yarn test diff --git a/package.json b/package.json index 5cc67b0e..e080354f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@schematichq/schematic-typescript-node", - "version": "1.4.7", + "version": "1.4.6", "private": false, "repository": { "type": "git", @@ -42,7 +42,7 @@ "ts-jest": "^29.3.4", "jest-environment-jsdom": "^29.7.0", "msw": "2.11.2", - "@types/node": "^18.19.70", + "@types/node": "^20.0.0", "typescript": "~5.9.3", "@biomejs/biome": "2.4.10", "esbuild": "^0.25.9", diff --git a/reference.md b/reference.md index f90d9d48..c195a5d2 100644 --- a/reference.md +++ b/reference.md @@ -3229,6 +3229,7 @@ await client.credits.listBillingPlanCreditGrants({ planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], limit: 1000000, offset: 1000000 }); @@ -3509,6 +3510,7 @@ await client.credits.countBillingPlanCreditGrants({ planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], limit: 1000000, offset: 1000000 }); @@ -3682,6 +3684,9 @@ await client.checkout.internal({ addOnId: "add_on_id", priceId: "price_id" }], + autoTopupOverrides: [{ + planCreditGrantId: "plan_credit_grant_id" + }], companyId: "company_id", creditBundles: [{ bundleId: "bundle_id", @@ -3799,6 +3804,9 @@ await client.checkout.previewCheckoutInternal({ addOnId: "add_on_id", priceId: "price_id" }], + autoTopupOverrides: [{ + planCreditGrantId: "plan_credit_grant_id" + }], companyId: "company_id", creditBundles: [{ bundleId: "bundle_id", @@ -7511,6 +7519,7 @@ await client.plans.createCustomPlan({ ```typescript await client.plans.listPlans({ companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, @@ -8019,6 +8028,7 @@ await client.plans.countBillingProductMatchCompanies({ ```typescript await client.plans.countPlans({ companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, @@ -9036,6 +9046,7 @@ await client.features.listFeatures({ booleanRequireEvent: true, featureType: ["boolean"], ids: ["ids"], + managedBy: "orb", planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", @@ -9358,6 +9369,7 @@ await client.features.countFeatures({ booleanRequireEvent: true, featureType: ["boolean"], ids: ["ids"], + managedBy: "orb", planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", diff --git a/src/BaseClient.ts b/src/BaseClient.ts index d08ba039..74307b56 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -5,6 +5,12 @@ import * as core from "./core"; import { mergeHeaders } from "./core/headers"; import type * as environments from "./environments"; +export type AuthOption = + | false + | core.AuthProvider["getAuthRequest"] + | core.AuthProvider + | HeaderAuthProvider.AuthOptions; + export type BaseClientOptions = { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ @@ -20,6 +26,8 @@ export type BaseClientOptions = { fetcher?: core.FetchFunction; /** Configure logging for the client. */ logging?: core.logging.LogConfig | core.logging.Logger; + /** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */ + auth?: AuthOption; } & HeaderAuthProvider.AuthOptions; export interface BaseRequestOptions { @@ -52,8 +60,8 @@ export function normalizeClientOptions { const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth; + + if (options.auth === false) { + normalized.authProvider = new core.NoOpAuthProvider(); + return normalized; + } + if (options.auth != null) { + if (typeof options.auth === "function") { + normalized.authProvider = { getAuthRequest: options.auth }; + return normalized; + } + if (core.isAuthProvider(options.auth)) { + normalized.authProvider = options.auth; + return normalized; + } + Object.assign(normalized, options.auth); + } + const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized); normalized.authProvider ??= new HeaderAuthProvider(normalizedWithNoOpAuthProvider); return normalized; diff --git a/src/api/resources/checkout/client/Client.ts b/src/api/resources/checkout/client/Client.ts index 92efdd66..57868402 100644 --- a/src/api/resources/checkout/client/Client.ts +++ b/src/api/resources/checkout/client/Client.ts @@ -39,6 +39,9 @@ export class CheckoutClient { * addOnId: "add_on_id", * priceId: "price_id" * }], + * autoTopupOverrides: [{ + * planCreditGrantId: "plan_credit_grant_id" + * }], * companyId: "company_id", * creditBundles: [{ * bundleId: "bundle_id", @@ -322,6 +325,9 @@ export class CheckoutClient { * addOnId: "add_on_id", * priceId: "price_id" * }], + * autoTopupOverrides: [{ + * planCreditGrantId: "plan_credit_grant_id" + * }], * companyId: "company_id", * creditBundles: [{ * bundleId: "bundle_id", diff --git a/src/api/resources/credits/client/Client.ts b/src/api/resources/credits/client/Client.ts index 5a067301..7498147d 100644 --- a/src/api/resources/credits/client/Client.ts +++ b/src/api/resources/credits/client/Client.ts @@ -3022,6 +3022,7 @@ export class CreditsClient { * planId: "plan_id", * planIds: ["plan_ids"], * planVersionId: "plan_version_id", + * planVersionIds: ["plan_version_ids"], * limit: 1000000, * offset: 1000000 * }) @@ -3037,13 +3038,14 @@ export class CreditsClient { request: Schematic.ListBillingPlanCreditGrantsRequest = {}, requestOptions?: CreditsClient.RequestOptions, ): Promise> { - const { creditId, ids, planId, planIds, planVersionId, limit, offset } = request; + const { creditId, ids, planId, planIds, planVersionId, planVersionIds, limit, offset } = request; const _queryParams: Record = { credit_id: creditId, ids, plan_id: planId, plan_ids: planIds, plan_version_id: planVersionId, + plan_version_ids: planVersionIds, limit, offset, }; @@ -3728,6 +3730,7 @@ export class CreditsClient { * planId: "plan_id", * planIds: ["plan_ids"], * planVersionId: "plan_version_id", + * planVersionIds: ["plan_version_ids"], * limit: 1000000, * offset: 1000000 * }) @@ -3743,13 +3746,14 @@ export class CreditsClient { request: Schematic.CountBillingPlanCreditGrantsRequest = {}, requestOptions?: CreditsClient.RequestOptions, ): Promise> { - const { creditId, ids, planId, planIds, planVersionId, limit, offset } = request; + const { creditId, ids, planId, planIds, planVersionId, planVersionIds, limit, offset } = request; const _queryParams: Record = { credit_id: creditId, ids, plan_id: planId, plan_ids: planIds, plan_version_id: planVersionId, + plan_version_ids: planVersionIds, limit, offset, }; diff --git a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts index 872821aa..b6407391 100644 --- a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts +++ b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts @@ -8,6 +8,7 @@ * planId: "plan_id", * planIds: ["plan_ids"], * planVersionId: "plan_version_id", + * planVersionIds: ["plan_version_ids"], * limit: 1000000, * offset: 1000000 * } @@ -18,6 +19,7 @@ export interface CountBillingPlanCreditGrantsRequest { planId?: string; planIds?: string | string[]; planVersionId?: string; + planVersionIds?: string | string[]; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts index 0ce867eb..14120f14 100644 --- a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts +++ b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts @@ -8,6 +8,7 @@ * planId: "plan_id", * planIds: ["plan_ids"], * planVersionId: "plan_version_id", + * planVersionIds: ["plan_version_ids"], * limit: 1000000, * offset: 1000000 * } @@ -18,6 +19,7 @@ export interface ListBillingPlanCreditGrantsRequest { planId?: string; planIds?: string | string[]; planVersionId?: string; + planVersionIds?: string | string[]; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts b/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts index 211f1344..c63cd59e 100644 --- a/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts +++ b/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts @@ -13,4 +13,5 @@ export interface CountBillingPlanCreditGrantsParams { planId?: string; planIds?: string[]; planVersionId?: string; + planVersionIds?: string[]; } diff --git a/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts b/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts index bb63e163..74c486e4 100644 --- a/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts +++ b/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts @@ -13,4 +13,5 @@ export interface ListBillingPlanCreditGrantsParams { planId?: string; planIds?: string[]; planVersionId?: string; + planVersionIds?: string[]; } diff --git a/src/api/resources/features/client/Client.ts b/src/api/resources/features/client/Client.ts index a477b46c..aec1683c 100644 --- a/src/api/resources/features/client/Client.ts +++ b/src/api/resources/features/client/Client.ts @@ -38,6 +38,7 @@ export class FeaturesClient { * booleanRequireEvent: true, * featureType: ["boolean"], * ids: ["ids"], + * managedBy: "orb", * planVersionId: "plan_version_id", * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", @@ -61,6 +62,7 @@ export class FeaturesClient { booleanRequireEvent, featureType, ids, + managedBy, planVersionId, q, withoutCompanyOverrideFor, @@ -78,6 +80,10 @@ export class FeaturesClient { ? serializers.FeatureType.jsonOrThrow(featureType, { unrecognizedObjectKeys: "strip" }) : undefined, ids, + managed_by: + managedBy != null + ? serializers.BillingProviderType.jsonOrThrow(managedBy, { unrecognizedObjectKeys: "strip" }) + : undefined, plan_version_id: planVersionId, q, without_company_override_for: withoutCompanyOverrideFor, @@ -860,6 +866,7 @@ export class FeaturesClient { * booleanRequireEvent: true, * featureType: ["boolean"], * ids: ["ids"], + * managedBy: "orb", * planVersionId: "plan_version_id", * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", @@ -883,6 +890,7 @@ export class FeaturesClient { booleanRequireEvent, featureType, ids, + managedBy, planVersionId, q, withoutCompanyOverrideFor, @@ -900,6 +908,10 @@ export class FeaturesClient { ? serializers.FeatureType.jsonOrThrow(featureType, { unrecognizedObjectKeys: "strip" }) : undefined, ids, + managed_by: + managedBy != null + ? serializers.BillingProviderType.jsonOrThrow(managedBy, { unrecognizedObjectKeys: "strip" }) + : undefined, plan_version_id: planVersionId, q, without_company_override_for: withoutCompanyOverrideFor, diff --git a/src/api/resources/features/client/requests/CountFeaturesRequest.ts b/src/api/resources/features/client/requests/CountFeaturesRequest.ts index 4c0bca8f..2f51c74a 100644 --- a/src/api/resources/features/client/requests/CountFeaturesRequest.ts +++ b/src/api/resources/features/client/requests/CountFeaturesRequest.ts @@ -8,6 +8,7 @@ import type * as Schematic from "../../../../index"; * booleanRequireEvent: true, * featureType: ["boolean"], * ids: ["ids"], + * managedBy: "orb", * planVersionId: "plan_version_id", * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", @@ -22,6 +23,8 @@ export interface CountFeaturesRequest { /** Filter by one or more feature types (boolean, event, trait) */ featureType?: Schematic.FeatureType | Schematic.FeatureType[]; ids?: string | string[]; + /** Filter for features managed by a billing provider, or by Schematic (no billing provider) */ + managedBy?: Schematic.BillingProviderType; /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ planVersionId?: string; /** Search by feature name or ID */ diff --git a/src/api/resources/features/client/requests/ListFeaturesRequest.ts b/src/api/resources/features/client/requests/ListFeaturesRequest.ts index 6bb5ad38..081a3240 100644 --- a/src/api/resources/features/client/requests/ListFeaturesRequest.ts +++ b/src/api/resources/features/client/requests/ListFeaturesRequest.ts @@ -8,6 +8,7 @@ import type * as Schematic from "../../../../index"; * booleanRequireEvent: true, * featureType: ["boolean"], * ids: ["ids"], + * managedBy: "orb", * planVersionId: "plan_version_id", * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", @@ -22,6 +23,8 @@ export interface ListFeaturesRequest { /** Filter by one or more feature types (boolean, event, trait) */ featureType?: Schematic.FeatureType | Schematic.FeatureType[]; ids?: string | string[]; + /** Filter for features managed by a billing provider, or by Schematic (no billing provider) */ + managedBy?: Schematic.BillingProviderType; /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ planVersionId?: string; /** Search by feature name or ID */ diff --git a/src/api/resources/features/types/CountFeaturesParams.ts b/src/api/resources/features/types/CountFeaturesParams.ts index 129569f8..d58c5e38 100644 --- a/src/api/resources/features/types/CountFeaturesParams.ts +++ b/src/api/resources/features/types/CountFeaturesParams.ts @@ -13,6 +13,8 @@ export interface CountFeaturesParams { ids?: string[]; /** Page limit (default 100) */ limit?: number; + /** Filter for features managed by a billing provider, or by Schematic (no billing provider) */ + managedBy?: Schematic.BillingProviderType; /** Page offset (default 0) */ offset?: number; /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ diff --git a/src/api/resources/features/types/ListFeaturesParams.ts b/src/api/resources/features/types/ListFeaturesParams.ts index 6327c90b..4bffa7c9 100644 --- a/src/api/resources/features/types/ListFeaturesParams.ts +++ b/src/api/resources/features/types/ListFeaturesParams.ts @@ -13,6 +13,8 @@ export interface ListFeaturesParams { ids?: string[]; /** Page limit (default 100) */ limit?: number; + /** Filter for features managed by a billing provider, or by Schematic (no billing provider) */ + managedBy?: Schematic.BillingProviderType; /** Page offset (default 0) */ offset?: number; /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ diff --git a/src/api/resources/plans/client/Client.ts b/src/api/resources/plans/client/Client.ts index 9efb7da9..85f42f6e 100644 --- a/src/api/resources/plans/client/Client.ts +++ b/src/api/resources/plans/client/Client.ts @@ -620,6 +620,7 @@ export class PlansClient { * @example * await client.plans.listPlans({ * companyId: "company_id", + * companyScopedOnly: true, * excludeCompanyScoped: true, * forFallbackPlan: true, * forInitialPlan: true, @@ -649,6 +650,7 @@ export class PlansClient { ): Promise> { const { companyId, + companyScopedOnly, excludeCompanyScoped, forFallbackPlan, forInitialPlan, @@ -666,6 +668,7 @@ export class PlansClient { } = request; const _queryParams: Record = { company_id: companyId, + company_scoped_only: companyScopedOnly, exclude_company_scoped: excludeCompanyScoped, for_fallback_plan: forFallbackPlan, for_initial_plan: forInitialPlan, @@ -1912,6 +1915,7 @@ export class PlansClient { * @example * await client.plans.countPlans({ * companyId: "company_id", + * companyScopedOnly: true, * excludeCompanyScoped: true, * forFallbackPlan: true, * forInitialPlan: true, @@ -1941,6 +1945,7 @@ export class PlansClient { ): Promise> { const { companyId, + companyScopedOnly, excludeCompanyScoped, forFallbackPlan, forInitialPlan, @@ -1958,6 +1963,7 @@ export class PlansClient { } = request; const _queryParams: Record = { company_id: companyId, + company_scoped_only: companyScopedOnly, exclude_company_scoped: excludeCompanyScoped, for_fallback_plan: forFallbackPlan, for_initial_plan: forInitialPlan, diff --git a/src/api/resources/plans/client/requests/CountPlansRequest.ts b/src/api/resources/plans/client/requests/CountPlansRequest.ts index 40a9fc78..b492e5e1 100644 --- a/src/api/resources/plans/client/requests/CountPlansRequest.ts +++ b/src/api/resources/plans/client/requests/CountPlansRequest.ts @@ -6,6 +6,7 @@ import type * as Schematic from "../../../../index"; * @example * { * companyId: "company_id", + * companyScopedOnly: true, * excludeCompanyScoped: true, * forFallbackPlan: true, * forInitialPlan: true, @@ -24,6 +25,8 @@ import type * as Schematic from "../../../../index"; */ export interface CountPlansRequest { companyId?: string; + /** Only return plans that are scoped to a company (custom plans assigned to a company) */ + companyScopedOnly?: boolean; /** Exclude plans that are scoped to a company (custom plans assigned to a company) */ excludeCompanyScoped?: boolean; /** Filter for plans valid as fallback plans (not linked to billing) */ diff --git a/src/api/resources/plans/client/requests/ListPlansRequest.ts b/src/api/resources/plans/client/requests/ListPlansRequest.ts index b1d2f49e..fa7e6b3e 100644 --- a/src/api/resources/plans/client/requests/ListPlansRequest.ts +++ b/src/api/resources/plans/client/requests/ListPlansRequest.ts @@ -6,6 +6,7 @@ import type * as Schematic from "../../../../index"; * @example * { * companyId: "company_id", + * companyScopedOnly: true, * excludeCompanyScoped: true, * forFallbackPlan: true, * forInitialPlan: true, @@ -24,6 +25,8 @@ import type * as Schematic from "../../../../index"; */ export interface ListPlansRequest { companyId?: string; + /** Only return plans that are scoped to a company (custom plans assigned to a company) */ + companyScopedOnly?: boolean; /** Exclude plans that are scoped to a company (custom plans assigned to a company) */ excludeCompanyScoped?: boolean; /** Filter for plans valid as fallback plans (not linked to billing) */ diff --git a/src/api/resources/plans/types/CountPlansParams.ts b/src/api/resources/plans/types/CountPlansParams.ts index 06949b09..e76af585 100644 --- a/src/api/resources/plans/types/CountPlansParams.ts +++ b/src/api/resources/plans/types/CountPlansParams.ts @@ -7,6 +7,8 @@ import type * as Schematic from "../../../index"; */ export interface CountPlansParams { companyId?: string; + /** Only return plans that are scoped to a company (custom plans assigned to a company) */ + companyScopedOnly?: boolean; /** Exclude plans that are scoped to a company (custom plans assigned to a company) */ excludeCompanyScoped?: boolean; /** Filter for plans valid as fallback plans (not linked to billing) */ diff --git a/src/api/resources/plans/types/ListPlansParams.ts b/src/api/resources/plans/types/ListPlansParams.ts index 6ad735bb..19d9969f 100644 --- a/src/api/resources/plans/types/ListPlansParams.ts +++ b/src/api/resources/plans/types/ListPlansParams.ts @@ -7,6 +7,8 @@ import type * as Schematic from "../../../index"; */ export interface ListPlansParams { companyId?: string; + /** Only return plans that are scoped to a company (custom plans assigned to a company) */ + companyScopedOnly?: boolean; /** Exclude plans that are scoped to a company (custom plans assigned to a company) */ excludeCompanyScoped?: boolean; /** Filter for plans valid as fallback plans (not linked to billing) */ diff --git a/src/api/types/ApiKeyCreateResponseData.ts b/src/api/types/ApiKeyCreateResponseData.ts index 4f623534..832849f8 100644 --- a/src/api/types/ApiKeyCreateResponseData.ts +++ b/src/api/types/ApiKeyCreateResponseData.ts @@ -8,6 +8,7 @@ export interface ApiKeyCreateResponseData { environment?: Schematic.EnvironmentResponseData; environmentId?: string; id: string; + integration?: Schematic.ApiKeyIntegrationResponseData; lastUsedAt?: Date; name: string; readonly: boolean; diff --git a/src/api/types/ApiKeyIntegrationResponseData.ts b/src/api/types/ApiKeyIntegrationResponseData.ts new file mode 100644 index 00000000..797b8669 --- /dev/null +++ b/src/api/types/ApiKeyIntegrationResponseData.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface ApiKeyIntegrationResponseData { + id: string; + state: Schematic.IntegrationState; + type: Schematic.IntegrationType; +} diff --git a/src/api/types/ApiKeyResponseData.ts b/src/api/types/ApiKeyResponseData.ts index 72ef79e3..95897da9 100644 --- a/src/api/types/ApiKeyResponseData.ts +++ b/src/api/types/ApiKeyResponseData.ts @@ -8,6 +8,7 @@ export interface ApiKeyResponseData { environment?: Schematic.EnvironmentResponseData; environmentId?: string; id: string; + integration?: Schematic.ApiKeyIntegrationResponseData; lastUsedAt?: Date; name: string; readonly: boolean; diff --git a/src/api/types/AuditLogListResponseData.ts b/src/api/types/AuditLogListResponseData.ts index 353f8363..64d0228f 100644 --- a/src/api/types/AuditLogListResponseData.ts +++ b/src/api/types/AuditLogListResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface AuditLogListResponseData { actorType: Schematic.ActorType; + apiKey?: Schematic.ApiKeyResponseData; apiKeyId?: string; endedAt?: Date; environment?: Schematic.EnvironmentResponseData; diff --git a/src/api/types/AuditLogResponseData.ts b/src/api/types/AuditLogResponseData.ts index 0283fbd9..ef36df38 100644 --- a/src/api/types/AuditLogResponseData.ts +++ b/src/api/types/AuditLogResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface AuditLogResponseData { actorType: Schematic.ActorType; + apiKey?: Schematic.ApiKeyResponseData; apiKeyId?: string; endedAt?: Date; environment?: Schematic.EnvironmentResponseData; diff --git a/src/api/types/BillingPlanCreditGrantResponseData.ts b/src/api/types/BillingPlanCreditGrantResponseData.ts index 1f88a4af..197efcfb 100644 --- a/src/api/types/BillingPlanCreditGrantResponseData.ts +++ b/src/api/types/BillingPlanCreditGrantResponseData.ts @@ -9,6 +9,7 @@ export interface BillingPlanCreditGrantResponseData { autoTopupExpiryType?: Schematic.BillingCreditExpiryType; autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit; autoTopupExpiryUnitCount?: number; + autoTopupSelfService: boolean; autoTopupThresholdCredits?: number; autoTopupThresholdPercent?: number; createdAt: Date; diff --git a/src/api/types/ChangeSubscriptionInternalRequestBody.ts b/src/api/types/ChangeSubscriptionInternalRequestBody.ts index 3af3a496..07473a9a 100644 --- a/src/api/types/ChangeSubscriptionInternalRequestBody.ts +++ b/src/api/types/ChangeSubscriptionInternalRequestBody.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface ChangeSubscriptionInternalRequestBody { addOnIds: Schematic.UpdateAddOnRequestBody[]; + autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[]; companyId: string; couponExternalId?: string; creditBundles: Schematic.UpdateCreditBundleRequestBody[]; diff --git a/src/api/types/ChangeSubscriptionRequestBody.ts b/src/api/types/ChangeSubscriptionRequestBody.ts index 537b9729..d6c2a5c2 100644 --- a/src/api/types/ChangeSubscriptionRequestBody.ts +++ b/src/api/types/ChangeSubscriptionRequestBody.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface ChangeSubscriptionRequestBody { addOnIds: Schematic.UpdateAddOnRequestBody[]; + autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[]; couponExternalId?: string; creditBundles: Schematic.UpdateCreditBundleRequestBody[]; newPlanId: string; diff --git a/src/api/types/CompanyPlanCreditGrantView.ts b/src/api/types/CompanyPlanCreditGrantView.ts new file mode 100644 index 00000000..57d68430 --- /dev/null +++ b/src/api/types/CompanyPlanCreditGrantView.ts @@ -0,0 +1,43 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface CompanyPlanCreditGrantView { + billingCreditAutoTopupAmount?: number; + billingCreditAutoTopupAmountType?: string; + billingCreditAutoTopupEnabled: boolean; + billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType; + billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit; + billingCreditAutoTopupExpiryUnitCount?: number; + billingCreditAutoTopupSelfService: boolean; + billingCreditAutoTopupThresholdCredits?: number; + billingCreditAutoTopupThresholdPercent?: number; + companyAutoTopupAmount?: number; + companyAutoTopupEnabled?: boolean; + companyAutoTopupThresholdCredits?: number; + createdAt: Date; + credit?: Schematic.BillingCreditView; + creditAmount: number; + /** Deprecated field, will be removed in the future. Use Credit.Description instead. */ + creditDescription: string; + /** Deprecated field, will be removed in the future. Use Credit.Icon instead. */ + creditIcon?: string; + creditId: string; + /** Deprecated field, will be removed in the future. Use Credit.Name instead. */ + creditName: string; + expiryType?: Schematic.BillingCreditExpiryType; + expiryUnit?: Schematic.BillingCreditExpiryUnit; + expiryUnitCount?: number; + id: string; + plan?: Schematic.GenericPreviewObject; + planId: string; + planVersionId?: string; + /** Deprecated field, will be removed in the future. Use Credit.PluralName instead. */ + pluralName?: string; + resetCadence?: Schematic.BillingPlanCreditGrantResetCadence; + resetStart?: Schematic.BillingPlanCreditGrantResetStart; + resetType: Schematic.BillingPlanCreditGrantResetType; + /** Deprecated field, will be removed in the future. Use Credit.SingularName instead. */ + singularName?: string; + updatedAt: Date; +} diff --git a/src/api/types/CompanyPlanWithBillingSubView.ts b/src/api/types/CompanyPlanWithBillingSubView.ts index 03e4f9a7..b44f51b4 100644 --- a/src/api/types/CompanyPlanWithBillingSubView.ts +++ b/src/api/types/CompanyPlanWithBillingSubView.ts @@ -9,7 +9,7 @@ export interface CompanyPlanWithBillingSubView { description?: string; id: string; imageUrl?: string; - includedCreditGrants: Schematic.PlanCreditGrantView[]; + includedCreditGrants: Schematic.CompanyPlanCreditGrantView[]; name: string; planPeriod?: string; planPrice?: number; diff --git a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts index 2544121b..61f3c4d6 100644 --- a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts +++ b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts @@ -10,6 +10,7 @@ export interface CreateBillingPlanCreditGrantRequestBody { autoTopupExpiryType?: Schematic.BillingCreditExpiryType; autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit; autoTopupExpiryUnitCount?: number; + autoTopupSelfService?: boolean; autoTopupThresholdCredits?: number; autoTopupThresholdPercent?: number; creditAmount: number; diff --git a/src/api/types/DuplicatePlanEntitlementsResponseResponseData.ts b/src/api/types/DuplicatePlanEntitlementsResponseResponseData.ts index 8f2e555a..7f263948 100644 --- a/src/api/types/DuplicatePlanEntitlementsResponseResponseData.ts +++ b/src/api/types/DuplicatePlanEntitlementsResponseResponseData.ts @@ -4,5 +4,6 @@ import type * as Schematic from "../index"; export interface DuplicatePlanEntitlementsResponseResponseData { data: Schematic.PlanEntitlementResponseData[]; + issues: Schematic.PlanIssueResponseData[]; skipped: Schematic.SkippedEntitlementResponseData[]; } diff --git a/src/api/types/EventDetailResponseData.ts b/src/api/types/EventDetailResponseData.ts index dbcc15f9..ec9bb912 100644 --- a/src/api/types/EventDetailResponseData.ts +++ b/src/api/types/EventDetailResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface EventDetailResponseData { apiKey?: string; + apiKeyView?: Schematic.ApiKeyResponseData; body: Record; bodyPreview: string; capturedAt: Date; diff --git a/src/api/types/PlanCreditGrantView.ts b/src/api/types/PlanCreditGrantView.ts index b57e2035..ea865f92 100644 --- a/src/api/types/PlanCreditGrantView.ts +++ b/src/api/types/PlanCreditGrantView.ts @@ -9,6 +9,7 @@ export interface PlanCreditGrantView { billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType; billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit; billingCreditAutoTopupExpiryUnitCount?: number; + billingCreditAutoTopupSelfService: boolean; billingCreditAutoTopupThresholdCredits?: number; billingCreditAutoTopupThresholdPercent?: number; createdAt: Date; diff --git a/src/api/types/UpdateAutoTopupOverrideRequestBody.ts b/src/api/types/UpdateAutoTopupOverrideRequestBody.ts new file mode 100644 index 00000000..60013af1 --- /dev/null +++ b/src/api/types/UpdateAutoTopupOverrideRequestBody.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface UpdateAutoTopupOverrideRequestBody { + autoTopupAmount?: number; + autoTopupEnabled?: boolean; + autoTopupThresholdCredits?: number; + planCreditGrantId: string; +} diff --git a/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts b/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts index 06fafb95..84a54d22 100644 --- a/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts +++ b/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts @@ -10,6 +10,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody { autoTopupExpiryType?: Schematic.BillingCreditExpiryType; autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit; autoTopupExpiryUnitCount?: number; + autoTopupSelfService?: boolean; autoTopupThresholdCredits?: number; autoTopupThresholdPercent?: number; creditAmount?: number; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 91c17318..fff0e027 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -6,6 +6,7 @@ export * from "./ActivityResponseResponseData"; export * from "./ActorType"; export * from "./ApiError"; export * from "./ApiKeyCreateResponseData"; +export * from "./ApiKeyIntegrationResponseData"; export * from "./ApiKeyResponseData"; export * from "./ApiKeyScope"; export * from "./AuditLogListResponseData"; @@ -75,6 +76,7 @@ export * from "./CompanyMembershipDetailResponseData"; export * from "./CompanyMembershipResponseData"; export * from "./CompanyOverrideNoteResponseData"; export * from "./CompanyOverrideResponseData"; +export * from "./CompanyPlanCreditGrantView"; export * from "./CompanyPlanDetailResponseData"; export * from "./CompanyPlanInvalidReason"; export * from "./CompanyPlanWithBillingSubView"; @@ -330,6 +332,7 @@ export * from "./TraitDefinitionComparableType"; export * from "./TraitType"; export * from "./TrialStatus"; export * from "./UpdateAddOnRequestBody"; +export * from "./UpdateAutoTopupOverrideRequestBody"; export * from "./UpdateBillingPlanCreditGrantRequestBody"; export * from "./UpdateCreditBundleRequestBody"; export * from "./UpdateEntitlementReqCommon"; diff --git a/src/core/auth/AuthProvider.ts b/src/core/auth/AuthProvider.ts index ccb4263e..b2544592 100644 --- a/src/core/auth/AuthProvider.ts +++ b/src/core/auth/AuthProvider.ts @@ -4,3 +4,12 @@ import type { AuthRequest } from "./AuthRequest"; export interface AuthProvider { getAuthRequest(arg?: { endpointMetadata?: EndpointMetadata }): Promise; } + +export function isAuthProvider(value: unknown): value is AuthProvider { + return ( + typeof value === "object" && + value !== null && + "getAuthRequest" in value && + typeof value.getAuthRequest === "function" + ); +} diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts index 49c181ae..79abb441 100644 --- a/src/core/auth/index.ts +++ b/src/core/auth/index.ts @@ -1,4 +1,4 @@ -export type { AuthProvider } from "./AuthProvider"; +export { type AuthProvider, isAuthProvider } from "./AuthProvider"; export type { AuthRequest } from "./AuthRequest"; export { BasicAuth } from "./BasicAuth"; export { BearerToken } from "./BearerToken"; diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts index 1f689688..5e66b933 100644 --- a/src/core/fetcher/requestWithRetries.ts +++ b/src/core/fetcher/requestWithRetries.ts @@ -3,6 +3,10 @@ const MAX_RETRY_DELAY = 60000; // in milliseconds const DEFAULT_MAX_RETRIES = 2; const JITTER_FACTOR = 0.2; // 20% random jitter +function isRetryableStatusCode(statusCode: number): boolean { + return [408, 429].includes(statusCode) || statusCode >= 500; +} + function addPositiveJitter(delay: number): number { const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR; return delay * jitterMultiplier; @@ -51,7 +55,7 @@ export async function requestWithRetries( let response: Response = await requestFn(); for (let i = 0; i < maxRetries; ++i) { - if ([408, 429].includes(response.status) || response.status >= 500) { + if (isRetryableStatusCode(response.status)) { const delay = getRetryDelayFromHeaders(response, i); await new Promise((resolve) => setTimeout(resolve, delay)); diff --git a/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts b/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts index 4c87ba20..f4b7b38a 100644 --- a/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts +++ b/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts @@ -15,6 +15,10 @@ export const CountBillingPlanCreditGrantsParams: core.serialization.ObjectSchema planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + planVersionIds: core.serialization.property( + "plan_version_ids", + core.serialization.list(core.serialization.string()).optional(), + ), }); export declare namespace CountBillingPlanCreditGrantsParams { @@ -26,5 +30,6 @@ export declare namespace CountBillingPlanCreditGrantsParams { plan_id?: string | null; plan_ids?: string[] | null; plan_version_id?: string | null; + plan_version_ids?: string[] | null; } } diff --git a/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts b/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts index 2ecf0d3e..e0038757 100644 --- a/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts +++ b/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts @@ -15,6 +15,10 @@ export const ListBillingPlanCreditGrantsParams: core.serialization.ObjectSchema< planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + planVersionIds: core.serialization.property( + "plan_version_ids", + core.serialization.list(core.serialization.string()).optional(), + ), }); export declare namespace ListBillingPlanCreditGrantsParams { @@ -26,5 +30,6 @@ export declare namespace ListBillingPlanCreditGrantsParams { plan_id?: string | null; plan_ids?: string[] | null; plan_version_id?: string | null; + plan_version_ids?: string[] | null; } } diff --git a/src/serialization/resources/features/types/CountFeaturesParams.ts b/src/serialization/resources/features/types/CountFeaturesParams.ts index 06a5563b..5ff006b4 100644 --- a/src/serialization/resources/features/types/CountFeaturesParams.ts +++ b/src/serialization/resources/features/types/CountFeaturesParams.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { BillingProviderType } from "../../../types/BillingProviderType"; import { FeatureType } from "../../../types/FeatureType"; export const CountFeaturesParams: core.serialization.ObjectSchema< @@ -13,6 +14,7 @@ export const CountFeaturesParams: core.serialization.ObjectSchema< featureType: core.serialization.property("feature_type", core.serialization.list(FeatureType).optional()), ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), + managedBy: core.serialization.property("managed_by", BillingProviderType.optional()), offset: core.serialization.number().optional(), planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), @@ -32,6 +34,7 @@ export declare namespace CountFeaturesParams { feature_type?: FeatureType.Raw[] | null; ids?: string[] | null; limit?: number | null; + managed_by?: BillingProviderType.Raw | null; offset?: number | null; plan_version_id?: string | null; q?: string | null; diff --git a/src/serialization/resources/features/types/ListFeaturesParams.ts b/src/serialization/resources/features/types/ListFeaturesParams.ts index 96ff3cb7..c957d5e5 100644 --- a/src/serialization/resources/features/types/ListFeaturesParams.ts +++ b/src/serialization/resources/features/types/ListFeaturesParams.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { BillingProviderType } from "../../../types/BillingProviderType"; import { FeatureType } from "../../../types/FeatureType"; export const ListFeaturesParams: core.serialization.ObjectSchema< @@ -13,6 +14,7 @@ export const ListFeaturesParams: core.serialization.ObjectSchema< featureType: core.serialization.property("feature_type", core.serialization.list(FeatureType).optional()), ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), + managedBy: core.serialization.property("managed_by", BillingProviderType.optional()), offset: core.serialization.number().optional(), planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), @@ -32,6 +34,7 @@ export declare namespace ListFeaturesParams { feature_type?: FeatureType.Raw[] | null; ids?: string[] | null; limit?: number | null; + managed_by?: BillingProviderType.Raw | null; offset?: number | null; plan_version_id?: string | null; q?: string | null; diff --git a/src/serialization/resources/plans/types/CountPlansParams.ts b/src/serialization/resources/plans/types/CountPlansParams.ts index d211a3d0..12de710c 100644 --- a/src/serialization/resources/plans/types/CountPlansParams.ts +++ b/src/serialization/resources/plans/types/CountPlansParams.ts @@ -10,6 +10,7 @@ export const CountPlansParams: core.serialization.ObjectSchema< Schematic.CountPlansParams > = core.serialization.object({ companyId: core.serialization.property("company_id", core.serialization.string().optional()), + companyScopedOnly: core.serialization.property("company_scoped_only", core.serialization.boolean().optional()), excludeCompanyScoped: core.serialization.property( "exclude_company_scoped", core.serialization.boolean().optional(), @@ -41,6 +42,7 @@ export const CountPlansParams: core.serialization.ObjectSchema< export declare namespace CountPlansParams { export interface Raw { company_id?: string | null; + company_scoped_only?: boolean | null; exclude_company_scoped?: boolean | null; for_fallback_plan?: boolean | null; for_initial_plan?: boolean | null; diff --git a/src/serialization/resources/plans/types/ListPlansParams.ts b/src/serialization/resources/plans/types/ListPlansParams.ts index 8aa6607d..e85e0bfc 100644 --- a/src/serialization/resources/plans/types/ListPlansParams.ts +++ b/src/serialization/resources/plans/types/ListPlansParams.ts @@ -10,6 +10,7 @@ export const ListPlansParams: core.serialization.ObjectSchema< Schematic.ListPlansParams > = core.serialization.object({ companyId: core.serialization.property("company_id", core.serialization.string().optional()), + companyScopedOnly: core.serialization.property("company_scoped_only", core.serialization.boolean().optional()), excludeCompanyScoped: core.serialization.property( "exclude_company_scoped", core.serialization.boolean().optional(), @@ -41,6 +42,7 @@ export const ListPlansParams: core.serialization.ObjectSchema< export declare namespace ListPlansParams { export interface Raw { company_id?: string | null; + company_scoped_only?: boolean | null; exclude_company_scoped?: boolean | null; for_fallback_plan?: boolean | null; for_initial_plan?: boolean | null; diff --git a/src/serialization/types/ApiKeyCreateResponseData.ts b/src/serialization/types/ApiKeyCreateResponseData.ts index 58faf293..3688ca67 100644 --- a/src/serialization/types/ApiKeyCreateResponseData.ts +++ b/src/serialization/types/ApiKeyCreateResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { ApiKeyIntegrationResponseData } from "./ApiKeyIntegrationResponseData"; import { ApiKeyScope } from "./ApiKeyScope"; import { EnvironmentResponseData } from "./EnvironmentResponseData"; @@ -15,6 +16,7 @@ export const ApiKeyCreateResponseData: core.serialization.ObjectSchema< environment: EnvironmentResponseData.optional(), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), id: core.serialization.string(), + integration: ApiKeyIntegrationResponseData.optional(), lastUsedAt: core.serialization.property("last_used_at", core.serialization.date().optional()), name: core.serialization.string(), readonly: core.serialization.boolean(), @@ -30,6 +32,7 @@ export declare namespace ApiKeyCreateResponseData { environment?: EnvironmentResponseData.Raw | null; environment_id?: string | null; id: string; + integration?: ApiKeyIntegrationResponseData.Raw | null; last_used_at?: string | null; name: string; readonly: boolean; diff --git a/src/serialization/types/ApiKeyIntegrationResponseData.ts b/src/serialization/types/ApiKeyIntegrationResponseData.ts new file mode 100644 index 00000000..e731f56e --- /dev/null +++ b/src/serialization/types/ApiKeyIntegrationResponseData.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { IntegrationState } from "./IntegrationState"; +import { IntegrationType } from "./IntegrationType"; + +export const ApiKeyIntegrationResponseData: core.serialization.ObjectSchema< + serializers.ApiKeyIntegrationResponseData.Raw, + Schematic.ApiKeyIntegrationResponseData +> = core.serialization.object({ + id: core.serialization.string(), + state: IntegrationState, + type: IntegrationType, +}); + +export declare namespace ApiKeyIntegrationResponseData { + export interface Raw { + id: string; + state: IntegrationState.Raw; + type: IntegrationType.Raw; + } +} diff --git a/src/serialization/types/ApiKeyResponseData.ts b/src/serialization/types/ApiKeyResponseData.ts index fcba5e77..f62edaca 100644 --- a/src/serialization/types/ApiKeyResponseData.ts +++ b/src/serialization/types/ApiKeyResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { ApiKeyIntegrationResponseData } from "./ApiKeyIntegrationResponseData"; import { ApiKeyScope } from "./ApiKeyScope"; import { EnvironmentResponseData } from "./EnvironmentResponseData"; @@ -15,6 +16,7 @@ export const ApiKeyResponseData: core.serialization.ObjectSchema< environment: EnvironmentResponseData.optional(), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), id: core.serialization.string(), + integration: ApiKeyIntegrationResponseData.optional(), lastUsedAt: core.serialization.property("last_used_at", core.serialization.date().optional()), name: core.serialization.string(), readonly: core.serialization.boolean(), @@ -29,6 +31,7 @@ export declare namespace ApiKeyResponseData { environment?: EnvironmentResponseData.Raw | null; environment_id?: string | null; id: string; + integration?: ApiKeyIntegrationResponseData.Raw | null; last_used_at?: string | null; name: string; readonly: boolean; diff --git a/src/serialization/types/AuditLogListResponseData.ts b/src/serialization/types/AuditLogListResponseData.ts index f9615856..235dd3ba 100644 --- a/src/serialization/types/AuditLogListResponseData.ts +++ b/src/serialization/types/AuditLogListResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { ActorType } from "./ActorType"; +import { ApiKeyResponseData } from "./ApiKeyResponseData"; import { EnvironmentResponseData } from "./EnvironmentResponseData"; export const AuditLogListResponseData: core.serialization.ObjectSchema< @@ -11,6 +12,7 @@ export const AuditLogListResponseData: core.serialization.ObjectSchema< Schematic.AuditLogListResponseData > = core.serialization.object({ actorType: core.serialization.property("actor_type", ActorType), + apiKey: core.serialization.property("api_key", ApiKeyResponseData.optional()), apiKeyId: core.serialization.property("api_key_id", core.serialization.string().optional()), endedAt: core.serialization.property("ended_at", core.serialization.date().optional()), environment: EnvironmentResponseData.optional(), @@ -31,6 +33,7 @@ export const AuditLogListResponseData: core.serialization.ObjectSchema< export declare namespace AuditLogListResponseData { export interface Raw { actor_type: ActorType.Raw; + api_key?: ApiKeyResponseData.Raw | null; api_key_id?: string | null; ended_at?: string | null; environment?: EnvironmentResponseData.Raw | null; diff --git a/src/serialization/types/AuditLogResponseData.ts b/src/serialization/types/AuditLogResponseData.ts index 8ea9d8c6..0e6eb9ff 100644 --- a/src/serialization/types/AuditLogResponseData.ts +++ b/src/serialization/types/AuditLogResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { ActorType } from "./ActorType"; +import { ApiKeyResponseData } from "./ApiKeyResponseData"; import { EnvironmentResponseData } from "./EnvironmentResponseData"; export const AuditLogResponseData: core.serialization.ObjectSchema< @@ -11,6 +12,7 @@ export const AuditLogResponseData: core.serialization.ObjectSchema< Schematic.AuditLogResponseData > = core.serialization.object({ actorType: core.serialization.property("actor_type", ActorType), + apiKey: core.serialization.property("api_key", ApiKeyResponseData.optional()), apiKeyId: core.serialization.property("api_key_id", core.serialization.string().optional()), endedAt: core.serialization.property("ended_at", core.serialization.date().optional()), environment: EnvironmentResponseData.optional(), @@ -34,6 +36,7 @@ export const AuditLogResponseData: core.serialization.ObjectSchema< export declare namespace AuditLogResponseData { export interface Raw { actor_type: ActorType.Raw; + api_key?: ApiKeyResponseData.Raw | null; api_key_id?: string | null; ended_at?: string | null; environment?: EnvironmentResponseData.Raw | null; diff --git a/src/serialization/types/BillingPlanCreditGrantResponseData.ts b/src/serialization/types/BillingPlanCreditGrantResponseData.ts index 2bc125d7..a785d3c5 100644 --- a/src/serialization/types/BillingPlanCreditGrantResponseData.ts +++ b/src/serialization/types/BillingPlanCreditGrantResponseData.ts @@ -24,6 +24,7 @@ export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema "auto_topup_expiry_unit_count", core.serialization.number().optional(), ), + autoTopupSelfService: core.serialization.property("auto_topup_self_service", core.serialization.boolean()), autoTopupThresholdCredits: core.serialization.property( "auto_topup_threshold_credits", core.serialization.number().optional(), @@ -61,6 +62,7 @@ export declare namespace BillingPlanCreditGrantResponseData { auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null; auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null; auto_topup_expiry_unit_count?: number | null; + auto_topup_self_service: boolean; auto_topup_threshold_credits?: number | null; auto_topup_threshold_percent?: number | null; created_at: string; diff --git a/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts b/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts index b7acc3a9..e47e4a9e 100644 --- a/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts +++ b/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { UpdateAddOnRequestBody } from "./UpdateAddOnRequestBody"; +import { UpdateAutoTopupOverrideRequestBody } from "./UpdateAutoTopupOverrideRequestBody"; import { UpdateCreditBundleRequestBody } from "./UpdateCreditBundleRequestBody"; import { UpdatePayInAdvanceRequestBody } from "./UpdatePayInAdvanceRequestBody"; @@ -12,6 +13,10 @@ export const ChangeSubscriptionInternalRequestBody: core.serialization.ObjectSch Schematic.ChangeSubscriptionInternalRequestBody > = core.serialization.object({ addOnIds: core.serialization.property("add_on_ids", core.serialization.list(UpdateAddOnRequestBody)), + autoTopupOverrides: core.serialization.property( + "auto_topup_overrides", + core.serialization.list(UpdateAutoTopupOverrideRequestBody), + ), companyId: core.serialization.property("company_id", core.serialization.string()), couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()), creditBundles: core.serialization.property( @@ -29,6 +34,7 @@ export const ChangeSubscriptionInternalRequestBody: core.serialization.ObjectSch export declare namespace ChangeSubscriptionInternalRequestBody { export interface Raw { add_on_ids: UpdateAddOnRequestBody.Raw[]; + auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[]; company_id: string; coupon_external_id?: string | null; credit_bundles: UpdateCreditBundleRequestBody.Raw[]; diff --git a/src/serialization/types/ChangeSubscriptionRequestBody.ts b/src/serialization/types/ChangeSubscriptionRequestBody.ts index 8fb9bdbb..c18e66f1 100644 --- a/src/serialization/types/ChangeSubscriptionRequestBody.ts +++ b/src/serialization/types/ChangeSubscriptionRequestBody.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { UpdateAddOnRequestBody } from "./UpdateAddOnRequestBody"; +import { UpdateAutoTopupOverrideRequestBody } from "./UpdateAutoTopupOverrideRequestBody"; import { UpdateCreditBundleRequestBody } from "./UpdateCreditBundleRequestBody"; import { UpdatePayInAdvanceRequestBody } from "./UpdatePayInAdvanceRequestBody"; @@ -12,6 +13,10 @@ export const ChangeSubscriptionRequestBody: core.serialization.ObjectSchema< Schematic.ChangeSubscriptionRequestBody > = core.serialization.object({ addOnIds: core.serialization.property("add_on_ids", core.serialization.list(UpdateAddOnRequestBody)), + autoTopupOverrides: core.serialization.property( + "auto_topup_overrides", + core.serialization.list(UpdateAutoTopupOverrideRequestBody), + ), couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()), creditBundles: core.serialization.property( "credit_bundles", @@ -28,6 +33,7 @@ export const ChangeSubscriptionRequestBody: core.serialization.ObjectSchema< export declare namespace ChangeSubscriptionRequestBody { export interface Raw { add_on_ids: UpdateAddOnRequestBody.Raw[]; + auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[]; coupon_external_id?: string | null; credit_bundles: UpdateCreditBundleRequestBody.Raw[]; new_plan_id: string; diff --git a/src/serialization/types/CompanyPlanCreditGrantView.ts b/src/serialization/types/CompanyPlanCreditGrantView.ts new file mode 100644 index 00000000..630fe1c7 --- /dev/null +++ b/src/serialization/types/CompanyPlanCreditGrantView.ts @@ -0,0 +1,123 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { BillingCreditExpiryType } from "./BillingCreditExpiryType"; +import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit"; +import { BillingCreditView } from "./BillingCreditView"; +import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence"; +import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart"; +import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType"; +import { GenericPreviewObject } from "./GenericPreviewObject"; + +export const CompanyPlanCreditGrantView: core.serialization.ObjectSchema< + serializers.CompanyPlanCreditGrantView.Raw, + Schematic.CompanyPlanCreditGrantView +> = core.serialization.object({ + billingCreditAutoTopupAmount: core.serialization.property( + "billing_credit_auto_topup_amount", + core.serialization.number().optional(), + ), + billingCreditAutoTopupAmountType: core.serialization.property( + "billing_credit_auto_topup_amount_type", + core.serialization.string().optional(), + ), + billingCreditAutoTopupEnabled: core.serialization.property( + "billing_credit_auto_topup_enabled", + core.serialization.boolean(), + ), + billingCreditAutoTopupExpiryType: core.serialization.property( + "billing_credit_auto_topup_expiry_type", + BillingCreditExpiryType.optional(), + ), + billingCreditAutoTopupExpiryUnit: core.serialization.property( + "billing_credit_auto_topup_expiry_unit", + BillingCreditExpiryUnit.optional(), + ), + billingCreditAutoTopupExpiryUnitCount: core.serialization.property( + "billing_credit_auto_topup_expiry_unit_count", + core.serialization.number().optional(), + ), + billingCreditAutoTopupSelfService: core.serialization.property( + "billing_credit_auto_topup_self_service", + core.serialization.boolean(), + ), + billingCreditAutoTopupThresholdCredits: core.serialization.property( + "billing_credit_auto_topup_threshold_credits", + core.serialization.number().optional(), + ), + billingCreditAutoTopupThresholdPercent: core.serialization.property( + "billing_credit_auto_topup_threshold_percent", + core.serialization.number().optional(), + ), + companyAutoTopupAmount: core.serialization.property( + "company_auto_topup_amount", + core.serialization.number().optional(), + ), + companyAutoTopupEnabled: core.serialization.property( + "company_auto_topup_enabled", + core.serialization.boolean().optional(), + ), + companyAutoTopupThresholdCredits: core.serialization.property( + "company_auto_topup_threshold_credits", + core.serialization.number().optional(), + ), + createdAt: core.serialization.property("created_at", core.serialization.date()), + credit: BillingCreditView.optional(), + creditAmount: core.serialization.property("credit_amount", core.serialization.number()), + creditDescription: core.serialization.property("credit_description", core.serialization.string()), + creditIcon: core.serialization.property("credit_icon", core.serialization.string().optional()), + creditId: core.serialization.property("credit_id", core.serialization.string()), + creditName: core.serialization.property("credit_name", core.serialization.string()), + expiryType: core.serialization.property("expiry_type", BillingCreditExpiryType.optional()), + expiryUnit: core.serialization.property("expiry_unit", BillingCreditExpiryUnit.optional()), + expiryUnitCount: core.serialization.property("expiry_unit_count", core.serialization.number().optional()), + id: core.serialization.string(), + plan: GenericPreviewObject.optional(), + planId: core.serialization.property("plan_id", core.serialization.string()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + pluralName: core.serialization.property("plural_name", core.serialization.string().optional()), + resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence.optional()), + resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart.optional()), + resetType: core.serialization.property("reset_type", BillingPlanCreditGrantResetType), + singularName: core.serialization.property("singular_name", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace CompanyPlanCreditGrantView { + export interface Raw { + billing_credit_auto_topup_amount?: number | null; + billing_credit_auto_topup_amount_type?: string | null; + billing_credit_auto_topup_enabled: boolean; + billing_credit_auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null; + billing_credit_auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null; + billing_credit_auto_topup_expiry_unit_count?: number | null; + billing_credit_auto_topup_self_service: boolean; + billing_credit_auto_topup_threshold_credits?: number | null; + billing_credit_auto_topup_threshold_percent?: number | null; + company_auto_topup_amount?: number | null; + company_auto_topup_enabled?: boolean | null; + company_auto_topup_threshold_credits?: number | null; + created_at: string; + credit?: BillingCreditView.Raw | null; + credit_amount: number; + credit_description: string; + credit_icon?: string | null; + credit_id: string; + credit_name: string; + expiry_type?: BillingCreditExpiryType.Raw | null; + expiry_unit?: BillingCreditExpiryUnit.Raw | null; + expiry_unit_count?: number | null; + id: string; + plan?: GenericPreviewObject.Raw | null; + plan_id: string; + plan_version_id?: string | null; + plural_name?: string | null; + reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null; + reset_start?: BillingPlanCreditGrantResetStart.Raw | null; + reset_type: BillingPlanCreditGrantResetType.Raw; + singular_name?: string | null; + updated_at: string; + } +} diff --git a/src/serialization/types/CompanyPlanWithBillingSubView.ts b/src/serialization/types/CompanyPlanWithBillingSubView.ts index 7c8293f6..46e54e59 100644 --- a/src/serialization/types/CompanyPlanWithBillingSubView.ts +++ b/src/serialization/types/CompanyPlanWithBillingSubView.ts @@ -3,7 +3,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { PlanCreditGrantView } from "./PlanCreditGrantView"; +import { CompanyPlanCreditGrantView } from "./CompanyPlanCreditGrantView"; export const CompanyPlanWithBillingSubView: core.serialization.ObjectSchema< serializers.CompanyPlanWithBillingSubView.Raw, @@ -20,7 +20,7 @@ export const CompanyPlanWithBillingSubView: core.serialization.ObjectSchema< imageUrl: core.serialization.property("image_url", core.serialization.string().optional()), includedCreditGrants: core.serialization.property( "included_credit_grants", - core.serialization.list(PlanCreditGrantView), + core.serialization.list(CompanyPlanCreditGrantView), ), name: core.serialization.string(), planPeriod: core.serialization.property("plan_period", core.serialization.string().optional()), @@ -36,7 +36,7 @@ export declare namespace CompanyPlanWithBillingSubView { description?: string | null; id: string; image_url?: string | null; - included_credit_grants: PlanCreditGrantView.Raw[]; + included_credit_grants: CompanyPlanCreditGrantView.Raw[]; name: string; plan_period?: string | null; plan_price?: number | null; diff --git a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts index b38e2ccc..fd3cf9a9 100644 --- a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts +++ b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts @@ -24,6 +24,10 @@ export const CreateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS "auto_topup_expiry_unit_count", core.serialization.number().optional(), ), + autoTopupSelfService: core.serialization.property( + "auto_topup_self_service", + core.serialization.boolean().optional(), + ), autoTopupThresholdCredits: core.serialization.property( "auto_topup_threshold_credits", core.serialization.number().optional(), @@ -53,6 +57,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody { auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null; auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null; auto_topup_expiry_unit_count?: number | null; + auto_topup_self_service?: boolean | null; auto_topup_threshold_credits?: number | null; auto_topup_threshold_percent?: number | null; credit_amount: number; diff --git a/src/serialization/types/DuplicatePlanEntitlementsResponseResponseData.ts b/src/serialization/types/DuplicatePlanEntitlementsResponseResponseData.ts index 419c6d4a..76f2ef5a 100644 --- a/src/serialization/types/DuplicatePlanEntitlementsResponseResponseData.ts +++ b/src/serialization/types/DuplicatePlanEntitlementsResponseResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { PlanEntitlementResponseData } from "./PlanEntitlementResponseData"; +import { PlanIssueResponseData } from "./PlanIssueResponseData"; import { SkippedEntitlementResponseData } from "./SkippedEntitlementResponseData"; export const DuplicatePlanEntitlementsResponseResponseData: core.serialization.ObjectSchema< @@ -11,12 +12,14 @@ export const DuplicatePlanEntitlementsResponseResponseData: core.serialization.O Schematic.DuplicatePlanEntitlementsResponseResponseData > = core.serialization.object({ data: core.serialization.list(PlanEntitlementResponseData), + issues: core.serialization.list(PlanIssueResponseData), skipped: core.serialization.list(SkippedEntitlementResponseData), }); export declare namespace DuplicatePlanEntitlementsResponseResponseData { export interface Raw { data: PlanEntitlementResponseData.Raw[]; + issues: PlanIssueResponseData.Raw[]; skipped: SkippedEntitlementResponseData.Raw[]; } } diff --git a/src/serialization/types/EventDetailResponseData.ts b/src/serialization/types/EventDetailResponseData.ts index 5fd840a8..8b319a21 100644 --- a/src/serialization/types/EventDetailResponseData.ts +++ b/src/serialization/types/EventDetailResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { ApiKeyResponseData } from "./ApiKeyResponseData"; import { EventStatus } from "./EventStatus"; import { EventType } from "./EventType"; import { PreviewObject } from "./PreviewObject"; @@ -12,6 +13,7 @@ export const EventDetailResponseData: core.serialization.ObjectSchema< Schematic.EventDetailResponseData > = core.serialization.object({ apiKey: core.serialization.property("api_key", core.serialization.string().optional()), + apiKeyView: core.serialization.property("api_key_view", ApiKeyResponseData.optional()), body: core.serialization.record(core.serialization.string(), core.serialization.unknown()), bodyPreview: core.serialization.property("body_preview", core.serialization.string()), capturedAt: core.serialization.property("captured_at", core.serialization.date()), @@ -39,6 +41,7 @@ export const EventDetailResponseData: core.serialization.ObjectSchema< export declare namespace EventDetailResponseData { export interface Raw { api_key?: string | null; + api_key_view?: ApiKeyResponseData.Raw | null; body: Record; body_preview: string; captured_at: string; diff --git a/src/serialization/types/PlanCreditGrantView.ts b/src/serialization/types/PlanCreditGrantView.ts index 42cc5753..02cfedda 100644 --- a/src/serialization/types/PlanCreditGrantView.ts +++ b/src/serialization/types/PlanCreditGrantView.ts @@ -39,6 +39,10 @@ export const PlanCreditGrantView: core.serialization.ObjectSchema< "billing_credit_auto_topup_expiry_unit_count", core.serialization.number().optional(), ), + billingCreditAutoTopupSelfService: core.serialization.property( + "billing_credit_auto_topup_self_service", + core.serialization.boolean(), + ), billingCreditAutoTopupThresholdCredits: core.serialization.property( "billing_credit_auto_topup_threshold_credits", core.serialization.number().optional(), @@ -77,6 +81,7 @@ export declare namespace PlanCreditGrantView { billing_credit_auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null; billing_credit_auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null; billing_credit_auto_topup_expiry_unit_count?: number | null; + billing_credit_auto_topup_self_service: boolean; billing_credit_auto_topup_threshold_credits?: number | null; billing_credit_auto_topup_threshold_percent?: number | null; created_at: string; diff --git a/src/serialization/types/UpdateAutoTopupOverrideRequestBody.ts b/src/serialization/types/UpdateAutoTopupOverrideRequestBody.ts new file mode 100644 index 00000000..6fd1a87c --- /dev/null +++ b/src/serialization/types/UpdateAutoTopupOverrideRequestBody.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const UpdateAutoTopupOverrideRequestBody: core.serialization.ObjectSchema< + serializers.UpdateAutoTopupOverrideRequestBody.Raw, + Schematic.UpdateAutoTopupOverrideRequestBody +> = core.serialization.object({ + autoTopupAmount: core.serialization.property("auto_topup_amount", core.serialization.number().optional()), + autoTopupEnabled: core.serialization.property("auto_topup_enabled", core.serialization.boolean().optional()), + autoTopupThresholdCredits: core.serialization.property( + "auto_topup_threshold_credits", + core.serialization.number().optional(), + ), + planCreditGrantId: core.serialization.property("plan_credit_grant_id", core.serialization.string()), +}); + +export declare namespace UpdateAutoTopupOverrideRequestBody { + export interface Raw { + auto_topup_amount?: number | null; + auto_topup_enabled?: boolean | null; + auto_topup_threshold_credits?: number | null; + plan_credit_grant_id: string; + } +} diff --git a/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts b/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts index 1c173435..bd07db88 100644 --- a/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts +++ b/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts @@ -24,6 +24,10 @@ export const UpdateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS "auto_topup_expiry_unit_count", core.serialization.number().optional(), ), + autoTopupSelfService: core.serialization.property( + "auto_topup_self_service", + core.serialization.boolean().optional(), + ), autoTopupThresholdCredits: core.serialization.property( "auto_topup_threshold_credits", core.serialization.number().optional(), @@ -50,6 +54,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody { auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null; auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null; auto_topup_expiry_unit_count?: number | null; + auto_topup_self_service?: boolean | null; auto_topup_threshold_credits?: number | null; auto_topup_threshold_percent?: number | null; credit_amount?: number | null; diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 91c17318..fff0e027 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -6,6 +6,7 @@ export * from "./ActivityResponseResponseData"; export * from "./ActorType"; export * from "./ApiError"; export * from "./ApiKeyCreateResponseData"; +export * from "./ApiKeyIntegrationResponseData"; export * from "./ApiKeyResponseData"; export * from "./ApiKeyScope"; export * from "./AuditLogListResponseData"; @@ -75,6 +76,7 @@ export * from "./CompanyMembershipDetailResponseData"; export * from "./CompanyMembershipResponseData"; export * from "./CompanyOverrideNoteResponseData"; export * from "./CompanyOverrideResponseData"; +export * from "./CompanyPlanCreditGrantView"; export * from "./CompanyPlanDetailResponseData"; export * from "./CompanyPlanInvalidReason"; export * from "./CompanyPlanWithBillingSubView"; @@ -330,6 +332,7 @@ export * from "./TraitDefinitionComparableType"; export * from "./TraitType"; export * from "./TrialStatus"; export * from "./UpdateAddOnRequestBody"; +export * from "./UpdateAutoTopupOverrideRequestBody"; export * from "./UpdateBillingPlanCreditGrantRequestBody"; export * from "./UpdateCreditBundleRequestBody"; export * from "./UpdateEntitlementReqCommon"; diff --git a/tests/unit/fetcher/makePassthroughRequest.test.ts b/tests/unit/fetcher/makePassthroughRequest.test.ts index 91e21e0c..31a51012 100644 --- a/tests/unit/fetcher/makePassthroughRequest.test.ts +++ b/tests/unit/fetcher/makePassthroughRequest.test.ts @@ -245,7 +245,7 @@ describe("makePassthroughRequest", () => { }); it("should use requestOptions maxRetries over client maxRetries", async () => { - mockFetch.mockResolvedValue(new Response("", { status: 500 })); + mockFetch.mockResolvedValue(new Response("", { status: 502 })); jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; diff --git a/tests/unit/fetcher/requestWithRetries.test.ts b/tests/unit/fetcher/requestWithRetries.test.ts index 9c2aaf21..9fffdf62 100644 --- a/tests/unit/fetcher/requestWithRetries.test.ts +++ b/tests/unit/fetcher/requestWithRetries.test.ts @@ -20,13 +20,13 @@ describe("requestWithRetries", () => { jest.clearAllTimers(); }); - it("should retry on retryable status codes", async () => { + it("should retry on retryable status codes (legacy mode)", async () => { setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); return null as any; }); - const retryableStatuses = [408, 429, 500, 502]; + const retryableStatuses = [408, 429, 500, 501, 502, 503, 504, 505]; let callCount = 0; mockFetch.mockImplementation(async () => { @@ -44,6 +44,24 @@ describe("requestWithRetries", () => { expect(response.status).toBe(200); }); + it("should retry on 500 Internal Server Error in legacy mode", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(2); + expect(response.status).toBe(200); + }); + it("should respect maxRetries limit", async () => { setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { process.nextTick(callback); @@ -51,14 +69,48 @@ describe("requestWithRetries", () => { }); const maxRetries = 2; - mockFetch.mockResolvedValue(new Response("", { status: 500 })); + mockFetch.mockResolvedValue(new Response("", { status: 503 })); const responsePromise = requestWithRetries(() => mockFetch(), maxRetries); await jest.runAllTimersAsync(); const response = await responsePromise; expect(mockFetch).toHaveBeenCalledTimes(maxRetries + 1); - expect(response.status).toBe(500); + expect(response.status).toBe(503); + }); + + it("should retry on status 599 (upper boundary of retryable 5xx in legacy mode)", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce(new Response("", { status: 599 })) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(2); + expect(response.status).toBe(200); + }); + + it("should not retry on non-retryable client error (400)", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch.mockResolvedValueOnce(new Response("", { status: 400 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 3); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(mockFetch).toHaveBeenCalledTimes(1); + expect(response.status).toBe(400); }); it("should not retry on success status codes", async () => { @@ -150,7 +202,7 @@ describe("requestWithRetries", () => { return null as any; }); - mockFetch.mockResolvedValue(new Response("", { status: 500 })); + mockFetch.mockResolvedValue(new Response("", { status: 502 })); const maxRetries = 3; const expectedDelays = [1000, 2000, 4000]; @@ -174,8 +226,8 @@ describe("requestWithRetries", () => { }); mockFetch - .mockResolvedValueOnce(new Response("", { status: 500 })) - .mockResolvedValueOnce(new Response("", { status: 500 })) + .mockResolvedValueOnce(new Response("", { status: 502 })) + .mockResolvedValueOnce(new Response("", { status: 502 })) .mockResolvedValueOnce(new Response("", { status: 200 })) .mockResolvedValueOnce(new Response("", { status: 200 })); diff --git a/tests/wire/accounts.test.ts b/tests/wire/accounts.test.ts index 8bb2f433..5ef1f7ea 100644 --- a/tests/wire/accounts.test.ts +++ b/tests/wire/accounts.test.ts @@ -262,6 +262,7 @@ describe("AccountsClient", () => { }, environment_id: "environment_id", id: "id", + integration: { id: "id", state: "active", type: "clerk" }, last_used_at: "2024-01-15T09:30:00Z", name: "name", readonly: true, @@ -294,6 +295,11 @@ describe("AccountsClient", () => { }, environmentId: "environment_id", id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", readonly: true, @@ -402,6 +408,7 @@ describe("AccountsClient", () => { }, environment_id: "environment_id", id: "id", + integration: { id: "id", state: "active", type: "clerk" }, last_used_at: "2024-01-15T09:30:00Z", name: "name", readonly: true, @@ -437,6 +444,11 @@ describe("AccountsClient", () => { }, environmentId: "environment_id", id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", readonly: true, @@ -577,6 +589,7 @@ describe("AccountsClient", () => { }, environment_id: "environment_id", id: "id", + integration: { id: "id", state: "active", type: "clerk" }, last_used_at: "2024-01-15T09:30:00Z", name: "name", readonly: true, @@ -608,6 +621,11 @@ describe("AccountsClient", () => { }, environmentId: "environment_id", id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", readonly: true, @@ -713,6 +731,7 @@ describe("AccountsClient", () => { }, environment_id: "environment_id", id: "id", + integration: { id: "id", state: "active", type: "clerk" }, last_used_at: "2024-01-15T09:30:00Z", name: "name", readonly: true, @@ -745,6 +764,11 @@ describe("AccountsClient", () => { }, environmentId: "environment_id", id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", readonly: true, @@ -1090,6 +1114,14 @@ describe("AccountsClient", () => { data: [ { actor_type: "api_key", + api_key: { + created_at: "2024-01-15T09:30:00Z", + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updated_at: "2024-01-15T09:30:00Z", + }, api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment: { @@ -1139,6 +1171,14 @@ describe("AccountsClient", () => { data: [ { actorType: "api_key", + apiKey: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environment: { @@ -1246,6 +1286,25 @@ describe("AccountsClient", () => { const rawResponseBody = { data: { actor_type: "api_key", + api_key: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment: { + created_at: "2024-01-15T09:30:00Z", + environment_type: "development", + id: "id", + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + environment_id: "environment_id", + id: "id", + integration: { id: "id", state: "active", type: "clerk" }, + last_used_at: "2024-01-15T09:30:00Z", + name: "name", + readonly: true, + scopes: ["admin"], + updated_at: "2024-01-15T09:30:00Z", + }, api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment: { @@ -1286,6 +1345,29 @@ describe("AccountsClient", () => { expect(response).toEqual({ data: { actorType: "api_key", + apiKey: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environment: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentType: "development", + id: "id", + name: "name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + environmentId: "environment_id", + id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, + lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), + name: "name", + readonly: true, + scopes: ["admin"], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environment: { diff --git a/tests/wire/checkout.test.ts b/tests/wire/checkout.test.ts index 637e5bd7..65c7b8aa 100644 --- a/tests/wire/checkout.test.ts +++ b/tests/wire/checkout.test.ts @@ -10,6 +10,7 @@ describe("CheckoutClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { add_on_ids: [{ add_on_id: "add_on_id", price_id: "price_id" }], + auto_topup_overrides: [{ plan_credit_grant_id: "plan_credit_grant_id" }], company_id: "company_id", credit_bundles: [{ bundle_id: "bundle_id", quantity: 1000000 }], new_plan_id: "new_plan_id", @@ -62,6 +63,11 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -121,6 +127,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -157,6 +167,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -193,6 +211,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -229,6 +251,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -265,6 +295,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -301,6 +335,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -337,6 +379,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -373,6 +419,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -409,6 +463,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -445,6 +503,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -726,6 +792,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -809,6 +876,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1003,6 +1071,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1222,6 +1291,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -1655,6 +1725,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -1747,6 +1818,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1949,6 +2021,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2199,6 +2272,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -2456,6 +2530,7 @@ describe("CheckoutClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { add_on_ids: [{ add_on_id: "add_on_id", price_id: "price_id" }], + auto_topup_overrides: [{ plan_credit_grant_id: "plan_credit_grant_id" }], company_id: "company_id", credit_bundles: [{ bundle_id: "bundle_id", quantity: 1000000 }], new_plan_id: "new_plan_id", @@ -2526,6 +2601,11 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2601,6 +2681,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -2637,6 +2721,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2673,6 +2765,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -2709,6 +2805,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2745,6 +2849,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -2781,6 +2889,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2817,6 +2933,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -2853,6 +2973,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2889,6 +3017,10 @@ describe("CheckoutClient", () => { { add_on_id: "add_on_id", price_id: "price_id" }, { add_on_id: "add_on_id", price_id: "price_id" }, ], + auto_topup_overrides: [ + { plan_credit_grant_id: "plan_credit_grant_id" }, + { plan_credit_grant_id: "plan_credit_grant_id" }, + ], company_id: "company_id", credit_bundles: [ { bundle_id: "bundle_id", quantity: 1000000 }, @@ -2925,6 +3057,14 @@ describe("CheckoutClient", () => { priceId: "price_id", }, ], + autoTopupOverrides: [ + { + planCreditGrantId: "plan_credit_grant_id", + }, + { + planCreditGrantId: "plan_credit_grant_id", + }, + ], companyId: "company_id", creditBundles: [ { @@ -2971,6 +3111,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -3165,6 +3306,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -3274,6 +3416,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -3476,6 +3619,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -4313,6 +4457,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -4507,6 +4652,7 @@ describe("CheckoutClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -4599,6 +4745,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -4801,6 +4948,7 @@ describe("CheckoutClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", diff --git a/tests/wire/companies.test.ts b/tests/wire/companies.test.ts index f91cb245..c988ed4d 100644 --- a/tests/wire/companies.test.ts +++ b/tests/wire/companies.test.ts @@ -18,6 +18,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -212,6 +213,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -334,6 +336,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -536,6 +539,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -711,6 +715,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -952,6 +957,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1048,6 +1054,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1299,6 +1306,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1515,6 +1523,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1756,6 +1765,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1847,6 +1857,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2098,6 +2109,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2539,6 +2551,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -2780,6 +2793,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -2876,6 +2890,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -3127,6 +3142,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -3520,8 +3536,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -3601,8 +3621,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -3696,8 +3720,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -3777,8 +3805,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -4627,8 +4659,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -4708,8 +4744,12 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_type: "duration", billing_credit_auto_topup_expiry_unit: "billing_periods", billing_credit_auto_topup_expiry_unit_count: 1000000, + billing_credit_auto_topup_self_service: true, billing_credit_auto_topup_threshold_credits: 1000000, billing_credit_auto_topup_threshold_percent: 1000000, + company_auto_topup_amount: 1000000, + company_auto_topup_enabled: true, + company_auto_topup_threshold_credits: 1000000, created_at: "2024-01-15T09:30:00Z", credit: { account_id: "account_id", @@ -5135,8 +5175,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -5228,8 +5272,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -5335,8 +5383,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -5428,8 +5480,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -6304,8 +6360,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -6397,8 +6457,12 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryType: "duration", billingCreditAutoTopupExpiryUnit: "billing_periods", billingCreditAutoTopupExpiryUnitCount: 1000000, + billingCreditAutoTopupSelfService: true, billingCreditAutoTopupThresholdCredits: 1000000, billingCreditAutoTopupThresholdPercent: 1000000, + companyAutoTopupAmount: 1000000, + companyAutoTopupEnabled: true, + companyAutoTopupThresholdCredits: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), credit: { accountId: "account_id", @@ -7683,6 +7747,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -7924,6 +7989,7 @@ describe("CompaniesClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -8021,6 +8087,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -8272,6 +8339,7 @@ describe("CompaniesClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -9936,6 +10004,7 @@ describe("CompaniesClient", () => { }, environment_id: "environment_id", id: "id", + integration: { id: "id", state: "active", type: "clerk" }, last_used_at: "2024-01-15T09:30:00Z", name: "name", readonly: true, @@ -9944,6 +10013,14 @@ describe("CompaniesClient", () => { }, audit_log: { actor_type: "api_key", + api_key: { + created_at: "2024-01-15T09:30:00Z", + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updated_at: "2024-01-15T09:30:00Z", + }, api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment: { @@ -10047,6 +10124,11 @@ describe("CompaniesClient", () => { }, environmentId: "environment_id", id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", readonly: true, @@ -10055,6 +10137,14 @@ describe("CompaniesClient", () => { }, auditLog: { actorType: "api_key", + apiKey: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environment: { diff --git a/tests/wire/components.test.ts b/tests/wire/components.test.ts index 877596e2..115e4c41 100644 --- a/tests/wire/components.test.ts +++ b/tests/wire/components.test.ts @@ -865,6 +865,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1011,6 +1012,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1072,6 +1074,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1266,6 +1269,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1517,6 +1521,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -1752,6 +1757,7 @@ describe("ComponentsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -2073,6 +2079,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2242,6 +2249,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2314,6 +2322,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2516,6 +2525,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2799,6 +2809,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -3053,6 +3064,7 @@ describe("ComponentsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", diff --git a/tests/wire/componentspublic.test.ts b/tests/wire/componentspublic.test.ts index 10c8954c..8386859a 100644 --- a/tests/wire/componentspublic.test.ts +++ b/tests/wire/componentspublic.test.ts @@ -112,6 +112,7 @@ describe("ComponentspublicClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -247,6 +248,7 @@ describe("ComponentspublicClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -430,6 +432,7 @@ describe("ComponentspublicClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -588,6 +591,7 @@ describe("ComponentspublicClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", diff --git a/tests/wire/credits.test.ts b/tests/wire/credits.test.ts index 728ce36a..8c96a824 100644 --- a/tests/wire/credits.test.ts +++ b/tests/wire/credits.test.ts @@ -3991,6 +3991,7 @@ describe("CreditsClient", () => { auto_topup_expiry_type: "duration", auto_topup_expiry_unit: "billing_periods", auto_topup_expiry_unit_count: 1000000, + auto_topup_self_service: true, auto_topup_threshold_credits: 1000000, auto_topup_threshold_percent: 1000000, created_at: "2024-01-15T09:30:00Z", @@ -4031,6 +4032,7 @@ describe("CreditsClient", () => { plan_id: "plan_id", plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], }, }; @@ -4048,6 +4050,7 @@ describe("CreditsClient", () => { planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], limit: 1000000, offset: 1000000, }); @@ -4060,6 +4063,7 @@ describe("CreditsClient", () => { autoTopupExpiryType: "duration", autoTopupExpiryUnit: "billing_periods", autoTopupExpiryUnitCount: 1000000, + autoTopupSelfService: true, autoTopupThresholdCredits: 1000000, autoTopupThresholdPercent: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -4107,6 +4111,7 @@ describe("CreditsClient", () => { planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], }, }); }); @@ -4224,6 +4229,7 @@ describe("CreditsClient", () => { auto_topup_expiry_type: "duration", auto_topup_expiry_unit: "billing_periods", auto_topup_expiry_unit_count: 1000000, + auto_topup_self_service: true, auto_topup_threshold_credits: 1000000, auto_topup_threshold_percent: 1000000, created_at: "2024-01-15T09:30:00Z", @@ -4308,6 +4314,7 @@ describe("CreditsClient", () => { autoTopupExpiryType: "duration", autoTopupExpiryUnit: "billing_periods", autoTopupExpiryUnitCount: 1000000, + autoTopupSelfService: true, autoTopupThresholdCredits: 1000000, autoTopupThresholdPercent: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -4552,6 +4559,7 @@ describe("CreditsClient", () => { auto_topup_expiry_type: "duration", auto_topup_expiry_unit: "billing_periods", auto_topup_expiry_unit_count: 1000000, + auto_topup_self_service: true, auto_topup_threshold_credits: 1000000, auto_topup_threshold_percent: 1000000, created_at: "2024-01-15T09:30:00Z", @@ -4629,6 +4637,7 @@ describe("CreditsClient", () => { autoTopupExpiryType: "duration", autoTopupExpiryUnit: "billing_periods", autoTopupExpiryUnitCount: 1000000, + autoTopupSelfService: true, autoTopupThresholdCredits: 1000000, autoTopupThresholdPercent: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -4789,6 +4798,7 @@ describe("CreditsClient", () => { auto_topup_expiry_type: "duration", auto_topup_expiry_unit: "billing_periods", auto_topup_expiry_unit_count: 1000000, + auto_topup_self_service: true, auto_topup_threshold_credits: 1000000, auto_topup_threshold_percent: 1000000, created_at: "2024-01-15T09:30:00Z", @@ -4870,6 +4880,7 @@ describe("CreditsClient", () => { autoTopupExpiryType: "duration", autoTopupExpiryUnit: "billing_periods", autoTopupExpiryUnitCount: 1000000, + autoTopupSelfService: true, autoTopupThresholdCredits: 1000000, autoTopupThresholdPercent: 1000000, createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -5193,6 +5204,7 @@ describe("CreditsClient", () => { plan_id: "plan_id", plan_ids: ["plan_ids"], plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], }, }; @@ -5210,6 +5222,7 @@ describe("CreditsClient", () => { planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], limit: 1000000, offset: 1000000, }); @@ -5225,6 +5238,7 @@ describe("CreditsClient", () => { planId: "plan_id", planIds: ["plan_ids"], planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], }, }); }); diff --git a/tests/wire/entitlements.test.ts b/tests/wire/entitlements.test.ts index 196ce7a9..5ffa860c 100644 --- a/tests/wire/entitlements.test.ts +++ b/tests/wire/entitlements.test.ts @@ -19,6 +19,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -271,6 +272,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -590,6 +592,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -784,6 +787,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -927,6 +931,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1129,6 +1134,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1392,6 +1398,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1586,6 +1593,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -1724,6 +1732,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1926,6 +1935,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2145,6 +2155,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -2339,6 +2350,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -2480,6 +2492,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -2682,6 +2695,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -3210,6 +3224,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -3577,6 +3592,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -5002,6 +5018,7 @@ describe("EntitlementsClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -5291,6 +5308,7 @@ describe("EntitlementsClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -8383,6 +8401,7 @@ describe("EntitlementsClient", () => { value_type: "boolean", }, ], + issues: [{ code: "code", description: "description" }], skipped: [ { entitlement_id: "entitlement_id", @@ -8427,6 +8446,12 @@ describe("EntitlementsClient", () => { valueType: "boolean", }, ], + issues: [ + { + code: "code", + description: "description", + }, + ], skipped: [ { entitlementId: "entitlement_id", diff --git a/tests/wire/events.test.ts b/tests/wire/events.test.ts index 45fd7fa0..642d237b 100644 --- a/tests/wire/events.test.ts +++ b/tests/wire/events.test.ts @@ -312,6 +312,14 @@ describe("EventsClient", () => { data: [ { api_key: "api_key", + api_key_view: { + created_at: "2024-01-15T09:30:00Z", + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updated_at: "2024-01-15T09:30:00Z", + }, body: { key: "value" }, body_preview: "body_preview", captured_at: "2024-01-15T09:30:00Z", @@ -361,6 +369,14 @@ describe("EventsClient", () => { data: [ { apiKey: "api_key", + apiKeyView: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + id: "id", + name: "name", + readonly: true, + scopes: ["admin"], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, body: { key: "value", }, @@ -631,6 +647,25 @@ describe("EventsClient", () => { const rawResponseBody = { data: { api_key: "api_key", + api_key_view: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment: { + created_at: "2024-01-15T09:30:00Z", + environment_type: "development", + id: "id", + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + environment_id: "environment_id", + id: "id", + integration: { id: "id", state: "active", type: "clerk" }, + last_used_at: "2024-01-15T09:30:00Z", + name: "name", + readonly: true, + scopes: ["admin"], + updated_at: "2024-01-15T09:30:00Z", + }, body: { key: "value" }, body_preview: "body_preview", captured_at: "2024-01-15T09:30:00Z", @@ -660,6 +695,29 @@ describe("EventsClient", () => { expect(response).toEqual({ data: { apiKey: "api_key", + apiKeyView: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environment: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentType: "development", + id: "id", + name: "name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + environmentId: "environment_id", + id: "id", + integration: { + id: "id", + state: "active", + type: "clerk", + }, + lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), + name: "name", + readonly: true, + scopes: ["admin"], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, body: { key: "value", }, diff --git a/tests/wire/features.test.ts b/tests/wire/features.test.ts index 4a1f97ed..c09f2f3e 100644 --- a/tests/wire/features.test.ts +++ b/tests/wire/features.test.ts @@ -121,6 +121,7 @@ describe("FeaturesClient", () => { feature_type: ["boolean"], ids: ["ids"], limit: 1000000, + managed_by: "orb", offset: 1000000, plan_version_id: "plan_version_id", q: "q", @@ -135,6 +136,7 @@ describe("FeaturesClient", () => { booleanRequireEvent: true, featureType: ["boolean"], ids: ["ids"], + managedBy: "orb", planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", @@ -271,6 +273,7 @@ describe("FeaturesClient", () => { featureType: ["boolean"], ids: ["ids"], limit: 1000000, + managedBy: "orb", offset: 1000000, planVersionId: "plan_version_id", q: "q", @@ -1987,6 +1990,7 @@ describe("FeaturesClient", () => { feature_type: ["boolean"], ids: ["ids"], limit: 1000000, + managed_by: "orb", offset: 1000000, plan_version_id: "plan_version_id", q: "q", @@ -2001,6 +2005,7 @@ describe("FeaturesClient", () => { booleanRequireEvent: true, featureType: ["boolean"], ids: ["ids"], + managedBy: "orb", planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", @@ -2017,6 +2022,7 @@ describe("FeaturesClient", () => { featureType: ["boolean"], ids: ["ids"], limit: 1000000, + managedBy: "orb", offset: 1000000, planVersionId: "plan_version_id", q: "q", diff --git a/tests/wire/planbundle.test.ts b/tests/wire/planbundle.test.ts index f243bafe..c1525e22 100644 --- a/tests/wire/planbundle.test.ts +++ b/tests/wire/planbundle.test.ts @@ -27,6 +27,7 @@ describe("PlanbundleClient", () => { credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -112,6 +113,7 @@ describe("PlanbundleClient", () => { creditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -337,6 +339,7 @@ describe("PlanbundleClient", () => { credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -422,6 +425,7 @@ describe("PlanbundleClient", () => { creditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", diff --git a/tests/wire/plangroups.test.ts b/tests/wire/plangroups.test.ts index 5fb31578..3c7d5090 100644 --- a/tests/wire/plangroups.test.ts +++ b/tests/wire/plangroups.test.ts @@ -303,6 +303,7 @@ describe("PlangroupsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -524,6 +525,7 @@ describe("PlangroupsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -747,6 +749,7 @@ describe("PlangroupsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -1132,6 +1135,7 @@ describe("PlangroupsClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -1577,6 +1581,7 @@ describe("PlangroupsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -1821,6 +1826,7 @@ describe("PlangroupsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -2067,6 +2073,7 @@ describe("PlangroupsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -2510,6 +2517,7 @@ describe("PlangroupsClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", diff --git a/tests/wire/plans.test.ts b/tests/wire/plans.test.ts index 635b0748..0071c379 100644 --- a/tests/wire/plans.test.ts +++ b/tests/wire/plans.test.ts @@ -17,6 +17,7 @@ describe("PlansClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -258,6 +259,7 @@ describe("PlansClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -352,6 +354,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -603,6 +606,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -1367,6 +1371,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -1614,6 +1619,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -1953,6 +1959,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -2015,6 +2022,7 @@ describe("PlansClient", () => { ], params: { company_id: "company_id", + company_scoped_only: true, exclude_company_scoped: true, for_fallback_plan: true, for_initial_plan: true, @@ -2036,6 +2044,7 @@ describe("PlansClient", () => { const response = await client.plans.listPlans({ companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, @@ -2214,6 +2223,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -2276,6 +2286,7 @@ describe("PlansClient", () => { ], params: { companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, @@ -2509,6 +2520,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -2756,6 +2768,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -3097,6 +3110,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -3335,6 +3349,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -3608,6 +3623,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -3853,6 +3869,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -4443,6 +4460,7 @@ describe("PlansClient", () => { included_credit_grants: [ { auto_topup_enabled: true, + auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_id: "credit_id", @@ -4692,6 +4710,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { autoTopupEnabled: true, + autoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditId: "credit_id", @@ -4936,6 +4955,7 @@ describe("PlansClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -5130,6 +5150,7 @@ describe("PlansClient", () => { included_credit_grants: [ { billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_self_service: true, created_at: "2024-01-15T09:30:00Z", credit_amount: 1000000, credit_description: "credit_description", @@ -5223,6 +5244,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -5425,6 +5447,7 @@ describe("PlansClient", () => { includedCreditGrants: [ { billingCreditAutoTopupEnabled: true, + billingCreditAutoTopupSelfService: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), creditAmount: 1000000, creditDescription: "credit_description", @@ -5762,6 +5785,7 @@ describe("PlansClient", () => { data: { count: 1 }, params: { company_id: "company_id", + company_scoped_only: true, exclude_company_scoped: true, for_fallback_plan: true, for_initial_plan: true, @@ -5783,6 +5807,7 @@ describe("PlansClient", () => { const response = await client.plans.countPlans({ companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, @@ -5804,6 +5829,7 @@ describe("PlansClient", () => { }, params: { companyId: "company_id", + companyScopedOnly: true, excludeCompanyScoped: true, forFallbackPlan: true, forInitialPlan: true, diff --git a/yarn.lock b/yarn.lock index ebebe7aa..8286603a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -338,30 +338,30 @@ dependencies: statuses "^2.0.1" -"@cloudflare/workerd-darwin-64@1.20260430.1": - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260430.1.tgz#1dbf994e7a02d5014254e237fb28157309401a5e" - integrity sha512-ADohZUHf7NBvPp2PdZig2Opxx+hDkk3ve7jrTne3JRx9kDSB73zc4LzcEeEN8LKkbAcqZmvfRJfpChSlusu0lA== - -"@cloudflare/workerd-darwin-arm64@1.20260430.1": - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260430.1.tgz#6e9953dfa763eb946f65fdfb77597668a6f21077" - integrity sha512-/DoYC/1wHs+YRZzzqSQg1/EHB4hiv1yV5U8FnmapRRIzVaPtnt+ApeOXeMrIdKidgKOI8TqQzgBU8xbIM7Cl4Q== - -"@cloudflare/workerd-linux-64@1.20260430.1": - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260430.1.tgz#638efe9cc38c6ba31d1de5d09cbb3e7e9d30bb6f" - integrity sha512-koJhBWvEVZPKCVFtMLp2iMHlYr+lFCF47wGbnlKdHVlemV0zTxJEyHI8aLlrhPLhBmOmYLp46rXw09/qJkRIhQ== - -"@cloudflare/workerd-linux-arm64@1.20260430.1": - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260430.1.tgz#05940bc745d4c70eccb8341ef9bd30e72faa1d93" - integrity sha512-hMdapNAzNQZDXGGkg4Slydc3fRJP5FUZLJVVcZCW/+imhhJro9Z1rv5n/wfR+txKoSWhTYR8eOp8Pyi2bzLzlw== - -"@cloudflare/workerd-windows-64@1.20260430.1": - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260430.1.tgz#5240fb60d9f2879d70e1a106fbcea2a3f9295efe" - integrity sha512-jS3ffixjb5USOwz4frw4WzCz0HrjVxkgyU3WiYb06N7hBAfN6eOrveAJ4QRef0+suK4V1vQFoB1oKdRBsXe9Dw== +"@cloudflare/workerd-darwin-64@1.20260508.1": + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260508.1.tgz#8b0fbc934ee2b8b59c4de9b5d84bff847793690a" + integrity sha512-IT3r6VgiSwIesL4AJbxjgxvIxwWZqM7BKkhYAzOKHl4GF2M0TxeOahUIXd+CYXVZgHX8ceEg+MXbEehPelJyNg== + +"@cloudflare/workerd-darwin-arm64@1.20260508.1": + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260508.1.tgz#66e9b0cf2a5259b39315b3fe55dfd7766c386de6" + integrity sha512-JTVsisOJPcNKw0qovPjqyBWYahfdhUh7/9NICiG5wxaEQ45PYKdoqNq0hOAAIqvqoxsKZBvTgcPTJREPqk7avA== + +"@cloudflare/workerd-linux-64@1.20260508.1": + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260508.1.tgz#1adee9c472180fcb69ed6b14e5afcbacad5a9f31" + integrity sha512-zO38pCc27YlsZiPYcaZnosy0/t7abXrRU3VEO1oKfUvnaCpHgphDG+VsrmHL+kntda6hrtNwg2jLeMAqqIjnjw== + +"@cloudflare/workerd-linux-arm64@1.20260508.1": + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260508.1.tgz#bb96d31e73efb2545b00fc7669f331db92a482c9" + integrity sha512-XhJa780Ia6MNIrtxn/ruZHS79b9pu5EKPfRNReaUqxy8erPT2fs93axMfFoS9kIkcaRRj/1TOUKcTeAMoywY7w== + +"@cloudflare/workerd-windows-64@1.20260508.1": + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260508.1.tgz#6affd54c7dee946a28bb5bd53f6f7617c2026995" + integrity sha512-QdDOK3B/Ul1s3QmIwDrFyx9230to6LsNmWcVR8w+TYjNZuRPzqQBgusp78LO7MlqCoEl9dvIcN00jkJnLtBSfw== "@cspotcode/source-map-support@0.8.1": version "0.8.1" @@ -1089,9 +1089,9 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" - integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== + version "1.0.9" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.9.tgz#cf3f0e876d7bee15a93ab925b82bf570a3904a24" + integrity sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -1150,18 +1150,18 @@ form-data "^4.0.4" "@types/node@*": - version "25.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.6.0.tgz#4e09bad9b469871f2d0f68140198cbd714f4edca" - integrity sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ== + version "25.7.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.7.0.tgz#7498f82e90dbdce7c34b75aaaa256c498a0ebe6c" + integrity sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg== dependencies: - undici-types "~7.19.0" + undici-types "~7.21.0" -"@types/node@^18.19.70": - version "18.19.130" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.130.tgz#da4c6324793a79defb7a62cba3947ec5add00d59" - integrity sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg== +"@types/node@^20.0.0": + version "20.19.41" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.41.tgz#bb266a1e0aaa2f4537d14ae8ebf238dd9ca73ce6" + integrity sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ== dependencies: - undici-types "~5.26.4" + undici-types "~6.21.0" "@types/readable-stream@^4.0.23": version "4.0.23" @@ -1521,9 +1521,9 @@ base64-js@^1.3.1: integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== baseline-browser-mapping@^2.10.12: - version "2.10.27" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz#fee941c2a0b42cdf83c6427e4c830b1d0bdab2c3" - integrity sha512-zEs/ufmZoUd7WftKpKyXaT6RFxpQ5Qm9xytKRHvJfxFV9DFJkZph9RvJ1LcOUi0Z1ZVijMte65JbILeV+8QQEA== + version "2.10.29" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.29.tgz#47bdc13027af28d341f367a4f35a07ce872e27b4" + integrity sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ== brace-expansion@^1.1.7: version "1.1.14" @@ -1602,9 +1602,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001782: - version "1.0.30001791" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz#dfb93d85c40ad380c57123e72e10f3c575786b51" - integrity sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ== + version "1.0.30001792" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001792.tgz#ca8bb9be244835a335e2018272ce7223691873c5" + integrity sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1809,9 +1809,9 @@ dunder-proto@^1.0.1: gopd "^1.2.0" electron-to-chromium@^1.5.328: - version "1.5.349" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.349.tgz#9b9c6a6d84d1107557c18a9336099ce0ee890e5b" - integrity sha512-QsWVGyRuY07Aqb234QytTfwd5d9AJlfNIQ5wIOl1L+PZDzI9d9+Fn0FRale/QYlFxt/bUnB0/nLd1jFPGxGK1A== + version "1.5.353" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.353.tgz#01e8a8e25a0bf13e631106045f177d0568ca91c2" + integrity sha512-kOrWphBi8TOZyiJZqsgqIle0lw+tzmnQK83pV9dZUd01Nm2POECSyFQMAuarzZdYqQW7FH9RaYOuaRo3h+bQ3w== emittery@^0.13.1: version "0.13.1" @@ -1824,9 +1824,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.20.0: - version "5.21.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.21.0.tgz#bb8e6fabaf74930de70e61397798750429e5b1ae" - integrity sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA== + version "5.21.3" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.21.3.tgz#fa7fed23679e9169dfb705b8e201924421c4414a" + integrity sha512-QyL119InA+XXEkNLNTPCXPugSvOfhwv0JOlGNzvxs0hZaiHLNvXSpudUWsOlsXGWJh8G6ckCScEkVHfX3kw/2Q== dependencies: graceful-fs "^4.2.4" tapable "^2.3.3" @@ -2020,9 +2020,9 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.1.tgz#dd085fec2494a2a33bac6e61277374669e1dd774" - integrity sha512-h2r7rcm6Ee/J8o0LD5djLuFVcfbZxhvho4vvsbeV0aMvXjUgqv4YpxpkEx0d68l6+IleVfLAdVEfhR7QNMkGHQ== + version "3.1.2" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.2.tgz#8af3d4fc9d3e71b11572cc2673b514a7d1a8c8ec" + integrity sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ== fb-watchman@^2.0.0: version "2.0.2" @@ -2149,9 +2149,9 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphql@^16.8.1: - version "16.13.2" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.13.2.tgz#4d2b73df5796b201f1bc2765f5d7067f689cb55f" - integrity sha512-5bJ+nf/UCpAjHM8i06fl7eLyVC9iuNAjm9qzkiu2ZGhM0VscSvS6WDPfAwkdkBuoXGM9FJSbKl6wylMwP9Ktig== + version "16.14.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.14.0.tgz#f1128a74b16a34d1245c8436bb07b488d87b83e1" + integrity sha512-BBvQ/406p+4CZbTpCbVPSxfzrZrbnuWSP1ELYgyS6B+hNeKzgrdB4JczCa5VZUBQrDa9hUngm0KnexY6pJRN5Q== handlebars@^4.7.9: version "4.7.9" @@ -2182,7 +2182,7 @@ has-tostringtag@^1.0.2: dependencies: has-symbols "^1.0.3" -hasown@^2.0.2: +hasown@^2.0.2, hasown@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.3.tgz#5e5c2b15b60370a4c7930c383dfb76bf17bc403c" integrity sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg== @@ -2272,11 +2272,11 @@ is-arrayish@^0.2.1: integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.16.1: - version "2.16.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" - integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + version "2.16.2" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.2.tgz#3e07450a8080ebce3fbf0cac494f4d2ab324e082" + integrity sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA== dependencies: - hasown "^2.0.2" + hasown "^2.0.3" is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -2916,14 +2916,14 @@ mimic-fn@^2.1.0: integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== miniflare@^4.20260421.0: - version "4.20260430.0" - resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-4.20260430.0.tgz#a0fa385c7ef397eead1219635b2ca09eb82195a7" - integrity sha512-MWvMm3Siho9Yj7lbJZidLs8hbrRvIcOrif2mnsHQZdvoKfedpea+GaN8XJxbpRcq0B2WzNI1BB1ihdnqes3/ZA== + version "4.20260508.0" + resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-4.20260508.0.tgz#793e2db2f1365c1a7c594d0ef5484ec3db0823fc" + integrity sha512-h3aG+PA8jEH76V4ZtBAbs3g7kjMfHJUF8hPvxeeajLTKwir+G+dqfBODg5yF9MT29LqrZKCRQRqzfHPWX4kCIg== dependencies: "@cspotcode/source-map-support" "0.8.1" sharp "^0.34.5" undici "7.24.8" - workerd "1.20260430.1" + workerd "1.20260508.1" ws "8.18.0" youch "4.1.0-beta.10" @@ -2997,9 +2997,9 @@ node-int64@^0.4.0: integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.36: - version "2.0.38" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.38.tgz#791569b9e4424a044e12c3abfad418ed83ce9947" - integrity sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw== + version "2.0.44" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.44.tgz#212c9b983f5bb70d311dd68c27d55dd0e65d1ca7" + integrity sha512-5WUyunoPMsvvEhS8AxHtRzP+oA8UCkJ7YRxatWKjngndhDGLiqEVAQKWjFAiAiuL8zMRGzGSJxFnLetoa43qGQ== normalize-path@^3.0.0: version "3.0.0" @@ -3267,9 +3267,9 @@ semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.3, semver@^7.7.4: - version "7.7.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" - integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + version "7.8.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.0.tgz#ed0661039fcbcda2ce71f01fa6adbefaa77040df" + integrity sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA== sharp@^0.34.5: version "0.34.5" @@ -3466,9 +3466,9 @@ tapable@^2.3.0, tapable@^2.3.3: integrity sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A== terser-webpack-plugin@^5.3.17: - version "5.5.0" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.5.0.tgz#d92b8e2c892dd09c683c38120394267e8d8660ef" - integrity sha512-UYhptBwhWvfIjKd/UuFo6D8uq9xpGLDK+z8EDsj/zWhrTaH34cKEbrkMKfV5YWqGBvAYA3tlzZbs2R+qYrbQJA== + version "5.6.0" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.6.0.tgz#8e7caad248183ab9e91ff08a83b0fc9f0439c3c3" + integrity sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA== dependencies: "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" @@ -3476,9 +3476,9 @@ terser-webpack-plugin@^5.3.17: terser "^5.31.1" terser@^5.31.1: - version "5.46.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.2.tgz#b9529672d5b0024c7959571c83b82f65077b2a4f" - integrity sha512-uxfo9fPcSgLDYob/w1FuL0c99MWiJDnv+5qXSQc5+Ki5NjVNsYi66INnMFBjf6uFz6OnX12piJQPF4IpjJTNTw== + version "5.47.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.47.1.tgz#99b298e51bc41214304847de1429ec92fd1f7648" + integrity sha512-tPbLXTI6ohPASb/1YViL428oEHu6/qv1OxqYnfaonVCFHqx4+wCd95pHrQWsL5X4pl90CTyW9piSAsS2L0VoMw== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3603,15 +3603,15 @@ uglify-js@^3.1.4: resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== -undici-types@~7.19.0: - version "7.19.2" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.19.2.tgz#1b67fc26d0f157a0cba3a58a5b5c1e2276b8ba2a" - integrity sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg== +undici-types@~7.21.0: + version "7.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.21.0.tgz#433f7dd1b5daa9ab4dacb721a5e11a8de51eadda" + integrity sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ== undici@7.24.8: version "7.24.8" @@ -3755,16 +3755,16 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -workerd@1.20260430.1: - version "1.20260430.1" - resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20260430.1.tgz#b7749f5b4036e3477dcb0c71eea151ed5dfda46b" - integrity sha512-KEgIWyiw3Jmn+DCd/L3ePo5fmiiYb/UcwKvDWPf/nLLOiwShDFzDSsegU5NY/JcwgvO/QsLHVi2FYrbkcXNY5Q== +workerd@1.20260508.1: + version "1.20260508.1" + resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20260508.1.tgz#1da440703662a19467a2106844f6415ee56b52dc" + integrity sha512-VlnjyH3AjVddpSK7J54nsCVgf8i2733pl8GjKttfNi7vN/hEjjAk20d2b1nDToOLKvRQpTewRnVkqaaeGHCaAw== optionalDependencies: - "@cloudflare/workerd-darwin-64" "1.20260430.1" - "@cloudflare/workerd-darwin-arm64" "1.20260430.1" - "@cloudflare/workerd-linux-64" "1.20260430.1" - "@cloudflare/workerd-linux-arm64" "1.20260430.1" - "@cloudflare/workerd-windows-64" "1.20260430.1" + "@cloudflare/workerd-darwin-64" "1.20260508.1" + "@cloudflare/workerd-darwin-arm64" "1.20260508.1" + "@cloudflare/workerd-linux-64" "1.20260508.1" + "@cloudflare/workerd-linux-arm64" "1.20260508.1" + "@cloudflare/workerd-windows-64" "1.20260508.1" wrap-ansi@^6.2.0: version "6.2.0" @@ -3803,9 +3803,9 @@ ws@8.18.0: integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== ws@^8.11.0, ws@^8.18.1: - version "8.20.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.20.0.tgz#4cd9532358eba60bc863aad1623dfb045a4d4af8" - integrity sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA== + version "8.20.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.20.1.tgz#91a9ae2b312ccf98e0a85ec499b48cef45ab0ddb" + integrity sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w== xml-name-validator@^4.0.0: version "4.0.0"