@openmeter/client 1.0.0-beta-a067c274ff4a → 1.0.0-beta-c6281b22fddd

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
@@ -36,7 +36,6 @@ TypeSpec definitions and ships fully-typed request and response models.
36
36
  - [Defaults](#defaults)
37
37
  - [Internal Operations](#internal-operations)
38
38
  - [Internal Customers](#internal-customers)
39
- - [Internal Subscriptions](#internal-subscriptions)
40
39
  - [Internal Apps](#internal-apps)
41
40
  - [Internal Invoices](#internal-invoices)
42
41
  - [Internal Currencies](#internal-currencies)
@@ -310,17 +309,19 @@ The full call path, HTTP route, and a short description are listed below.
310
309
 
311
310
  ### Subscriptions
312
311
 
313
- | Method | HTTP | Description |
314
- | -------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
315
- | `client.subscriptions.create` | `POST /openmeter/subscriptions` | Create subscription |
316
- | `client.subscriptions.list` | `GET /openmeter/subscriptions` | List subscriptions |
317
- | `client.subscriptions.get` | `GET /openmeter/subscriptions/{subscriptionId}` | Get subscription |
318
- | `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. |
319
- | `client.subscriptions.unscheduleCancelation` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation` | Unschedules the subscription cancelation. |
320
- | `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. |
321
- | `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. |
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. |
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. |
324
325
 
325
326
  ### Apps
326
327
 
@@ -424,12 +425,6 @@ they can change or be removed without notice or semver consideration.
424
425
  | `client.internal.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
425
426
  | `client.internal.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
426
427
 
427
- ### Internal Subscriptions
428
-
429
- | Method | HTTP | Description |
430
- | ------------------------------------------- | ------------------------------------------------------- | ----------------------------- |
431
- | `client.internal.subscriptions.createAddon` | `POST /openmeter/subscriptions/{subscriptionId}/addons` | Add add-on to a subscription. |
432
-
433
428
  ### Internal Apps
434
429
 
435
430
  | Method | HTTP | Description |
@@ -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 } from '../models/operations/subscriptions.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';
4
4
  /**
5
5
  * Create subscription
6
6
  *
@@ -80,3 +80,13 @@ export declare function listSubscriptionAddons(client: Client, req: ListSubscrip
80
80
  * GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
81
81
  */
82
82
  export declare function getSubscriptionAddon(client: Client, req: GetSubscriptionAddonRequest, options?: RequestOptions): Promise<Result<GetSubscriptionAddonResponse>>;
83
+ /**
84
+ * Update subscription addon
85
+ *
86
+ * Update a subscription add-on. Only the quantity is mutable; the timing controls
87
+ * when the new quantity takes effect. A new entry is appended to the add-on's
88
+ * timeline.
89
+ *
90
+ * PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
91
+ */
92
+ export declare function updateSubscriptionAddon(client: Client, req: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise<Result<UpdateSubscriptionAddonResponse>>;
@@ -372,3 +372,50 @@ export function getSubscriptionAddon(client, req, options) {
372
372
  });
373
373
  });
374
374
  }
375
+ /**
376
+ * Update subscription addon
377
+ *
378
+ * Update a subscription add-on. Only the quantity is mutable; the timing controls
379
+ * when the new quantity takes effect. A new entry is appended to the add-on's
380
+ * timeline.
381
+ *
382
+ * PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
383
+ */
384
+ export function updateSubscriptionAddon(client, req, options) {
385
+ return request(() => {
386
+ const pathParamsInput = {
387
+ subscriptionId: req.subscriptionId,
388
+ subscriptionAddonId: req.subscriptionAddonId,
389
+ };
390
+ const pathParams = client._options.validate
391
+ ? toPathWire(pathParamsInput, schemas.updateSubscriptionAddonPathParams)
392
+ : pathParamsInput;
393
+ if (client._options.validate) {
394
+ assertValid(schemas.updateSubscriptionAddonPathParamsWire, pathParams);
395
+ }
396
+ const path = `openmeter/subscriptions/${(() => {
397
+ if (pathParams.subscriptionId === undefined) {
398
+ throw new Error('missing path parameter: subscriptionId');
399
+ }
400
+ return encodeURIComponent(String(pathParams.subscriptionId));
401
+ })()}/addons/${(() => {
402
+ if (pathParams.subscriptionAddonId === undefined) {
403
+ throw new Error('missing path parameter: subscriptionAddonId');
404
+ }
405
+ return encodeURIComponent(String(pathParams.subscriptionAddonId));
406
+ })()}`;
407
+ const body = toWire(req.body, schemas.updateSubscriptionAddonBody);
408
+ if (client._options.validate) {
409
+ assertValid(schemas.updateSubscriptionAddonBodyWire, body);
410
+ }
411
+ return http(client)
412
+ .patch(path, { ...options, json: body })
413
+ .json()
414
+ .then((data) => {
415
+ if (client._options.validate) {
416
+ assertValid(schemas.updateSubscriptionAddonResponseWire, data);
417
+ }
418
+ return fromWire(data, schemas.updateSubscriptionAddonResponse);
419
+ });
420
+ });
421
+ }
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, 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, 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-a067c274ff4a";
1
+ export declare const SDK_VERSION = "1.0.0-beta-c6281b22fddd";
@@ -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-a067c274ff4a';
5
+ export const SDK_VERSION = '1.0.0-beta-c6281b22fddd';
@@ -1,5 +1,5 @@
1
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
2
- import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput, SubscriptionChangeInput, SubscriptionChangeResponse, SubscriptionCreateInput, SubscriptionEditInput, SubscriptionPagePaginatedResponse } from '../types.js';
2
+ import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionAddonUpdate, SubscriptionCancelInput, SubscriptionChangeInput, SubscriptionChangeResponse, SubscriptionCreateInput, SubscriptionEditInput, SubscriptionPagePaginatedResponse } from '../types.js';
3
3
  export type CreateSubscriptionRequest = AcceptDateStrings<SubscriptionCreateInput>;
4
4
  export type CreateSubscriptionResponse = Subscription;
5
5
  export interface ListSubscriptionsQuery {
@@ -80,3 +80,9 @@ export type GetSubscriptionAddonRequest = {
80
80
  subscriptionAddonId: string;
81
81
  };
82
82
  export type GetSubscriptionAddonResponse = SubscriptionAddon;
83
+ export type UpdateSubscriptionAddonRequest = AcceptDateStrings<{
84
+ subscriptionId: string;
85
+ subscriptionAddonId: string;
86
+ body: SubscriptionAddonUpdate;
87
+ }>;
88
+ export type UpdateSubscriptionAddonResponse = SubscriptionAddon;
@@ -3112,6 +3112,13 @@ export declare const createSubscriptionAddonRequest: z.ZodObject<{
3112
3112
  next_billing_cycle: "next_billing_cycle";
3113
3113
  }>, z.ZodDate]>;
3114
3114
  }, z.core.$strip>;
3115
+ export declare const subscriptionAddonUpdate: z.ZodObject<{
3116
+ quantity: z.ZodNumber;
3117
+ timing: z.ZodUnion<readonly [z.ZodEnum<{
3118
+ immediate: "immediate";
3119
+ next_billing_cycle: "next_billing_cycle";
3120
+ }>, z.ZodDate]>;
3121
+ }, z.core.$strip>;
3115
3122
  export declare const createTaxCodeRequest: z.ZodObject<{
3116
3123
  name: z.ZodString;
3117
3124
  description: z.ZodOptional<z.ZodString>;
@@ -10170,6 +10177,7 @@ export declare const subscriptionCreate: z.ZodObject<{
10170
10177
  }, z.core.$strip>>;
10171
10178
  }, z.core.$strip>>;
10172
10179
  }, z.core.$strip>>;
10180
+ startingPhase: z.ZodOptional<z.ZodString>;
10173
10181
  billingAnchor: z.ZodOptional<z.ZodDate>;
10174
10182
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
10175
10183
  dynamic: "dynamic";
@@ -10296,6 +10304,7 @@ export declare const subscriptionChange: z.ZodObject<{
10296
10304
  }, z.core.$strip>>;
10297
10305
  }, z.core.$strip>>;
10298
10306
  }, z.core.$strip>>;
10307
+ startingPhase: z.ZodOptional<z.ZodString>;
10299
10308
  billingAnchor: z.ZodOptional<z.ZodDate>;
10300
10309
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
10301
10310
  dynamic: "dynamic";
@@ -21135,6 +21144,7 @@ export declare const createSubscriptionBody: z.ZodObject<{
21135
21144
  }, z.core.$strip>>;
21136
21145
  }, z.core.$strip>>;
21137
21146
  }, z.core.$strip>>;
21147
+ startingPhase: z.ZodOptional<z.ZodString>;
21138
21148
  billingAnchor: z.ZodOptional<z.ZodDate>;
21139
21149
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
21140
21150
  dynamic: "dynamic";
@@ -22115,6 +22125,7 @@ export declare const changeSubscriptionBody: z.ZodObject<{
22115
22125
  }, z.core.$strip>>;
22116
22126
  }, z.core.$strip>>;
22117
22127
  }, z.core.$strip>>;
22128
+ startingPhase: z.ZodOptional<z.ZodString>;
22118
22129
  billingAnchor: z.ZodOptional<z.ZodDate>;
22119
22130
  costBasisMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
22120
22131
  dynamic: "dynamic";
@@ -23112,6 +23123,131 @@ export declare const getSubscriptionAddonResponse: z.ZodObject<{
23112
23123
  affectedSubscriptionItemIds: z.ZodArray<z.ZodString>;
23113
23124
  }, z.core.$strip>>;
23114
23125
  }, z.core.$strip>;
23126
+ export declare const updateSubscriptionAddonPathParams: z.ZodObject<{
23127
+ subscriptionId: z.ZodString;
23128
+ subscriptionAddonId: z.ZodString;
23129
+ }, z.core.$strip>;
23130
+ export declare const updateSubscriptionAddonBody: z.ZodObject<{
23131
+ quantity: z.ZodNumber;
23132
+ timing: z.ZodUnion<readonly [z.ZodEnum<{
23133
+ immediate: "immediate";
23134
+ next_billing_cycle: "next_billing_cycle";
23135
+ }>, z.ZodDate]>;
23136
+ }, z.core.$strip>;
23137
+ export declare const updateSubscriptionAddonResponse: z.ZodObject<{
23138
+ id: z.ZodString;
23139
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
23140
+ createdAt: z.ZodDate;
23141
+ updatedAt: z.ZodDate;
23142
+ deletedAt: z.ZodOptional<z.ZodDate>;
23143
+ name: z.ZodString;
23144
+ description: z.ZodOptional<z.ZodString>;
23145
+ addon: z.ZodObject<{
23146
+ id: z.ZodString;
23147
+ }, z.core.$strip>;
23148
+ quantity: z.ZodNumber;
23149
+ quantityAt: z.ZodDate;
23150
+ activeFrom: z.ZodDate;
23151
+ activeTo: z.ZodOptional<z.ZodDate>;
23152
+ timeline: z.ZodArray<z.ZodObject<{
23153
+ activeFrom: z.ZodDate;
23154
+ activeTo: z.ZodOptional<z.ZodDate>;
23155
+ quantity: z.ZodNumber;
23156
+ }, z.core.$strip>>;
23157
+ rateCards: z.ZodArray<z.ZodObject<{
23158
+ rateCard: z.ZodObject<{
23159
+ name: z.ZodString;
23160
+ description: z.ZodOptional<z.ZodString>;
23161
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
23162
+ key: z.ZodString;
23163
+ feature: z.ZodOptional<z.ZodObject<{
23164
+ id: z.ZodString;
23165
+ }, z.core.$strip>>;
23166
+ currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
23167
+ billingCadence: z.ZodOptional<z.ZodString>;
23168
+ price: z.ZodDiscriminatedUnion<[z.ZodObject<{
23169
+ type: z.ZodLiteral<"free">;
23170
+ }, z.core.$strip>, z.ZodObject<{
23171
+ type: z.ZodLiteral<"flat">;
23172
+ amount: z.ZodString;
23173
+ }, z.core.$strip>, z.ZodObject<{
23174
+ type: z.ZodLiteral<"unit">;
23175
+ amount: z.ZodString;
23176
+ }, z.core.$strip>, z.ZodObject<{
23177
+ type: z.ZodLiteral<"graduated">;
23178
+ tiers: z.ZodArray<z.ZodObject<{
23179
+ upToAmount: z.ZodOptional<z.ZodString>;
23180
+ flatPrice: z.ZodOptional<z.ZodObject<{
23181
+ type: z.ZodLiteral<"flat">;
23182
+ amount: z.ZodString;
23183
+ }, z.core.$strip>>;
23184
+ unitPrice: z.ZodOptional<z.ZodObject<{
23185
+ type: z.ZodLiteral<"unit">;
23186
+ amount: z.ZodString;
23187
+ }, z.core.$strip>>;
23188
+ }, z.core.$strip>>;
23189
+ }, z.core.$strip>, z.ZodObject<{
23190
+ type: z.ZodLiteral<"volume">;
23191
+ tiers: z.ZodArray<z.ZodObject<{
23192
+ upToAmount: z.ZodOptional<z.ZodString>;
23193
+ flatPrice: z.ZodOptional<z.ZodObject<{
23194
+ type: z.ZodLiteral<"flat">;
23195
+ amount: z.ZodString;
23196
+ }, z.core.$strip>>;
23197
+ unitPrice: z.ZodOptional<z.ZodObject<{
23198
+ type: z.ZodLiteral<"unit">;
23199
+ amount: z.ZodString;
23200
+ }, z.core.$strip>>;
23201
+ }, z.core.$strip>>;
23202
+ }, z.core.$strip>], "type">;
23203
+ unitConfig: z.ZodOptional<z.ZodObject<{
23204
+ operation: z.ZodEnum<{
23205
+ divide: "divide";
23206
+ multiply: "multiply";
23207
+ }>;
23208
+ conversionFactor: z.ZodString;
23209
+ rounding: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
23210
+ ceiling: "ceiling";
23211
+ floor: "floor";
23212
+ half_up: "half_up";
23213
+ none: "none";
23214
+ }>>>;
23215
+ precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
23216
+ displayUnit: z.ZodOptional<z.ZodString>;
23217
+ }, z.core.$strip>>;
23218
+ paymentTerm: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"in_advance">, z.ZodLiteral<"in_arrears">]>>>;
23219
+ commitments: z.ZodOptional<z.ZodObject<{
23220
+ minimumAmount: z.ZodOptional<z.ZodString>;
23221
+ maximumAmount: z.ZodOptional<z.ZodString>;
23222
+ }, z.core.$strip>>;
23223
+ discounts: z.ZodOptional<z.ZodObject<{
23224
+ percentage: z.ZodOptional<z.ZodNumber>;
23225
+ usage: z.ZodOptional<z.ZodString>;
23226
+ }, z.core.$strip>>;
23227
+ taxConfig: z.ZodOptional<z.ZodObject<{
23228
+ behavior: z.ZodOptional<z.ZodEnum<{
23229
+ exclusive: "exclusive";
23230
+ inclusive: "inclusive";
23231
+ }>>;
23232
+ code: z.ZodObject<{
23233
+ id: z.ZodString;
23234
+ }, z.core.$strip>;
23235
+ }, z.core.$strip>>;
23236
+ entitlement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
23237
+ type: z.ZodLiteral<"metered">;
23238
+ isSoftLimit: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
23239
+ limit: z.ZodOptional<z.ZodNumber>;
23240
+ usagePeriod: z.ZodOptional<z.ZodString>;
23241
+ }, z.core.$strip>, z.ZodObject<{
23242
+ type: z.ZodLiteral<"static">;
23243
+ config: z.ZodUnknown;
23244
+ }, z.core.$strip>, z.ZodObject<{
23245
+ type: z.ZodLiteral<"boolean">;
23246
+ }, z.core.$strip>], "type">>;
23247
+ }, z.core.$strip>;
23248
+ affectedSubscriptionItemIds: z.ZodArray<z.ZodString>;
23249
+ }, z.core.$strip>>;
23250
+ }, z.core.$strip>;
23115
23251
  export declare const listAppsQueryParams: z.ZodObject<{
23116
23252
  page: z.ZodOptional<z.ZodObject<{
23117
23253
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -33522,6 +33658,13 @@ export declare const createSubscriptionAddonRequestWire: z.ZodObject<{
33522
33658
  next_billing_cycle: "next_billing_cycle";
33523
33659
  }>, z.ZodString]>;
33524
33660
  }, z.core.$strict>;
33661
+ export declare const subscriptionAddonUpdateWire: z.ZodObject<{
33662
+ quantity: z.ZodNumber;
33663
+ timing: z.ZodUnion<readonly [z.ZodEnum<{
33664
+ immediate: "immediate";
33665
+ next_billing_cycle: "next_billing_cycle";
33666
+ }>, z.ZodString]>;
33667
+ }, z.core.$strict>;
33525
33668
  export declare const createTaxCodeRequestWire: z.ZodObject<{
33526
33669
  name: z.ZodString;
33527
33670
  description: z.ZodOptional<z.ZodString>;
@@ -40580,6 +40723,7 @@ export declare const subscriptionCreateWire: z.ZodObject<{
40580
40723
  }, z.core.$strict>>;
40581
40724
  }, z.core.$strict>>;
40582
40725
  }, z.core.$strict>>;
40726
+ starting_phase: z.ZodOptional<z.ZodString>;
40583
40727
  billing_anchor: z.ZodOptional<z.ZodString>;
40584
40728
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
40585
40729
  dynamic: "dynamic";
@@ -40706,6 +40850,7 @@ export declare const subscriptionChangeWire: z.ZodObject<{
40706
40850
  }, z.core.$strict>>;
40707
40851
  }, z.core.$strict>>;
40708
40852
  }, z.core.$strict>>;
40853
+ starting_phase: z.ZodOptional<z.ZodString>;
40709
40854
  billing_anchor: z.ZodOptional<z.ZodString>;
40710
40855
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
40711
40856
  dynamic: "dynamic";
@@ -51533,6 +51678,7 @@ export declare const createSubscriptionBodyWire: z.ZodObject<{
51533
51678
  }, z.core.$strict>>;
51534
51679
  }, z.core.$strict>>;
51535
51680
  }, z.core.$strict>>;
51681
+ starting_phase: z.ZodOptional<z.ZodString>;
51536
51682
  billing_anchor: z.ZodOptional<z.ZodString>;
51537
51683
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
51538
51684
  dynamic: "dynamic";
@@ -52510,6 +52656,7 @@ export declare const changeSubscriptionBodyWire: z.ZodObject<{
52510
52656
  }, z.core.$strict>>;
52511
52657
  }, z.core.$strict>>;
52512
52658
  }, z.core.$strict>>;
52659
+ starting_phase: z.ZodOptional<z.ZodString>;
52513
52660
  billing_anchor: z.ZodOptional<z.ZodString>;
52514
52661
  cost_basis_mode: z.ZodOptional<z.ZodEnum<{
52515
52662
  dynamic: "dynamic";
@@ -53504,6 +53651,131 @@ export declare const getSubscriptionAddonResponseWire: z.ZodObject<{
53504
53651
  affected_subscription_item_ids: z.ZodArray<z.ZodString>;
53505
53652
  }, z.core.$strict>>;
53506
53653
  }, z.core.$strict>;
53654
+ export declare const updateSubscriptionAddonPathParamsWire: z.ZodObject<{
53655
+ subscriptionId: z.ZodString;
53656
+ subscriptionAddonId: z.ZodString;
53657
+ }, z.core.$strip>;
53658
+ export declare const updateSubscriptionAddonBodyWire: z.ZodObject<{
53659
+ quantity: z.ZodNumber;
53660
+ timing: z.ZodUnion<readonly [z.ZodEnum<{
53661
+ immediate: "immediate";
53662
+ next_billing_cycle: "next_billing_cycle";
53663
+ }>, z.ZodString]>;
53664
+ }, z.core.$strict>;
53665
+ export declare const updateSubscriptionAddonResponseWire: z.ZodObject<{
53666
+ id: z.ZodString;
53667
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
53668
+ created_at: z.ZodString;
53669
+ updated_at: z.ZodString;
53670
+ deleted_at: z.ZodOptional<z.ZodString>;
53671
+ name: z.ZodString;
53672
+ description: z.ZodOptional<z.ZodString>;
53673
+ addon: z.ZodObject<{
53674
+ id: z.ZodString;
53675
+ }, z.core.$strict>;
53676
+ quantity: z.ZodNumber;
53677
+ quantity_at: z.ZodString;
53678
+ active_from: z.ZodString;
53679
+ active_to: z.ZodOptional<z.ZodString>;
53680
+ timeline: z.ZodArray<z.ZodObject<{
53681
+ active_from: z.ZodString;
53682
+ active_to: z.ZodOptional<z.ZodString>;
53683
+ quantity: z.ZodNumber;
53684
+ }, z.core.$strict>>;
53685
+ rate_cards: z.ZodArray<z.ZodObject<{
53686
+ rate_card: z.ZodObject<{
53687
+ name: z.ZodString;
53688
+ description: z.ZodOptional<z.ZodString>;
53689
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
53690
+ key: z.ZodString;
53691
+ feature: z.ZodOptional<z.ZodObject<{
53692
+ id: z.ZodString;
53693
+ }, z.core.$strict>>;
53694
+ currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
53695
+ billing_cadence: z.ZodOptional<z.ZodString>;
53696
+ price: z.ZodDiscriminatedUnion<[z.ZodObject<{
53697
+ type: z.ZodLiteral<"free">;
53698
+ }, z.core.$strict>, z.ZodObject<{
53699
+ type: z.ZodLiteral<"flat">;
53700
+ amount: z.ZodString;
53701
+ }, z.core.$strict>, z.ZodObject<{
53702
+ type: z.ZodLiteral<"unit">;
53703
+ amount: z.ZodString;
53704
+ }, z.core.$strict>, z.ZodObject<{
53705
+ type: z.ZodLiteral<"graduated">;
53706
+ tiers: z.ZodArray<z.ZodObject<{
53707
+ up_to_amount: z.ZodOptional<z.ZodString>;
53708
+ flat_price: z.ZodOptional<z.ZodObject<{
53709
+ type: z.ZodLiteral<"flat">;
53710
+ amount: z.ZodString;
53711
+ }, z.core.$strict>>;
53712
+ unit_price: z.ZodOptional<z.ZodObject<{
53713
+ type: z.ZodLiteral<"unit">;
53714
+ amount: z.ZodString;
53715
+ }, z.core.$strict>>;
53716
+ }, z.core.$strict>>;
53717
+ }, z.core.$strict>, z.ZodObject<{
53718
+ type: z.ZodLiteral<"volume">;
53719
+ tiers: z.ZodArray<z.ZodObject<{
53720
+ up_to_amount: z.ZodOptional<z.ZodString>;
53721
+ flat_price: z.ZodOptional<z.ZodObject<{
53722
+ type: z.ZodLiteral<"flat">;
53723
+ amount: z.ZodString;
53724
+ }, z.core.$strict>>;
53725
+ unit_price: z.ZodOptional<z.ZodObject<{
53726
+ type: z.ZodLiteral<"unit">;
53727
+ amount: z.ZodString;
53728
+ }, z.core.$strict>>;
53729
+ }, z.core.$strict>>;
53730
+ }, z.core.$strict>], "type">;
53731
+ unit_config: z.ZodOptional<z.ZodObject<{
53732
+ operation: z.ZodEnum<{
53733
+ divide: "divide";
53734
+ multiply: "multiply";
53735
+ }>;
53736
+ conversion_factor: z.ZodString;
53737
+ rounding: z.ZodOptional<z.ZodEnum<{
53738
+ ceiling: "ceiling";
53739
+ floor: "floor";
53740
+ half_up: "half_up";
53741
+ none: "none";
53742
+ }>>;
53743
+ precision: z.ZodOptional<z.ZodNumber>;
53744
+ display_unit: z.ZodOptional<z.ZodString>;
53745
+ }, z.core.$strict>>;
53746
+ payment_term: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"in_advance">, z.ZodLiteral<"in_arrears">]>>;
53747
+ commitments: z.ZodOptional<z.ZodObject<{
53748
+ minimum_amount: z.ZodOptional<z.ZodString>;
53749
+ maximum_amount: z.ZodOptional<z.ZodString>;
53750
+ }, z.core.$strict>>;
53751
+ discounts: z.ZodOptional<z.ZodObject<{
53752
+ percentage: z.ZodOptional<z.ZodNumber>;
53753
+ usage: z.ZodOptional<z.ZodString>;
53754
+ }, z.core.$strict>>;
53755
+ tax_config: z.ZodOptional<z.ZodObject<{
53756
+ behavior: z.ZodOptional<z.ZodEnum<{
53757
+ exclusive: "exclusive";
53758
+ inclusive: "inclusive";
53759
+ }>>;
53760
+ code: z.ZodObject<{
53761
+ id: z.ZodString;
53762
+ }, z.core.$strict>;
53763
+ }, z.core.$strict>>;
53764
+ entitlement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
53765
+ type: z.ZodLiteral<"metered">;
53766
+ is_soft_limit: z.ZodOptional<z.ZodBoolean>;
53767
+ limit: z.ZodOptional<z.ZodNumber>;
53768
+ usage_period: z.ZodOptional<z.ZodString>;
53769
+ }, z.core.$strict>, z.ZodObject<{
53770
+ type: z.ZodLiteral<"static">;
53771
+ config: z.ZodUnknown;
53772
+ }, z.core.$strict>, z.ZodObject<{
53773
+ type: z.ZodLiteral<"boolean">;
53774
+ }, z.core.$strict>], "type">>;
53775
+ }, z.core.$strict>;
53776
+ affected_subscription_item_ids: z.ZodArray<z.ZodString>;
53777
+ }, z.core.$strict>>;
53778
+ }, z.core.$strict>;
53507
53779
  export declare const listAppsQueryParamsWire: z.ZodObject<{
53508
53780
  page: z.ZodOptional<z.ZodObject<{
53509
53781
  size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -3246,6 +3246,16 @@ export const createSubscriptionAddonRequest = z
3246
3246
  timing: subscriptionEditTiming,
3247
3247
  })
3248
3248
  .describe('SubscriptionAddon create request.');
3249
+ export const subscriptionAddonUpdate = z
3250
+ .object({
3251
+ quantity: z
3252
+ .number()
3253
+ .int()
3254
+ .nonnegative()
3255
+ .describe('The new quantity of the add-on. Must be at least 0. A quantity of 0 removes the add-on from the point the timing resolves to.'),
3256
+ timing: subscriptionEditTiming,
3257
+ })
3258
+ .describe('Request for updating a subscription add-on. Only the quantity can be changed; the timing controls when the new quantity takes effect.');
3249
3259
  export const createTaxCodeRequest = z
3250
3260
  .object({
3251
3261
  name: z
@@ -4814,6 +4824,11 @@ export const subscriptionCreate = z.object({
4814
4824
  .optional()
4815
4825
  .describe('A reference to a published plan the subscription is created from. Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the subscription on an existing published plan; use `custom_plan` to define the plan inline.'),
4816
4826
  customPlan: subscriptionCustomPlan.optional(),
4827
+ startingPhase: z
4828
+ .string()
4829
+ .min(1)
4830
+ .optional()
4831
+ .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.'),
4817
4832
  billingAnchor: dateTime.optional(),
4818
4833
  costBasisMode: subscriptionCostBasisMode.optional().default('dynamic'),
4819
4834
  });
@@ -4840,6 +4855,11 @@ export const subscriptionChange = z
4840
4855
  .optional()
4841
4856
  .describe('A reference to a published plan the subscription is created from. Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the subscription on an existing published plan; use `custom_plan` to define the plan inline.'),
4842
4857
  customPlan: subscriptionCustomPlan.optional(),
4858
+ startingPhase: z
4859
+ .string()
4860
+ .min(1)
4861
+ .optional()
4862
+ .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.'),
4843
4863
  billingAnchor: dateTime.optional(),
4844
4864
  costBasisMode: subscriptionCostBasisMode.optional().default('dynamic'),
4845
4865
  timing: subscriptionEditTiming,
@@ -5353,6 +5373,12 @@ export const getSubscriptionAddonPathParams = z.object({
5353
5373
  subscriptionAddonId: ulid,
5354
5374
  });
5355
5375
  export const getSubscriptionAddonResponse = subscriptionAddon;
5376
+ export const updateSubscriptionAddonPathParams = z.object({
5377
+ subscriptionId: ulid,
5378
+ subscriptionAddonId: ulid,
5379
+ });
5380
+ export const updateSubscriptionAddonBody = subscriptionAddonUpdate;
5381
+ export const updateSubscriptionAddonResponse = subscriptionAddon;
5356
5382
  export const listAppsQueryParams = z.object({
5357
5383
  page: z
5358
5384
  .object({
@@ -9012,6 +9038,16 @@ export const createSubscriptionAddonRequestWire = z
9012
9038
  timing: subscriptionEditTimingWire,
9013
9039
  })
9014
9040
  .describe('SubscriptionAddon create request.');
9041
+ export const subscriptionAddonUpdateWire = z
9042
+ .strictObject({
9043
+ quantity: z
9044
+ .number()
9045
+ .int()
9046
+ .nonnegative()
9047
+ .describe('The new quantity of the add-on. Must be at least 0. A quantity of 0 removes the add-on from the point the timing resolves to.'),
9048
+ timing: subscriptionEditTimingWire,
9049
+ })
9050
+ .describe('Request for updating a subscription add-on. Only the quantity can be changed; the timing controls when the new quantity takes effect.');
9015
9051
  export const createTaxCodeRequestWire = z
9016
9052
  .strictObject({
9017
9053
  name: z
@@ -10575,6 +10611,11 @@ export const subscriptionCreateWire = z.strictObject({
10575
10611
  .optional()
10576
10612
  .describe('A reference to a published plan the subscription is created from. Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the subscription on an existing published plan; use `custom_plan` to define the plan inline.'),
10577
10613
  custom_plan: subscriptionCustomPlanWire.optional(),
10614
+ starting_phase: z
10615
+ .string()
10616
+ .min(1)
10617
+ .optional()
10618
+ .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.'),
10578
10619
  billing_anchor: dateTimeWire.optional(),
10579
10620
  cost_basis_mode: subscriptionCostBasisModeWire.optional(),
10580
10621
  });
@@ -10601,6 +10642,11 @@ export const subscriptionChangeWire = z
10601
10642
  .optional()
10602
10643
  .describe('A reference to a published plan the subscription is created from. Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the subscription on an existing published plan; use `custom_plan` to define the plan inline.'),
10603
10644
  custom_plan: subscriptionCustomPlanWire.optional(),
10645
+ starting_phase: z
10646
+ .string()
10647
+ .min(1)
10648
+ .optional()
10649
+ .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.'),
10604
10650
  billing_anchor: dateTimeWire.optional(),
10605
10651
  cost_basis_mode: subscriptionCostBasisModeWire.optional(),
10606
10652
  timing: subscriptionEditTimingWire,
@@ -11135,6 +11181,12 @@ export const getSubscriptionAddonPathParamsWire = z.object({
11135
11181
  subscriptionAddonId: ulidWire,
11136
11182
  });
11137
11183
  export const getSubscriptionAddonResponseWire = subscriptionAddonWire;
11184
+ export const updateSubscriptionAddonPathParamsWire = z.object({
11185
+ subscriptionId: ulidWire,
11186
+ subscriptionAddonId: ulidWire,
11187
+ });
11188
+ export const updateSubscriptionAddonBodyWire = subscriptionAddonUpdateWire;
11189
+ export const updateSubscriptionAddonResponseWire = subscriptionAddonWire;
11138
11190
  export const listAppsQueryParamsWire = z.object({
11139
11191
  page: z
11140
11192
  .strictObject({
@@ -3190,6 +3190,22 @@ export interface CreateSubscriptionAddonRequest {
3190
3190
  */
3191
3191
  timing: SubscriptionEditTiming;
3192
3192
  }
3193
+ /**
3194
+ * Request for updating a subscription add-on. Only the quantity can be changed;
3195
+ * the timing controls when the new quantity takes effect.
3196
+ */
3197
+ export interface SubscriptionAddonUpdate {
3198
+ /**
3199
+ * The new quantity of the add-on. Must be at least 0. A quantity of 0 removes the
3200
+ * add-on from the point the timing resolves to.
3201
+ */
3202
+ quantity: number;
3203
+ /**
3204
+ * The timing of the update. A new entry is appended to the add-on's timeline at
3205
+ * this point.
3206
+ */
3207
+ timing: SubscriptionEditTiming;
3208
+ }
3193
3209
  /** TaxCode create request. */
3194
3210
  export interface CreateTaxCodeRequest {
3195
3211
  /**
@@ -5620,6 +5636,14 @@ export interface SubscriptionCreate {
5620
5636
  * linked to a persisted plan, so the response omits the `plan` reference.
5621
5637
  */
5622
5638
  customPlan?: SubscriptionCustomPlan;
5639
+ /**
5640
+ * The key of the phase to start the subscription in. If not provided, the
5641
+ * subscription starts in the first phase of the plan.
5642
+ *
5643
+ * Only applies when creating from a published `plan`; custom plans define their
5644
+ * own phases inline.
5645
+ */
5646
+ startingPhase?: string;
5623
5647
  /**
5624
5648
  * A billing anchor is the fixed point in time that determines the subscription's
5625
5649
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -5674,6 +5698,14 @@ export interface SubscriptionChange {
5674
5698
  * linked to a persisted plan, so the response omits the `plan` reference.
5675
5699
  */
5676
5700
  customPlan?: SubscriptionCustomPlan;
5701
+ /**
5702
+ * The key of the phase to start the subscription in. If not provided, the
5703
+ * subscription starts in the first phase of the plan.
5704
+ *
5705
+ * Only applies when creating from a published `plan`; custom plans define their
5706
+ * own phases inline.
5707
+ */
5708
+ startingPhase?: string;
5677
5709
  /**
5678
5710
  * A billing anchor is the fixed point in time that determines the subscription's
5679
5711
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -8133,6 +8165,14 @@ export interface SubscriptionCreateInput {
8133
8165
  * linked to a persisted plan, so the response omits the `plan` reference.
8134
8166
  */
8135
8167
  customPlan?: SubscriptionCustomPlanInput;
8168
+ /**
8169
+ * The key of the phase to start the subscription in. If not provided, the
8170
+ * subscription starts in the first phase of the plan.
8171
+ *
8172
+ * Only applies when creating from a published `plan`; custom plans define their
8173
+ * own phases inline.
8174
+ */
8175
+ startingPhase?: string;
8136
8176
  /**
8137
8177
  * A billing anchor is the fixed point in time that determines the subscription's
8138
8178
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -8187,6 +8227,14 @@ export interface SubscriptionChangeInput {
8187
8227
  * linked to a persisted plan, so the response omits the `plan` reference.
8188
8228
  */
8189
8229
  customPlan?: SubscriptionCustomPlanInput;
8230
+ /**
8231
+ * The key of the phase to start the subscription in. If not provided, the
8232
+ * subscription starts in the first phase of the plan.
8233
+ *
8234
+ * Only applies when creating from a published `plan`; custom plans define their
8235
+ * own phases inline.
8236
+ */
8237
+ startingPhase?: string;
8190
8238
  /**
8191
8239
  * A billing anchor is the fixed point in time that determines the subscription's
8192
8240
  * recurring billing cycle. It affects when charges occur and how prorations are
@@ -1,7 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
3
  import type { VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
4
- import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
5
4
  import type { ListAppsRequest, ListAppsResponse, UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
6
5
  import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
7
6
  import type { ListCurrenciesRequest, ListCurrenciesResponse, CreateCustomCurrencyRequest, CreateCustomCurrencyResponse, GetCustomCurrencyRequest, GetCustomCurrencyResponse, ListCostBasesRequest, ListCostBasesResponse, CreateCostBasisRequest, CreateCostBasisResponse } from '../models/operations/currencies.js';
@@ -18,8 +17,6 @@ export declare class Internal {
18
17
  constructor(_client: Client);
19
18
  private _customers?;
20
19
  get customers(): InternalCustomers;
21
- private _subscriptions?;
22
- get subscriptions(): InternalSubscriptions;
23
20
  private _apps?;
24
21
  get apps(): InternalApps;
25
22
  private _invoices?;
@@ -101,18 +98,6 @@ export declare class InternalCustomersCharges {
101
98
  */
102
99
  create(request: CreateCustomerChargesRequest, options?: RequestOptions): Promise<CreateCustomerChargesResponse>;
103
100
  }
104
- export declare class InternalSubscriptions {
105
- private readonly _client;
106
- constructor(_client: Client);
107
- /**
108
- * Create a new subscription add-on
109
- *
110
- * Add add-on to a subscription.
111
- *
112
- * POST /openmeter/subscriptions/{subscriptionId}/addons
113
- */
114
- createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
115
- }
116
101
  export declare class InternalApps {
117
102
  private readonly _client;
118
103
  constructor(_client: Client);
@@ -2,7 +2,6 @@
2
2
  import { unwrap } from '../lib/types.js';
3
3
  import { paginatePages } from '../lib/paginate.js';
4
4
  import { voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
5
- import { createSubscriptionAddon } from '../funcs/subscriptions.js';
6
5
  import { listApps, uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
7
6
  import { listInvoices, getInvoice, updateInvoice, deleteInvoice, advanceInvoice, approveInvoice, retryInvoice, snapshotQuantitiesInvoice, } from '../funcs/invoices.js';
8
7
  import { listCurrencies, createCustomCurrency, getCustomCurrency, listCostBases, createCostBasis, } from '../funcs/currencies.js';
@@ -22,10 +21,6 @@ export class Internal {
22
21
  get customers() {
23
22
  return (this._customers ??= new InternalCustomers(this._client));
24
23
  }
25
- _subscriptions;
26
- get subscriptions() {
27
- return (this._subscriptions ??= new InternalSubscriptions(this._client));
28
- }
29
24
  _apps;
30
25
  get apps() {
31
26
  return (this._apps ??= new InternalApps(this._client));
@@ -139,22 +134,6 @@ export class InternalCustomersCharges {
139
134
  return unwrap(await createCustomerCharges(this._client, request, options));
140
135
  }
141
136
  }
142
- export class InternalSubscriptions {
143
- _client;
144
- constructor(_client) {
145
- this._client = _client;
146
- }
147
- /**
148
- * Create a new subscription add-on
149
- *
150
- * Add add-on to a subscription.
151
- *
152
- * POST /openmeter/subscriptions/{subscriptionId}/addons
153
- */
154
- async createAddon(request, options) {
155
- return unwrap(await createSubscriptionAddon(this._client, request, options));
156
- }
157
- }
158
137
  export class InternalApps {
159
138
  _client;
160
139
  constructor(_client) {
@@ -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, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse } from '../models/operations/subscriptions.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';
4
4
  import type { Subscription, SubscriptionAddon } from '../models/types.js';
5
5
  export declare class Subscriptions {
6
6
  private readonly _client;
@@ -68,6 +68,14 @@ export declare class Subscriptions {
68
68
  * POST /openmeter/subscriptions/{subscriptionId}/edit
69
69
  */
70
70
  edit(request: EditSubscriptionRequest, options?: RequestOptions): Promise<EditSubscriptionResponse>;
71
+ /**
72
+ * Create a new subscription add-on
73
+ *
74
+ * Add add-on to a subscription.
75
+ *
76
+ * POST /openmeter/subscriptions/{subscriptionId}/addons
77
+ */
78
+ createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
71
79
  /**
72
80
  * List subscription addons
73
81
  *
@@ -94,4 +102,14 @@ export declare class Subscriptions {
94
102
  * GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
95
103
  */
96
104
  getAddon(request: GetSubscriptionAddonRequest, options?: RequestOptions): Promise<GetSubscriptionAddonResponse>;
105
+ /**
106
+ * Update subscription addon
107
+ *
108
+ * Update a subscription add-on. Only the quantity is mutable; the timing controls
109
+ * when the new quantity takes effect. A new entry is appended to the add-on's
110
+ * timeline.
111
+ *
112
+ * PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
113
+ */
114
+ updateAddon(request: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise<UpdateSubscriptionAddonResponse>;
97
115
  }
@@ -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, listSubscriptionAddons, getSubscriptionAddon, } from '../funcs/subscriptions.js';
4
+ import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, editSubscription, createSubscriptionAddon, listSubscriptionAddons, getSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
5
5
  export class Subscriptions {
6
6
  _client;
7
7
  constructor(_client) {
@@ -86,6 +86,16 @@ export class Subscriptions {
86
86
  async edit(request, options) {
87
87
  return unwrap(await editSubscription(this._client, request, options));
88
88
  }
89
+ /**
90
+ * Create a new subscription add-on
91
+ *
92
+ * Add add-on to a subscription.
93
+ *
94
+ * POST /openmeter/subscriptions/{subscriptionId}/addons
95
+ */
96
+ async createAddon(request, options) {
97
+ return unwrap(await createSubscriptionAddon(this._client, request, options));
98
+ }
89
99
  /**
90
100
  * List subscription addons
91
101
  *
@@ -118,4 +128,16 @@ export class Subscriptions {
118
128
  async getAddon(request, options) {
119
129
  return unwrap(await getSubscriptionAddon(this._client, request, options));
120
130
  }
131
+ /**
132
+ * Update subscription addon
133
+ *
134
+ * Update a subscription add-on. Only the quantity is mutable; the timing controls
135
+ * when the new quantity takes effect. A new entry is appended to the add-on's
136
+ * timeline.
137
+ *
138
+ * PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
139
+ */
140
+ async updateAddon(request, options) {
141
+ return unwrap(await updateSubscriptionAddon(this._client, request, options));
142
+ }
121
143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-a067c274ff4a",
3
+ "version": "1.0.0-beta-c6281b22fddd",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",