@wix/auto_sdk_subscription_billing-settings 1.0.0 → 1.0.1

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/prime-auto-v1-billing-settings-billing-settings.universal.ts","../../src/prime-auto-v1-billing-settings-billing-settings.http.ts"],"sourcesContent":["export * from './src/prime-auto-v1-billing-settings-billing-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPrimeAutoV1BillingSettings from './prime-auto-v1-billing-settings-billing-settings.http.js';\n\nexport interface BillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface GracePeriodSettings extends GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n /** Flag that represent if grace period feature is enabled */\n enabled?: boolean;\n /** model type of grace period amount */\n modelType?: ModelTypeWithLiterals;\n /**\n * Automatic retry settings that control whether and how payment should be retried during the subscription's grace period.\n * By default, automatic retry is disabled.\n */\n automaticRetrySettings?: AutomaticRetrySettings;\n}\n\n/** @oneof */\nexport interface GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n}\n\nexport enum ModelType {\n UNKNOWN = 'UNKNOWN',\n FIXED_DURATION = 'FIXED_DURATION',\n DURATION_BY_CYCLE_UNIT = 'DURATION_BY_CYCLE_UNIT',\n}\n\n/** @enumType */\nexport type ModelTypeWithLiterals =\n | ModelType\n | 'UNKNOWN'\n | 'FIXED_DURATION'\n | 'DURATION_BY_CYCLE_UNIT';\n\nexport interface FixedDuration extends FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\n/** @oneof */\nexport interface FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\nexport interface DurationByCycleUnit {\n /** @max 1 */\n daysForDailyCycles?: number;\n /** @max 6 */\n daysForWeeklyCycles?: number;\n /** @max 27 */\n daysForMonthlyCycles?: number;\n /** @max 60 */\n daysForYearlyCycles?: number;\n}\n\nexport interface AutomaticRetrySettings {\n enabled?: boolean;\n}\n\nexport interface TaxSettings extends TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\n/** @oneof */\nexport interface TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\nexport interface GlobalTaxSettings {\n /** This flag will be set on Subscription, if true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface DynamicTaxSettings {}\n\nexport interface InvoicesSettings {\n enabled?: boolean;\n}\n\nexport interface PlatformFeeSettings {\n /**\n * Map of vertical app ID to platform fee config\n * Key: vertical app_id (GUID as string). Missing entry → defaults to 0% (no fee).\n * Value: platform fee configuration\n * To DELETE an entry, send a PlatformFeeConfig with the vertical's app_id as key and an empty fee_model (neither absorb nor pass_on set).\n */\n verticalConfigs?: Record<string, PlatformFeeConfig>;\n}\n\nexport interface PlatformFeeConfig extends PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:4 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/**\n * Per-action merchant configuration for customer self-service actions.\n * All booleans use BoolValue (optional) so verticals can selectively override defaults.\n */\nexport interface CustomerActionSettings {\n /** Skip cycle action settings */\n skip?: SkipActionSettings;\n /** Pause/resume action settings */\n pauseResume?: PauseResumeActionSettings;\n /** Cancel action settings */\n cancel?: CancelActionSettings;\n /** Update payment method action settings */\n upm?: UpmActionSettings;\n /** Update billing date action settings */\n updateBillingDate?: UpdateBillingDateActionSettings;\n}\n\n/** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */\nexport interface SkipActionSettings {\n /** Whether the skip action is enabled */\n enabled?: boolean | null;\n /** Skip action configuration */\n configuration?: SkipActionConfiguration;\n}\n\n/** Configuration for the skip cycle action. */\nexport interface SkipActionConfiguration {\n /** Maximum number of billing cycles a customer can skip */\n maxSkipCycles?: number | null;\n /** Minimum days before billing date to allow skip */\n daysBeforeSkipAllowed?: number | null;\n /** Minimum days before billing date to allow resume from skip */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing date to cancel a scheduled skip */\n daysBeforeCancelSkipAllowed?: number | null;\n /** Maximum number of times a customer can perform skip action */\n maxSkipUserActions?: number | null;\n /** Allow skipping the next billing cycle */\n skipNextCycle?: boolean | null;\n /** Allow skipping future billing cycles */\n skipFutureCycles?: boolean | null;\n /** Allow reversing a pending skip */\n unskip?: boolean | null;\n /** Allow cancelling a scheduled skip-pause */\n cancelScheduledPause?: boolean | null;\n /** Allow immediate resume from skip */\n resumeImmediately?: boolean | null;\n /** Allow resume at the next billing date */\n resumeAtNextBillingDate?: boolean | null;\n /** Allow resume at a specific date */\n resumeAtSpecificDate?: boolean | null;\n /** Allow setting auto-resume after N cycles */\n autoResumeCycles?: boolean | null;\n}\n\n/**\n * Subscription pause/resume settings — full pause of billing, not skip.\n * Skip action (temporary pause for N cycles) is configured via SkipActionSettings.\n */\nexport interface PauseResumeActionSettings {\n /** Whether the pause/resume action is enabled */\n enabled?: boolean | null;\n /** Pause/resume action configuration */\n configuration?: PauseResumeActionConfiguration;\n}\n\n/**\n * Configuration for the subscription pause/resume action.\n * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration.\n */\nexport interface PauseResumeActionConfiguration {\n /** Minimum days before billing date to allow pause */\n daysBeforePauseAllowed?: number | null;\n /** Maximum cycles for auto-resume after pause */\n maxAutoResumeCycles?: number | null;\n /** Minimum days before billing date to allow resume */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing to cancel scheduled pause */\n daysBeforeCancelScheduledPauseAllowed?: number | null;\n /** Maximum number of times a customer can perform pause action */\n maxPauseUserActions?: number | null;\n}\n\n/** Cancel subscription action settings. */\nexport interface CancelActionSettings {\n /** Whether the cancel action is enabled */\n enabled?: boolean | null;\n /** Cancel action configuration */\n configuration?: CancelActionConfiguration;\n}\n\n/** Configuration for the cancel subscription action. */\nexport interface CancelActionConfiguration {\n /** Minimum days before period end to allow cancellation */\n minDaysBeforePeriodEnd?: number | null;\n}\n\n/** Update Payment Method action settings — toggle only, no additional configuration. */\nexport interface UpmActionSettings {\n /** Whether the update payment method action is enabled */\n enabled?: boolean | null;\n}\n\n/** Update billing date action settings. */\nexport interface UpdateBillingDateActionSettings {\n /** Whether the update billing date action is enabled */\n enabled?: boolean | null;\n /** Update billing date configuration */\n configuration?: UpdateBillingDateActionConfiguration;\n}\n\n/** Configuration for the update billing date action. */\nexport interface UpdateBillingDateActionConfiguration {\n /** Whether to adjust price when billing date changes */\n priceAdjustmentEnabled?: boolean | null;\n /** Maximum days the billing date can be moved forward */\n maxDaysAdvance?: number | null;\n /** Maximum days the billing date can be postponed */\n maxDaysPostpone?: number | null;\n /** Minimum days from today for the new billing date */\n minDaysFromToday?: number | null;\n /** Whether to allow advancing billing date for weekly subscriptions */\n allowAdvanceForWeekly?: boolean | null;\n}\n\n/**\n * Customer settings scoped to a single vertical (Stores, Pricing\n * Plans, Bookings, ...). Carries a vertical-wide default and optional\n * per-entity overrides.\n *\n * Vertical-level opt-in (whether this vertical uses the new\n * BBS-based flow at all) is owned by SubscriptionService's\n * VerticalSettingsFacade, not by a field on this message. The\n * resolver invokes the facade first; only opted-in verticals reach\n * the inner resolution below. Non-opted-in verticals fall back to\n * the legacy `SubscriptionPolicies` boolean path (see plan.md)\n * without consulting `customer_settings_by_app_def_id` at all.\n *\n * Inner resolution for an action on entity X within an opted-in\n * vertical:\n * 1. If `settings_by_entity_id` has key X, use that value.\n * 2. Otherwise, use `default_settings`.\n * 3. If the resolved value is unset, every action resolves to\n * disabled (CustomerSettings field defaults).\n */\nexport interface VerticalCustomerSettings {\n /**\n * Default customer settings for this vertical, applied when\n * `settings_by_entity_id` has no entry for the current entity.\n * Unset = every action disabled.\n */\n defaultSettings?: CustomerSettings;\n /**\n * Per-entity overrides, keyed by the entity ID this vertical owns\n * (product ID for Stores, plan ID for Pricing Plans, element ID\n * for catalog-style verticals). UUID-format string. Empty map =\n * no overrides; every entity resolves to `default_settings`.\n * Override semantics: full-replace (proto-redesign.md S8.4).\n */\n settingsByEntityId?: Record<string, CustomerSettings>;\n}\n\n/**\n * Configuration of the five self-service actions a merchant's\n * end-customers can perform on their subscriptions. Scoping (per\n * tenant -> per vertical -> per entity) is handled by\n * VerticalCustomerSettings plus a map field on BillingSettings keyed\n * by Wix app_def_id.\n *\n * Terminology: \"customer\" here means the merchant's end-customer --\n * i.e., the \"User of a User\" (UoU) in the CDD project name. Throughout\n * BASS, unprefixed `Customer` always refers to this UoU; the prefixed\n * `WixCustomer` (see billing-wix-customer-mgmt,\n * billing-wix-customer-notifications) refers to the merchant\n * (Wix's customer).\n *\n * Source of truth: wix-private/premium-billing-cdd/projects/uou-settings/.\n *\n * Semantics:\n * * Each action defaults to disabled. An action is allowed only when\n * its submessage is present AND `enabled = true`.\n * * Unset config scalars resolve to the per-field defaults documented\n * in pm/product-hub.md.\n *\n * Naming: AIP-140 (no prepositions; no verbs; adjectives precede nouns)\n * and AIP-141 (unit suffixes on quantities, `per` for inverse units).\n */\nexport interface CustomerSettings {\n skipAction?: SkipAction;\n pauseResumeAction?: PauseResumeAction;\n cancelAction?: CancelAction;\n updatePaymentMethodAction?: UpdatePaymentMethodAction;\n updateBillingDateAction?: UpdateBillingDateAction;\n changeAction?: ChangeActionConfig;\n updateItemsAction?: UpdateItemsAction;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Skip -- skip billing cycles without changing the billing anchor.\n * CDD: pm/product-hub.md \"Skip Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface SkipAction {\n enabled?: boolean;\n config?: SkipActionConfig;\n}\n\nexport interface SkipActionConfig {\n /**\n * Min days notice the customer must give before a scheduled skip\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active skip,\n * measured against that skip's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress skip (return to billing before all configured skip\n * cycles are consumed). Measured against the start of the cycle\n * the customer wants billed; early-end always takes effect at a\n * cycle boundary, never mid-cycle. The natural end of the skip\n * (configured skip cycles complete) is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /** Max cycles a single skip event may span. Default 5. Range 1-10. */\n maxCyclesPerSkip?: number | null;\n /**\n * Lifetime cap on user-initiated skips for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Pause/Resume -- pause shifts the billing anchor; resume manually or\n * auto-resume after N cycles. Distinct from Skip, which does not\n * shift the anchor.\n * CDD: pm/product-hub.md \"Advanced Pause/Resume Action Configuration\".\n * The CDD's \"Advanced\" qualifier disambiguates from Skip in prose; in\n * this proto Skip has its own message, so the qualifier is dropped\n * per AIP-140 (avoid adjectives that always apply).\n * ---------------------------------------------------------------------------\n */\nexport interface PauseResumeAction {\n enabled?: boolean;\n config?: PauseResumeActionConfig;\n}\n\nexport interface PauseResumeActionConfig {\n /**\n * Min days notice the customer must give before a scheduled pause\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active pause,\n * measured against that pause's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress pause (resume billing before the customer-chosen\n * auto-resume cycle count completes). Measured against the start\n * of the cycle the customer wants billed; early-end always takes\n * effect at a cycle boundary, never mid-cycle. Automatic auto-resume\n * after `max_auto_resume_cycles` is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /**\n * Merchant cap on the number of cycles the customer may choose for\n * cycle-based auto-resume of a pause. Unset = no merchant cap\n * (backend hard limit 10). Range 1-10.\n */\n maxAutoResumeCycles?: number | null;\n /**\n * Lifetime cap on user-initiated pauses for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Cancel -- end the subscription.\n * CDD: pm/product-hub.md \"Cancel Action Configuration\".\n * pm/decisions.md 2026-02-17: single-select; \"Min Days Before Period\n * End\" dropped; \"Immediate with Proration\" excluded from V1.\n * ---------------------------------------------------------------------------\n */\nexport interface CancelAction {\n enabled?: boolean;\n config?: CancelActionConfig;\n}\n\nexport interface CancelActionConfig {\n /**\n * Timing of a customer cancellation: end of current billing\n * period (default) or immediate. Defaults to END_OF_PERIOD when\n * unset.\n */\n cancellationTiming?: CancellationTimingWithLiterals;\n}\n\n/**\n * Nested per AIP-126 (enum used by only one message). Non-frozen:\n * value 3 is reserved for a future \"Immediate with Proration\" mode.\n */\nexport enum CancellationTiming {\n /** Server treats UNSPECIFIED as END_OF_PERIOD (CDD dev/architecture.md). */\n UNSPECIFIED = 'UNSPECIFIED',\n /**\n * Subscription continues until the end of the current billing\n * period, then does not renew. CDD default; CDD shorthand: \"EOP\".\n */\n END_OF_PERIOD = 'END_OF_PERIOD',\n /** Subscription ends immediately upon cancellation. */\n IMMEDIATE = 'IMMEDIATE',\n}\n\n/** @enumType */\nexport type CancellationTimingWithLiterals =\n | CancellationTiming\n | 'UNSPECIFIED'\n | 'END_OF_PERIOD'\n | 'IMMEDIATE';\n\n/**\n * ---------------------------------------------------------------------------\n * Update Payment Method (UPM) -- replace the payment method.\n * CDD: pm/product-hub.md \"Update Payment Method (UPM) Action\n * Configuration\". CDD has only `enabled`; no config submessage.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdatePaymentMethodAction {\n enabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Billing Date -- move the next billing date.\n * CDD: pm/product-hub.md \"Update Billing Date Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateBillingDateAction {\n enabled?: boolean;\n config?: UpdateBillingDateActionConfig;\n}\n\nexport interface UpdateBillingDateActionConfig {\n /**\n * When true: moving the billing date earlier prorates, moving it\n * later adds an extra charge. Default false.\n * CDD identifier: `priceAdjustmentEnabled`.\n */\n priceAdjustmentEnabled?: boolean;\n /**\n * Max days the new date may be earlier than the original. Unset =\n * no cap (backend default: within one cycle). Positive integer.\n * CDD identifier: `maxDaysAdvance` (renamed for AIP-141 unit suffix).\n */\n maxAdvanceDays?: number | null;\n /**\n * Max days the new date may be later than the original. Unset = no\n * cap (backend default: one cycle, or one month for cycles > a\n * month). Positive integer.\n * CDD identifier: `maxDaysPostpone` (renamed for AIP-141 unit suffix).\n */\n maxPostponeDays?: number | null;\n /**\n * Earliest the new date may be set, expressed as days from today.\n * Default 5 (backend hard floor). Integer >= 5. Does not apply to\n * weekly subscriptions (see `weekly_advance_enabled`).\n * CDD identifier: `minDaysFromToday`.\n */\n minTodayOffsetDays?: number | null;\n /**\n * Whether weekly subscriptions may move the billing date earlier.\n * Default false. CDD identifier: `allowAdvanceForWeekly` (renamed:\n * AIP-140 forbids verbs and the preposition \"for\").\n */\n weeklyAdvanceEnabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Change -- schedule a plan/cycle/quantity change for the next renewal.\n * CDD: bass-pending-change-contract pm/product-hub.md R8; BILL-864.\n * No `enabled` wrapper — absent = today's behaviour (trial hard-blocked,\n * grace allowed, no notice gate). Present = its values gate.\n * ---------------------------------------------------------------------------\n */\nexport interface ChangeActionConfig {\n /**\n * Allow scheduling a change while the subscription is on free trial.\n * Default false (proto3 zero). Absent config also blocks trial (today's\n * hard-coded `checkNotOnFreeTrial`).\n */\n allowDuringFreeTrial?: boolean;\n /**\n * Allow scheduling a change while the subscription is in grace period.\n * Default false (proto3 zero). Absent config ALLOWS grace (today's\n * behaviour — no grace check exists). This flag only takes effect when\n * the config message is present.\n */\n allowDuringGracePeriod?: boolean;\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n * Mirrors skip/pause `min_start_notice_days` convention.\n */\n minStartNoticeDays?: number;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Items -- add, update or remove items for the next billing cycle\n * (UpdateSubscriptionItems). Gates the customer UPDATE_SUBSCRIPTION_ITEMS action.\n * BILL-962: no free-trial / grace flags -- item updates only apply on the next cycle.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateItemsAction {\n enabled?: boolean;\n config?: UpdateItemsActionConfig;\n}\n\nexport interface UpdateItemsActionConfig {\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * Inside the window the customer can't update items.\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n}\n\nexport interface NearRenewalSettings {\n /** Key: vertical app_def_id (GUID). Missing entry → the caller's default lead. */\n verticalConfigs?: Record<string, NearRenewalConfig>;\n}\n\nexport interface NearRenewalConfig {\n /**\n * At most one entry per unit.\n * @maxSize 2\n */\n cycleLeads?: CycleLead[];\n}\n\nexport interface CycleLead {\n /** Billing cycle unit this lead applies to */\n unit?: CycleUnitWithLiterals;\n /**\n * Days before the charge to send the near-renewal notice. MONTH is at most 27 (shorter than February), enforced in the validator.\n * @min 1\n * @max 60\n */\n daysBeforeCharge?: number;\n}\n\nexport enum CycleUnit {\n UNKNOWN_CYCLE_UNIT = 'UNKNOWN_CYCLE_UNIT',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type CycleUnitWithLiterals =\n | CycleUnit\n | 'UNKNOWN_CYCLE_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport interface SettingsAction extends SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\n/** @oneof */\nexport interface SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\nexport interface InitializeDynamicTax {}\n\nexport interface GetBillingSettingsRequest {}\n\nexport interface GetBillingSettingsResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface GetVerticalCustomerSettingsRequest {\n /**\n * Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface GetVerticalCustomerSettingsResponse {\n /** Customer settings for the requested vertical; empty when none configured */\n verticalCustomerSettings?: VerticalCustomerSettings;\n}\n\nexport interface UpdateBillingSettingsRequest {\n /** BillingSettings to be updated, may be partial */\n billingSettings: BillingSettings;\n /**\n * Explicit list of fields to update\n * @internal\n */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteBillingSettingsRequest {\n /** string billing_settings_id = 1 [(.wix.api.format) = GUID]; // Id of the BillingSettings to delete */\n revision?: string;\n}\n\nexport interface DeleteBillingSettingsResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface GetBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n}\n\nexport interface GetBillingSettingsBackOfficeResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface UpdateBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /** BillingSettings to be updated, may be partial */\n billingSettings?: BillingSettings;\n /** Explicit list of fields to update */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsBackOfficeResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteByIdBackofficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /**\n * BillingSettings ID to delete\n * @format GUID\n */\n billingSettingsId?: string;\n /** The revision of the BillingSettings */\n revision?: string | null;\n}\n\nexport interface DeleteByIdBackofficeResponse {}\n\nexport interface GetBillingSettingsDefaultsRequest {}\n\nexport interface GetBillingSettingsDefaultsResponse {\n /** The defaults row; missing when it was never written */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\n/**\n * Defaults shared by all sites, stored in one single-tenant row. Written only by Wix staff via\n * UpdateBillingSettingsDefaults; GetBillingSettings returns its `near_renewal` on every site.\n */\nexport interface BillingSettingsDefaults {\n /**\n * BillingSettingsDefaults ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of the row. Pass the latest revision to update it; omit it to create the row */\n revision?: string | null;\n /**\n * Represents the time this BillingSettingsDefaults was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettingsDefaults was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Near-renewal notice lead per vertical */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface UpdateBillingSettingsDefaultsRequest {\n /** Defaults to write */\n billingSettingsDefaults?: BillingSettingsDefaults;\n /** Fields to update; only near_renewal is supported */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsDefaultsResponse {\n /** The written defaults row */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface BillingSettingsCreatedEnvelope {\n entity: BillingSettings;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.prime.auto.v1.billing_settings_created\n * @serviceIdentifier com.wixpress.billing.business.v1.BillingSettingsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onBillingSettingsCreated(\n handler: (event: BillingSettingsCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface BillingSettingsUpdatedEnvelope {\n entity: BillingSettings;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.prime.auto.v1.billing_settings_updated\n * @serviceIdentifier com.wixpress.billing.business.v1.BillingSettingsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onBillingSettingsUpdated(\n handler: (event: BillingSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Fetches BillingSettings and if not exists creates with default values\n * @public\n * @documentationMaturity preview\n * @permissionId BILLING.BUSINESS_BILLING_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings\n */\nexport async function getBillingSettings(): Promise<\n NonNullablePaths<\n GetBillingSettingsResponse,\n | `billingSettings.gracePeriod.fixedDuration.days`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles`\n | `billingSettings.gracePeriod.enabled`\n | `billingSettings.gracePeriod.modelType`\n | `billingSettings.gracePeriod.automaticRetrySettings.enabled`\n | `billingSettings.taxes.global.inclusive`\n | `billingSettings.invoices.enabled`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.getBillingSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings.\n * @param appDefId - Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @public\n * @documentationMaturity preview\n * @requiredField appDefId\n * @permissionId prime:auto:v1:billing_settings:get_vertical_customer_settings\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings\n */\nexport async function getVerticalCustomerSettings(\n appDefId: string\n): Promise<\n NonNullablePaths<\n GetVerticalCustomerSettingsResponse,\n | `verticalCustomerSettings.defaultSettings.skipAction.enabled`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minRevocationNoticeDays`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minEarlyEndNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.enabled`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minRevocationNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minEarlyEndNoticeDays`\n | `verticalCustomerSettings.defaultSettings.cancelAction.enabled`\n | `verticalCustomerSettings.defaultSettings.cancelAction.config.cancellationTiming`\n | `verticalCustomerSettings.defaultSettings.updatePaymentMethodAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.priceAdjustmentEnabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.weeklyAdvanceEnabled`\n | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringFreeTrial`\n | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringGracePeriod`\n | `verticalCustomerSettings.defaultSettings.changeAction.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.updateItemsAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateItemsAction.config.minStartNoticeDays`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appDefId: appDefId });\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.getVerticalCustomerSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appDefId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appDefId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n * @param _id - BillingSettings ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField billingSettings\n * @permissionId BILLING.BUSINESS_BILLING_SETTINGS_MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings\n */\nexport async function updateBillingSettings(\n _id: string,\n billingSettings: UpdateBillingSettings\n): Promise<\n NonNullablePaths<\n UpdateBillingSettingsResponse,\n | `billingSettings.gracePeriod.fixedDuration.days`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles`\n | `billingSettings.gracePeriod.enabled`\n | `billingSettings.gracePeriod.modelType`\n | `billingSettings.gracePeriod.automaticRetrySettings.enabled`\n | `billingSettings.taxes.global.inclusive`\n | `billingSettings.invoices.enabled`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n billingSettings: { ...billingSettings, id: _id },\n });\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.updateBillingSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { billingSettings: '$[1]' },\n explicitPathsToArguments: { 'billingSettings.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'billingSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateBillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'billingSettings.createdDate' },\n { path: 'billingSettings.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'mask' }];\n\nfunction resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n _: [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_billing-settings';\n\n/** Fetches BillingSettings and if not exists creates with default values */\nexport function getBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getBillingSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getBillingSettings;\n}\n\n/** Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings. */\nexport function getVerticalCustomerSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getVerticalCustomerSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getVerticalCustomerSettings;\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n */\nexport function updateBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateBillingSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/{billingSettings.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateBillingSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAAA;AAAA,EAAA,mCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;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,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,OAAO;AAAA,QAC7C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU;AAAA,IACb;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAcA,eAAsBE,uBACpB,KACA,iBAgBA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,iBAAiB,EAAE,GAAG,iBAAiB,IAAI,IAAI;AAAA,EACjD,CAAC;AAED,QAAM,UACoC,sBAAsB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,EAAE,iBAAiB,OAAO;AAAA,QAClD,0BAA0B,EAAE,sBAAsB,OAAO;AAAA,QACzD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,iBAAiB;AAAA,IAC3B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","import_timestamp","import_rest_modules","payload","ModelType","CancellationTiming","CycleUnit","WebhookIdentityType","getBillingSettings","sdkTransformError","getVerticalCustomerSettings","updateBillingSettings"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/prime-auto-v1-billing-settings-billing-settings.universal.ts","../../src/prime-auto-v1-billing-settings-billing-settings.http.ts"],"sourcesContent":["export * from './src/prime-auto-v1-billing-settings-billing-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPrimeAutoV1BillingSettings from './prime-auto-v1-billing-settings-billing-settings.http.js';\n\nexport interface BillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface GracePeriodSettings extends GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n /** Flag that represent if grace period feature is enabled */\n enabled?: boolean;\n /** model type of grace period amount */\n modelType?: ModelTypeWithLiterals;\n /**\n * Automatic retry settings that control whether and how payment should be retried during the subscription's grace period.\n * By default, automatic retry is disabled.\n */\n automaticRetrySettings?: AutomaticRetrySettings;\n}\n\n/** @oneof */\nexport interface GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n}\n\nexport enum ModelType {\n UNKNOWN = 'UNKNOWN',\n FIXED_DURATION = 'FIXED_DURATION',\n DURATION_BY_CYCLE_UNIT = 'DURATION_BY_CYCLE_UNIT',\n}\n\n/** @enumType */\nexport type ModelTypeWithLiterals =\n | ModelType\n | 'UNKNOWN'\n | 'FIXED_DURATION'\n | 'DURATION_BY_CYCLE_UNIT';\n\nexport interface FixedDuration extends FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\n/** @oneof */\nexport interface FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\nexport interface DurationByCycleUnit {\n /** @max 1 */\n daysForDailyCycles?: number;\n /** @max 6 */\n daysForWeeklyCycles?: number;\n /** @max 27 */\n daysForMonthlyCycles?: number;\n /** @max 60 */\n daysForYearlyCycles?: number;\n}\n\nexport interface AutomaticRetrySettings {\n enabled?: boolean;\n}\n\nexport interface TaxSettings extends TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\n/** @oneof */\nexport interface TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\nexport interface GlobalTaxSettings {\n /** This flag will be set on Subscription, if true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface DynamicTaxSettings {}\n\nexport interface InvoicesSettings {\n enabled?: boolean;\n}\n\nexport interface PlatformFeeSettings {\n /**\n * Map of vertical app ID to platform fee config\n * Key: vertical app_id (GUID as string). Missing entry → defaults to 0% (no fee).\n * Value: platform fee configuration\n * To DELETE an entry, send a PlatformFeeConfig with the vertical's app_id as key and an empty fee_model (neither absorb nor pass_on set).\n */\n verticalConfigs?: Record<string, PlatformFeeConfig>;\n}\n\nexport interface PlatformFeeConfig extends PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:4 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/**\n * Per-action merchant configuration for customer self-service actions.\n * All booleans use BoolValue (optional) so verticals can selectively override defaults.\n */\nexport interface CustomerActionSettings {\n /** Skip cycle action settings */\n skip?: SkipActionSettings;\n /** Pause/resume action settings */\n pauseResume?: PauseResumeActionSettings;\n /** Cancel action settings */\n cancel?: CancelActionSettings;\n /** Update payment method action settings */\n upm?: UpmActionSettings;\n /** Update billing date action settings */\n updateBillingDate?: UpdateBillingDateActionSettings;\n}\n\n/** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */\nexport interface SkipActionSettings {\n /** Whether the skip action is enabled */\n enabled?: boolean | null;\n /** Skip action configuration */\n configuration?: SkipActionConfiguration;\n}\n\n/** Configuration for the skip cycle action. */\nexport interface SkipActionConfiguration {\n /** Maximum number of billing cycles a customer can skip */\n maxSkipCycles?: number | null;\n /** Minimum days before billing date to allow skip */\n daysBeforeSkipAllowed?: number | null;\n /** Minimum days before billing date to allow resume from skip */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing date to cancel a scheduled skip */\n daysBeforeCancelSkipAllowed?: number | null;\n /** Maximum number of times a customer can perform skip action */\n maxSkipUserActions?: number | null;\n /** Allow skipping the next billing cycle */\n skipNextCycle?: boolean | null;\n /** Allow skipping future billing cycles */\n skipFutureCycles?: boolean | null;\n /** Allow reversing a pending skip */\n unskip?: boolean | null;\n /** Allow cancelling a scheduled skip-pause */\n cancelScheduledPause?: boolean | null;\n /** Allow immediate resume from skip */\n resumeImmediately?: boolean | null;\n /** Allow resume at the next billing date */\n resumeAtNextBillingDate?: boolean | null;\n /** Allow resume at a specific date */\n resumeAtSpecificDate?: boolean | null;\n /** Allow setting auto-resume after N cycles */\n autoResumeCycles?: boolean | null;\n}\n\n/**\n * Subscription pause/resume settings — full pause of billing, not skip.\n * Skip action (temporary pause for N cycles) is configured via SkipActionSettings.\n */\nexport interface PauseResumeActionSettings {\n /** Whether the pause/resume action is enabled */\n enabled?: boolean | null;\n /** Pause/resume action configuration */\n configuration?: PauseResumeActionConfiguration;\n}\n\n/**\n * Configuration for the subscription pause/resume action.\n * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration.\n */\nexport interface PauseResumeActionConfiguration {\n /** Minimum days before billing date to allow pause */\n daysBeforePauseAllowed?: number | null;\n /** Maximum cycles for auto-resume after pause */\n maxAutoResumeCycles?: number | null;\n /** Minimum days before billing date to allow resume */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing to cancel scheduled pause */\n daysBeforeCancelScheduledPauseAllowed?: number | null;\n /** Maximum number of times a customer can perform pause action */\n maxPauseUserActions?: number | null;\n}\n\n/** Cancel subscription action settings. */\nexport interface CancelActionSettings {\n /** Whether the cancel action is enabled */\n enabled?: boolean | null;\n /** Cancel action configuration */\n configuration?: CancelActionConfiguration;\n}\n\n/** Configuration for the cancel subscription action. */\nexport interface CancelActionConfiguration {\n /** Minimum days before period end to allow cancellation */\n minDaysBeforePeriodEnd?: number | null;\n}\n\n/** Update Payment Method action settings — toggle only, no additional configuration. */\nexport interface UpmActionSettings {\n /** Whether the update payment method action is enabled */\n enabled?: boolean | null;\n}\n\n/** Update billing date action settings. */\nexport interface UpdateBillingDateActionSettings {\n /** Whether the update billing date action is enabled */\n enabled?: boolean | null;\n /** Update billing date configuration */\n configuration?: UpdateBillingDateActionConfiguration;\n}\n\n/** Configuration for the update billing date action. */\nexport interface UpdateBillingDateActionConfiguration {\n /** Whether to adjust price when billing date changes */\n priceAdjustmentEnabled?: boolean | null;\n /** Maximum days the billing date can be moved forward */\n maxDaysAdvance?: number | null;\n /** Maximum days the billing date can be postponed */\n maxDaysPostpone?: number | null;\n /** Minimum days from today for the new billing date */\n minDaysFromToday?: number | null;\n /** Whether to allow advancing billing date for weekly subscriptions */\n allowAdvanceForWeekly?: boolean | null;\n}\n\n/**\n * Customer settings scoped to a single vertical (Stores, Pricing\n * Plans, Bookings, ...). Carries a vertical-wide default and optional\n * per-entity overrides.\n *\n * Vertical-level opt-in (whether this vertical uses the new\n * BBS-based flow at all) is owned by SubscriptionService's\n * VerticalSettingsFacade, not by a field on this message. The\n * resolver invokes the facade first; only opted-in verticals reach\n * the inner resolution below. Non-opted-in verticals fall back to\n * the legacy `SubscriptionPolicies` boolean path (see plan.md)\n * without consulting `customer_settings_by_app_def_id` at all.\n *\n * Inner resolution for an action on entity X within an opted-in\n * vertical:\n * 1. If `settings_by_entity_id` has key X, use that value.\n * 2. Otherwise, use `default_settings`.\n * 3. If the resolved value is unset, every action resolves to\n * disabled (CustomerSettings field defaults).\n */\nexport interface VerticalCustomerSettings {\n /**\n * Default customer settings for this vertical, applied when\n * `settings_by_entity_id` has no entry for the current entity.\n * Unset = every action disabled.\n */\n defaultSettings?: CustomerSettings;\n /**\n * Per-entity overrides, keyed by the entity ID this vertical owns\n * (product ID for Stores, plan ID for Pricing Plans, element ID\n * for catalog-style verticals). UUID-format string. Empty map =\n * no overrides; every entity resolves to `default_settings`.\n * Override semantics: full-replace (proto-redesign.md S8.4).\n */\n settingsByEntityId?: Record<string, CustomerSettings>;\n}\n\n/**\n * Configuration of the five self-service actions a merchant's\n * end-customers can perform on their subscriptions. Scoping (per\n * tenant -> per vertical -> per entity) is handled by\n * VerticalCustomerSettings plus a map field on BillingSettings keyed\n * by Wix app_def_id.\n *\n * Terminology: \"customer\" here means the merchant's end-customer --\n * i.e., the \"User of a User\" (UoU) in the CDD project name. Throughout\n * BASS, unprefixed `Customer` always refers to this UoU; the prefixed\n * `WixCustomer` (see billing-wix-customer-mgmt,\n * billing-wix-customer-notifications) refers to the merchant\n * (Wix's customer).\n *\n * Source of truth: wix-private/premium-billing-cdd/projects/uou-settings/.\n *\n * Semantics:\n * * Each action defaults to disabled. An action is allowed only when\n * its submessage is present AND `enabled = true`.\n * * Unset config scalars resolve to the per-field defaults documented\n * in pm/product-hub.md.\n *\n * Naming: AIP-140 (no prepositions; no verbs; adjectives precede nouns)\n * and AIP-141 (unit suffixes on quantities, `per` for inverse units).\n */\nexport interface CustomerSettings {\n skipAction?: SkipAction;\n pauseResumeAction?: PauseResumeAction;\n cancelAction?: CancelAction;\n updatePaymentMethodAction?: UpdatePaymentMethodAction;\n updateBillingDateAction?: UpdateBillingDateAction;\n changeAction?: ChangeActionConfig;\n updateItemsAction?: UpdateItemsAction;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Skip -- skip billing cycles without changing the billing anchor.\n * CDD: pm/product-hub.md \"Skip Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface SkipAction {\n enabled?: boolean;\n config?: SkipActionConfig;\n}\n\nexport interface SkipActionConfig {\n /**\n * Min days notice the customer must give before a scheduled skip\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active skip,\n * measured against that skip's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress skip (return to billing before all configured skip\n * cycles are consumed). Measured against the start of the cycle\n * the customer wants billed; early-end always takes effect at a\n * cycle boundary, never mid-cycle. The natural end of the skip\n * (configured skip cycles complete) is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /** Max cycles a single skip event may span. Default 5. Range 1-10. */\n maxCyclesPerSkip?: number | null;\n /**\n * Lifetime cap on user-initiated skips for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Pause/Resume -- pause shifts the billing anchor; resume manually or\n * auto-resume after N cycles. Distinct from Skip, which does not\n * shift the anchor.\n * CDD: pm/product-hub.md \"Advanced Pause/Resume Action Configuration\".\n * The CDD's \"Advanced\" qualifier disambiguates from Skip in prose; in\n * this proto Skip has its own message, so the qualifier is dropped\n * per AIP-140 (avoid adjectives that always apply).\n * ---------------------------------------------------------------------------\n */\nexport interface PauseResumeAction {\n enabled?: boolean;\n config?: PauseResumeActionConfig;\n}\n\nexport interface PauseResumeActionConfig {\n /**\n * Min days notice the customer must give before a scheduled pause\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active pause,\n * measured against that pause's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress pause (resume billing before the customer-chosen\n * auto-resume cycle count completes). Measured against the start\n * of the cycle the customer wants billed; early-end always takes\n * effect at a cycle boundary, never mid-cycle. Automatic auto-resume\n * after `max_auto_resume_cycles` is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /**\n * Merchant cap on the number of cycles the customer may choose for\n * cycle-based auto-resume of a pause. Unset = no merchant cap\n * (backend hard limit 10). Range 1-10.\n */\n maxAutoResumeCycles?: number | null;\n /**\n * Lifetime cap on user-initiated pauses for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Cancel -- end the subscription.\n * CDD: pm/product-hub.md \"Cancel Action Configuration\".\n * pm/decisions.md 2026-02-17: single-select; \"Min Days Before Period\n * End\" dropped; \"Immediate with Proration\" excluded from V1.\n * ---------------------------------------------------------------------------\n */\nexport interface CancelAction {\n enabled?: boolean;\n config?: CancelActionConfig;\n}\n\nexport interface CancelActionConfig {\n /**\n * Timing of a customer cancellation: end of current billing\n * period (default) or immediate. Defaults to END_OF_PERIOD when\n * unset.\n */\n cancellationTiming?: CancellationTimingWithLiterals;\n}\n\n/**\n * Nested per AIP-126 (enum used by only one message). Non-frozen:\n * value 3 is reserved for a future \"Immediate with Proration\" mode.\n */\nexport enum CancellationTiming {\n /** Server treats UNSPECIFIED as END_OF_PERIOD (CDD dev/architecture.md). */\n UNSPECIFIED = 'UNSPECIFIED',\n /**\n * Subscription continues until the end of the current billing\n * period, then does not renew. CDD default; CDD shorthand: \"EOP\".\n */\n END_OF_PERIOD = 'END_OF_PERIOD',\n /** Subscription ends immediately upon cancellation. */\n IMMEDIATE = 'IMMEDIATE',\n}\n\n/** @enumType */\nexport type CancellationTimingWithLiterals =\n | CancellationTiming\n | 'UNSPECIFIED'\n | 'END_OF_PERIOD'\n | 'IMMEDIATE';\n\n/**\n * ---------------------------------------------------------------------------\n * Update Payment Method (UPM) -- replace the payment method.\n * CDD: pm/product-hub.md \"Update Payment Method (UPM) Action\n * Configuration\". CDD has only `enabled`; no config submessage.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdatePaymentMethodAction {\n enabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Billing Date -- move the next billing date.\n * CDD: pm/product-hub.md \"Update Billing Date Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateBillingDateAction {\n enabled?: boolean;\n config?: UpdateBillingDateActionConfig;\n}\n\nexport interface UpdateBillingDateActionConfig {\n /**\n * When true: moving the billing date earlier prorates, moving it\n * later adds an extra charge. Default false.\n * CDD identifier: `priceAdjustmentEnabled`.\n */\n priceAdjustmentEnabled?: boolean;\n /**\n * Max days the new date may be earlier than the original. Unset =\n * no cap (backend default: within one cycle). Positive integer.\n * CDD identifier: `maxDaysAdvance` (renamed for AIP-141 unit suffix).\n */\n maxAdvanceDays?: number | null;\n /**\n * Max days the new date may be later than the original. Unset = no\n * cap (backend default: one cycle, or one month for cycles > a\n * month). Positive integer.\n * CDD identifier: `maxDaysPostpone` (renamed for AIP-141 unit suffix).\n */\n maxPostponeDays?: number | null;\n /**\n * Earliest the new date may be set, expressed as days from today.\n * Default 5 (backend hard floor). Integer >= 5. Does not apply to\n * weekly subscriptions (see `weekly_advance_enabled`).\n * CDD identifier: `minDaysFromToday`.\n */\n minTodayOffsetDays?: number | null;\n /**\n * Whether weekly subscriptions may move the billing date earlier.\n * Default false. CDD identifier: `allowAdvanceForWeekly` (renamed:\n * AIP-140 forbids verbs and the preposition \"for\").\n */\n weeklyAdvanceEnabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Change -- schedule a plan/cycle/quantity change for the next renewal.\n * CDD: bass-pending-change-contract pm/product-hub.md R8; BILL-864.\n * No `enabled` wrapper — absent = today's behaviour (trial hard-blocked,\n * grace allowed, no notice gate). Present = its values gate.\n * ---------------------------------------------------------------------------\n */\nexport interface ChangeActionConfig {\n /**\n * Allow scheduling a change while the subscription is on free trial.\n * Default false (proto3 zero). Absent config also blocks trial (today's\n * hard-coded `checkNotOnFreeTrial`).\n */\n allowDuringFreeTrial?: boolean;\n /**\n * Allow scheduling a change while the subscription is in grace period.\n * Default false (proto3 zero). Absent config ALLOWS grace (today's\n * behaviour — no grace check exists). This flag only takes effect when\n * the config message is present.\n */\n allowDuringGracePeriod?: boolean;\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n * Mirrors skip/pause `min_start_notice_days` convention.\n */\n minStartNoticeDays?: number;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Items -- add, update or remove items for the next billing cycle\n * (UpdateSubscriptionItems). Gates the customer UPDATE_SUBSCRIPTION_ITEMS action.\n * BILL-962: no free-trial / grace flags -- item updates only apply on the next cycle.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateItemsAction {\n enabled?: boolean;\n config?: UpdateItemsActionConfig;\n}\n\nexport interface UpdateItemsActionConfig {\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * Inside the window the customer can't update items.\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n}\n\nexport interface NearRenewalSettings {\n /** Key: vertical app_def_id (GUID). Missing entry → the caller's default lead. */\n verticalConfigs?: Record<string, NearRenewalConfig>;\n}\n\nexport interface NearRenewalConfig {\n /**\n * At most one entry per unit.\n * @maxSize 2\n */\n cycleLeads?: CycleLead[];\n}\n\nexport interface CycleLead {\n /** Billing cycle unit this lead applies to */\n unit?: CycleUnitWithLiterals;\n /**\n * Days before the charge to send the near-renewal notice. MONTH is at most 27 (shorter than February), enforced in the validator.\n * @min 1\n * @max 60\n */\n daysBeforeCharge?: number;\n}\n\nexport enum CycleUnit {\n UNKNOWN_CYCLE_UNIT = 'UNKNOWN_CYCLE_UNIT',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type CycleUnitWithLiterals =\n | CycleUnit\n | 'UNKNOWN_CYCLE_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport interface SettingsAction extends SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\n/** @oneof */\nexport interface SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\nexport interface InitializeDynamicTax {}\n\nexport interface GetBillingSettingsRequest {}\n\nexport interface GetBillingSettingsResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface GetVerticalCustomerSettingsRequest {\n /**\n * Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface GetVerticalCustomerSettingsResponse {\n /** Customer settings for the requested vertical; empty when none configured */\n verticalCustomerSettings?: VerticalCustomerSettings;\n}\n\nexport interface UpdateBillingSettingsRequest {\n /** BillingSettings to be updated, may be partial */\n billingSettings: BillingSettings;\n /**\n * Explicit list of fields to update\n * @internal\n */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteBillingSettingsRequest {\n /** string billing_settings_id = 1 [(.wix.api.format) = GUID]; // Id of the BillingSettings to delete */\n revision?: string;\n}\n\nexport interface DeleteBillingSettingsResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface GetBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n}\n\nexport interface GetBillingSettingsBackOfficeResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface UpdateBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /** BillingSettings to be updated, may be partial */\n billingSettings?: BillingSettings;\n /** Explicit list of fields to update */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsBackOfficeResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteByIdBackofficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /**\n * BillingSettings ID to delete\n * @format GUID\n */\n billingSettingsId?: string;\n /** The revision of the BillingSettings */\n revision?: string | null;\n}\n\nexport interface DeleteByIdBackofficeResponse {}\n\nexport interface GetBillingSettingsDefaultsRequest {}\n\nexport interface GetBillingSettingsDefaultsResponse {\n /** The defaults row; missing when it was never written */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\n/**\n * Defaults shared by all sites, stored in one single-tenant row. Written only by Wix staff via\n * UpdateBillingSettingsDefaults; GetBillingSettings returns its `near_renewal` on every site.\n */\nexport interface BillingSettingsDefaults {\n /**\n * BillingSettingsDefaults ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of the row. Pass the latest revision to update it; omit it to create the row */\n revision?: string | null;\n /**\n * Represents the time this BillingSettingsDefaults was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettingsDefaults was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Near-renewal notice lead per vertical */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface UpdateBillingSettingsDefaultsRequest {\n /** Defaults to write */\n billingSettingsDefaults?: BillingSettingsDefaults;\n /** Fields to update; only near_renewal is supported */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsDefaultsResponse {\n /** The written defaults row */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface BillingSettingsCreatedEnvelope {\n entity: BillingSettings;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.prime.auto.v1.billing_settings_created\n * @serviceIdentifier com.wixpress.billing.business.v1.BillingSettingsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onBillingSettingsCreated(\n handler: (event: BillingSettingsCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface BillingSettingsUpdatedEnvelope {\n entity: BillingSettings;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.prime.auto.v1.billing_settings_updated\n * @serviceIdentifier com.wixpress.billing.business.v1.BillingSettingsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onBillingSettingsUpdated(\n handler: (event: BillingSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Fetches BillingSettings and if not exists creates with default values\n * @public\n * @documentationMaturity preview\n * @permissionId BILLING.BUSINESS_BILLING_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings\n */\nexport async function getBillingSettings(): Promise<\n NonNullablePaths<\n GetBillingSettingsResponse,\n | `billingSettings.gracePeriod.fixedDuration.days`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles`\n | `billingSettings.gracePeriod.enabled`\n | `billingSettings.gracePeriod.modelType`\n | `billingSettings.gracePeriod.automaticRetrySettings.enabled`\n | `billingSettings.taxes.global.inclusive`\n | `billingSettings.invoices.enabled`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.getBillingSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings.\n * @param appDefId - Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @public\n * @documentationMaturity preview\n * @requiredField appDefId\n * @permissionId prime:auto:v1:billing_settings:get_vertical_customer_settings\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings\n */\nexport async function getVerticalCustomerSettings(\n appDefId: string\n): Promise<\n NonNullablePaths<\n GetVerticalCustomerSettingsResponse,\n | `verticalCustomerSettings.defaultSettings.skipAction.enabled`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minRevocationNoticeDays`\n | `verticalCustomerSettings.defaultSettings.skipAction.config.minEarlyEndNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.enabled`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minRevocationNoticeDays`\n | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minEarlyEndNoticeDays`\n | `verticalCustomerSettings.defaultSettings.cancelAction.enabled`\n | `verticalCustomerSettings.defaultSettings.cancelAction.config.cancellationTiming`\n | `verticalCustomerSettings.defaultSettings.updatePaymentMethodAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.priceAdjustmentEnabled`\n | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.weeklyAdvanceEnabled`\n | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringFreeTrial`\n | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringGracePeriod`\n | `verticalCustomerSettings.defaultSettings.changeAction.minStartNoticeDays`\n | `verticalCustomerSettings.defaultSettings.updateItemsAction.enabled`\n | `verticalCustomerSettings.defaultSettings.updateItemsAction.config.minStartNoticeDays`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ appDefId: appDefId });\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.getVerticalCustomerSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appDefId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appDefId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n * @param _id - BillingSettings ID\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField billingSettings\n * @permissionId BILLING.BUSINESS_BILLING_SETTINGS_MANAGE\n * @applicableIdentity APP\n * @fqn com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings\n */\nexport async function updateBillingSettings(\n _id: string,\n billingSettings: UpdateBillingSettings\n): Promise<\n NonNullablePaths<\n UpdateBillingSettingsResponse,\n | `billingSettings.gracePeriod.fixedDuration.days`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles`\n | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles`\n | `billingSettings.gracePeriod.enabled`\n | `billingSettings.gracePeriod.modelType`\n | `billingSettings.gracePeriod.automaticRetrySettings.enabled`\n | `billingSettings.taxes.global.inclusive`\n | `billingSettings.invoices.enabled`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n billingSettings: { ...billingSettings, id: _id },\n });\n\n const reqOpts =\n ambassadorWixPrimeAutoV1BillingSettings.updateBillingSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { billingSettings: '$[1]' },\n explicitPathsToArguments: { 'billingSettings.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'billingSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateBillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n _id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'billingSettings.createdDate' },\n { path: 'billingSettings.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'mask' }];\n\nfunction resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n _: [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n {\n srcPath: '/_api/business-billing-settings',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_billing-settings';\n\n/** Fetches BillingSettings and if not exists creates with default values */\nexport function getBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getBillingSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getBillingSettings;\n}\n\n/** Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings. */\nexport function getVerticalCustomerSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getVerticalCustomerSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getVerticalCustomerSettings;\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n */\nexport function updateBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateBillingSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/{billingSettings.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateBillingSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAAA;AAAA,EAAA,mCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,8BAA8B;AAAA,EACtC,EAAE,MAAM,8BAA8B;AACxC;AACA,IAAM,oBAAo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BAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,UAAU,OAAO;AAAA,QAC7C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU;AAAA,IACb;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAcA,eAAsBE,uBACpB,KACA,iBAgBA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,iBAAiB,EAAE,GAAG,iBAAiB,IAAI,IAAI;AAAA,EACjD,CAAC;AAED,QAAM,UACoC,sBAAsB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,EAAE,iBAAiB,OAAO;AAAA,QAClD,0BAA0B,EAAE,sBAAsB,OAAO;AAAA,QACzD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO,iBAAiB;AAAA,IAC3B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","import_timestamp","import_rest_modules","payload","ModelType","CancellationTiming","CycleUnit","WebhookIdentityType","getBillingSettings","sdkTransformError","getVerticalCustomerSettings","updateBillingSettings"]}
package/build/cjs/meta.js CHANGED
@@ -66,6 +66,10 @@ function resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(opts) {
66
66
  {
67
67
  srcPath: "/prime/auto/v1/billing_settings",
68
68
  destPath: "/v1/billing_settings"
69
+ },
70
+ {
71
+ srcPath: "/_api/business-billing-settings",
72
+ destPath: ""
69
73
  }
70
74
  ],
71
75
  "payments.base44.com": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/prime-auto-v1-billing-settings-billing-settings.http.ts","../../src/prime-auto-v1-billing-settings-billing-settings.types.ts","../../src/prime-auto-v1-billing-settings-billing-settings.meta.ts"],"sourcesContent":["export * from './src/prime-auto-v1-billing-settings-billing-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'billingSettings.createdDate' },\n { path: 'billingSettings.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'mask' }];\n\nfunction resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n _: [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_billing-settings';\n\n/** Fetches BillingSettings and if not exists creates with default values */\nexport function getBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getBillingSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getBillingSettings;\n}\n\n/** Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings. */\nexport function getVerticalCustomerSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getVerticalCustomerSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getVerticalCustomerSettings;\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n */\nexport function updateBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateBillingSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/{billingSettings.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateBillingSettings;\n}\n","export interface BillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface GracePeriodSettings extends GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n /** Flag that represent if grace period feature is enabled */\n enabled?: boolean;\n /** model type of grace period amount */\n modelType?: ModelTypeWithLiterals;\n /**\n * Automatic retry settings that control whether and how payment should be retried during the subscription's grace period.\n * By default, automatic retry is disabled.\n */\n automaticRetrySettings?: AutomaticRetrySettings;\n}\n\n/** @oneof */\nexport interface GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n}\n\nexport enum ModelType {\n UNKNOWN = 'UNKNOWN',\n FIXED_DURATION = 'FIXED_DURATION',\n DURATION_BY_CYCLE_UNIT = 'DURATION_BY_CYCLE_UNIT',\n}\n\n/** @enumType */\nexport type ModelTypeWithLiterals =\n | ModelType\n | 'UNKNOWN'\n | 'FIXED_DURATION'\n | 'DURATION_BY_CYCLE_UNIT';\n\nexport interface FixedDuration extends FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\n/** @oneof */\nexport interface FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\nexport interface DurationByCycleUnit {\n /** @max 1 */\n daysForDailyCycles?: number;\n /** @max 6 */\n daysForWeeklyCycles?: number;\n /** @max 27 */\n daysForMonthlyCycles?: number;\n /** @max 60 */\n daysForYearlyCycles?: number;\n}\n\nexport interface AutomaticRetrySettings {\n enabled?: boolean;\n}\n\nexport interface TaxSettings extends TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\n/** @oneof */\nexport interface TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\nexport interface GlobalTaxSettings {\n /** This flag will be set on Subscription, if true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface DynamicTaxSettings {}\n\nexport interface InvoicesSettings {\n enabled?: boolean;\n}\n\nexport interface PlatformFeeSettings {\n /**\n * Map of vertical app ID to platform fee config\n * Key: vertical app_id (GUID as string). Missing entry → defaults to 0% (no fee).\n * Value: platform fee configuration\n * To DELETE an entry, send a PlatformFeeConfig with the vertical's app_id as key and an empty fee_model (neither absorb nor pass_on set).\n */\n verticalConfigs?: Record<string, PlatformFeeConfig>;\n}\n\nexport interface PlatformFeeConfig extends PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:4 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/**\n * Per-action merchant configuration for customer self-service actions.\n * All booleans use BoolValue (optional) so verticals can selectively override defaults.\n */\nexport interface CustomerActionSettings {\n /** Skip cycle action settings */\n skip?: SkipActionSettings;\n /** Pause/resume action settings */\n pauseResume?: PauseResumeActionSettings;\n /** Cancel action settings */\n cancel?: CancelActionSettings;\n /** Update payment method action settings */\n upm?: UpmActionSettings;\n /** Update billing date action settings */\n updateBillingDate?: UpdateBillingDateActionSettings;\n}\n\n/** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */\nexport interface SkipActionSettings {\n /** Whether the skip action is enabled */\n enabled?: boolean | null;\n /** Skip action configuration */\n configuration?: SkipActionConfiguration;\n}\n\n/** Configuration for the skip cycle action. */\nexport interface SkipActionConfiguration {\n /** Maximum number of billing cycles a customer can skip */\n maxSkipCycles?: number | null;\n /** Minimum days before billing date to allow skip */\n daysBeforeSkipAllowed?: number | null;\n /** Minimum days before billing date to allow resume from skip */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing date to cancel a scheduled skip */\n daysBeforeCancelSkipAllowed?: number | null;\n /** Maximum number of times a customer can perform skip action */\n maxSkipUserActions?: number | null;\n /** Allow skipping the next billing cycle */\n skipNextCycle?: boolean | null;\n /** Allow skipping future billing cycles */\n skipFutureCycles?: boolean | null;\n /** Allow reversing a pending skip */\n unskip?: boolean | null;\n /** Allow cancelling a scheduled skip-pause */\n cancelScheduledPause?: boolean | null;\n /** Allow immediate resume from skip */\n resumeImmediately?: boolean | null;\n /** Allow resume at the next billing date */\n resumeAtNextBillingDate?: boolean | null;\n /** Allow resume at a specific date */\n resumeAtSpecificDate?: boolean | null;\n /** Allow setting auto-resume after N cycles */\n autoResumeCycles?: boolean | null;\n}\n\n/**\n * Subscription pause/resume settings — full pause of billing, not skip.\n * Skip action (temporary pause for N cycles) is configured via SkipActionSettings.\n */\nexport interface PauseResumeActionSettings {\n /** Whether the pause/resume action is enabled */\n enabled?: boolean | null;\n /** Pause/resume action configuration */\n configuration?: PauseResumeActionConfiguration;\n}\n\n/**\n * Configuration for the subscription pause/resume action.\n * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration.\n */\nexport interface PauseResumeActionConfiguration {\n /** Minimum days before billing date to allow pause */\n daysBeforePauseAllowed?: number | null;\n /** Maximum cycles for auto-resume after pause */\n maxAutoResumeCycles?: number | null;\n /** Minimum days before billing date to allow resume */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing to cancel scheduled pause */\n daysBeforeCancelScheduledPauseAllowed?: number | null;\n /** Maximum number of times a customer can perform pause action */\n maxPauseUserActions?: number | null;\n}\n\n/** Cancel subscription action settings. */\nexport interface CancelActionSettings {\n /** Whether the cancel action is enabled */\n enabled?: boolean | null;\n /** Cancel action configuration */\n configuration?: CancelActionConfiguration;\n}\n\n/** Configuration for the cancel subscription action. */\nexport interface CancelActionConfiguration {\n /** Minimum days before period end to allow cancellation */\n minDaysBeforePeriodEnd?: number | null;\n}\n\n/** Update Payment Method action settings — toggle only, no additional configuration. */\nexport interface UpmActionSettings {\n /** Whether the update payment method action is enabled */\n enabled?: boolean | null;\n}\n\n/** Update billing date action settings. */\nexport interface UpdateBillingDateActionSettings {\n /** Whether the update billing date action is enabled */\n enabled?: boolean | null;\n /** Update billing date configuration */\n configuration?: UpdateBillingDateActionConfiguration;\n}\n\n/** Configuration for the update billing date action. */\nexport interface UpdateBillingDateActionConfiguration {\n /** Whether to adjust price when billing date changes */\n priceAdjustmentEnabled?: boolean | null;\n /** Maximum days the billing date can be moved forward */\n maxDaysAdvance?: number | null;\n /** Maximum days the billing date can be postponed */\n maxDaysPostpone?: number | null;\n /** Minimum days from today for the new billing date */\n minDaysFromToday?: number | null;\n /** Whether to allow advancing billing date for weekly subscriptions */\n allowAdvanceForWeekly?: boolean | null;\n}\n\n/**\n * Customer settings scoped to a single vertical (Stores, Pricing\n * Plans, Bookings, ...). Carries a vertical-wide default and optional\n * per-entity overrides.\n *\n * Vertical-level opt-in (whether this vertical uses the new\n * BBS-based flow at all) is owned by SubscriptionService's\n * VerticalSettingsFacade, not by a field on this message. The\n * resolver invokes the facade first; only opted-in verticals reach\n * the inner resolution below. Non-opted-in verticals fall back to\n * the legacy `SubscriptionPolicies` boolean path (see plan.md)\n * without consulting `customer_settings_by_app_def_id` at all.\n *\n * Inner resolution for an action on entity X within an opted-in\n * vertical:\n * 1. If `settings_by_entity_id` has key X, use that value.\n * 2. Otherwise, use `default_settings`.\n * 3. If the resolved value is unset, every action resolves to\n * disabled (CustomerSettings field defaults).\n */\nexport interface VerticalCustomerSettings {\n /**\n * Default customer settings for this vertical, applied when\n * `settings_by_entity_id` has no entry for the current entity.\n * Unset = every action disabled.\n */\n defaultSettings?: CustomerSettings;\n /**\n * Per-entity overrides, keyed by the entity ID this vertical owns\n * (product ID for Stores, plan ID for Pricing Plans, element ID\n * for catalog-style verticals). UUID-format string. Empty map =\n * no overrides; every entity resolves to `default_settings`.\n * Override semantics: full-replace (proto-redesign.md S8.4).\n */\n settingsByEntityId?: Record<string, CustomerSettings>;\n}\n\n/**\n * Configuration of the five self-service actions a merchant's\n * end-customers can perform on their subscriptions. Scoping (per\n * tenant -> per vertical -> per entity) is handled by\n * VerticalCustomerSettings plus a map field on BillingSettings keyed\n * by Wix app_def_id.\n *\n * Terminology: \"customer\" here means the merchant's end-customer --\n * i.e., the \"User of a User\" (UoU) in the CDD project name. Throughout\n * BASS, unprefixed `Customer` always refers to this UoU; the prefixed\n * `WixCustomer` (see billing-wix-customer-mgmt,\n * billing-wix-customer-notifications) refers to the merchant\n * (Wix's customer).\n *\n * Source of truth: wix-private/premium-billing-cdd/projects/uou-settings/.\n *\n * Semantics:\n * * Each action defaults to disabled. An action is allowed only when\n * its submessage is present AND `enabled = true`.\n * * Unset config scalars resolve to the per-field defaults documented\n * in pm/product-hub.md.\n *\n * Naming: AIP-140 (no prepositions; no verbs; adjectives precede nouns)\n * and AIP-141 (unit suffixes on quantities, `per` for inverse units).\n */\nexport interface CustomerSettings {\n skipAction?: SkipAction;\n pauseResumeAction?: PauseResumeAction;\n cancelAction?: CancelAction;\n updatePaymentMethodAction?: UpdatePaymentMethodAction;\n updateBillingDateAction?: UpdateBillingDateAction;\n changeAction?: ChangeActionConfig;\n updateItemsAction?: UpdateItemsAction;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Skip -- skip billing cycles without changing the billing anchor.\n * CDD: pm/product-hub.md \"Skip Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface SkipAction {\n enabled?: boolean;\n config?: SkipActionConfig;\n}\n\nexport interface SkipActionConfig {\n /**\n * Min days notice the customer must give before a scheduled skip\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active skip,\n * measured against that skip's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress skip (return to billing before all configured skip\n * cycles are consumed). Measured against the start of the cycle\n * the customer wants billed; early-end always takes effect at a\n * cycle boundary, never mid-cycle. The natural end of the skip\n * (configured skip cycles complete) is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /** Max cycles a single skip event may span. Default 5. Range 1-10. */\n maxCyclesPerSkip?: number | null;\n /**\n * Lifetime cap on user-initiated skips for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Pause/Resume -- pause shifts the billing anchor; resume manually or\n * auto-resume after N cycles. Distinct from Skip, which does not\n * shift the anchor.\n * CDD: pm/product-hub.md \"Advanced Pause/Resume Action Configuration\".\n * The CDD's \"Advanced\" qualifier disambiguates from Skip in prose; in\n * this proto Skip has its own message, so the qualifier is dropped\n * per AIP-140 (avoid adjectives that always apply).\n * ---------------------------------------------------------------------------\n */\nexport interface PauseResumeAction {\n enabled?: boolean;\n config?: PauseResumeActionConfig;\n}\n\nexport interface PauseResumeActionConfig {\n /**\n * Min days notice the customer must give before a scheduled pause\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active pause,\n * measured against that pause's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress pause (resume billing before the customer-chosen\n * auto-resume cycle count completes). Measured against the start\n * of the cycle the customer wants billed; early-end always takes\n * effect at a cycle boundary, never mid-cycle. Automatic auto-resume\n * after `max_auto_resume_cycles` is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /**\n * Merchant cap on the number of cycles the customer may choose for\n * cycle-based auto-resume of a pause. Unset = no merchant cap\n * (backend hard limit 10). Range 1-10.\n */\n maxAutoResumeCycles?: number | null;\n /**\n * Lifetime cap on user-initiated pauses for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Cancel -- end the subscription.\n * CDD: pm/product-hub.md \"Cancel Action Configuration\".\n * pm/decisions.md 2026-02-17: single-select; \"Min Days Before Period\n * End\" dropped; \"Immediate with Proration\" excluded from V1.\n * ---------------------------------------------------------------------------\n */\nexport interface CancelAction {\n enabled?: boolean;\n config?: CancelActionConfig;\n}\n\nexport interface CancelActionConfig {\n /**\n * Timing of a customer cancellation: end of current billing\n * period (default) or immediate. Defaults to END_OF_PERIOD when\n * unset.\n */\n cancellationTiming?: CancellationTimingWithLiterals;\n}\n\n/**\n * Nested per AIP-126 (enum used by only one message). Non-frozen:\n * value 3 is reserved for a future \"Immediate with Proration\" mode.\n */\nexport enum CancellationTiming {\n /** Server treats UNSPECIFIED as END_OF_PERIOD (CDD dev/architecture.md). */\n UNSPECIFIED = 'UNSPECIFIED',\n /**\n * Subscription continues until the end of the current billing\n * period, then does not renew. CDD default; CDD shorthand: \"EOP\".\n */\n END_OF_PERIOD = 'END_OF_PERIOD',\n /** Subscription ends immediately upon cancellation. */\n IMMEDIATE = 'IMMEDIATE',\n}\n\n/** @enumType */\nexport type CancellationTimingWithLiterals =\n | CancellationTiming\n | 'UNSPECIFIED'\n | 'END_OF_PERIOD'\n | 'IMMEDIATE';\n\n/**\n * ---------------------------------------------------------------------------\n * Update Payment Method (UPM) -- replace the payment method.\n * CDD: pm/product-hub.md \"Update Payment Method (UPM) Action\n * Configuration\". CDD has only `enabled`; no config submessage.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdatePaymentMethodAction {\n enabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Billing Date -- move the next billing date.\n * CDD: pm/product-hub.md \"Update Billing Date Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateBillingDateAction {\n enabled?: boolean;\n config?: UpdateBillingDateActionConfig;\n}\n\nexport interface UpdateBillingDateActionConfig {\n /**\n * When true: moving the billing date earlier prorates, moving it\n * later adds an extra charge. Default false.\n * CDD identifier: `priceAdjustmentEnabled`.\n */\n priceAdjustmentEnabled?: boolean;\n /**\n * Max days the new date may be earlier than the original. Unset =\n * no cap (backend default: within one cycle). Positive integer.\n * CDD identifier: `maxDaysAdvance` (renamed for AIP-141 unit suffix).\n */\n maxAdvanceDays?: number | null;\n /**\n * Max days the new date may be later than the original. Unset = no\n * cap (backend default: one cycle, or one month for cycles > a\n * month). Positive integer.\n * CDD identifier: `maxDaysPostpone` (renamed for AIP-141 unit suffix).\n */\n maxPostponeDays?: number | null;\n /**\n * Earliest the new date may be set, expressed as days from today.\n * Default 5 (backend hard floor). Integer >= 5. Does not apply to\n * weekly subscriptions (see `weekly_advance_enabled`).\n * CDD identifier: `minDaysFromToday`.\n */\n minTodayOffsetDays?: number | null;\n /**\n * Whether weekly subscriptions may move the billing date earlier.\n * Default false. CDD identifier: `allowAdvanceForWeekly` (renamed:\n * AIP-140 forbids verbs and the preposition \"for\").\n */\n weeklyAdvanceEnabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Change -- schedule a plan/cycle/quantity change for the next renewal.\n * CDD: bass-pending-change-contract pm/product-hub.md R8; BILL-864.\n * No `enabled` wrapper — absent = today's behaviour (trial hard-blocked,\n * grace allowed, no notice gate). Present = its values gate.\n * ---------------------------------------------------------------------------\n */\nexport interface ChangeActionConfig {\n /**\n * Allow scheduling a change while the subscription is on free trial.\n * Default false (proto3 zero). Absent config also blocks trial (today's\n * hard-coded `checkNotOnFreeTrial`).\n */\n allowDuringFreeTrial?: boolean;\n /**\n * Allow scheduling a change while the subscription is in grace period.\n * Default false (proto3 zero). Absent config ALLOWS grace (today's\n * behaviour — no grace check exists). This flag only takes effect when\n * the config message is present.\n */\n allowDuringGracePeriod?: boolean;\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n * Mirrors skip/pause `min_start_notice_days` convention.\n */\n minStartNoticeDays?: number;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Items -- add, update or remove items for the next billing cycle\n * (UpdateSubscriptionItems). Gates the customer UPDATE_SUBSCRIPTION_ITEMS action.\n * BILL-962: no free-trial / grace flags -- item updates only apply on the next cycle.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateItemsAction {\n enabled?: boolean;\n config?: UpdateItemsActionConfig;\n}\n\nexport interface UpdateItemsActionConfig {\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * Inside the window the customer can't update items.\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n}\n\nexport interface NearRenewalSettings {\n /** Key: vertical app_def_id (GUID). Missing entry → the caller's default lead. */\n verticalConfigs?: Record<string, NearRenewalConfig>;\n}\n\nexport interface NearRenewalConfig {\n /**\n * At most one entry per unit.\n * @maxSize 2\n */\n cycleLeads?: CycleLead[];\n}\n\nexport interface CycleLead {\n /** Billing cycle unit this lead applies to */\n unit?: CycleUnitWithLiterals;\n /**\n * Days before the charge to send the near-renewal notice. MONTH is at most 27 (shorter than February), enforced in the validator.\n * @min 1\n * @max 60\n */\n daysBeforeCharge?: number;\n}\n\nexport enum CycleUnit {\n UNKNOWN_CYCLE_UNIT = 'UNKNOWN_CYCLE_UNIT',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type CycleUnitWithLiterals =\n | CycleUnit\n | 'UNKNOWN_CYCLE_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport interface SettingsAction extends SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\n/** @oneof */\nexport interface SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\nexport interface InitializeDynamicTax {}\n\nexport interface GetBillingSettingsRequest {}\n\nexport interface GetBillingSettingsResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface GetVerticalCustomerSettingsRequest {\n /**\n * Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface GetVerticalCustomerSettingsResponse {\n /** Customer settings for the requested vertical; empty when none configured */\n verticalCustomerSettings?: VerticalCustomerSettings;\n}\n\nexport interface UpdateBillingSettingsRequest {\n /** BillingSettings to be updated, may be partial */\n billingSettings: BillingSettings;\n /**\n * Explicit list of fields to update\n * @internal\n */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteBillingSettingsRequest {\n /** string billing_settings_id = 1 [(.wix.api.format) = GUID]; // Id of the BillingSettings to delete */\n revision?: string;\n}\n\nexport interface DeleteBillingSettingsResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface GetBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n}\n\nexport interface GetBillingSettingsBackOfficeResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface UpdateBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /** BillingSettings to be updated, may be partial */\n billingSettings?: BillingSettings;\n /** Explicit list of fields to update */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsBackOfficeResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteByIdBackofficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /**\n * BillingSettings ID to delete\n * @format GUID\n */\n billingSettingsId?: string;\n /** The revision of the BillingSettings */\n revision?: string | null;\n}\n\nexport interface DeleteByIdBackofficeResponse {}\n\nexport interface GetBillingSettingsDefaultsRequest {}\n\nexport interface GetBillingSettingsDefaultsResponse {\n /** The defaults row; missing when it was never written */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\n/**\n * Defaults shared by all sites, stored in one single-tenant row. Written only by Wix staff via\n * UpdateBillingSettingsDefaults; GetBillingSettings returns its `near_renewal` on every site.\n */\nexport interface BillingSettingsDefaults {\n /**\n * BillingSettingsDefaults ID\n * @format GUID\n */\n id?: string | null;\n /** Represents the current state of the row. Pass the latest revision to update it; omit it to create the row */\n revision?: string | null;\n /**\n * Represents the time this BillingSettingsDefaults was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Represents the time this BillingSettingsDefaults was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /** Near-renewal notice lead per vertical */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface UpdateBillingSettingsDefaultsRequest {\n /** Defaults to write */\n billingSettingsDefaults?: BillingSettingsDefaults;\n /** Fields to update; only near_renewal is supported */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsDefaultsResponse {\n /** The written defaults row */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n","import * as ambassadorWixPrimeAutoV1BillingSettings from './prime-auto-v1-billing-settings-billing-settings.http.js';\nimport * as ambassadorWixPrimeAutoV1BillingSettingsTypes from './prime-auto-v1-billing-settings-billing-settings.types.js';\nimport * as ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes from './prime-auto-v1-billing-settings-billing-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getBillingSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetBillingSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetBillingSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.getBillingSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing_settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getVerticalCustomerSettings(): __PublicMethodMetaInfo<\n 'GET',\n { appDefId: string },\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetVerticalCustomerSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetVerticalCustomerSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetVerticalCustomerSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetVerticalCustomerSettingsResponse\n> {\n const payload = { appDefId: ':appDefId' } as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.getVerticalCustomerSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n pathParams: { appDefId: 'appDefId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateBillingSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n { billingSettingsId: string },\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.UpdateBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.UpdateBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.UpdateBillingSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.UpdateBillingSettingsResponse\n> {\n const payload = { billingSettings: { id: ':billingSettingsId' } } as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.updateBillingSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/billing_settings/{billingSettings.id}',\n pathParams: { billingSettingsId: 'billingSettingsId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n BillingSettings as BillingSettingsOriginal,\n GracePeriodSettings as GracePeriodSettingsOriginal,\n GracePeriodSettingsModelOneOf as GracePeriodSettingsModelOneOfOriginal,\n ModelType as ModelTypeOriginal,\n ModelTypeWithLiterals as ModelTypeWithLiteralsOriginal,\n FixedDuration as FixedDurationOriginal,\n FixedDurationTimeUnitOneOf as FixedDurationTimeUnitOneOfOriginal,\n DurationByCycleUnit as DurationByCycleUnitOriginal,\n AutomaticRetrySettings as AutomaticRetrySettingsOriginal,\n TaxSettings as TaxSettingsOriginal,\n TaxSettingsModelOneOf as TaxSettingsModelOneOfOriginal,\n GlobalTaxSettings as GlobalTaxSettingsOriginal,\n DynamicTaxSettings as DynamicTaxSettingsOriginal,\n InvoicesSettings as InvoicesSettingsOriginal,\n PlatformFeeSettings as PlatformFeeSettingsOriginal,\n PlatformFeeConfig as PlatformFeeConfigOriginal,\n PlatformFeeConfigFeeModelOneOf as PlatformFeeConfigFeeModelOneOfOriginal,\n AbsorbFeeConfig as AbsorbFeeConfigOriginal,\n AbsorbFeeConfigValueOneOf as AbsorbFeeConfigValueOneOfOriginal,\n PercentageFee as PercentageFeeOriginal,\n FixedAmountFee as FixedAmountFeeOriginal,\n PassOnFeeConfig as PassOnFeeConfigOriginal,\n PassOnFeeConfigValueOneOf as PassOnFeeConfigValueOneOfOriginal,\n CustomerActionSettings as CustomerActionSettingsOriginal,\n SkipActionSettings as SkipActionSettingsOriginal,\n SkipActionConfiguration as SkipActionConfigurationOriginal,\n PauseResumeActionSettings as PauseResumeActionSettingsOriginal,\n PauseResumeActionConfiguration as PauseResumeActionConfigurationOriginal,\n CancelActionSettings as CancelActionSettingsOriginal,\n CancelActionConfiguration as CancelActionConfigurationOriginal,\n UpmActionSettings as UpmActionSettingsOriginal,\n UpdateBillingDateActionSettings as UpdateBillingDateActionSettingsOriginal,\n UpdateBillingDateActionConfiguration as UpdateBillingDateActionConfigurationOriginal,\n VerticalCustomerSettings as VerticalCustomerSettingsOriginal,\n CustomerSettings as CustomerSettingsOriginal,\n SkipAction as SkipActionOriginal,\n SkipActionConfig as SkipActionConfigOriginal,\n PauseResumeAction as PauseResumeActionOriginal,\n PauseResumeActionConfig as PauseResumeActionConfigOriginal,\n CancelAction as CancelActionOriginal,\n CancelActionConfig as CancelActionConfigOriginal,\n CancellationTiming as CancellationTimingOriginal,\n CancellationTimingWithLiterals as CancellationTimingWithLiteralsOriginal,\n UpdatePaymentMethodAction as UpdatePaymentMethodActionOriginal,\n UpdateBillingDateAction as UpdateBillingDateActionOriginal,\n UpdateBillingDateActionConfig as UpdateBillingDateActionConfigOriginal,\n ChangeActionConfig as ChangeActionConfigOriginal,\n UpdateItemsAction as UpdateItemsActionOriginal,\n UpdateItemsActionConfig as UpdateItemsActionConfigOriginal,\n NearRenewalSettings as NearRenewalSettingsOriginal,\n NearRenewalConfig as NearRenewalConfigOriginal,\n CycleLead as CycleLeadOriginal,\n CycleUnit as CycleUnitOriginal,\n CycleUnitWithLiterals as CycleUnitWithLiteralsOriginal,\n SettingsAction as SettingsActionOriginal,\n SettingsActionActionTypeOneOf as SettingsActionActionTypeOneOfOriginal,\n InitializeDynamicTax as InitializeDynamicTaxOriginal,\n GetBillingSettingsRequest as GetBillingSettingsRequestOriginal,\n GetBillingSettingsResponse as GetBillingSettingsResponseOriginal,\n GetVerticalCustomerSettingsRequest as GetVerticalCustomerSettingsRequestOriginal,\n GetVerticalCustomerSettingsResponse as GetVerticalCustomerSettingsResponseOriginal,\n UpdateBillingSettingsRequest as UpdateBillingSettingsRequestOriginal,\n UpdateBillingSettingsResponse as UpdateBillingSettingsResponseOriginal,\n DeleteBillingSettingsRequest as DeleteBillingSettingsRequestOriginal,\n DeleteBillingSettingsResponse as DeleteBillingSettingsResponseOriginal,\n Empty as EmptyOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n GetBillingSettingsBackOfficeRequest as GetBillingSettingsBackOfficeRequestOriginal,\n GetBillingSettingsBackOfficeResponse as GetBillingSettingsBackOfficeResponseOriginal,\n UpdateBillingSettingsBackOfficeRequest as UpdateBillingSettingsBackOfficeRequestOriginal,\n UpdateBillingSettingsBackOfficeResponse as UpdateBillingSettingsBackOfficeResponseOriginal,\n DeleteByIdBackofficeRequest as DeleteByIdBackofficeRequestOriginal,\n DeleteByIdBackofficeResponse as DeleteByIdBackofficeResponseOriginal,\n GetBillingSettingsDefaultsRequest as GetBillingSettingsDefaultsRequestOriginal,\n GetBillingSettingsDefaultsResponse as GetBillingSettingsDefaultsResponseOriginal,\n BillingSettingsDefaults as BillingSettingsDefaultsOriginal,\n UpdateBillingSettingsDefaultsRequest as UpdateBillingSettingsDefaultsRequestOriginal,\n UpdateBillingSettingsDefaultsResponse as UpdateBillingSettingsDefaultsResponseOriginal,\n} from './prime-auto-v1-billing-settings-billing-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAAA;AAAA,EAAA,mCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,8BAA8B;AAAA,EACtC,EAAE,MAAM,8BAA8B;AACxC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;AAE3C,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;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AoB;AAAA,IACrD,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","import_timestamp","import_rest_modules","payload","ModelType","CancellationTiming","CycleUnit","WebhookIdentityType","getBillingSettings","getVerticalCustomerSettings","updateBillingSettings"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/prime-auto-v1-billing-settings-billing-settings.http.ts","../../src/prime-auto-v1-billing-settings-billing-settings.types.ts","../../src/prime-auto-v1-billing-settings-billing-settings.meta.ts"],"sourcesContent":["export * from './src/prime-auto-v1-billing-settings-billing-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'billingSettings.createdDate' },\n { path: 'billingSettings.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'mask' }];\n\nfunction resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n ],\n _: [\n {\n srcPath: '/prime/auto/v1/billing_settings',\n destPath: '/v1/billing_settings',\n },\n {\n srcPath: '/_api/business-billing-settings',\n destPath: '',\n },\n ],\n 'payments.base44.com': [\n {\n srcPath: '/business-billing-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_subscription_billing-settings';\n\n/** Fetches BillingSettings and if not exists creates with default values */\nexport function getBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getBillingSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getBillingSettings;\n}\n\n/** Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings. */\nexport function getVerticalCustomerSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getVerticalCustomerSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getVerticalCustomerSettings;\n}\n\n/**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n */\nexport function updateBillingSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateBillingSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.prime.auto.v1.billing_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({\n protoPath: '/v1/billing_settings/{billingSettings.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateBillingSettings;\n}\n","export interface BillingSettings {\n /**\n * BillingSettings ID\n * @format GUID\n */\n id?: string | null;\n /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */\n revision?: string | null;\n /**\n * Represents the time this BillingSettings was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Represents the time this BillingSettings was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /** Settings for Grace period, which gives the customer time to fix the payment after payment failure. */\n gracePeriod?: GracePeriodSettings;\n /** Settings for taxes */\n taxes?: TaxSettings;\n /** Settings for invoices */\n invoices?: InvoicesSettings;\n /** Settings for platform fees per vertical */\n platformFees?: PlatformFeeSettings;\n /**\n * Deprecated. Use `customer_settings_by_app_def_id` (field 10). Kept for wire compat.\n * @deprecated\n */\n customerActions?: CustomerActionSettings;\n /**\n * Per-vertical customer settings, keyed by Wix `app_def_id`. Consulted only for\n * verticals opted in via `SubscriptionService.VerticalSettingsFacade`; see\n * `customer_settings.proto`.\n */\n customerSettingsByAppDefId?: Record<string, VerticalCustomerSettings>;\n /**\n * Near-renewal notice lead per vertical. Today it holds the shared defaults set by Wix staff via back-office rpcs;\n * UpdateBillingSettings ignores it until site-level near-renewal settings are supported.\n */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface GracePeriodSettings extends GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n /** Flag that represent if grace period feature is enabled */\n enabled?: boolean;\n /** model type of grace period amount */\n modelType?: ModelTypeWithLiterals;\n /**\n * Automatic retry settings that control whether and how payment should be retried during the subscription's grace period.\n * By default, automatic retry is disabled.\n */\n automaticRetrySettings?: AutomaticRetrySettings;\n}\n\n/** @oneof */\nexport interface GracePeriodSettingsModelOneOf {\n /** Amount of fixed grace period amount by a time unit */\n fixedDuration?: FixedDuration;\n /** Amount of grace period days for each billing cycle unit */\n durationByCycleUnit?: DurationByCycleUnit;\n}\n\nexport enum ModelType {\n UNKNOWN = 'UNKNOWN',\n FIXED_DURATION = 'FIXED_DURATION',\n DURATION_BY_CYCLE_UNIT = 'DURATION_BY_CYCLE_UNIT',\n}\n\n/** @enumType */\nexport type ModelTypeWithLiterals =\n | ModelType\n | 'UNKNOWN'\n | 'FIXED_DURATION'\n | 'DURATION_BY_CYCLE_UNIT';\n\nexport interface FixedDuration extends FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\n/** @oneof */\nexport interface FixedDurationTimeUnitOneOf {\n /**\n * The max amount for subscriptions with cycle unit of Day or Week is determined by the the following formula:\n * max = cycleUnit * cycleCount\n * where for daily cycleUnit = 1 and for weekly subscriptions cycleUnit = 7\n * For example: a subscription occurring every two weeks will have a max value of 7 * 2 = 14\n * a subscription occurring every two days will have a max value of 1 * 2 = 2\n * @min 1\n * @max 14\n */\n days?: number;\n}\n\nexport interface DurationByCycleUnit {\n /** @max 1 */\n daysForDailyCycles?: number;\n /** @max 6 */\n daysForWeeklyCycles?: number;\n /** @max 27 */\n daysForMonthlyCycles?: number;\n /** @max 60 */\n daysForYearlyCycles?: number;\n}\n\nexport interface AutomaticRetrySettings {\n enabled?: boolean;\n}\n\nexport interface TaxSettings extends TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\n/** @oneof */\nexport interface TaxSettingsModelOneOf {\n /** global tax settings, independent of region */\n global?: GlobalTaxSettings;\n /** dynamic tax settings */\n dynamic?: DynamicTaxSettings;\n}\n\nexport interface GlobalTaxSettings {\n /** This flag will be set on Subscription, if true then taxes are included in given prices */\n inclusive?: boolean;\n}\n\nexport interface DynamicTaxSettings {}\n\nexport interface InvoicesSettings {\n enabled?: boolean;\n}\n\nexport interface PlatformFeeSettings {\n /**\n * Map of vertical app ID to platform fee config\n * Key: vertical app_id (GUID as string). Missing entry → defaults to 0% (no fee).\n * Value: platform fee configuration\n * To DELETE an entry, send a PlatformFeeConfig with the vertical's app_id as key and an empty fee_model (neither absorb nor pass_on set).\n */\n verticalConfigs?: Record<string, PlatformFeeConfig>;\n}\n\nexport interface PlatformFeeConfig extends PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\n/** @oneof */\nexport interface PlatformFeeConfigFeeModelOneOf {\n absorb?: AbsorbFeeConfig;\n passOn?: PassOnFeeConfig;\n}\n\nexport interface AbsorbFeeConfig extends AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface AbsorbFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\nexport interface PercentageFee {\n /** @decimalValue options { gte:0.00, lte:100, maxScale:2 } */\n percentage?: string;\n}\n\nexport interface FixedAmountFee {\n /** @decimalValue options { gte:0.00, maxScale:4 } */\n amount?: string;\n}\n\nexport interface PassOnFeeConfig extends PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/** @oneof */\nexport interface PassOnFeeConfigValueOneOf {\n percentage?: PercentageFee;\n fixedAmount?: FixedAmountFee;\n}\n\n/**\n * Per-action merchant configuration for customer self-service actions.\n * All booleans use BoolValue (optional) so verticals can selectively override defaults.\n */\nexport interface CustomerActionSettings {\n /** Skip cycle action settings */\n skip?: SkipActionSettings;\n /** Pause/resume action settings */\n pauseResume?: PauseResumeActionSettings;\n /** Cancel action settings */\n cancel?: CancelActionSettings;\n /** Update payment method action settings */\n upm?: UpmActionSettings;\n /** Update billing date action settings */\n updateBillingDate?: UpdateBillingDateActionSettings;\n}\n\n/** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */\nexport interface SkipActionSettings {\n /** Whether the skip action is enabled */\n enabled?: boolean | null;\n /** Skip action configuration */\n configuration?: SkipActionConfiguration;\n}\n\n/** Configuration for the skip cycle action. */\nexport interface SkipActionConfiguration {\n /** Maximum number of billing cycles a customer can skip */\n maxSkipCycles?: number | null;\n /** Minimum days before billing date to allow skip */\n daysBeforeSkipAllowed?: number | null;\n /** Minimum days before billing date to allow resume from skip */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing date to cancel a scheduled skip */\n daysBeforeCancelSkipAllowed?: number | null;\n /** Maximum number of times a customer can perform skip action */\n maxSkipUserActions?: number | null;\n /** Allow skipping the next billing cycle */\n skipNextCycle?: boolean | null;\n /** Allow skipping future billing cycles */\n skipFutureCycles?: boolean | null;\n /** Allow reversing a pending skip */\n unskip?: boolean | null;\n /** Allow cancelling a scheduled skip-pause */\n cancelScheduledPause?: boolean | null;\n /** Allow immediate resume from skip */\n resumeImmediately?: boolean | null;\n /** Allow resume at the next billing date */\n resumeAtNextBillingDate?: boolean | null;\n /** Allow resume at a specific date */\n resumeAtSpecificDate?: boolean | null;\n /** Allow setting auto-resume after N cycles */\n autoResumeCycles?: boolean | null;\n}\n\n/**\n * Subscription pause/resume settings — full pause of billing, not skip.\n * Skip action (temporary pause for N cycles) is configured via SkipActionSettings.\n */\nexport interface PauseResumeActionSettings {\n /** Whether the pause/resume action is enabled */\n enabled?: boolean | null;\n /** Pause/resume action configuration */\n configuration?: PauseResumeActionConfiguration;\n}\n\n/**\n * Configuration for the subscription pause/resume action.\n * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration.\n */\nexport interface PauseResumeActionConfiguration {\n /** Minimum days before billing date to allow pause */\n daysBeforePauseAllowed?: number | null;\n /** Maximum cycles for auto-resume after pause */\n maxAutoResumeCycles?: number | null;\n /** Minimum days before billing date to allow resume */\n daysBeforeResumeAllowed?: number | null;\n /** Minimum days before billing to cancel scheduled pause */\n daysBeforeCancelScheduledPauseAllowed?: number | null;\n /** Maximum number of times a customer can perform pause action */\n maxPauseUserActions?: number | null;\n}\n\n/** Cancel subscription action settings. */\nexport interface CancelActionSettings {\n /** Whether the cancel action is enabled */\n enabled?: boolean | null;\n /** Cancel action configuration */\n configuration?: CancelActionConfiguration;\n}\n\n/** Configuration for the cancel subscription action. */\nexport interface CancelActionConfiguration {\n /** Minimum days before period end to allow cancellation */\n minDaysBeforePeriodEnd?: number | null;\n}\n\n/** Update Payment Method action settings — toggle only, no additional configuration. */\nexport interface UpmActionSettings {\n /** Whether the update payment method action is enabled */\n enabled?: boolean | null;\n}\n\n/** Update billing date action settings. */\nexport interface UpdateBillingDateActionSettings {\n /** Whether the update billing date action is enabled */\n enabled?: boolean | null;\n /** Update billing date configuration */\n configuration?: UpdateBillingDateActionConfiguration;\n}\n\n/** Configuration for the update billing date action. */\nexport interface UpdateBillingDateActionConfiguration {\n /** Whether to adjust price when billing date changes */\n priceAdjustmentEnabled?: boolean | null;\n /** Maximum days the billing date can be moved forward */\n maxDaysAdvance?: number | null;\n /** Maximum days the billing date can be postponed */\n maxDaysPostpone?: number | null;\n /** Minimum days from today for the new billing date */\n minDaysFromToday?: number | null;\n /** Whether to allow advancing billing date for weekly subscriptions */\n allowAdvanceForWeekly?: boolean | null;\n}\n\n/**\n * Customer settings scoped to a single vertical (Stores, Pricing\n * Plans, Bookings, ...). Carries a vertical-wide default and optional\n * per-entity overrides.\n *\n * Vertical-level opt-in (whether this vertical uses the new\n * BBS-based flow at all) is owned by SubscriptionService's\n * VerticalSettingsFacade, not by a field on this message. The\n * resolver invokes the facade first; only opted-in verticals reach\n * the inner resolution below. Non-opted-in verticals fall back to\n * the legacy `SubscriptionPolicies` boolean path (see plan.md)\n * without consulting `customer_settings_by_app_def_id` at all.\n *\n * Inner resolution for an action on entity X within an opted-in\n * vertical:\n * 1. If `settings_by_entity_id` has key X, use that value.\n * 2. Otherwise, use `default_settings`.\n * 3. If the resolved value is unset, every action resolves to\n * disabled (CustomerSettings field defaults).\n */\nexport interface VerticalCustomerSettings {\n /**\n * Default customer settings for this vertical, applied when\n * `settings_by_entity_id` has no entry for the current entity.\n * Unset = every action disabled.\n */\n defaultSettings?: CustomerSettings;\n /**\n * Per-entity overrides, keyed by the entity ID this vertical owns\n * (product ID for Stores, plan ID for Pricing Plans, element ID\n * for catalog-style verticals). UUID-format string. Empty map =\n * no overrides; every entity resolves to `default_settings`.\n * Override semantics: full-replace (proto-redesign.md S8.4).\n */\n settingsByEntityId?: Record<string, CustomerSettings>;\n}\n\n/**\n * Configuration of the five self-service actions a merchant's\n * end-customers can perform on their subscriptions. Scoping (per\n * tenant -> per vertical -> per entity) is handled by\n * VerticalCustomerSettings plus a map field on BillingSettings keyed\n * by Wix app_def_id.\n *\n * Terminology: \"customer\" here means the merchant's end-customer --\n * i.e., the \"User of a User\" (UoU) in the CDD project name. Throughout\n * BASS, unprefixed `Customer` always refers to this UoU; the prefixed\n * `WixCustomer` (see billing-wix-customer-mgmt,\n * billing-wix-customer-notifications) refers to the merchant\n * (Wix's customer).\n *\n * Source of truth: wix-private/premium-billing-cdd/projects/uou-settings/.\n *\n * Semantics:\n * * Each action defaults to disabled. An action is allowed only when\n * its submessage is present AND `enabled = true`.\n * * Unset config scalars resolve to the per-field defaults documented\n * in pm/product-hub.md.\n *\n * Naming: AIP-140 (no prepositions; no verbs; adjectives precede nouns)\n * and AIP-141 (unit suffixes on quantities, `per` for inverse units).\n */\nexport interface CustomerSettings {\n skipAction?: SkipAction;\n pauseResumeAction?: PauseResumeAction;\n cancelAction?: CancelAction;\n updatePaymentMethodAction?: UpdatePaymentMethodAction;\n updateBillingDateAction?: UpdateBillingDateAction;\n changeAction?: ChangeActionConfig;\n updateItemsAction?: UpdateItemsAction;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Skip -- skip billing cycles without changing the billing anchor.\n * CDD: pm/product-hub.md \"Skip Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface SkipAction {\n enabled?: boolean;\n config?: SkipActionConfig;\n}\n\nexport interface SkipActionConfig {\n /**\n * Min days notice the customer must give before a scheduled skip\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active skip,\n * measured against that skip's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress skip (return to billing before all configured skip\n * cycles are consumed). Measured against the start of the cycle\n * the customer wants billed; early-end always takes effect at a\n * cycle boundary, never mid-cycle. The natural end of the skip\n * (configured skip cycles complete) is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /** Max cycles a single skip event may span. Default 5. Range 1-10. */\n maxCyclesPerSkip?: number | null;\n /**\n * Lifetime cap on user-initiated skips for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Pause/Resume -- pause shifts the billing anchor; resume manually or\n * auto-resume after N cycles. Distinct from Skip, which does not\n * shift the anchor.\n * CDD: pm/product-hub.md \"Advanced Pause/Resume Action Configuration\".\n * The CDD's \"Advanced\" qualifier disambiguates from Skip in prose; in\n * this proto Skip has its own message, so the qualifier is dropped\n * per AIP-140 (avoid adjectives that always apply).\n * ---------------------------------------------------------------------------\n */\nexport interface PauseResumeAction {\n enabled?: boolean;\n config?: PauseResumeActionConfig;\n}\n\nexport interface PauseResumeActionConfig {\n /**\n * Min days notice the customer must give before a scheduled pause\n * takes effect (anchor: end of the current billing cycle).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n /**\n * Min days notice to revoke a scheduled-but-not-yet-active pause,\n * measured against that pause's planned start. 0 = no gate.\n * Default 0 (proto3 zero). Range 0-10.\n */\n minRevocationNoticeDays?: number;\n /**\n * Min days notice for a *user-initiated* early end of an\n * in-progress pause (resume billing before the customer-chosen\n * auto-resume cycle count completes). Measured against the start\n * of the cycle the customer wants billed; early-end always takes\n * effect at a cycle boundary, never mid-cycle. Automatic auto-resume\n * after `max_auto_resume_cycles` is NOT gated by this setting.\n * CDD 2026-05-12 / Q-PM-005. 0 = no gate. Default 0 (proto3 zero).\n * Range 0-10.\n */\n minEarlyEndNoticeDays?: number;\n /**\n * Merchant cap on the number of cycles the customer may choose for\n * cycle-based auto-resume of a pause. Unset = no merchant cap\n * (backend hard limit 10). Range 1-10.\n */\n maxAutoResumeCycles?: number | null;\n /**\n * Lifetime cap on user-initiated pauses for this subscription\n * (V1; CDD 2026-05-12 / Q-PM-001). No periodic reset -- cancel +\n * re-subscribe starts a fresh counter. Default 3. Integer > 0.\n * Forward-compat: a rolling-window reset may be added in V2 via\n * an additive `reset_window_*` field (unset = lifetime).\n */\n maxUserActions?: number | null;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Cancel -- end the subscription.\n * CDD: pm/product-hub.md \"Cancel Action Configuration\".\n * pm/decisions.md 2026-02-17: single-select; \"Min Days Before Period\n * End\" dropped; \"Immediate with Proration\" excluded from V1.\n * ---------------------------------------------------------------------------\n */\nexport interface CancelAction {\n enabled?: boolean;\n config?: CancelActionConfig;\n}\n\nexport interface CancelActionConfig {\n /**\n * Timing of a customer cancellation: end of current billing\n * period (default) or immediate. Defaults to END_OF_PERIOD when\n * unset.\n */\n cancellationTiming?: CancellationTimingWithLiterals;\n}\n\n/**\n * Nested per AIP-126 (enum used by only one message). Non-frozen:\n * value 3 is reserved for a future \"Immediate with Proration\" mode.\n */\nexport enum CancellationTiming {\n /** Server treats UNSPECIFIED as END_OF_PERIOD (CDD dev/architecture.md). */\n UNSPECIFIED = 'UNSPECIFIED',\n /**\n * Subscription continues until the end of the current billing\n * period, then does not renew. CDD default; CDD shorthand: \"EOP\".\n */\n END_OF_PERIOD = 'END_OF_PERIOD',\n /** Subscription ends immediately upon cancellation. */\n IMMEDIATE = 'IMMEDIATE',\n}\n\n/** @enumType */\nexport type CancellationTimingWithLiterals =\n | CancellationTiming\n | 'UNSPECIFIED'\n | 'END_OF_PERIOD'\n | 'IMMEDIATE';\n\n/**\n * ---------------------------------------------------------------------------\n * Update Payment Method (UPM) -- replace the payment method.\n * CDD: pm/product-hub.md \"Update Payment Method (UPM) Action\n * Configuration\". CDD has only `enabled`; no config submessage.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdatePaymentMethodAction {\n enabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Billing Date -- move the next billing date.\n * CDD: pm/product-hub.md \"Update Billing Date Action Configuration\".\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateBillingDateAction {\n enabled?: boolean;\n config?: UpdateBillingDateActionConfig;\n}\n\nexport interface UpdateBillingDateActionConfig {\n /**\n * When true: moving the billing date earlier prorates, moving it\n * later adds an extra charge. Default false.\n * CDD identifier: `priceAdjustmentEnabled`.\n */\n priceAdjustmentEnabled?: boolean;\n /**\n * Max days the new date may be earlier than the original. Unset =\n * no cap (backend default: within one cycle). Positive integer.\n * CDD identifier: `maxDaysAdvance` (renamed for AIP-141 unit suffix).\n */\n maxAdvanceDays?: number | null;\n /**\n * Max days the new date may be later than the original. Unset = no\n * cap (backend default: one cycle, or one month for cycles > a\n * month). Positive integer.\n * CDD identifier: `maxDaysPostpone` (renamed for AIP-141 unit suffix).\n */\n maxPostponeDays?: number | null;\n /**\n * Earliest the new date may be set, expressed as days from today.\n * Default 5 (backend hard floor). Integer >= 5. Does not apply to\n * weekly subscriptions (see `weekly_advance_enabled`).\n * CDD identifier: `minDaysFromToday`.\n */\n minTodayOffsetDays?: number | null;\n /**\n * Whether weekly subscriptions may move the billing date earlier.\n * Default false. CDD identifier: `allowAdvanceForWeekly` (renamed:\n * AIP-140 forbids verbs and the preposition \"for\").\n */\n weeklyAdvanceEnabled?: boolean;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Change -- schedule a plan/cycle/quantity change for the next renewal.\n * CDD: bass-pending-change-contract pm/product-hub.md R8; BILL-864.\n * No `enabled` wrapper — absent = today's behaviour (trial hard-blocked,\n * grace allowed, no notice gate). Present = its values gate.\n * ---------------------------------------------------------------------------\n */\nexport interface ChangeActionConfig {\n /**\n * Allow scheduling a change while the subscription is on free trial.\n * Default false (proto3 zero). Absent config also blocks trial (today's\n * hard-coded `checkNotOnFreeTrial`).\n */\n allowDuringFreeTrial?: boolean;\n /**\n * Allow scheduling a change while the subscription is in grace period.\n * Default false (proto3 zero). Absent config ALLOWS grace (today's\n * behaviour — no grace check exists). This flag only takes effect when\n * the config message is present.\n */\n allowDuringGracePeriod?: boolean;\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n * Mirrors skip/pause `min_start_notice_days` convention.\n */\n minStartNoticeDays?: number;\n}\n\n/**\n * ---------------------------------------------------------------------------\n * Update Items -- add, update or remove items for the next billing cycle\n * (UpdateSubscriptionItems). Gates the customer UPDATE_SUBSCRIPTION_ITEMS action.\n * BILL-962: no free-trial / grace flags -- item updates only apply on the next cycle.\n * ---------------------------------------------------------------------------\n */\nexport interface UpdateItemsAction {\n enabled?: boolean;\n config?: UpdateItemsActionConfig;\n}\n\nexport interface UpdateItemsActionConfig {\n /**\n * Min days notice before the next renewal (anchor: next_billing_date).\n * Inside the window the customer can't update items.\n * 0 = no gate. Default 0 (proto3 zero). Range 0-10.\n */\n minStartNoticeDays?: number;\n}\n\nexport interface NearRenewalSettings {\n /** Key: vertical app_def_id (GUID). Missing entry → the caller's default lead. */\n verticalConfigs?: Record<string, NearRenewalConfig>;\n}\n\nexport interface NearRenewalConfig {\n /**\n * At most one entry per unit.\n * @maxSize 2\n */\n cycleLeads?: CycleLead[];\n}\n\nexport interface CycleLead {\n /** Billing cycle unit this lead applies to */\n unit?: CycleUnitWithLiterals;\n /**\n * Days before the charge to send the near-renewal notice. MONTH is at most 27 (shorter than February), enforced in the validator.\n * @min 1\n * @max 60\n */\n daysBeforeCharge?: number;\n}\n\nexport enum CycleUnit {\n UNKNOWN_CYCLE_UNIT = 'UNKNOWN_CYCLE_UNIT',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type CycleUnitWithLiterals =\n | CycleUnit\n | 'UNKNOWN_CYCLE_UNIT'\n | 'MONTH'\n | 'YEAR';\n\nexport interface SettingsAction extends SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\n/** @oneof */\nexport interface SettingsActionActionTypeOneOf {\n initializeDynamicTax?: InitializeDynamicTax;\n}\n\nexport interface InitializeDynamicTax {}\n\nexport interface GetBillingSettingsRequest {}\n\nexport interface GetBillingSettingsResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface GetVerticalCustomerSettingsRequest {\n /**\n * Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface GetVerticalCustomerSettingsResponse {\n /** Customer settings for the requested vertical; empty when none configured */\n verticalCustomerSettings?: VerticalCustomerSettings;\n}\n\nexport interface UpdateBillingSettingsRequest {\n /** BillingSettings to be updated, may be partial */\n billingSettings: BillingSettings;\n /**\n * Explicit list of fields to update\n * @internal\n */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteBillingSettingsRequest {\n /** string billing_settings_id = 1 [(.wix.api.format) = GUID]; // Id of the BillingSettings to delete */\n revision?: string;\n}\n\nexport interface DeleteBillingSettingsResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface GetBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n}\n\nexport interface GetBillingSettingsBackOfficeResponse {\n /** The fetched BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface UpdateBillingSettingsBackOfficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /** BillingSettings to be updated, may be partial */\n billingSettings?: BillingSettings;\n /** Explicit list of fields to update */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsBackOfficeResponse {\n /** The updated BillingSettings */\n billingSettings?: BillingSettings;\n}\n\nexport interface DeleteByIdBackofficeRequest {\n /**\n * Tenant ID\n * @format GUID\n */\n tenantId?: string;\n /**\n * BillingSettings ID to delete\n * @format GUID\n */\n billingSettingsId?: string;\n /** The revision of the BillingSettings */\n revision?: string | null;\n}\n\nexport interface DeleteByIdBackofficeResponse {}\n\nexport interface GetBillingSettingsDefaultsRequest {}\n\nexport interface GetBillingSettingsDefaultsResponse {\n /** The defaults row; missing when it was never written */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n\n/**\n * Defaults shared by all sites, stored in one single-tenant row. Written only by Wix staff via\n * UpdateBillingSettingsDefaults; GetBillingSettings returns its `near_renewal` on every site.\n */\nexport interface BillingSettingsDefaults {\n /**\n * BillingSettingsDefaults ID\n * @format GUID\n */\n id?: string | null;\n /** Represents the current state of the row. Pass the latest revision to update it; omit it to create the row */\n revision?: string | null;\n /**\n * Represents the time this BillingSettingsDefaults was created\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Represents the time this BillingSettingsDefaults was last updated\n * @readonly\n */\n updatedDate?: Date | null;\n /** Near-renewal notice lead per vertical */\n nearRenewal?: NearRenewalSettings;\n}\n\nexport interface UpdateBillingSettingsDefaultsRequest {\n /** Defaults to write */\n billingSettingsDefaults?: BillingSettingsDefaults;\n /** Fields to update; only near_renewal is supported */\n mask?: string[];\n}\n\nexport interface UpdateBillingSettingsDefaultsResponse {\n /** The written defaults row */\n billingSettingsDefaults?: BillingSettingsDefaults;\n}\n","import * as ambassadorWixPrimeAutoV1BillingSettings from './prime-auto-v1-billing-settings-billing-settings.http.js';\nimport * as ambassadorWixPrimeAutoV1BillingSettingsTypes from './prime-auto-v1-billing-settings-billing-settings.types.js';\nimport * as ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes from './prime-auto-v1-billing-settings-billing-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getBillingSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetBillingSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetBillingSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.getBillingSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/billing_settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getVerticalCustomerSettings(): __PublicMethodMetaInfo<\n 'GET',\n { appDefId: string },\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetVerticalCustomerSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetVerticalCustomerSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.GetVerticalCustomerSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.GetVerticalCustomerSettingsResponse\n> {\n const payload = { appDefId: ':appDefId' } as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.getVerticalCustomerSettings(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/billing_settings/vertical-customer-settings/{appDefId}',\n pathParams: { appDefId: 'appDefId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateBillingSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n { billingSettingsId: string },\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.UpdateBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.UpdateBillingSettingsRequest,\n ambassadorWixPrimeAutoV1BillingSettingsUniversalTypes.UpdateBillingSettingsResponse,\n ambassadorWixPrimeAutoV1BillingSettingsTypes.UpdateBillingSettingsResponse\n> {\n const payload = { billingSettings: { id: ':billingSettingsId' } } as any;\n\n const getRequestOptions =\n ambassadorWixPrimeAutoV1BillingSettings.updateBillingSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/billing_settings/{billingSettings.id}',\n pathParams: { billingSettingsId: 'billingSettingsId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n BillingSettings as BillingSettingsOriginal,\n GracePeriodSettings as GracePeriodSettingsOriginal,\n GracePeriodSettingsModelOneOf as GracePeriodSettingsModelOneOfOriginal,\n ModelType as ModelTypeOriginal,\n ModelTypeWithLiterals as ModelTypeWithLiteralsOriginal,\n FixedDuration as FixedDurationOriginal,\n FixedDurationTimeUnitOneOf as FixedDurationTimeUnitOneOfOriginal,\n DurationByCycleUnit as DurationByCycleUnitOriginal,\n AutomaticRetrySettings as AutomaticRetrySettingsOriginal,\n TaxSettings as TaxSettingsOriginal,\n TaxSettingsModelOneOf as TaxSettingsModelOneOfOriginal,\n GlobalTaxSettings as GlobalTaxSettingsOriginal,\n DynamicTaxSettings as DynamicTaxSettingsOriginal,\n InvoicesSettings as InvoicesSettingsOriginal,\n PlatformFeeSettings as PlatformFeeSettingsOriginal,\n PlatformFeeConfig as PlatformFeeConfigOriginal,\n PlatformFeeConfigFeeModelOneOf as PlatformFeeConfigFeeModelOneOfOriginal,\n AbsorbFeeConfig as AbsorbFeeConfigOriginal,\n AbsorbFeeConfigValueOneOf as AbsorbFeeConfigValueOneOfOriginal,\n PercentageFee as PercentageFeeOriginal,\n FixedAmountFee as FixedAmountFeeOriginal,\n PassOnFeeConfig as PassOnFeeConfigOriginal,\n PassOnFeeConfigValueOneOf as PassOnFeeConfigValueOneOfOriginal,\n CustomerActionSettings as CustomerActionSettingsOriginal,\n SkipActionSettings as SkipActionSettingsOriginal,\n SkipActionConfiguration as SkipActionConfigurationOriginal,\n PauseResumeActionSettings as PauseResumeActionSettingsOriginal,\n PauseResumeActionConfiguration as PauseResumeActionConfigurationOriginal,\n CancelActionSettings as CancelActionSettingsOriginal,\n CancelActionConfiguration as CancelActionConfigurationOriginal,\n UpmActionSettings as UpmActionSettingsOriginal,\n UpdateBillingDateActionSettings as UpdateBillingDateActionSettingsOriginal,\n UpdateBillingDateActionConfiguration as UpdateBillingDateActionConfigurationOriginal,\n VerticalCustomerSettings as VerticalCustomerSettingsOriginal,\n CustomerSettings as CustomerSettingsOriginal,\n SkipAction as SkipActionOriginal,\n SkipActionConfig as SkipActionConfigOriginal,\n PauseResumeAction as PauseResumeActionOriginal,\n PauseResumeActionConfig as PauseResumeActionConfigOriginal,\n CancelAction as CancelActionOriginal,\n CancelActionConfig as CancelActionConfigOriginal,\n CancellationTiming as CancellationTimingOriginal,\n CancellationTimingWithLiterals as CancellationTimingWithLiteralsOriginal,\n UpdatePaymentMethodAction as UpdatePaymentMethodActionOriginal,\n UpdateBillingDateAction as UpdateBillingDateActionOriginal,\n UpdateBillingDateActionConfig as UpdateBillingDateActionConfigOriginal,\n ChangeActionConfig as ChangeActionConfigOriginal,\n UpdateItemsAction as UpdateItemsActionOriginal,\n UpdateItemsActionConfig as UpdateItemsActionConfigOriginal,\n NearRenewalSettings as NearRenewalSettingsOriginal,\n NearRenewalConfig as NearRenewalConfigOriginal,\n CycleLead as CycleLeadOriginal,\n CycleUnit as CycleUnitOriginal,\n CycleUnitWithLiterals as CycleUnitWithLiteralsOriginal,\n SettingsAction as SettingsActionOriginal,\n SettingsActionActionTypeOneOf as SettingsActionActionTypeOneOfOriginal,\n InitializeDynamicTax as InitializeDynamicTaxOriginal,\n GetBillingSettingsRequest as GetBillingSettingsRequestOriginal,\n GetBillingSettingsResponse as GetBillingSettingsResponseOriginal,\n GetVerticalCustomerSettingsRequest as GetVerticalCustomerSettingsRequestOriginal,\n GetVerticalCustomerSettingsResponse as GetVerticalCustomerSettingsResponseOriginal,\n UpdateBillingSettingsRequest as UpdateBillingSettingsRequestOriginal,\n UpdateBillingSettingsResponse as UpdateBillingSettingsResponseOriginal,\n DeleteBillingSettingsRequest as DeleteBillingSettingsRequestOriginal,\n DeleteBillingSettingsResponse as DeleteBillingSettingsResponseOriginal,\n Empty as EmptyOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n GetBillingSettingsBackOfficeRequest as GetBillingSettingsBackOfficeRequestOriginal,\n GetBillingSettingsBackOfficeResponse as GetBillingSettingsBackOfficeResponseOriginal,\n UpdateBillingSettingsBackOfficeRequest as UpdateBillingSettingsBackOfficeRequestOriginal,\n UpdateBillingSettingsBackOfficeResponse as UpdateBillingSettingsBackOfficeResponseOriginal,\n DeleteByIdBackofficeRequest as DeleteByIdBackofficeRequestOriginal,\n DeleteByIdBackofficeResponse as DeleteByIdBackofficeResponseOriginal,\n GetBillingSettingsDefaultsRequest as GetBillingSettingsDefaultsRequestOriginal,\n GetBillingSettingsDefaultsResponse as GetBillingSettingsDefaultsResponseOriginal,\n BillingSettingsDefaults as BillingSettingsDefaultsOriginal,\n UpdateBillingSettingsDefaultsRequest as UpdateBillingSettingsDefaultsRequestOriginal,\n UpdateBillingSettingsDefaultsResponse as UpdateBillingSettingsDefaultsResponseOriginal,\n} from './prime-auto-v1-billing-settings-billing-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAAA;AAAA,EAAA,mCAAAC;AAAA,EAAA,6BAAAC;AAAA;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,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,yBAOd;AACA,QAAM,UAAU,EAAE,iBAAiB,EAAE,IAAI,qBAAqB,EAAE;AAEhE,QAAM,oBACoC,sBAAsB,OAAO;AAEvE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,mBAAmB,oBAAoB;AAAA,IACrD,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","import_timestamp","import_rest_modules","payload","ModelType","CancellationTiming","CycleUnit","WebhookIdentityType","getBillingSettings","getVerticalCustomerSettings","updateBillingSettings"]}
@@ -47,6 +47,10 @@ function resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(opts) {
47
47
  {
48
48
  srcPath: "/prime/auto/v1/billing_settings",
49
49
  destPath: "/v1/billing_settings"
50
+ },
51
+ {
52
+ srcPath: "/_api/business-billing-settings",
53
+ destPath: ""
50
54
  }
51
55
  ],
52
56
  "payments.base44.com": [