@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,4 +1,4 @@
1
- interface PurchasedItem {
1
+ export interface PurchasedItem {
2
2
  /** ID of your app's paid plan. */
3
3
  productId?: string;
4
4
  /** Price of your app's paid plan. For example, `9.95`. */
@@ -16,7 +16,7 @@ interface PurchasedItem {
16
16
  */
17
17
  dateCreated?: Date | null;
18
18
  }
19
- declare enum PaymentCycle {
19
+ export declare enum PaymentCycle {
20
20
  NO_CYCLE = "NO_CYCLE",
21
21
  MONTHLY = "MONTHLY",
22
22
  YEARLY = "YEARLY",
@@ -26,7 +26,7 @@ declare enum PaymentCycle {
26
26
  FOUR_YEARS = "FOUR_YEARS",
27
27
  FIVE_YEARS = "FIVE_YEARS"
28
28
  }
29
- interface InvoiceStatusUpdated {
29
+ export interface InvoiceStatusUpdated {
30
30
  /** Invoice payment status. */
31
31
  status?: InvoiceStatus;
32
32
  /**
@@ -42,7 +42,7 @@ interface InvoiceStatusUpdated {
42
42
  /** Whether the invoice is for a single payment or for multiple, recurring payments. */
43
43
  recurring?: boolean;
44
44
  }
45
- declare enum InvoiceStatus {
45
+ export declare enum InvoiceStatus {
46
46
  UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
47
47
  PAYMENT_FAILED = "PAYMENT_FAILED",
48
48
  PAID = "PAID",
@@ -50,7 +50,7 @@ declare enum InvoiceStatus {
50
50
  VOIDED = "VOIDED",
51
51
  CHARGEDBACK = "CHARGEDBACK"
52
52
  }
53
- interface GetUrlRequest {
53
+ export interface GetUrlRequest {
54
54
  /**
55
55
  * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
56
56
  * for a list of your app's supported product IDs.
@@ -88,7 +88,7 @@ interface GetUrlRequest {
88
88
  /** Coupon code for the paid plan. Available only in case there is a discount. */
89
89
  couponCode?: string | null;
90
90
  }
91
- interface ChargeOverride {
91
+ export interface ChargeOverride {
92
92
  /**
93
93
  * Override price. In case you omit the override price, Wix charges site
94
94
  * owners the app's default price that's configured in the Pricing page of your app's dashboard.
@@ -100,7 +100,7 @@ interface ChargeOverride {
100
100
  */
101
101
  currency?: string;
102
102
  }
103
- interface GetUrlResponse {
103
+ export interface GetUrlResponse {
104
104
  /**
105
105
  * URL for the Wix checkout page.
106
106
  * @format WEB_URL
@@ -113,15 +113,15 @@ interface GetUrlResponse {
113
113
  */
114
114
  token?: string | null;
115
115
  }
116
- interface GetPurchaseHistoryRequest {
116
+ export interface GetPurchaseHistoryRequest {
117
117
  }
118
- interface GetPurchaseHistoryResponse {
118
+ export interface GetPurchaseHistoryResponse {
119
119
  /** Retrieved purchases the site owners have completed for you app. */
120
120
  purchases?: PurchasedItem[];
121
121
  }
122
- interface GetSitePaymentMethodsStatusRequest {
122
+ export interface GetSitePaymentMethodsStatusRequest {
123
123
  }
124
- interface GetSitePaymentMethodsStatusResponse {
124
+ export interface GetSitePaymentMethodsStatusResponse {
125
125
  /**
126
126
  * Whether the site owners have enabled at least a single online payment method.
127
127
  * Online payment methods include Wix Payments, Stripe, PayPal, and credit
@@ -142,7 +142,7 @@ interface GetSitePaymentMethodsStatusResponse {
142
142
  */
143
143
  thirdPartyPosProviderEnabled?: boolean;
144
144
  }
145
- interface GetMeteredBillingChargesRequest {
145
+ export interface GetMeteredBillingChargesRequest {
146
146
  /**
147
147
  * 3-letter currency code in
148
148
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -160,13 +160,13 @@ interface GetMeteredBillingChargesRequest {
160
160
  */
161
161
  endDate?: Date | null;
162
162
  }
163
- interface GetMeteredBillingChargesResponse {
163
+ export interface GetMeteredBillingChargesResponse {
164
164
  /** List of retrieved custom charges. */
165
165
  charges?: Charge[];
166
166
  }
167
- interface Charge {
167
+ export interface Charge {
168
168
  /** ID of the custom charge. The ID consists of 64 characters. */
169
- _id?: string | null;
169
+ id?: string | null;
170
170
  /** Description of the custom charge. */
171
171
  description?: string;
172
172
  /**
@@ -178,7 +178,7 @@ interface Charge {
178
178
  */
179
179
  amount?: string;
180
180
  }
181
- interface MessageEnvelope {
181
+ export interface MessageEnvelope {
182
182
  /**
183
183
  * App instance ID.
184
184
  * @format GUID
@@ -194,7 +194,7 @@ interface MessageEnvelope {
194
194
  /** Stringify payload. */
195
195
  data?: string;
196
196
  }
197
- interface IdentificationData extends IdentificationDataIdOneOf {
197
+ export interface IdentificationData extends IdentificationDataIdOneOf {
198
198
  /**
199
199
  * ID of a site visitor that has not logged in to the site.
200
200
  * @format GUID
@@ -219,7 +219,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
219
219
  identityType?: WebhookIdentityType;
220
220
  }
221
221
  /** @oneof */
222
- interface IdentificationDataIdOneOf {
222
+ export interface IdentificationDataIdOneOf {
223
223
  /**
224
224
  * ID of a site visitor that has not logged in to the site.
225
225
  * @format GUID
@@ -241,81 +241,10 @@ interface IdentificationDataIdOneOf {
241
241
  */
242
242
  appId?: string;
243
243
  }
244
- declare enum WebhookIdentityType {
244
+ export declare enum WebhookIdentityType {
245
245
  UNKNOWN = "UNKNOWN",
246
246
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
247
247
  MEMBER = "MEMBER",
248
248
  WIX_USER = "WIX_USER",
249
249
  APP = "APP"
250
250
  }
251
- interface BaseEventMetadata {
252
- /**
253
- * App instance ID.
254
- * @format GUID
255
- */
256
- instanceId?: string | null;
257
- /**
258
- * Event type.
259
- * @maxLength 150
260
- */
261
- eventType?: string;
262
- /** The identification type and identity data. */
263
- identity?: IdentificationData;
264
- }
265
- interface PurchasedItemInvoiceStatusUpdatedEnvelope {
266
- data: InvoiceStatusUpdated;
267
- metadata: BaseEventMetadata;
268
- }
269
- interface GetUrlOptions {
270
- /**
271
- * URL for the Wix checkout page. Redirect site owners to this URL after
272
- * they've successfully purchased a paid plan for your app.
273
- * @format WEB_URL
274
- */
275
- successUrl?: string | null;
276
- /**
277
- * Whether the checkout is for testing purposes only. Testing is mainly
278
- * relevant for in-app purchase flows. When `true`, Wix charges the site
279
- * owners an amount of `0.00`.
280
- */
281
- testCheckout?: boolean;
282
- /** Information about the paid plan's billing cycle. */
283
- billingCycle?: PaymentCycle;
284
- /**
285
- * 2-letter country code in
286
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
287
- * format.
288
- *
289
- * Default: `"US"`
290
- */
291
- countryCode?: string | null;
292
- /**
293
- * 2-letter language code in
294
- * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
295
- *
296
- * Default: `"EN"`
297
- */
298
- languageCode?: string | null;
299
- /** Coupon code for the paid plan. Available only in case there is a discount. */
300
- couponCode?: string | null;
301
- }
302
- interface GetMeteredBillingChargesOptions {
303
- /**
304
- * 3-letter currency code in
305
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
306
- * @format CURRENCY
307
- */
308
- currency?: string | null;
309
- /**
310
- * Start of the period you want to retrieve the custom charges for in
311
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
312
- */
313
- startDate?: Date | null;
314
- /**
315
- * End of the period you want to retrieve the custom charges for in
316
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
317
- */
318
- endDate?: Date | null;
319
- }
320
-
321
- export { type BaseEventMetadata as B, type ChargeOverride as C, type GetUrlOptions as G, InvoiceStatus as I, type MessageEnvelope as M, PaymentCycle as P, WebhookIdentityType as W, type GetUrlResponse as a, type GetPurchaseHistoryResponse as b, type GetMeteredBillingChargesOptions as c, type GetMeteredBillingChargesResponse as d, type PurchasedItem as e, type InvoiceStatusUpdated as f, type GetUrlRequest as g, type GetPurchaseHistoryRequest as h, type GetSitePaymentMethodsStatusRequest as i, type GetSitePaymentMethodsStatusResponse as j, type GetMeteredBillingChargesRequest as k, type Charge as l, type IdentificationData as m, type IdentificationDataIdOneOf as n, type PurchasedItemInvoiceStatusUpdatedEnvelope as o };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.InvoiceStatus = exports.PaymentCycle = void 0;
4
+ 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 || (exports.PaymentCycle = PaymentCycle = {}));
15
+ 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 || (exports.InvoiceStatus = InvoiceStatus = {}));
24
+ 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 || (exports.WebhookIdentityType = WebhookIdentityType = {}));
32
+ //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.types.js","sourceRoot":"","sources":["../../../src/devcenter-checkout-v1-purchased-item-billing.types.ts"],"names":[],"mappings":";;;AAmBA,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,4BAAZ,YAAY,QASvB;AAmBD,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,6BAAb,aAAa,QAOxB;AA4MD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
@@ -1,4 +1,5 @@
1
- interface PurchasedItem {
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface PurchasedItem {
2
3
  /** ID of your app's paid plan. */
3
4
  productId?: string;
4
5
  /** Price of your app's paid plan. For example, `9.95`. */
@@ -16,7 +17,7 @@ interface PurchasedItem {
16
17
  */
17
18
  dateCreated?: Date | null;
18
19
  }
19
- declare enum PaymentCycle {
20
+ export declare enum PaymentCycle {
20
21
  NO_CYCLE = "NO_CYCLE",
21
22
  MONTHLY = "MONTHLY",
22
23
  YEARLY = "YEARLY",
@@ -26,7 +27,7 @@ declare enum PaymentCycle {
26
27
  FOUR_YEARS = "FOUR_YEARS",
27
28
  FIVE_YEARS = "FIVE_YEARS"
28
29
  }
29
- interface InvoiceStatusUpdated {
30
+ export interface InvoiceStatusUpdated {
30
31
  /** Invoice payment status. */
31
32
  status?: InvoiceStatus;
32
33
  /**
@@ -42,7 +43,7 @@ interface InvoiceStatusUpdated {
42
43
  /** Whether the invoice is for a single payment or for multiple, recurring payments. */
43
44
  recurring?: boolean;
44
45
  }
45
- declare enum InvoiceStatus {
46
+ export declare enum InvoiceStatus {
46
47
  UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
47
48
  PAYMENT_FAILED = "PAYMENT_FAILED",
48
49
  PAID = "PAID",
@@ -50,7 +51,7 @@ declare enum InvoiceStatus {
50
51
  VOIDED = "VOIDED",
51
52
  CHARGEDBACK = "CHARGEDBACK"
52
53
  }
53
- interface GetUrlRequest {
54
+ export interface GetUrlRequest {
54
55
  /**
55
56
  * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
56
57
  * for a list of your app's supported product IDs.
@@ -88,7 +89,7 @@ interface GetUrlRequest {
88
89
  /** Coupon code for the paid plan. Available only in case there is a discount. */
89
90
  couponCode?: string | null;
90
91
  }
91
- interface ChargeOverride {
92
+ export interface ChargeOverride {
92
93
  /**
93
94
  * Override price. In case you omit the override price, Wix charges site
94
95
  * owners the app's default price that's configured in the Pricing page of your app's dashboard.
@@ -100,7 +101,7 @@ interface ChargeOverride {
100
101
  */
101
102
  currency?: string;
102
103
  }
103
- interface GetUrlResponse {
104
+ export interface GetUrlResponse {
104
105
  /**
105
106
  * URL for the Wix checkout page.
106
107
  * @format WEB_URL
@@ -113,15 +114,15 @@ interface GetUrlResponse {
113
114
  */
114
115
  token?: string | null;
115
116
  }
116
- interface GetPurchaseHistoryRequest {
117
+ export interface GetPurchaseHistoryRequest {
117
118
  }
118
- interface GetPurchaseHistoryResponse {
119
+ export interface GetPurchaseHistoryResponse {
119
120
  /** Retrieved purchases the site owners have completed for you app. */
120
121
  purchases?: PurchasedItem[];
121
122
  }
122
- interface GetSitePaymentMethodsStatusRequest {
123
+ export interface GetSitePaymentMethodsStatusRequest {
123
124
  }
124
- interface GetSitePaymentMethodsStatusResponse {
125
+ export interface GetSitePaymentMethodsStatusResponse {
125
126
  /**
126
127
  * Whether the site owners have enabled at least a single online payment method.
127
128
  * Online payment methods include Wix Payments, Stripe, PayPal, and credit
@@ -142,7 +143,7 @@ interface GetSitePaymentMethodsStatusResponse {
142
143
  */
143
144
  thirdPartyPosProviderEnabled?: boolean;
144
145
  }
145
- interface GetMeteredBillingChargesRequest {
146
+ export interface GetMeteredBillingChargesRequest {
146
147
  /**
147
148
  * 3-letter currency code in
148
149
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -160,11 +161,11 @@ interface GetMeteredBillingChargesRequest {
160
161
  */
161
162
  endDate?: Date | null;
162
163
  }
163
- interface GetMeteredBillingChargesResponse {
164
+ export interface GetMeteredBillingChargesResponse {
164
165
  /** List of retrieved custom charges. */
165
166
  charges?: Charge[];
166
167
  }
167
- interface Charge {
168
+ export interface Charge {
168
169
  /** ID of the custom charge. The ID consists of 64 characters. */
169
170
  _id?: string | null;
170
171
  /** Description of the custom charge. */
@@ -178,7 +179,7 @@ interface Charge {
178
179
  */
179
180
  amount?: string;
180
181
  }
181
- interface MessageEnvelope {
182
+ export interface MessageEnvelope {
182
183
  /**
183
184
  * App instance ID.
184
185
  * @format GUID
@@ -194,7 +195,7 @@ interface MessageEnvelope {
194
195
  /** Stringify payload. */
195
196
  data?: string;
196
197
  }
197
- interface IdentificationData extends IdentificationDataIdOneOf {
198
+ export interface IdentificationData extends IdentificationDataIdOneOf {
198
199
  /**
199
200
  * ID of a site visitor that has not logged in to the site.
200
201
  * @format GUID
@@ -219,7 +220,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
219
220
  identityType?: WebhookIdentityType;
220
221
  }
221
222
  /** @oneof */
222
- interface IdentificationDataIdOneOf {
223
+ export interface IdentificationDataIdOneOf {
223
224
  /**
224
225
  * ID of a site visitor that has not logged in to the site.
225
226
  * @format GUID
@@ -241,14 +242,14 @@ interface IdentificationDataIdOneOf {
241
242
  */
242
243
  appId?: string;
243
244
  }
244
- declare enum WebhookIdentityType {
245
+ export declare enum WebhookIdentityType {
245
246
  UNKNOWN = "UNKNOWN",
246
247
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
247
248
  MEMBER = "MEMBER",
248
249
  WIX_USER = "WIX_USER",
249
250
  APP = "APP"
250
251
  }
251
- interface BaseEventMetadata {
252
+ export interface BaseEventMetadata {
252
253
  /**
253
254
  * App instance ID.
254
255
  * @format GUID
@@ -262,11 +263,51 @@ interface BaseEventMetadata {
262
263
  /** The identification type and identity data. */
263
264
  identity?: IdentificationData;
264
265
  }
265
- interface PurchasedItemInvoiceStatusUpdatedEnvelope {
266
+ export interface PurchasedItemInvoiceStatusUpdatedEnvelope {
266
267
  data: InvoiceStatusUpdated;
267
268
  metadata: BaseEventMetadata;
268
269
  }
269
- interface GetUrlOptions {
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 {
270
311
  /**
271
312
  * URL for the Wix checkout page. Redirect site owners to this URL after
272
313
  * they've successfully purchased a paid plan for your app.
@@ -299,7 +340,27 @@ interface GetUrlOptions {
299
340
  /** Coupon code for the paid plan. Available only in case there is a discount. */
300
341
  couponCode?: string | null;
301
342
  }
302
- interface GetMeteredBillingChargesOptions {
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
+ export interface GetMeteredBillingChargesOptions {
303
364
  /**
304
365
  * 3-letter currency code in
305
366
  * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
@@ -317,5 +378,4 @@ interface GetMeteredBillingChargesOptions {
317
378
  */
318
379
  endDate?: Date | null;
319
380
  }
320
-
321
- export { type BaseEventMetadata as B, type ChargeOverride as C, type GetUrlOptions as G, InvoiceStatus as I, type MessageEnvelope as M, PaymentCycle as P, WebhookIdentityType as W, type GetUrlResponse as a, type GetPurchaseHistoryResponse as b, type PurchasedItem as c, type InvoiceStatusUpdated as d, type GetUrlRequest as e, type GetPurchaseHistoryRequest as f, type GetSitePaymentMethodsStatusRequest as g, type GetSitePaymentMethodsStatusResponse as h, type GetMeteredBillingChargesRequest as i, type GetMeteredBillingChargesResponse as j, type Charge as k, type IdentificationData as l, type IdentificationDataIdOneOf as m, type PurchasedItemInvoiceStatusUpdatedEnvelope as n, type GetMeteredBillingChargesOptions as o };
381
+ export {};