@wix/auto_sdk_app-management_billing 1.0.14 → 1.0.16

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 (134) hide show
  1. package/build/{es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts → devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.d.mts} +27 -87
  2. package/build/{cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts → devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.d.ts} +27 -87
  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-0VctJpJS.d.mts} +93 -22
  10. package/build/{es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts → internal/devcenter-checkout-v1-purchased-item-billing.universal-0VctJpJS.d.ts} +93 -22
  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 +141 -0
  18. package/build/internal/meta.d.ts +141 -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 +141 -0
  24. package/build/meta.d.ts +141 -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/package.json +0 -3
  65. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -14
  66. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -16
  67. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  68. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  69. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -178
  70. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  71. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  72. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -56
  73. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  74. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -38
  75. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -23
  76. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  77. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -29
  78. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  79. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -178
  80. package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -16
  91. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -22
  92. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  93. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  94. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -184
  95. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  96. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  97. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -85
  98. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  99. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -53
  100. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -32
  101. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  102. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +0 -256
  103. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -32
  104. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  105. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +0 -407
  106. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -207
  107. package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
  108. package/build/internal/es/index.d.ts +0 -1
  109. package/build/internal/es/index.js +0 -2
  110. package/build/internal/es/index.js.map +0 -1
  111. package/build/internal/es/index.typings.d.ts +0 -1
  112. package/build/internal/es/index.typings.js +0 -2
  113. package/build/internal/es/index.typings.js.map +0 -1
  114. package/build/internal/es/meta.d.ts +0 -1
  115. package/build/internal/es/meta.js +0 -2
  116. package/build/internal/es/meta.js.map +0 -1
  117. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +0 -16
  118. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +0 -16
  119. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +0 -1
  120. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +0 -35
  121. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +0 -178
  122. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +0 -1
  123. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +0 -15
  124. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +0 -56
  125. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +0 -1
  126. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +0 -53
  127. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +0 -23
  128. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +0 -1
  129. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +0 -256
  130. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +0 -29
  131. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +0 -1
  132. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +0 -407
  133. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +0 -178
  134. package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +0 -1
@@ -1,5 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface PurchasedItem {
1
+ interface PurchasedItem {
3
2
  /** ID of your app's paid plan. */
4
3
  productId?: string;
5
4
  /** Price of your app's paid plan. For example, `9.95`. */
@@ -17,7 +16,7 @@ export interface PurchasedItem {
17
16
  */
18
17
  dateCreated?: Date | null;
19
18
  }
20
- export declare enum PaymentCycle {
19
+ declare enum PaymentCycle {
21
20
  NO_CYCLE = "NO_CYCLE",
22
21
  MONTHLY = "MONTHLY",
23
22
  YEARLY = "YEARLY",
@@ -28,8 +27,8 @@ export declare enum PaymentCycle {
28
27
  FIVE_YEARS = "FIVE_YEARS"
29
28
  }
30
29
  /** @enumType */
31
- export type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
32
- export interface InvoiceStatusUpdated {
30
+ type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
31
+ interface InvoiceStatusUpdated {
33
32
  /** Invoice payment status. */
34
33
  status?: InvoiceStatusWithLiterals;
35
34
  /**
@@ -45,7 +44,7 @@ export interface InvoiceStatusUpdated {
45
44
  /** Whether the invoice is for a single payment or for multiple, recurring payments. */
46
45
  recurring?: boolean;
47
46
  }
48
- export declare enum InvoiceStatus {
47
+ declare enum InvoiceStatus {
49
48
  UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
50
49
  PAYMENT_FAILED = "PAYMENT_FAILED",
51
50
  PAID = "PAID",
@@ -54,8 +53,8 @@ export declare enum InvoiceStatus {
54
53
  CHARGEDBACK = "CHARGEDBACK"
55
54
  }
56
55
  /** @enumType */
57
- export type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
58
- export interface GetUrlRequest {
56
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
57
+ interface GetUrlRequest {
59
58
  /**
60
59
  * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
61
60
  * for a list of your app's supported product IDs.
@@ -93,7 +92,7 @@ export interface GetUrlRequest {
93
92
  /** Coupon code for the paid plan. Available only in case there is a discount. */
94
93
  couponCode?: string | null;
95
94
  }
96
- export interface ChargeOverride {
95
+ interface ChargeOverride {
97
96
  /**
98
97
  * Override price. In case you omit the override price, Wix charges site
99
98
  * owners the app's default price that's configured in the Pricing page of your app's dashboard.
@@ -105,7 +104,7 @@ export interface ChargeOverride {
105
104
  */
106
105
  currency?: string;
107
106
  }
108
- export interface GetUrlResponse {
107
+ interface GetUrlResponse {
109
108
  /**
110
109
  * URL for the Wix checkout page.
111
110
  * @format WEB_URL
@@ -118,15 +117,15 @@ export interface GetUrlResponse {
118
117
  */
119
118
  token?: string | null;
120
119
  }
121
- export interface GetPurchaseHistoryRequest {
120
+ interface GetPurchaseHistoryRequest {
122
121
  }
123
- export interface GetPurchaseHistoryResponse {
122
+ interface GetPurchaseHistoryResponse {
124
123
  /** Retrieved purchases the site owners have completed for you app. */
125
124
  purchases?: PurchasedItem[];
126
125
  }
127
- export interface GetSitePaymentMethodsStatusRequest {
126
+ interface GetSitePaymentMethodsStatusRequest {
128
127
  }
129
- export interface GetSitePaymentMethodsStatusResponse {
128
+ interface GetSitePaymentMethodsStatusResponse {
130
129
  /**
131
130
  * Whether the site owners have enabled at least a single online payment method.
132
131
  * Online payment methods include Wix Payments, Stripe, PayPal, and credit
@@ -147,7 +146,7 @@ export interface GetSitePaymentMethodsStatusResponse {
147
146
  */
148
147
  thirdPartyPosProviderEnabled?: boolean;
149
148
  }
150
- export interface GetMeteredBillingChargesRequest {
149
+ interface GetMeteredBillingChargesRequest {
151
150
  /**
152
151
  * 3-letter currency code in
153
152
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -165,11 +164,11 @@ export interface GetMeteredBillingChargesRequest {
165
164
  */
166
165
  endDate?: Date | null;
167
166
  }
168
- export interface GetMeteredBillingChargesResponse {
167
+ interface GetMeteredBillingChargesResponse {
169
168
  /** List of retrieved custom charges. */
170
169
  charges?: Charge[];
171
170
  }
172
- export interface Charge {
171
+ interface Charge {
173
172
  /** ID of the custom charge. The ID consists of 64 characters. */
174
173
  _id?: string | null;
175
174
  /** Description of the custom charge. */
@@ -183,7 +182,7 @@ export interface Charge {
183
182
  */
184
183
  amount?: string;
185
184
  }
186
- export interface MessageEnvelope {
185
+ interface MessageEnvelope {
187
186
  /**
188
187
  * App instance ID.
189
188
  * @format GUID
@@ -199,7 +198,7 @@ export interface MessageEnvelope {
199
198
  /** Stringify payload. */
200
199
  data?: string;
201
200
  }
202
- export interface IdentificationData extends IdentificationDataIdOneOf {
201
+ interface IdentificationData extends IdentificationDataIdOneOf {
203
202
  /**
204
203
  * ID of a site visitor that has not logged in to the site.
205
204
  * @format GUID
@@ -224,7 +223,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
224
223
  identityType?: WebhookIdentityTypeWithLiterals;
225
224
  }
226
225
  /** @oneof */
227
- export interface IdentificationDataIdOneOf {
226
+ interface IdentificationDataIdOneOf {
228
227
  /**
229
228
  * ID of a site visitor that has not logged in to the site.
230
229
  * @format GUID
@@ -246,7 +245,7 @@ export interface IdentificationDataIdOneOf {
246
245
  */
247
246
  appId?: string;
248
247
  }
249
- export declare enum WebhookIdentityType {
248
+ declare enum WebhookIdentityType {
250
249
  UNKNOWN = "UNKNOWN",
251
250
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
252
251
  MEMBER = "MEMBER",
@@ -254,8 +253,8 @@ export declare enum WebhookIdentityType {
254
253
  APP = "APP"
255
254
  }
256
255
  /** @enumType */
257
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
258
- export interface BaseEventMetadata {
256
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
257
+ interface BaseEventMetadata {
259
258
  /**
260
259
  * App instance ID.
261
260
  * @format GUID
@@ -269,51 +268,11 @@ export interface BaseEventMetadata {
269
268
  /** The identification type and identity data. */
270
269
  identity?: IdentificationData;
271
270
  }
272
- export interface PurchasedItemInvoiceStatusUpdatedEnvelope {
271
+ interface PurchasedItemInvoiceStatusUpdatedEnvelope {
273
272
  data: InvoiceStatusUpdated;
274
273
  metadata: BaseEventMetadata;
275
274
  }
276
- /**
277
- * Triggered when there is an update to the payment status of an invoice.
278
- * 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.
279
- * 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).
280
- * @permissionScope Manage Your App
281
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
282
- * @permissionScope Read site, business, and email details
283
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
284
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
285
- * @webhook
286
- * @eventType InvoiceStatusUpdated
287
- * @serviceIdentifier com.wixpress.market.aim.api.Checkout
288
- * @slug invoice_status_updated
289
- */
290
- export declare function onPurchasedItemInvoiceStatusUpdated(handler: (event: PurchasedItemInvoiceStatusUpdatedEnvelope) => void | Promise<void>): void;
291
- type PurchasedItemNonNullablePaths = `productId` | `price` | `currency` | `billingCycle`;
292
- /**
293
- * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
294
- *
295
- *
296
- * This call succeeds only in case you have previously
297
- * [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).
298
- *
299
- * The returned checkout URL is valid for 48 hours.
300
- *
301
- * This API allows your app to manage your pricing page outside of Wix while
302
- * still using the standard Wix checkout flow.
303
- * @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
304
- * for a list of your app's supported product IDs.
305
- * @public
306
- * @requiredField productId
307
- * @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT
308
- * @permissionScope Manage Your App
309
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
310
- * @permissionScope Read site, business, and email details
311
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
312
- * @applicableIdentity APP
313
- * @fqn com.wixpress.market.aim.api.Checkout.GetUrl
314
- */
315
- export declare function getUrl(productId: string, options?: GetUrlOptions): Promise<NonNullablePaths<GetUrlResponse, `checkoutUrl`>>;
316
- export interface GetUrlOptions {
275
+ interface GetUrlOptions {
317
276
  /**
318
277
  * URL for the Wix checkout page. Redirect site owners to this URL after
319
278
  * they've successfully purchased a paid plan for your app.
@@ -346,27 +305,7 @@ export interface GetUrlOptions {
346
305
  /** Coupon code for the paid plan. Available only in case there is a discount. */
347
306
  couponCode?: string | null;
348
307
  }
349
- /**
350
- * Retrieves a list of the site owner's past purchases for your app.
351
- *
352
- *
353
- * You don't have to explicitly pass an identifier for the Wix site as part of
354
- * the request, since this information is taken automatically from the context.
355
- *
356
- * The response doesn't include any details about cancellations.
357
- * @public
358
- * @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY
359
- * @permissionScope Manage Your App
360
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
361
- * @permissionScope Read site, business, and email details
362
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
363
- * @applicableIdentity APP
364
- * @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory
365
- */
366
- export declare function getPurchaseHistory(): Promise<NonNullablePaths<GetPurchaseHistoryResponse, {
367
- [P in PurchasedItemNonNullablePaths]: `purchases.${number}.${P}`;
368
- }[PurchasedItemNonNullablePaths]>>;
369
- export interface GetMeteredBillingChargesOptions {
308
+ interface GetMeteredBillingChargesOptions {
370
309
  /**
371
310
  * 3-letter currency code in
372
311
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -384,4 +323,5 @@ export interface GetMeteredBillingChargesOptions {
384
323
  */
385
324
  endDate?: Date | null;
386
325
  }
387
- export {};
326
+
327
+ export { type BaseEventMetadata as B, type ChargeOverride as C, type GetUrlOptions as G, InvoiceStatus as I, type MessageEnvelope as M, type PurchasedItemInvoiceStatusUpdatedEnvelope as P, WebhookIdentityType as W, type GetUrlResponse as a, type GetPurchaseHistoryResponse as b, PaymentCycle as c, type PurchasedItem as d, type InvoiceStatusUpdated as e, type GetUrlRequest as f, type GetPurchaseHistoryRequest as g, type GetSitePaymentMethodsStatusRequest as h, type GetSitePaymentMethodsStatusResponse as i, type GetMeteredBillingChargesRequest as j, type GetMeteredBillingChargesResponse as k, type Charge as l, type IdentificationData as m, type IdentificationDataIdOneOf as n, type GetMeteredBillingChargesOptions as o };
@@ -1,5 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface PurchasedItem {
1
+ interface PurchasedItem {
3
2
  /** ID of your app's paid plan. */
4
3
  productId?: string;
5
4
  /** Price of your app's paid plan. For example, `9.95`. */
@@ -17,7 +16,7 @@ export interface PurchasedItem {
17
16
  */
18
17
  dateCreated?: Date | null;
19
18
  }
20
- export declare enum PaymentCycle {
19
+ declare enum PaymentCycle {
21
20
  NO_CYCLE = "NO_CYCLE",
22
21
  MONTHLY = "MONTHLY",
23
22
  YEARLY = "YEARLY",
@@ -28,8 +27,8 @@ export declare enum PaymentCycle {
28
27
  FIVE_YEARS = "FIVE_YEARS"
29
28
  }
30
29
  /** @enumType */
31
- export type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
32
- export interface InvoiceStatusUpdated {
30
+ type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
31
+ interface InvoiceStatusUpdated {
33
32
  /** Invoice payment status. */
34
33
  status?: InvoiceStatusWithLiterals;
35
34
  /**
@@ -45,7 +44,7 @@ export interface InvoiceStatusUpdated {
45
44
  /** Whether the invoice is for a single payment or for multiple, recurring payments. */
46
45
  recurring?: boolean;
47
46
  }
48
- export declare enum InvoiceStatus {
47
+ declare enum InvoiceStatus {
49
48
  UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
50
49
  PAYMENT_FAILED = "PAYMENT_FAILED",
51
50
  PAID = "PAID",
@@ -54,8 +53,8 @@ export declare enum InvoiceStatus {
54
53
  CHARGEDBACK = "CHARGEDBACK"
55
54
  }
56
55
  /** @enumType */
57
- export type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
58
- export interface GetUrlRequest {
56
+ type InvoiceStatusWithLiterals = InvoiceStatus | 'UNKNOWN_INVOICE_STATUS' | 'PAYMENT_FAILED' | 'PAID' | 'REFUNDED' | 'VOIDED' | 'CHARGEDBACK';
57
+ interface GetUrlRequest {
59
58
  /**
60
59
  * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
61
60
  * for a list of your app's supported product IDs.
@@ -93,7 +92,7 @@ export interface GetUrlRequest {
93
92
  /** Coupon code for the paid plan. Available only in case there is a discount. */
94
93
  couponCode?: string | null;
95
94
  }
96
- export interface ChargeOverride {
95
+ interface ChargeOverride {
97
96
  /**
98
97
  * Override price. In case you omit the override price, Wix charges site
99
98
  * owners the app's default price that's configured in the Pricing page of your app's dashboard.
@@ -105,7 +104,7 @@ export interface ChargeOverride {
105
104
  */
106
105
  currency?: string;
107
106
  }
108
- export interface GetUrlResponse {
107
+ interface GetUrlResponse {
109
108
  /**
110
109
  * URL for the Wix checkout page.
111
110
  * @format WEB_URL
@@ -118,15 +117,15 @@ export interface GetUrlResponse {
118
117
  */
119
118
  token?: string | null;
120
119
  }
121
- export interface GetPurchaseHistoryRequest {
120
+ interface GetPurchaseHistoryRequest {
122
121
  }
123
- export interface GetPurchaseHistoryResponse {
122
+ interface GetPurchaseHistoryResponse {
124
123
  /** Retrieved purchases the site owners have completed for you app. */
125
124
  purchases?: PurchasedItem[];
126
125
  }
127
- export interface GetSitePaymentMethodsStatusRequest {
126
+ interface GetSitePaymentMethodsStatusRequest {
128
127
  }
129
- export interface GetSitePaymentMethodsStatusResponse {
128
+ interface GetSitePaymentMethodsStatusResponse {
130
129
  /**
131
130
  * Whether the site owners have enabled at least a single online payment method.
132
131
  * Online payment methods include Wix Payments, Stripe, PayPal, and credit
@@ -147,7 +146,7 @@ export interface GetSitePaymentMethodsStatusResponse {
147
146
  */
148
147
  thirdPartyPosProviderEnabled?: boolean;
149
148
  }
150
- export interface GetMeteredBillingChargesRequest {
149
+ interface GetMeteredBillingChargesRequest {
151
150
  /**
152
151
  * 3-letter currency code in
153
152
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -165,11 +164,11 @@ export interface GetMeteredBillingChargesRequest {
165
164
  */
166
165
  endDate?: Date | null;
167
166
  }
168
- export interface GetMeteredBillingChargesResponse {
167
+ interface GetMeteredBillingChargesResponse {
169
168
  /** List of retrieved custom charges. */
170
169
  charges?: Charge[];
171
170
  }
172
- export interface Charge {
171
+ interface Charge {
173
172
  /** ID of the custom charge. The ID consists of 64 characters. */
174
173
  _id?: string | null;
175
174
  /** Description of the custom charge. */
@@ -183,7 +182,7 @@ export interface Charge {
183
182
  */
184
183
  amount?: string;
185
184
  }
186
- export interface MessageEnvelope {
185
+ interface MessageEnvelope {
187
186
  /**
188
187
  * App instance ID.
189
188
  * @format GUID
@@ -199,7 +198,7 @@ export interface MessageEnvelope {
199
198
  /** Stringify payload. */
200
199
  data?: string;
201
200
  }
202
- export interface IdentificationData extends IdentificationDataIdOneOf {
201
+ interface IdentificationData extends IdentificationDataIdOneOf {
203
202
  /**
204
203
  * ID of a site visitor that has not logged in to the site.
205
204
  * @format GUID
@@ -224,7 +223,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
224
223
  identityType?: WebhookIdentityTypeWithLiterals;
225
224
  }
226
225
  /** @oneof */
227
- export interface IdentificationDataIdOneOf {
226
+ interface IdentificationDataIdOneOf {
228
227
  /**
229
228
  * ID of a site visitor that has not logged in to the site.
230
229
  * @format GUID
@@ -246,7 +245,7 @@ export interface IdentificationDataIdOneOf {
246
245
  */
247
246
  appId?: string;
248
247
  }
249
- export declare enum WebhookIdentityType {
248
+ declare enum WebhookIdentityType {
250
249
  UNKNOWN = "UNKNOWN",
251
250
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
252
251
  MEMBER = "MEMBER",
@@ -254,8 +253,8 @@ export declare enum WebhookIdentityType {
254
253
  APP = "APP"
255
254
  }
256
255
  /** @enumType */
257
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
258
- export interface BaseEventMetadata {
256
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
257
+ interface BaseEventMetadata {
259
258
  /**
260
259
  * App instance ID.
261
260
  * @format GUID
@@ -269,51 +268,11 @@ export interface BaseEventMetadata {
269
268
  /** The identification type and identity data. */
270
269
  identity?: IdentificationData;
271
270
  }
272
- export interface PurchasedItemInvoiceStatusUpdatedEnvelope {
271
+ interface PurchasedItemInvoiceStatusUpdatedEnvelope {
273
272
  data: InvoiceStatusUpdated;
274
273
  metadata: BaseEventMetadata;
275
274
  }
276
- /**
277
- * Triggered when there is an update to the payment status of an invoice.
278
- * 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.
279
- * 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).
280
- * @permissionScope Manage Your App
281
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
282
- * @permissionScope Read site, business, and email details
283
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
284
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
285
- * @webhook
286
- * @eventType InvoiceStatusUpdated
287
- * @serviceIdentifier com.wixpress.market.aim.api.Checkout
288
- * @slug invoice_status_updated
289
- */
290
- export declare function onPurchasedItemInvoiceStatusUpdated(handler: (event: PurchasedItemInvoiceStatusUpdatedEnvelope) => void | Promise<void>): void;
291
- type PurchasedItemNonNullablePaths = `productId` | `price` | `currency` | `billingCycle`;
292
- /**
293
- * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
294
- *
295
- *
296
- * This call succeeds only in case you have previously
297
- * [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).
298
- *
299
- * The returned checkout URL is valid for 48 hours.
300
- *
301
- * This API allows your app to manage your pricing page outside of Wix while
302
- * still using the standard Wix checkout flow.
303
- * @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
304
- * for a list of your app's supported product IDs.
305
- * @public
306
- * @requiredField productId
307
- * @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT
308
- * @permissionScope Manage Your App
309
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
310
- * @permissionScope Read site, business, and email details
311
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
312
- * @applicableIdentity APP
313
- * @fqn com.wixpress.market.aim.api.Checkout.GetUrl
314
- */
315
- export declare function getUrl(productId: string, options?: GetUrlOptions): Promise<NonNullablePaths<GetUrlResponse, `checkoutUrl`>>;
316
- export interface GetUrlOptions {
275
+ interface GetUrlOptions {
317
276
  /**
318
277
  * URL for the Wix checkout page. Redirect site owners to this URL after
319
278
  * they've successfully purchased a paid plan for your app.
@@ -346,27 +305,7 @@ export interface GetUrlOptions {
346
305
  /** Coupon code for the paid plan. Available only in case there is a discount. */
347
306
  couponCode?: string | null;
348
307
  }
349
- /**
350
- * Retrieves a list of the site owner's past purchases for your app.
351
- *
352
- *
353
- * You don't have to explicitly pass an identifier for the Wix site as part of
354
- * the request, since this information is taken automatically from the context.
355
- *
356
- * The response doesn't include any details about cancellations.
357
- * @public
358
- * @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY
359
- * @permissionScope Manage Your App
360
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
361
- * @permissionScope Read site, business, and email details
362
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
363
- * @applicableIdentity APP
364
- * @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory
365
- */
366
- export declare function getPurchaseHistory(): Promise<NonNullablePaths<GetPurchaseHistoryResponse, {
367
- [P in PurchasedItemNonNullablePaths]: `purchases.${number}.${P}`;
368
- }[PurchasedItemNonNullablePaths]>>;
369
- export interface GetMeteredBillingChargesOptions {
308
+ interface GetMeteredBillingChargesOptions {
370
309
  /**
371
310
  * 3-letter currency code in
372
311
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -384,4 +323,5 @@ export interface GetMeteredBillingChargesOptions {
384
323
  */
385
324
  endDate?: Date | null;
386
325
  }
387
- export {};
326
+
327
+ export { type BaseEventMetadata as B, type ChargeOverride as C, type GetUrlOptions as G, InvoiceStatus as I, type MessageEnvelope as M, type PurchasedItemInvoiceStatusUpdatedEnvelope as P, WebhookIdentityType as W, type GetUrlResponse as a, type GetPurchaseHistoryResponse as b, PaymentCycle as c, type PurchasedItem as d, type InvoiceStatusUpdated as e, type GetUrlRequest as f, type GetPurchaseHistoryRequest as g, type GetSitePaymentMethodsStatusRequest as h, type GetSitePaymentMethodsStatusResponse as i, type GetMeteredBillingChargesRequest as j, type GetMeteredBillingChargesResponse as k, type Charge as l, type IdentificationData as m, type IdentificationDataIdOneOf as n, type GetMeteredBillingChargesOptions as o };
@@ -0,0 +1,47 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { G as GetUrlOptions, a as GetUrlResponse, b as GetPurchaseHistoryResponse, P as PurchasedItemInvoiceStatusUpdatedEnvelope } from './devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.mjs';
3
+ export { B as BaseEventMetadata, l as Charge, C as ChargeOverride, o as GetMeteredBillingChargesOptions, j as GetMeteredBillingChargesRequest, k as GetMeteredBillingChargesResponse, g as GetPurchaseHistoryRequest, h as GetSitePaymentMethodsStatusRequest, i as GetSitePaymentMethodsStatusResponse, f as GetUrlRequest, m as IdentificationData, n as IdentificationDataIdOneOf, I as InvoiceStatus, e as InvoiceStatusUpdated, M as MessageEnvelope, c as PaymentCycle, d as PurchasedItem, W as WebhookIdentityType } from './devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.mjs';
4
+
5
+ declare function getUrl$1(httpClient: HttpClient): GetUrlSignature;
6
+ interface GetUrlSignature {
7
+ /**
8
+ * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
9
+ *
10
+ *
11
+ * This call succeeds only in case you have previously
12
+ * [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).
13
+ *
14
+ * The returned checkout URL is valid for 48 hours.
15
+ *
16
+ * This API allows your app to manage your pricing page outside of Wix while
17
+ * still using the standard Wix checkout flow.
18
+ * @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
19
+ * for a list of your app's supported product IDs.
20
+ */
21
+ (productId: string, options?: GetUrlOptions | undefined): Promise<GetUrlResponse>;
22
+ }
23
+ declare function getPurchaseHistory$1(httpClient: HttpClient): GetPurchaseHistorySignature;
24
+ interface GetPurchaseHistorySignature {
25
+ /**
26
+ * Retrieves a list of the site owner's past purchases for your app.
27
+ *
28
+ *
29
+ * You don't have to explicitly pass an identifier for the Wix site as part of
30
+ * the request, since this information is taken automatically from the context.
31
+ *
32
+ * The response doesn't include any details about cancellations.
33
+ */
34
+ (): Promise<GetPurchaseHistoryResponse>;
35
+ }
36
+ declare const onPurchasedItemInvoiceStatusUpdated$1: EventDefinition<PurchasedItemInvoiceStatusUpdatedEnvelope, "InvoiceStatusUpdated">;
37
+
38
+ declare const getUrl: MaybeContext<BuildRESTFunction<typeof getUrl$1> & typeof getUrl$1>;
39
+ declare const getPurchaseHistory: MaybeContext<BuildRESTFunction<typeof getPurchaseHistory$1> & typeof getPurchaseHistory$1>;
40
+ /**
41
+ * Triggered when there is an update to the payment status of an invoice.
42
+ * 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.
43
+ * 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).
44
+ */
45
+ declare const onPurchasedItemInvoiceStatusUpdated: BuildEventDefinition<typeof onPurchasedItemInvoiceStatusUpdated$1>;
46
+
47
+ export { GetPurchaseHistoryResponse, GetUrlOptions, GetUrlResponse, PurchasedItemInvoiceStatusUpdatedEnvelope, getPurchaseHistory, getUrl, onPurchasedItemInvoiceStatusUpdated };
@@ -0,0 +1,47 @@
1
+ import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { G as GetUrlOptions, a as GetUrlResponse, b as GetPurchaseHistoryResponse, P as PurchasedItemInvoiceStatusUpdatedEnvelope } from './devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.js';
3
+ export { B as BaseEventMetadata, l as Charge, C as ChargeOverride, o as GetMeteredBillingChargesOptions, j as GetMeteredBillingChargesRequest, k as GetMeteredBillingChargesResponse, g as GetPurchaseHistoryRequest, h as GetSitePaymentMethodsStatusRequest, i as GetSitePaymentMethodsStatusResponse, f as GetUrlRequest, m as IdentificationData, n as IdentificationDataIdOneOf, I as InvoiceStatus, e as InvoiceStatusUpdated, M as MessageEnvelope, c as PaymentCycle, d as PurchasedItem, W as WebhookIdentityType } from './devcenter-checkout-v1-purchased-item-billing.universal-BOJl75V0.js';
4
+
5
+ declare function getUrl$1(httpClient: HttpClient): GetUrlSignature;
6
+ interface GetUrlSignature {
7
+ /**
8
+ * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
9
+ *
10
+ *
11
+ * This call succeeds only in case you have previously
12
+ * [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).
13
+ *
14
+ * The returned checkout URL is valid for 48 hours.
15
+ *
16
+ * This API allows your app to manage your pricing page outside of Wix while
17
+ * still using the standard Wix checkout flow.
18
+ * @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
19
+ * for a list of your app's supported product IDs.
20
+ */
21
+ (productId: string, options?: GetUrlOptions | undefined): Promise<GetUrlResponse>;
22
+ }
23
+ declare function getPurchaseHistory$1(httpClient: HttpClient): GetPurchaseHistorySignature;
24
+ interface GetPurchaseHistorySignature {
25
+ /**
26
+ * Retrieves a list of the site owner's past purchases for your app.
27
+ *
28
+ *
29
+ * You don't have to explicitly pass an identifier for the Wix site as part of
30
+ * the request, since this information is taken automatically from the context.
31
+ *
32
+ * The response doesn't include any details about cancellations.
33
+ */
34
+ (): Promise<GetPurchaseHistoryResponse>;
35
+ }
36
+ declare const onPurchasedItemInvoiceStatusUpdated$1: EventDefinition<PurchasedItemInvoiceStatusUpdatedEnvelope, "InvoiceStatusUpdated">;
37
+
38
+ declare const getUrl: MaybeContext<BuildRESTFunction<typeof getUrl$1> & typeof getUrl$1>;
39
+ declare const getPurchaseHistory: MaybeContext<BuildRESTFunction<typeof getPurchaseHistory$1> & typeof getPurchaseHistory$1>;
40
+ /**
41
+ * Triggered when there is an update to the payment status of an invoice.
42
+ * 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.
43
+ * 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).
44
+ */
45
+ declare const onPurchasedItemInvoiceStatusUpdated: BuildEventDefinition<typeof onPurchasedItemInvoiceStatusUpdated$1>;
46
+
47
+ export { GetPurchaseHistoryResponse, GetUrlOptions, GetUrlResponse, PurchasedItemInvoiceStatusUpdatedEnvelope, getPurchaseHistory, getUrl, onPurchasedItemInvoiceStatusUpdated };