@wix/auto_sdk_subscription_billing-settings 0.0.0-stage → 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.
- package/build/cjs/index.d.ts +40 -0
- package/build/cjs/index.js +360 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1061 -0
- package/build/cjs/index.typings.js +285 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +930 -0
- package/build/cjs/meta.js +266 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +40 -0
- package/build/es/index.mjs +328 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1061 -0
- package/build/es/index.typings.mjs +255 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +930 -0
- package/build/es/meta.mjs +233 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +40 -0
- package/build/internal/cjs/index.typings.d.ts +1066 -0
- package/build/internal/cjs/meta.d.ts +977 -0
- package/build/internal/es/index.d.mts +40 -0
- package/build/internal/es/index.typings.d.mts +1066 -0
- package/build/internal/es/meta.d.mts +977 -0
- package/meta/package.json +3 -0
- package/package.json +51 -3
- package/README.md +0 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { GetBillingSettingsResponse, GetVerticalCustomerSettingsResponse, UpdateBillingSettings, UpdateBillingSettingsResponse, BillingSettingsCreatedEnvelope, BillingSettingsUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { AbsorbFeeConfig, AbsorbFeeConfigValueOneOf, AccountInfo, AccountInfoMetadata, ActionEvent, AutomaticRetrySettings, BaseEventMetadata, BillingSettings, BillingSettingsDefaults, CancelAction, CancelActionConfig, CancelActionConfiguration, CancelActionSettings, CancellationTiming, CancellationTimingWithLiterals, ChangeActionConfig, CustomerActionSettings, CustomerSettings, CycleLead, CycleUnit, CycleUnitWithLiterals, DeleteBillingSettingsRequest, DeleteBillingSettingsResponse, DeleteByIdBackofficeRequest, DeleteByIdBackofficeResponse, DomainEvent, DomainEventBodyOneOf, DurationByCycleUnit, DynamicTaxSettings, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FixedAmountFee, FixedDuration, FixedDurationTimeUnitOneOf, GetBillingSettingsBackOfficeRequest, GetBillingSettingsBackOfficeResponse, GetBillingSettingsDefaultsRequest, GetBillingSettingsDefaultsResponse, GetBillingSettingsRequest, GetVerticalCustomerSettingsRequest, GlobalTaxSettings, GracePeriodSettings, GracePeriodSettingsModelOneOf, IdentificationData, IdentificationDataIdOneOf, InitializeDynamicTax, InvoicesSettings, MessageEnvelope, ModelType, ModelTypeWithLiterals, NearRenewalConfig, NearRenewalSettings, PassOnFeeConfig, PassOnFeeConfigValueOneOf, PauseResumeAction, PauseResumeActionConfig, PauseResumeActionConfiguration, PauseResumeActionSettings, PercentageFee, PlatformFeeConfig, PlatformFeeConfigFeeModelOneOf, PlatformFeeSettings, RestoreInfo, SettingsAction, SettingsActionActionTypeOneOf, SkipAction, SkipActionConfig, SkipActionConfiguration, SkipActionSettings, TaxSettings, TaxSettingsModelOneOf, UpdateBillingDateAction, UpdateBillingDateActionConfig, UpdateBillingDateActionConfiguration, UpdateBillingDateActionSettings, UpdateBillingSettingsBackOfficeRequest, UpdateBillingSettingsBackOfficeResponse, UpdateBillingSettingsDefaultsRequest, UpdateBillingSettingsDefaultsResponse, UpdateBillingSettingsRequest, UpdateItemsAction, UpdateItemsActionConfig, UpdatePaymentMethodAction, UpmActionSettings, VerticalCustomerSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function getBillingSettings$1(httpClient: HttpClient): GetBillingSettingsSignature;
|
|
6
|
+
interface GetBillingSettingsSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Fetches BillingSettings and if not exists creates with default values
|
|
9
|
+
*/
|
|
10
|
+
(): Promise<NonNullablePaths<GetBillingSettingsResponse, `billingSettings.gracePeriod.fixedDuration.days` | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles` | `billingSettings.gracePeriod.enabled` | `billingSettings.gracePeriod.modelType` | `billingSettings.gracePeriod.automaticRetrySettings.enabled` | `billingSettings.taxes.global.inclusive` | `billingSettings.invoices.enabled`, 3>>;
|
|
11
|
+
}
|
|
12
|
+
declare function getVerticalCustomerSettings$1(httpClient: HttpClient): GetVerticalCustomerSettingsSignature;
|
|
13
|
+
interface GetVerticalCustomerSettingsSignature {
|
|
14
|
+
/**
|
|
15
|
+
* Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings.
|
|
16
|
+
* @param - Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch
|
|
17
|
+
*/
|
|
18
|
+
(appDefId: string): Promise<NonNullablePaths<GetVerticalCustomerSettingsResponse, `verticalCustomerSettings.defaultSettings.skipAction.enabled` | `verticalCustomerSettings.defaultSettings.skipAction.config.minStartNoticeDays` | `verticalCustomerSettings.defaultSettings.skipAction.config.minRevocationNoticeDays` | `verticalCustomerSettings.defaultSettings.skipAction.config.minEarlyEndNoticeDays` | `verticalCustomerSettings.defaultSettings.pauseResumeAction.enabled` | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minStartNoticeDays` | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minRevocationNoticeDays` | `verticalCustomerSettings.defaultSettings.pauseResumeAction.config.minEarlyEndNoticeDays` | `verticalCustomerSettings.defaultSettings.cancelAction.enabled` | `verticalCustomerSettings.defaultSettings.cancelAction.config.cancellationTiming` | `verticalCustomerSettings.defaultSettings.updatePaymentMethodAction.enabled` | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.enabled` | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.priceAdjustmentEnabled` | `verticalCustomerSettings.defaultSettings.updateBillingDateAction.config.weeklyAdvanceEnabled` | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringFreeTrial` | `verticalCustomerSettings.defaultSettings.changeAction.allowDuringGracePeriod` | `verticalCustomerSettings.defaultSettings.changeAction.minStartNoticeDays` | `verticalCustomerSettings.defaultSettings.updateItemsAction.enabled` | `verticalCustomerSettings.defaultSettings.updateItemsAction.config.minStartNoticeDays`, 4>>;
|
|
19
|
+
}
|
|
20
|
+
declare function updateBillingSettings$1(httpClient: HttpClient): UpdateBillingSettingsSignature;
|
|
21
|
+
interface UpdateBillingSettingsSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Update a BillingSettings, supports partial update
|
|
24
|
+
* Pass the latest `revision` for a successful update
|
|
25
|
+
* @param - BillingSettings ID
|
|
26
|
+
*/
|
|
27
|
+
(_id: string, billingSettings: UpdateBillingSettings): Promise<NonNullablePaths<UpdateBillingSettingsResponse, `billingSettings.gracePeriod.fixedDuration.days` | `billingSettings.gracePeriod.durationByCycleUnit.daysForDailyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForWeeklyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForMonthlyCycles` | `billingSettings.gracePeriod.durationByCycleUnit.daysForYearlyCycles` | `billingSettings.gracePeriod.enabled` | `billingSettings.gracePeriod.modelType` | `billingSettings.gracePeriod.automaticRetrySettings.enabled` | `billingSettings.taxes.global.inclusive` | `billingSettings.invoices.enabled`, 3>>;
|
|
28
|
+
}
|
|
29
|
+
declare const onBillingSettingsCreated$1: EventDefinition<BillingSettingsCreatedEnvelope, "wix.prime.auto.v1.billing_settings_created">;
|
|
30
|
+
declare const onBillingSettingsUpdated$1: EventDefinition<BillingSettingsUpdatedEnvelope, "wix.prime.auto.v1.billing_settings_updated">;
|
|
31
|
+
|
|
32
|
+
declare const getBillingSettings: MaybeContext<BuildRESTFunction<typeof getBillingSettings$1> & typeof getBillingSettings$1>;
|
|
33
|
+
declare const getVerticalCustomerSettings: MaybeContext<BuildRESTFunction<typeof getVerticalCustomerSettings$1> & typeof getVerticalCustomerSettings$1>;
|
|
34
|
+
declare const updateBillingSettings: MaybeContext<BuildRESTFunction<typeof updateBillingSettings$1> & typeof updateBillingSettings$1>;
|
|
35
|
+
/** */
|
|
36
|
+
declare const onBillingSettingsCreated: BuildEventDefinition<typeof onBillingSettingsCreated$1> & typeof onBillingSettingsCreated$1;
|
|
37
|
+
/** */
|
|
38
|
+
declare const onBillingSettingsUpdated: BuildEventDefinition<typeof onBillingSettingsUpdated$1> & typeof onBillingSettingsUpdated$1;
|
|
39
|
+
|
|
40
|
+
export { BillingSettingsCreatedEnvelope, BillingSettingsUpdatedEnvelope, GetBillingSettingsResponse, GetVerticalCustomerSettingsResponse, UpdateBillingSettings, UpdateBillingSettingsResponse, getBillingSettings, getVerticalCustomerSettings, onBillingSettingsCreated, onBillingSettingsUpdated, updateBillingSettings };
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
CancellationTiming: () => CancellationTiming,
|
|
24
|
+
CycleUnit: () => CycleUnit,
|
|
25
|
+
ModelType: () => ModelType,
|
|
26
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
|
+
getBillingSettings: () => getBillingSettings4,
|
|
28
|
+
getVerticalCustomerSettings: () => getVerticalCustomerSettings4,
|
|
29
|
+
onBillingSettingsCreated: () => onBillingSettingsCreated2,
|
|
30
|
+
onBillingSettingsUpdated: () => onBillingSettingsUpdated2,
|
|
31
|
+
updateBillingSettings: () => updateBillingSettings4
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(index_exports);
|
|
34
|
+
|
|
35
|
+
// src/prime-auto-v1-billing-settings-billing-settings.public.ts
|
|
36
|
+
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
37
|
+
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
38
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
39
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
40
|
+
|
|
41
|
+
// src/prime-auto-v1-billing-settings-billing-settings.universal.ts
|
|
42
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
43
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
44
|
+
|
|
45
|
+
// src/prime-auto-v1-billing-settings-billing-settings.http.ts
|
|
46
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
47
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
48
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
49
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
50
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
51
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
52
|
+
var TRANSFORM_PATHS_0 = [
|
|
53
|
+
{ path: "billingSettings.createdDate" },
|
|
54
|
+
{ path: "billingSettings.updatedDate" }
|
|
55
|
+
];
|
|
56
|
+
var TRANSFORM_PATHS_1 = [{ path: "mask" }];
|
|
57
|
+
function resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl(opts) {
|
|
58
|
+
const domainToMappings = {
|
|
59
|
+
"manage._base_domain_": [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/business-billing-settings",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"www.wixapis.com": [
|
|
66
|
+
{
|
|
67
|
+
srcPath: "/prime/auto/v1/billing_settings",
|
|
68
|
+
destPath: "/v1/billing_settings"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"*.dev.wix-code.com": [
|
|
72
|
+
{
|
|
73
|
+
srcPath: "/prime/auto/v1/billing_settings",
|
|
74
|
+
destPath: "/v1/billing_settings"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
_: [
|
|
78
|
+
{
|
|
79
|
+
srcPath: "/prime/auto/v1/billing_settings",
|
|
80
|
+
destPath: "/v1/billing_settings"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
srcPath: "/_api/business-billing-settings",
|
|
84
|
+
destPath: ""
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"payments.base44.com": [
|
|
88
|
+
{
|
|
89
|
+
srcPath: "/business-billing-settings",
|
|
90
|
+
destPath: ""
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
};
|
|
94
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
95
|
+
}
|
|
96
|
+
var PACKAGE_NAME = "@wix/auto_sdk_subscription_billing-settings";
|
|
97
|
+
function getBillingSettings(payload) {
|
|
98
|
+
function __getBillingSettings({ host }) {
|
|
99
|
+
const metadata = {
|
|
100
|
+
entityFqdn: "wix.prime.auto.v1.billing_settings",
|
|
101
|
+
method: "POST",
|
|
102
|
+
methodFqn: "com.wixpress.billing.business.v1.BillingSettingsService.GetBillingSettings",
|
|
103
|
+
packageName: PACKAGE_NAME,
|
|
104
|
+
migrationOptions: {
|
|
105
|
+
optInTransformResponse: true
|
|
106
|
+
},
|
|
107
|
+
url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({
|
|
108
|
+
protoPath: "/v1/billing_settings",
|
|
109
|
+
data: payload,
|
|
110
|
+
host
|
|
111
|
+
}),
|
|
112
|
+
data: payload,
|
|
113
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
114
|
+
{
|
|
115
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
116
|
+
paths: TRANSFORM_PATHS_0
|
|
117
|
+
}
|
|
118
|
+
])
|
|
119
|
+
};
|
|
120
|
+
return metadata;
|
|
121
|
+
}
|
|
122
|
+
return __getBillingSettings;
|
|
123
|
+
}
|
|
124
|
+
function getVerticalCustomerSettings(payload) {
|
|
125
|
+
function __getVerticalCustomerSettings({ host }) {
|
|
126
|
+
const metadata = {
|
|
127
|
+
entityFqdn: "wix.prime.auto.v1.billing_settings",
|
|
128
|
+
method: "GET",
|
|
129
|
+
methodFqn: "com.wixpress.billing.business.v1.BillingSettingsService.GetVerticalCustomerSettings",
|
|
130
|
+
packageName: PACKAGE_NAME,
|
|
131
|
+
migrationOptions: {
|
|
132
|
+
optInTransformResponse: true
|
|
133
|
+
},
|
|
134
|
+
url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({
|
|
135
|
+
protoPath: "/v1/billing_settings/vertical-customer-settings/{appDefId}",
|
|
136
|
+
data: payload,
|
|
137
|
+
host
|
|
138
|
+
}),
|
|
139
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
140
|
+
};
|
|
141
|
+
return metadata;
|
|
142
|
+
}
|
|
143
|
+
return __getVerticalCustomerSettings;
|
|
144
|
+
}
|
|
145
|
+
function updateBillingSettings(payload) {
|
|
146
|
+
function __updateBillingSettings({ host }) {
|
|
147
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
148
|
+
{
|
|
149
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
150
|
+
paths: TRANSFORM_PATHS_1
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
154
|
+
paths: TRANSFORM_PATHS_0
|
|
155
|
+
}
|
|
156
|
+
]);
|
|
157
|
+
const metadata = {
|
|
158
|
+
entityFqdn: "wix.prime.auto.v1.billing_settings",
|
|
159
|
+
method: "PATCH",
|
|
160
|
+
methodFqn: "com.wixpress.billing.business.v1.BillingSettingsService.UpdateBillingSettings",
|
|
161
|
+
packageName: PACKAGE_NAME,
|
|
162
|
+
migrationOptions: {
|
|
163
|
+
optInTransformResponse: true
|
|
164
|
+
},
|
|
165
|
+
url: resolveComWixpressBillingBusinessV1BillingSettingsServiceUrl({
|
|
166
|
+
protoPath: "/v1/billing_settings/{billingSettings.id}",
|
|
167
|
+
data: serializedData,
|
|
168
|
+
host
|
|
169
|
+
}),
|
|
170
|
+
data: serializedData,
|
|
171
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
172
|
+
{
|
|
173
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
174
|
+
paths: TRANSFORM_PATHS_0
|
|
175
|
+
}
|
|
176
|
+
])
|
|
177
|
+
};
|
|
178
|
+
return metadata;
|
|
179
|
+
}
|
|
180
|
+
return __updateBillingSettings;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/prime-auto-v1-billing-settings-billing-settings.universal.ts
|
|
184
|
+
var ModelType = /* @__PURE__ */ ((ModelType2) => {
|
|
185
|
+
ModelType2["UNKNOWN"] = "UNKNOWN";
|
|
186
|
+
ModelType2["FIXED_DURATION"] = "FIXED_DURATION";
|
|
187
|
+
ModelType2["DURATION_BY_CYCLE_UNIT"] = "DURATION_BY_CYCLE_UNIT";
|
|
188
|
+
return ModelType2;
|
|
189
|
+
})(ModelType || {});
|
|
190
|
+
var CancellationTiming = /* @__PURE__ */ ((CancellationTiming2) => {
|
|
191
|
+
CancellationTiming2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
192
|
+
CancellationTiming2["END_OF_PERIOD"] = "END_OF_PERIOD";
|
|
193
|
+
CancellationTiming2["IMMEDIATE"] = "IMMEDIATE";
|
|
194
|
+
return CancellationTiming2;
|
|
195
|
+
})(CancellationTiming || {});
|
|
196
|
+
var CycleUnit = /* @__PURE__ */ ((CycleUnit2) => {
|
|
197
|
+
CycleUnit2["UNKNOWN_CYCLE_UNIT"] = "UNKNOWN_CYCLE_UNIT";
|
|
198
|
+
CycleUnit2["MONTH"] = "MONTH";
|
|
199
|
+
CycleUnit2["YEAR"] = "YEAR";
|
|
200
|
+
return CycleUnit2;
|
|
201
|
+
})(CycleUnit || {});
|
|
202
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
203
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
204
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
205
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
206
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
207
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
208
|
+
return WebhookIdentityType2;
|
|
209
|
+
})(WebhookIdentityType || {});
|
|
210
|
+
async function getBillingSettings2() {
|
|
211
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
212
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
213
|
+
const reqOpts = getBillingSettings(payload);
|
|
214
|
+
sideEffects?.onSiteCall?.();
|
|
215
|
+
try {
|
|
216
|
+
const result = await httpClient.request(reqOpts);
|
|
217
|
+
sideEffects?.onSuccess?.(result);
|
|
218
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
219
|
+
} catch (err) {
|
|
220
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
221
|
+
err,
|
|
222
|
+
{
|
|
223
|
+
spreadPathsToArguments: {},
|
|
224
|
+
explicitPathsToArguments: {},
|
|
225
|
+
singleArgumentUnchanged: false
|
|
226
|
+
},
|
|
227
|
+
[]
|
|
228
|
+
);
|
|
229
|
+
sideEffects?.onError?.(err);
|
|
230
|
+
throw transformedError;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
async function getVerticalCustomerSettings2(appDefId) {
|
|
234
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
235
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ appDefId });
|
|
236
|
+
const reqOpts = getVerticalCustomerSettings(
|
|
237
|
+
payload
|
|
238
|
+
);
|
|
239
|
+
sideEffects?.onSiteCall?.();
|
|
240
|
+
try {
|
|
241
|
+
const result = await httpClient.request(reqOpts);
|
|
242
|
+
sideEffects?.onSuccess?.(result);
|
|
243
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
244
|
+
} catch (err) {
|
|
245
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
246
|
+
err,
|
|
247
|
+
{
|
|
248
|
+
spreadPathsToArguments: {},
|
|
249
|
+
explicitPathsToArguments: { appDefId: "$[0]" },
|
|
250
|
+
singleArgumentUnchanged: false
|
|
251
|
+
},
|
|
252
|
+
["appDefId"]
|
|
253
|
+
);
|
|
254
|
+
sideEffects?.onError?.(err);
|
|
255
|
+
throw transformedError;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
async function updateBillingSettings2(_id, billingSettings) {
|
|
259
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
260
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
261
|
+
billingSettings: { ...billingSettings, id: _id }
|
|
262
|
+
});
|
|
263
|
+
const reqOpts = updateBillingSettings(payload);
|
|
264
|
+
sideEffects?.onSiteCall?.();
|
|
265
|
+
try {
|
|
266
|
+
const result = await httpClient.request(reqOpts);
|
|
267
|
+
sideEffects?.onSuccess?.(result);
|
|
268
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
269
|
+
} catch (err) {
|
|
270
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
271
|
+
err,
|
|
272
|
+
{
|
|
273
|
+
spreadPathsToArguments: { billingSettings: "$[1]" },
|
|
274
|
+
explicitPathsToArguments: { "billingSettings.id": "$[0]" },
|
|
275
|
+
singleArgumentUnchanged: false
|
|
276
|
+
},
|
|
277
|
+
["_id", "billingSettings"]
|
|
278
|
+
);
|
|
279
|
+
sideEffects?.onError?.(err);
|
|
280
|
+
throw transformedError;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// src/prime-auto-v1-billing-settings-billing-settings.public.ts
|
|
285
|
+
var TRANSFORM_PATHS_02 = [
|
|
286
|
+
{ path: "entity.createdDate" },
|
|
287
|
+
{ path: "entity.updatedDate" },
|
|
288
|
+
{ path: "metadata.eventTime" }
|
|
289
|
+
];
|
|
290
|
+
function getBillingSettings3(httpClient) {
|
|
291
|
+
return () => getBillingSettings2(
|
|
292
|
+
// @ts-ignore
|
|
293
|
+
{ httpClient }
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
function getVerticalCustomerSettings3(httpClient) {
|
|
297
|
+
return (appDefId) => getVerticalCustomerSettings2(
|
|
298
|
+
appDefId,
|
|
299
|
+
// @ts-ignore
|
|
300
|
+
{ httpClient }
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
function updateBillingSettings3(httpClient) {
|
|
304
|
+
return (_id, billingSettings) => updateBillingSettings2(
|
|
305
|
+
_id,
|
|
306
|
+
billingSettings,
|
|
307
|
+
// @ts-ignore
|
|
308
|
+
{ httpClient }
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
var onBillingSettingsCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
312
|
+
"wix.prime.auto.v1.billing_settings_created",
|
|
313
|
+
true,
|
|
314
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
315
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
316
|
+
{
|
|
317
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
318
|
+
paths: TRANSFORM_PATHS_02
|
|
319
|
+
}
|
|
320
|
+
])
|
|
321
|
+
)
|
|
322
|
+
)();
|
|
323
|
+
var onBillingSettingsUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
324
|
+
"wix.prime.auto.v1.billing_settings_updated",
|
|
325
|
+
true,
|
|
326
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
327
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
328
|
+
{
|
|
329
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
330
|
+
paths: TRANSFORM_PATHS_02
|
|
331
|
+
}
|
|
332
|
+
])
|
|
333
|
+
)
|
|
334
|
+
)();
|
|
335
|
+
|
|
336
|
+
// src/prime-auto-v1-billing-settings-billing-settings.context.ts
|
|
337
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
338
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
339
|
+
var getBillingSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getBillingSettings3);
|
|
340
|
+
var getVerticalCustomerSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getVerticalCustomerSettings3);
|
|
341
|
+
var updateBillingSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateBillingSettings3);
|
|
342
|
+
var onBillingSettingsCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
343
|
+
onBillingSettingsCreated
|
|
344
|
+
);
|
|
345
|
+
var onBillingSettingsUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
346
|
+
onBillingSettingsUpdated
|
|
347
|
+
);
|
|
348
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
349
|
+
0 && (module.exports = {
|
|
350
|
+
CancellationTiming,
|
|
351
|
+
CycleUnit,
|
|
352
|
+
ModelType,
|
|
353
|
+
WebhookIdentityType,
|
|
354
|
+
getBillingSettings,
|
|
355
|
+
getVerticalCustomerSettings,
|
|
356
|
+
onBillingSettingsCreated,
|
|
357
|
+
onBillingSettingsUpdated,
|
|
358
|
+
updateBillingSettings
|
|
359
|
+
});
|
|
360
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/prime-auto-v1-billing-settings-billing-settings.public.ts","../../src/prime-auto-v1-billing-settings-billing-settings.universal.ts","../../src/prime-auto-v1-billing-settings-billing-settings.http.ts","../../src/prime-auto-v1-billing-settings-billing-settings.context.ts"],"sourcesContent":["export * from './src/prime-auto-v1-billing-settings-billing-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BillingSettingsCreatedEnvelope,\n BillingSettingsUpdatedEnvelope,\n GetBillingSettingsResponse,\n GetVerticalCustomerSettingsResponse,\n UpdateBillingSettings,\n UpdateBillingSettingsResponse,\n getBillingSettings as universalGetBillingSettings,\n getVerticalCustomerSettings as universalGetVerticalCustomerSettings,\n updateBillingSettings as universalUpdateBillingSettings,\n} from './prime-auto-v1-billing-settings-billing-settings.universal.js';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n];\nexport const __metadata = { PACKAGE_NAME: '@wix/subscription' };\n\nexport function getBillingSettings(\n httpClient: HttpClient\n): GetBillingSettingsSignature {\n return () =>\n universalGetBillingSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetBillingSettingsSignature {\n /**\n * Fetches BillingSettings and if not exists creates with default values\n */\n (): 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}\n\nexport function getVerticalCustomerSettings(\n httpClient: HttpClient\n): GetVerticalCustomerSettingsSignature {\n return (appDefId: string) =>\n universalGetVerticalCustomerSettings(\n appDefId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetVerticalCustomerSettingsSignature {\n /**\n * Legacy BBS v1 public routing and generated Ambassador mapping use /v1/billing_settings.\n * @param - Wix vertical app_def_id (e.g. Stores) whose customer settings to fetch\n */\n (appDefId: string): 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}\n\nexport function updateBillingSettings(\n httpClient: HttpClient\n): UpdateBillingSettingsSignature {\n return (_id: string, billingSettings: UpdateBillingSettings) =>\n universalUpdateBillingSettings(\n _id,\n billingSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateBillingSettingsSignature {\n /**\n * Update a BillingSettings, supports partial update\n * Pass the latest `revision` for a successful update\n * @param - BillingSettings ID\n */\n (_id: string, billingSettings: UpdateBillingSettings): 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}\n\nexport const onBillingSettingsCreated = /*#__PURE__*/ EventDefinition(\n 'wix.prime.auto.v1.billing_settings_created',\n true,\n (event: BillingSettingsCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )\n)<BillingSettingsCreatedEnvelope>();\nexport const onBillingSettingsUpdated = /*#__PURE__*/ EventDefinition(\n 'wix.prime.auto.v1.billing_settings_updated',\n true,\n (event: BillingSettingsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ])\n )\n)<BillingSettingsUpdatedEnvelope>();\n\nexport {\n AbsorbFeeConfig,\n AbsorbFeeConfigValueOneOf,\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n AutomaticRetrySettings,\n BaseEventMetadata,\n BillingSettings,\n BillingSettingsCreatedEnvelope,\n BillingSettingsDefaults,\n BillingSettingsUpdatedEnvelope,\n CancelAction,\n CancelActionConfig,\n CancelActionConfiguration,\n CancelActionSettings,\n CancellationTiming,\n ChangeActionConfig,\n CustomerActionSettings,\n CustomerSettings,\n CycleLead,\n CycleUnit,\n DeleteBillingSettingsRequest,\n DeleteBillingSettingsResponse,\n DeleteByIdBackofficeRequest,\n DeleteByIdBackofficeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DurationByCycleUnit,\n DynamicTaxSettings,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FixedAmountFee,\n FixedDuration,\n FixedDurationTimeUnitOneOf,\n GetBillingSettingsBackOfficeRequest,\n GetBillingSettingsBackOfficeResponse,\n GetBillingSettingsDefaultsRequest,\n GetBillingSettingsDefaultsResponse,\n GetBillingSettingsRequest,\n GetBillingSettingsResponse,\n GetVerticalCustomerSettingsRequest,\n GetVerticalCustomerSettingsResponse,\n GlobalTaxSettings,\n GracePeriodSettings,\n GracePeriodSettingsModelOneOf,\n IdentificationData,\n IdentificationDataIdOneOf,\n InitializeDynamicTax,\n InvoicesSettings,\n MessageEnvelope,\n ModelType,\n NearRenewalConfig,\n NearRenewalSettings,\n PassOnFeeConfig,\n PassOnFeeConfigValueOneOf,\n PauseResumeAction,\n PauseResumeActionConfig,\n PauseResumeActionConfiguration,\n PauseResumeActionSettings,\n PercentageFee,\n PlatformFeeConfig,\n PlatformFeeConfigFeeModelOneOf,\n PlatformFeeSettings,\n RestoreInfo,\n SettingsAction,\n SettingsActionActionTypeOneOf,\n SkipAction,\n SkipActionConfig,\n SkipActionConfiguration,\n SkipActionSettings,\n TaxSettings,\n TaxSettingsModelOneOf,\n UpdateBillingDateAction,\n UpdateBillingDateActionConfig,\n UpdateBillingDateActionConfiguration,\n UpdateBillingDateActionSettings,\n UpdateBillingSettings,\n UpdateBillingSettingsBackOfficeRequest,\n UpdateBillingSettingsBackOfficeResponse,\n UpdateBillingSettingsDefaultsRequest,\n UpdateBillingSettingsDefaultsResponse,\n UpdateBillingSettingsRequest,\n UpdateBillingSettingsResponse,\n UpdateItemsAction,\n UpdateItemsActionConfig,\n UpdatePaymentMethodAction,\n UpmActionSettings,\n VerticalCustomerSettings,\n WebhookIdentityType,\n} from './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","import {\n getBillingSettings as publicGetBillingSettings,\n getVerticalCustomerSettings as publicGetVerticalCustomerSettings,\n updateBillingSettings as publicUpdateBillingSettings,\n} from './prime-auto-v1-billing-settings-billing-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onBillingSettingsCreated as publicOnBillingSettingsCreated } from './prime-auto-v1-billing-settings-billing-settings.public.js';\nimport { onBillingSettingsUpdated as publicOnBillingSettingsUpdated } from './prime-auto-v1-billing-settings-billing-settings.public.js';\n\nexport const getBillingSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetBillingSettings> &\n typeof publicGetBillingSettings\n> = /*#__PURE__*/ createRESTModule(publicGetBillingSettings);\nexport const getVerticalCustomerSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetVerticalCustomerSettings> &\n typeof publicGetVerticalCustomerSettings\n> = /*#__PURE__*/ createRESTModule(publicGetVerticalCustomerSettings);\nexport const updateBillingSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateBillingSettings> &\n typeof publicUpdateBillingSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateBillingSettings);\n/** */\nexport const onBillingSettingsCreated: BuildEventDefinition<\n typeof publicOnBillingSettingsCreated\n> &\n typeof publicOnBillingSettingsCreated = /*#__PURE__*/ createEventModule(\n publicOnBillingSettingsCreated\n);\n/** */\nexport const onBillingSettingsUpdated: BuildEventDefinition<\n typeof publicOnBillingSettingsUpdated\n> &\n typeof publicOnBillingSettingsUpdated = /*#__PURE__*/ createEventModule(\n publicOnBillingSettingsUpdated\n);\n\nexport {\n ModelType,\n CancellationTiming,\n CycleUnit,\n WebhookIdentityType,\n} from './prime-auto-v1-billing-settings-billing-settings.universal.js';\nexport {\n BillingSettings,\n GracePeriodSettings,\n GracePeriodSettingsModelOneOf,\n FixedDuration,\n FixedDurationTimeUnitOneOf,\n DurationByCycleUnit,\n AutomaticRetrySettings,\n TaxSettings,\n TaxSettingsModelOneOf,\n GlobalTaxSettings,\n DynamicTaxSettings,\n InvoicesSettings,\n PlatformFeeSettings,\n PlatformFeeConfig,\n PlatformFeeConfigFeeModelOneOf,\n AbsorbFeeConfig,\n AbsorbFeeConfigValueOneOf,\n PercentageFee,\n FixedAmountFee,\n PassOnFeeConfig,\n PassOnFeeConfigValueOneOf,\n CustomerActionSettings,\n SkipActionSettings,\n SkipActionConfiguration,\n PauseResumeActionSettings,\n PauseResumeActionConfiguration,\n CancelActionSettings,\n CancelActionConfiguration,\n UpmActionSettings,\n UpdateBillingDateActionSettings,\n UpdateBillingDateActionConfiguration,\n VerticalCustomerSettings,\n CustomerSettings,\n SkipAction,\n SkipActionConfig,\n PauseResumeAction,\n PauseResumeActionConfig,\n CancelAction,\n CancelActionConfig,\n UpdatePaymentMethodAction,\n UpdateBillingDateAction,\n UpdateBillingDateActionConfig,\n ChangeActionConfig,\n UpdateItemsAction,\n UpdateItemsActionConfig,\n NearRenewalSettings,\n NearRenewalConfig,\n CycleLead,\n SettingsAction,\n SettingsActionActionTypeOneOf,\n InitializeDynamicTax,\n GetBillingSettingsRequest,\n GetBillingSettingsResponse,\n GetVerticalCustomerSettingsRequest,\n GetVerticalCustomerSettingsResponse,\n UpdateBillingSettingsRequest,\n UpdateBillingSettingsResponse,\n DeleteBillingSettingsRequest,\n DeleteBillingSettingsResponse,\n Empty,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetBillingSettingsBackOfficeRequest,\n GetBillingSettingsBackOfficeResponse,\n UpdateBillingSettingsBackOfficeRequest,\n UpdateBillingSettingsBackOfficeResponse,\n DeleteByIdBackofficeRequest,\n DeleteByIdBackofficeResponse,\n GetBillingSettingsDefaultsRequest,\n GetBillingSettingsDefaultsResponse,\n BillingSettingsDefaults,\n UpdateBillingSettingsDefaultsRequest,\n UpdateBillingSettingsDefaultsResponse,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n BillingSettingsCreatedEnvelope,\n BillingSettingsUpdatedEnvelope,\n UpdateBillingSettings,\n} from './prime-auto-v1-billing-settings-billing-settings.universal.js';\nexport {\n ModelTypeWithLiterals,\n CancellationTimingWithLiterals,\n CycleUnitWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './prime-auto-v1-billing-settings-billing-settings.universal.js';\n"],"mappings":"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","names":["getBillingSettings","getVerticalCustomerSettings","onBillingSettingsCreated","onBillingSettingsUpdated","updateBillingSettings","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","ModelType","CancellationTiming","CycleUnit","WebhookIdentityType","getBillingSettings","sdkTransformError","getVerticalCustomerSettings","updateBillingSettings","TRANSFORM_PATHS_0","getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","TRANSFORM_PATHS_0","import_rest_modules","getBillingSettings","getVerticalCustomerSettings","updateBillingSettings","onBillingSettingsCreated","onBillingSettingsUpdated"]}
|