@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
@@ -0,0 +1,16 @@
1
+ import { getUrl as publicGetUrl, getPurchaseHistory as publicGetPurchaseHistory, getMeteredBillingCharges as publicGetMeteredBillingCharges, } from './devcenter-checkout-v1-purchased-item-billing.public.js';
2
+ import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
3
+ import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
4
+ import { onPurchasedItemInvoiceStatusUpdated as publicOnPurchasedItemInvoiceStatusUpdated } from './devcenter-checkout-v1-purchased-item-billing.public.js';
5
+ export const getUrl = /*#__PURE__*/ createRESTModule(publicGetUrl);
6
+ export const getPurchaseHistory = /*#__PURE__*/ createRESTModule(publicGetPurchaseHistory);
7
+ /** @internal */
8
+ export const getMeteredBillingCharges = /*#__PURE__*/ createRESTModule(publicGetMeteredBillingCharges);
9
+ /**
10
+ * Triggered when there is an update to the payment status of an invoice.
11
+ * 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.
12
+ * 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).
13
+ */
14
+ export const onPurchasedItemInvoiceStatusUpdated = createEventModule(publicOnPurchasedItemInvoiceStatusUpdated);
15
+ export { PaymentCycle, InvoiceStatus, WebhookIdentityType, } from './devcenter-checkout-v1-purchased-item-billing.universal.js';
16
+ //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.context.js","sourceRoot":"","sources":["../../../../src/devcenter-checkout-v1-purchased-item-billing.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,kBAAkB,IAAI,wBAAwB,EAC9C,wBAAwB,IAAI,8BAA8B,GAC3D,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,mCAAmC,IAAI,yCAAyC,EAAE,MAAM,0DAA0D,CAAC;AAE5J,MAAM,CAAC,MAAM,MAAM,GAEf,aAAa,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAG3B,aAAa,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAC7D,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAGjC,aAAa,CAAC,gBAAgB,CAAC,8BAA8B,CAAC,CAAC;AACnE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAE5C,iBAAiB,CAAC,yCAAyC,CAAC,CAAC;AAEjE,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,6DAA6D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ /**
3
+ * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
4
+ *
5
+ *
6
+ * This call succeeds only in case you have previously
7
+ * [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).
8
+ *
9
+ * The returned checkout URL is valid for 48 hours.
10
+ *
11
+ * This API allows your app to manage your pricing page outside of Wix while
12
+ * still using the standard Wix checkout flow.
13
+ */
14
+ export declare function getUrl(payload: object): RequestOptionsFactory<any>;
15
+ /**
16
+ * Retrieves a list of the site owner's past purchases for your app.
17
+ *
18
+ *
19
+ * You don't have to explicitly pass an identifier for the Wix site as part of
20
+ * the request, since this information is taken automatically from the context.
21
+ *
22
+ * The response doesn't include any details about cancellations.
23
+ */
24
+ export declare function getPurchaseHistory(payload: object): RequestOptionsFactory<any>;
25
+ /**
26
+ * Triggers Wix to call the
27
+ * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
28
+ *
29
+ *
30
+ * Wix doesn't use the response from _List Charges_ SPI to actually create an
31
+ * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
32
+ * allows you confirm that your integration with the Custom Charges SPI is
33
+ * working as intended.
34
+ */
35
+ export declare function getMeteredBillingCharges(payload: object): RequestOptionsFactory<any>;
@@ -0,0 +1,178 @@
1
+ import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
2
+ import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
4
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
6
+ import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
7
+ function resolveComWixpressMarketAimApiCheckoutUrl(opts) {
8
+ const domainToMappings = {
9
+ 'api._api_base_domain_': [
10
+ {
11
+ srcPath: '/app-instance-manager-webapp',
12
+ destPath: '',
13
+ },
14
+ ],
15
+ 'www.wixapis.com': [
16
+ {
17
+ srcPath: '/apps',
18
+ destPath: '',
19
+ },
20
+ ],
21
+ 'wixapis.com': [
22
+ {
23
+ srcPath: '/apps',
24
+ destPath: '',
25
+ },
26
+ ],
27
+ 'dev._base_domain_': [
28
+ {
29
+ srcPath: '/_api/app-instance-manager',
30
+ destPath: '',
31
+ },
32
+ {
33
+ srcPath: '/api/v1/instance',
34
+ destPath: '/v1/instance',
35
+ },
36
+ {
37
+ srcPath: '/api/v1/scripts',
38
+ destPath: '/v1/scripts',
39
+ },
40
+ ],
41
+ 'manage._base_domain_': [
42
+ {
43
+ srcPath: '/_api/app-instance-manager',
44
+ destPath: '',
45
+ },
46
+ ],
47
+ 'www._base_domain_': [
48
+ {
49
+ srcPath: '/_api/app-instance-manager',
50
+ destPath: '',
51
+ },
52
+ ],
53
+ 'editor._base_domain_': [
54
+ {
55
+ srcPath: '/_api/app-instance-manager',
56
+ destPath: '',
57
+ },
58
+ ],
59
+ 'blocks._base_domain_': [
60
+ {
61
+ srcPath: '/_api/app-instance-manager',
62
+ destPath: '',
63
+ },
64
+ ],
65
+ 'create.editorx': [
66
+ {
67
+ srcPath: '/_api/app-instance-manager',
68
+ destPath: '',
69
+ },
70
+ ],
71
+ };
72
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
73
+ }
74
+ const PACKAGE_NAME = '@wix/auto_sdk_app-management_billing';
75
+ /**
76
+ * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
77
+ *
78
+ *
79
+ * This call succeeds only in case you have previously
80
+ * [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).
81
+ *
82
+ * The returned checkout URL is valid for 48 hours.
83
+ *
84
+ * This API allows your app to manage your pricing page outside of Wix while
85
+ * still using the standard Wix checkout flow.
86
+ */
87
+ export function getUrl(payload) {
88
+ function __getUrl({ host }) {
89
+ const serializedData = transformPaths(payload, [
90
+ {
91
+ transformFn: transformSDKFloatToRESTFloat,
92
+ paths: [{ path: 'chargeOverride.price' }],
93
+ },
94
+ ]);
95
+ const metadata = {
96
+ entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',
97
+ method: 'POST',
98
+ methodFqn: 'com.wixpress.market.aim.api.Checkout.GetUrl',
99
+ packageName: PACKAGE_NAME,
100
+ url: resolveComWixpressMarketAimApiCheckoutUrl({
101
+ protoPath: '/v1/checkout',
102
+ data: serializedData,
103
+ host,
104
+ }),
105
+ data: serializedData,
106
+ };
107
+ return metadata;
108
+ }
109
+ return __getUrl;
110
+ }
111
+ /**
112
+ * Retrieves a list of the site owner's past purchases for your app.
113
+ *
114
+ *
115
+ * You don't have to explicitly pass an identifier for the Wix site as part of
116
+ * the request, since this information is taken automatically from the context.
117
+ *
118
+ * The response doesn't include any details about cancellations.
119
+ */
120
+ export function getPurchaseHistory(payload) {
121
+ function __getPurchaseHistory({ host }) {
122
+ const metadata = {
123
+ entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',
124
+ method: 'GET',
125
+ methodFqn: 'com.wixpress.market.aim.api.Checkout.GetPurchaseHistory',
126
+ packageName: PACKAGE_NAME,
127
+ url: resolveComWixpressMarketAimApiCheckoutUrl({
128
+ protoPath: '/v1/checkout/history',
129
+ data: payload,
130
+ host,
131
+ }),
132
+ params: toURLSearchParams(payload),
133
+ transformResponse: (payload) => transformPaths(payload, [
134
+ {
135
+ transformFn: transformRESTTimestampToSDKTimestamp,
136
+ paths: [{ path: 'purchases.dateCreated' }],
137
+ },
138
+ ]),
139
+ };
140
+ return metadata;
141
+ }
142
+ return __getPurchaseHistory;
143
+ }
144
+ /**
145
+ * Triggers Wix to call the
146
+ * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
147
+ *
148
+ *
149
+ * Wix doesn't use the response from _List Charges_ SPI to actually create an
150
+ * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
151
+ * allows you confirm that your integration with the Custom Charges SPI is
152
+ * working as intended.
153
+ */
154
+ export function getMeteredBillingCharges(payload) {
155
+ function __getMeteredBillingCharges({ host }) {
156
+ const serializedData = transformPaths(payload, [
157
+ {
158
+ transformFn: transformSDKTimestampToRESTTimestamp,
159
+ paths: [{ path: 'startDate' }, { path: 'endDate' }],
160
+ },
161
+ ]);
162
+ const metadata = {
163
+ entityFqdn: 'wix.devcenter.checkout.v1.purchased_item',
164
+ method: 'GET',
165
+ methodFqn: 'com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges',
166
+ packageName: PACKAGE_NAME,
167
+ url: resolveComWixpressMarketAimApiCheckoutUrl({
168
+ protoPath: '/v1/metered-billing-charges',
169
+ data: serializedData,
170
+ host,
171
+ }),
172
+ params: toURLSearchParams(serializedData),
173
+ };
174
+ return metadata;
175
+ }
176
+ return __getMeteredBillingCharges;
177
+ }
178
+ //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.http.js","sourceRoot":"","sources":["../../../../src/devcenter-checkout-v1-purchased-item-billing.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,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IAAI,EAAE,uBAAuB,EAAE,CAAC;iBAC3C;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAe;IAEf,SAAS,0BAA0B,CAAC,EAAE,IAAI,EAAO;QAC/C,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,EAAE;YAC7C;gBACE,WAAW,EAAE,oCAAoC;gBACjD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;aACpD;SACF,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,0CAA0C;YACtD,MAAM,EAAE,KAAY;YACpB,SAAS,EACP,+DAA+D;YACjE,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,yCAAyC,CAAC;gBAC7C,SAAS,EAAE,6BAA6B;gBACxC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,MAAM,EAAE,iBAAiB,CAAC,cAAc,CAAC;SAC1C,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,0BAA0B,CAAC;AACpC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as ambassadorWixDevcenterCheckoutV1PurchasedItemTypes from './devcenter-checkout-v1-purchased-item-billing.types.js';
2
+ import * as ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes from './devcenter-checkout-v1-purchased-item-billing.universal.js';
3
+ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
+ getUrl: (context: any) => string;
5
+ httpMethod: K;
6
+ path: string;
7
+ pathParams: M;
8
+ __requestType: T;
9
+ __originalRequestType: S;
10
+ __responseType: Q;
11
+ __originalResponseType: R;
12
+ };
13
+ export declare function getUrl(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetUrlResponse, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetUrlResponse>;
14
+ export declare function getPurchaseHistory(): __PublicMethodMetaInfo<'GET', {}, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetPurchaseHistoryResponse, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetPurchaseHistoryResponse>;
15
+ export declare function getMeteredBillingCharges(): __PublicMethodMetaInfo<'GET', {}, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesRequest, ambassadorWixDevcenterCheckoutV1PurchasedItemUniversalTypes.GetMeteredBillingChargesResponse, ambassadorWixDevcenterCheckoutV1PurchasedItemTypes.GetMeteredBillingChargesResponse>;
@@ -0,0 +1,56 @@
1
+ import * as ambassadorWixDevcenterCheckoutV1PurchasedItem from './devcenter-checkout-v1-purchased-item-billing.http.js';
2
+ export function getUrl() {
3
+ const payload = {};
4
+ const getRequestOptions = ambassadorWixDevcenterCheckoutV1PurchasedItem.getUrl(payload);
5
+ const getUrl = (context) => {
6
+ const { url } = getRequestOptions(context);
7
+ return url;
8
+ };
9
+ return {
10
+ getUrl,
11
+ httpMethod: 'POST',
12
+ path: '/v1/checkout',
13
+ pathParams: {},
14
+ __requestType: null,
15
+ __originalRequestType: null,
16
+ __responseType: null,
17
+ __originalResponseType: null,
18
+ };
19
+ }
20
+ export function getPurchaseHistory() {
21
+ const payload = {};
22
+ const getRequestOptions = ambassadorWixDevcenterCheckoutV1PurchasedItem.getPurchaseHistory(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'GET',
30
+ path: '/v1/checkout/history',
31
+ pathParams: {},
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
38
+ export function getMeteredBillingCharges() {
39
+ const payload = {};
40
+ const getRequestOptions = ambassadorWixDevcenterCheckoutV1PurchasedItem.getMeteredBillingCharges(payload);
41
+ const getUrl = (context) => {
42
+ const { url } = getRequestOptions(context);
43
+ return url;
44
+ };
45
+ return {
46
+ getUrl,
47
+ httpMethod: 'GET',
48
+ path: '/v1/metered-billing-charges',
49
+ pathParams: {},
50
+ __requestType: null,
51
+ __originalRequestType: null,
52
+ __responseType: null,
53
+ __originalResponseType: null,
54
+ };
55
+ }
56
+ //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.meta.js","sourceRoot":"","sources":["../../../../src/devcenter-checkout-v1-purchased-item-billing.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,6CAA6C,MAAM,wDAAwD,CAAC;AAsBxH,MAAM,UAAU,MAAM;IAQpB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,6CAA6C,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEhE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE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urchaseHistoryResponse, GetUrlOptions, GetUrlResponse, PurchasedItemInvoiceStatusUpdatedEnvelope } from './devcenter-checkout-v1-purchased-item-billing.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function getUrl(httpClient: HttpClient): GetUrlSignature;
7
+ interface GetUrlSignature {
8
+ /**
9
+ * Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
10
+ *
11
+ *
12
+ * This call succeeds only in case you have previously
13
+ * [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).
14
+ *
15
+ * The returned checkout URL is valid for 48 hours.
16
+ *
17
+ * This API allows your app to manage your pricing page outside of Wix while
18
+ * still using the standard Wix checkout flow.
19
+ * @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
20
+ * for a list of your app's supported product IDs.
21
+ */
22
+ (productId: string, options?: GetUrlOptions | undefined): Promise<GetUrlResponse>;
23
+ }
24
+ export declare function getPurchaseHistory(httpClient: HttpClient): GetPurchaseHistorySignature;
25
+ interface GetPurchaseHistorySignature {
26
+ /**
27
+ * Retrieves a list of the site owner's past purchases for your app.
28
+ *
29
+ *
30
+ * You don't have to explicitly pass an identifier for the Wix site as part of
31
+ * the request, since this information is taken automatically from the context.
32
+ *
33
+ * The response doesn't include any details about cancellations.
34
+ */
35
+ (): Promise<GetPurchaseHistoryResponse>;
36
+ }
37
+ /** @internal */
38
+ export declare function getMeteredBillingCharges(httpClient: HttpClient): GetMeteredBillingChargesSignature;
39
+ interface GetMeteredBillingChargesSignature {
40
+ /**
41
+ * Triggers Wix to call the
42
+ * [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
43
+ *
44
+ *
45
+ * Wix doesn't use the response from _List Charges_ SPI to actually create an
46
+ * invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
47
+ * allows you confirm that your integration with the Custom Charges SPI is
48
+ * working as intended.
49
+ */
50
+ (options?: GetMeteredBillingChargesOptions | undefined): Promise<GetMeteredBillingChargesResponse>;
51
+ }
52
+ export declare const onPurchasedItemInvoiceStatusUpdated: EventDefinition<PurchasedItemInvoiceStatusUpdatedEnvelope, "InvoiceStatusUpdated">;
53
+ export { BaseEventMetadata, Charge, ChargeOverride, GetMeteredBillingChargesOptions, GetMeteredBillingChargesRequest, GetMeteredBillingChargesResponse, GetPurchaseHistoryRequest, GetPurchaseHistoryResponse, GetSitePaymentMethodsStatusRequest, GetSitePaymentMethodsStatusResponse, GetUrlOptions, GetUrlRequest, GetUrlResponse, IdentificationData, IdentificationDataIdOneOf, InvoiceStatus, InvoiceStatusUpdated, MessageEnvelope, PaymentCycle, PurchasedItem, PurchasedItemInvoiceStatusUpdatedEnvelope, WebhookIdentityType, } from './devcenter-checkout-v1-purchased-item-billing.universal.js';
@@ -0,0 +1,23 @@
1
+ import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
2
+ import { EventDefinition } from '@wix/sdk-types';
3
+ import { getMeteredBillingCharges as universalGetMeteredBillingCharges, getPurchaseHistory as universalGetPurchaseHistory, getUrl as universalGetUrl, } from './devcenter-checkout-v1-purchased-item-billing.universal.js';
4
+ export const __metadata = { PACKAGE_NAME: '@wix/app-management' };
5
+ export function getUrl(httpClient) {
6
+ return (productId, options) => universalGetUrl(productId, options,
7
+ // @ts-ignore
8
+ { httpClient });
9
+ }
10
+ export function getPurchaseHistory(httpClient) {
11
+ return () => universalGetPurchaseHistory(
12
+ // @ts-ignore
13
+ { httpClient });
14
+ }
15
+ /** @internal */
16
+ export function getMeteredBillingCharges(httpClient) {
17
+ return (options) => universalGetMeteredBillingCharges(options,
18
+ // @ts-ignore
19
+ { httpClient });
20
+ }
21
+ export const onPurchasedItemInvoiceStatusUpdated = EventDefinition('InvoiceStatusUpdated', false, (event) => renameKeysFromRESTResponseToSDKResponse(event))();
22
+ export { InvoiceStatus, PaymentCycle, WebhookIdentityType, } from './devcenter-checkout-v1-purchased-item-billing.universal.js';
23
+ //# sourceMappingURL=devcenter-checkout-v1-purchased-item-billing.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcenter-checkout-v1-purchased-item-billing.public.js","sourceRoot":"","sources":["../../../../src/devcenter-checkout-v1-purchased-item-billing.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAOL,wBAAwB,IAAI,iCAAiC,EAC7D,kBAAkB,IAAI,2BAA2B,EACjD,MAAM,IAAI,eAAe,GAC1B,MAAM,6DAA6D,CAAC;AAErE,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC;AAElE,MAAM,UAAU,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,SAAiB,EAAE,OAAuB,EAAE,EAAE,CACpD,eAAe,CACb,SAAS,EACT,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAuBD,MAAM,UAAU,kBAAkB,CAChC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,2BAA2B;IACzB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAeD,gBAAgB;AAChB,MAAM,UAAU,wBAAwB,CACtC,UAAsB;IAEtB,OAAO,CAAC,OAAyC,EAAE,EAAE,CACnD,iCAAiC,CAC/B,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAkBD,MAAM,CAAC,MAAM,mCAAmC,GAAG,eAAe,CAChE,sBAAsB,EACtB,KAAK,EACL,CAAC,KAAgD,EAAE,EAAE,CACnD,uCAAuC,CAAC,KAAK,CAAC,CACjD,EAA6C,CAAC;AAE/C,OAAO,EAgBL,aAAa,EAGb,YAAY,EAGZ,mBAAmB,GACpB,MAAM,6DAA6D,CAAC"}
@@ -0,0 +1,250 @@
1
+ export interface PurchasedItem {
2
+ /** ID of your app's paid plan. */
3
+ productId?: string;
4
+ /** Price of your app's paid plan. For example, `9.95`. */
5
+ price?: string;
6
+ /**
7
+ * 3-letter currency code in
8
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
9
+ */
10
+ currency?: string;
11
+ /** Information about the billing cycle for your app's paid plan. */
12
+ billingCycle?: PaymentCycle;
13
+ /**
14
+ * Date and time the site onwers have purchased your app's paid plan in
15
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
16
+ */
17
+ dateCreated?: Date | null;
18
+ }
19
+ export declare enum PaymentCycle {
20
+ NO_CYCLE = "NO_CYCLE",
21
+ MONTHLY = "MONTHLY",
22
+ YEARLY = "YEARLY",
23
+ ONE_TIME = "ONE_TIME",
24
+ TWO_YEARS = "TWO_YEARS",
25
+ THREE_YEARS = "THREE_YEARS",
26
+ FOUR_YEARS = "FOUR_YEARS",
27
+ FIVE_YEARS = "FIVE_YEARS"
28
+ }
29
+ export interface InvoiceStatusUpdated {
30
+ /** Invoice payment status. */
31
+ status?: InvoiceStatus;
32
+ /**
33
+ * Wix Premium invoice ID.
34
+ * @maxLength 50
35
+ */
36
+ invoiceId?: string;
37
+ /**
38
+ * App instance ID - a unique ID assigned to each app in each site.
39
+ * @format GUID
40
+ */
41
+ instanceId?: string | null;
42
+ /** Whether the invoice is for a single payment or for multiple, recurring payments. */
43
+ recurring?: boolean;
44
+ }
45
+ export declare enum InvoiceStatus {
46
+ UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
47
+ PAYMENT_FAILED = "PAYMENT_FAILED",
48
+ PAID = "PAID",
49
+ REFUNDED = "REFUNDED",
50
+ VOIDED = "VOIDED",
51
+ CHARGEDBACK = "CHARGEDBACK"
52
+ }
53
+ export interface GetUrlRequest {
54
+ /**
55
+ * ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
56
+ * for a list of your app's supported product IDs.
57
+ */
58
+ productId: string;
59
+ /**
60
+ * URL for the Wix checkout page. Redirect site owners to this URL after
61
+ * they've successfully purchased a paid plan for your app.
62
+ * @format WEB_URL
63
+ */
64
+ successUrl?: string | null;
65
+ /**
66
+ * Whether the checkout is for testing purposes only. Testing is mainly
67
+ * relevant for in-app purchase flows. When `true`, Wix charges the site
68
+ * owners an amount of `0.00`.
69
+ */
70
+ testCheckout?: boolean;
71
+ /** Information about the paid plan's billing cycle. */
72
+ billingCycle?: PaymentCycle;
73
+ /**
74
+ * 2-letter country code in
75
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
76
+ * format.
77
+ *
78
+ * Default: `"US"`
79
+ */
80
+ countryCode?: string | null;
81
+ /**
82
+ * 2-letter language code in
83
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
84
+ *
85
+ * Default: `"EN"`
86
+ */
87
+ languageCode?: string | null;
88
+ /** Coupon code for the paid plan. Available only in case there is a discount. */
89
+ couponCode?: string | null;
90
+ }
91
+ export interface ChargeOverride {
92
+ /**
93
+ * Override price. In case you omit the override price, Wix charges site
94
+ * owners the app's default price that's configured in the Pricing page of your app's dashboard.
95
+ */
96
+ price?: number;
97
+ /**
98
+ * Override 3-letter currency code in
99
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
100
+ */
101
+ currency?: string;
102
+ }
103
+ export interface GetUrlResponse {
104
+ /**
105
+ * URL for the Wix checkout page.
106
+ * @format WEB_URL
107
+ */
108
+ checkoutUrl?: string;
109
+ /**
110
+ * Token for the Wix checkout page. The token holds all data about the order
111
+ * you're creating a checkout for. It is [signed](),
112
+ * so you can verify that it comes from Wix.
113
+ */
114
+ token?: string | null;
115
+ }
116
+ export interface GetPurchaseHistoryRequest {
117
+ }
118
+ export interface GetPurchaseHistoryResponse {
119
+ /** Retrieved purchases the site owners have completed for you app. */
120
+ purchases?: PurchasedItem[];
121
+ }
122
+ export interface GetSitePaymentMethodsStatusRequest {
123
+ }
124
+ export interface GetSitePaymentMethodsStatusResponse {
125
+ /**
126
+ * Whether the site owners have enabled at least a single online payment method.
127
+ * Online payment methods include Wix Payments, Stripe, PayPal, and credit
128
+ * cards.
129
+ */
130
+ onlineProviderEnabled?: boolean;
131
+ /** Whether the site owners accept offline payments. */
132
+ offlineProviderEnabled?: boolean;
133
+ /**
134
+ * Whether the site owners have enabled the
135
+ * [Wix Point of Sale](https://www.wix.com/pos).
136
+ * This allows their customers to make electronic payments in person.
137
+ */
138
+ wixPosProviderEnabled?: boolean;
139
+ /**
140
+ * Whether the site owners have enabled at least one 3rd-party point-of-sale
141
+ * provider. This allows their customers to make electronic payments in person.
142
+ */
143
+ thirdPartyPosProviderEnabled?: boolean;
144
+ }
145
+ export interface GetMeteredBillingChargesRequest {
146
+ /**
147
+ * 3-letter currency code in
148
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
149
+ * @format CURRENCY
150
+ */
151
+ currency?: string | null;
152
+ /**
153
+ * Start of the period you want to retrieve the custom charges for in
154
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
155
+ */
156
+ startDate?: Date | null;
157
+ /**
158
+ * End of the period you want to retrieve the custom charges for in
159
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
160
+ */
161
+ endDate?: Date | null;
162
+ }
163
+ export interface GetMeteredBillingChargesResponse {
164
+ /** List of retrieved custom charges. */
165
+ charges?: Charge[];
166
+ }
167
+ export interface Charge {
168
+ /** ID of the custom charge. The ID consists of 64 characters. */
169
+ id?: string | null;
170
+ /** Description of the custom charge. */
171
+ description?: string;
172
+ /**
173
+ * Charge amount.
174
+ *
175
+ * Min: `0.50`
176
+ * @format DECIMAL_VALUE
177
+ * @decimalValue options { gt:0.00 }
178
+ */
179
+ amount?: string;
180
+ }
181
+ export interface MessageEnvelope {
182
+ /**
183
+ * App instance ID.
184
+ * @format GUID
185
+ */
186
+ instanceId?: string | null;
187
+ /**
188
+ * Event type.
189
+ * @maxLength 150
190
+ */
191
+ eventType?: string;
192
+ /** The identification type and identity data. */
193
+ identity?: IdentificationData;
194
+ /** Stringify payload. */
195
+ data?: string;
196
+ }
197
+ export interface IdentificationData extends IdentificationDataIdOneOf {
198
+ /**
199
+ * ID of a site visitor that has not logged in to the site.
200
+ * @format GUID
201
+ */
202
+ anonymousVisitorId?: string;
203
+ /**
204
+ * ID of a site visitor that has logged in to the site.
205
+ * @format GUID
206
+ */
207
+ memberId?: string;
208
+ /**
209
+ * ID of a Wix user (site owner, contributor, etc.).
210
+ * @format GUID
211
+ */
212
+ wixUserId?: string;
213
+ /**
214
+ * ID of an app.
215
+ * @format GUID
216
+ */
217
+ appId?: string;
218
+ /** @readonly */
219
+ identityType?: WebhookIdentityType;
220
+ }
221
+ /** @oneof */
222
+ export interface IdentificationDataIdOneOf {
223
+ /**
224
+ * ID of a site visitor that has not logged in to the site.
225
+ * @format GUID
226
+ */
227
+ anonymousVisitorId?: string;
228
+ /**
229
+ * ID of a site visitor that has logged in to the site.
230
+ * @format GUID
231
+ */
232
+ memberId?: string;
233
+ /**
234
+ * ID of a Wix user (site owner, contributor, etc.).
235
+ * @format GUID
236
+ */
237
+ wixUserId?: string;
238
+ /**
239
+ * ID of an app.
240
+ * @format GUID
241
+ */
242
+ appId?: string;
243
+ }
244
+ export declare enum WebhookIdentityType {
245
+ UNKNOWN = "UNKNOWN",
246
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
247
+ MEMBER = "MEMBER",
248
+ WIX_USER = "WIX_USER",
249
+ APP = "APP"
250
+ }