@wix/auto_sdk_app-management_billing 1.0.0
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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +6 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +14 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +184 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +85 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +37 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +29 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +227 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +32 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +314 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +201 -0
- package/build/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +6 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +8 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +178 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +56 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +37 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +20 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +227 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +29 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +314 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +172 -0
- package/build/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +8 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js +14 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js +184 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js +85 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +52 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js +29 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +227 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js +32 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +332 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js +201 -0
- package/build/internal/cjs/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.d.ts +8 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js +8 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.context.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.d.ts +35 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js +178 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.http.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.d.ts +15 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js +56 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.meta.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.d.ts +52 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js +20 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.public.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.d.ts +227 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js +29 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.types.js.map +1 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.d.ts +332 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js +172 -0
- package/build/internal/es/src/devcenter-checkout-v1-purchased-item-billing.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,227 @@
|
|
|
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 InvoiceStatusUpdate {
|
|
30
|
+
/** Invoice payment status. */
|
|
31
|
+
status?: InvoiceStatus;
|
|
32
|
+
/** Wix Premium invoice ID. */
|
|
33
|
+
invoiceId?: string;
|
|
34
|
+
/** App instance ID - a unique ID assigned to each app in each site. */
|
|
35
|
+
instanceId?: string | null;
|
|
36
|
+
/** Whether the invoice is for a single payment or for multiple, recurring payments. */
|
|
37
|
+
recurring?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare enum InvoiceStatus {
|
|
40
|
+
UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
|
|
41
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
42
|
+
PAID = "PAID",
|
|
43
|
+
REFUNDED = "REFUNDED",
|
|
44
|
+
VOIDED = "VOIDED",
|
|
45
|
+
CHARGEDBACK = "CHARGEDBACK"
|
|
46
|
+
}
|
|
47
|
+
export interface GetUrlRequest {
|
|
48
|
+
/**
|
|
49
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
50
|
+
* for a list of your app's supported product IDs.
|
|
51
|
+
*/
|
|
52
|
+
productId: string;
|
|
53
|
+
/**
|
|
54
|
+
* URL for the Wix checkout page. Redirect site owners to this URL after
|
|
55
|
+
* they've successfully purchased a paid plan for your app.
|
|
56
|
+
*/
|
|
57
|
+
successUrl?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the checkout is for testing purposes only. Testing is mainly
|
|
60
|
+
* relevant for in-app purchase flows. When `true`, Wix charges the site
|
|
61
|
+
* owners an amount of `0.00`.
|
|
62
|
+
*/
|
|
63
|
+
testCheckout?: boolean;
|
|
64
|
+
/** Information about the paid plan's billing cycle. */
|
|
65
|
+
billingCycle?: PaymentCycle;
|
|
66
|
+
/**
|
|
67
|
+
* 2-letter country code in
|
|
68
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
69
|
+
* format.
|
|
70
|
+
*
|
|
71
|
+
* Default: `"US"`
|
|
72
|
+
*/
|
|
73
|
+
countryCode?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* 2-letter language code in
|
|
76
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
77
|
+
*
|
|
78
|
+
* Default: `"EN"`
|
|
79
|
+
*/
|
|
80
|
+
languageCode?: string | null;
|
|
81
|
+
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
82
|
+
couponCode?: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface ChargeOverride {
|
|
85
|
+
/**
|
|
86
|
+
* Override price. In case you omit the override price, Wix charges site
|
|
87
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
88
|
+
*/
|
|
89
|
+
price?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Override 3-letter currency code in
|
|
92
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
93
|
+
*/
|
|
94
|
+
currency?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface GetUrlResponse {
|
|
97
|
+
/** URL for the Wix checkout page. */
|
|
98
|
+
checkoutUrl?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Token for the Wix checkout page. The token holds all data about the order
|
|
101
|
+
* you're creating a checkout for. It is [signed](),
|
|
102
|
+
* so you can verify that it comes from Wix.
|
|
103
|
+
*/
|
|
104
|
+
token?: string | null;
|
|
105
|
+
}
|
|
106
|
+
export interface GetPurchaseHistoryRequest {
|
|
107
|
+
}
|
|
108
|
+
export interface GetPurchaseHistoryResponse {
|
|
109
|
+
/** Retrieved purchases the site owners have completed for you app. */
|
|
110
|
+
purchases?: PurchasedItem[];
|
|
111
|
+
}
|
|
112
|
+
export interface GetSitePaymentMethodsStatusRequest {
|
|
113
|
+
}
|
|
114
|
+
export interface GetSitePaymentMethodsStatusResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Whether the site owners have enabled at least a single online payment method.
|
|
117
|
+
* Online payment methods include Wix Payments, Stripe, PayPal, and credit
|
|
118
|
+
* cards.
|
|
119
|
+
*/
|
|
120
|
+
onlineProviderEnabled?: boolean;
|
|
121
|
+
/** Whether the site owners accept offline payments. */
|
|
122
|
+
offlineProviderEnabled?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the site owners have enabled the
|
|
125
|
+
* [Wix Point of Sale](https://www.wix.com/pos).
|
|
126
|
+
* This allows their customers to make electronic payments in person.
|
|
127
|
+
*/
|
|
128
|
+
wixPosProviderEnabled?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the site owners have enabled at least one 3rd-party point-of-sale
|
|
131
|
+
* provider. This allows their customers to make electronic payments in person.
|
|
132
|
+
*/
|
|
133
|
+
thirdPartyPosProviderEnabled?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface GetMeteredBillingChargesRequest {
|
|
136
|
+
/**
|
|
137
|
+
* 3-letter currency code in
|
|
138
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
139
|
+
*/
|
|
140
|
+
currency?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* Start of the period you want to retrieve the custom charges for in
|
|
143
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
144
|
+
*/
|
|
145
|
+
startDate?: Date | null;
|
|
146
|
+
/**
|
|
147
|
+
* End of the period you want to retrieve the custom charges for in
|
|
148
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
149
|
+
*/
|
|
150
|
+
endDate?: Date | null;
|
|
151
|
+
}
|
|
152
|
+
export interface GetMeteredBillingChargesResponse {
|
|
153
|
+
/** List of retrieved custom charges. */
|
|
154
|
+
charges?: Charge[];
|
|
155
|
+
}
|
|
156
|
+
export interface Charge {
|
|
157
|
+
/** ID of the custom charge. The ID consists of 64 characters. */
|
|
158
|
+
id?: string | null;
|
|
159
|
+
/** Description of the custom charge. */
|
|
160
|
+
description?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Charge amount.
|
|
163
|
+
*
|
|
164
|
+
* Min: `0.50`
|
|
165
|
+
*/
|
|
166
|
+
amount?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface MessageEnvelope {
|
|
169
|
+
/** App instance ID. */
|
|
170
|
+
instanceId?: string | null;
|
|
171
|
+
/** Event type. */
|
|
172
|
+
eventType?: string;
|
|
173
|
+
/** The identification type and identity data. */
|
|
174
|
+
identity?: IdentificationData;
|
|
175
|
+
/** Stringify payload. */
|
|
176
|
+
data?: string;
|
|
177
|
+
}
|
|
178
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
179
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
180
|
+
anonymousVisitorId?: string;
|
|
181
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
182
|
+
memberId?: string;
|
|
183
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
184
|
+
wixUserId?: string;
|
|
185
|
+
/** ID of an app. */
|
|
186
|
+
appId?: string;
|
|
187
|
+
/** @readonly */
|
|
188
|
+
identityType?: WebhookIdentityType;
|
|
189
|
+
}
|
|
190
|
+
/** @oneof */
|
|
191
|
+
export interface IdentificationDataIdOneOf {
|
|
192
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
193
|
+
anonymousVisitorId?: string;
|
|
194
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
195
|
+
memberId?: string;
|
|
196
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
197
|
+
wixUserId?: string;
|
|
198
|
+
/** ID of an app. */
|
|
199
|
+
appId?: string;
|
|
200
|
+
}
|
|
201
|
+
export declare enum WebhookIdentityType {
|
|
202
|
+
UNKNOWN = "UNKNOWN",
|
|
203
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
204
|
+
MEMBER = "MEMBER",
|
|
205
|
+
WIX_USER = "WIX_USER",
|
|
206
|
+
APP = "APP"
|
|
207
|
+
}
|
|
208
|
+
export interface GetUrlResponseNonNullableFields {
|
|
209
|
+
checkoutUrl: string;
|
|
210
|
+
}
|
|
211
|
+
interface PurchasedItemNonNullableFields {
|
|
212
|
+
productId: string;
|
|
213
|
+
price: string;
|
|
214
|
+
currency: string;
|
|
215
|
+
billingCycle: PaymentCycle;
|
|
216
|
+
}
|
|
217
|
+
export interface GetPurchaseHistoryResponseNonNullableFields {
|
|
218
|
+
purchases: PurchasedItemNonNullableFields[];
|
|
219
|
+
}
|
|
220
|
+
interface ChargeNonNullableFields {
|
|
221
|
+
description: string;
|
|
222
|
+
amount: string;
|
|
223
|
+
}
|
|
224
|
+
export interface GetMeteredBillingChargesResponseNonNullableFields {
|
|
225
|
+
charges: ChargeNonNullableFields[];
|
|
226
|
+
}
|
|
227
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export var PaymentCycle;
|
|
2
|
+
(function (PaymentCycle) {
|
|
3
|
+
PaymentCycle["NO_CYCLE"] = "NO_CYCLE";
|
|
4
|
+
PaymentCycle["MONTHLY"] = "MONTHLY";
|
|
5
|
+
PaymentCycle["YEARLY"] = "YEARLY";
|
|
6
|
+
PaymentCycle["ONE_TIME"] = "ONE_TIME";
|
|
7
|
+
PaymentCycle["TWO_YEARS"] = "TWO_YEARS";
|
|
8
|
+
PaymentCycle["THREE_YEARS"] = "THREE_YEARS";
|
|
9
|
+
PaymentCycle["FOUR_YEARS"] = "FOUR_YEARS";
|
|
10
|
+
PaymentCycle["FIVE_YEARS"] = "FIVE_YEARS";
|
|
11
|
+
})(PaymentCycle || (PaymentCycle = {}));
|
|
12
|
+
export var InvoiceStatus;
|
|
13
|
+
(function (InvoiceStatus) {
|
|
14
|
+
InvoiceStatus["UNKNOWN_INVOICE_STATUS"] = "UNKNOWN_INVOICE_STATUS";
|
|
15
|
+
InvoiceStatus["PAYMENT_FAILED"] = "PAYMENT_FAILED";
|
|
16
|
+
InvoiceStatus["PAID"] = "PAID";
|
|
17
|
+
InvoiceStatus["REFUNDED"] = "REFUNDED";
|
|
18
|
+
InvoiceStatus["VOIDED"] = "VOIDED";
|
|
19
|
+
InvoiceStatus["CHARGEDBACK"] = "CHARGEDBACK";
|
|
20
|
+
})(InvoiceStatus || (InvoiceStatus = {}));
|
|
21
|
+
export var WebhookIdentityType;
|
|
22
|
+
(function (WebhookIdentityType) {
|
|
23
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
24
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
25
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
26
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
27
|
+
WebhookIdentityType["APP"] = "APP";
|
|
28
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
29
|
+
//# 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,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC3B,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAaD,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,kEAAiD,CAAA;IACjD,kDAAiC,CAAA;IACjC,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAuKD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -0,0 +1,332 @@
|
|
|
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 InvoiceStatusUpdate {
|
|
30
|
+
/** Invoice payment status. */
|
|
31
|
+
status?: InvoiceStatus;
|
|
32
|
+
/** Wix Premium invoice ID. */
|
|
33
|
+
invoiceId?: string;
|
|
34
|
+
/** App instance ID - a unique ID assigned to each app in each site. */
|
|
35
|
+
instanceId?: string | null;
|
|
36
|
+
/** Whether the invoice is for a single payment or for multiple, recurring payments. */
|
|
37
|
+
recurring?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare enum InvoiceStatus {
|
|
40
|
+
UNKNOWN_INVOICE_STATUS = "UNKNOWN_INVOICE_STATUS",
|
|
41
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
42
|
+
PAID = "PAID",
|
|
43
|
+
REFUNDED = "REFUNDED",
|
|
44
|
+
VOIDED = "VOIDED",
|
|
45
|
+
CHARGEDBACK = "CHARGEDBACK"
|
|
46
|
+
}
|
|
47
|
+
export interface GetUrlRequest {
|
|
48
|
+
/**
|
|
49
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
50
|
+
* for a list of your app's supported product IDs.
|
|
51
|
+
*/
|
|
52
|
+
productId: string;
|
|
53
|
+
/**
|
|
54
|
+
* URL for the Wix checkout page. Redirect site owners to this URL after
|
|
55
|
+
* they've successfully purchased a paid plan for your app.
|
|
56
|
+
*/
|
|
57
|
+
successUrl?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the checkout is for testing purposes only. Testing is mainly
|
|
60
|
+
* relevant for in-app purchase flows. When `true`, Wix charges the site
|
|
61
|
+
* owners an amount of `0.00`.
|
|
62
|
+
*/
|
|
63
|
+
testCheckout?: boolean;
|
|
64
|
+
/** Information about the paid plan's billing cycle. */
|
|
65
|
+
billingCycle?: PaymentCycle;
|
|
66
|
+
/**
|
|
67
|
+
* 2-letter country code in
|
|
68
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
69
|
+
* format.
|
|
70
|
+
*
|
|
71
|
+
* Default: `"US"`
|
|
72
|
+
*/
|
|
73
|
+
countryCode?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* 2-letter language code in
|
|
76
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
77
|
+
*
|
|
78
|
+
* Default: `"EN"`
|
|
79
|
+
*/
|
|
80
|
+
languageCode?: string | null;
|
|
81
|
+
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
82
|
+
couponCode?: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface ChargeOverride {
|
|
85
|
+
/**
|
|
86
|
+
* Override price. In case you omit the override price, Wix charges site
|
|
87
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
88
|
+
*/
|
|
89
|
+
price?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Override 3-letter currency code in
|
|
92
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
93
|
+
*/
|
|
94
|
+
currency?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface GetUrlResponse {
|
|
97
|
+
/** URL for the Wix checkout page. */
|
|
98
|
+
checkoutUrl?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Token for the Wix checkout page. The token holds all data about the order
|
|
101
|
+
* you're creating a checkout for. It is [signed](),
|
|
102
|
+
* so you can verify that it comes from Wix.
|
|
103
|
+
*/
|
|
104
|
+
token?: string | null;
|
|
105
|
+
}
|
|
106
|
+
export interface GetPurchaseHistoryRequest {
|
|
107
|
+
}
|
|
108
|
+
export interface GetPurchaseHistoryResponse {
|
|
109
|
+
/** Retrieved purchases the site owners have completed for you app. */
|
|
110
|
+
purchases?: PurchasedItem[];
|
|
111
|
+
}
|
|
112
|
+
export interface GetSitePaymentMethodsStatusRequest {
|
|
113
|
+
}
|
|
114
|
+
export interface GetSitePaymentMethodsStatusResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Whether the site owners have enabled at least a single online payment method.
|
|
117
|
+
* Online payment methods include Wix Payments, Stripe, PayPal, and credit
|
|
118
|
+
* cards.
|
|
119
|
+
*/
|
|
120
|
+
onlineProviderEnabled?: boolean;
|
|
121
|
+
/** Whether the site owners accept offline payments. */
|
|
122
|
+
offlineProviderEnabled?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the site owners have enabled the
|
|
125
|
+
* [Wix Point of Sale](https://www.wix.com/pos).
|
|
126
|
+
* This allows their customers to make electronic payments in person.
|
|
127
|
+
*/
|
|
128
|
+
wixPosProviderEnabled?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the site owners have enabled at least one 3rd-party point-of-sale
|
|
131
|
+
* provider. This allows their customers to make electronic payments in person.
|
|
132
|
+
*/
|
|
133
|
+
thirdPartyPosProviderEnabled?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface GetMeteredBillingChargesRequest {
|
|
136
|
+
/**
|
|
137
|
+
* 3-letter currency code in
|
|
138
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
139
|
+
*/
|
|
140
|
+
currency?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* Start of the period you want to retrieve the custom charges for in
|
|
143
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
144
|
+
*/
|
|
145
|
+
startDate?: Date | null;
|
|
146
|
+
/**
|
|
147
|
+
* End of the period you want to retrieve the custom charges for in
|
|
148
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
149
|
+
*/
|
|
150
|
+
endDate?: Date | null;
|
|
151
|
+
}
|
|
152
|
+
export interface GetMeteredBillingChargesResponse {
|
|
153
|
+
/** List of retrieved custom charges. */
|
|
154
|
+
charges?: Charge[];
|
|
155
|
+
}
|
|
156
|
+
export interface Charge {
|
|
157
|
+
/** ID of the custom charge. The ID consists of 64 characters. */
|
|
158
|
+
_id?: string | null;
|
|
159
|
+
/** Description of the custom charge. */
|
|
160
|
+
description?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Charge amount.
|
|
163
|
+
*
|
|
164
|
+
* Min: `0.50`
|
|
165
|
+
*/
|
|
166
|
+
amount?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface MessageEnvelope {
|
|
169
|
+
/** App instance ID. */
|
|
170
|
+
instanceId?: string | null;
|
|
171
|
+
/** Event type. */
|
|
172
|
+
eventType?: string;
|
|
173
|
+
/** The identification type and identity data. */
|
|
174
|
+
identity?: IdentificationData;
|
|
175
|
+
/** Stringify payload. */
|
|
176
|
+
data?: string;
|
|
177
|
+
}
|
|
178
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
179
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
180
|
+
anonymousVisitorId?: string;
|
|
181
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
182
|
+
memberId?: string;
|
|
183
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
184
|
+
wixUserId?: string;
|
|
185
|
+
/** ID of an app. */
|
|
186
|
+
appId?: string;
|
|
187
|
+
/** @readonly */
|
|
188
|
+
identityType?: WebhookIdentityType;
|
|
189
|
+
}
|
|
190
|
+
/** @oneof */
|
|
191
|
+
export interface IdentificationDataIdOneOf {
|
|
192
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
193
|
+
anonymousVisitorId?: string;
|
|
194
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
195
|
+
memberId?: string;
|
|
196
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
197
|
+
wixUserId?: string;
|
|
198
|
+
/** ID of an app. */
|
|
199
|
+
appId?: string;
|
|
200
|
+
}
|
|
201
|
+
export declare enum WebhookIdentityType {
|
|
202
|
+
UNKNOWN = "UNKNOWN",
|
|
203
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
204
|
+
MEMBER = "MEMBER",
|
|
205
|
+
WIX_USER = "WIX_USER",
|
|
206
|
+
APP = "APP"
|
|
207
|
+
}
|
|
208
|
+
export interface GetUrlResponseNonNullableFields {
|
|
209
|
+
checkoutUrl: string;
|
|
210
|
+
}
|
|
211
|
+
interface PurchasedItemNonNullableFields {
|
|
212
|
+
productId: string;
|
|
213
|
+
price: string;
|
|
214
|
+
currency: string;
|
|
215
|
+
billingCycle: PaymentCycle;
|
|
216
|
+
}
|
|
217
|
+
export interface GetPurchaseHistoryResponseNonNullableFields {
|
|
218
|
+
purchases: PurchasedItemNonNullableFields[];
|
|
219
|
+
}
|
|
220
|
+
interface ChargeNonNullableFields {
|
|
221
|
+
description: string;
|
|
222
|
+
amount: string;
|
|
223
|
+
}
|
|
224
|
+
export interface GetMeteredBillingChargesResponseNonNullableFields {
|
|
225
|
+
charges: ChargeNonNullableFields[];
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves the URL for a Wix checkout page for the specified paid plan of your app.
|
|
229
|
+
*
|
|
230
|
+
*
|
|
231
|
+
* This call succeeds only in case you have previously
|
|
232
|
+
* [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).
|
|
233
|
+
*
|
|
234
|
+
* The returned checkout URL is valid for 48 hours.
|
|
235
|
+
*
|
|
236
|
+
* This API allows your app to manage your pricing page outside of Wix while
|
|
237
|
+
* still using the standard Wix checkout flow.
|
|
238
|
+
* @param productId - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
239
|
+
* for a list of your app's supported product IDs.
|
|
240
|
+
* @public
|
|
241
|
+
* @requiredField productId
|
|
242
|
+
* @permissionId WIX_DEVELOPERS.CREATE_CHECKOUT
|
|
243
|
+
* @permissionScope Manage Your App
|
|
244
|
+
* @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
|
|
245
|
+
* @applicableIdentity APP
|
|
246
|
+
* @fqn com.wixpress.market.aim.api.Checkout.GetUrl
|
|
247
|
+
*/
|
|
248
|
+
export declare function getUrl(productId: string, options?: GetUrlOptions): Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
249
|
+
export interface GetUrlOptions {
|
|
250
|
+
/**
|
|
251
|
+
* URL for the Wix checkout page. Redirect site owners to this URL after
|
|
252
|
+
* they've successfully purchased a paid plan for your app.
|
|
253
|
+
*/
|
|
254
|
+
successUrl?: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* Whether the checkout is for testing purposes only. Testing is mainly
|
|
257
|
+
* relevant for in-app purchase flows. When `true`, Wix charges the site
|
|
258
|
+
* owners an amount of `0.00`.
|
|
259
|
+
*/
|
|
260
|
+
testCheckout?: boolean;
|
|
261
|
+
/** Information about the paid plan's billing cycle. */
|
|
262
|
+
billingCycle?: PaymentCycle;
|
|
263
|
+
/**
|
|
264
|
+
* 2-letter country code in
|
|
265
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
266
|
+
* format.
|
|
267
|
+
*
|
|
268
|
+
* Default: `"US"`
|
|
269
|
+
*/
|
|
270
|
+
countryCode?: string | null;
|
|
271
|
+
/**
|
|
272
|
+
* 2-letter language code in
|
|
273
|
+
* [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
274
|
+
*
|
|
275
|
+
* Default: `"EN"`
|
|
276
|
+
*/
|
|
277
|
+
languageCode?: string | null;
|
|
278
|
+
/** Coupon code for the paid plan. Available only in case there is a discount. */
|
|
279
|
+
couponCode?: string | null;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Retrieves a list of the site owner's past purchases for your app.
|
|
283
|
+
*
|
|
284
|
+
*
|
|
285
|
+
* You don't have to explicitly pass an identifier for the Wix site as part of
|
|
286
|
+
* the request, since this information is taken automatically from the context.
|
|
287
|
+
*
|
|
288
|
+
* The response doesn't include any details about cancellations.
|
|
289
|
+
* @public
|
|
290
|
+
* @permissionId WIX_DEVELOPERS.APP_PURCHASE_HISTORY
|
|
291
|
+
* @permissionScope Manage Your App
|
|
292
|
+
* @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
|
|
293
|
+
* @applicableIdentity APP
|
|
294
|
+
* @fqn com.wixpress.market.aim.api.Checkout.GetPurchaseHistory
|
|
295
|
+
*/
|
|
296
|
+
export declare function getPurchaseHistory(): Promise<GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields>;
|
|
297
|
+
/**
|
|
298
|
+
* Triggers Wix to call the
|
|
299
|
+
* [List Custom Charges SPI](https://dev.wix.com/docs/rest/internal-only/premium/custom-charges-spi/custom-charges-provider-v1/list-charges).
|
|
300
|
+
*
|
|
301
|
+
*
|
|
302
|
+
* Wix doesn't use the response from _List Charges_ SPI to actually create an
|
|
303
|
+
* invoice that's sent to the customer. Instead, calling _Get Metered Billing Charges_
|
|
304
|
+
* allows you confirm that your integration with the Custom Charges SPI is
|
|
305
|
+
* working as intended.
|
|
306
|
+
* @internal
|
|
307
|
+
* @documentationMaturity preview
|
|
308
|
+
* @permissionId WIX_DEVELOPERS.METERED_BILLING_CHARGES_READ
|
|
309
|
+
* @permissionScope Manage Your App
|
|
310
|
+
* @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
|
|
311
|
+
* @applicableIdentity APP
|
|
312
|
+
* @fqn com.wixpress.market.aim.api.Checkout.GetMeteredBillingCharges
|
|
313
|
+
*/
|
|
314
|
+
export declare function getMeteredBillingCharges(options?: GetMeteredBillingChargesOptions): Promise<GetMeteredBillingChargesResponse & GetMeteredBillingChargesResponseNonNullableFields>;
|
|
315
|
+
export interface GetMeteredBillingChargesOptions {
|
|
316
|
+
/**
|
|
317
|
+
* 3-letter currency code in
|
|
318
|
+
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
319
|
+
*/
|
|
320
|
+
currency?: string | null;
|
|
321
|
+
/**
|
|
322
|
+
* Start of the period you want to retrieve the custom charges for in
|
|
323
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
324
|
+
*/
|
|
325
|
+
startDate?: Date | null;
|
|
326
|
+
/**
|
|
327
|
+
* End of the period you want to retrieve the custom charges for in
|
|
328
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
329
|
+
*/
|
|
330
|
+
endDate?: Date | null;
|
|
331
|
+
}
|
|
332
|
+
export {};
|