@wix/auto_sdk_app-management_billing 1.0.25 → 1.0.26
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/meta.d.ts +134 -1
- package/build/cjs/meta.js +36 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/meta.d.mts +134 -1
- package/build/es/meta.mjs +33 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/meta.d.ts +134 -1
- package/build/internal/cjs/meta.js +36 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/meta.d.mts +134 -1
- package/build/internal/es/meta.mjs +33 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/meta.d.ts
CHANGED
|
@@ -31,6 +31,32 @@ declare enum PaymentCycle {
|
|
|
31
31
|
}
|
|
32
32
|
/** @enumType */
|
|
33
33
|
type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
|
|
34
|
+
interface InvoiceStatusUpdated {
|
|
35
|
+
/** Invoice payment status. */
|
|
36
|
+
status?: InvoiceStatusWithLiterals;
|
|
37
|
+
/**
|
|
38
|
+
* Wix Premium invoice ID.
|
|
39
|
+
* @maxLength 50
|
|
40
|
+
*/
|
|
41
|
+
invoiceId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* App instance ID - a unique ID assigned to each app in each site.
|
|
44
|
+
* @format GUID
|
|
45
|
+
*/
|
|
46
|
+
instanceId?: string | null;
|
|
47
|
+
/** Whether the invoice is for a single payment or for multiple, recurring payments. */
|
|
48
|
+
recurring?: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare enum InvoiceStatus {
|
|
51
|
+
UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
|
|
52
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
53
|
+
PAID = "PAID",
|
|
54
|
+
REFUNDED = "REFUNDED",
|
|
55
|
+
VOIDED = "VOIDED",
|
|
56
|
+
CHARGEDBACK = "CHARGEDBACK"
|
|
57
|
+
}
|
|
58
|
+
/** @enumType */
|
|
59
|
+
type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
|
|
34
60
|
interface GetUrlRequest {
|
|
35
61
|
/**
|
|
36
62
|
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
@@ -75,6 +101,18 @@ interface GetUrlRequest {
|
|
|
75
101
|
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
76
102
|
couponCode?: string | null;
|
|
77
103
|
}
|
|
104
|
+
interface ChargeOverride {
|
|
105
|
+
/**
|
|
106
|
+
* Override price. In case you omit the override price, Wix charges site
|
|
107
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
108
|
+
*/
|
|
109
|
+
price?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Override 3-letter currency code in
|
|
112
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
113
|
+
*/
|
|
114
|
+
currency?: string;
|
|
115
|
+
}
|
|
78
116
|
interface GetUrlResponse {
|
|
79
117
|
/**
|
|
80
118
|
* URL for the Wix checkout page.
|
|
@@ -94,6 +132,29 @@ interface GetPurchaseHistoryResponse {
|
|
|
94
132
|
/** Retrieved purchases the site owners have completed for you app. */
|
|
95
133
|
purchases?: PurchasedItem[];
|
|
96
134
|
}
|
|
135
|
+
interface GetSitePaymentMethodsStatusRequest {
|
|
136
|
+
}
|
|
137
|
+
interface GetSitePaymentMethodsStatusResponse {
|
|
138
|
+
/**
|
|
139
|
+
* Whether the site owners have enabled at least a single online payment method.
|
|
140
|
+
* Online payment methods include Wix Payments, Stripe, PayPal, and credit
|
|
141
|
+
* cards.
|
|
142
|
+
*/
|
|
143
|
+
onlineProviderEnabled?: boolean;
|
|
144
|
+
/** Whether the site owners accept offline payments. */
|
|
145
|
+
offlineProviderEnabled?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the site owners have enabled the
|
|
148
|
+
* [Wix Point of Sale](https://www.wix.com/pos).
|
|
149
|
+
* This allows their customers to make electronic payments in person.
|
|
150
|
+
*/
|
|
151
|
+
wixPosProviderEnabled?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Whether the site owners have enabled at least one 3rd-party point-of-sale
|
|
154
|
+
* provider. This allows their customers to make electronic payments in person.
|
|
155
|
+
*/
|
|
156
|
+
thirdPartyPosProviderEnabled?: boolean;
|
|
157
|
+
}
|
|
97
158
|
interface GetMeteredBillingChargesRequest {
|
|
98
159
|
/**
|
|
99
160
|
* 3-letter currency code in
|
|
@@ -130,6 +191,78 @@ interface Charge {
|
|
|
130
191
|
*/
|
|
131
192
|
amount?: string;
|
|
132
193
|
}
|
|
194
|
+
interface MessageEnvelope {
|
|
195
|
+
/**
|
|
196
|
+
* App instance ID.
|
|
197
|
+
* @format GUID
|
|
198
|
+
*/
|
|
199
|
+
instanceId?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Event type.
|
|
202
|
+
* @maxLength 150
|
|
203
|
+
*/
|
|
204
|
+
eventType?: string;
|
|
205
|
+
/** The identification type and identity data. */
|
|
206
|
+
identity?: IdentificationData;
|
|
207
|
+
/** Stringify payload. */
|
|
208
|
+
data?: string;
|
|
209
|
+
}
|
|
210
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
211
|
+
/**
|
|
212
|
+
* ID of a site visitor that has not logged in to the site.
|
|
213
|
+
* @format GUID
|
|
214
|
+
*/
|
|
215
|
+
anonymousVisitorId?: string;
|
|
216
|
+
/**
|
|
217
|
+
* ID of a site visitor that has logged in to the site.
|
|
218
|
+
* @format GUID
|
|
219
|
+
*/
|
|
220
|
+
memberId?: string;
|
|
221
|
+
/**
|
|
222
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
223
|
+
* @format GUID
|
|
224
|
+
*/
|
|
225
|
+
wixUserId?: string;
|
|
226
|
+
/**
|
|
227
|
+
* ID of an app.
|
|
228
|
+
* @format GUID
|
|
229
|
+
*/
|
|
230
|
+
appId?: string;
|
|
231
|
+
/** @readonly */
|
|
232
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
233
|
+
}
|
|
234
|
+
/** @oneof */
|
|
235
|
+
interface IdentificationDataIdOneOf {
|
|
236
|
+
/**
|
|
237
|
+
* ID of a site visitor that has not logged in to the site.
|
|
238
|
+
* @format GUID
|
|
239
|
+
*/
|
|
240
|
+
anonymousVisitorId?: string;
|
|
241
|
+
/**
|
|
242
|
+
* ID of a site visitor that has logged in to the site.
|
|
243
|
+
* @format GUID
|
|
244
|
+
*/
|
|
245
|
+
memberId?: string;
|
|
246
|
+
/**
|
|
247
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
248
|
+
* @format GUID
|
|
249
|
+
*/
|
|
250
|
+
wixUserId?: string;
|
|
251
|
+
/**
|
|
252
|
+
* ID of an app.
|
|
253
|
+
* @format GUID
|
|
254
|
+
*/
|
|
255
|
+
appId?: string;
|
|
256
|
+
}
|
|
257
|
+
declare enum WebhookIdentityType {
|
|
258
|
+
UNKNOWN = "UNKNOWN",
|
|
259
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
260
|
+
MEMBER = "MEMBER",
|
|
261
|
+
WIX_USER = "WIX_USER",
|
|
262
|
+
APP = "APP"
|
|
263
|
+
}
|
|
264
|
+
/** @enumType */
|
|
265
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
133
266
|
|
|
134
267
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
135
268
|
getUrl: (context: any) => string;
|
|
@@ -145,4 +278,4 @@ declare function getUrl(): __PublicMethodMetaInfo<'POST', {}, GetUrlRequest$1, G
|
|
|
145
278
|
declare function getPurchaseHistory(): __PublicMethodMetaInfo<'GET', {}, GetPurchaseHistoryRequest$1, GetPurchaseHistoryRequest, GetPurchaseHistoryResponse$1, GetPurchaseHistoryResponse>;
|
|
146
279
|
declare function getMeteredBillingCharges(): __PublicMethodMetaInfo<'GET', {}, GetMeteredBillingChargesRequest$1, GetMeteredBillingChargesRequest, GetMeteredBillingChargesResponse$1, GetMeteredBillingChargesResponse>;
|
|
147
280
|
|
|
148
|
-
export { type __PublicMethodMetaInfo, getMeteredBillingCharges, getPurchaseHistory, getUrl };
|
|
281
|
+
export { type Charge as ChargeOriginal, type ChargeOverride as ChargeOverrideOriginal, type GetMeteredBillingChargesRequest as GetMeteredBillingChargesRequestOriginal, type GetMeteredBillingChargesResponse as GetMeteredBillingChargesResponseOriginal, type GetPurchaseHistoryRequest as GetPurchaseHistoryRequestOriginal, type GetPurchaseHistoryResponse as GetPurchaseHistoryResponseOriginal, type GetSitePaymentMethodsStatusRequest as GetSitePaymentMethodsStatusRequestOriginal, type GetSitePaymentMethodsStatusResponse as GetSitePaymentMethodsStatusResponseOriginal, type GetUrlRequest as GetUrlRequestOriginal, type GetUrlResponse as GetUrlResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusUpdated as InvoiceStatusUpdatedOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, PaymentCycle as PaymentCycleOriginal, type PaymentCycleWithLiterals as PaymentCycleWithLiteralsOriginal, type PurchasedItem as PurchasedItemOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getMeteredBillingCharges, getPurchaseHistory, getUrl };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
InvoiceStatusOriginal: () => InvoiceStatus,
|
|
24
|
+
PaymentCycleOriginal: () => PaymentCycle,
|
|
25
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
23
26
|
getMeteredBillingCharges: () => getMeteredBillingCharges2,
|
|
24
27
|
getPurchaseHistory: () => getPurchaseHistory2,
|
|
25
28
|
getUrl: () => getUrl2
|
|
@@ -195,6 +198,36 @@ function getMeteredBillingCharges(payload) {
|
|
|
195
198
|
return __getMeteredBillingCharges;
|
|
196
199
|
}
|
|
197
200
|
|
|
201
|
+
// src/devcenter-checkout-v1-purchased-item-billing.types.ts
|
|
202
|
+
var PaymentCycle = /* @__PURE__ */ ((PaymentCycle2) => {
|
|
203
|
+
PaymentCycle2["NO_CYCLE"] = "NO_CYCLE";
|
|
204
|
+
PaymentCycle2["MONTHLY"] = "MONTHLY";
|
|
205
|
+
PaymentCycle2["YEARLY"] = "YEARLY";
|
|
206
|
+
PaymentCycle2["ONE_TIME"] = "ONE_TIME";
|
|
207
|
+
PaymentCycle2["TWO_YEARS"] = "TWO_YEARS";
|
|
208
|
+
PaymentCycle2["THREE_YEARS"] = "THREE_YEARS";
|
|
209
|
+
PaymentCycle2["FOUR_YEARS"] = "FOUR_YEARS";
|
|
210
|
+
PaymentCycle2["FIVE_YEARS"] = "FIVE_YEARS";
|
|
211
|
+
return PaymentCycle2;
|
|
212
|
+
})(PaymentCycle || {});
|
|
213
|
+
var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
214
|
+
InvoiceStatus2["UNKNOWN_INVOICE_STATUS"] = "UNKNOWN_INVOICE_STATUS";
|
|
215
|
+
InvoiceStatus2["PAYMENT_FAILED"] = "PAYMENT_FAILED";
|
|
216
|
+
InvoiceStatus2["PAID"] = "PAID";
|
|
217
|
+
InvoiceStatus2["REFUNDED"] = "REFUNDED";
|
|
218
|
+
InvoiceStatus2["VOIDED"] = "VOIDED";
|
|
219
|
+
InvoiceStatus2["CHARGEDBACK"] = "CHARGEDBACK";
|
|
220
|
+
return InvoiceStatus2;
|
|
221
|
+
})(InvoiceStatus || {});
|
|
222
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
223
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
224
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
225
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
226
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
227
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
228
|
+
return WebhookIdentityType2;
|
|
229
|
+
})(WebhookIdentityType || {});
|
|
230
|
+
|
|
198
231
|
// src/devcenter-checkout-v1-purchased-item-billing.meta.ts
|
|
199
232
|
function getUrl2() {
|
|
200
233
|
const payload = {};
|
|
@@ -254,6 +287,9 @@ function getMeteredBillingCharges2() {
|
|
|
254
287
|
}
|
|
255
288
|
// Annotate the CommonJS export names for ESM import in node:
|
|
256
289
|
0 && (module.exports = {
|
|
290
|
+
InvoiceStatusOriginal,
|
|
291
|
+
PaymentCycleOriginal,
|
|
292
|
+
WebhookIdentityTypeOriginal,
|
|
257
293
|
getMeteredBillingCharges,
|
|
258
294
|
getPurchaseHistory,
|
|
259
295
|
getUrl
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/devcenter-checkout-v1-purchased-item-billing.http.ts","../../src/devcenter-checkout-v1-purchased-item-billing.meta.ts"],"sourcesContent":["export * from './src/devcenter-checkout-v1-purchased-item-billing.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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\nfunction resolveComWixpressMarketAimApiCheckoutUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_billing';\n\n/**\n * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.\n *\n *\n * This call succeeds only in case you have previously\n * [set up an external pricing page in your app's dashboard](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-an-external-pricing-page).\n *\n * The returned checkout URL is valid for 48 hours.\n *\n * This API allows your app to manage your pricing page outside of Wix while\n * still using the standard Wix checkout flow.\n */\nexport function getUrl(payload: object): RequestOptionsFactory<any> {\n function __getUrl({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'chargeOverride.price' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getUrl;\n}\n\n/**\n * Retrieves a list of the site owner's past purchases for your app.\n *\n *\n * You don't have to explicitly pass an identifier for the Wix site as part of\n * the request, since this information is taken automatically from the context.\n *\n * The response doesn't include any details about cancellations.\n */\nexport function getPurchaseHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPurchaseHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetPurchaseHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout/history',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'purchases.dateCreated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPurchaseHistory;\n}\n\n/**\n * Triggers Wix to call the\n * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).\n *\n *\n * Wix doesn't use the response from _List Charges_ SPI to actually create an\n * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_\n * allows you confirm that your integration with the Custom Charges SPI is\n * working as intended.\n */\nexport function getMeteredBillingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __getMeteredBillingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDate' }, { path: 'endDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/metered-billing-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n };\n\n return metadata;\n }\n\n return __getMeteredBillingCharges;\n}\n","import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemTypes from './devcenter-checkout-v1-purchased-item-billing.types.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes from './devcenter-checkout-v1-purchased-item-billing.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 getUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(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/checkout',\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 getPurchaseHistory(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);\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/checkout/history',\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 getMeteredBillingCharges(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(\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/metered-billing-charges',\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,cAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qB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,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0C,mBAAmB,OAAO;AAE1E,QAAMD,UAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,QAAAA;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASE,4BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0C;AAAA,IAC5C;AAAA,EACF;AAEF,QAAMF,UAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,QAAAA;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getMeteredBillingCharges","getPurchaseHistory","getUrl","import_timestamp","import_rest_modules","payload","getUrl","getPurchaseHistory","getMeteredBillingCharges"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/devcenter-checkout-v1-purchased-item-billing.http.ts","../../src/devcenter-checkout-v1-purchased-item-billing.types.ts","../../src/devcenter-checkout-v1-purchased-item-billing.meta.ts"],"sourcesContent":["export * from './src/devcenter-checkout-v1-purchased-item-billing.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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\nfunction resolveComWixpressMarketAimApiCheckoutUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_billing';\n\n/**\n * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.\n *\n *\n * This call succeeds only in case you have previously\n * [set up an external pricing page in your app's dashboard](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-an-external-pricing-page).\n *\n * The returned checkout URL is valid for 48 hours.\n *\n * This API allows your app to manage your pricing page outside of Wix while\n * still using the standard Wix checkout flow.\n */\nexport function getUrl(payload: object): RequestOptionsFactory<any> {\n function __getUrl({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'chargeOverride.price' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getUrl;\n}\n\n/**\n * Retrieves a list of the site owner's past purchases for your app.\n *\n *\n * You don't have to explicitly pass an identifier for the Wix site as part of\n * the request, since this information is taken automatically from the context.\n *\n * The response doesn't include any details about cancellations.\n */\nexport function getPurchaseHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPurchaseHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetPurchaseHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout/history',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'purchases.dateCreated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPurchaseHistory;\n}\n\n/**\n * Triggers Wix to call the\n * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).\n *\n *\n * Wix doesn't use the response from _List Charges_ SPI to actually create an\n * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_\n * allows you confirm that your integration with the Custom Charges SPI is\n * working as intended.\n */\nexport function getMeteredBillingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __getMeteredBillingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDate' }, { path: 'endDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/metered-billing-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n };\n\n return metadata;\n }\n\n return __getMeteredBillingCharges;\n}\n","export interface PurchasedItem {\n /** ID of your app's paid plan. */\n productId?: string;\n /** Price of your app's paid plan. For example, `9.95`. */\n price?: string;\n /**\n * 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n currency?: string;\n /** Information about the billing cycle for your app's paid plan. */\n billingCycle?: PaymentCycleWithLiterals;\n /**\n * Date and time the site onwers have purchased your app's paid plan in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n dateCreated?: Date | null;\n}\n\nexport enum PaymentCycle {\n NO_CYCLE = 'NO_CYCLE',\n MONTHLY = 'MONTHLY',\n YEARLY = 'YEARLY',\n ONE_TIME = 'ONE_TIME',\n TWO_YEARS = 'TWO_YEARS',\n THREE_YEARS = 'THREE_YEARS',\n FOUR_YEARS = 'FOUR_YEARS',\n FIVE_YEARS = 'FIVE_YEARS',\n}\n\n/** @enumType */\nexport type PaymentCycleWithLiterals =\n | PaymentCycle\n | 'NO_CYCLE'\n | 'MONTHLY'\n | 'YEARLY'\n | 'ONE_TIME'\n | 'TWO_YEARS'\n | 'THREE_YEARS'\n | 'FOUR_YEARS'\n | 'FIVE_YEARS';\n\nexport interface InvoiceStatusUpdated {\n /** Invoice payment status. */\n status?: InvoiceStatusWithLiterals;\n /**\n * Wix Premium invoice ID.\n * @maxLength 50\n */\n invoiceId?: string;\n /**\n * App instance ID - a unique ID assigned to each app in each site.\n * @format GUID\n */\n instanceId?: string | null;\n /** Whether the invoice is for a single payment or for multiple, recurring payments. */\n recurring?: boolean;\n}\n\nexport enum InvoiceStatus {\n UNKNOWN_INVOICE_STATUS = 'UNKNOWN_INVOICE_STATUS',\n PAYMENT_FAILED = 'PAYMENT_FAILED',\n PAID = 'PAID',\n REFUNDED = 'REFUNDED',\n VOIDED = 'VOIDED',\n CHARGEDBACK = 'CHARGEDBACK',\n}\n\n/** @enumType */\nexport type InvoiceStatusWithLiterals =\n | InvoiceStatus\n | 'UNKNOWN_INVOICE_STATUS'\n | 'PAYMENT_FAILED'\n | 'PAID'\n | 'REFUNDED'\n | 'VOIDED'\n | 'CHARGEDBACK';\n\nexport interface GetUrlRequest {\n /**\n * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard\n * for a list of your app's supported product IDs.\n */\n productId: string;\n /**\n * URL for the Wix checkout page. Redirect site owners to this URL after\n * they've successfully purchased a paid plan for your app.\n * @format WEB_URL\n */\n successUrl?: string | null;\n /**\n * Whether the checkout is for testing purposes only. Testing is mainly\n * relevant for in-app purchase flows. When `true`, Wix charges the site\n * owners an amount of `0.00`.\n *\n * Not supported for usage-based plans.\n */\n testCheckout?: boolean;\n /**\n * Information about the paid plan's billing cycle.\n *\n * Set to `MONTHLY` for usage-based plans.\n */\n billingCycle?: PaymentCycleWithLiterals;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n *\n * Default: `\"US\"`\n */\n countryCode?: string | null;\n /**\n * 2-letter language code in\n * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n *\n * Default: `\"EN\"`\n */\n languageCode?: string | null;\n /** Coupon code for the paid plan. Available only in case there is a discount. */\n couponCode?: string | null;\n}\n\nexport interface ChargeOverride {\n /**\n * Override price. In case you omit the override price, Wix charges site\n * owners the app's default price that's configured in the Pricing page of your app's dashboard.\n */\n price?: number;\n /**\n * Override 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n currency?: string;\n}\n\nexport interface GetUrlResponse {\n /**\n * URL for the Wix checkout page.\n * @format WEB_URL\n */\n checkoutUrl?: string;\n /**\n * Token for the Wix checkout page. The token holds all data about the order\n * you're creating a checkout for. It is [signed](),\n * so you can verify that it comes from Wix.\n */\n token?: string | null;\n}\n\nexport interface GetPurchaseHistoryRequest {}\n\nexport interface GetPurchaseHistoryResponse {\n /** Retrieved purchases the site owners have completed for you app. */\n purchases?: PurchasedItem[];\n}\n\nexport interface GetSitePaymentMethodsStatusRequest {}\n\nexport interface GetSitePaymentMethodsStatusResponse {\n /**\n * Whether the site owners have enabled at least a single online payment method.\n * Online payment methods include Wix Payments, Stripe, PayPal, and credit\n * cards.\n */\n onlineProviderEnabled?: boolean;\n /** Whether the site owners accept offline payments. */\n offlineProviderEnabled?: boolean;\n /**\n * Whether the site owners have enabled the\n * [Wix Point of Sale](https://www.wix.com/pos).\n * This allows their customers to make electronic payments in person.\n */\n wixPosProviderEnabled?: boolean;\n /**\n * Whether the site owners have enabled at least one 3rd-party point-of-sale\n * provider. This allows their customers to make electronic payments in person.\n */\n thirdPartyPosProviderEnabled?: boolean;\n}\n\nexport interface GetMeteredBillingChargesRequest {\n /**\n * 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n * @format CURRENCY\n */\n currency?: string | null;\n /**\n * Start of the period you want to retrieve the custom charges for in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n startDate?: Date | null;\n /**\n * End of the period you want to retrieve the custom charges for in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n endDate?: Date | null;\n}\n\nexport interface GetMeteredBillingChargesResponse {\n /** List of retrieved custom charges. */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** ID of the custom charge. The ID consists of 64 characters. */\n id?: string | null;\n /** Description of the custom charge. */\n description?: string;\n /**\n * Charge amount.\n *\n * Min: `0.50`\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0.00 }\n */\n amount?: 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}\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","import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemTypes from './devcenter-checkout-v1-purchased-item-billing.types.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes from './devcenter-checkout-v1-purchased-item-billing.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 getUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(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/checkout',\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 getPurchaseHistory(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);\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/checkout/history',\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 getMeteredBillingCharges(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(\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/metered-billing-charges',\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 {\n PurchasedItem as PurchasedItemOriginal,\n PaymentCycle as PaymentCycleOriginal,\n PaymentCycleWithLiterals as PaymentCycleWithLiteralsOriginal,\n InvoiceStatusUpdated as InvoiceStatusUpdatedOriginal,\n InvoiceStatus as InvoiceStatusOriginal,\n InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal,\n GetUrlRequest as GetUrlRequestOriginal,\n ChargeOverride as ChargeOverrideOriginal,\n GetUrlResponse as GetUrlResponseOriginal,\n GetPurchaseHistoryRequest as GetPurchaseHistoryRequestOriginal,\n GetPurchaseHistoryResponse as GetPurchaseHistoryResponseOriginal,\n GetSitePaymentMethodsStatusRequest as GetSitePaymentMethodsStatusRequestOriginal,\n GetSitePaymentMethodsStatusResponse as GetSitePaymentMethodsStatusResponseOriginal,\n GetMeteredBillingChargesRequest as GetMeteredBillingChargesRequestOriginal,\n GetMeteredBillingChargesResponse as GetMeteredBillingChargesResponseOriginal,\n Charge as ChargeOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './devcenter-checkout-v1-purchased-item-billing.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,cAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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M;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASE,4BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0C;AAAA,IAC5C;AAAA,EACF;AAEF,QAAMF,UAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,QAAAA;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getMeteredBillingCharges","getPurchaseHistory","getUrl","import_timestamp","import_rest_modules","payload","PaymentCycle","InvoiceStatus","WebhookIdentityType","getUrl","getPurchaseHistory","getMeteredBillingCharges"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -31,6 +31,32 @@ declare enum PaymentCycle {
|
|
|
31
31
|
}
|
|
32
32
|
/** @enumType */
|
|
33
33
|
type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
|
|
34
|
+
interface InvoiceStatusUpdated {
|
|
35
|
+
/** Invoice payment status. */
|
|
36
|
+
status?: InvoiceStatusWithLiterals;
|
|
37
|
+
/**
|
|
38
|
+
* Wix Premium invoice ID.
|
|
39
|
+
* @maxLength 50
|
|
40
|
+
*/
|
|
41
|
+
invoiceId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* App instance ID - a unique ID assigned to each app in each site.
|
|
44
|
+
* @format GUID
|
|
45
|
+
*/
|
|
46
|
+
instanceId?: string | null;
|
|
47
|
+
/** Whether the invoice is for a single payment or for multiple, recurring payments. */
|
|
48
|
+
recurring?: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare enum InvoiceStatus {
|
|
51
|
+
UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
|
|
52
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
53
|
+
PAID = "PAID",
|
|
54
|
+
REFUNDED = "REFUNDED",
|
|
55
|
+
VOIDED = "VOIDED",
|
|
56
|
+
CHARGEDBACK = "CHARGEDBACK"
|
|
57
|
+
}
|
|
58
|
+
/** @enumType */
|
|
59
|
+
type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
|
|
34
60
|
interface GetUrlRequest {
|
|
35
61
|
/**
|
|
36
62
|
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
@@ -75,6 +101,18 @@ interface GetUrlRequest {
|
|
|
75
101
|
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
76
102
|
couponCode?: string | null;
|
|
77
103
|
}
|
|
104
|
+
interface ChargeOverride {
|
|
105
|
+
/**
|
|
106
|
+
* Override price. In case you omit the override price, Wix charges site
|
|
107
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
108
|
+
*/
|
|
109
|
+
price?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Override 3-letter currency code in
|
|
112
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
113
|
+
*/
|
|
114
|
+
currency?: string;
|
|
115
|
+
}
|
|
78
116
|
interface GetUrlResponse {
|
|
79
117
|
/**
|
|
80
118
|
* URL for the Wix checkout page.
|
|
@@ -94,6 +132,29 @@ interface GetPurchaseHistoryResponse {
|
|
|
94
132
|
/** Retrieved purchases the site owners have completed for you app. */
|
|
95
133
|
purchases?: PurchasedItem[];
|
|
96
134
|
}
|
|
135
|
+
interface GetSitePaymentMethodsStatusRequest {
|
|
136
|
+
}
|
|
137
|
+
interface GetSitePaymentMethodsStatusResponse {
|
|
138
|
+
/**
|
|
139
|
+
* Whether the site owners have enabled at least a single online payment method.
|
|
140
|
+
* Online payment methods include Wix Payments, Stripe, PayPal, and credit
|
|
141
|
+
* cards.
|
|
142
|
+
*/
|
|
143
|
+
onlineProviderEnabled?: boolean;
|
|
144
|
+
/** Whether the site owners accept offline payments. */
|
|
145
|
+
offlineProviderEnabled?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the site owners have enabled the
|
|
148
|
+
* [Wix Point of Sale](https://www.wix.com/pos).
|
|
149
|
+
* This allows their customers to make electronic payments in person.
|
|
150
|
+
*/
|
|
151
|
+
wixPosProviderEnabled?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Whether the site owners have enabled at least one 3rd-party point-of-sale
|
|
154
|
+
* provider. This allows their customers to make electronic payments in person.
|
|
155
|
+
*/
|
|
156
|
+
thirdPartyPosProviderEnabled?: boolean;
|
|
157
|
+
}
|
|
97
158
|
interface GetMeteredBillingChargesRequest {
|
|
98
159
|
/**
|
|
99
160
|
* 3-letter currency code in
|
|
@@ -130,6 +191,78 @@ interface Charge {
|
|
|
130
191
|
*/
|
|
131
192
|
amount?: string;
|
|
132
193
|
}
|
|
194
|
+
interface MessageEnvelope {
|
|
195
|
+
/**
|
|
196
|
+
* App instance ID.
|
|
197
|
+
* @format GUID
|
|
198
|
+
*/
|
|
199
|
+
instanceId?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Event type.
|
|
202
|
+
* @maxLength 150
|
|
203
|
+
*/
|
|
204
|
+
eventType?: string;
|
|
205
|
+
/** The identification type and identity data. */
|
|
206
|
+
identity?: IdentificationData;
|
|
207
|
+
/** Stringify payload. */
|
|
208
|
+
data?: string;
|
|
209
|
+
}
|
|
210
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
211
|
+
/**
|
|
212
|
+
* ID of a site visitor that has not logged in to the site.
|
|
213
|
+
* @format GUID
|
|
214
|
+
*/
|
|
215
|
+
anonymousVisitorId?: string;
|
|
216
|
+
/**
|
|
217
|
+
* ID of a site visitor that has logged in to the site.
|
|
218
|
+
* @format GUID
|
|
219
|
+
*/
|
|
220
|
+
memberId?: string;
|
|
221
|
+
/**
|
|
222
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
223
|
+
* @format GUID
|
|
224
|
+
*/
|
|
225
|
+
wixUserId?: string;
|
|
226
|
+
/**
|
|
227
|
+
* ID of an app.
|
|
228
|
+
* @format GUID
|
|
229
|
+
*/
|
|
230
|
+
appId?: string;
|
|
231
|
+
/** @readonly */
|
|
232
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
233
|
+
}
|
|
234
|
+
/** @oneof */
|
|
235
|
+
interface IdentificationDataIdOneOf {
|
|
236
|
+
/**
|
|
237
|
+
* ID of a site visitor that has not logged in to the site.
|
|
238
|
+
* @format GUID
|
|
239
|
+
*/
|
|
240
|
+
anonymousVisitorId?: string;
|
|
241
|
+
/**
|
|
242
|
+
* ID of a site visitor that has logged in to the site.
|
|
243
|
+
* @format GUID
|
|
244
|
+
*/
|
|
245
|
+
memberId?: string;
|
|
246
|
+
/**
|
|
247
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
248
|
+
* @format GUID
|
|
249
|
+
*/
|
|
250
|
+
wixUserId?: string;
|
|
251
|
+
/**
|
|
252
|
+
* ID of an app.
|
|
253
|
+
* @format GUID
|
|
254
|
+
*/
|
|
255
|
+
appId?: string;
|
|
256
|
+
}
|
|
257
|
+
declare enum WebhookIdentityType {
|
|
258
|
+
UNKNOWN = "UNKNOWN",
|
|
259
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
260
|
+
MEMBER = "MEMBER",
|
|
261
|
+
WIX_USER = "WIX_USER",
|
|
262
|
+
APP = "APP"
|
|
263
|
+
}
|
|
264
|
+
/** @enumType */
|
|
265
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
133
266
|
|
|
134
267
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
135
268
|
getUrl: (context: any) => string;
|
|
@@ -145,4 +278,4 @@ declare function getUrl(): __PublicMethodMetaInfo<'POST', {}, GetUrlRequest$1, G
|
|
|
145
278
|
declare function getPurchaseHistory(): __PublicMethodMetaInfo<'GET', {}, GetPurchaseHistoryRequest$1, GetPurchaseHistoryRequest, GetPurchaseHistoryResponse$1, GetPurchaseHistoryResponse>;
|
|
146
279
|
declare function getMeteredBillingCharges(): __PublicMethodMetaInfo<'GET', {}, GetMeteredBillingChargesRequest$1, GetMeteredBillingChargesRequest, GetMeteredBillingChargesResponse$1, GetMeteredBillingChargesResponse>;
|
|
147
280
|
|
|
148
|
-
export { type __PublicMethodMetaInfo, getMeteredBillingCharges, getPurchaseHistory, getUrl };
|
|
281
|
+
export { type Charge as ChargeOriginal, type ChargeOverride as ChargeOverrideOriginal, type GetMeteredBillingChargesRequest as GetMeteredBillingChargesRequestOriginal, type GetMeteredBillingChargesResponse as GetMeteredBillingChargesResponseOriginal, type GetPurchaseHistoryRequest as GetPurchaseHistoryRequestOriginal, type GetPurchaseHistoryResponse as GetPurchaseHistoryResponseOriginal, type GetSitePaymentMethodsStatusRequest as GetSitePaymentMethodsStatusRequestOriginal, type GetSitePaymentMethodsStatusResponse as GetSitePaymentMethodsStatusResponseOriginal, type GetUrlRequest as GetUrlRequestOriginal, type GetUrlResponse as GetUrlResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, InvoiceStatus as InvoiceStatusOriginal, type InvoiceStatusUpdated as InvoiceStatusUpdatedOriginal, type InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, PaymentCycle as PaymentCycleOriginal, type PaymentCycleWithLiterals as PaymentCycleWithLiteralsOriginal, type PurchasedItem as PurchasedItemOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getMeteredBillingCharges, getPurchaseHistory, getUrl };
|
package/build/es/meta.mjs
CHANGED
|
@@ -167,6 +167,36 @@ function getMeteredBillingCharges(payload) {
|
|
|
167
167
|
return __getMeteredBillingCharges;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
// src/devcenter-checkout-v1-purchased-item-billing.types.ts
|
|
171
|
+
var PaymentCycle = /* @__PURE__ */ ((PaymentCycle2) => {
|
|
172
|
+
PaymentCycle2["NO_CYCLE"] = "NO_CYCLE";
|
|
173
|
+
PaymentCycle2["MONTHLY"] = "MONTHLY";
|
|
174
|
+
PaymentCycle2["YEARLY"] = "YEARLY";
|
|
175
|
+
PaymentCycle2["ONE_TIME"] = "ONE_TIME";
|
|
176
|
+
PaymentCycle2["TWO_YEARS"] = "TWO_YEARS";
|
|
177
|
+
PaymentCycle2["THREE_YEARS"] = "THREE_YEARS";
|
|
178
|
+
PaymentCycle2["FOUR_YEARS"] = "FOUR_YEARS";
|
|
179
|
+
PaymentCycle2["FIVE_YEARS"] = "FIVE_YEARS";
|
|
180
|
+
return PaymentCycle2;
|
|
181
|
+
})(PaymentCycle || {});
|
|
182
|
+
var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
183
|
+
InvoiceStatus2["UNKNOWN_INVOICE_STATUS"] = "UNKNOWN_INVOICE_STATUS";
|
|
184
|
+
InvoiceStatus2["PAYMENT_FAILED"] = "PAYMENT_FAILED";
|
|
185
|
+
InvoiceStatus2["PAID"] = "PAID";
|
|
186
|
+
InvoiceStatus2["REFUNDED"] = "REFUNDED";
|
|
187
|
+
InvoiceStatus2["VOIDED"] = "VOIDED";
|
|
188
|
+
InvoiceStatus2["CHARGEDBACK"] = "CHARGEDBACK";
|
|
189
|
+
return InvoiceStatus2;
|
|
190
|
+
})(InvoiceStatus || {});
|
|
191
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
192
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
193
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
194
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
195
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
196
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
197
|
+
return WebhookIdentityType2;
|
|
198
|
+
})(WebhookIdentityType || {});
|
|
199
|
+
|
|
170
200
|
// src/devcenter-checkout-v1-purchased-item-billing.meta.ts
|
|
171
201
|
function getUrl2() {
|
|
172
202
|
const payload = {};
|
|
@@ -225,6 +255,9 @@ function getMeteredBillingCharges2() {
|
|
|
225
255
|
};
|
|
226
256
|
}
|
|
227
257
|
export {
|
|
258
|
+
InvoiceStatus as InvoiceStatusOriginal,
|
|
259
|
+
PaymentCycle as PaymentCycleOriginal,
|
|
260
|
+
WebhookIdentityType as WebhookIdentityTypeOriginal,
|
|
228
261
|
getMeteredBillingCharges2 as getMeteredBillingCharges,
|
|
229
262
|
getPurchaseHistory2 as getPurchaseHistory,
|
|
230
263
|
getUrl2 as getUrl
|
package/build/es/meta.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/devcenter-checkout-v1-purchased-item-billing.http.ts","../../src/devcenter-checkout-v1-purchased-item-billing.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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\nfunction resolveComWixpressMarketAimApiCheckoutUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_billing';\n\n/**\n * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.\n *\n *\n * This call succeeds only in case you have previously\n * [set up an external pricing page in your app's dashboard](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-an-external-pricing-page).\n *\n * The returned checkout URL is valid for 48 hours.\n *\n * This API allows your app to manage your pricing page outside of Wix while\n * still using the standard Wix checkout flow.\n */\nexport function getUrl(payload: object): RequestOptionsFactory<any> {\n function __getUrl({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'chargeOverride.price' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getUrl;\n}\n\n/**\n * Retrieves a list of the site owner's past purchases for your app.\n *\n *\n * You don't have to explicitly pass an identifier for the Wix site as part of\n * the request, since this information is taken automatically from the context.\n *\n * The response doesn't include any details about cancellations.\n */\nexport function getPurchaseHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPurchaseHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetPurchaseHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout/history',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'purchases.dateCreated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPurchaseHistory;\n}\n\n/**\n * Triggers Wix to call the\n * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).\n *\n *\n * Wix doesn't use the response from _List Charges_ SPI to actually create an\n * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_\n * allows you confirm that your integration with the Custom Charges SPI is\n * working as intended.\n */\nexport function getMeteredBillingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __getMeteredBillingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDate' }, { path: 'endDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/metered-billing-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n };\n\n return metadata;\n }\n\n return __getMeteredBillingCharges;\n}\n","import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemTypes from './devcenter-checkout-v1-purchased-item-billing.types.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes from './devcenter-checkout-v1-purchased-item-billing.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 getUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(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/checkout',\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 getPurchaseHistory(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);\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/checkout/history',\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 getMeteredBillingCharges(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(\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/metered-billing-charges',\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"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU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A,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASE,4BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC0C;AAAA,IAC5C;AAAA,EACF;AAEF,QAAMF,UAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,QAAAA;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","getUrl","getPurchaseHistory","getMeteredBillingCharges"]}
|
|
1
|
+
{"version":3,"sources":["../../src/devcenter-checkout-v1-purchased-item-billing.http.ts","../../src/devcenter-checkout-v1-purchased-item-billing.types.ts","../../src/devcenter-checkout-v1-purchased-item-billing.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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\nfunction resolveComWixpressMarketAimApiCheckoutUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/app-instance-manager-webapp',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'wixapis.com': [\n {\n srcPath: '/apps',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n {\n srcPath: '/api/v1/instance',\n destPath: '/v1/instance',\n },\n {\n srcPath: '/api/v1/scripts',\n destPath: '/v1/scripts',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/app-instance-manager',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n _: [\n {\n srcPath: '/devcenter/app-instance/v1/instance',\n destPath: '/v1/instance',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_billing';\n\n/**\n * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.\n *\n *\n * This call succeeds only in case you have previously\n * [set up an external pricing page in your app's dashboard](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-an-external-pricing-page).\n *\n * The returned checkout URL is valid for 48 hours.\n *\n * This API allows your app to manage your pricing page outside of Wix while\n * still using the standard Wix checkout flow.\n */\nexport function getUrl(payload: object): RequestOptionsFactory<any> {\n function __getUrl({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'chargeOverride.price' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getUrl;\n}\n\n/**\n * Retrieves a list of the site owner's past purchases for your app.\n *\n *\n * You don't have to explicitly pass an identifier for the Wix site as part of\n * the request, since this information is taken automatically from the context.\n *\n * The response doesn't include any details about cancellations.\n */\nexport function getPurchaseHistory(\n payload: object\n): RequestOptionsFactory<any> {\n function __getPurchaseHistory({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.market.aim.api.Checkout.GetPurchaseHistory',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/checkout/history',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'purchases.dateCreated' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPurchaseHistory;\n}\n\n/**\n * Triggers Wix to call the\n * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).\n *\n *\n * Wix doesn't use the response from _List Charges_ SPI to actually create an\n * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_\n * allows you confirm that your integration with the Custom Charges SPI is\n * working as intended.\n */\nexport function getMeteredBillingCharges(\n payload: object\n): RequestOptionsFactory<any> {\n function __getMeteredBillingCharges({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDate' }, { path: 'endDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressMarketAimApiCheckoutUrl({\n protoPath: '/v1/metered-billing-charges',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n };\n\n return metadata;\n }\n\n return __getMeteredBillingCharges;\n}\n","export interface PurchasedItem {\n /** ID of your app's paid plan. */\n productId?: string;\n /** Price of your app's paid plan. For example, `9.95`. */\n price?: string;\n /**\n * 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n currency?: string;\n /** Information about the billing cycle for your app's paid plan. */\n billingCycle?: PaymentCycleWithLiterals;\n /**\n * Date and time the site onwers have purchased your app's paid plan in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n dateCreated?: Date | null;\n}\n\nexport enum PaymentCycle {\n NO_CYCLE = 'NO_CYCLE',\n MONTHLY = 'MONTHLY',\n YEARLY = 'YEARLY',\n ONE_TIME = 'ONE_TIME',\n TWO_YEARS = 'TWO_YEARS',\n THREE_YEARS = 'THREE_YEARS',\n FOUR_YEARS = 'FOUR_YEARS',\n FIVE_YEARS = 'FIVE_YEARS',\n}\n\n/** @enumType */\nexport type PaymentCycleWithLiterals =\n | PaymentCycle\n | 'NO_CYCLE'\n | 'MONTHLY'\n | 'YEARLY'\n | 'ONE_TIME'\n | 'TWO_YEARS'\n | 'THREE_YEARS'\n | 'FOUR_YEARS'\n | 'FIVE_YEARS';\n\nexport interface InvoiceStatusUpdated {\n /** Invoice payment status. */\n status?: InvoiceStatusWithLiterals;\n /**\n * Wix Premium invoice ID.\n * @maxLength 50\n */\n invoiceId?: string;\n /**\n * App instance ID - a unique ID assigned to each app in each site.\n * @format GUID\n */\n instanceId?: string | null;\n /** Whether the invoice is for a single payment or for multiple, recurring payments. */\n recurring?: boolean;\n}\n\nexport enum InvoiceStatus {\n UNKNOWN_INVOICE_STATUS = 'UNKNOWN_INVOICE_STATUS',\n PAYMENT_FAILED = 'PAYMENT_FAILED',\n PAID = 'PAID',\n REFUNDED = 'REFUNDED',\n VOIDED = 'VOIDED',\n CHARGEDBACK = 'CHARGEDBACK',\n}\n\n/** @enumType */\nexport type InvoiceStatusWithLiterals =\n | InvoiceStatus\n | 'UNKNOWN_INVOICE_STATUS'\n | 'PAYMENT_FAILED'\n | 'PAID'\n | 'REFUNDED'\n | 'VOIDED'\n | 'CHARGEDBACK';\n\nexport interface GetUrlRequest {\n /**\n * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard\n * for a list of your app's supported product IDs.\n */\n productId: string;\n /**\n * URL for the Wix checkout page. Redirect site owners to this URL after\n * they've successfully purchased a paid plan for your app.\n * @format WEB_URL\n */\n successUrl?: string | null;\n /**\n * Whether the checkout is for testing purposes only. Testing is mainly\n * relevant for in-app purchase flows. When `true`, Wix charges the site\n * owners an amount of `0.00`.\n *\n * Not supported for usage-based plans.\n */\n testCheckout?: boolean;\n /**\n * Information about the paid plan's billing cycle.\n *\n * Set to `MONTHLY` for usage-based plans.\n */\n billingCycle?: PaymentCycleWithLiterals;\n /**\n * 2-letter country code in\n * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n * format.\n *\n * Default: `\"US\"`\n */\n countryCode?: string | null;\n /**\n * 2-letter language code in\n * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n *\n * Default: `\"EN\"`\n */\n languageCode?: string | null;\n /** Coupon code for the paid plan. Available only in case there is a discount. */\n couponCode?: string | null;\n}\n\nexport interface ChargeOverride {\n /**\n * Override price. In case you omit the override price, Wix charges site\n * owners the app's default price that's configured in the Pricing page of your app's dashboard.\n */\n price?: number;\n /**\n * Override 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n currency?: string;\n}\n\nexport interface GetUrlResponse {\n /**\n * URL for the Wix checkout page.\n * @format WEB_URL\n */\n checkoutUrl?: string;\n /**\n * Token for the Wix checkout page. The token holds all data about the order\n * you're creating a checkout for. It is [signed](),\n * so you can verify that it comes from Wix.\n */\n token?: string | null;\n}\n\nexport interface GetPurchaseHistoryRequest {}\n\nexport interface GetPurchaseHistoryResponse {\n /** Retrieved purchases the site owners have completed for you app. */\n purchases?: PurchasedItem[];\n}\n\nexport interface GetSitePaymentMethodsStatusRequest {}\n\nexport interface GetSitePaymentMethodsStatusResponse {\n /**\n * Whether the site owners have enabled at least a single online payment method.\n * Online payment methods include Wix Payments, Stripe, PayPal, and credit\n * cards.\n */\n onlineProviderEnabled?: boolean;\n /** Whether the site owners accept offline payments. */\n offlineProviderEnabled?: boolean;\n /**\n * Whether the site owners have enabled the\n * [Wix Point of Sale](https://www.wix.com/pos).\n * This allows their customers to make electronic payments in person.\n */\n wixPosProviderEnabled?: boolean;\n /**\n * Whether the site owners have enabled at least one 3rd-party point-of-sale\n * provider. This allows their customers to make electronic payments in person.\n */\n thirdPartyPosProviderEnabled?: boolean;\n}\n\nexport interface GetMeteredBillingChargesRequest {\n /**\n * 3-letter currency code in\n * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n * @format CURRENCY\n */\n currency?: string | null;\n /**\n * Start of the period you want to retrieve the custom charges for in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n startDate?: Date | null;\n /**\n * End of the period you want to retrieve the custom charges for in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n */\n endDate?: Date | null;\n}\n\nexport interface GetMeteredBillingChargesResponse {\n /** List of retrieved custom charges. */\n charges?: Charge[];\n}\n\nexport interface Charge {\n /** ID of the custom charge. The ID consists of 64 characters. */\n id?: string | null;\n /** Description of the custom charge. */\n description?: string;\n /**\n * Charge amount.\n *\n * Min: `0.50`\n * @format DECIMAL_VALUE\n * @decimalValue options { gt:0.00 }\n */\n amount?: 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}\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","import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemTypes from './devcenter-checkout-v1-purchased-item-billing.types.js';\nimport * as ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes from './devcenter-checkout-v1-purchased-item-billing.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 getUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(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/checkout',\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 getPurchaseHistory(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);\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/checkout/history',\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 getMeteredBillingCharges(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesRequest,\n ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesResponse,\n ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(\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/metered-billing-charges',\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 {\n PurchasedItem as PurchasedItemOriginal,\n PaymentCycle as PaymentCycleOriginal,\n PaymentCycleWithLiterals as PaymentCycleWithLiteralsOriginal,\n InvoiceStatusUpdated as InvoiceStatusUpdatedOriginal,\n InvoiceStatus as InvoiceStatusOriginal,\n InvoiceStatusWithLiterals as InvoiceStatusWithLiteralsOriginal,\n GetUrlRequest as GetUrlRequestOriginal,\n ChargeOverride as ChargeOverrideOriginal,\n GetUrlResponse as GetUrlResponseOriginal,\n GetPurchaseHistoryRequest as GetPurchaseHistoryRequestOriginal,\n GetPurchaseHistoryResponse as GetPurchaseHistoryResponseOriginal,\n GetSitePaymentMethodsStatusRequest as GetSitePaymentMethodsStatusRequestOriginal,\n GetSitePaymentMethodsStatusResponse as GetSitePaymentMethodsStatusResponseOriginal,\n GetMeteredBillingChargesRequest as GetMeteredBillingChargesRequestOriginal,\n GetMeteredBillingChargesResponse as GetMeteredBillingChargesResponseOriginal,\n Charge as ChargeOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './devcenter-checkout-v1-purchased-item-billing.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAA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ityType","getUrl","getPurchaseHistory","getMeteredBillingCharges"]}
|