diff --git a/.fern/metadata.json b/.fern/metadata.json
index d8ca8e89..d1414ffd 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,5 +1,5 @@
{
- "cliVersion": "5.6.0",
+ "cliVersion": "5.50.0",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.70.7",
"generatorConfig": {
@@ -53,10 +53,10 @@
]
}
},
- "originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e",
+ "originGitCommit": "19cafdf92ab056ef6ba803bf1e352b0422a8ec45",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "1.5.3",
+ "requestedVersion": "1.5.4",
"ciProvider": "github",
- "sdkVersion": "1.5.3"
+ "sdkVersion": "1.5.4"
}
diff --git a/.fern/replay.lock b/.fern/replay.lock
index 6eb32846..4d8d6cc6 100644
--- a/.fern/replay.lock
+++ b/.fern/replay.lock
@@ -12,5 +12,11 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-typescript-node-sdk: 3.70.7
-current_generation: d060d8ed2d949444744880e3bda158ee8171a21c
+ - commit_sha: 7277c2f9c5bd737e27f6d3a0bad9a899a50f3af1
+ tree_hash: 30be57bf839e31e431c66ade3ca7712c4d1b02b3
+ timestamp: 2026-07-14T14:42:19.534Z
+ cli_version: unknown
+ generator_versions:
+ fernapi/fern-typescript-node-sdk: 3.70.7
+current_generation: 7277c2f9c5bd737e27f6d3a0bad9a899a50f3af1
patches: []
diff --git a/package.json b/package.json
index 4a24a72f..cb2ee084 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@schematichq/schematic-typescript-node",
- "version": "1.5.3",
+ "version": "1.5.4",
"private": false,
"repository": {
"type": "git",
diff --git a/reference.md b/reference.md
index 628733f8..98caefdd 100644
--- a/reference.md
+++ b/reference.md
@@ -4927,6 +4927,108 @@ await client.companies.lookupCompany({
+
+
+
+
+client.companies.getCompanyBillingEntity({ ...params }) -> Schematic.GetCompanyBillingEntityResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.companies.getCompanyBillingEntity({
+ companyId: "company_id"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Schematic.GetCompanyBillingEntityRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `CompaniesClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.companies.getBillingEntityChildSubscriptions({ ...params }) -> Schematic.GetBillingEntityChildSubscriptionsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.companies.getBillingEntityChildSubscriptions({
+ companyId: "company_id"
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Schematic.GetBillingEntityChildSubscriptionsRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `CompaniesClient.RequestOptions`
+
+
+
+
+
+
+
diff --git a/src/BaseClient.ts b/src/BaseClient.ts
index fc05abf9..d33f4f87 100644
--- a/src/BaseClient.ts
+++ b/src/BaseClient.ts
@@ -60,8 +60,8 @@ export function normalizeClientOptions {
+ return core.HttpResponsePromise.fromPromise(this.__getCompanyBillingEntity(request, requestOptions));
+ }
+
+ private async __getCompanyBillingEntity(
+ request: Schematic.GetCompanyBillingEntityRequest = {},
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): Promise> {
+ const { companyId } = request;
+ const _queryParams: Record = {
+ company_id: companyId,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SchematicEnvironment.Default,
+ "company-billing-entity",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.GetCompanyBillingEntityResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Schematic.BadRequestError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 401:
+ throw new Schematic.UnauthorizedError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 403:
+ throw new Schematic.ForbiddenError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new Schematic.NotFoundError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 500:
+ throw new Schematic.InternalServerError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.SchematicError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/company-billing-entity");
+ }
+
+ /**
+ * @param {Schematic.GetBillingEntityChildSubscriptionsRequest} request
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Schematic.BadRequestError}
+ * @throws {@link Schematic.UnauthorizedError}
+ * @throws {@link Schematic.ForbiddenError}
+ * @throws {@link Schematic.NotFoundError}
+ * @throws {@link Schematic.InternalServerError}
+ *
+ * @example
+ * await client.companies.getBillingEntityChildSubscriptions({
+ * companyId: "company_id"
+ * })
+ */
+ public getBillingEntityChildSubscriptions(
+ request: Schematic.GetBillingEntityChildSubscriptionsRequest = {},
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__getBillingEntityChildSubscriptions(request, requestOptions));
+ }
+
+ private async __getBillingEntityChildSubscriptions(
+ request: Schematic.GetBillingEntityChildSubscriptionsRequest = {},
+ requestOptions?: CompaniesClient.RequestOptions,
+ ): Promise> {
+ const { companyId } = request;
+ const _queryParams: Record = {
+ company_id: companyId,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SchematicEnvironment.Default,
+ "company-billing-entity-subscriptions",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ fetchFn: this._options?.fetch,
+ logging: this._options.logging,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.GetBillingEntityChildSubscriptionsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new Schematic.BadRequestError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 401:
+ throw new Schematic.UnauthorizedError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 403:
+ throw new Schematic.ForbiddenError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new Schematic.NotFoundError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 500:
+ throw new Schematic.InternalServerError(
+ serializers.ApiError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.SchematicError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/company-billing-entity-subscriptions",
+ );
+ }
+
/**
* @param {Schematic.ListCompanyMembershipsRequest} request
* @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
diff --git a/src/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.ts b/src/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.ts
new file mode 100644
index 00000000..25f09daf
--- /dev/null
+++ b/src/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.ts
@@ -0,0 +1,11 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * companyId: "company_id"
+ * }
+ */
+export interface GetBillingEntityChildSubscriptionsRequest {
+ companyId?: string;
+}
diff --git a/src/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.ts b/src/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.ts
new file mode 100644
index 00000000..b29215fe
--- /dev/null
+++ b/src/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.ts
@@ -0,0 +1,11 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * companyId: "company_id"
+ * }
+ */
+export interface GetCompanyBillingEntityRequest {
+ companyId?: string;
+}
diff --git a/src/api/resources/companies/client/requests/index.ts b/src/api/resources/companies/client/requests/index.ts
index f989fd3d..3fbcb616 100644
--- a/src/api/resources/companies/client/requests/index.ts
+++ b/src/api/resources/companies/client/requests/index.ts
@@ -6,6 +6,8 @@ export type { CountUsersRequest } from "./CountUsersRequest";
export type { CreateEntityTraitDefinitionRequestBody } from "./CreateEntityTraitDefinitionRequestBody";
export type { DeleteCompanyRequest } from "./DeleteCompanyRequest";
export type { GetActiveCompanySubscriptionRequest } from "./GetActiveCompanySubscriptionRequest";
+export type { GetBillingEntityChildSubscriptionsRequest } from "./GetBillingEntityChildSubscriptionsRequest";
+export type { GetCompanyBillingEntityRequest } from "./GetCompanyBillingEntityRequest";
export type { GetEntityTraitValuesRequest } from "./GetEntityTraitValuesRequest";
export type { GetOrCreateCompanyMembershipRequestBody } from "./GetOrCreateCompanyMembershipRequestBody";
export type { ListCompaniesRequest } from "./ListCompaniesRequest";
diff --git a/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts b/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts
new file mode 100644
index 00000000..06a310b4
--- /dev/null
+++ b/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Input parameters
+ */
+export interface GetBillingEntityChildSubscriptionsParams {
+ companyId?: string;
+}
diff --git a/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts b/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts
new file mode 100644
index 00000000..18d15bd5
--- /dev/null
+++ b/src/api/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Schematic from "../../../index";
+
+export interface GetBillingEntityChildSubscriptionsResponse {
+ data: Schematic.CompanyBillingEntitySubscriptionResponseData[];
+ /** Input parameters */
+ params: Schematic.GetBillingEntityChildSubscriptionsParams;
+}
diff --git a/src/api/resources/companies/types/GetCompanyBillingEntityParams.ts b/src/api/resources/companies/types/GetCompanyBillingEntityParams.ts
new file mode 100644
index 00000000..92bf4caa
--- /dev/null
+++ b/src/api/resources/companies/types/GetCompanyBillingEntityParams.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Input parameters
+ */
+export interface GetCompanyBillingEntityParams {
+ companyId?: string;
+}
diff --git a/src/api/resources/companies/types/GetCompanyBillingEntityResponse.ts b/src/api/resources/companies/types/GetCompanyBillingEntityResponse.ts
new file mode 100644
index 00000000..fa11cac2
--- /dev/null
+++ b/src/api/resources/companies/types/GetCompanyBillingEntityResponse.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Schematic from "../../../index";
+
+export interface GetCompanyBillingEntityResponse {
+ data: Schematic.CompanyBillingEntityResponseData[];
+ /** Input parameters */
+ params: Schematic.GetCompanyBillingEntityParams;
+}
diff --git a/src/api/resources/companies/types/index.ts b/src/api/resources/companies/types/index.ts
index 57269ee9..95aa19b6 100644
--- a/src/api/resources/companies/types/index.ts
+++ b/src/api/resources/companies/types/index.ts
@@ -18,6 +18,10 @@ export * from "./DeleteUserByKeysResponse";
export * from "./DeleteUserResponse";
export * from "./GetActiveCompanySubscriptionParams";
export * from "./GetActiveCompanySubscriptionResponse";
+export * from "./GetBillingEntityChildSubscriptionsParams";
+export * from "./GetBillingEntityChildSubscriptionsResponse";
+export * from "./GetCompanyBillingEntityParams";
+export * from "./GetCompanyBillingEntityResponse";
export * from "./GetCompanyResponse";
export * from "./GetEntityTraitDefinitionResponse";
export * from "./GetEntityTraitValuesParams";
diff --git a/src/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts b/src/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
index 325916ee..70edf9e1 100644
--- a/src/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
+++ b/src/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
@@ -46,6 +46,7 @@ export interface CreateBillingLinkedPlanEntitlementRequestBody {
valueNumeric?: number;
valueTraitId?: string;
valueType: Schematic.EntitlementValueType;
+ warningTiers?: Schematic.WarningTierRequestBody[];
yearlyMeteredPriceId?: string;
yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
yearlyUnitPrice?: number;
diff --git a/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts b/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
index dcef1754..46e59ccf 100644
--- a/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
+++ b/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
@@ -42,6 +42,7 @@ export interface CreatePlanEntitlementRequestBody {
valueNumeric?: number;
valueTraitId?: string;
valueType: Schematic.EntitlementValueType;
+ warningTiers?: Schematic.WarningTierRequestBody[];
yearlyMeteredPriceId?: string;
yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
yearlyUnitPrice?: number;
diff --git a/src/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts b/src/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
index d907ca84..a0398dd9 100644
--- a/src/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
+++ b/src/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
@@ -37,6 +37,7 @@ export interface UpdatePlanEntitlementRequestBody {
valueNumeric?: number;
valueTraitId?: string;
valueType: Schematic.EntitlementValueType;
+ warningTiers?: Schematic.WarningTierRequestBody[];
yearlyMeteredPriceId?: string;
yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
yearlyUnitPrice?: number;
diff --git a/src/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts b/src/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
index 6a314ceb..ec2964ca 100644
--- a/src/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
+++ b/src/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
@@ -15,5 +15,4 @@ export interface CreatePlanBundleRequestBody {
creditGrants?: Schematic.PlanBundleCreditGrantRequestBody[];
entitlements: Schematic.PlanBundleEntitlementRequestBody[];
plan?: Schematic.CreatePlanRequestBody;
- traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
}
diff --git a/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts b/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
index 15db00dd..2680caa0 100644
--- a/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
+++ b/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
@@ -16,5 +16,4 @@ export interface UpdatePlanBundleRequestBody {
entitlements: Schematic.PlanBundleEntitlementRequestBody[];
plan?: Schematic.UpdatePlanRequestBody;
planVersionId?: string;
- traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
}
diff --git a/src/api/types/AccountMemberPermission.ts b/src/api/types/AccountMemberPermission.ts
index c4668aea..4d4baacd 100644
--- a/src/api/types/AccountMemberPermission.ts
+++ b/src/api/types/AccountMemberPermission.ts
@@ -4,6 +4,7 @@ export const AccountMemberPermission = {
CompaniesEdit: "companies_edit",
CompanyUsersEdit: "company_users_edit",
ComponentsEdit: "components_edit",
+ CustomPlansEdit: "custom_plans_edit",
DataExportsEdit: "data_exports_edit",
FeaturesEdit: "features_edit",
FlagRulesEdit: "flag_rules_edit",
diff --git a/src/api/types/BillingCreditAutoTopupAvailability.ts b/src/api/types/BillingCreditAutoTopupAvailability.ts
new file mode 100644
index 00000000..f0c1a810
--- /dev/null
+++ b/src/api/types/BillingCreditAutoTopupAvailability.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const BillingCreditAutoTopupAvailability = {
+ Off: "off",
+ Automatic: "automatic",
+ UserControlled: "user_controlled",
+} as const;
+export type BillingCreditAutoTopupAvailability =
+ (typeof BillingCreditAutoTopupAvailability)[keyof typeof BillingCreditAutoTopupAvailability];
diff --git a/src/api/types/BillingCreditGrantZeroedOutReason.ts b/src/api/types/BillingCreditGrantZeroedOutReason.ts
index 99e0464f..74bdd0ed 100644
--- a/src/api/types/BillingCreditGrantZeroedOutReason.ts
+++ b/src/api/types/BillingCreditGrantZeroedOutReason.ts
@@ -1,7 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
export const BillingCreditGrantZeroedOutReason = {
+ CustomerArchived: "customer_archived",
Expired: "expired",
+ IntegrationUninstalled: "integration_uninstalled",
Manual: "manual",
PlanChange: "plan_change",
PlanPeriodReset: "plan_period_reset",
diff --git a/src/api/types/BillingPlanCreditGrantResetCadence.ts b/src/api/types/BillingPlanCreditGrantResetCadence.ts
index f75385bd..da402ec6 100644
--- a/src/api/types/BillingPlanCreditGrantResetCadence.ts
+++ b/src/api/types/BillingPlanCreditGrantResetCadence.ts
@@ -2,7 +2,9 @@
export const BillingPlanCreditGrantResetCadence = {
Daily: "daily",
+ Every6Months: "every_6_months",
Monthly: "monthly",
+ Quarterly: "quarterly",
Weekly: "weekly",
Yearly: "yearly",
} as const;
diff --git a/src/api/types/BillingPlanCreditGrantResponseData.ts b/src/api/types/BillingPlanCreditGrantResponseData.ts
index 0e2fc251..3f2ccee2 100644
--- a/src/api/types/BillingPlanCreditGrantResponseData.ts
+++ b/src/api/types/BillingPlanCreditGrantResponseData.ts
@@ -5,13 +5,18 @@ import type * as Schematic from "../index";
export interface BillingPlanCreditGrantResponseData {
autoTopupAmount?: number;
autoTopupAmountType?: string;
+ autoTopupAvailability: Schematic.BillingCreditAutoTopupAvailability;
+ /** Derived from auto_topup_availability; use that instead. */
autoTopupEnabled: boolean;
autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
autoTopupExpiryUnitCount?: number;
+ /** Derived from auto_topup_availability; use that instead. */
autoTopupSelfService: boolean;
autoTopupThresholdCredits?: number;
autoTopupThresholdPercent?: number;
+ /** Whether buyers can purchase one-time credit bundles on this grant, independent of auto top-up availability. */
+ canBuyBundles: boolean;
createdAt: Date;
credit?: Schematic.BillingCreditResponseData;
creditAmount: number;
diff --git a/src/api/types/ChangeSubscriptionInternalRequestBody.ts b/src/api/types/ChangeSubscriptionInternalRequestBody.ts
index 60c5cff1..1b1415be 100644
--- a/src/api/types/ChangeSubscriptionInternalRequestBody.ts
+++ b/src/api/types/ChangeSubscriptionInternalRequestBody.ts
@@ -5,6 +5,7 @@ import type * as Schematic from "../index";
export interface ChangeSubscriptionInternalRequestBody {
addOnIds: Schematic.UpdateAddOnRequestBody[];
autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[];
+ billingEntityId?: string;
companyId: string;
couponExternalId?: string;
creditBundles: Schematic.UpdateCreditBundleRequestBody[];
diff --git a/src/api/types/ChangeSubscriptionRequestBody.ts b/src/api/types/ChangeSubscriptionRequestBody.ts
index 3a8a63c0..fa62b2e6 100644
--- a/src/api/types/ChangeSubscriptionRequestBody.ts
+++ b/src/api/types/ChangeSubscriptionRequestBody.ts
@@ -5,6 +5,7 @@ import type * as Schematic from "../index";
export interface ChangeSubscriptionRequestBody {
addOnIds: Schematic.UpdateAddOnRequestBody[];
autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[];
+ billingEntityId?: string;
couponExternalId?: string;
creditBundles: Schematic.UpdateCreditBundleRequestBody[];
customFieldValues: Schematic.CheckoutFieldValue[];
diff --git a/src/api/types/CompanyBillingEntityResponseData.ts b/src/api/types/CompanyBillingEntityResponseData.ts
new file mode 100644
index 00000000..915aebbb
--- /dev/null
+++ b/src/api/types/CompanyBillingEntityResponseData.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Schematic from "../index";
+
+export interface CompanyBillingEntityResponseData {
+ billingEntity?: Schematic.CompanyResponseData;
+ hasOwnStripeCustomer: boolean;
+}
diff --git a/src/api/types/CompanyBillingEntitySubscriptionResponseData.ts b/src/api/types/CompanyBillingEntitySubscriptionResponseData.ts
new file mode 100644
index 00000000..3a1a4ba0
--- /dev/null
+++ b/src/api/types/CompanyBillingEntitySubscriptionResponseData.ts
@@ -0,0 +1,24 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Schematic from "../index";
+
+export interface CompanyBillingEntitySubscriptionResponseData {
+ cancelAt?: Date;
+ cancelAtPeriodEnd: boolean;
+ company?: Schematic.CompanyResponseData;
+ currency: string;
+ customerExternalId: string;
+ discounts: Schematic.BillingSubscriptionDiscountView[];
+ expiredAt?: Date;
+ interval: string;
+ isInitial: boolean;
+ latestInvoice?: Schematic.InvoiceResponseData;
+ paymentMethod?: Schematic.PaymentMethodResponseData;
+ planName: string;
+ products: Schematic.BillingProductForSubscriptionResponseData[];
+ providerType: Schematic.BillingProviderType;
+ status: string;
+ subscriptionExternalId: string;
+ totalPrice: number;
+ trialEnd?: Date;
+}
diff --git a/src/api/types/CompanyPlanCreditGrantView.ts b/src/api/types/CompanyPlanCreditGrantView.ts
index fffad63b..59ba8597 100644
--- a/src/api/types/CompanyPlanCreditGrantView.ts
+++ b/src/api/types/CompanyPlanCreditGrantView.ts
@@ -5,6 +5,7 @@ import type * as Schematic from "../index";
export interface CompanyPlanCreditGrantView {
billingCreditAutoTopupAmount?: number;
billingCreditAutoTopupAmountType?: string;
+ billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
billingCreditAutoTopupEnabled: boolean;
billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType;
billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -12,6 +13,7 @@ export interface CompanyPlanCreditGrantView {
billingCreditAutoTopupSelfService: boolean;
billingCreditAutoTopupThresholdCredits?: number;
billingCreditAutoTopupThresholdPercent?: number;
+ billingCreditCanBuyBundles: boolean;
companyAutoTopupAmount?: number;
companyAutoTopupEnabled?: boolean;
companyAutoTopupThresholdCredits?: number;
diff --git a/src/api/types/CompanyPlanDetailResponseData.ts b/src/api/types/CompanyPlanDetailResponseData.ts
index 7fb5458c..1a0651dc 100644
--- a/src/api/types/CompanyPlanDetailResponseData.ts
+++ b/src/api/types/CompanyPlanDetailResponseData.ts
@@ -13,11 +13,13 @@ export interface CompanyPlanDetailResponseData {
companyCanTrial: boolean;
companyCount: number;
companyId?: string;
+ companyLogoUrl?: string;
companyName?: string;
compatiblePlanIds: string[];
controlledBy: Schematic.BillingProviderType;
copiedFromPlanId?: string;
createdAt: Date;
+ credits: Schematic.BillingCreditResponseData[];
currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
current: boolean;
custom: boolean;
diff --git a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts
index 158f1d00..2ea961bb 100644
--- a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts
+++ b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts
@@ -6,6 +6,7 @@ export interface CreateBillingPlanCreditGrantRequestBody {
applyToExisting?: boolean;
autoTopupAmount?: number;
autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
+ autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
autoTopupEnabled?: boolean;
autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -13,6 +14,7 @@ export interface CreateBillingPlanCreditGrantRequestBody {
autoTopupSelfService?: boolean;
autoTopupThresholdCredits?: number;
autoTopupThresholdPercent?: number;
+ canBuyBundles?: boolean;
creditAmount: number;
creditId: string;
expiryType?: Schematic.BillingCreditExpiryType;
diff --git a/src/api/types/EventBody.ts b/src/api/types/EventBody.ts
index 372585a4..6f121dd2 100644
--- a/src/api/types/EventBody.ts
+++ b/src/api/types/EventBody.ts
@@ -2,4 +2,8 @@
import type * as Schematic from "../index";
-export type EventBody = Schematic.EventBodyTrack | Schematic.EventBodyFlagCheck | Schematic.EventBodyIdentify;
+export type EventBody =
+ | Schematic.EventBodyTrack
+ | Schematic.EventBodyFlagCheck
+ | Schematic.EventBodyIdentify
+ | Schematic.EventBodyInference;
diff --git a/src/api/types/EventBodyInference.ts b/src/api/types/EventBodyInference.ts
new file mode 100644
index 00000000..13546c06
--- /dev/null
+++ b/src/api/types/EventBodyInference.ts
@@ -0,0 +1,32 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface EventBodyInference {
+ /** Number of input tokens served from cache */
+ cachedInputTokens?: number;
+ /** Key-value pairs to identify the company associated with the inference event */
+ company: Record;
+ /** Provided cost of the inference request as a decimal string; derived from model pricing when omitted */
+ cost?: string;
+ /** ISO 4217 currency code for the provided cost; defaults to 'usd' */
+ currency?: string;
+ /** Optional track event name to fan out for usage-based billing */
+ event?: string;
+ /** Number of input tokens for the inference request */
+ inputTokens: number;
+ /** The inference operation; defaults to 'chat' */
+ operation?: string;
+ /** Number of output tokens for the inference request */
+ outputTokens: number;
+ /** The inference provider (e.g. 'anthropic', 'openai') */
+ provider: string;
+ /** Number of reasoning tokens for the inference request */
+ reasoningTokens?: number;
+ /** The model requested for the inference request */
+ requestModel?: string;
+ /** Number of requests represented by this event; defaults to 1 */
+ requests?: number;
+ /** The model that served the inference response */
+ responseModel: string;
+ /** Key-value pairs to identify the user associated with the inference event */
+ user?: Record;
+}
diff --git a/src/api/types/EventType.ts b/src/api/types/EventType.ts
index bcfcd6b0..4299385b 100644
--- a/src/api/types/EventType.ts
+++ b/src/api/types/EventType.ts
@@ -3,6 +3,7 @@
export const EventType = {
FlagCheck: "flag_check",
Identify: "identify",
+ Inference: "inference",
Track: "track",
} as const;
export type EventType = (typeof EventType)[keyof typeof EventType];
diff --git a/src/api/types/IntegrationsListResponseData.ts b/src/api/types/IntegrationsListResponseData.ts
index 7c90afc5..ccb3f673 100644
--- a/src/api/types/IntegrationsListResponseData.ts
+++ b/src/api/types/IntegrationsListResponseData.ts
@@ -8,6 +8,7 @@ export interface IntegrationsListResponseData {
id: string;
isAppInstall: boolean;
isConnectInstall: boolean;
+ lastWebhookReceivedAt?: Date;
state: Schematic.IntegrationState;
type: Schematic.IntegrationType;
}
diff --git a/src/api/types/InvoiceRequestBody.ts b/src/api/types/InvoiceRequestBody.ts
index 2b1967c6..8c17902f 100644
--- a/src/api/types/InvoiceRequestBody.ts
+++ b/src/api/types/InvoiceRequestBody.ts
@@ -10,7 +10,9 @@ export interface InvoiceRequestBody {
currency: string;
customerExternalId: string;
dueDate?: Date;
+ endingBalance?: number;
paymentMethodExternalId?: string;
+ startingBalance?: number;
status?: Schematic.InvoiceStatus;
subscriptionExternalId?: string;
subtotal: number;
diff --git a/src/api/types/InvoiceResponseData.ts b/src/api/types/InvoiceResponseData.ts
index d4377c0f..d1cb435f 100644
--- a/src/api/types/InvoiceResponseData.ts
+++ b/src/api/types/InvoiceResponseData.ts
@@ -12,11 +12,13 @@ export interface InvoiceResponseData {
currency: string;
customerExternalId: string;
dueDate?: Date;
+ endingBalance: number;
environmentId: string;
externalId?: string;
id: string;
paymentMethodExternalId?: string;
providerType: Schematic.BillingProviderType;
+ startingBalance: number;
status?: Schematic.InvoiceStatus;
subscriptionExternalId?: string;
subtotal: number;
diff --git a/src/api/types/ManagePlanRequest.ts b/src/api/types/ManagePlanRequest.ts
index 8cdb2826..b2c045e7 100644
--- a/src/api/types/ManagePlanRequest.ts
+++ b/src/api/types/ManagePlanRequest.ts
@@ -7,6 +7,8 @@ export interface ManagePlanRequest {
basePlanId?: string;
basePlanPriceId?: string;
basePlanVersionId?: string;
+ /** The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription. */
+ billingEntityId?: string;
/** If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. */
cancelImmediately?: boolean;
companyId: string;
diff --git a/src/api/types/MetronomeIntegrationConfig.ts b/src/api/types/MetronomeIntegrationConfig.ts
index 25769ffe..6cedfb19 100644
--- a/src/api/types/MetronomeIntegrationConfig.ts
+++ b/src/api/types/MetronomeIntegrationConfig.ts
@@ -1,3 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-export type MetronomeIntegrationConfig = {};
+export interface MetronomeIntegrationConfig {
+ /** Schematic company key used to store the Metronome customer's ingest alias; when unset, imported customers carry only metronome_customer_id */
+ externalCustomerIdKey?: string;
+}
diff --git a/src/api/types/PlanBundleResponseData.ts b/src/api/types/PlanBundleResponseData.ts
index 8b6937b8..ee355b39 100644
--- a/src/api/types/PlanBundleResponseData.ts
+++ b/src/api/types/PlanBundleResponseData.ts
@@ -7,5 +7,4 @@ export interface PlanBundleResponseData {
creditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
entitlements?: Schematic.PlanEntitlementResponseData[];
plan?: Schematic.PlanResponseData;
- traits?: Schematic.PlanTraitResponseData[];
}
diff --git a/src/api/types/PlanCreditGrantView.ts b/src/api/types/PlanCreditGrantView.ts
index 2e70910e..fbce3993 100644
--- a/src/api/types/PlanCreditGrantView.ts
+++ b/src/api/types/PlanCreditGrantView.ts
@@ -5,6 +5,7 @@ import type * as Schematic from "../index";
export interface PlanCreditGrantView {
billingCreditAutoTopupAmount?: number;
billingCreditAutoTopupAmountType?: string;
+ billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
billingCreditAutoTopupEnabled: boolean;
billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType;
billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -12,6 +13,7 @@ export interface PlanCreditGrantView {
billingCreditAutoTopupSelfService: boolean;
billingCreditAutoTopupThresholdCredits?: number;
billingCreditAutoTopupThresholdPercent?: number;
+ billingCreditCanBuyBundles: boolean;
createdAt: Date;
credit?: Schematic.BillingCreditView;
creditAmount: number;
diff --git a/src/api/types/PlanDetailResponseData.ts b/src/api/types/PlanDetailResponseData.ts
index b5350441..0925c420 100644
--- a/src/api/types/PlanDetailResponseData.ts
+++ b/src/api/types/PlanDetailResponseData.ts
@@ -11,10 +11,12 @@ export interface PlanDetailResponseData {
chargeType: Schematic.ChargeType;
companyCount: number;
companyId?: string;
+ companyLogoUrl?: string;
companyName?: string;
controlledBy: Schematic.BillingProviderType;
copiedFromPlanId?: string;
createdAt: Date;
+ credits: Schematic.BillingCreditResponseData[];
currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
description: string;
draftVersion?: Schematic.PlanVersionResponseData;
diff --git a/src/api/types/PlanEntitlementResponseData.ts b/src/api/types/PlanEntitlementResponseData.ts
index 92ce015a..afeb8495 100644
--- a/src/api/types/PlanEntitlementResponseData.ts
+++ b/src/api/types/PlanEntitlementResponseData.ts
@@ -33,4 +33,5 @@ export interface PlanEntitlementResponseData {
valueTrait?: Schematic.EntityTraitDefinitionResponseData;
valueTraitId?: string;
valueType: Schematic.EntitlementValueType;
+ warningTiers: Schematic.WarningTierResponseData[];
}
diff --git a/src/api/types/PlanGroupPlanDetailResponseData.ts b/src/api/types/PlanGroupPlanDetailResponseData.ts
index f4423c99..ebc66498 100644
--- a/src/api/types/PlanGroupPlanDetailResponseData.ts
+++ b/src/api/types/PlanGroupPlanDetailResponseData.ts
@@ -12,11 +12,13 @@ export interface PlanGroupPlanDetailResponseData {
chargeType: Schematic.ChargeType;
companyCount: number;
companyId?: string;
+ companyLogoUrl?: string;
companyName?: string;
compatiblePlanIds: string[];
controlledBy: Schematic.BillingProviderType;
copiedFromPlanId?: string;
createdAt: Date;
+ credits: Schematic.BillingCreditResponseData[];
currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
customPlanConfig?: Schematic.CustomPlanViewConfigResponseData;
description: string;
diff --git a/src/api/types/PlanViewPublicResponseData.ts b/src/api/types/PlanViewPublicResponseData.ts
index 7243c595..f5e8adc6 100644
--- a/src/api/types/PlanViewPublicResponseData.ts
+++ b/src/api/types/PlanViewPublicResponseData.ts
@@ -12,11 +12,13 @@ export interface PlanViewPublicResponseData {
chargeType: Schematic.ChargeType;
companyCount: number;
companyId?: string;
+ companyLogoUrl?: string;
companyName?: string;
compatiblePlanIds: string[];
controlledBy: Schematic.BillingProviderType;
copiedFromPlanId?: string;
createdAt: Date;
+ credits: Schematic.BillingCreditResponseData[];
currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
custom: boolean;
customPlanConfig?: Schematic.CustomPlanConfig;
diff --git a/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts b/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts
index e1316844..2ef06c64 100644
--- a/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts
+++ b/src/api/types/UpdateBillingPlanCreditGrantRequestBody.ts
@@ -6,6 +6,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
applyToExisting?: boolean;
autoTopupAmount?: number;
autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
+ autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
autoTopupEnabled?: boolean;
autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -13,6 +14,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
autoTopupSelfService?: boolean;
autoTopupThresholdCredits?: number;
autoTopupThresholdPercent?: number;
+ canBuyBundles?: boolean;
creditAmount?: number;
expiryType?: Schematic.BillingCreditExpiryType;
expiryUnit?: Schematic.BillingCreditExpiryUnit;
diff --git a/src/api/types/WarningTierRequestBody.ts b/src/api/types/WarningTierRequestBody.ts
new file mode 100644
index 00000000..e2e6f321
--- /dev/null
+++ b/src/api/types/WarningTierRequestBody.ts
@@ -0,0 +1,6 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface WarningTierRequestBody {
+ key: string;
+ value: number;
+}
diff --git a/src/api/types/WarningTierResponseData.ts b/src/api/types/WarningTierResponseData.ts
new file mode 100644
index 00000000..ba757ef4
--- /dev/null
+++ b/src/api/types/WarningTierResponseData.ts
@@ -0,0 +1,7 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export interface WarningTierResponseData {
+ id: string;
+ key: string;
+ value: number;
+}
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
index b3818b72..e65f2a4b 100644
--- a/src/api/types/index.ts
+++ b/src/api/types/index.ts
@@ -12,6 +12,7 @@ export * from "./ApiKeyScope";
export * from "./AuditLogListResponseData";
export * from "./AuditLogResponseData";
export * from "./BillingCouponResponseData";
+export * from "./BillingCreditAutoTopupAvailability";
export * from "./BillingCreditBundleResponseData";
export * from "./BillingCreditBundleStatus";
export * from "./BillingCreditBundleType";
@@ -73,6 +74,8 @@ export * from "./CheckoutFieldWithValue";
export * from "./CheckoutSettingsResponseData";
export * from "./CheckoutSubscription";
export * from "./ClerkIntegrationConfig";
+export * from "./CompanyBillingEntityResponseData";
+export * from "./CompanyBillingEntitySubscriptionResponseData";
export * from "./CompanyCreditBalance";
export * from "./CompanyCreditBalanceResponseData";
export * from "./CompanyDetailResponseData";
@@ -187,6 +190,7 @@ export * from "./EventBody";
export * from "./EventBodyFlagCheck";
export * from "./EventBodyIdentify";
export * from "./EventBodyIdentifyCompany";
+export * from "./EventBodyInference";
export * from "./EventBodyTrack";
export * from "./EventDetailResponseData";
export * from "./EventResponseData";
@@ -367,6 +371,8 @@ export * from "./UsageBasedEntitlementResponseData";
export * from "./UsageTimeSeriesPointResponseData";
export * from "./UserDetailResponseData";
export * from "./UserResponseData";
+export * from "./WarningTierRequestBody";
+export * from "./WarningTierResponseData";
export * from "./WebFeatureUsageWebhookOutput";
export * from "./WebhookEventDetailResponseData";
export * from "./WebhookEventResponseData";
diff --git a/src/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts b/src/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
index fe2b327f..b4c64be2 100644
--- a/src/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
+++ b/src/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
@@ -15,6 +15,7 @@ export const CreateBillingSubscriptionRequestBody: core.serialization.Schema<
applicationId: core.serialization.property("application_id", core.serialization.string().optional()),
cancelAt: core.serialization.property("cancel_at", core.serialization.number().optional()),
cancelAtPeriodEnd: core.serialization.property("cancel_at_period_end", core.serialization.boolean()),
+ companyId: core.serialization.property("company_id", core.serialization.string().optional()),
currency: core.serialization.string(),
customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
defaultPaymentMethodExternalId: core.serialization.property(
@@ -48,6 +49,7 @@ export declare namespace CreateBillingSubscriptionRequestBody {
application_id?: string | null;
cancel_at?: number | null;
cancel_at_period_end: boolean;
+ company_id?: string | null;
currency: string;
customer_external_id: string;
default_payment_method_external_id?: string | null;
diff --git a/src/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.ts b/src/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.ts
index 340a02de..4e777913 100644
--- a/src/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.ts
+++ b/src/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.ts
@@ -16,11 +16,13 @@ export const CreateInvoiceRequestBody: core.serialization.Schema<
currency: core.serialization.string(),
customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
dueDate: core.serialization.property("due_date", core.serialization.date().optional()),
+ endingBalance: core.serialization.property("ending_balance", core.serialization.number().optional()),
externalId: core.serialization.property("external_id", core.serialization.string().optional()),
paymentMethodExternalId: core.serialization.property(
"payment_method_external_id",
core.serialization.string().optional(),
),
+ startingBalance: core.serialization.property("starting_balance", core.serialization.number().optional()),
status: InvoiceStatus.optional(),
subscriptionExternalId: core.serialization.property(
"subscription_external_id",
@@ -39,8 +41,10 @@ export declare namespace CreateInvoiceRequestBody {
currency: string;
customer_external_id: string;
due_date?: string | null;
+ ending_balance?: number | null;
external_id?: string | null;
payment_method_external_id?: string | null;
+ starting_balance?: number | null;
status?: InvoiceStatus.Raw | null;
subscription_external_id?: string | null;
subtotal: number;
diff --git a/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts b/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts
new file mode 100644
index 00000000..5ae89f74
--- /dev/null
+++ b/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsParams.ts
@@ -0,0 +1,18 @@
+// 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 GetBillingEntityChildSubscriptionsParams: core.serialization.ObjectSchema<
+ serializers.GetBillingEntityChildSubscriptionsParams.Raw,
+ Schematic.GetBillingEntityChildSubscriptionsParams
+> = core.serialization.object({
+ companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+});
+
+export declare namespace GetBillingEntityChildSubscriptionsParams {
+ export interface Raw {
+ company_id?: string | null;
+ }
+}
diff --git a/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts b/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts
new file mode 100644
index 00000000..bea3cc2c
--- /dev/null
+++ b/src/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.ts
@@ -0,0 +1,22 @@
+// 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 { CompanyBillingEntitySubscriptionResponseData } from "../../../types/CompanyBillingEntitySubscriptionResponseData";
+import { GetBillingEntityChildSubscriptionsParams } from "./GetBillingEntityChildSubscriptionsParams";
+
+export const GetBillingEntityChildSubscriptionsResponse: core.serialization.ObjectSchema<
+ serializers.GetBillingEntityChildSubscriptionsResponse.Raw,
+ Schematic.GetBillingEntityChildSubscriptionsResponse
+> = core.serialization.object({
+ data: core.serialization.list(CompanyBillingEntitySubscriptionResponseData),
+ params: GetBillingEntityChildSubscriptionsParams,
+});
+
+export declare namespace GetBillingEntityChildSubscriptionsResponse {
+ export interface Raw {
+ data: CompanyBillingEntitySubscriptionResponseData.Raw[];
+ params: GetBillingEntityChildSubscriptionsParams.Raw;
+ }
+}
diff --git a/src/serialization/resources/companies/types/GetCompanyBillingEntityParams.ts b/src/serialization/resources/companies/types/GetCompanyBillingEntityParams.ts
new file mode 100644
index 00000000..0a0dc5fe
--- /dev/null
+++ b/src/serialization/resources/companies/types/GetCompanyBillingEntityParams.ts
@@ -0,0 +1,18 @@
+// 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 GetCompanyBillingEntityParams: core.serialization.ObjectSchema<
+ serializers.GetCompanyBillingEntityParams.Raw,
+ Schematic.GetCompanyBillingEntityParams
+> = core.serialization.object({
+ companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+});
+
+export declare namespace GetCompanyBillingEntityParams {
+ export interface Raw {
+ company_id?: string | null;
+ }
+}
diff --git a/src/serialization/resources/companies/types/GetCompanyBillingEntityResponse.ts b/src/serialization/resources/companies/types/GetCompanyBillingEntityResponse.ts
new file mode 100644
index 00000000..767ad434
--- /dev/null
+++ b/src/serialization/resources/companies/types/GetCompanyBillingEntityResponse.ts
@@ -0,0 +1,22 @@
+// 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 { CompanyBillingEntityResponseData } from "../../../types/CompanyBillingEntityResponseData";
+import { GetCompanyBillingEntityParams } from "./GetCompanyBillingEntityParams";
+
+export const GetCompanyBillingEntityResponse: core.serialization.ObjectSchema<
+ serializers.GetCompanyBillingEntityResponse.Raw,
+ Schematic.GetCompanyBillingEntityResponse
+> = core.serialization.object({
+ data: core.serialization.list(CompanyBillingEntityResponseData),
+ params: GetCompanyBillingEntityParams,
+});
+
+export declare namespace GetCompanyBillingEntityResponse {
+ export interface Raw {
+ data: CompanyBillingEntityResponseData.Raw[];
+ params: GetCompanyBillingEntityParams.Raw;
+ }
+}
diff --git a/src/serialization/resources/companies/types/index.ts b/src/serialization/resources/companies/types/index.ts
index 57269ee9..95aa19b6 100644
--- a/src/serialization/resources/companies/types/index.ts
+++ b/src/serialization/resources/companies/types/index.ts
@@ -18,6 +18,10 @@ export * from "./DeleteUserByKeysResponse";
export * from "./DeleteUserResponse";
export * from "./GetActiveCompanySubscriptionParams";
export * from "./GetActiveCompanySubscriptionResponse";
+export * from "./GetBillingEntityChildSubscriptionsParams";
+export * from "./GetBillingEntityChildSubscriptionsResponse";
+export * from "./GetCompanyBillingEntityParams";
+export * from "./GetCompanyBillingEntityResponse";
export * from "./GetCompanyResponse";
export * from "./GetEntityTraitDefinitionResponse";
export * from "./GetEntityTraitValuesParams";
diff --git a/src/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts b/src/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
index f1d41e88..180b4925 100644
--- a/src/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
+++ b/src/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.ts
@@ -11,6 +11,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
import { EntitlementValueType } from "../../../../types/EntitlementValueType";
import { MetricPeriod } from "../../../../types/MetricPeriod";
import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
+import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
export const CreateBillingLinkedPlanEntitlementRequestBody: core.serialization.Schema<
serializers.CreateBillingLinkedPlanEntitlementRequestBody.Raw,
@@ -77,6 +78,10 @@ export const CreateBillingLinkedPlanEntitlementRequestBody: core.serialization.S
valueNumeric: core.serialization.property("value_numeric", core.serialization.number().optional()),
valueTraitId: core.serialization.property("value_trait_id", core.serialization.string().optional()),
valueType: core.serialization.property("value_type", EntitlementValueType),
+ warningTiers: core.serialization.property(
+ "warning_tiers",
+ core.serialization.list(WarningTierRequestBody).optional(),
+ ),
yearlyMeteredPriceId: core.serialization.property(
"yearly_metered_price_id",
core.serialization.string().optional(),
@@ -125,6 +130,7 @@ export declare namespace CreateBillingLinkedPlanEntitlementRequestBody {
value_numeric?: number | null;
value_trait_id?: string | null;
value_type: EntitlementValueType.Raw;
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
yearly_metered_price_id?: string | null;
yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
yearly_unit_price?: number | null;
diff --git a/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts b/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
index 4615bb72..b2a235eb 100644
--- a/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
+++ b/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts
@@ -10,6 +10,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
import { EntitlementValueType } from "../../../../types/EntitlementValueType";
import { MetricPeriod } from "../../../../types/MetricPeriod";
import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
+import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
export const CreatePlanEntitlementRequestBody: core.serialization.Schema<
serializers.CreatePlanEntitlementRequestBody.Raw,
@@ -74,6 +75,10 @@ export const CreatePlanEntitlementRequestBody: core.serialization.Schema<
valueNumeric: core.serialization.property("value_numeric", core.serialization.number().optional()),
valueTraitId: core.serialization.property("value_trait_id", core.serialization.string().optional()),
valueType: core.serialization.property("value_type", EntitlementValueType),
+ warningTiers: core.serialization.property(
+ "warning_tiers",
+ core.serialization.list(WarningTierRequestBody).optional(),
+ ),
yearlyMeteredPriceId: core.serialization.property(
"yearly_metered_price_id",
core.serialization.string().optional(),
@@ -120,6 +125,7 @@ export declare namespace CreatePlanEntitlementRequestBody {
value_numeric?: number | null;
value_trait_id?: string | null;
value_type: EntitlementValueType.Raw;
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
yearly_metered_price_id?: string | null;
yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
yearly_unit_price?: number | null;
diff --git a/src/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts b/src/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
index 67e97e9b..0185f169 100644
--- a/src/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
+++ b/src/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.ts
@@ -10,6 +10,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
import { EntitlementValueType } from "../../../../types/EntitlementValueType";
import { MetricPeriod } from "../../../../types/MetricPeriod";
import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
+import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
export const UpdatePlanEntitlementRequestBody: core.serialization.Schema<
serializers.UpdatePlanEntitlementRequestBody.Raw,
@@ -71,6 +72,10 @@ export const UpdatePlanEntitlementRequestBody: core.serialization.Schema<
valueNumeric: core.serialization.property("value_numeric", core.serialization.number().optional()),
valueTraitId: core.serialization.property("value_trait_id", core.serialization.string().optional()),
valueType: core.serialization.property("value_type", EntitlementValueType),
+ warningTiers: core.serialization.property(
+ "warning_tiers",
+ core.serialization.list(WarningTierRequestBody).optional(),
+ ),
yearlyMeteredPriceId: core.serialization.property(
"yearly_metered_price_id",
core.serialization.string().optional(),
@@ -114,6 +119,7 @@ export declare namespace UpdatePlanEntitlementRequestBody {
value_numeric?: number | null;
value_trait_id?: string | null;
value_type: EntitlementValueType.Raw;
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
yearly_metered_price_id?: string | null;
yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
yearly_unit_price?: number | null;
diff --git a/src/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts b/src/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
index 02d2bfdf..f5fcda45 100644
--- a/src/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
+++ b/src/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.ts
@@ -6,7 +6,6 @@ import type * as serializers from "../../../../index";
import { CreatePlanRequestBody } from "../../../../types/CreatePlanRequestBody";
import { PlanBundleCreditGrantRequestBody } from "../../../../types/PlanBundleCreditGrantRequestBody";
import { PlanBundleEntitlementRequestBody } from "../../../../types/PlanBundleEntitlementRequestBody";
-import { UpdatePlanTraitTraitRequestBody } from "../../../../types/UpdatePlanTraitTraitRequestBody";
import { UpsertBillingProductRequestBody } from "../../../../types/UpsertBillingProductRequestBody";
export const CreatePlanBundleRequestBody: core.serialization.Schema<
@@ -20,7 +19,6 @@ export const CreatePlanBundleRequestBody: core.serialization.Schema<
),
entitlements: core.serialization.list(PlanBundleEntitlementRequestBody),
plan: CreatePlanRequestBody.optional(),
- traits: core.serialization.list(UpdatePlanTraitTraitRequestBody).optional(),
});
export declare namespace CreatePlanBundleRequestBody {
@@ -29,6 +27,5 @@ export declare namespace CreatePlanBundleRequestBody {
credit_grants?: PlanBundleCreditGrantRequestBody.Raw[] | null;
entitlements: PlanBundleEntitlementRequestBody.Raw[];
plan?: CreatePlanRequestBody.Raw | null;
- traits?: UpdatePlanTraitTraitRequestBody.Raw[] | null;
}
}
diff --git a/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts b/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
index 10cc6550..2d9cc35a 100644
--- a/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
+++ b/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts
@@ -6,7 +6,6 @@ import type * as serializers from "../../../../index";
import { PlanBundleCreditGrantRequestBody } from "../../../../types/PlanBundleCreditGrantRequestBody";
import { PlanBundleEntitlementRequestBody } from "../../../../types/PlanBundleEntitlementRequestBody";
import { UpdatePlanRequestBody } from "../../../../types/UpdatePlanRequestBody";
-import { UpdatePlanTraitTraitRequestBody } from "../../../../types/UpdatePlanTraitTraitRequestBody";
import { UpsertBillingProductRequestBody } from "../../../../types/UpsertBillingProductRequestBody";
export const UpdatePlanBundleRequestBody: core.serialization.Schema<
@@ -21,7 +20,6 @@ export const UpdatePlanBundleRequestBody: core.serialization.Schema<
entitlements: core.serialization.list(PlanBundleEntitlementRequestBody),
plan: UpdatePlanRequestBody.optional(),
planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()),
- traits: core.serialization.list(UpdatePlanTraitTraitRequestBody).optional(),
});
export declare namespace UpdatePlanBundleRequestBody {
@@ -31,6 +29,5 @@ export declare namespace UpdatePlanBundleRequestBody {
entitlements: PlanBundleEntitlementRequestBody.Raw[];
plan?: UpdatePlanRequestBody.Raw | null;
plan_version_id?: string | null;
- traits?: UpdatePlanTraitTraitRequestBody.Raw[] | null;
}
}
diff --git a/src/serialization/types/AccountMemberPermission.ts b/src/serialization/types/AccountMemberPermission.ts
index efdc20c9..5ad662fd 100644
--- a/src/serialization/types/AccountMemberPermission.ts
+++ b/src/serialization/types/AccountMemberPermission.ts
@@ -11,6 +11,7 @@ export const AccountMemberPermission: core.serialization.Schema<
"companies_edit",
"company_users_edit",
"components_edit",
+ "custom_plans_edit",
"data_exports_edit",
"features_edit",
"flag_rules_edit",
@@ -29,6 +30,7 @@ export declare namespace AccountMemberPermission {
| "companies_edit"
| "company_users_edit"
| "components_edit"
+ | "custom_plans_edit"
| "data_exports_edit"
| "features_edit"
| "flag_rules_edit"
diff --git a/src/serialization/types/BillingCreditAutoTopupAvailability.ts b/src/serialization/types/BillingCreditAutoTopupAvailability.ts
new file mode 100644
index 00000000..b2bdf69b
--- /dev/null
+++ b/src/serialization/types/BillingCreditAutoTopupAvailability.ts
@@ -0,0 +1,14 @@
+// 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 BillingCreditAutoTopupAvailability: core.serialization.Schema<
+ serializers.BillingCreditAutoTopupAvailability.Raw,
+ Schematic.BillingCreditAutoTopupAvailability
+> = core.serialization.enum_(["off", "automatic", "user_controlled"]);
+
+export declare namespace BillingCreditAutoTopupAvailability {
+ export type Raw = "off" | "automatic" | "user_controlled";
+}
diff --git a/src/serialization/types/BillingCreditGrantZeroedOutReason.ts b/src/serialization/types/BillingCreditGrantZeroedOutReason.ts
index efefe0ca..fb363295 100644
--- a/src/serialization/types/BillingCreditGrantZeroedOutReason.ts
+++ b/src/serialization/types/BillingCreditGrantZeroedOutReason.ts
@@ -7,8 +7,23 @@ import type * as serializers from "../index";
export const BillingCreditGrantZeroedOutReason: core.serialization.Schema<
serializers.BillingCreditGrantZeroedOutReason.Raw,
Schematic.BillingCreditGrantZeroedOutReason
-> = core.serialization.enum_(["expired", "manual", "plan_change", "plan_period_reset", "reconciled"]);
+> = core.serialization.enum_([
+ "customer_archived",
+ "expired",
+ "integration_uninstalled",
+ "manual",
+ "plan_change",
+ "plan_period_reset",
+ "reconciled",
+]);
export declare namespace BillingCreditGrantZeroedOutReason {
- export type Raw = "expired" | "manual" | "plan_change" | "plan_period_reset" | "reconciled";
+ export type Raw =
+ | "customer_archived"
+ | "expired"
+ | "integration_uninstalled"
+ | "manual"
+ | "plan_change"
+ | "plan_period_reset"
+ | "reconciled";
}
diff --git a/src/serialization/types/BillingPlanCreditGrantResetCadence.ts b/src/serialization/types/BillingPlanCreditGrantResetCadence.ts
index 75b28a5d..9f5bda07 100644
--- a/src/serialization/types/BillingPlanCreditGrantResetCadence.ts
+++ b/src/serialization/types/BillingPlanCreditGrantResetCadence.ts
@@ -7,8 +7,8 @@ import type * as serializers from "../index";
export const BillingPlanCreditGrantResetCadence: core.serialization.Schema<
serializers.BillingPlanCreditGrantResetCadence.Raw,
Schematic.BillingPlanCreditGrantResetCadence
-> = core.serialization.enum_(["daily", "monthly", "weekly", "yearly"]);
+> = core.serialization.enum_(["daily", "every_6_months", "monthly", "quarterly", "weekly", "yearly"]);
export declare namespace BillingPlanCreditGrantResetCadence {
- export type Raw = "daily" | "monthly" | "weekly" | "yearly";
+ export type Raw = "daily" | "every_6_months" | "monthly" | "quarterly" | "weekly" | "yearly";
}
diff --git a/src/serialization/types/BillingPlanCreditGrantResponseData.ts b/src/serialization/types/BillingPlanCreditGrantResponseData.ts
index 175d67c3..ee237302 100644
--- a/src/serialization/types/BillingPlanCreditGrantResponseData.ts
+++ b/src/serialization/types/BillingPlanCreditGrantResponseData.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
import { BillingCreditResponseData } from "./BillingCreditResponseData";
@@ -17,6 +18,7 @@ export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema
> = core.serialization.object({
autoTopupAmount: core.serialization.property("auto_topup_amount", core.serialization.number().optional()),
autoTopupAmountType: core.serialization.property("auto_topup_amount_type", core.serialization.string().optional()),
+ autoTopupAvailability: core.serialization.property("auto_topup_availability", BillingCreditAutoTopupAvailability),
autoTopupEnabled: core.serialization.property("auto_topup_enabled", core.serialization.boolean()),
autoTopupExpiryType: core.serialization.property("auto_topup_expiry_type", BillingCreditExpiryType.optional()),
autoTopupExpiryUnit: core.serialization.property("auto_topup_expiry_unit", BillingCreditExpiryUnit.optional()),
@@ -33,6 +35,7 @@ export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema
"auto_topup_threshold_percent",
core.serialization.number().optional(),
),
+ canBuyBundles: core.serialization.property("can_buy_bundles", core.serialization.boolean()),
createdAt: core.serialization.property("created_at", core.serialization.date()),
credit: BillingCreditResponseData.optional(),
creditAmount: core.serialization.property("credit_amount", core.serialization.number()),
@@ -59,6 +62,7 @@ export declare namespace BillingPlanCreditGrantResponseData {
export interface Raw {
auto_topup_amount?: number | null;
auto_topup_amount_type?: string | null;
+ auto_topup_availability: BillingCreditAutoTopupAvailability.Raw;
auto_topup_enabled: boolean;
auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -66,6 +70,7 @@ export declare namespace BillingPlanCreditGrantResponseData {
auto_topup_self_service: boolean;
auto_topup_threshold_credits?: number | null;
auto_topup_threshold_percent?: number | null;
+ can_buy_bundles: boolean;
created_at: string;
credit?: BillingCreditResponseData.Raw | null;
credit_amount: number;
diff --git a/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts b/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts
index f7ef3b5c..a2c9f7c3 100644
--- a/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts
+++ b/src/serialization/types/ChangeSubscriptionInternalRequestBody.ts
@@ -18,6 +18,7 @@ export const ChangeSubscriptionInternalRequestBody: core.serialization.ObjectSch
"auto_topup_overrides",
core.serialization.list(UpdateAutoTopupOverrideRequestBody),
),
+ billingEntityId: core.serialization.property("billing_entity_id", core.serialization.string().optional()),
companyId: core.serialization.property("company_id", core.serialization.string()),
couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()),
creditBundles: core.serialization.property(
@@ -38,6 +39,7 @@ export declare namespace ChangeSubscriptionInternalRequestBody {
export interface Raw {
add_on_ids: UpdateAddOnRequestBody.Raw[];
auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[];
+ billing_entity_id?: string | null;
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 89e9a7e6..686d05d4 100644
--- a/src/serialization/types/ChangeSubscriptionRequestBody.ts
+++ b/src/serialization/types/ChangeSubscriptionRequestBody.ts
@@ -18,6 +18,7 @@ export const ChangeSubscriptionRequestBody: core.serialization.ObjectSchema<
"auto_topup_overrides",
core.serialization.list(UpdateAutoTopupOverrideRequestBody),
),
+ billingEntityId: core.serialization.property("billing_entity_id", core.serialization.string().optional()),
couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()),
creditBundles: core.serialization.property(
"credit_bundles",
@@ -37,6 +38,7 @@ export declare namespace ChangeSubscriptionRequestBody {
export interface Raw {
add_on_ids: UpdateAddOnRequestBody.Raw[];
auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[];
+ billing_entity_id?: string | null;
coupon_external_id?: string | null;
credit_bundles: UpdateCreditBundleRequestBody.Raw[];
custom_field_values: CheckoutFieldValue.Raw[];
diff --git a/src/serialization/types/CompanyBillingEntityResponseData.ts b/src/serialization/types/CompanyBillingEntityResponseData.ts
new file mode 100644
index 00000000..99b3fc88
--- /dev/null
+++ b/src/serialization/types/CompanyBillingEntityResponseData.ts
@@ -0,0 +1,21 @@
+// 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 { CompanyResponseData } from "./CompanyResponseData";
+
+export const CompanyBillingEntityResponseData: core.serialization.ObjectSchema<
+ serializers.CompanyBillingEntityResponseData.Raw,
+ Schematic.CompanyBillingEntityResponseData
+> = core.serialization.object({
+ billingEntity: core.serialization.property("billing_entity", CompanyResponseData.optional()),
+ hasOwnStripeCustomer: core.serialization.property("has_own_stripe_customer", core.serialization.boolean()),
+});
+
+export declare namespace CompanyBillingEntityResponseData {
+ export interface Raw {
+ billing_entity?: CompanyResponseData.Raw | null;
+ has_own_stripe_customer: boolean;
+ }
+}
diff --git a/src/serialization/types/CompanyBillingEntitySubscriptionResponseData.ts b/src/serialization/types/CompanyBillingEntitySubscriptionResponseData.ts
new file mode 100644
index 00000000..96af0753
--- /dev/null
+++ b/src/serialization/types/CompanyBillingEntitySubscriptionResponseData.ts
@@ -0,0 +1,58 @@
+// 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 { BillingProductForSubscriptionResponseData } from "./BillingProductForSubscriptionResponseData";
+import { BillingProviderType } from "./BillingProviderType";
+import { BillingSubscriptionDiscountView } from "./BillingSubscriptionDiscountView";
+import { CompanyResponseData } from "./CompanyResponseData";
+import { InvoiceResponseData } from "./InvoiceResponseData";
+import { PaymentMethodResponseData } from "./PaymentMethodResponseData";
+
+export const CompanyBillingEntitySubscriptionResponseData: core.serialization.ObjectSchema<
+ serializers.CompanyBillingEntitySubscriptionResponseData.Raw,
+ Schematic.CompanyBillingEntitySubscriptionResponseData
+> = core.serialization.object({
+ cancelAt: core.serialization.property("cancel_at", core.serialization.date().optional()),
+ cancelAtPeriodEnd: core.serialization.property("cancel_at_period_end", core.serialization.boolean()),
+ company: CompanyResponseData.optional(),
+ currency: core.serialization.string(),
+ customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
+ discounts: core.serialization.list(BillingSubscriptionDiscountView),
+ expiredAt: core.serialization.property("expired_at", core.serialization.date().optional()),
+ interval: core.serialization.string(),
+ isInitial: core.serialization.property("is_initial", core.serialization.boolean()),
+ latestInvoice: core.serialization.property("latest_invoice", InvoiceResponseData.optional()),
+ paymentMethod: core.serialization.property("payment_method", PaymentMethodResponseData.optional()),
+ planName: core.serialization.property("plan_name", core.serialization.string()),
+ products: core.serialization.list(BillingProductForSubscriptionResponseData),
+ providerType: core.serialization.property("provider_type", BillingProviderType),
+ status: core.serialization.string(),
+ subscriptionExternalId: core.serialization.property("subscription_external_id", core.serialization.string()),
+ totalPrice: core.serialization.property("total_price", core.serialization.number()),
+ trialEnd: core.serialization.property("trial_end", core.serialization.date().optional()),
+});
+
+export declare namespace CompanyBillingEntitySubscriptionResponseData {
+ export interface Raw {
+ cancel_at?: string | null;
+ cancel_at_period_end: boolean;
+ company?: CompanyResponseData.Raw | null;
+ currency: string;
+ customer_external_id: string;
+ discounts: BillingSubscriptionDiscountView.Raw[];
+ expired_at?: string | null;
+ interval: string;
+ is_initial: boolean;
+ latest_invoice?: InvoiceResponseData.Raw | null;
+ payment_method?: PaymentMethodResponseData.Raw | null;
+ plan_name: string;
+ products: BillingProductForSubscriptionResponseData.Raw[];
+ provider_type: BillingProviderType.Raw;
+ status: string;
+ subscription_external_id: string;
+ total_price: number;
+ trial_end?: string | null;
+ }
+}
diff --git a/src/serialization/types/CompanyPlanCreditGrantView.ts b/src/serialization/types/CompanyPlanCreditGrantView.ts
index 8debd9a6..ad6b9994 100644
--- a/src/serialization/types/CompanyPlanCreditGrantView.ts
+++ b/src/serialization/types/CompanyPlanCreditGrantView.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
import { BillingCreditView } from "./BillingCreditView";
@@ -23,6 +24,10 @@ export const CompanyPlanCreditGrantView: core.serialization.ObjectSchema<
"billing_credit_auto_topup_amount_type",
core.serialization.string().optional(),
),
+ billingCreditAutoTopupAvailability: core.serialization.property(
+ "billing_credit_auto_topup_availability",
+ BillingCreditAutoTopupAvailability.optional(),
+ ),
billingCreditAutoTopupEnabled: core.serialization.property(
"billing_credit_auto_topup_enabled",
core.serialization.boolean(),
@@ -51,6 +56,10 @@ export const CompanyPlanCreditGrantView: core.serialization.ObjectSchema<
"billing_credit_auto_topup_threshold_percent",
core.serialization.number().optional(),
),
+ billingCreditCanBuyBundles: core.serialization.property(
+ "billing_credit_can_buy_bundles",
+ core.serialization.boolean(),
+ ),
companyAutoTopupAmount: core.serialization.property(
"company_auto_topup_amount",
core.serialization.number().optional(),
@@ -90,6 +99,7 @@ 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_availability?: BillingCreditAutoTopupAvailability.Raw | 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;
@@ -97,6 +107,7 @@ export declare namespace CompanyPlanCreditGrantView {
billing_credit_auto_topup_self_service: boolean;
billing_credit_auto_topup_threshold_credits?: number | null;
billing_credit_auto_topup_threshold_percent?: number | null;
+ billing_credit_can_buy_bundles: boolean;
company_auto_topup_amount?: number | null;
company_auto_topup_enabled?: boolean | null;
company_auto_topup_threshold_credits?: number | null;
diff --git a/src/serialization/types/CompanyPlanDetailResponseData.ts b/src/serialization/types/CompanyPlanDetailResponseData.ts
index 8f1b7621..029a2b7b 100644
--- a/src/serialization/types/CompanyPlanDetailResponseData.ts
+++ b/src/serialization/types/CompanyPlanDetailResponseData.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditResponseData } from "./BillingCreditResponseData";
import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
import { BillingPriceResponseData } from "./BillingPriceResponseData";
import { BillingProductDetailResponseData } from "./BillingProductDetailResponseData";
@@ -38,6 +39,7 @@ export const CompanyPlanDetailResponseData: core.serialization.ObjectSchema<
companyCanTrial: core.serialization.property("company_can_trial", core.serialization.boolean()),
companyCount: core.serialization.property("company_count", core.serialization.number()),
companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+ companyLogoUrl: core.serialization.property("company_logo_url", core.serialization.string().optional()),
companyName: core.serialization.property("company_name", core.serialization.string().optional()),
compatiblePlanIds: core.serialization.property(
"compatible_plan_ids",
@@ -46,6 +48,7 @@ export const CompanyPlanDetailResponseData: core.serialization.ObjectSchema<
controlledBy: core.serialization.property("controlled_by", BillingProviderType),
copiedFromPlanId: core.serialization.property("copied_from_plan_id", core.serialization.string().optional()),
createdAt: core.serialization.property("created_at", core.serialization.date()),
+ credits: core.serialization.list(BillingCreditResponseData),
currencyPrices: core.serialization.property(
"currency_prices",
core.serialization.list(PlanCurrencyPricesResponseData),
@@ -93,11 +96,13 @@ export declare namespace CompanyPlanDetailResponseData {
company_can_trial: boolean;
company_count: number;
company_id?: string | null;
+ company_logo_url?: string | null;
company_name?: string | null;
compatible_plan_ids: string[];
controlled_by: BillingProviderType.Raw;
copied_from_plan_id?: string | null;
created_at: string;
+ credits: BillingCreditResponseData.Raw[];
currency_prices: PlanCurrencyPricesResponseData.Raw[];
current: boolean;
custom: boolean;
diff --git a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts
index 46f64ac8..96801446 100644
--- a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts
+++ b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
@@ -17,6 +18,10 @@ export const CreateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS
applyToExisting: core.serialization.property("apply_to_existing", core.serialization.boolean().optional()),
autoTopupAmount: core.serialization.property("auto_topup_amount", core.serialization.number().optional()),
autoTopupAmountType: core.serialization.property("auto_topup_amount_type", CreditAutoTopupAmountType.optional()),
+ autoTopupAvailability: core.serialization.property(
+ "auto_topup_availability",
+ BillingCreditAutoTopupAvailability.optional(),
+ ),
autoTopupEnabled: core.serialization.property("auto_topup_enabled", core.serialization.boolean().optional()),
autoTopupExpiryType: core.serialization.property("auto_topup_expiry_type", BillingCreditExpiryType.optional()),
autoTopupExpiryUnit: core.serialization.property("auto_topup_expiry_unit", BillingCreditExpiryUnit.optional()),
@@ -36,6 +41,7 @@ export const CreateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS
"auto_topup_threshold_percent",
core.serialization.number().optional(),
),
+ canBuyBundles: core.serialization.property("can_buy_bundles", core.serialization.boolean().optional()),
creditAmount: core.serialization.property("credit_amount", core.serialization.number()),
creditId: core.serialization.property("credit_id", core.serialization.string()),
expiryType: core.serialization.property("expiry_type", BillingCreditExpiryType.optional()),
@@ -54,6 +60,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
apply_to_existing?: boolean | null;
auto_topup_amount?: number | null;
auto_topup_amount_type?: CreditAutoTopupAmountType.Raw | null;
+ auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
auto_topup_enabled?: boolean | null;
auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -61,6 +68,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
auto_topup_self_service?: boolean | null;
auto_topup_threshold_credits?: number | null;
auto_topup_threshold_percent?: number | null;
+ can_buy_bundles?: boolean | null;
credit_amount: number;
credit_id: string;
expiry_type?: BillingCreditExpiryType.Raw | null;
diff --git a/src/serialization/types/EventBody.ts b/src/serialization/types/EventBody.ts
index 4fd8e9be..6a50129f 100644
--- a/src/serialization/types/EventBody.ts
+++ b/src/serialization/types/EventBody.ts
@@ -5,11 +5,17 @@ import * as core from "../../core";
import type * as serializers from "../index";
import { EventBodyFlagCheck } from "./EventBodyFlagCheck";
import { EventBodyIdentify } from "./EventBodyIdentify";
+import { EventBodyInference } from "./EventBodyInference";
import { EventBodyTrack } from "./EventBodyTrack";
export const EventBody: core.serialization.Schema =
- core.serialization.undiscriminatedUnion([EventBodyTrack, EventBodyFlagCheck, EventBodyIdentify]);
+ core.serialization.undiscriminatedUnion([
+ EventBodyTrack,
+ EventBodyFlagCheck,
+ EventBodyIdentify,
+ EventBodyInference,
+ ]);
export declare namespace EventBody {
- export type Raw = EventBodyTrack.Raw | EventBodyFlagCheck.Raw | EventBodyIdentify.Raw;
+ export type Raw = EventBodyTrack.Raw | EventBodyFlagCheck.Raw | EventBodyIdentify.Raw | EventBodyInference.Raw;
}
diff --git a/src/serialization/types/EventBodyInference.ts b/src/serialization/types/EventBodyInference.ts
new file mode 100644
index 00000000..898174a7
--- /dev/null
+++ b/src/serialization/types/EventBodyInference.ts
@@ -0,0 +1,44 @@
+// 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 EventBodyInference: core.serialization.ObjectSchema<
+ serializers.EventBodyInference.Raw,
+ Schematic.EventBodyInference
+> = core.serialization.object({
+ cachedInputTokens: core.serialization.property("cached_input_tokens", core.serialization.number().optional()),
+ company: core.serialization.record(core.serialization.string(), core.serialization.string()),
+ cost: core.serialization.string().optional(),
+ currency: core.serialization.string().optional(),
+ event: core.serialization.string().optional(),
+ inputTokens: core.serialization.property("input_tokens", core.serialization.number()),
+ operation: core.serialization.string().optional(),
+ outputTokens: core.serialization.property("output_tokens", core.serialization.number()),
+ provider: core.serialization.string(),
+ reasoningTokens: core.serialization.property("reasoning_tokens", core.serialization.number().optional()),
+ requestModel: core.serialization.property("request_model", core.serialization.string().optional()),
+ requests: core.serialization.number().optional(),
+ responseModel: core.serialization.property("response_model", core.serialization.string()),
+ user: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
+});
+
+export declare namespace EventBodyInference {
+ export interface Raw {
+ cached_input_tokens?: number | null;
+ company: Record;
+ cost?: string | null;
+ currency?: string | null;
+ event?: string | null;
+ input_tokens: number;
+ operation?: string | null;
+ output_tokens: number;
+ provider: string;
+ reasoning_tokens?: number | null;
+ request_model?: string | null;
+ requests?: number | null;
+ response_model: string;
+ user?: Record | null;
+ }
+}
diff --git a/src/serialization/types/EventType.ts b/src/serialization/types/EventType.ts
index 9c094ec7..79e6d9ba 100644
--- a/src/serialization/types/EventType.ts
+++ b/src/serialization/types/EventType.ts
@@ -5,8 +5,8 @@ import * as core from "../../core";
import type * as serializers from "../index";
export const EventType: core.serialization.Schema =
- core.serialization.enum_(["flag_check", "identify", "track"]);
+ core.serialization.enum_(["flag_check", "identify", "inference", "track"]);
export declare namespace EventType {
- export type Raw = "flag_check" | "identify" | "track";
+ export type Raw = "flag_check" | "identify" | "inference" | "track";
}
diff --git a/src/serialization/types/IntegrationsListResponseData.ts b/src/serialization/types/IntegrationsListResponseData.ts
index e1d325ed..a8243355 100644
--- a/src/serialization/types/IntegrationsListResponseData.ts
+++ b/src/serialization/types/IntegrationsListResponseData.ts
@@ -17,6 +17,10 @@ export const IntegrationsListResponseData: core.serialization.ObjectSchema<
id: core.serialization.string(),
isAppInstall: core.serialization.property("is_app_install", core.serialization.boolean()),
isConnectInstall: core.serialization.property("is_connect_install", core.serialization.boolean()),
+ lastWebhookReceivedAt: core.serialization.property(
+ "last_webhook_received_at",
+ core.serialization.date().optional(),
+ ),
state: IntegrationState,
type: IntegrationType,
});
@@ -28,6 +32,7 @@ export declare namespace IntegrationsListResponseData {
id: string;
is_app_install: boolean;
is_connect_install: boolean;
+ last_webhook_received_at?: string | null;
state: IntegrationState.Raw;
type: IntegrationType.Raw;
}
diff --git a/src/serialization/types/InvoiceRequestBody.ts b/src/serialization/types/InvoiceRequestBody.ts
index b82063a8..3f0cb9f5 100644
--- a/src/serialization/types/InvoiceRequestBody.ts
+++ b/src/serialization/types/InvoiceRequestBody.ts
@@ -16,10 +16,12 @@ export const InvoiceRequestBody: core.serialization.ObjectSchema<
currency: core.serialization.string(),
customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
dueDate: core.serialization.property("due_date", core.serialization.date().optional()),
+ endingBalance: core.serialization.property("ending_balance", core.serialization.number().optional()),
paymentMethodExternalId: core.serialization.property(
"payment_method_external_id",
core.serialization.string().optional(),
),
+ startingBalance: core.serialization.property("starting_balance", core.serialization.number().optional()),
status: InvoiceStatus.optional(),
subscriptionExternalId: core.serialization.property(
"subscription_external_id",
@@ -38,7 +40,9 @@ export declare namespace InvoiceRequestBody {
currency: string;
customer_external_id: string;
due_date?: string | null;
+ ending_balance?: number | null;
payment_method_external_id?: string | null;
+ starting_balance?: number | null;
status?: InvoiceStatus.Raw | null;
subscription_external_id?: string | null;
subtotal: number;
diff --git a/src/serialization/types/InvoiceResponseData.ts b/src/serialization/types/InvoiceResponseData.ts
index 51f10cc9..645bdc61 100644
--- a/src/serialization/types/InvoiceResponseData.ts
+++ b/src/serialization/types/InvoiceResponseData.ts
@@ -19,6 +19,7 @@ export const InvoiceResponseData: core.serialization.ObjectSchema<
currency: core.serialization.string(),
customerExternalId: core.serialization.property("customer_external_id", core.serialization.string()),
dueDate: core.serialization.property("due_date", core.serialization.date().optional()),
+ endingBalance: core.serialization.property("ending_balance", core.serialization.number()),
environmentId: core.serialization.property("environment_id", core.serialization.string()),
externalId: core.serialization.property("external_id", core.serialization.string().optional()),
id: core.serialization.string(),
@@ -27,6 +28,7 @@ export const InvoiceResponseData: core.serialization.ObjectSchema<
core.serialization.string().optional(),
),
providerType: core.serialization.property("provider_type", BillingProviderType),
+ startingBalance: core.serialization.property("starting_balance", core.serialization.number()),
status: InvoiceStatus.optional(),
subscriptionExternalId: core.serialization.property(
"subscription_external_id",
@@ -48,11 +50,13 @@ export declare namespace InvoiceResponseData {
currency: string;
customer_external_id: string;
due_date?: string | null;
+ ending_balance: number;
environment_id: string;
external_id?: string | null;
id: string;
payment_method_external_id?: string | null;
provider_type: BillingProviderType.Raw;
+ starting_balance: number;
status?: InvoiceStatus.Raw | null;
subscription_external_id?: string | null;
subtotal: number;
diff --git a/src/serialization/types/ManagePlanRequest.ts b/src/serialization/types/ManagePlanRequest.ts
index c000edd7..c391059a 100644
--- a/src/serialization/types/ManagePlanRequest.ts
+++ b/src/serialization/types/ManagePlanRequest.ts
@@ -16,6 +16,7 @@ export const ManagePlanRequest: core.serialization.ObjectSchema<
basePlanId: core.serialization.property("base_plan_id", core.serialization.string().optional()),
basePlanPriceId: core.serialization.property("base_plan_price_id", core.serialization.string().optional()),
basePlanVersionId: core.serialization.property("base_plan_version_id", core.serialization.string().optional()),
+ billingEntityId: core.serialization.property("billing_entity_id", core.serialization.string().optional()),
cancelImmediately: core.serialization.property("cancel_immediately", core.serialization.boolean().optional()),
companyId: core.serialization.property("company_id", core.serialization.string()),
couponExternalId: core.serialization.property("coupon_external_id", core.serialization.string().optional()),
@@ -43,6 +44,7 @@ export declare namespace ManagePlanRequest {
base_plan_id?: string | null;
base_plan_price_id?: string | null;
base_plan_version_id?: string | null;
+ billing_entity_id?: string | null;
cancel_immediately?: boolean | null;
company_id: string;
coupon_external_id?: string | null;
diff --git a/src/serialization/types/MetronomeIntegrationConfig.ts b/src/serialization/types/MetronomeIntegrationConfig.ts
index f5ad9c07..99107e54 100644
--- a/src/serialization/types/MetronomeIntegrationConfig.ts
+++ b/src/serialization/types/MetronomeIntegrationConfig.ts
@@ -7,8 +7,15 @@ import type * as serializers from "../index";
export const MetronomeIntegrationConfig: core.serialization.ObjectSchema<
serializers.MetronomeIntegrationConfig.Raw,
Schematic.MetronomeIntegrationConfig
-> = core.serialization.object({});
+> = core.serialization.object({
+ externalCustomerIdKey: core.serialization.property(
+ "external_customer_id_key",
+ core.serialization.string().optional(),
+ ),
+});
export declare namespace MetronomeIntegrationConfig {
- export type Raw = {};
+ export interface Raw {
+ external_customer_id_key?: string | null;
+ }
}
diff --git a/src/serialization/types/PlanBundleResponseData.ts b/src/serialization/types/PlanBundleResponseData.ts
index 8c404b10..9938541f 100644
--- a/src/serialization/types/PlanBundleResponseData.ts
+++ b/src/serialization/types/PlanBundleResponseData.ts
@@ -7,7 +7,6 @@ import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResp
import { BillingProductPlanResponseData } from "./BillingProductPlanResponseData";
import { PlanEntitlementResponseData } from "./PlanEntitlementResponseData";
import { PlanResponseData } from "./PlanResponseData";
-import { PlanTraitResponseData } from "./PlanTraitResponseData";
export const PlanBundleResponseData: core.serialization.ObjectSchema<
serializers.PlanBundleResponseData.Raw,
@@ -20,7 +19,6 @@ export const PlanBundleResponseData: core.serialization.ObjectSchema<
),
entitlements: core.serialization.list(PlanEntitlementResponseData).optional(),
plan: PlanResponseData.optional(),
- traits: core.serialization.list(PlanTraitResponseData).optional(),
});
export declare namespace PlanBundleResponseData {
@@ -29,6 +27,5 @@ export declare namespace PlanBundleResponseData {
credit_grants?: BillingPlanCreditGrantResponseData.Raw[] | null;
entitlements?: PlanEntitlementResponseData.Raw[] | null;
plan?: PlanResponseData.Raw | null;
- traits?: PlanTraitResponseData.Raw[] | null;
}
}
diff --git a/src/serialization/types/PlanCreditGrantView.ts b/src/serialization/types/PlanCreditGrantView.ts
index ba087f88..9e1aba63 100644
--- a/src/serialization/types/PlanCreditGrantView.ts
+++ b/src/serialization/types/PlanCreditGrantView.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
import { BillingCreditView } from "./BillingCreditView";
@@ -23,6 +24,10 @@ export const PlanCreditGrantView: core.serialization.ObjectSchema<
"billing_credit_auto_topup_amount_type",
core.serialization.string().optional(),
),
+ billingCreditAutoTopupAvailability: core.serialization.property(
+ "billing_credit_auto_topup_availability",
+ BillingCreditAutoTopupAvailability.optional(),
+ ),
billingCreditAutoTopupEnabled: core.serialization.property(
"billing_credit_auto_topup_enabled",
core.serialization.boolean(),
@@ -51,6 +56,10 @@ export const PlanCreditGrantView: core.serialization.ObjectSchema<
"billing_credit_auto_topup_threshold_percent",
core.serialization.number().optional(),
),
+ billingCreditCanBuyBundles: core.serialization.property(
+ "billing_credit_can_buy_bundles",
+ core.serialization.boolean(),
+ ),
createdAt: core.serialization.property("created_at", core.serialization.date()),
credit: BillingCreditView.optional(),
creditAmount: core.serialization.property("credit_amount", core.serialization.number()),
@@ -78,6 +87,7 @@ export declare namespace PlanCreditGrantView {
export interface Raw {
billing_credit_auto_topup_amount?: number | null;
billing_credit_auto_topup_amount_type?: string | null;
+ billing_credit_auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | 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;
@@ -85,6 +95,7 @@ export declare namespace PlanCreditGrantView {
billing_credit_auto_topup_self_service: boolean;
billing_credit_auto_topup_threshold_credits?: number | null;
billing_credit_auto_topup_threshold_percent?: number | null;
+ billing_credit_can_buy_bundles: boolean;
created_at: string;
credit?: BillingCreditView.Raw | null;
credit_amount: number;
diff --git a/src/serialization/types/PlanDetailResponseData.ts b/src/serialization/types/PlanDetailResponseData.ts
index 5dd72e08..e9e736cb 100644
--- a/src/serialization/types/PlanDetailResponseData.ts
+++ b/src/serialization/types/PlanDetailResponseData.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditResponseData } from "./BillingCreditResponseData";
import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResponseData";
import { BillingPriceResponseData } from "./BillingPriceResponseData";
@@ -32,10 +33,12 @@ export const PlanDetailResponseData: core.serialization.ObjectSchema<
chargeType: core.serialization.property("charge_type", ChargeType),
companyCount: core.serialization.property("company_count", core.serialization.number()),
companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+ companyLogoUrl: core.serialization.property("company_logo_url", core.serialization.string().optional()),
companyName: core.serialization.property("company_name", core.serialization.string().optional()),
controlledBy: core.serialization.property("controlled_by", BillingProviderType),
copiedFromPlanId: core.serialization.property("copied_from_plan_id", core.serialization.string().optional()),
createdAt: core.serialization.property("created_at", core.serialization.date()),
+ credits: core.serialization.list(BillingCreditResponseData),
currencyPrices: core.serialization.property(
"currency_prices",
core.serialization.list(PlanCurrencyPricesResponseData),
@@ -74,10 +77,12 @@ export declare namespace PlanDetailResponseData {
charge_type: ChargeType.Raw;
company_count: number;
company_id?: string | null;
+ company_logo_url?: string | null;
company_name?: string | null;
controlled_by: BillingProviderType.Raw;
copied_from_plan_id?: string | null;
created_at: string;
+ credits: BillingCreditResponseData.Raw[];
currency_prices: PlanCurrencyPricesResponseData.Raw[];
description: string;
draft_version?: PlanVersionResponseData.Raw | null;
diff --git a/src/serialization/types/PlanEntitlementResponseData.ts b/src/serialization/types/PlanEntitlementResponseData.ts
index 6581b47c..50e6c6db 100644
--- a/src/serialization/types/PlanEntitlementResponseData.ts
+++ b/src/serialization/types/PlanEntitlementResponseData.ts
@@ -15,6 +15,7 @@ import { FeatureResponseData } from "./FeatureResponseData";
import { MetricPeriod } from "./MetricPeriod";
import { MetricPeriodMonthReset } from "./MetricPeriodMonthReset";
import { PlanResponseData } from "./PlanResponseData";
+import { WarningTierResponseData } from "./WarningTierResponseData";
export const PlanEntitlementResponseData: core.serialization.ObjectSchema<
serializers.PlanEntitlementResponseData.Raw,
@@ -55,6 +56,7 @@ export const PlanEntitlementResponseData: core.serialization.ObjectSchema<
valueTrait: core.serialization.property("value_trait", EntityTraitDefinitionResponseData.optional()),
valueTraitId: core.serialization.property("value_trait_id", core.serialization.string().optional()),
valueType: core.serialization.property("value_type", EntitlementValueType),
+ warningTiers: core.serialization.property("warning_tiers", core.serialization.list(WarningTierResponseData)),
});
export declare namespace PlanEntitlementResponseData {
@@ -88,5 +90,6 @@ export declare namespace PlanEntitlementResponseData {
value_trait?: EntityTraitDefinitionResponseData.Raw | null;
value_trait_id?: string | null;
value_type: EntitlementValueType.Raw;
+ warning_tiers: WarningTierResponseData.Raw[];
}
}
diff --git a/src/serialization/types/PlanGroupPlanDetailResponseData.ts b/src/serialization/types/PlanGroupPlanDetailResponseData.ts
index 6eb2c3f2..f253ffcc 100644
--- a/src/serialization/types/PlanGroupPlanDetailResponseData.ts
+++ b/src/serialization/types/PlanGroupPlanDetailResponseData.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditResponseData } from "./BillingCreditResponseData";
import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResponseData";
import { BillingPriceResponseData } from "./BillingPriceResponseData";
@@ -35,6 +36,7 @@ export const PlanGroupPlanDetailResponseData: core.serialization.ObjectSchema<
chargeType: core.serialization.property("charge_type", ChargeType),
companyCount: core.serialization.property("company_count", core.serialization.number()),
companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+ companyLogoUrl: core.serialization.property("company_logo_url", core.serialization.string().optional()),
companyName: core.serialization.property("company_name", core.serialization.string().optional()),
compatiblePlanIds: core.serialization.property(
"compatible_plan_ids",
@@ -43,6 +45,7 @@ export const PlanGroupPlanDetailResponseData: core.serialization.ObjectSchema<
controlledBy: core.serialization.property("controlled_by", BillingProviderType),
copiedFromPlanId: core.serialization.property("copied_from_plan_id", core.serialization.string().optional()),
createdAt: core.serialization.property("created_at", core.serialization.date()),
+ credits: core.serialization.list(BillingCreditResponseData),
currencyPrices: core.serialization.property(
"currency_prices",
core.serialization.list(PlanCurrencyPricesResponseData),
@@ -84,11 +87,13 @@ export declare namespace PlanGroupPlanDetailResponseData {
charge_type: ChargeType.Raw;
company_count: number;
company_id?: string | null;
+ company_logo_url?: string | null;
company_name?: string | null;
compatible_plan_ids: string[];
controlled_by: BillingProviderType.Raw;
copied_from_plan_id?: string | null;
created_at: string;
+ credits: BillingCreditResponseData.Raw[];
currency_prices: PlanCurrencyPricesResponseData.Raw[];
custom_plan_config?: CustomPlanViewConfigResponseData.Raw | null;
description: string;
diff --git a/src/serialization/types/PlanViewPublicResponseData.ts b/src/serialization/types/PlanViewPublicResponseData.ts
index 26c9f7c1..466270f7 100644
--- a/src/serialization/types/PlanViewPublicResponseData.ts
+++ b/src/serialization/types/PlanViewPublicResponseData.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditResponseData } from "./BillingCreditResponseData";
import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
import { BillingPriceResponseData } from "./BillingPriceResponseData";
import { BillingProductDetailResponseData } from "./BillingProductDetailResponseData";
@@ -35,6 +36,7 @@ export const PlanViewPublicResponseData: core.serialization.ObjectSchema<
chargeType: core.serialization.property("charge_type", ChargeType),
companyCount: core.serialization.property("company_count", core.serialization.number()),
companyId: core.serialization.property("company_id", core.serialization.string().optional()),
+ companyLogoUrl: core.serialization.property("company_logo_url", core.serialization.string().optional()),
companyName: core.serialization.property("company_name", core.serialization.string().optional()),
compatiblePlanIds: core.serialization.property(
"compatible_plan_ids",
@@ -43,6 +45,7 @@ export const PlanViewPublicResponseData: core.serialization.ObjectSchema<
controlledBy: core.serialization.property("controlled_by", BillingProviderType),
copiedFromPlanId: core.serialization.property("copied_from_plan_id", core.serialization.string().optional()),
createdAt: core.serialization.property("created_at", core.serialization.date()),
+ credits: core.serialization.list(BillingCreditResponseData),
currencyPrices: core.serialization.property(
"currency_prices",
core.serialization.list(PlanCurrencyPricesResponseData),
@@ -85,11 +88,13 @@ export declare namespace PlanViewPublicResponseData {
charge_type: ChargeType.Raw;
company_count: number;
company_id?: string | null;
+ company_logo_url?: string | null;
company_name?: string | null;
compatible_plan_ids: string[];
controlled_by: BillingProviderType.Raw;
copied_from_plan_id?: string | null;
created_at: string;
+ credits: BillingCreditResponseData.Raw[];
currency_prices: PlanCurrencyPricesResponseData.Raw[];
custom: boolean;
custom_plan_config?: CustomPlanConfig.Raw | null;
diff --git a/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts b/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts
index 9bab8903..757c6fba 100644
--- a/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts
+++ b/src/serialization/types/UpdateBillingPlanCreditGrantRequestBody.ts
@@ -3,6 +3,7 @@
import type * as Schematic from "../../api/index";
import * as core from "../../core";
import type * as serializers from "../index";
+import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
@@ -17,6 +18,10 @@ export const UpdateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS
applyToExisting: core.serialization.property("apply_to_existing", core.serialization.boolean().optional()),
autoTopupAmount: core.serialization.property("auto_topup_amount", core.serialization.number().optional()),
autoTopupAmountType: core.serialization.property("auto_topup_amount_type", CreditAutoTopupAmountType.optional()),
+ autoTopupAvailability: core.serialization.property(
+ "auto_topup_availability",
+ BillingCreditAutoTopupAvailability.optional(),
+ ),
autoTopupEnabled: core.serialization.property("auto_topup_enabled", core.serialization.boolean().optional()),
autoTopupExpiryType: core.serialization.property("auto_topup_expiry_type", BillingCreditExpiryType.optional()),
autoTopupExpiryUnit: core.serialization.property("auto_topup_expiry_unit", BillingCreditExpiryUnit.optional()),
@@ -36,6 +41,7 @@ export const UpdateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS
"auto_topup_threshold_percent",
core.serialization.number().optional(),
),
+ canBuyBundles: core.serialization.property("can_buy_bundles", core.serialization.boolean().optional()),
creditAmount: core.serialization.property("credit_amount", core.serialization.number().optional()),
expiryType: core.serialization.property("expiry_type", BillingCreditExpiryType.optional()),
expiryUnit: core.serialization.property("expiry_unit", BillingCreditExpiryUnit.optional()),
@@ -51,6 +57,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
apply_to_existing?: boolean | null;
auto_topup_amount?: number | null;
auto_topup_amount_type?: CreditAutoTopupAmountType.Raw | null;
+ auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
auto_topup_enabled?: boolean | null;
auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -58,6 +65,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
auto_topup_self_service?: boolean | null;
auto_topup_threshold_credits?: number | null;
auto_topup_threshold_percent?: number | null;
+ can_buy_bundles?: boolean | null;
credit_amount?: number | null;
expiry_type?: BillingCreditExpiryType.Raw | null;
expiry_unit?: BillingCreditExpiryUnit.Raw | null;
diff --git a/src/serialization/types/WarningTierRequestBody.ts b/src/serialization/types/WarningTierRequestBody.ts
new file mode 100644
index 00000000..2301eaa4
--- /dev/null
+++ b/src/serialization/types/WarningTierRequestBody.ts
@@ -0,0 +1,20 @@
+// 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 WarningTierRequestBody: core.serialization.ObjectSchema<
+ serializers.WarningTierRequestBody.Raw,
+ Schematic.WarningTierRequestBody
+> = core.serialization.object({
+ key: core.serialization.string(),
+ value: core.serialization.number(),
+});
+
+export declare namespace WarningTierRequestBody {
+ export interface Raw {
+ key: string;
+ value: number;
+ }
+}
diff --git a/src/serialization/types/WarningTierResponseData.ts b/src/serialization/types/WarningTierResponseData.ts
new file mode 100644
index 00000000..cc8bb24e
--- /dev/null
+++ b/src/serialization/types/WarningTierResponseData.ts
@@ -0,0 +1,22 @@
+// 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 WarningTierResponseData: core.serialization.ObjectSchema<
+ serializers.WarningTierResponseData.Raw,
+ Schematic.WarningTierResponseData
+> = core.serialization.object({
+ id: core.serialization.string(),
+ key: core.serialization.string(),
+ value: core.serialization.number(),
+});
+
+export declare namespace WarningTierResponseData {
+ export interface Raw {
+ id: string;
+ key: string;
+ value: number;
+ }
+}
diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts
index b3818b72..e65f2a4b 100644
--- a/src/serialization/types/index.ts
+++ b/src/serialization/types/index.ts
@@ -12,6 +12,7 @@ export * from "./ApiKeyScope";
export * from "./AuditLogListResponseData";
export * from "./AuditLogResponseData";
export * from "./BillingCouponResponseData";
+export * from "./BillingCreditAutoTopupAvailability";
export * from "./BillingCreditBundleResponseData";
export * from "./BillingCreditBundleStatus";
export * from "./BillingCreditBundleType";
@@ -73,6 +74,8 @@ export * from "./CheckoutFieldWithValue";
export * from "./CheckoutSettingsResponseData";
export * from "./CheckoutSubscription";
export * from "./ClerkIntegrationConfig";
+export * from "./CompanyBillingEntityResponseData";
+export * from "./CompanyBillingEntitySubscriptionResponseData";
export * from "./CompanyCreditBalance";
export * from "./CompanyCreditBalanceResponseData";
export * from "./CompanyDetailResponseData";
@@ -187,6 +190,7 @@ export * from "./EventBody";
export * from "./EventBodyFlagCheck";
export * from "./EventBodyIdentify";
export * from "./EventBodyIdentifyCompany";
+export * from "./EventBodyInference";
export * from "./EventBodyTrack";
export * from "./EventDetailResponseData";
export * from "./EventResponseData";
@@ -367,6 +371,8 @@ export * from "./UsageBasedEntitlementResponseData";
export * from "./UsageTimeSeriesPointResponseData";
export * from "./UserDetailResponseData";
export * from "./UserResponseData";
+export * from "./WarningTierRequestBody";
+export * from "./WarningTierResponseData";
export * from "./WebFeatureUsageWebhookOutput";
export * from "./WebhookEventDetailResponseData";
export * from "./WebhookEventResponseData";
diff --git a/tests/wire/billing.test.ts b/tests/wire/billing.test.ts
index 6008fc51..9296c252 100644
--- a/tests/wire/billing.test.ts
+++ b/tests/wire/billing.test.ts
@@ -1142,11 +1142,13 @@ describe("BillingClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -1184,11 +1186,13 @@ describe("BillingClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
@@ -1309,11 +1313,13 @@ describe("BillingClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -1352,11 +1358,13 @@ describe("BillingClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
diff --git a/tests/wire/checkout.test.ts b/tests/wire/checkout.test.ts
index 17d92e25..08d8bfd5 100644
--- a/tests/wire/checkout.test.ts
+++ b/tests/wire/checkout.test.ts
@@ -631,6 +631,20 @@ describe("CheckoutClient", () => {
company_count: 1000000,
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
features: [
@@ -778,10 +792,25 @@ describe("CheckoutClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -807,6 +836,7 @@ describe("CheckoutClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -886,8 +916,10 @@ describe("CheckoutClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -986,6 +1018,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1182,6 +1215,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1317,10 +1351,25 @@ describe("CheckoutClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -1346,6 +1395,7 @@ describe("CheckoutClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -1425,8 +1475,10 @@ describe("CheckoutClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -1528,9 +1580,11 @@ describe("CheckoutClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -1597,6 +1651,24 @@ describe("CheckoutClient", () => {
companyCount: 1000000,
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1763,10 +1835,29 @@ describe("CheckoutClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1800,6 +1891,13 @@ describe("CheckoutClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -1894,8 +1992,10 @@ describe("CheckoutClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2003,6 +2103,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2207,6 +2308,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2354,10 +2456,29 @@ describe("CheckoutClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2391,6 +2512,13 @@ describe("CheckoutClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -2485,8 +2613,10 @@ describe("CheckoutClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2593,9 +2723,11 @@ describe("CheckoutClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -3425,6 +3557,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -3621,6 +3754,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -3738,6 +3872,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -3942,6 +4077,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -4934,6 +5070,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -5130,6 +5267,7 @@ describe("CheckoutClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -5224,6 +5362,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -5428,6 +5567,7 @@ describe("CheckoutClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -5658,11 +5798,13 @@ describe("CheckoutClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -5768,11 +5910,13 @@ describe("CheckoutClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
diff --git a/tests/wire/companies.test.ts b/tests/wire/companies.test.ts
index 1e2a2a1d..9588598f 100644
--- a/tests/wire/companies.test.ts
+++ b/tests/wire/companies.test.ts
@@ -19,6 +19,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -215,6 +216,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -341,6 +343,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -545,6 +548,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -723,6 +727,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -770,9 +775,11 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -966,6 +973,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1064,6 +1072,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1113,9 +1122,11 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -1317,6 +1328,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1535,6 +1547,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1582,9 +1595,11 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -1778,6 +1793,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1871,6 +1887,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1920,9 +1937,11 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -2124,6 +2143,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2570,6 +2590,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -2617,9 +2638,11 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -2813,6 +2836,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -2911,6 +2935,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2960,9 +2985,11 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -3164,6 +3191,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -3554,6 +3582,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -3561,6 +3590,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -3642,6 +3672,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -3649,6 +3680,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -3744,6 +3776,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -3751,6 +3784,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -3832,6 +3866,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -3839,6 +3874,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -3981,11 +4017,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -4157,11 +4195,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -4332,11 +4372,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -4705,6 +4747,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -4712,6 +4755,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -4793,6 +4837,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_amount: 1000000,
billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type",
+ billing_credit_auto_topup_availability: "off",
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_expiry_type: "duration",
billing_credit_auto_topup_expiry_unit: "billing_periods",
@@ -4800,6 +4845,7 @@ describe("CompaniesClient", () => {
billing_credit_auto_topup_self_service: true,
billing_credit_auto_topup_threshold_credits: 1000000,
billing_credit_auto_topup_threshold_percent: 1000000,
+ billing_credit_can_buy_bundles: true,
company_auto_topup_amount: 1000000,
company_auto_topup_enabled: true,
company_auto_topup_threshold_credits: 1000000,
@@ -5227,6 +5273,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -5234,6 +5281,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -5327,6 +5375,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -5334,6 +5383,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -5441,6 +5491,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -5448,6 +5499,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -5541,6 +5593,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -5548,6 +5601,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -5704,11 +5758,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
@@ -5884,11 +5940,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
@@ -6063,11 +6121,13 @@ describe("CompaniesClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
@@ -6440,6 +6500,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -6447,6 +6508,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -6540,6 +6602,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupAmount: 1000000,
billingCreditAutoTopupAmountType: "billing_credit_auto_topup_amount_type",
+ billingCreditAutoTopupAvailability: "off",
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupExpiryType: "duration",
billingCreditAutoTopupExpiryUnit: "billing_periods",
@@ -6547,6 +6610,7 @@ describe("CompaniesClient", () => {
billingCreditAutoTopupSelfService: true,
billingCreditAutoTopupThresholdCredits: 1000000,
billingCreditAutoTopupThresholdPercent: 1000000,
+ billingCreditCanBuyBundles: true,
companyAutoTopupAmount: 1000000,
companyAutoTopupEnabled: true,
companyAutoTopupThresholdCredits: 1000000,
@@ -7100,6 +7164,438 @@ describe("CompaniesClient", () => {
}).rejects.toThrow(Schematic.InternalServerError);
});
+ test("getCompanyBillingEntity (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ data: [
+ {
+ billing_entity: {
+ created_at: "2024-01-15T09:30:00Z",
+ environment_id: "environment_id",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ has_own_stripe_customer: true,
+ },
+ ],
+ params: { company_id: "company_id" },
+ };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.companies.getCompanyBillingEntity({
+ companyId: "company_id",
+ });
+ expect(response).toEqual({
+ data: [
+ {
+ billingEntity: {
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ environmentId: "environment_id",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ hasOwnStripeCustomer: true,
+ },
+ ],
+ params: {
+ companyId: "company_id",
+ },
+ });
+ });
+
+ test("getCompanyBillingEntity (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getCompanyBillingEntity();
+ }).rejects.toThrow(Schematic.BadRequestError);
+ });
+
+ test("getCompanyBillingEntity (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(401)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getCompanyBillingEntity();
+ }).rejects.toThrow(Schematic.UnauthorizedError);
+ });
+
+ test("getCompanyBillingEntity (4)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(403)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getCompanyBillingEntity();
+ }).rejects.toThrow(Schematic.ForbiddenError);
+ });
+
+ test("getCompanyBillingEntity (5)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getCompanyBillingEntity();
+ }).rejects.toThrow(Schematic.NotFoundError);
+ });
+
+ test("getCompanyBillingEntity (6)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity")
+ .respondWith()
+ .statusCode(500)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getCompanyBillingEntity();
+ }).rejects.toThrow(Schematic.InternalServerError);
+ });
+
+ test("getBillingEntityChildSubscriptions (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ data: [
+ {
+ cancel_at: "2024-01-15T09:30:00Z",
+ cancel_at_period_end: true,
+ company: {
+ created_at: "2024-01-15T09:30:00Z",
+ environment_id: "environment_id",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ currency: "currency",
+ customer_external_id: "customer_external_id",
+ discounts: [
+ {
+ coupon_id: "coupon_id",
+ coupon_name: "coupon_name",
+ discount_external_id: "discount_external_id",
+ duration: "duration",
+ is_active: true,
+ started_at: "2024-01-15T09:30:00Z",
+ subscription_external_id: "subscription_external_id",
+ },
+ ],
+ expired_at: "2024-01-15T09:30:00Z",
+ interval: "interval",
+ is_initial: true,
+ latest_invoice: {
+ amount_due: 1000000,
+ amount_paid: 1000000,
+ amount_remaining: 1000000,
+ collection_method: "collection_method",
+ created_at: "2024-01-15T09:30:00Z",
+ currency: "currency",
+ customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
+ environment_id: "environment_id",
+ id: "id",
+ provider_type: "metronome",
+ starting_balance: 1000000,
+ subtotal: 1000000,
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ payment_method: {
+ created_at: "2024-01-15T09:30:00Z",
+ customer_external_id: "customer_external_id",
+ environment_id: "environment_id",
+ external_id: "external_id",
+ id: "id",
+ payment_method_type: "payment_method_type",
+ provider_type: "metronome",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ plan_name: "plan_name",
+ products: [
+ {
+ billing_scheme: "per_unit",
+ created_at: "2024-01-15T09:30:00Z",
+ currency: "currency",
+ environment_id: "environment_id",
+ external_id: "external_id",
+ id: "id",
+ interval: "interval",
+ name: "name",
+ package_size: 1000000,
+ price: 1000000,
+ price_external_id: "price_external_id",
+ price_id: "price_id",
+ price_tier: [{}],
+ provider_type: "metronome",
+ quantity: 1.1,
+ subscription_id: "subscription_id",
+ updated_at: "2024-01-15T09:30:00Z",
+ usage_type: "licensed",
+ },
+ ],
+ provider_type: "metronome",
+ status: "status",
+ subscription_external_id: "subscription_external_id",
+ total_price: 1000000,
+ trial_end: "2024-01-15T09:30:00Z",
+ },
+ ],
+ params: { company_id: "company_id" },
+ };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.companies.getBillingEntityChildSubscriptions({
+ companyId: "company_id",
+ });
+ expect(response).toEqual({
+ data: [
+ {
+ cancelAt: new Date("2024-01-15T09:30:00.000Z"),
+ cancelAtPeriodEnd: true,
+ company: {
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ environmentId: "environment_id",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ currency: "currency",
+ customerExternalId: "customer_external_id",
+ discounts: [
+ {
+ couponId: "coupon_id",
+ couponName: "coupon_name",
+ discountExternalId: "discount_external_id",
+ duration: "duration",
+ isActive: true,
+ startedAt: new Date("2024-01-15T09:30:00.000Z"),
+ subscriptionExternalId: "subscription_external_id",
+ },
+ ],
+ expiredAt: new Date("2024-01-15T09:30:00.000Z"),
+ interval: "interval",
+ isInitial: true,
+ latestInvoice: {
+ amountDue: 1000000,
+ amountPaid: 1000000,
+ amountRemaining: 1000000,
+ collectionMethod: "collection_method",
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currency: "currency",
+ customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
+ environmentId: "environment_id",
+ id: "id",
+ providerType: "metronome",
+ startingBalance: 1000000,
+ subtotal: 1000000,
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ paymentMethod: {
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ customerExternalId: "customer_external_id",
+ environmentId: "environment_id",
+ externalId: "external_id",
+ id: "id",
+ paymentMethodType: "payment_method_type",
+ providerType: "metronome",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ planName: "plan_name",
+ products: [
+ {
+ billingScheme: "per_unit",
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currency: "currency",
+ environmentId: "environment_id",
+ externalId: "external_id",
+ id: "id",
+ interval: "interval",
+ name: "name",
+ packageSize: 1000000,
+ price: 1000000,
+ priceExternalId: "price_external_id",
+ priceId: "price_id",
+ priceTier: [{}],
+ providerType: "metronome",
+ quantity: 1.1,
+ subscriptionId: "subscription_id",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ usageType: "licensed",
+ },
+ ],
+ providerType: "metronome",
+ status: "status",
+ subscriptionExternalId: "subscription_external_id",
+ totalPrice: 1000000,
+ trialEnd: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
+ params: {
+ companyId: "company_id",
+ },
+ });
+ });
+
+ test("getBillingEntityChildSubscriptions (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(400)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getBillingEntityChildSubscriptions();
+ }).rejects.toThrow(Schematic.BadRequestError);
+ });
+
+ test("getBillingEntityChildSubscriptions (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(401)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getBillingEntityChildSubscriptions();
+ }).rejects.toThrow(Schematic.UnauthorizedError);
+ });
+
+ test("getBillingEntityChildSubscriptions (4)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(403)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getBillingEntityChildSubscriptions();
+ }).rejects.toThrow(Schematic.ForbiddenError);
+ });
+
+ test("getBillingEntityChildSubscriptions (5)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getBillingEntityChildSubscriptions();
+ }).rejects.toThrow(Schematic.NotFoundError);
+ });
+
+ test("getBillingEntityChildSubscriptions (6)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { error: "error" };
+
+ server
+ .mockEndpoint()
+ .get("/company-billing-entity-subscriptions")
+ .respondWith()
+ .statusCode(500)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.companies.getBillingEntityChildSubscriptions();
+ }).rejects.toThrow(Schematic.InternalServerError);
+ });
+
test("listCompanyMemberships (1)", async () => {
const server = mockServerPool.createServer();
const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl });
@@ -7587,9 +8083,11 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -7678,9 +8176,11 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -7840,6 +8340,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -7887,9 +8388,11 @@ describe("CompaniesClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -8083,6 +8586,7 @@ describe("CompaniesClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -8182,6 +8686,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -8231,9 +8736,11 @@ describe("CompaniesClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -8435,6 +8942,7 @@ describe("CompaniesClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
diff --git a/tests/wire/components.test.ts b/tests/wire/components.test.ts
index 8a30464e..40cfcd34 100644
--- a/tests/wire/components.test.ts
+++ b/tests/wire/components.test.ts
@@ -772,6 +772,20 @@ describe("ComponentsClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
current: true,
custom: true,
@@ -855,6 +869,7 @@ describe("ComponentsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -909,6 +924,20 @@ describe("ComponentsClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
current: true,
custom: true,
@@ -992,6 +1021,7 @@ describe("ComponentsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1055,6 +1085,7 @@ describe("ComponentsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1251,6 +1282,7 @@ describe("ComponentsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1418,10 +1450,25 @@ describe("ComponentsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -1447,6 +1494,7 @@ describe("ComponentsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -1526,8 +1574,10 @@ describe("ComponentsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -1628,9 +1678,11 @@ describe("ComponentsClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -1683,10 +1735,25 @@ describe("ComponentsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -1712,6 +1779,7 @@ describe("ComponentsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -1791,8 +1859,10 @@ describe("ComponentsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -1919,9 +1989,11 @@ describe("ComponentsClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -1974,11 +2046,13 @@ describe("ComponentsClient", () => {
currency: "currency",
customer_external_id: "customer_external_id",
due_date: "2024-01-15T09:30:00Z",
+ ending_balance: 1000000,
environment_id: "environment_id",
external_id: "external_id",
id: "id",
payment_method_external_id: "payment_method_external_id",
provider_type: "metronome",
+ starting_balance: 1000000,
status: "draft",
subscription_external_id: "subscription_external_id",
subtotal: 1000000,
@@ -2013,6 +2087,24 @@ describe("ComponentsClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2115,6 +2207,7 @@ describe("ComponentsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2169,6 +2262,24 @@ describe("ComponentsClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2271,6 +2382,7 @@ describe("ComponentsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2345,6 +2457,7 @@ describe("ComponentsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2549,6 +2662,7 @@ describe("ComponentsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2729,10 +2843,29 @@ describe("ComponentsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2766,6 +2899,13 @@ describe("ComponentsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -2860,8 +3000,10 @@ describe("ComponentsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2962,9 +3104,11 @@ describe("ComponentsClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -3017,10 +3161,29 @@ describe("ComponentsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -3054,6 +3217,13 @@ describe("ComponentsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -3148,8 +3318,10 @@ describe("ComponentsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -3276,9 +3448,11 @@ describe("ComponentsClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -3331,11 +3505,13 @@ describe("ComponentsClient", () => {
currency: "currency",
customerExternalId: "customer_external_id",
dueDate: new Date("2024-01-15T09:30:00.000Z"),
+ endingBalance: 1000000,
environmentId: "environment_id",
externalId: "external_id",
id: "id",
paymentMethodExternalId: "payment_method_external_id",
providerType: "metronome",
+ startingBalance: 1000000,
status: "draft",
subscriptionExternalId: "subscription_external_id",
subtotal: 1000000,
diff --git a/tests/wire/componentspublic.test.ts b/tests/wire/componentspublic.test.ts
index e402e37c..062f7a52 100644
--- a/tests/wire/componentspublic.test.ts
+++ b/tests/wire/componentspublic.test.ts
@@ -20,6 +20,20 @@ describe("ComponentspublicClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom: true,
description: "description",
@@ -102,6 +116,7 @@ describe("ComponentspublicClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -146,6 +161,20 @@ describe("ComponentspublicClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom: true,
description: "description",
@@ -228,6 +257,7 @@ describe("ComponentspublicClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -297,6 +327,24 @@ describe("ComponentspublicClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -398,6 +446,7 @@ describe("ComponentspublicClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -442,6 +491,24 @@ describe("ComponentspublicClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -543,6 +610,7 @@ describe("ComponentspublicClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: 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 7a4b9eed..5943da37 100644
--- a/tests/wire/credits.test.ts
+++ b/tests/wire/credits.test.ts
@@ -2492,7 +2492,7 @@ describe("CreditsClient", () => {
updated_at: "2024-01-15T09:30:00Z",
valid_from: "2024-01-15T09:30:00Z",
zeroed_out_date: "2024-01-15T09:30:00Z",
- zeroed_out_reason: "expired",
+ zeroed_out_reason: "customer_archived",
},
params: { key: "value" },
};
@@ -2555,7 +2555,7 @@ describe("CreditsClient", () => {
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
validFrom: new Date("2024-01-15T09:30:00.000Z"),
zeroedOutDate: new Date("2024-01-15T09:30:00.000Z"),
- zeroedOutReason: "expired",
+ zeroedOutReason: "customer_archived",
},
params: {
key: "value",
@@ -2720,7 +2720,7 @@ describe("CreditsClient", () => {
updated_at: "2024-01-15T09:30:00Z",
valid_from: "2024-01-15T09:30:00Z",
zeroed_out_date: "2024-01-15T09:30:00Z",
- zeroed_out_reason: "expired",
+ zeroed_out_reason: "customer_archived",
},
params: { key: "value" },
};
@@ -2788,7 +2788,7 @@ describe("CreditsClient", () => {
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
validFrom: new Date("2024-01-15T09:30:00.000Z"),
zeroedOutDate: new Date("2024-01-15T09:30:00.000Z"),
- zeroedOutReason: "expired",
+ zeroedOutReason: "customer_archived",
},
params: {
key: "value",
@@ -3130,7 +3130,7 @@ describe("CreditsClient", () => {
updated_at: "2024-01-15T09:30:00Z",
valid_from: "2024-01-15T09:30:00Z",
zeroed_out_date: "2024-01-15T09:30:00Z",
- zeroed_out_reason: "expired",
+ zeroed_out_reason: "customer_archived",
},
],
params: { company_id: "company_id", dir: "asc", limit: 1000000, offset: 1000000, order: "created_at" },
@@ -3198,7 +3198,7 @@ describe("CreditsClient", () => {
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
validFrom: new Date("2024-01-15T09:30:00.000Z"),
zeroedOutDate: new Date("2024-01-15T09:30:00.000Z"),
- zeroedOutReason: "expired",
+ zeroedOutReason: "customer_archived",
},
],
params: {
@@ -3488,7 +3488,7 @@ describe("CreditsClient", () => {
updated_at: "2024-01-15T09:30:00Z",
valid_from: "2024-01-15T09:30:00Z",
zeroed_out_date: "2024-01-15T09:30:00Z",
- zeroed_out_reason: "expired",
+ zeroed_out_reason: "customer_archived",
},
],
params: { credit_id: "credit_id", ids: ["ids"], limit: 1000000, offset: 1000000 },
@@ -3555,7 +3555,7 @@ describe("CreditsClient", () => {
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
validFrom: new Date("2024-01-15T09:30:00.000Z"),
zeroedOutDate: new Date("2024-01-15T09:30:00.000Z"),
- zeroedOutReason: "expired",
+ zeroedOutReason: "customer_archived",
},
],
params: {
@@ -4164,6 +4164,7 @@ describe("CreditsClient", () => {
{
auto_topup_amount: 1000000,
auto_topup_amount_type: "auto_topup_amount_type",
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_expiry_type: "duration",
auto_topup_expiry_unit: "billing_periods",
@@ -4171,6 +4172,7 @@ describe("CreditsClient", () => {
auto_topup_self_service: true,
auto_topup_threshold_credits: 1000000,
auto_topup_threshold_percent: 1000000,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit: {
burn_strategy: "expiration_priority",
@@ -4237,6 +4239,7 @@ describe("CreditsClient", () => {
{
autoTopupAmount: 1000000,
autoTopupAmountType: "auto_topup_amount_type",
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupExpiryType: "duration",
autoTopupExpiryUnit: "billing_periods",
@@ -4244,6 +4247,7 @@ describe("CreditsClient", () => {
autoTopupSelfService: true,
autoTopupThresholdCredits: 1000000,
autoTopupThresholdPercent: 1000000,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
credit: {
burnStrategy: "expiration_priority",
@@ -4404,6 +4408,7 @@ describe("CreditsClient", () => {
data: {
auto_topup_amount: 1000000,
auto_topup_amount_type: "auto_topup_amount_type",
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_expiry_type: "duration",
auto_topup_expiry_unit: "billing_periods",
@@ -4411,6 +4416,7 @@ describe("CreditsClient", () => {
auto_topup_self_service: true,
auto_topup_threshold_credits: 1000000,
auto_topup_threshold_percent: 1000000,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit: {
burn_strategy: "expiration_priority",
@@ -4491,6 +4497,7 @@ describe("CreditsClient", () => {
data: {
autoTopupAmount: 1000000,
autoTopupAmountType: "auto_topup_amount_type",
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupExpiryType: "duration",
autoTopupExpiryUnit: "billing_periods",
@@ -4498,6 +4505,7 @@ describe("CreditsClient", () => {
autoTopupSelfService: true,
autoTopupThresholdCredits: 1000000,
autoTopupThresholdPercent: 1000000,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
credit: {
burnStrategy: "expiration_priority",
@@ -4738,6 +4746,7 @@ describe("CreditsClient", () => {
data: {
auto_topup_amount: 1000000,
auto_topup_amount_type: "auto_topup_amount_type",
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_expiry_type: "duration",
auto_topup_expiry_unit: "billing_periods",
@@ -4745,6 +4754,7 @@ describe("CreditsClient", () => {
auto_topup_self_service: true,
auto_topup_threshold_credits: 1000000,
auto_topup_threshold_percent: 1000000,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit: {
burn_strategy: "expiration_priority",
@@ -4818,6 +4828,7 @@ describe("CreditsClient", () => {
data: {
autoTopupAmount: 1000000,
autoTopupAmountType: "auto_topup_amount_type",
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupExpiryType: "duration",
autoTopupExpiryUnit: "billing_periods",
@@ -4825,6 +4836,7 @@ describe("CreditsClient", () => {
autoTopupSelfService: true,
autoTopupThresholdCredits: 1000000,
autoTopupThresholdPercent: 1000000,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
credit: {
burnStrategy: "expiration_priority",
@@ -4981,6 +4993,7 @@ describe("CreditsClient", () => {
data: {
auto_topup_amount: 1000000,
auto_topup_amount_type: "auto_topup_amount_type",
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_expiry_type: "duration",
auto_topup_expiry_unit: "billing_periods",
@@ -4988,6 +5001,7 @@ describe("CreditsClient", () => {
auto_topup_self_service: true,
auto_topup_threshold_credits: 1000000,
auto_topup_threshold_percent: 1000000,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit: {
burn_strategy: "expiration_priority",
@@ -5065,6 +5079,7 @@ describe("CreditsClient", () => {
data: {
autoTopupAmount: 1000000,
autoTopupAmountType: "auto_topup_amount_type",
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupExpiryType: "duration",
autoTopupExpiryUnit: "billing_periods",
@@ -5072,6 +5087,7 @@ describe("CreditsClient", () => {
autoTopupSelfService: true,
autoTopupThresholdCredits: 1000000,
autoTopupThresholdPercent: 1000000,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
credit: {
burnStrategy: "expiration_priority",
@@ -5567,7 +5583,7 @@ describe("CreditsClient", () => {
to_grant_id: "to_grant_id",
usage_event_id: "usage_event_id",
usage_reason: "lease_hold",
- zeroed_out_reason: "expired",
+ zeroed_out_reason: "customer_archived",
},
],
params: {
@@ -5643,7 +5659,7 @@ describe("CreditsClient", () => {
toGrantId: "to_grant_id",
usageEventId: "usage_event_id",
usageReason: "lease_hold",
- zeroedOutReason: "expired",
+ zeroedOutReason: "customer_archived",
},
],
params: {
diff --git a/tests/wire/entitlements.test.ts b/tests/wire/entitlements.test.ts
index c4b06e48..df5da25a 100644
--- a/tests/wire/entitlements.test.ts
+++ b/tests/wire/entitlements.test.ts
@@ -20,6 +20,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -274,6 +275,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -595,6 +597,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -791,6 +794,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -936,6 +940,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1140,6 +1145,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1405,6 +1411,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1601,6 +1608,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -1741,6 +1749,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1945,6 +1954,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2166,6 +2176,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -2362,6 +2373,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -2505,6 +2517,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -2709,6 +2722,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -3239,6 +3253,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -3559,6 +3574,7 @@ describe("EntitlementsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
price_behavior: "credit_burndown",
quarterly_usage_based_price: {
@@ -3630,6 +3646,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -3987,6 +4004,13 @@ describe("EntitlementsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
priceBehavior: "credit_burndown",
quarterlyUsageBasedPrice: {
@@ -4417,6 +4441,7 @@ describe("EntitlementsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
price_behavior: "credit_burndown",
quarterly_usage_based_price: {
@@ -4669,6 +4694,13 @@ describe("EntitlementsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
priceBehavior: "credit_burndown",
quarterlyUsageBasedPrice: {
@@ -5129,6 +5161,7 @@ describe("EntitlementsClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -5420,6 +5453,7 @@ describe("EntitlementsClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -6081,6 +6115,7 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
params: {
@@ -6261,6 +6296,13 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
params: {
@@ -6541,6 +6583,7 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
params: { key: "value" },
};
@@ -6760,6 +6803,13 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
params: {
key: "value",
@@ -7084,6 +7134,7 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
params: { key: "value" },
};
@@ -7298,6 +7349,13 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
params: {
key: "value",
@@ -7578,6 +7636,7 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
params: { key: "value" },
};
@@ -7795,6 +7854,13 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
params: {
key: "value",
@@ -8235,6 +8301,7 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
params: { key: "value" },
};
@@ -8456,6 +8523,13 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
params: {
key: "value",
@@ -8797,6 +8871,7 @@ describe("EntitlementsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
issues: [{ code: "code", description: "description" }],
@@ -8842,6 +8917,13 @@ describe("EntitlementsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
issues: [
@@ -9838,6 +9920,10 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [
+ { id: "id", key: "key", value: 1000000 },
+ { id: "id", key: "key", value: 1000000 },
+ ],
},
price_behavior: "credit_burndown",
quarterly_usage_based_price: {
@@ -10768,6 +10854,10 @@ describe("EntitlementsClient", () => {
},
value_trait_id: "value_trait_id",
value_type: "boolean",
+ warning_tiers: [
+ { id: "id", key: "key", value: 1000000 },
+ { id: "id", key: "key", value: 1000000 },
+ ],
},
price_behavior: "credit_burndown",
quarterly_usage_based_price: {
@@ -11764,6 +11854,18 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
priceBehavior: "credit_burndown",
quarterlyUsageBasedPrice: {
@@ -12745,6 +12847,18 @@ describe("EntitlementsClient", () => {
},
valueTraitId: "value_trait_id",
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
priceBehavior: "credit_burndown",
quarterlyUsageBasedPrice: {
diff --git a/tests/wire/integrationsapi.test.ts b/tests/wire/integrationsapi.test.ts
index 7af7cc5c..2d9d820a 100644
--- a/tests/wire/integrationsapi.test.ts
+++ b/tests/wire/integrationsapi.test.ts
@@ -131,6 +131,7 @@ describe("IntegrationsapiClient", () => {
id: "id",
is_app_install: true,
is_connect_install: true,
+ last_webhook_received_at: "2024-01-15T09:30:00Z",
state: "active",
type: "clerk",
},
@@ -171,6 +172,7 @@ describe("IntegrationsapiClient", () => {
id: "id",
isAppInstall: true,
isConnectInstall: true,
+ lastWebhookReceivedAt: new Date("2024-01-15T09:30:00.000Z"),
state: "active",
type: "clerk",
},
diff --git a/tests/wire/planbundle.test.ts b/tests/wire/planbundle.test.ts
index 589ec510..e710730b 100644
--- a/tests/wire/planbundle.test.ts
+++ b/tests/wire/planbundle.test.ts
@@ -27,8 +27,10 @@ describe("PlanbundleClient", () => {
},
credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -51,6 +53,7 @@ describe("PlanbundleClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
plan: {
@@ -64,19 +67,6 @@ describe("PlanbundleClient", () => {
plan_type: "plan",
updated_at: "2024-01-15T09:30:00Z",
},
- traits: [
- {
- account_id: "account_id",
- created_at: "2024-01-15T09:30:00Z",
- environment_id: "environment_id",
- id: "id",
- plan_id: "plan_id",
- plan_type: "plan_type",
- trait_id: "trait_id",
- trait_value: "trait_value",
- updated_at: "2024-01-15T09:30:00Z",
- },
- ],
},
params: { key: "value" },
};
@@ -115,8 +105,10 @@ describe("PlanbundleClient", () => {
},
creditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -143,6 +135,13 @@ describe("PlanbundleClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
plan: {
@@ -156,19 +155,6 @@ describe("PlanbundleClient", () => {
planType: "plan",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
- traits: [
- {
- accountId: "account_id",
- createdAt: new Date("2024-01-15T09:30:00.000Z"),
- environmentId: "environment_id",
- id: "id",
- planId: "plan_id",
- planType: "plan_type",
- traitId: "trait_id",
- traitValue: "trait_value",
- updatedAt: new Date("2024-01-15T09:30:00.000Z"),
- },
- ],
},
params: {
key: "value",
@@ -343,8 +329,10 @@ describe("PlanbundleClient", () => {
},
credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -367,6 +355,7 @@ describe("PlanbundleClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
plan: {
@@ -380,19 +369,6 @@ describe("PlanbundleClient", () => {
plan_type: "plan",
updated_at: "2024-01-15T09:30:00Z",
},
- traits: [
- {
- account_id: "account_id",
- created_at: "2024-01-15T09:30:00Z",
- environment_id: "environment_id",
- id: "id",
- plan_id: "plan_id",
- plan_type: "plan_type",
- trait_id: "trait_id",
- trait_value: "trait_value",
- updated_at: "2024-01-15T09:30:00Z",
- },
- ],
},
params: { key: "value" },
};
@@ -431,8 +407,10 @@ describe("PlanbundleClient", () => {
},
creditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -459,6 +437,13 @@ describe("PlanbundleClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
plan: {
@@ -472,19 +457,6 @@ describe("PlanbundleClient", () => {
planType: "plan",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
- traits: [
- {
- accountId: "account_id",
- createdAt: new Date("2024-01-15T09:30:00.000Z"),
- environmentId: "environment_id",
- id: "id",
- planId: "plan_id",
- planType: "plan_type",
- traitId: "trait_id",
- traitValue: "trait_value",
- updatedAt: new Date("2024-01-15T09:30:00.000Z"),
- },
- ],
},
params: {
key: "value",
@@ -659,8 +631,10 @@ describe("PlanbundleClient", () => {
},
credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -683,6 +657,7 @@ describe("PlanbundleClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
plan: {
@@ -696,19 +671,6 @@ describe("PlanbundleClient", () => {
plan_type: "plan",
updated_at: "2024-01-15T09:30:00Z",
},
- traits: [
- {
- account_id: "account_id",
- created_at: "2024-01-15T09:30:00Z",
- environment_id: "environment_id",
- id: "id",
- plan_id: "plan_id",
- plan_type: "plan_type",
- trait_id: "trait_id",
- trait_value: "trait_value",
- updated_at: "2024-01-15T09:30:00Z",
- },
- ],
},
params: { key: "value" },
};
@@ -747,8 +709,10 @@ describe("PlanbundleClient", () => {
},
creditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -775,6 +739,13 @@ describe("PlanbundleClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
plan: {
@@ -788,19 +759,6 @@ describe("PlanbundleClient", () => {
planType: "plan",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
- traits: [
- {
- accountId: "account_id",
- createdAt: new Date("2024-01-15T09:30:00.000Z"),
- environmentId: "environment_id",
- id: "id",
- planId: "plan_id",
- planType: "plan_type",
- traitId: "trait_id",
- traitValue: "trait_value",
- updatedAt: new Date("2024-01-15T09:30:00.000Z"),
- },
- ],
},
params: {
key: "value",
diff --git a/tests/wire/plangroups.test.ts b/tests/wire/plangroups.test.ts
index 52dea07a..cd7c1408 100644
--- a/tests/wire/plangroups.test.ts
+++ b/tests/wire/plangroups.test.ts
@@ -20,6 +20,20 @@ describe("PlangroupsClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
features: [
@@ -200,11 +214,26 @@ describe("PlangroupsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom_plan_config: {
cta_text: "cta_text",
@@ -235,6 +264,7 @@ describe("PlangroupsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -314,8 +344,10 @@ describe("PlangroupsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -439,11 +471,26 @@ describe("PlangroupsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom_plan_config: {
cta_text: "cta_text",
@@ -474,6 +521,7 @@ describe("PlangroupsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -553,8 +601,10 @@ describe("PlangroupsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -680,11 +730,26 @@ describe("PlangroupsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom_plan_config: {
cta_text: "cta_text",
@@ -715,6 +780,7 @@ describe("PlangroupsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -794,8 +860,10 @@ describe("PlangroupsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -910,6 +978,20 @@ describe("PlangroupsClient", () => {
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
features: [
@@ -1073,11 +1155,26 @@ describe("PlangroupsClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
compatible_plan_ids: ["compatible_plan_ids"],
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
custom_plan_config: {
cta_text: "cta_text",
@@ -1108,6 +1205,7 @@ describe("PlangroupsClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -1187,8 +1285,10 @@ describe("PlangroupsClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -1312,6 +1412,24 @@ describe("PlangroupsClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1515,11 +1633,30 @@ describe("PlangroupsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1558,6 +1695,13 @@ describe("PlangroupsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -1652,8 +1796,10 @@ describe("PlangroupsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -1777,11 +1923,30 @@ describe("PlangroupsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1820,6 +1985,13 @@ describe("PlangroupsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -1914,8 +2086,10 @@ describe("PlangroupsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2041,11 +2215,30 @@ describe("PlangroupsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2084,6 +2277,13 @@ describe("PlangroupsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -2178,8 +2378,10 @@ describe("PlangroupsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2306,6 +2508,24 @@ describe("PlangroupsClient", () => {
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2488,11 +2708,30 @@ describe("PlangroupsClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
compatiblePlanIds: ["compatible_plan_ids"],
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2531,6 +2770,13 @@ describe("PlangroupsClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -2625,8 +2871,10 @@ describe("PlangroupsClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: 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 b6ea8578..dd777921 100644
--- a/tests/wire/plans.test.ts
+++ b/tests/wire/plans.test.ts
@@ -18,6 +18,7 @@ describe("PlansClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -65,9 +66,11 @@ describe("PlansClient", () => {
created_at: "2024-01-15T09:30:00Z",
currency: "currency",
customer_external_id: "customer_external_id",
+ ending_balance: 1000000,
environment_id: "environment_id",
id: "id",
provider_type: "metronome",
+ starting_balance: 1000000,
subtotal: 1000000,
updated_at: "2024-01-15T09:30:00Z",
},
@@ -261,6 +264,7 @@ describe("PlansClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -357,6 +361,7 @@ describe("PlansClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -406,9 +411,11 @@ describe("PlansClient", () => {
createdAt: new Date("2024-01-15T09:30:00.000Z"),
currency: "currency",
customerExternalId: "customer_external_id",
+ endingBalance: 1000000,
environmentId: "environment_id",
id: "id",
providerType: "metronome",
+ startingBalance: 1000000,
subtotal: 1000000,
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
},
@@ -610,6 +617,7 @@ describe("PlansClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -1370,10 +1378,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -1400,6 +1423,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -1479,8 +1503,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -1630,10 +1656,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -1668,6 +1713,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -1762,8 +1814,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2025,10 +2079,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -2054,6 +2123,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -2133,8 +2203,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -2301,10 +2373,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2338,6 +2429,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -2432,8 +2530,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -2650,10 +2750,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -2680,6 +2795,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -2759,8 +2875,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -2910,10 +3028,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -2948,6 +3085,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -3042,8 +3186,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -3306,10 +3452,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -3336,6 +3497,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -3415,8 +3577,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -3557,10 +3721,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -3595,6 +3778,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -3689,8 +3879,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -3885,10 +4077,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -3915,6 +4122,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -3994,8 +4202,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -4143,10 +4353,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -4181,6 +4410,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -4275,8 +4511,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -4790,10 +5028,25 @@ describe("PlansClient", () => {
charge_type: "free",
company_count: 1000000,
company_id: "company_id",
+ company_logo_url: "company_logo_url",
company_name: "company_name",
controlled_by: "metronome",
copied_from_plan_id: "copied_from_plan_id",
created_at: "2024-01-15T09:30:00Z",
+ credits: [
+ {
+ burn_strategy: "expiration_priority",
+ cost_editable: true,
+ created_at: "2024-01-15T09:30:00Z",
+ currency_prices: [{ currency: "currency" }],
+ default_expiry_unit: "billing_periods",
+ default_rollover_policy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updated_at: "2024-01-15T09:30:00Z",
+ },
+ ],
currency_prices: [{ currency: "currency" }],
description: "description",
draft_version: {
@@ -4820,6 +5073,7 @@ describe("PlansClient", () => {
rule_id: "rule_id",
updated_at: "2024-01-15T09:30:00Z",
value_type: "boolean",
+ warning_tiers: [{ id: "id", key: "key", value: 1000000 }],
},
],
features: [
@@ -4899,8 +5153,10 @@ describe("PlansClient", () => {
id: "id",
included_credit_grants: [
{
+ auto_topup_availability: "off",
auto_topup_enabled: true,
auto_topup_self_service: true,
+ can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_id: "credit_id",
@@ -5052,10 +5308,29 @@ describe("PlansClient", () => {
chargeType: "free",
companyCount: 1000000,
companyId: "company_id",
+ companyLogoUrl: "company_logo_url",
companyName: "company_name",
controlledBy: "metronome",
copiedFromPlanId: "copied_from_plan_id",
createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ credits: [
+ {
+ burnStrategy: "expiration_priority",
+ costEditable: true,
+ createdAt: new Date("2024-01-15T09:30:00.000Z"),
+ currencyPrices: [
+ {
+ currency: "currency",
+ },
+ ],
+ defaultExpiryUnit: "billing_periods",
+ defaultRolloverPolicy: "expire",
+ description: "description",
+ id: "id",
+ name: "name",
+ updatedAt: new Date("2024-01-15T09:30:00.000Z"),
+ },
+ ],
currencyPrices: [
{
currency: "currency",
@@ -5090,6 +5365,13 @@ describe("PlansClient", () => {
ruleId: "rule_id",
updatedAt: new Date("2024-01-15T09:30:00.000Z"),
valueType: "boolean",
+ warningTiers: [
+ {
+ id: "id",
+ key: "key",
+ value: 1000000,
+ },
+ ],
},
],
features: [
@@ -5184,8 +5466,10 @@ describe("PlansClient", () => {
id: "id",
includedCreditGrants: [
{
+ autoTopupAvailability: "off",
autoTopupEnabled: true,
autoTopupSelfService: true,
+ canBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditId: "credit_id",
@@ -5447,6 +5731,7 @@ describe("PlansClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -5643,6 +5928,7 @@ describe("PlansClient", () => {
{
billing_credit_auto_topup_enabled: true,
billing_credit_auto_topup_self_service: true,
+ billing_credit_can_buy_bundles: true,
created_at: "2024-01-15T09:30:00Z",
credit_amount: 1000000,
credit_description: "credit_description",
@@ -5738,6 +6024,7 @@ describe("PlansClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
@@ -5942,6 +6229,7 @@ describe("PlansClient", () => {
{
billingCreditAutoTopupEnabled: true,
billingCreditAutoTopupSelfService: true,
+ billingCreditCanBuyBundles: true,
createdAt: new Date("2024-01-15T09:30:00.000Z"),
creditAmount: 1000000,
creditDescription: "credit_description",
diff --git a/yarn.lock b/yarn.lock
index 12aea7e2..6373b8e1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -338,30 +338,30 @@
dependencies:
statuses "^2.0.1"
-"@cloudflare/workerd-darwin-64@1.20260625.1":
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260625.1.tgz#848268aaf751867b3ce290560453b37db7ce0751"
- integrity sha512-naCfBv0WnnTQIQPTniqMoUlklOIFjrAcSn1X+IAOhY8aFLF/xGYtFjs1eEE8sFib3ZuChGGpU23FFORVczqr0A==
-
-"@cloudflare/workerd-darwin-arm64@1.20260625.1":
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260625.1.tgz#642cb1b30e17bdad4ec2ff620d5ed2f064006c93"
- integrity sha512-jmH6zjp6Wrux46+qtFwDwrj+vd7s5bdwEqeGvdnwE0a4IEeAhKs0L42HQOyID+g5lkrHq9m55+AbhtmRAm63Pw==
-
-"@cloudflare/workerd-linux-64@1.20260625.1":
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260625.1.tgz#2c8257889ffc50ab50ffcdb09a1360419e510bd7"
- integrity sha512-MiQkpA/dX8d83Zp64pzHUKfd6ca4cvwxnNobSP6CnXvfESvnNI9pfa+nfwnParla36sPmnYntNkjR7NjRuDeKQ==
-
-"@cloudflare/workerd-linux-arm64@1.20260625.1":
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260625.1.tgz#208697b86ae4018c495232df9c039c6f08582b5d"
- integrity sha512-LxxW7Qv60Xvv37+w6gUSDpYZziyqMy+cZWd9IvSA5ehVgKAxmzEaYPMiSZlxk32nbIWL9u/tfjXYCOKJ4Lo+XQ==
-
-"@cloudflare/workerd-windows-64@1.20260625.1":
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260625.1.tgz#3731787487ae5ea731f71ace736ff5f10bcb76ee"
- integrity sha512-LH6iIX1HHaTwVKV5VokDxxUErXJzQoNZFRwVm7Vx/3fB/ApcTcRCUaMqcxI4as94jEUqg+pmX5czOndiveohow==
+"@cloudflare/workerd-darwin-64@1.20260708.1":
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260708.1.tgz#fc054b7c677017f64c73ef7de536d79b4421f6b6"
+ integrity sha512-HXFCvhS1wpg3uXO0CLUwmwC41i2loM5FSK69EUchOBpmYBAXxT1oHLm6EOA5lqhTk5Mu9kjRiQYxa1GwKPwfJg==
+
+"@cloudflare/workerd-darwin-arm64@1.20260708.1":
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260708.1.tgz#8fd30a272f7bd89cd304bf9879b4d0921bf6678a"
+ integrity sha512-JVlJaKDoRTVKSroHIlf8g3UCPjKj4iDbMZE2CNYht5qQ+2rL0FAUiVlV82G3BqKnnw9kHYnnsMzC08b9zVtdzA==
+
+"@cloudflare/workerd-linux-64@1.20260708.1":
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260708.1.tgz#df73b5f2fff999c36b27d8978bc929fec6772c21"
+ integrity sha512-3daE60YdD7YX0Jtuzc9DE/r/qMkmx8ZvHTkF8Mzmp3F5tbzlV0DAzmu5PFUPF2WuvtKbAhZKbvC2cHmWpQYxnA==
+
+"@cloudflare/workerd-linux-arm64@1.20260708.1":
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260708.1.tgz#0eb477348030871c6847d6a8fac7bed99e8158d0"
+ integrity sha512-VLdNYOx5Hj+9C6isy0ACWZsbMtSxex2DIJWEe7cZxUdlphZ58ZT8zxNXK8yunFiowd34hn3VwGMopdvdj8lvmA==
+
+"@cloudflare/workerd-windows-64@1.20260708.1":
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260708.1.tgz#c78bbada5f66261ca3722f518d0213fb910dc6be"
+ integrity sha512-bC/aSAwLy16Vjo24i9XU3aWH+eRgz7NeR5xPKavGbembO18ZywYTQbXh14eXtY6fAqN3RzRG8psijTdhX4xydA==
"@cspotcode/source-map-support@0.8.1":
version "0.8.1"
@@ -371,9 +371,9 @@
"@jridgewell/trace-mapping" "0.3.9"
"@emnapi/runtime@^1.7.0":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.11.1.tgz#58f1f3d5d81a9b12f793ab688c96371901027c24"
- integrity sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.11.2.tgz#eb22f04d76febfdf4f87fdaff54c8a53f6bf0dbd"
+ integrity sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==
dependencies:
tslib "^2.4.0"
@@ -1168,9 +1168,9 @@
form-data "^4.0.4"
"@types/node@*":
- version "26.0.1"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-26.0.1.tgz#4a60e2c7a6d68bd261e265f8983bfe1601263ce3"
- integrity sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==
+ version "26.1.1"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-26.1.1.tgz#bad758d601e97d6cf457d204ee76a35fce7bd119"
+ integrity sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==
dependencies:
undici-types "~8.3.0"
@@ -1182,9 +1182,9 @@
undici-types "~6.21.0"
"@types/readable-stream@^4.0.23":
- version "4.0.23"
- resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.23.tgz#fcd0f7472f45ceb43154f08f0083ccd1c76e53ce"
- integrity sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig==
+ version "4.0.24"
+ resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.24.tgz#7b2431bfc1367d05c53598ad36094b044726d442"
+ integrity sha512-NRvUNC/JFGPJvqdAfEve8oginbM6V08u5NzLWpG8MwA2kTPOLnqk+wpwuPT+mp3aUsxyuT6m2gnrPuHYCruzEg==
dependencies:
"@types/node" "*"
@@ -1538,15 +1538,15 @@ base64-js@^1.3.1:
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
-baseline-browser-mapping@^2.10.38:
- version "2.10.40"
- resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.40.tgz#f372c8eb36ff4ad0b5e7ae467014abef124554ba"
- integrity sha512-BSSLZ9/Cjjv7Gtj5B68ZzXcXUg8iOf3fme+FCuh8rC/Go+Kmh8cox7M3A8dolou16s64QjLPOSdngh7GxXvkSw==
+baseline-browser-mapping@^2.10.42:
+ version "2.10.43"
+ resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz#7b5d11590ce5acdbe4859443e3c940e81ce8c02d"
+ integrity sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==
brace-expansion@^1.1.7:
- version "1.1.15"
- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.15.tgz#a6d90d54067236e5f42570a3b7378d594d9b7738"
- integrity sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==
+ version "1.1.16"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.16.tgz#723d3a30c0558c225abc9fc479a73e14e26c3c2f"
+ integrity sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
@@ -1559,14 +1559,14 @@ braces@^3.0.3:
fill-range "^7.1.1"
browserslist@^4.24.0, browserslist@^4.28.1:
- version "4.28.4"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.4.tgz#dd8b8167a32845ff5f8cd6ce13f5abba16cd04c9"
- integrity sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==
- dependencies:
- baseline-browser-mapping "^2.10.38"
- caniuse-lite "^1.0.30001799"
- electron-to-chromium "^1.5.376"
- node-releases "^2.0.48"
+ version "4.28.6"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.6.tgz#7cf83afcd69c55fde6fb2dcc5039ff0f4ba42610"
+ integrity sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==
+ dependencies:
+ baseline-browser-mapping "^2.10.42"
+ caniuse-lite "^1.0.30001803"
+ electron-to-chromium "^1.5.389"
+ node-releases "^2.0.51"
update-browserslist-db "^1.2.3"
bs-logger@^0.2.6:
@@ -1619,10 +1619,10 @@ camelcase@^6.2.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
-caniuse-lite@^1.0.30001799:
- version "1.0.30001800"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001800.tgz#b896c773e1c39400809415162bb5320371291b36"
- integrity sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==
+caniuse-lite@^1.0.30001803:
+ version "1.0.30001805"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001805.tgz#78d5d5968a69b7ff81af87a96d7ddc7ea6670b1e"
+ integrity sha512-52noaS3DubycKSXaU30TwPGIp+POyQSUVa5jBEq3vkRkY0kjyb3LQgvhU6WGyCcyXqVLWO0Cw0Q6BSdD0kUfVA==
chalk@^4.0.0, chalk@^4.1.0:
version "4.1.2"
@@ -1831,10 +1831,10 @@ dunder-proto@^1.0.1:
es-errors "^1.3.0"
gopd "^1.2.0"
-electron-to-chromium@^1.5.376:
- version "1.5.382"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.382.tgz#e76f05d3ec337524b9c61761ebbc16fe91ecf5b4"
- integrity sha512-8ETaWbV6SZOrno+G93Ffd9ENsMtetqdnqj4nlfxFW90Sm5GgnuV28Kf62hqQVD6VUgzm7qFQKsTsAPmeUiU3Ug==
+electron-to-chromium@^1.5.389:
+ version "1.5.389"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.389.tgz#538be9ebec78026d4daba6be321ab854dfac2a8f"
+ integrity sha512-cEto7aeOqBfU1D+c5py5pE+ooscKE75JifxLBdFUZsqAxRS6y7kebtxAZvICszSl05gPjYHDTjY+lXpyGvpJbg==
emittery@^0.13.1:
version "0.13.1"
@@ -1847,9 +1847,9 @@ emoji-regex@^8.0.0:
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
enhanced-resolve@^5.22.2:
- version "5.24.1"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.24.1.tgz#b2439adf5d31d7e4764de1f9ecf942d6cd3fc874"
- integrity sha512-7DdUaTjmNwMcH2gLr1qycesKII3BK4RLy/mdAb7x10Lq7bR4aNKHt1BR1ZALSv0rPM/hF5wYF0PhGop/rJm8vw==
+ version "5.24.2"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.24.2.tgz#f25d703a24431cb1e02f944adb74aefa4fcb8d7e"
+ integrity sha512-rpsZEGT1jFuve6QlpyRp9ckQ+kN61hvF9BzCPyMdaKTm8UJce96KBn3sorXOFXlzjPrs3Vc4T1NsSroZ3PxlFw==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.3.3"
@@ -1882,9 +1882,9 @@ es-errors@^1.3.0:
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
es-module-lexer@^2.1.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.2.0.tgz#fe824f12e3f28bde741bb572b5a182786eaf3764"
- integrity sha512-3lGxdTXCLfe1MYfTz1y2ksAAUM4NAOP6rPEjxGJVKO7TZ5+tvHCaQWGpC4Y3IXvW3ece0Cz1cIP4FWBxOnGCTQ==
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.3.1.tgz#5bf2df06999dbbe5f006a5f46a11fb9f5b7b391b"
+ integrity sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==
es-object-atoms@^1.0.0, es-object-atoms@^1.1.1:
version "1.1.2"
@@ -2939,14 +2939,14 @@ mimic-fn@^2.1.0:
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
miniflare@^4.20260421.0:
- version "4.20260625.0"
- resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-4.20260625.0.tgz#22d2a9494b6c8f52f64ba40fb65e254933491ed4"
- integrity sha512-3kKXwRUObJsnBYPBgR0NiNZYKF/yv8GFyha1cx2EeAEraxNODgRVcyeRo+F1ok1tg5Mg7iUpOWSkknQTHuFhwA==
+ version "4.20260708.1"
+ resolved "https://registry.yarnpkg.com/miniflare/-/miniflare-4.20260708.1.tgz#729780313777ff90f71dcd461977a451415ffd92"
+ integrity sha512-c94O9zRDISdqO18EHt6l0iF/fWgWt8p18PJvRsA/L/NJZ9Cfke3s/F5Blg1XXF7WDutVRzWVWy8Vy4LaT5ifsA==
dependencies:
"@cspotcode/source-map-support" "0.8.1"
sharp "0.34.5"
undici "7.28.0"
- workerd "1.20260625.1"
+ workerd "1.20260708.1"
ws "8.21.0"
youch "4.1.0-beta.10"
@@ -3029,10 +3029,10 @@ node-int64@^0.4.0:
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
-node-releases@^2.0.48:
- version "2.0.50"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.50.tgz#597197a852071ce42fc2550e58e223242bcba969"
- integrity sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==
+node-releases@^2.0.51:
+ version "2.0.51"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.51.tgz#cdc08433577f5b32ad01694481726e22eeb54aef"
+ integrity sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==
normalize-path@^3.0.0:
version "3.0.0"
@@ -3149,9 +3149,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==
picomatch@^4.0.0:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589"
- integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.5.tgz#51ea57a17d86f605f81039595fbc40ed06a55fab"
+ integrity sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==
pirates@^4.0.4:
version "4.0.7"
@@ -3516,9 +3516,9 @@ tapable@^2.3.0, tapable@^2.3.3:
integrity sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==
terser@^5.31.1:
- version "5.48.0"
- resolved "https://registry.yarnpkg.com/terser/-/terser-5.48.0.tgz#8b391171cfbb7ac4a88f9f04ba1cfabc54f643db"
- integrity sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==
+ version "5.49.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.49.0.tgz#30b341fdf70cfc98486965125ae660fda8403670"
+ integrity sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==
dependencies:
"@jridgewell/source-map" "^0.3.3"
acorn "^8.15.0"
@@ -3534,17 +3534,17 @@ test-exclude@^6.0.0:
glob "^7.1.4"
minimatch "^3.0.4"
-tldts-core@^7.4.5:
- version "7.4.5"
- resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.5.tgz#4d1a77adbf274206be79e9d5fd602089a4e99c72"
- integrity sha512-pGrwzZDvPwKe+7NNUqAunb6rqTfynr0VOUhCMdqbu5xlvNiszsAJygRzwvpVycdzejlbpY+SWJOn+s75Og7FEA==
+tldts-core@^7.4.8:
+ version "7.4.8"
+ resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.8.tgz#c729aee4ff9d3670741193682a98e25a3d780dd9"
+ integrity sha512-c1P7u0EhACHj7lPy4MJm8iTFEU8+nB0LCtddH0fhP7noaVoXAqafMtOOeX+ulpuPBqnrRgRhw494RICT3mbhnw==
tldts@^7.0.5:
- version "7.4.5"
- resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.5.tgz#19648239527391393b49f0ae5eccc418f638deec"
- integrity sha512-RfEzKWcq5fHUOFq7J3rl3Oz6ylKGtcHqUznzj4EcXsxLSIjJcvpbXAQtWGeJQ0xKnimR5e0Cn+cn9TssfMzm+g==
+ version "7.4.8"
+ resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.8.tgz#f2edc0d81483ea76c45827d642ccd535a3a7a4f7"
+ integrity sha512-htwgN/8KRB3z3vnC0BOETVh2m499g5GmyTK9Wq5JBLX3FNz6tSBveAd+fQhzy9hkjif8vy2jwDMR1sGhLtZl2A==
dependencies:
- tldts-core "^7.4.5"
+ tldts-core "^7.4.8"
tmpl@1.0.5:
version "1.0.5"
@@ -3569,9 +3569,9 @@ tough-cookie@^4.1.2:
url-parse "^1.5.3"
tough-cookie@^6.0.0:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.1.tgz#a495f833836609ed983c19bc65639cfbceb54c76"
- integrity sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.2.tgz#7b1f22fcf2daf06c4ff9d53ec1845f44c6627062"
+ integrity sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==
dependencies:
tldts "^7.0.5"
@@ -3718,14 +3718,14 @@ webidl-conversions@^7.0.0:
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
webpack-sources@^3.5.0:
- version "3.5.0"
- resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.5.0.tgz#87bf7f5801a4e985b1f1c92b64b9620a02f76d08"
- integrity sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ==
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.5.1.tgz#76c2418486dcc02b2aa0694c104176c2858fe84a"
+ integrity sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==
webpack@^5.105.4:
- version "5.108.3"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.108.3.tgz#39be3baba294fa9d93487199b8c7e3ce742d3498"
- integrity sha512-hOpaCHmQVVY66IVTjofnH14IgSdmod2aquSGHGuYig/OIdWge01Hk2Wt988DZcwXumFUT4+FvJY5N+ikl8o/ww==
+ version "5.108.4"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.108.4.tgz#141818a411662773a0bb32dc5536acc5409943b7"
+ integrity sha512-yur8LyJoeiWh47dErD+Ok7vlbmDsJ3UbbRPAoxbGJ54WpE2y5yVo5G/inUzujnYgw3tPmBRdn+G7PoxXaYC33w==
dependencies:
"@types/estree" "^1.0.8"
"@types/json-schema" "^7.0.15"
@@ -3790,16 +3790,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.20260625.1:
- version "1.20260625.1"
- resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20260625.1.tgz#0cd4780ee3f2182c1680a7dffd9742eee076504b"
- integrity sha512-GApQvFX52SDM6L4u0+RRnUDB1wJOnEwoXjinkmOPtIyofWBxrlZckdegJSYc1leg++lLZ3+DQ4zMVmBqYVtzfA==
+workerd@1.20260708.1:
+ version "1.20260708.1"
+ resolved "https://registry.yarnpkg.com/workerd/-/workerd-1.20260708.1.tgz#cde1642ccb75999aae9f264d10e700f6c5998d74"
+ integrity sha512-WAK+Kt/VVCSldH2qSr8lx46XCJ4Q+bdlHNaFqUtOHthBEIB8C1N8HVW+VOLrxDoTCk0NGNv0zajnBeQK4JOB9w==
optionalDependencies:
- "@cloudflare/workerd-darwin-64" "1.20260625.1"
- "@cloudflare/workerd-darwin-arm64" "1.20260625.1"
- "@cloudflare/workerd-linux-64" "1.20260625.1"
- "@cloudflare/workerd-linux-arm64" "1.20260625.1"
- "@cloudflare/workerd-windows-64" "1.20260625.1"
+ "@cloudflare/workerd-darwin-64" "1.20260708.1"
+ "@cloudflare/workerd-darwin-arm64" "1.20260708.1"
+ "@cloudflare/workerd-linux-64" "1.20260708.1"
+ "@cloudflare/workerd-linux-arm64" "1.20260708.1"
+ "@cloudflare/workerd-windows-64" "1.20260708.1"
wrap-ansi@^6.2.0:
version "6.2.0"