@openmeter/client 1.0.0-beta-287990b08135 → 1.0.0-beta-50ba5fa8d739

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -309,19 +309,21 @@ The full call path, HTTP route, and a short description are listed below.
309
309
 
310
310
  ### Subscriptions
311
311
 
312
- | Method | HTTP | Description |
313
- | -------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
314
- | `client.subscriptions.create` | `POST /openmeter/subscriptions` | Create subscription |
315
- | `client.subscriptions.list` | `GET /openmeter/subscriptions` | List subscriptions |
316
- | `client.subscriptions.get` | `GET /openmeter/subscriptions/{subscriptionId}` | Get subscription |
317
- | `client.subscriptions.cancel` | `POST /openmeter/subscriptions/{subscriptionId}/cancel` | Cancels the subscription. Will result in a scheduling conflict if there are other subscriptions scheduled to start after the cancelation time. |
318
- | `client.subscriptions.unscheduleCancelation` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation` | Unschedules the subscription cancelation. |
319
- | `client.subscriptions.change` | `POST /openmeter/subscriptions/{subscriptionId}/change` | Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes. |
320
- | `client.subscriptions.edit` | `POST /openmeter/subscriptions/{subscriptionId}/edit` | Edits a running subscription by applying an ordered batch of customizations (adding or removing items, adding, removing, or stretching phases, or unscheduling a pending edit). The changes may take effect immediately or at the next billing cycle. Subscriptions that have add-ons cannot be edited. |
321
- | `client.subscriptions.createAddon` | `POST /openmeter/subscriptions/{subscriptionId}/addons` | Add add-on to a subscription. |
322
- | `client.subscriptions.listAddons` | `GET /openmeter/subscriptions/{subscriptionId}/addons` | List the add-ons of a subscription. |
323
- | `client.subscriptions.getAddon` | `GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Get an add-on association for a subscription. |
324
- | `client.subscriptions.updateAddon` | `PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Update a subscription add-on. Only the quantity is mutable; the timing controls when the new quantity takes effect. A new entry is appended to the add-on's timeline. |
312
+ | Method | HTTP | Description |
313
+ | -------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
314
+ | `client.subscriptions.create` | `POST /openmeter/subscriptions` | Create subscription |
315
+ | `client.subscriptions.list` | `GET /openmeter/subscriptions` | List subscriptions |
316
+ | `client.subscriptions.get` | `GET /openmeter/subscriptions/{subscriptionId}` | Get subscription |
317
+ | `client.subscriptions.cancel` | `POST /openmeter/subscriptions/{subscriptionId}/cancel` | Cancels the subscription. Will result in a scheduling conflict if there are other subscriptions scheduled to start after the cancelation time. |
318
+ | `client.subscriptions.unscheduleCancelation` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation` | Unschedules the subscription cancelation. |
319
+ | `client.subscriptions.unschedule` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule` | Deletes a scheduled subscription that has not yet become active, removing it and resolving any scheduling conflict it was holding. This is distinct from canceling: cancel ends a running subscription, whereas unscheduling removes a not-yet-active one. Only scheduled subscriptions can be unscheduled; unscheduling an active or already-started subscription is rejected. |
320
+ | `client.subscriptions.restore` | `POST /openmeter/subscriptions/{subscriptionId}/restore` | Restores the subscription by deleting any later-scheduled successor subscriptions and continuing this one indefinitely. This is the inverse of a future-dated change, which schedules a successor. Restore is not available when multi-subscription is enabled. |
321
+ | `client.subscriptions.change` | `POST /openmeter/subscriptions/{subscriptionId}/change` | Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes. |
322
+ | `client.subscriptions.edit` | `POST /openmeter/subscriptions/{subscriptionId}/edit` | Edits a running subscription by applying an ordered batch of customizations (adding or removing items, adding, removing, or stretching phases, or unscheduling a pending edit). The changes may take effect immediately or at the next billing cycle. Subscriptions that have add-ons cannot be edited. |
323
+ | `client.subscriptions.createAddon` | `POST /openmeter/subscriptions/{subscriptionId}/addons` | Add add-on to a subscription. |
324
+ | `client.subscriptions.listAddons` | `GET /openmeter/subscriptions/{subscriptionId}/addons` | List the add-ons of a subscription. |
325
+ | `client.subscriptions.getAddon` | `GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Get an add-on association for a subscription. |
326
+ | `client.subscriptions.updateAddon` | `PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Update a subscription add-on. Only the quantity is mutable; the timing controls when the new quantity takes effect. A new entry is appended to the add-on's timeline. |
325
327
 
326
328
  ### Apps
327
329
 
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type Result, type RequestOptions } from '../lib/types.js';
3
- import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
3
+ import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
4
4
  /**
5
5
  * Create subscription
6
6
  *
@@ -36,6 +36,29 @@ export declare function cancelSubscription(client: Client, req: CancelSubscripti
36
36
  * POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation
37
37
  */
38
38
  export declare function unscheduleCancelation(client: Client, req: UnscheduleCancelationRequest, options?: RequestOptions): Promise<Result<UnscheduleCancelationResponse>>;
39
+ /**
40
+ * Unschedule subscription
41
+ *
42
+ * Deletes a scheduled subscription that has not yet become active, removing it and
43
+ * resolving any scheduling conflict it was holding. This is distinct from
44
+ * canceling: cancel ends a running subscription, whereas unscheduling removes a
45
+ * not-yet-active one. Only scheduled subscriptions can be unscheduled;
46
+ * unscheduling an active or already-started subscription is rejected.
47
+ *
48
+ * POST /openmeter/subscriptions/{subscriptionId}/unschedule
49
+ */
50
+ export declare function unscheduleSubscription(client: Client, req: UnscheduleSubscriptionRequest, options?: RequestOptions): Promise<Result<UnscheduleSubscriptionResponse>>;
51
+ /**
52
+ * Restore subscription
53
+ *
54
+ * Restores the subscription by deleting any later-scheduled successor
55
+ * subscriptions and continuing this one indefinitely. This is the inverse of a
56
+ * future-dated change, which schedules a successor. Restore is not available when
57
+ * multi-subscription is enabled.
58
+ *
59
+ * POST /openmeter/subscriptions/{subscriptionId}/restore
60
+ */
61
+ export declare function restoreSubscription(client: Client, req: RestoreSubscriptionRequest, options?: RequestOptions): Promise<Result<RestoreSubscriptionResponse>>;
39
62
  /**
40
63
  * Change subscription
41
64
  *
@@ -164,6 +164,75 @@ export function unscheduleCancelation(client, req, options) {
164
164
  });
165
165
  });
166
166
  }
167
+ /**
168
+ * Unschedule subscription
169
+ *
170
+ * Deletes a scheduled subscription that has not yet become active, removing it and
171
+ * resolving any scheduling conflict it was holding. This is distinct from
172
+ * canceling: cancel ends a running subscription, whereas unscheduling removes a
173
+ * not-yet-active one. Only scheduled subscriptions can be unscheduled;
174
+ * unscheduling an active or already-started subscription is rejected.
175
+ *
176
+ * POST /openmeter/subscriptions/{subscriptionId}/unschedule
177
+ */
178
+ export function unscheduleSubscription(client, req, options) {
179
+ return request(async () => {
180
+ const pathParamsInput = {
181
+ subscriptionId: req.subscriptionId,
182
+ };
183
+ const pathParams = client._options.validate
184
+ ? toPathWire(pathParamsInput, schemas.unscheduleSubscriptionPathParams)
185
+ : pathParamsInput;
186
+ if (client._options.validate) {
187
+ assertValid(schemas.unscheduleSubscriptionPathParamsWire, pathParams);
188
+ }
189
+ const path = `openmeter/subscriptions/${(() => {
190
+ if (pathParams.subscriptionId === undefined) {
191
+ throw new Error('missing path parameter: subscriptionId');
192
+ }
193
+ return encodeURIComponent(String(pathParams.subscriptionId));
194
+ })()}/unschedule`;
195
+ await http(client).post(path, options);
196
+ });
197
+ }
198
+ /**
199
+ * Restore subscription
200
+ *
201
+ * Restores the subscription by deleting any later-scheduled successor
202
+ * subscriptions and continuing this one indefinitely. This is the inverse of a
203
+ * future-dated change, which schedules a successor. Restore is not available when
204
+ * multi-subscription is enabled.
205
+ *
206
+ * POST /openmeter/subscriptions/{subscriptionId}/restore
207
+ */
208
+ export function restoreSubscription(client, req, options) {
209
+ return request(() => {
210
+ const pathParamsInput = {
211
+ subscriptionId: req.subscriptionId,
212
+ };
213
+ const pathParams = client._options.validate
214
+ ? toPathWire(pathParamsInput, schemas.restoreSubscriptionPathParams)
215
+ : pathParamsInput;
216
+ if (client._options.validate) {
217
+ assertValid(schemas.restoreSubscriptionPathParamsWire, pathParams);
218
+ }
219
+ const path = `openmeter/subscriptions/${(() => {
220
+ if (pathParams.subscriptionId === undefined) {
221
+ throw new Error('missing path parameter: subscriptionId');
222
+ }
223
+ return encodeURIComponent(String(pathParams.subscriptionId));
224
+ })()}/restore`;
225
+ return http(client)
226
+ .post(path, options)
227
+ .json()
228
+ .then((data) => {
229
+ if (client._options.validate) {
230
+ assertValid(schemas.restoreSubscriptionResponseWire, data);
231
+ }
232
+ return fromWire(data, schemas.restoreSubscriptionResponse);
233
+ });
234
+ });
235
+ }
167
236
  /**
168
237
  * Change subscription
169
238
  *
package/dist/index.d.ts CHANGED
@@ -41,4 +41,4 @@ export type * from './models/operations/addons.js';
41
41
  export type * from './models/operations/planAddons.js';
42
42
  export type * from './models/operations/defaults.js';
43
43
  export type * from './models/operations/entitlementAccess.js';
44
- export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, SubscriptionCostBasisPin, FeatureReference, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ChargeResolvedCostBasis, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, RecurringPeriod, ListCreditGrantsParamsFilter, ValidationIssue, GetCreditBalanceParamsFilter, ListPlansParamsFilter, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, CurrencyAmount, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, RateCardTaxConfig, TaxConfig, OrganizationDefaultTaxCodes, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListChargesParamsFilter, ListInvoicesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, SubscriptionEditAddPhase, WorkflowCollectionAlignmentAnchored, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, ChargeFlatFeeSystemIntent, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, WorkflowPaymentSettings, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, InvoiceWorkflowInput, SubscriptionCancelInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
44
+ export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, SubscriptionCostBasisPin, FeatureReference, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ChargeResolvedCostBasis, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, RecurringPeriod, ListCreditGrantsParamsFilter, ValidationIssue, GetCreditBalanceParamsFilter, ListPlansParamsFilter, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, CurrencyAmount, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, RateCardTaxConfig, TaxConfig, OrganizationDefaultTaxCodes, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListChargesParamsFilter, ListInvoicesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, SubscriptionEditAddPhase, WorkflowCollectionAlignmentAnchored, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, ChargeFlatFeeSystemIntent, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, InvoiceWorkflowInput, SubscriptionCancelInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-beta-287990b08135";
1
+ export declare const SDK_VERSION = "1.0.0-beta-50ba5fa8d739";
@@ -2,4 +2,4 @@
2
2
  // The committed value is a dev placeholder. The publish flow
3
3
  // (`make -C api/spec publish-aip-sdk`) stamps the real release version here
4
4
  // before `pnpm publish`, after `pnpm version` updates package.json.
5
- export const SDK_VERSION = '1.0.0-beta-287990b08135';
5
+ export const SDK_VERSION = '1.0.0-beta-50ba5fa8d739';
@@ -37,6 +37,14 @@ export type UnscheduleCancelationRequest = {
37
37
  subscriptionId: string;
38
38
  };
39
39
  export type UnscheduleCancelationResponse = Subscription;
40
+ export type UnscheduleSubscriptionRequest = {
41
+ subscriptionId: string;
42
+ };
43
+ export type UnscheduleSubscriptionResponse = void;
44
+ export type RestoreSubscriptionRequest = {
45
+ subscriptionId: string;
46
+ };
47
+ export type RestoreSubscriptionResponse = Subscription;
40
48
  export type ChangeSubscriptionRequest = AcceptDateStrings<{
41
49
  subscriptionId: string;
42
50
  body: SubscriptionChangeInput;
@@ -334,6 +334,9 @@ export declare const featureLlmTokenType: z.ZodEnum<{
334
334
  request: "request";
335
335
  response: "response";
336
336
  }>;
337
+ export declare const subscriptionCreateTimingEnum: z.ZodEnum<{
338
+ immediate: "immediate";
339
+ }>;
337
340
  export declare const subscriptionEditTimingEnum: z.ZodEnum<{
338
341
  immediate: "immediate";
339
342
  next_billing_cycle: "next_billing_cycle";
@@ -1533,6 +1536,9 @@ export declare const chargeRealizationPayment: z.ZodObject<{
1533
1536
  settled: "settled";
1534
1537
  }>;
1535
1538
  }, z.core.$strip>;
1539
+ export declare const subscriptionCreateTiming: z.ZodUnion<readonly [z.ZodEnum<{
1540
+ immediate: "immediate";
1541
+ }>, z.ZodDate]>;
1536
1542
  export declare const subscriptionEditTiming: z.ZodUnion<readonly [z.ZodEnum<{
1537
1543
  immediate: "immediate";
1538
1544
  next_billing_cycle: "next_billing_cycle";
@@ -10178,6 +10184,9 @@ export declare const subscriptionCreate: z.ZodObject<{
10178
10184
  }, z.core.$strip>>;
10179
10185
  }, z.core.$strip>>;
10180
10186
  startingPhase: z.ZodOptional<z.ZodString>;
10187
+ timing: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
10188
+ immediate: "immediate";
10189
+ }>, z.ZodDate]>>;
10181
10190
  billingAnchor: z.ZodOptional<z.ZodDate>;
10182
10191
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
10183
10192
  dynamic: "dynamic";
@@ -21145,6 +21154,9 @@ export declare const createSubscriptionBody: z.ZodObject<{
21145
21154
  }, z.core.$strip>>;
21146
21155
  }, z.core.$strip>>;
21147
21156
  startingPhase: z.ZodOptional<z.ZodString>;
21157
+ timing: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
21158
+ immediate: "immediate";
21159
+ }>, z.ZodDate]>>;
21148
21160
  billingAnchor: z.ZodOptional<z.ZodDate>;
21149
21161
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
21150
21162
  dynamic: "dynamic";
@@ -22002,6 +22014,170 @@ export declare const unscheduleCancelationResponse: z.ZodObject<{
22002
22014
  }, z.core.$strip>>;
22003
22015
  }, z.core.$strip>>;
22004
22016
  }, z.core.$strip>;
22017
+ export declare const unscheduleSubscriptionPathParams: z.ZodObject<{
22018
+ subscriptionId: z.ZodString;
22019
+ }, z.core.$strip>;
22020
+ export declare const restoreSubscriptionPathParams: z.ZodObject<{
22021
+ subscriptionId: z.ZodString;
22022
+ }, z.core.$strip>;
22023
+ export declare const restoreSubscriptionResponse: z.ZodObject<{
22024
+ id: z.ZodString;
22025
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22026
+ createdAt: z.ZodDate;
22027
+ updatedAt: z.ZodDate;
22028
+ deletedAt: z.ZodOptional<z.ZodDate>;
22029
+ name: z.ZodString;
22030
+ description: z.ZodOptional<z.ZodString>;
22031
+ activeFrom: z.ZodDate;
22032
+ activeTo: z.ZodOptional<z.ZodDate>;
22033
+ customerId: z.ZodString;
22034
+ planId: z.ZodOptional<z.ZodString>;
22035
+ plan: z.ZodOptional<z.ZodObject<{
22036
+ id: z.ZodString;
22037
+ key: z.ZodString;
22038
+ version: z.ZodNumber;
22039
+ }, z.core.$strip>>;
22040
+ invoiceCurrency: z.ZodString;
22041
+ costBasisMode: z.ZodDefault<z.ZodEnum<{
22042
+ dynamic: "dynamic";
22043
+ pinned: "pinned";
22044
+ }>>;
22045
+ costBasisPins: z.ZodArray<z.ZodObject<{
22046
+ customCurrencyId: z.ZodString;
22047
+ invoiceCurrency: z.ZodString;
22048
+ costBasisId: z.ZodString;
22049
+ }, z.core.$strip>>;
22050
+ billingCadence: z.ZodString;
22051
+ proRatingConfig: z.ZodOptional<z.ZodObject<{
22052
+ enabled: z.ZodBoolean;
22053
+ mode: z.ZodEnum<{
22054
+ no_proration: "no_proration";
22055
+ prorate_prices: "prorate_prices";
22056
+ }>;
22057
+ }, z.core.$strip>>;
22058
+ billingAnchor: z.ZodDate;
22059
+ status: z.ZodEnum<{
22060
+ active: "active";
22061
+ canceled: "canceled";
22062
+ inactive: "inactive";
22063
+ scheduled: "scheduled";
22064
+ }>;
22065
+ settlementMode: z.ZodOptional<z.ZodEnum<{
22066
+ credit_only: "credit_only";
22067
+ credit_then_invoice: "credit_then_invoice";
22068
+ }>>;
22069
+ currentPeriod: z.ZodOptional<z.ZodObject<{
22070
+ from: z.ZodDate;
22071
+ to: z.ZodDate;
22072
+ }, z.core.$strip>>;
22073
+ phases: z.ZodArray<z.ZodObject<{
22074
+ id: z.ZodString;
22075
+ name: z.ZodString;
22076
+ description: z.ZodOptional<z.ZodString>;
22077
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22078
+ createdAt: z.ZodDate;
22079
+ updatedAt: z.ZodDate;
22080
+ deletedAt: z.ZodOptional<z.ZodDate>;
22081
+ key: z.ZodString;
22082
+ activeFrom: z.ZodDate;
22083
+ activeTo: z.ZodOptional<z.ZodDate>;
22084
+ items: z.ZodArray<z.ZodObject<{
22085
+ id: z.ZodString;
22086
+ activeFrom: z.ZodDate;
22087
+ activeTo: z.ZodOptional<z.ZodDate>;
22088
+ rateCard: z.ZodObject<{
22089
+ name: z.ZodString;
22090
+ description: z.ZodOptional<z.ZodString>;
22091
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22092
+ key: z.ZodString;
22093
+ feature: z.ZodOptional<z.ZodObject<{
22094
+ id: z.ZodString;
22095
+ }, z.core.$strip>>;
22096
+ currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
22097
+ billingCadence: z.ZodOptional<z.ZodString>;
22098
+ price: z.ZodDiscriminatedUnion<[z.ZodObject<{
22099
+ type: z.ZodLiteral<"free">;
22100
+ }, z.core.$strip>, z.ZodObject<{
22101
+ type: z.ZodLiteral<"flat">;
22102
+ amount: z.ZodString;
22103
+ }, z.core.$strip>, z.ZodObject<{
22104
+ type: z.ZodLiteral<"unit">;
22105
+ amount: z.ZodString;
22106
+ }, z.core.$strip>, z.ZodObject<{
22107
+ type: z.ZodLiteral<"graduated">;
22108
+ tiers: z.ZodArray<z.ZodObject<{
22109
+ upToAmount: z.ZodOptional<z.ZodString>;
22110
+ flatPrice: z.ZodOptional<z.ZodObject<{
22111
+ type: z.ZodLiteral<"flat">;
22112
+ amount: z.ZodString;
22113
+ }, z.core.$strip>>;
22114
+ unitPrice: z.ZodOptional<z.ZodObject<{
22115
+ type: z.ZodLiteral<"unit">;
22116
+ amount: z.ZodString;
22117
+ }, z.core.$strip>>;
22118
+ }, z.core.$strip>>;
22119
+ }, z.core.$strip>, z.ZodObject<{
22120
+ type: z.ZodLiteral<"volume">;
22121
+ tiers: z.ZodArray<z.ZodObject<{
22122
+ upToAmount: z.ZodOptional<z.ZodString>;
22123
+ flatPrice: z.ZodOptional<z.ZodObject<{
22124
+ type: z.ZodLiteral<"flat">;
22125
+ amount: z.ZodString;
22126
+ }, z.core.$strip>>;
22127
+ unitPrice: z.ZodOptional<z.ZodObject<{
22128
+ type: z.ZodLiteral<"unit">;
22129
+ amount: z.ZodString;
22130
+ }, z.core.$strip>>;
22131
+ }, z.core.$strip>>;
22132
+ }, z.core.$strip>], "type">;
22133
+ unitConfig: z.ZodOptional<z.ZodObject<{
22134
+ operation: z.ZodEnum<{
22135
+ divide: "divide";
22136
+ multiply: "multiply";
22137
+ }>;
22138
+ conversionFactor: z.ZodString;
22139
+ rounding: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
22140
+ ceiling: "ceiling";
22141
+ floor: "floor";
22142
+ half_up: "half_up";
22143
+ none: "none";
22144
+ }>>>;
22145
+ precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22146
+ displayUnit: z.ZodOptional<z.ZodString>;
22147
+ }, z.core.$strip>>;
22148
+ paymentTerm: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"in_advance">, z.ZodLiteral<"in_arrears">]>>>;
22149
+ commitments: z.ZodOptional<z.ZodObject<{
22150
+ minimumAmount: z.ZodOptional<z.ZodString>;
22151
+ maximumAmount: z.ZodOptional<z.ZodString>;
22152
+ }, z.core.$strip>>;
22153
+ discounts: z.ZodOptional<z.ZodObject<{
22154
+ percentage: z.ZodOptional<z.ZodNumber>;
22155
+ usage: z.ZodOptional<z.ZodString>;
22156
+ }, z.core.$strip>>;
22157
+ taxConfig: z.ZodOptional<z.ZodObject<{
22158
+ behavior: z.ZodOptional<z.ZodEnum<{
22159
+ exclusive: "exclusive";
22160
+ inclusive: "inclusive";
22161
+ }>>;
22162
+ code: z.ZodObject<{
22163
+ id: z.ZodString;
22164
+ }, z.core.$strip>;
22165
+ }, z.core.$strip>>;
22166
+ entitlement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
22167
+ type: z.ZodLiteral<"metered">;
22168
+ isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22169
+ limit: z.ZodOptional<z.ZodNumber>;
22170
+ usagePeriod: z.ZodOptional<z.ZodString>;
22171
+ }, z.core.$strip>, z.ZodObject<{
22172
+ type: z.ZodLiteral<"static">;
22173
+ config: z.ZodUnknown;
22174
+ }, z.core.$strip>, z.ZodObject<{
22175
+ type: z.ZodLiteral<"boolean">;
22176
+ }, z.core.$strip>], "type">>;
22177
+ }, z.core.$strip>;
22178
+ }, z.core.$strip>>;
22179
+ }, z.core.$strip>>;
22180
+ }, z.core.$strip>;
22005
22181
  export declare const changeSubscriptionPathParams: z.ZodObject<{
22006
22182
  subscriptionId: z.ZodString;
22007
22183
  }, z.core.$strip>;
@@ -30880,6 +31056,9 @@ export declare const featureLlmTokenTypeWire: z.ZodEnum<{
30880
31056
  request: "request";
30881
31057
  response: "response";
30882
31058
  }>;
31059
+ export declare const subscriptionCreateTimingEnumWire: z.ZodEnum<{
31060
+ immediate: "immediate";
31061
+ }>;
30883
31062
  export declare const subscriptionEditTimingEnumWire: z.ZodEnum<{
30884
31063
  immediate: "immediate";
30885
31064
  next_billing_cycle: "next_billing_cycle";
@@ -32079,6 +32258,9 @@ export declare const chargeRealizationPaymentWire: z.ZodObject<{
32079
32258
  settled: "settled";
32080
32259
  }>;
32081
32260
  }, z.core.$strict>;
32261
+ export declare const subscriptionCreateTimingWire: z.ZodUnion<readonly [z.ZodEnum<{
32262
+ immediate: "immediate";
32263
+ }>, z.ZodString]>;
32082
32264
  export declare const subscriptionEditTimingWire: z.ZodUnion<readonly [z.ZodEnum<{
32083
32265
  immediate: "immediate";
32084
32266
  next_billing_cycle: "next_billing_cycle";
@@ -40724,6 +40906,9 @@ export declare const subscriptionCreateWire: z.ZodObject<{
40724
40906
  }, z.core.$strict>>;
40725
40907
  }, z.core.$strict>>;
40726
40908
  starting_phase: z.ZodOptional<z.ZodString>;
40909
+ timing: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
40910
+ immediate: "immediate";
40911
+ }>, z.ZodString]>>;
40727
40912
  billing_anchor: z.ZodOptional<z.ZodString>;
40728
40913
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
40729
40914
  dynamic: "dynamic";
@@ -51679,6 +51864,9 @@ export declare const createSubscriptionBodyWire: z.ZodObject<{
51679
51864
  }, z.core.$strict>>;
51680
51865
  }, z.core.$strict>>;
51681
51866
  starting_phase: z.ZodOptional<z.ZodString>;
51867
+ timing: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
51868
+ immediate: "immediate";
51869
+ }>, z.ZodString]>>;
51682
51870
  billing_anchor: z.ZodOptional<z.ZodString>;
51683
51871
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
51684
51872
  dynamic: "dynamic";
@@ -52533,6 +52721,170 @@ export declare const unscheduleCancelationResponseWire: z.ZodObject<{
52533
52721
  }, z.core.$strict>>;
52534
52722
  }, z.core.$strict>>;
52535
52723
  }, z.core.$strict>;
52724
+ export declare const unscheduleSubscriptionPathParamsWire: z.ZodObject<{
52725
+ subscriptionId: z.ZodString;
52726
+ }, z.core.$strip>;
52727
+ export declare const restoreSubscriptionPathParamsWire: z.ZodObject<{
52728
+ subscriptionId: z.ZodString;
52729
+ }, z.core.$strip>;
52730
+ export declare const restoreSubscriptionResponseWire: z.ZodObject<{
52731
+ id: z.ZodString;
52732
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
52733
+ created_at: z.ZodString;
52734
+ updated_at: z.ZodString;
52735
+ deleted_at: z.ZodOptional<z.ZodString>;
52736
+ name: z.ZodString;
52737
+ description: z.ZodOptional<z.ZodString>;
52738
+ active_from: z.ZodString;
52739
+ active_to: z.ZodOptional<z.ZodString>;
52740
+ customer_id: z.ZodString;
52741
+ plan_id: z.ZodOptional<z.ZodString>;
52742
+ plan: z.ZodOptional<z.ZodObject<{
52743
+ id: z.ZodString;
52744
+ key: z.ZodString;
52745
+ version: z.ZodNumber;
52746
+ }, z.core.$strict>>;
52747
+ invoice_currency: z.ZodString;
52748
+ cost_basis_mode: z.ZodEnum<{
52749
+ dynamic: "dynamic";
52750
+ pinned: "pinned";
52751
+ }>;
52752
+ cost_basis_pins: z.ZodArray<z.ZodObject<{
52753
+ custom_currency_id: z.ZodString;
52754
+ invoice_currency: z.ZodString;
52755
+ cost_basis_id: z.ZodString;
52756
+ }, z.core.$strict>>;
52757
+ billing_cadence: z.ZodString;
52758
+ pro_rating_config: z.ZodOptional<z.ZodObject<{
52759
+ enabled: z.ZodBoolean;
52760
+ mode: z.ZodEnum<{
52761
+ no_proration: "no_proration";
52762
+ prorate_prices: "prorate_prices";
52763
+ }>;
52764
+ }, z.core.$strict>>;
52765
+ billing_anchor: z.ZodString;
52766
+ status: z.ZodEnum<{
52767
+ active: "active";
52768
+ canceled: "canceled";
52769
+ inactive: "inactive";
52770
+ scheduled: "scheduled";
52771
+ }>;
52772
+ settlement_mode: z.ZodOptional<z.ZodEnum<{
52773
+ credit_only: "credit_only";
52774
+ credit_then_invoice: "credit_then_invoice";
52775
+ }>>;
52776
+ current_period: z.ZodOptional<z.ZodObject<{
52777
+ from: z.ZodString;
52778
+ to: z.ZodString;
52779
+ }, z.core.$strict>>;
52780
+ phases: z.ZodArray<z.ZodObject<{
52781
+ id: z.ZodString;
52782
+ name: z.ZodString;
52783
+ description: z.ZodOptional<z.ZodString>;
52784
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
52785
+ created_at: z.ZodString;
52786
+ updated_at: z.ZodString;
52787
+ deleted_at: z.ZodOptional<z.ZodString>;
52788
+ key: z.ZodString;
52789
+ active_from: z.ZodString;
52790
+ active_to: z.ZodOptional<z.ZodString>;
52791
+ items: z.ZodArray<z.ZodObject<{
52792
+ id: z.ZodString;
52793
+ active_from: z.ZodString;
52794
+ active_to: z.ZodOptional<z.ZodString>;
52795
+ rate_card: z.ZodObject<{
52796
+ name: z.ZodString;
52797
+ description: z.ZodOptional<z.ZodString>;
52798
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
52799
+ key: z.ZodString;
52800
+ feature: z.ZodOptional<z.ZodObject<{
52801
+ id: z.ZodString;
52802
+ }, z.core.$strict>>;
52803
+ currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
52804
+ billing_cadence: z.ZodOptional<z.ZodString>;
52805
+ price: z.ZodDiscriminatedUnion<[z.ZodObject<{
52806
+ type: z.ZodLiteral<"free">;
52807
+ }, z.core.$strict>, z.ZodObject<{
52808
+ type: z.ZodLiteral<"flat">;
52809
+ amount: z.ZodString;
52810
+ }, z.core.$strict>, z.ZodObject<{
52811
+ type: z.ZodLiteral<"unit">;
52812
+ amount: z.ZodString;
52813
+ }, z.core.$strict>, z.ZodObject<{
52814
+ type: z.ZodLiteral<"graduated">;
52815
+ tiers: z.ZodArray<z.ZodObject<{
52816
+ up_to_amount: z.ZodOptional<z.ZodString>;
52817
+ flat_price: z.ZodOptional<z.ZodObject<{
52818
+ type: z.ZodLiteral<"flat">;
52819
+ amount: z.ZodString;
52820
+ }, z.core.$strict>>;
52821
+ unit_price: z.ZodOptional<z.ZodObject<{
52822
+ type: z.ZodLiteral<"unit">;
52823
+ amount: z.ZodString;
52824
+ }, z.core.$strict>>;
52825
+ }, z.core.$strict>>;
52826
+ }, z.core.$strict>, z.ZodObject<{
52827
+ type: z.ZodLiteral<"volume">;
52828
+ tiers: z.ZodArray<z.ZodObject<{
52829
+ up_to_amount: z.ZodOptional<z.ZodString>;
52830
+ flat_price: z.ZodOptional<z.ZodObject<{
52831
+ type: z.ZodLiteral<"flat">;
52832
+ amount: z.ZodString;
52833
+ }, z.core.$strict>>;
52834
+ unit_price: z.ZodOptional<z.ZodObject<{
52835
+ type: z.ZodLiteral<"unit">;
52836
+ amount: z.ZodString;
52837
+ }, z.core.$strict>>;
52838
+ }, z.core.$strict>>;
52839
+ }, z.core.$strict>], "type">;
52840
+ unit_config: z.ZodOptional<z.ZodObject<{
52841
+ operation: z.ZodEnum<{
52842
+ divide: "divide";
52843
+ multiply: "multiply";
52844
+ }>;
52845
+ conversion_factor: z.ZodString;
52846
+ rounding: z.ZodOptional<z.ZodEnum<{
52847
+ ceiling: "ceiling";
52848
+ floor: "floor";
52849
+ half_up: "half_up";
52850
+ none: "none";
52851
+ }>>;
52852
+ precision: z.ZodOptional<z.ZodNumber>;
52853
+ display_unit: z.ZodOptional<z.ZodString>;
52854
+ }, z.core.$strict>>;
52855
+ payment_term: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"in_advance">, z.ZodLiteral<"in_arrears">]>>;
52856
+ commitments: z.ZodOptional<z.ZodObject<{
52857
+ minimum_amount: z.ZodOptional<z.ZodString>;
52858
+ maximum_amount: z.ZodOptional<z.ZodString>;
52859
+ }, z.core.$strict>>;
52860
+ discounts: z.ZodOptional<z.ZodObject<{
52861
+ percentage: z.ZodOptional<z.ZodNumber>;
52862
+ usage: z.ZodOptional<z.ZodString>;
52863
+ }, z.core.$strict>>;
52864
+ tax_config: z.ZodOptional<z.ZodObject<{
52865
+ behavior: z.ZodOptional<z.ZodEnum<{
52866
+ exclusive: "exclusive";
52867
+ inclusive: "inclusive";
52868
+ }>>;
52869
+ code: z.ZodObject<{
52870
+ id: z.ZodString;
52871
+ }, z.core.$strict>;
52872
+ }, z.core.$strict>>;
52873
+ entitlement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
52874
+ type: z.ZodLiteral<"metered">;
52875
+ is_soft_limit: z.ZodOptional<z.ZodBoolean>;
52876
+ limit: z.ZodOptional<z.ZodNumber>;
52877
+ usage_period: z.ZodOptional<z.ZodString>;
52878
+ }, z.core.$strict>, z.ZodObject<{
52879
+ type: z.ZodLiteral<"static">;
52880
+ config: z.ZodUnknown;
52881
+ }, z.core.$strict>, z.ZodObject<{
52882
+ type: z.ZodLiteral<"boolean">;
52883
+ }, z.core.$strict>], "type">>;
52884
+ }, z.core.$strict>;
52885
+ }, z.core.$strict>>;
52886
+ }, z.core.$strict>>;
52887
+ }, z.core.$strict>;
52536
52888
  export declare const changeSubscriptionPathParamsWire: z.ZodObject<{
52537
52889
  subscriptionId: z.ZodString;
52538
52890
  }, z.core.$strip>;
@@ -607,6 +607,9 @@ export const featureLlmTokenType = z
607
607
  'response',
608
608
  ])
609
609
  .describe('Token type for LLM cost lookup.');
610
+ export const subscriptionCreateTimingEnum = z
611
+ .enum(['immediate'])
612
+ .describe('Subscription create timing. Only immediate is supported as an enum value — unlike edit timing, next_billing_cycle is not accepted on create, since a new subscription has no current billing cycle to schedule against.');
610
613
  export const subscriptionEditTimingEnum = z
611
614
  .enum(['immediate', 'next_billing_cycle'])
612
615
  .describe('Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.');
@@ -2301,6 +2304,9 @@ export const chargeRealizationPayment = z
2301
2304
  status: chargeRealizationPaymentStatus,
2302
2305
  })
2303
2306
  .describe('Payment state of a charge realization.');
2307
+ export const subscriptionCreateTiming = z
2308
+ .union([subscriptionCreateTimingEnum, dateTime])
2309
+ .describe('When a subscription should start: immediate (the default) or a custom timestamp to schedule a future start.');
2304
2310
  export const subscriptionEditTiming = z
2305
2311
  .union([subscriptionEditTimingEnum, dateTime])
2306
2312
  .describe('Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.');
@@ -4829,6 +4835,7 @@ export const subscriptionCreate = z.object({
4829
4835
  .min(1)
4830
4836
  .optional()
4831
4837
  .describe('The key of the phase to start the subscription in. If not provided, the subscription starts in the first phase of the plan. Only applies when creating from a published `plan`; custom plans define their own phases inline.'),
4838
+ timing: subscriptionCreateTiming.optional(),
4832
4839
  billingAnchor: dateTime.optional(),
4833
4840
  costBasisMode: subscriptionCostBasisMode.optional().default('dynamic'),
4834
4841
  });
@@ -5332,6 +5339,13 @@ export const unscheduleCancelationPathParams = z.object({
5332
5339
  subscriptionId: ulid,
5333
5340
  });
5334
5341
  export const unscheduleCancelationResponse = subscription;
5342
+ export const unscheduleSubscriptionPathParams = z.object({
5343
+ subscriptionId: ulid,
5344
+ });
5345
+ export const restoreSubscriptionPathParams = z.object({
5346
+ subscriptionId: ulid,
5347
+ });
5348
+ export const restoreSubscriptionResponse = subscription;
5335
5349
  export const changeSubscriptionPathParams = z.object({
5336
5350
  subscriptionId: ulid,
5337
5351
  });
@@ -6422,6 +6436,9 @@ export const featureLlmTokenTypeWire = z
6422
6436
  'response',
6423
6437
  ])
6424
6438
  .describe('Token type for LLM cost lookup.');
6439
+ export const subscriptionCreateTimingEnumWire = z
6440
+ .enum(['immediate'])
6441
+ .describe('Subscription create timing. Only immediate is supported as an enum value — unlike edit timing, next_billing_cycle is not accepted on create, since a new subscription has no current billing cycle to schedule against.');
6425
6442
  export const subscriptionEditTimingEnumWire = z
6426
6443
  .enum(['immediate', 'next_billing_cycle'])
6427
6444
  .describe('Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.');
@@ -8099,6 +8116,9 @@ export const chargeRealizationPaymentWire = z
8099
8116
  status: chargeRealizationPaymentStatusWire,
8100
8117
  })
8101
8118
  .describe('Payment state of a charge realization.');
8119
+ export const subscriptionCreateTimingWire = z
8120
+ .union([subscriptionCreateTimingEnumWire, dateTimeWire])
8121
+ .describe('When a subscription should start: immediate (the default) or a custom timestamp to schedule a future start.');
8102
8122
  export const subscriptionEditTimingWire = z
8103
8123
  .union([subscriptionEditTimingEnumWire, dateTimeWire])
8104
8124
  .describe('Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.');
@@ -10616,6 +10636,7 @@ export const subscriptionCreateWire = z.strictObject({
10616
10636
  .min(1)
10617
10637
  .optional()
10618
10638
  .describe('The key of the phase to start the subscription in. If not provided, the subscription starts in the first phase of the plan. Only applies when creating from a published `plan`; custom plans define their own phases inline.'),
10639
+ timing: subscriptionCreateTimingWire.optional(),
10619
10640
  billing_anchor: dateTimeWire.optional(),
10620
10641
  cost_basis_mode: subscriptionCostBasisModeWire.optional(),
10621
10642
  });
@@ -11137,6 +11158,13 @@ export const unscheduleCancelationPathParamsWire = z.object({
11137
11158
  subscriptionId: ulidWire,
11138
11159
  });
11139
11160
  export const unscheduleCancelationResponseWire = subscriptionWire;
11161
+ export const unscheduleSubscriptionPathParamsWire = z.object({
11162
+ subscriptionId: ulidWire,
11163
+ });
11164
+ export const restoreSubscriptionPathParamsWire = z.object({
11165
+ subscriptionId: ulidWire,
11166
+ });
11167
+ export const restoreSubscriptionResponseWire = subscriptionWire;
11140
11168
  export const changeSubscriptionPathParamsWire = z.object({
11141
11169
  subscriptionId: ulidWire,
11142
11170
  });
@@ -5644,6 +5644,13 @@ export interface SubscriptionCreate {
5644
5644
  * own phases inline.
5645
5645
  */
5646
5646
  startingPhase?: string;
5647
+ /**
5648
+ * When the subscription should start. If not provided, the subscription starts
5649
+ * immediately. Provide a future timestamp to schedule the subscription to start
5650
+ * later — this creates a not-yet-active, scheduled subscription. A timestamp in
5651
+ * the past is rejected.
5652
+ */
5653
+ timing?: SubscriptionCreateTiming;
5647
5654
  /**
5648
5655
  * A billing anchor is the fixed point in time that determines the subscription's
5649
5656
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -6166,6 +6173,11 @@ export type DateTimeFieldFilter = Date | {
6166
6173
  };
6167
6174
  /** Payment settings for a billing workflow. */
6168
6175
  export type WorkflowPaymentSettings = WorkflowPaymentChargeAutomaticallySettings | WorkflowPaymentSendInvoiceSettings;
6176
+ /**
6177
+ * When a subscription should start: immediate (the default) or a custom timestamp
6178
+ * to schedule a future start.
6179
+ */
6180
+ export type SubscriptionCreateTiming = 'immediate' | Date;
6169
6181
  /**
6170
6182
  * Subscription edit timing defined when the changes should take effect. If the
6171
6183
  * provided configuration is not supported by the subscription, an error will be
@@ -8173,6 +8185,13 @@ export interface SubscriptionCreateInput {
8173
8185
  * own phases inline.
8174
8186
  */
8175
8187
  startingPhase?: string;
8188
+ /**
8189
+ * When the subscription should start. If not provided, the subscription starts
8190
+ * immediately. Provide a future timestamp to schedule the subscription to start
8191
+ * later — this creates a not-yet-active, scheduled subscription. A timestamp in
8192
+ * the past is rejected.
8193
+ */
8194
+ timing?: SubscriptionCreateTiming;
8176
8195
  /**
8177
8196
  * A billing anchor is the fixed point in time that determines the subscription's
8178
8197
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
- import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
3
+ import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
4
4
  import type { Subscription, SubscriptionAddon } from '../models/types.js';
5
5
  export declare class Subscriptions {
6
6
  private readonly _client;
@@ -48,6 +48,29 @@ export declare class Subscriptions {
48
48
  * POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation
49
49
  */
50
50
  unscheduleCancelation(request: UnscheduleCancelationRequest, options?: RequestOptions): Promise<UnscheduleCancelationResponse>;
51
+ /**
52
+ * Unschedule subscription
53
+ *
54
+ * Deletes a scheduled subscription that has not yet become active, removing it and
55
+ * resolving any scheduling conflict it was holding. This is distinct from
56
+ * canceling: cancel ends a running subscription, whereas unscheduling removes a
57
+ * not-yet-active one. Only scheduled subscriptions can be unscheduled;
58
+ * unscheduling an active or already-started subscription is rejected.
59
+ *
60
+ * POST /openmeter/subscriptions/{subscriptionId}/unschedule
61
+ */
62
+ unschedule(request: UnscheduleSubscriptionRequest, options?: RequestOptions): Promise<UnscheduleSubscriptionResponse>;
63
+ /**
64
+ * Restore subscription
65
+ *
66
+ * Restores the subscription by deleting any later-scheduled successor
67
+ * subscriptions and continuing this one indefinitely. This is the inverse of a
68
+ * future-dated change, which schedules a successor. Restore is not available when
69
+ * multi-subscription is enabled.
70
+ *
71
+ * POST /openmeter/subscriptions/{subscriptionId}/restore
72
+ */
73
+ restore(request: RestoreSubscriptionRequest, options?: RequestOptions): Promise<RestoreSubscriptionResponse>;
51
74
  /**
52
75
  * Change subscription
53
76
  *
@@ -1,7 +1,7 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { unwrap } from '../lib/types.js';
3
3
  import { paginatePages } from '../lib/paginate.js';
4
- import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, editSubscription, createSubscriptionAddon, listSubscriptionAddons, getSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
4
+ import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, unscheduleSubscription, restoreSubscription, changeSubscription, editSubscription, createSubscriptionAddon, listSubscriptionAddons, getSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
5
5
  export class Subscriptions {
6
6
  _client;
7
7
  constructor(_client) {
@@ -62,6 +62,33 @@ export class Subscriptions {
62
62
  async unscheduleCancelation(request, options) {
63
63
  return unwrap(await unscheduleCancelation(this._client, request, options));
64
64
  }
65
+ /**
66
+ * Unschedule subscription
67
+ *
68
+ * Deletes a scheduled subscription that has not yet become active, removing it and
69
+ * resolving any scheduling conflict it was holding. This is distinct from
70
+ * canceling: cancel ends a running subscription, whereas unscheduling removes a
71
+ * not-yet-active one. Only scheduled subscriptions can be unscheduled;
72
+ * unscheduling an active or already-started subscription is rejected.
73
+ *
74
+ * POST /openmeter/subscriptions/{subscriptionId}/unschedule
75
+ */
76
+ async unschedule(request, options) {
77
+ return unwrap(await unscheduleSubscription(this._client, request, options));
78
+ }
79
+ /**
80
+ * Restore subscription
81
+ *
82
+ * Restores the subscription by deleting any later-scheduled successor
83
+ * subscriptions and continuing this one indefinitely. This is the inverse of a
84
+ * future-dated change, which schedules a successor. Restore is not available when
85
+ * multi-subscription is enabled.
86
+ *
87
+ * POST /openmeter/subscriptions/{subscriptionId}/restore
88
+ */
89
+ async restore(request, options) {
90
+ return unwrap(await restoreSubscription(this._client, request, options));
91
+ }
65
92
  /**
66
93
  * Change subscription
67
94
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-287990b08135",
3
+ "version": "1.0.0-beta-50ba5fa8d739",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",