@wix/auto_sdk_app-management_billing 1.0.7 → 1.0.9

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.
Files changed (133) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +14 -0
  11. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +22 -0
  12. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
  13. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
  14. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +184 -0
  15. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
  16. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
  17. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +85 -0
  18. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
  19. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +38 -0
  20. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +32 -0
  21. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
  22. package/build/{internal/devcenter-checkout-v1-purchased-item-billing.universal-Bv6aTKH_.d.mts → cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts} +19 -90
  23. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +32 -0
  24. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
  25. package/build/{devcenter-checkout-v1-purchased-item-billing.universal-BvkvBr8A.d.mts → cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts} +84 -24
  26. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +207 -0
  27. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +14 -0
  38. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +16 -0
  39. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
  40. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
  41. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +178 -0
  42. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
  43. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
  44. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +56 -0
  45. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
  46. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +38 -0
  47. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +23 -0
  48. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
  49. package/build/{internal/devcenter-checkout-v1-purchased-item-billing.universal-Bv6aTKH_.d.ts → es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts} +19 -90
  50. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +29 -0
  51. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
  52. package/build/{devcenter-checkout-v1-purchased-item-billing.universal-BvkvBr8A.d.ts → es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts} +84 -24
  53. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +178 -0
  54. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
  55. package/build/internal/cjs/index.d.ts +1 -0
  56. package/build/internal/cjs/index.js +18 -0
  57. package/build/internal/cjs/index.js.map +1 -0
  58. package/build/internal/cjs/index.typings.d.ts +1 -0
  59. package/build/internal/cjs/index.typings.js +18 -0
  60. package/build/internal/cjs/index.typings.js.map +1 -0
  61. package/build/internal/cjs/meta.d.ts +1 -0
  62. package/build/internal/cjs/meta.js +18 -0
  63. package/build/internal/cjs/meta.js.map +1 -0
  64. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +16 -0
  65. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +22 -0
  66. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
  67. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
  68. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +184 -0
  69. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
  70. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
  71. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +85 -0
  72. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
  73. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +53 -0
  74. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +32 -0
  75. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
  76. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +250 -0
  77. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +32 -0
  78. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
  79. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +401 -0
  80. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +207 -0
  81. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
  82. package/build/internal/es/index.d.ts +1 -0
  83. package/build/internal/es/index.js +2 -0
  84. package/build/internal/es/index.js.map +1 -0
  85. package/build/internal/es/index.typings.d.ts +1 -0
  86. package/build/internal/es/index.typings.js +2 -0
  87. package/build/internal/es/index.typings.js.map +1 -0
  88. package/build/internal/es/meta.d.ts +1 -0
  89. package/build/internal/es/meta.js +2 -0
  90. package/build/internal/es/meta.js.map +1 -0
  91. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +16 -0
  92. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +16 -0
  93. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
  94. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
  95. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +178 -0
  96. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
  97. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
  98. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +56 -0
  99. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
  100. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +53 -0
  101. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +23 -0
  102. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
  103. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +250 -0
  104. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +29 -0
  105. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
  106. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +401 -0
  107. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +178 -0
  108. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
  109. package/package.json +11 -12
  110. package/build/index.d.mts +0 -47
  111. package/build/index.d.ts +0 -47
  112. package/build/index.js +0 -359
  113. package/build/index.js.map +0 -1
  114. package/build/index.mjs +0 -329
  115. package/build/index.mjs.map +0 -1
  116. package/build/internal/index.d.mts +0 -64
  117. package/build/internal/index.d.ts +0 -64
  118. package/build/internal/index.js +0 -359
  119. package/build/internal/index.js.map +0 -1
  120. package/build/internal/index.mjs +0 -329
  121. package/build/internal/index.mjs.map +0 -1
  122. package/build/internal/meta.d.mts +0 -139
  123. package/build/internal/meta.d.ts +0 -139
  124. package/build/internal/meta.js +0 -240
  125. package/build/internal/meta.js.map +0 -1
  126. package/build/internal/meta.mjs +0 -211
  127. package/build/internal/meta.mjs.map +0 -1
  128. package/build/meta.d.mts +0 -139
  129. package/build/meta.d.ts +0 -139
  130. package/build/meta.js +0 -240
  131. package/build/meta.js.map +0 -1
  132. package/build/meta.mjs +0 -211
  133. package/build/meta.mjs.map +0 -1
@@ -1,139 +0,0 @@
1
- import { g as GetUrlRequest$1, a as GetUrlResponse$1, h as GetPurchaseHistoryRequest$1, b as GetPurchaseHistoryResponse$1, k as GetMeteredBillingChargesRequest$1, d as GetMeteredBillingChargesResponse$1 } from './devcenter-checkout-v1-purchased-item-billing.universal-Bv6aTKH_.js';
2
-
3
- interface PurchasedItem {
4
- /** ID of your app's paid plan. */
5
- productId?: string;
6
- /** Price of your app's paid plan. For example, `9.95`. */
7
- price?: string;
8
- /**
9
- * 3-letter currency code in
10
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
11
- */
12
- currency?: string;
13
- /** Information about the billing cycle for your app's paid plan. */
14
- billingCycle?: PaymentCycle;
15
- /**
16
- * Date and time the site onwers have purchased your app's paid plan in
17
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
18
- */
19
- dateCreated?: Date | null;
20
- }
21
- declare enum PaymentCycle {
22
- NO_CYCLE = "NO_CYCLE",
23
- MONTHLY = "MONTHLY",
24
- YEARLY = "YEARLY",
25
- ONE_TIME = "ONE_TIME",
26
- TWO_YEARS = "TWO_YEARS",
27
- THREE_YEARS = "THREE_YEARS",
28
- FOUR_YEARS = "FOUR_YEARS",
29
- FIVE_YEARS = "FIVE_YEARS"
30
- }
31
- interface GetUrlRequest {
32
- /**
33
- * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
34
- * for a list of your app's supported product IDs.
35
- */
36
- productId: string;
37
- /**
38
- * URL for the Wix checkout page. Redirect site owners to this URL after
39
- * they've successfully purchased a paid plan for your app.
40
- * @format WEB_URL
41
- */
42
- successUrl?: string | null;
43
- /**
44
- * Whether the checkout is for testing purposes only. Testing is mainly
45
- * relevant for in-app purchase flows. When `true`, Wix charges the site
46
- * owners an amount of `0.00`.
47
- */
48
- testCheckout?: boolean;
49
- /** Information about the paid plan's billing cycle. */
50
- billingCycle?: PaymentCycle;
51
- /**
52
- * 2-letter country code in
53
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
54
- * format.
55
- *
56
- * Default: `"US"`
57
- */
58
- countryCode?: string | null;
59
- /**
60
- * 2-letter language code in
61
- * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
62
- *
63
- * Default: `"EN"`
64
- */
65
- languageCode?: string | null;
66
- /** Coupon code for the paid plan. Available only in case there is a discount. */
67
- couponCode?: string | null;
68
- }
69
- interface GetUrlResponse {
70
- /**
71
- * URL for the Wix checkout page.
72
- * @format WEB_URL
73
- */
74
- checkoutUrl?: string;
75
- /**
76
- * Token for the Wix checkout page. The token holds all data about the order
77
- * you're creating a checkout for. It is [signed](),
78
- * so you can verify that it comes from Wix.
79
- */
80
- token?: string | null;
81
- }
82
- interface GetPurchaseHistoryRequest {
83
- }
84
- interface GetPurchaseHistoryResponse {
85
- /** Retrieved purchases the site owners have completed for you app. */
86
- purchases?: PurchasedItem[];
87
- }
88
- interface GetMeteredBillingChargesRequest {
89
- /**
90
- * 3-letter currency code in
91
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
92
- * @format CURRENCY
93
- */
94
- currency?: string | null;
95
- /**
96
- * Start of the period you want to retrieve the custom charges for in
97
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
98
- */
99
- startDate?: Date | null;
100
- /**
101
- * End of the period you want to retrieve the custom charges for in
102
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
103
- */
104
- endDate?: Date | null;
105
- }
106
- interface GetMeteredBillingChargesResponse {
107
- /** List of retrieved custom charges. */
108
- charges?: Charge[];
109
- }
110
- interface Charge {
111
- /** ID of the custom charge. The ID consists of 64 characters. */
112
- id?: string | null;
113
- /** Description of the custom charge. */
114
- description?: string;
115
- /**
116
- * Charge amount.
117
- *
118
- * Min: `0.50`
119
- * @format DECIMAL_VALUE
120
- * @decimalValue options { gt:0.00 }
121
- */
122
- amount?: string;
123
- }
124
-
125
- type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
126
- getUrl: (context: any) => string;
127
- httpMethod: K;
128
- path: string;
129
- pathParams: M;
130
- __requestType: T;
131
- __originalRequestType: S;
132
- __responseType: Q;
133
- __originalResponseType: R;
134
- };
135
- declare function getUrl(): __PublicMethodMetaInfo<'POST', {}, GetUrlRequest$1, GetUrlRequest, GetUrlResponse$1, GetUrlResponse>;
136
- declare function getPurchaseHistory(): __PublicMethodMetaInfo<'GET', {}, GetPurchaseHistoryRequest$1, GetPurchaseHistoryRequest, GetPurchaseHistoryResponse$1, GetPurchaseHistoryResponse>;
137
- declare function getMeteredBillingCharges(): __PublicMethodMetaInfo<'GET', {}, GetMeteredBillingChargesRequest$1, GetMeteredBillingChargesRequest, GetMeteredBillingChargesResponse$1, GetMeteredBillingChargesResponse>;
138
-
139
- export { type __PublicMethodMetaInfo, getMeteredBillingCharges, getPurchaseHistory, getUrl };
@@ -1,240 +0,0 @@
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
- // meta.ts
21
- var meta_exports = {};
22
- __export(meta_exports, {
23
- getMeteredBillingCharges: () => getMeteredBillingCharges2,
24
- getPurchaseHistory: () => getPurchaseHistory2,
25
- getUrl: () => getUrl2
26
- });
27
- module.exports = __toCommonJS(meta_exports);
28
-
29
- // src/devcenter-checkout-v1-purchased-item-billing.http.ts
30
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
31
- var import_float = require("@wix/sdk-runtime/transformations/float");
32
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
33
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
34
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
35
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
36
- function resolveComWixpressMarketAimApiCheckoutUrl(opts) {
37
- const domainToMappings = {
38
- "api._api_base_domain_": [
39
- {
40
- srcPath: "/app-instance-manager-webapp",
41
- destPath: ""
42
- }
43
- ],
44
- "www.wixapis.com": [
45
- {
46
- srcPath: "/apps",
47
- destPath: ""
48
- }
49
- ],
50
- "wixapis.com": [
51
- {
52
- srcPath: "/apps",
53
- destPath: ""
54
- }
55
- ],
56
- "dev._base_domain_": [
57
- {
58
- srcPath: "/_api/app-instance-manager",
59
- destPath: ""
60
- },
61
- {
62
- srcPath: "/api/v1/instance",
63
- destPath: "/v1/instance"
64
- },
65
- {
66
- srcPath: "/api/v1/scripts",
67
- destPath: "/v1/scripts"
68
- }
69
- ],
70
- "manage._base_domain_": [
71
- {
72
- srcPath: "/_api/app-instance-manager",
73
- destPath: ""
74
- }
75
- ],
76
- "www._base_domain_": [
77
- {
78
- srcPath: "/_api/app-instance-manager",
79
- destPath: ""
80
- }
81
- ],
82
- "editor._base_domain_": [
83
- {
84
- srcPath: "/_api/app-instance-manager",
85
- destPath: ""
86
- }
87
- ],
88
- "blocks._base_domain_": [
89
- {
90
- srcPath: "/_api/app-instance-manager",
91
- destPath: ""
92
- }
93
- ],
94
- "create.editorx": [
95
- {
96
- srcPath: "/_api/app-instance-manager",
97
- destPath: ""
98
- }
99
- ]
100
- };
101
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
102
- }
103
- var PACKAGE_NAME = "@wix/auto_sdk_app-management_billing";
104
- function getUrl(payload) {
105
- function __getUrl({ host }) {
106
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
107
- {
108
- transformFn: import_float.transformSDKFloatToRESTFloat,
109
- paths: [{ path: "chargeOverride.price" }]
110
- }
111
- ]);
112
- const metadata = {
113
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
114
- method: "POST",
115
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetUrl",
116
- packageName: PACKAGE_NAME,
117
- url: resolveComWixpressMarketAimApiCheckoutUrl({
118
- protoPath: "/v1/checkout",
119
- data: serializedData,
120
- host
121
- }),
122
- data: serializedData
123
- };
124
- return metadata;
125
- }
126
- return __getUrl;
127
- }
128
- function getPurchaseHistory(payload) {
129
- function __getPurchaseHistory({ host }) {
130
- const metadata = {
131
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
132
- method: "GET",
133
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetPurchaseHistory",
134
- packageName: PACKAGE_NAME,
135
- url: resolveComWixpressMarketAimApiCheckoutUrl({
136
- protoPath: "/v1/checkout/history",
137
- data: payload,
138
- host
139
- }),
140
- params: (0, import_rest_modules.toURLSearchParams)(payload),
141
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
142
- {
143
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
144
- paths: [{ path: "purchases.dateCreated" }]
145
- }
146
- ])
147
- };
148
- return metadata;
149
- }
150
- return __getPurchaseHistory;
151
- }
152
- function getMeteredBillingCharges(payload) {
153
- function __getMeteredBillingCharges({ host }) {
154
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
155
- {
156
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
157
- paths: [{ path: "startDate" }, { path: "endDate" }]
158
- }
159
- ]);
160
- const metadata = {
161
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
162
- method: "GET",
163
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges",
164
- packageName: PACKAGE_NAME,
165
- url: resolveComWixpressMarketAimApiCheckoutUrl({
166
- protoPath: "/v1/metered-billing-charges",
167
- data: serializedData,
168
- host
169
- }),
170
- params: (0, import_rest_modules.toURLSearchParams)(serializedData)
171
- };
172
- return metadata;
173
- }
174
- return __getMeteredBillingCharges;
175
- }
176
-
177
- // src/devcenter-checkout-v1-purchased-item-billing.meta.ts
178
- function getUrl2() {
179
- const payload = {};
180
- const getRequestOptions = getUrl(payload);
181
- const getUrl3 = (context) => {
182
- const { url } = getRequestOptions(context);
183
- return url;
184
- };
185
- return {
186
- getUrl: getUrl3,
187
- httpMethod: "POST",
188
- path: "/v1/checkout",
189
- pathParams: {},
190
- __requestType: null,
191
- __originalRequestType: null,
192
- __responseType: null,
193
- __originalResponseType: null
194
- };
195
- }
196
- function getPurchaseHistory2() {
197
- const payload = {};
198
- const getRequestOptions = getPurchaseHistory(payload);
199
- const getUrl3 = (context) => {
200
- const { url } = getRequestOptions(context);
201
- return url;
202
- };
203
- return {
204
- getUrl: getUrl3,
205
- httpMethod: "GET",
206
- path: "/v1/checkout/history",
207
- pathParams: {},
208
- __requestType: null,
209
- __originalRequestType: null,
210
- __responseType: null,
211
- __originalResponseType: null
212
- };
213
- }
214
- function getMeteredBillingCharges2() {
215
- const payload = {};
216
- const getRequestOptions = getMeteredBillingCharges(
217
- payload
218
- );
219
- const getUrl3 = (context) => {
220
- const { url } = getRequestOptions(context);
221
- return url;
222
- };
223
- return {
224
- getUrl: getUrl3,
225
- httpMethod: "GET",
226
- path: "/v1/metered-billing-charges",
227
- pathParams: {},
228
- __requestType: null,
229
- __originalRequestType: null,
230
- __responseType: null,
231
- __originalResponseType: null
232
- };
233
- }
234
- // Annotate the CommonJS export names for ESM import in node:
235
- 0 && (module.exports = {
236
- getMeteredBillingCharges,
237
- getPurchaseHistory,
238
- getUrl
239
- });
240
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
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 };\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 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 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 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,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;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAA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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;","names":["getMeteredBillingCharges","getPurchaseHistory","getUrl","import_timestamp","import_rest_modules","payload","getUrl","getPurchaseHistory","getMeteredBillingCharges"]}
@@ -1,211 +0,0 @@
1
- // src/devcenter-checkout-v1-purchased-item-billing.http.ts
2
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
5
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
7
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
8
- function resolveComWixpressMarketAimApiCheckoutUrl(opts) {
9
- const domainToMappings = {
10
- "api._api_base_domain_": [
11
- {
12
- srcPath: "/app-instance-manager-webapp",
13
- destPath: ""
14
- }
15
- ],
16
- "www.wixapis.com": [
17
- {
18
- srcPath: "/apps",
19
- destPath: ""
20
- }
21
- ],
22
- "wixapis.com": [
23
- {
24
- srcPath: "/apps",
25
- destPath: ""
26
- }
27
- ],
28
- "dev._base_domain_": [
29
- {
30
- srcPath: "/_api/app-instance-manager",
31
- destPath: ""
32
- },
33
- {
34
- srcPath: "/api/v1/instance",
35
- destPath: "/v1/instance"
36
- },
37
- {
38
- srcPath: "/api/v1/scripts",
39
- destPath: "/v1/scripts"
40
- }
41
- ],
42
- "manage._base_domain_": [
43
- {
44
- srcPath: "/_api/app-instance-manager",
45
- destPath: ""
46
- }
47
- ],
48
- "www._base_domain_": [
49
- {
50
- srcPath: "/_api/app-instance-manager",
51
- destPath: ""
52
- }
53
- ],
54
- "editor._base_domain_": [
55
- {
56
- srcPath: "/_api/app-instance-manager",
57
- destPath: ""
58
- }
59
- ],
60
- "blocks._base_domain_": [
61
- {
62
- srcPath: "/_api/app-instance-manager",
63
- destPath: ""
64
- }
65
- ],
66
- "create.editorx": [
67
- {
68
- srcPath: "/_api/app-instance-manager",
69
- destPath: ""
70
- }
71
- ]
72
- };
73
- return resolveUrl(Object.assign(opts, { domainToMappings }));
74
- }
75
- var PACKAGE_NAME = "@wix/auto_sdk_app-management_billing";
76
- function getUrl(payload) {
77
- function __getUrl({ host }) {
78
- const serializedData = transformPaths(payload, [
79
- {
80
- transformFn: transformSDKFloatToRESTFloat,
81
- paths: [{ path: "chargeOverride.price" }]
82
- }
83
- ]);
84
- const metadata = {
85
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
86
- method: "POST",
87
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetUrl",
88
- packageName: PACKAGE_NAME,
89
- url: resolveComWixpressMarketAimApiCheckoutUrl({
90
- protoPath: "/v1/checkout",
91
- data: serializedData,
92
- host
93
- }),
94
- data: serializedData
95
- };
96
- return metadata;
97
- }
98
- return __getUrl;
99
- }
100
- function getPurchaseHistory(payload) {
101
- function __getPurchaseHistory({ host }) {
102
- const metadata = {
103
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
104
- method: "GET",
105
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetPurchaseHistory",
106
- packageName: PACKAGE_NAME,
107
- url: resolveComWixpressMarketAimApiCheckoutUrl({
108
- protoPath: "/v1/checkout/history",
109
- data: payload,
110
- host
111
- }),
112
- params: toURLSearchParams(payload),
113
- transformResponse: (payload2) => transformPaths(payload2, [
114
- {
115
- transformFn: transformRESTTimestampToSDKTimestamp,
116
- paths: [{ path: "purchases.dateCreated" }]
117
- }
118
- ])
119
- };
120
- return metadata;
121
- }
122
- return __getPurchaseHistory;
123
- }
124
- function getMeteredBillingCharges(payload) {
125
- function __getMeteredBillingCharges({ host }) {
126
- const serializedData = transformPaths(payload, [
127
- {
128
- transformFn: transformSDKTimestampToRESTTimestamp,
129
- paths: [{ path: "startDate" }, { path: "endDate" }]
130
- }
131
- ]);
132
- const metadata = {
133
- entityFqdn: "wix.devcenter.checkout.v1.purchased_item",
134
- method: "GET",
135
- methodFqn: "com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges",
136
- packageName: PACKAGE_NAME,
137
- url: resolveComWixpressMarketAimApiCheckoutUrl({
138
- protoPath: "/v1/metered-billing-charges",
139
- data: serializedData,
140
- host
141
- }),
142
- params: toURLSearchParams(serializedData)
143
- };
144
- return metadata;
145
- }
146
- return __getMeteredBillingCharges;
147
- }
148
-
149
- // src/devcenter-checkout-v1-purchased-item-billing.meta.ts
150
- function getUrl2() {
151
- const payload = {};
152
- const getRequestOptions = getUrl(payload);
153
- const getUrl3 = (context) => {
154
- const { url } = getRequestOptions(context);
155
- return url;
156
- };
157
- return {
158
- getUrl: getUrl3,
159
- httpMethod: "POST",
160
- path: "/v1/checkout",
161
- pathParams: {},
162
- __requestType: null,
163
- __originalRequestType: null,
164
- __responseType: null,
165
- __originalResponseType: null
166
- };
167
- }
168
- function getPurchaseHistory2() {
169
- const payload = {};
170
- const getRequestOptions = getPurchaseHistory(payload);
171
- const getUrl3 = (context) => {
172
- const { url } = getRequestOptions(context);
173
- return url;
174
- };
175
- return {
176
- getUrl: getUrl3,
177
- httpMethod: "GET",
178
- path: "/v1/checkout/history",
179
- pathParams: {},
180
- __requestType: null,
181
- __originalRequestType: null,
182
- __responseType: null,
183
- __originalResponseType: null
184
- };
185
- }
186
- function getMeteredBillingCharges2() {
187
- const payload = {};
188
- const getRequestOptions = getMeteredBillingCharges(
189
- payload
190
- );
191
- const getUrl3 = (context) => {
192
- const { url } = getRequestOptions(context);
193
- return url;
194
- };
195
- return {
196
- getUrl: getUrl3,
197
- httpMethod: "GET",
198
- path: "/v1/metered-billing-charges",
199
- pathParams: {},
200
- __requestType: null,
201
- __originalRequestType: null,
202
- __responseType: null,
203
- __originalResponseType: null
204
- };
205
- }
206
- export {
207
- getMeteredBillingCharges2 as getMeteredBillingCharges,
208
- getPurchaseHistory2 as getPurchaseHistory,
209
- getUrl2 as getUrl
210
- };
211
- //# sourceMappingURL=meta.mjs.map
@@ -1 +0,0 @@
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 };\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 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 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 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,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