@wix/auto_sdk_app-management_billing 1.0.5 → 1.0.7

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/{es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts → devcenter-checkout-v1-purchased-item-billing.universal-BvkvBr8A.d.mts} +24 -84
  2. package/build/{cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts → devcenter-checkout-v1-purchased-item-billing.universal-BvkvBr8A.d.ts} +24 -84
  3. package/build/index.d.mts +47 -0
  4. package/build/index.d.ts +47 -0
  5. package/build/index.js +359 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +329 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts → internal/devcenter-checkout-v1-purchased-item-billing.universal-Bv6aTKH_.d.mts} +90 -19
  10. package/build/{es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts → internal/devcenter-checkout-v1-purchased-item-billing.universal-Bv6aTKH_.d.ts} +90 -19
  11. package/build/internal/index.d.mts +64 -0
  12. package/build/internal/index.d.ts +64 -0
  13. package/build/internal/index.js +359 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +329 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +139 -0
  18. package/build/internal/meta.d.ts +139 -0
  19. package/build/internal/meta.js +240 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +211 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +139 -0
  24. package/build/meta.d.ts +139 -0
  25. package/build/meta.js +240 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +211 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -14
  40. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -22
  41. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  42. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  43. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -184
  44. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  45. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  46. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -85
  47. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  48. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -38
  49. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -32
  50. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  51. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -32
  52. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  53. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -207
  54. package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -14
  65. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -16
  66. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  67. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  68. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -178
  69. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  70. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  71. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -56
  72. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  73. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -38
  74. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -23
  75. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  76. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -29
  77. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  78. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -178
  79. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
  80. package/build/internal/cjs/index.d.ts +0 -1
  81. package/build/internal/cjs/index.js +0 -18
  82. package/build/internal/cjs/index.js.map +0 -1
  83. package/build/internal/cjs/index.typings.d.ts +0 -1
  84. package/build/internal/cjs/index.typings.js +0 -18
  85. package/build/internal/cjs/index.typings.js.map +0 -1
  86. package/build/internal/cjs/meta.d.ts +0 -1
  87. package/build/internal/cjs/meta.js +0 -18
  88. package/build/internal/cjs/meta.js.map +0 -1
  89. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -16
  90. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -22
  91. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  92. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  93. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -184
  94. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  95. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  96. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -85
  97. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  98. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -53
  99. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -32
  100. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  101. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +0 -250
  102. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -32
  103. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  104. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +0 -401
  105. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -207
  106. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
  107. package/build/internal/es/index.d.ts +0 -1
  108. package/build/internal/es/index.js +0 -2
  109. package/build/internal/es/index.js.map +0 -1
  110. package/build/internal/es/index.typings.d.ts +0 -1
  111. package/build/internal/es/index.typings.js +0 -2
  112. package/build/internal/es/index.typings.js.map +0 -1
  113. package/build/internal/es/meta.d.ts +0 -1
  114. package/build/internal/es/meta.js +0 -2
  115. package/build/internal/es/meta.js.map +0 -1
  116. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -16
  117. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -16
  118. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  119. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  120. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -178
  121. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  122. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  123. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -56
  124. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  125. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -53
  126. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -23
  127. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  128. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +0 -250
  129. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -29
  130. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  131. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +0 -401
  132. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -178
  133. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
@@ -1,401 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface PurchasedItem {
3
- /** ID of your app's paid plan. */
4
- productId?: string;
5
- /** Price of your app's paid plan. For example, `9.95`. */
6
- price?: string;
7
- /**
8
- * 3-letter currency code in
9
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
10
- */
11
- currency?: string;
12
- /** Information about the billing cycle for your app's paid plan. */
13
- billingCycle?: PaymentCycle;
14
- /**
15
- * Date and time the site onwers have purchased your app's paid plan in
16
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
17
- */
18
- dateCreated?: Date | null;
19
- }
20
- export declare enum PaymentCycle {
21
- NO_CYCLE = "NO_CYCLE",
22
- MONTHLY = "MONTHLY",
23
- YEARLY = "YEARLY",
24
- ONE_TIME = "ONE_TIME",
25
- TWO_YEARS = "TWO_YEARS",
26
- THREE_YEARS = "THREE_YEARS",
27
- FOUR_YEARS = "FOUR_YEARS",
28
- FIVE_YEARS = "FIVE_YEARS"
29
- }
30
- export interface InvoiceStatusUpdated {
31
- /** Invoice payment status. */
32
- status?: InvoiceStatus;
33
- /**
34
- * Wix Premium invoice ID.
35
- * @maxLength 50
36
- */
37
- invoiceId?: string;
38
- /**
39
- * App instance ID - a unique ID assigned to each app in each site.
40
- * @format GUID
41
- */
42
- instanceId?: string | null;
43
- /** Whether the invoice is for a single payment or for multiple, recurring payments. */
44
- recurring?: boolean;
45
- }
46
- export declare enum InvoiceStatus {
47
- UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
48
- PAYMENT_FAILED = "PAYMENT_FAILED",
49
- PAID = "PAID",
50
- REFUNDED = "REFUNDED",
51
- VOIDED = "VOIDED",
52
- CHARGEDBACK = "CHARGEDBACK"
53
- }
54
- export interface GetUrlRequest {
55
- /**
56
- * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
57
- * for a list of your app's supported product IDs.
58
- */
59
- productId: string;
60
- /**
61
- * URL for the Wix checkout page. Redirect site owners to this URL after
62
- * they've successfully purchased a paid plan for your app.
63
- * @format WEB_URL
64
- */
65
- successUrl?: string | null;
66
- /**
67
- * Whether the checkout is for testing purposes only. Testing is mainly
68
- * relevant for in-app purchase flows. When `true`, Wix charges the site
69
- * owners an amount of `0.00`.
70
- */
71
- testCheckout?: boolean;
72
- /** Information about the paid plan's billing cycle. */
73
- billingCycle?: PaymentCycle;
74
- /**
75
- * 2-letter country code in
76
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
77
- * format.
78
- *
79
- * Default: `"US"`
80
- */
81
- countryCode?: string | null;
82
- /**
83
- * 2-letter language code in
84
- * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
85
- *
86
- * Default: `"EN"`
87
- */
88
- languageCode?: string | null;
89
- /** Coupon code for the paid plan. Available only in case there is a discount. */
90
- couponCode?: string | null;
91
- }
92
- export interface ChargeOverride {
93
- /**
94
- * Override price. In case you omit the override price, Wix charges site
95
- * owners the app's default price that's configured in the Pricing page of your app's dashboard.
96
- */
97
- price?: number;
98
- /**
99
- * Override 3-letter currency code in
100
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
101
- */
102
- currency?: string;
103
- }
104
- export interface GetUrlResponse {
105
- /**
106
- * URL for the Wix checkout page.
107
- * @format WEB_URL
108
- */
109
- checkoutUrl?: string;
110
- /**
111
- * Token for the Wix checkout page. The token holds all data about the order
112
- * you're creating a checkout for. It is [signed](),
113
- * so you can verify that it comes from Wix.
114
- */
115
- token?: string | null;
116
- }
117
- export interface GetPurchaseHistoryRequest {
118
- }
119
- export interface GetPurchaseHistoryResponse {
120
- /** Retrieved purchases the site owners have completed for you app. */
121
- purchases?: PurchasedItem[];
122
- }
123
- export interface GetSitePaymentMethodsStatusRequest {
124
- }
125
- export interface GetSitePaymentMethodsStatusResponse {
126
- /**
127
- * Whether the site owners have enabled at least a single online payment method.
128
- * Online payment methods include Wix Payments, Stripe, PayPal, and credit
129
- * cards.
130
- */
131
- onlineProviderEnabled?: boolean;
132
- /** Whether the site owners accept offline payments. */
133
- offlineProviderEnabled?: boolean;
134
- /**
135
- * Whether the site owners have enabled the
136
- * [Wix Point of Sale](https://www.wix.com/pos).
137
- * This allows their customers to make electronic payments in person.
138
- */
139
- wixPosProviderEnabled?: boolean;
140
- /**
141
- * Whether the site owners have enabled at least one 3rd-party point-of-sale
142
- * provider. This allows their customers to make electronic payments in person.
143
- */
144
- thirdPartyPosProviderEnabled?: boolean;
145
- }
146
- export interface GetMeteredBillingChargesRequest {
147
- /**
148
- * 3-letter currency code in
149
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
150
- * @format CURRENCY
151
- */
152
- currency?: string | null;
153
- /**
154
- * Start of the period you want to retrieve the custom charges for in
155
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
156
- */
157
- startDate?: Date | null;
158
- /**
159
- * End of the period you want to retrieve the custom charges for in
160
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
161
- */
162
- endDate?: Date | null;
163
- }
164
- export interface GetMeteredBillingChargesResponse {
165
- /** List of retrieved custom charges. */
166
- charges?: Charge[];
167
- }
168
- export interface Charge {
169
- /** ID of the custom charge. The ID consists of 64 characters. */
170
- _id?: string | null;
171
- /** Description of the custom charge. */
172
- description?: string;
173
- /**
174
- * Charge amount.
175
- *
176
- * Min: `0.50`
177
- * @format DECIMAL_VALUE
178
- * @decimalValue options { gt:0.00 }
179
- */
180
- amount?: string;
181
- }
182
- export interface MessageEnvelope {
183
- /**
184
- * App instance ID.
185
- * @format GUID
186
- */
187
- instanceId?: string | null;
188
- /**
189
- * Event type.
190
- * @maxLength 150
191
- */
192
- eventType?: string;
193
- /** The identification type and identity data. */
194
- identity?: IdentificationData;
195
- /** Stringify payload. */
196
- data?: string;
197
- }
198
- export interface IdentificationData extends IdentificationDataIdOneOf {
199
- /**
200
- * ID of a site visitor that has not logged in to the site.
201
- * @format GUID
202
- */
203
- anonymousVisitorId?: string;
204
- /**
205
- * ID of a site visitor that has logged in to the site.
206
- * @format GUID
207
- */
208
- memberId?: string;
209
- /**
210
- * ID of a Wix user (site owner, contributor, etc.).
211
- * @format GUID
212
- */
213
- wixUserId?: string;
214
- /**
215
- * ID of an app.
216
- * @format GUID
217
- */
218
- appId?: string;
219
- /** @readonly */
220
- identityType?: WebhookIdentityType;
221
- }
222
- /** @oneof */
223
- export interface IdentificationDataIdOneOf {
224
- /**
225
- * ID of a site visitor that has not logged in to the site.
226
- * @format GUID
227
- */
228
- anonymousVisitorId?: string;
229
- /**
230
- * ID of a site visitor that has logged in to the site.
231
- * @format GUID
232
- */
233
- memberId?: string;
234
- /**
235
- * ID of a Wix user (site owner, contributor, etc.).
236
- * @format GUID
237
- */
238
- wixUserId?: string;
239
- /**
240
- * ID of an app.
241
- * @format GUID
242
- */
243
- appId?: string;
244
- }
245
- export declare enum WebhookIdentityType {
246
- UNKNOWN = "UNKNOWN",
247
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
248
- MEMBER = "MEMBER",
249
- WIX_USER = "WIX_USER",
250
- APP = "APP"
251
- }
252
- export interface BaseEventMetadata {
253
- /**
254
- * App instance ID.
255
- * @format GUID
256
- */
257
- instanceId?: string | null;
258
- /**
259
- * Event type.
260
- * @maxLength 150
261
- */
262
- eventType?: string;
263
- /** The identification type and identity data. */
264
- identity?: IdentificationData;
265
- }
266
- export interface PurchasedItemInvoiceStatusUpdatedEnvelope {
267
- data: InvoiceStatusUpdated;
268
- metadata: BaseEventMetadata;
269
- }
270
- /**
271
- * Triggered when there is an update to the payment status of an invoice.
272
- * Charges made using the [Custom Charges SPI](https://dev.wix.com/docs/rest/app-management/app-billing/custom-charges-service-plugin/introduction) may be based on usage.
273
- * Learn more about [usage-based charges](https://dev.wix.com/docs/build-apps/launch-your-app/pricing-and-billing/set-up-a-usage-based-business-model).
274
- * @permissionScope Manage Your App
275
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
276
- * @permissionScope Read site, business, and email details
277
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
278
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
279
- * @webhook
280
- * @eventType InvoiceStatusUpdated
281
- * @serviceIdentifier com.wixpress.market.aim.api.Checkout
282
- * @slug invoice_status_updated
283
- */
284
- export declare function onPurchasedItemInvoiceStatusUpdated(handler: (event: PurchasedItemInvoiceStatusUpdatedEnvelope) => void | Promise<void>): void;
285
- type PurchasedItemNonNullablePaths = `productId` | `price` | `currency` | `billingCycle`;
286
- /**
287
- * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
288
- *
289
- *
290
- * This call succeeds only in case you have previously
291
- * [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).
292
- *
293
- * The returned checkout URL is valid for 48 hours.
294
- *
295
- * This API allows your app to manage your pricing page outside of Wix while
296
- * still using the standard Wix checkout flow.
297
- * @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
298
- * for a list of your app's supported product IDs.
299
- * @public
300
- * @requiredField productId
301
- * @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT
302
- * @permissionScope Manage Your App
303
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
304
- * @permissionScope Read site, business, and email details
305
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
306
- * @applicableIdentity APP
307
- * @fqn com.wixpress.market.aim.api.Checkout.GetUrl
308
- */
309
- export declare function getUrl(productId: string, options?: GetUrlOptions): Promise<NonNullablePaths<GetUrlResponse, `checkoutUrl`>>;
310
- export interface GetUrlOptions {
311
- /**
312
- * URL for the Wix checkout page. Redirect site owners to this URL after
313
- * they've successfully purchased a paid plan for your app.
314
- * @format WEB_URL
315
- */
316
- successUrl?: string | null;
317
- /**
318
- * Whether the checkout is for testing purposes only. Testing is mainly
319
- * relevant for in-app purchase flows. When `true`, Wix charges the site
320
- * owners an amount of `0.00`.
321
- */
322
- testCheckout?: boolean;
323
- /** Information about the paid plan's billing cycle. */
324
- billingCycle?: PaymentCycle;
325
- /**
326
- * 2-letter country code in
327
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
328
- * format.
329
- *
330
- * Default: `"US"`
331
- */
332
- countryCode?: string | null;
333
- /**
334
- * 2-letter language code in
335
- * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
336
- *
337
- * Default: `"EN"`
338
- */
339
- languageCode?: string | null;
340
- /** Coupon code for the paid plan. Available only in case there is a discount. */
341
- couponCode?: string | null;
342
- }
343
- /**
344
- * Retrieves a list of the site owner's past purchases for your app.
345
- *
346
- *
347
- * You don't have to explicitly pass an identifier for the Wix site as part of
348
- * the request, since this information is taken automatically from the context.
349
- *
350
- * The response doesn't include any details about cancellations.
351
- * @public
352
- * @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY
353
- * @permissionScope Manage Your App
354
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
355
- * @permissionScope Read site, business, and email details
356
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
357
- * @applicableIdentity APP
358
- * @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory
359
- */
360
- export declare function getPurchaseHistory(): Promise<NonNullablePaths<GetPurchaseHistoryResponse, {
361
- [P in PurchasedItemNonNullablePaths]: `purchases.${number}.${P}`;
362
- }[PurchasedItemNonNullablePaths]>>;
363
- /**
364
- * Triggers Wix to call the
365
- * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
366
- *
367
- *
368
- * Wix doesn't use the response from _List Charges_ SPI to actually create an
369
- * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
370
- * allows you confirm that your integration with the Custom Charges SPI is
371
- * working as intended.
372
- * @internal
373
- * @documentationMaturity preview
374
- * @permissionId WIX_DEVELOPERS.METERED_BILLING_CHARGES_READ
375
- * @permissionScope Manage Your App
376
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
377
- * @permissionScope Read site, business, and email details
378
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
379
- * @applicableIdentity APP
380
- * @fqn com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges
381
- */
382
- export declare function getMeteredBillingCharges(options?: GetMeteredBillingChargesOptions): Promise<NonNullablePaths<GetMeteredBillingChargesResponse, `charges` | `charges.${number}.description` | `charges.${number}.amount`>>;
383
- export interface GetMeteredBillingChargesOptions {
384
- /**
385
- * 3-letter currency code in
386
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
387
- * @format CURRENCY
388
- */
389
- currency?: string | null;
390
- /**
391
- * Start of the period you want to retrieve the custom charges for in
392
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
393
- */
394
- startDate?: Date | null;
395
- /**
396
- * End of the period you want to retrieve the custom charges for in
397
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
398
- */
399
- endDate?: Date | null;
400
- }
401
- export {};
@@ -1,178 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';
4
- export var PaymentCycle;
5
- (function (PaymentCycle) {
6
- PaymentCycle["NO_CYCLE"] = "NO_CYCLE";
7
- PaymentCycle["MONTHLY"] = "MONTHLY";
8
- PaymentCycle["YEARLY"] = "YEARLY";
9
- PaymentCycle["ONE_TIME"] = "ONE_TIME";
10
- PaymentCycle["TWO_YEARS"] = "TWO_YEARS";
11
- PaymentCycle["THREE_YEARS"] = "THREE_YEARS";
12
- PaymentCycle["FOUR_YEARS"] = "FOUR_YEARS";
13
- PaymentCycle["FIVE_YEARS"] = "FIVE_YEARS";
14
- })(PaymentCycle || (PaymentCycle = {}));
15
- export var InvoiceStatus;
16
- (function (InvoiceStatus) {
17
- InvoiceStatus["UNKNOWN_INVOICE_STATUS"] = "UNKNOWN_INVOICE_STATUS";
18
- InvoiceStatus["PAYMENT_FAILED"] = "PAYMENT_FAILED";
19
- InvoiceStatus["PAID"] = "PAID";
20
- InvoiceStatus["REFUNDED"] = "REFUNDED";
21
- InvoiceStatus["VOIDED"] = "VOIDED";
22
- InvoiceStatus["CHARGEDBACK"] = "CHARGEDBACK";
23
- })(InvoiceStatus || (InvoiceStatus = {}));
24
- export var WebhookIdentityType;
25
- (function (WebhookIdentityType) {
26
- WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
27
- WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
28
- WebhookIdentityType["MEMBER"] = "MEMBER";
29
- WebhookIdentityType["WIX_USER"] = "WIX_USER";
30
- WebhookIdentityType["APP"] = "APP";
31
- })(WebhookIdentityType || (WebhookIdentityType = {}));
32
- /**
33
- * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
34
- *
35
- *
36
- * This call succeeds only in case you have previously
37
- * [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).
38
- *
39
- * The returned checkout URL is valid for 48 hours.
40
- *
41
- * This API allows your app to manage your pricing page outside of Wix while
42
- * still using the standard Wix checkout flow.
43
- * @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
44
- * for a list of your app's supported product IDs.
45
- * @public
46
- * @requiredField productId
47
- * @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT
48
- * @permissionScope Manage Your App
49
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
50
- * @permissionScope Read site, business, and email details
51
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
52
- * @applicableIdentity APP
53
- * @fqn com.wixpress.market.aim.api.Checkout.GetUrl
54
- */
55
- export async function getUrl(productId, options) {
56
- // @ts-ignore
57
- const { httpClient, sideEffects } = arguments[2];
58
- const payload = renameKeysFromSDKRequestToRESTRequest({
59
- productId: productId,
60
- successUrl: options?.successUrl,
61
- testCheckout: options?.testCheckout,
62
- billingCycle: options?.billingCycle,
63
- countryCode: options?.countryCode,
64
- languageCode: options?.languageCode,
65
- couponCode: options?.couponCode,
66
- });
67
- const reqOpts = ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(payload);
68
- sideEffects?.onSiteCall?.();
69
- try {
70
- const result = await httpClient.request(reqOpts);
71
- sideEffects?.onSuccess?.(result);
72
- return renameKeysFromRESTResponseToSDKResponse(result.data);
73
- }
74
- catch (err) {
75
- const transformedError = sdkTransformError(err, {
76
- spreadPathsToArguments: {},
77
- explicitPathsToArguments: {
78
- productId: '$[0]',
79
- successUrl: '$[1].successUrl',
80
- testCheckout: '$[1].testCheckout',
81
- billingCycle: '$[1].billingCycle',
82
- countryCode: '$[1].countryCode',
83
- languageCode: '$[1].languageCode',
84
- couponCode: '$[1].couponCode',
85
- },
86
- singleArgumentUnchanged: false,
87
- }, ['productId', 'options']);
88
- sideEffects?.onError?.(err);
89
- throw transformedError;
90
- }
91
- }
92
- /**
93
- * Retrieves a list of the site owner's past purchases for your app.
94
- *
95
- *
96
- * You don't have to explicitly pass an identifier for the Wix site as part of
97
- * the request, since this information is taken automatically from the context.
98
- *
99
- * The response doesn't include any details about cancellations.
100
- * @public
101
- * @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY
102
- * @permissionScope Manage Your App
103
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
104
- * @permissionScope Read site, business, and email details
105
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
106
- * @applicableIdentity APP
107
- * @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory
108
- */
109
- export async function getPurchaseHistory() {
110
- // @ts-ignore
111
- const { httpClient, sideEffects } = arguments[0];
112
- const payload = renameKeysFromSDKRequestToRESTRequest({});
113
- const reqOpts = ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);
114
- sideEffects?.onSiteCall?.();
115
- try {
116
- const result = await httpClient.request(reqOpts);
117
- sideEffects?.onSuccess?.(result);
118
- return renameKeysFromRESTResponseToSDKResponse(result.data);
119
- }
120
- catch (err) {
121
- const transformedError = sdkTransformError(err, {
122
- spreadPathsToArguments: {},
123
- explicitPathsToArguments: {},
124
- singleArgumentUnchanged: false,
125
- }, []);
126
- sideEffects?.onError?.(err);
127
- throw transformedError;
128
- }
129
- }
130
- /**
131
- * Triggers Wix to call the
132
- * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
133
- *
134
- *
135
- * Wix doesn't use the response from _List Charges_ SPI to actually create an
136
- * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
137
- * allows you confirm that your integration with the Custom Charges SPI is
138
- * working as intended.
139
- * @internal
140
- * @documentationMaturity preview
141
- * @permissionId WIX_DEVELOPERS.METERED_BILLING_CHARGES_READ
142
- * @permissionScope Manage Your App
143
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
144
- * @permissionScope Read site, business, and email details
145
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
146
- * @applicableIdentity APP
147
- * @fqn com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges
148
- */
149
- export async function getMeteredBillingCharges(options) {
150
- // @ts-ignore
151
- const { httpClient, sideEffects } = arguments[1];
152
- const payload = renameKeysFromSDKRequestToRESTRequest({
153
- currency: options?.currency,
154
- startDate: options?.startDate,
155
- endDate: options?.endDate,
156
- });
157
- const reqOpts = ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(payload);
158
- sideEffects?.onSiteCall?.();
159
- try {
160
- const result = await httpClient.request(reqOpts);
161
- sideEffects?.onSuccess?.(result);
162
- return renameKeysFromRESTResponseToSDKResponse(result.data);
163
- }
164
- catch (err) {
165
- const transformedError = sdkTransformError(err, {
166
- spreadPathsToArguments: {},
167
- explicitPathsToArguments: {
168
- currency: '$[0].currency',
169
- startDate: '$[0].startDate',
170
- endDate: '$[0].endDate',
171
- },
172
- singleArgumentUnchanged: false,
173
- }, ['options']);
174
- sideEffects?.onError?.(err);
175
- throw transformedError;
176
- }
177
- }
178
- //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.universal.js","sourceRoot":"","sources":["../../../../src/devcenter-checkout-v1-purchased-item-billing.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,6CAA6C,MAAM,wDAAwD,CAAC;AAqBxH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC3B,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAmBD,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kEAAiD,CAAA;IACjD,kDAAiC,CAAA;IACjC,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AA4MD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAgDD;;;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