@wix/auto_sdk_app-management_custom-charges 1.0.0 → 1.0.2
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/src/service-plugins-types.d.ts +82 -14
- package/build/cjs/src/service-plugins-types.js.map +1 -1
- package/build/es/src/service-plugins-types.d.ts +82 -14
- package/build/es/src/service-plugins-types.js.map +1 -1
- package/build/internal/cjs/src/service-plugins-types.d.ts +82 -14
- package/build/internal/cjs/src/service-plugins-types.js.map +1 -1
- package/build/internal/es/src/service-plugins-types.d.ts +82 -14
- package/build/internal/es/src/service-plugins-types.js.map +1 -1
- package/package.json +4 -4
|
@@ -4,6 +4,7 @@ export interface GetChargeLimitRequest {
|
|
|
4
4
|
* `null` in case Wix hasn't created the subscription when retrieving an
|
|
5
5
|
* initial charge limit. To track usage and billing for apps, we recommend to
|
|
6
6
|
* use `instanceId` instead of the `subscriptionId`.
|
|
7
|
+
* @format GUID
|
|
7
8
|
*/
|
|
8
9
|
subscriptionId?: string | null;
|
|
9
10
|
/**
|
|
@@ -12,6 +13,7 @@ export interface GetChargeLimitRequest {
|
|
|
12
13
|
* 3-letter currency code in
|
|
13
14
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
14
15
|
* format of the charge limit. Wix may add supported currencies in the future.
|
|
16
|
+
* @format CURRENCY
|
|
15
17
|
*/
|
|
16
18
|
currency?: string;
|
|
17
19
|
}
|
|
@@ -20,6 +22,8 @@ export interface GetChargeLimitResponse {
|
|
|
20
22
|
* Retrieved charge limit for the app instance. You can't update the
|
|
21
23
|
* charge limit after you've set an initial value. Site owners can increase the
|
|
22
24
|
* limit in their site's dashboard, currently they aren't allowed to decrease it.
|
|
25
|
+
* @format DECIMAL_VALUE
|
|
26
|
+
* @decimalValue options { gt:0.00 }
|
|
23
27
|
*/
|
|
24
28
|
chargeLimit?: string | null;
|
|
25
29
|
}
|
|
@@ -28,6 +32,7 @@ export interface ListChargesRequest {
|
|
|
28
32
|
* ID of the subscription for which Wix retrieves your custom charges.
|
|
29
33
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
30
34
|
* of the `subscriptionId`.
|
|
35
|
+
* @format GUID
|
|
31
36
|
*/
|
|
32
37
|
subscriptionId?: string;
|
|
33
38
|
/**
|
|
@@ -36,6 +41,7 @@ export interface ListChargesRequest {
|
|
|
36
41
|
* 3-letter currency code in
|
|
37
42
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
38
43
|
* format of your charges to return. Wix may add supported currencies in the future.
|
|
44
|
+
* @format CURRENCY
|
|
39
45
|
*/
|
|
40
46
|
currency?: string;
|
|
41
47
|
/**
|
|
@@ -62,6 +68,7 @@ export interface ListChargesResponse {
|
|
|
62
68
|
* Retrieved charges.
|
|
63
69
|
*
|
|
64
70
|
* Max: 5 charges
|
|
71
|
+
* @maxSize 5
|
|
65
72
|
*/
|
|
66
73
|
charges?: ChargeLineItem[];
|
|
67
74
|
}
|
|
@@ -71,6 +78,7 @@ export interface ChargeLineItem {
|
|
|
71
78
|
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
72
79
|
*
|
|
73
80
|
* Max: 64 characters
|
|
81
|
+
* @maxLength 64
|
|
74
82
|
*/
|
|
75
83
|
_id?: string | null;
|
|
76
84
|
/** Charge description. */
|
|
@@ -83,6 +91,7 @@ export interface ChargeLineItem {
|
|
|
83
91
|
* Wix truncates the additional minor units.
|
|
84
92
|
*
|
|
85
93
|
* Min: `0.50`
|
|
94
|
+
* @format DECIMAL_VALUE
|
|
86
95
|
*/
|
|
87
96
|
amount?: string;
|
|
88
97
|
}
|
|
@@ -91,6 +100,7 @@ export interface ChargesRejectedRequest {
|
|
|
91
100
|
* ID of the subscription for which Wix hasn't accepted your custom charges.
|
|
92
101
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
93
102
|
* of the `subscriptionId`.
|
|
103
|
+
* @format GUID
|
|
94
104
|
*/
|
|
95
105
|
subscriptionId?: string;
|
|
96
106
|
/**
|
|
@@ -99,24 +109,29 @@ export interface ChargesRejectedRequest {
|
|
|
99
109
|
* 3-letter currency code in
|
|
100
110
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
101
111
|
* format of the charges. Wix may add supported currencies in the future.
|
|
112
|
+
* @format CURRENCY
|
|
102
113
|
*/
|
|
103
114
|
currency?: string;
|
|
104
115
|
/**
|
|
105
116
|
* IDs of the rejected charges.
|
|
106
117
|
*
|
|
107
118
|
* Max: 5 charges
|
|
119
|
+
* @maxSize 5
|
|
108
120
|
*/
|
|
109
121
|
chargeIds?: string[] | null;
|
|
110
122
|
/**
|
|
111
123
|
* Maximum amount that your app may charge the customer per billing cycle.
|
|
112
124
|
*
|
|
113
125
|
* Min: `0.50`
|
|
126
|
+
* @format DECIMAL_VALUE
|
|
127
|
+
* @decimalValue options { gt:0.00 }
|
|
114
128
|
*/
|
|
115
129
|
chargeLimit?: string | null;
|
|
116
130
|
/**
|
|
117
131
|
* Information about why Wix has rejected your app's charges.
|
|
118
132
|
*
|
|
119
133
|
* Max: 20 reasons
|
|
134
|
+
* @maxSize 20
|
|
120
135
|
*/
|
|
121
136
|
reasons?: ChargesRejectedReason[];
|
|
122
137
|
}
|
|
@@ -137,6 +152,7 @@ export interface InvoiceCreatedRequest {
|
|
|
137
152
|
* ID of the subscription for which Wix has created an invoice that includes
|
|
138
153
|
* your custom charges. To track usage and billing for apps, we recommend to use
|
|
139
154
|
* `instanceId` instead of the `subscriptionId`.
|
|
155
|
+
* @format GUID
|
|
140
156
|
*/
|
|
141
157
|
subscriptionId?: string;
|
|
142
158
|
/**
|
|
@@ -145,11 +161,15 @@ export interface InvoiceCreatedRequest {
|
|
|
145
161
|
* 3-letter currency code in
|
|
146
162
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
147
163
|
* format of the charges. Wix may add supported currencies in the future.
|
|
164
|
+
* @format CURRENCY
|
|
148
165
|
*/
|
|
149
166
|
currency?: string;
|
|
150
167
|
/** ID of the created invoice. */
|
|
151
168
|
invoiceId?: string;
|
|
152
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Line items included in the invoice.
|
|
171
|
+
* @maxSize 5
|
|
172
|
+
*/
|
|
153
173
|
lineItems?: InvoiceLineItem[];
|
|
154
174
|
}
|
|
155
175
|
export interface InvoiceLineItem {
|
|
@@ -157,11 +177,18 @@ export interface InvoiceLineItem {
|
|
|
157
177
|
* ID of the charge as returned in List Charges.
|
|
158
178
|
*
|
|
159
179
|
* Max: 64 characters
|
|
180
|
+
* @maxLength 64
|
|
160
181
|
*/
|
|
161
182
|
chargeId?: string | null;
|
|
162
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Charge amount.
|
|
185
|
+
* @format DECIMAL_VALUE
|
|
186
|
+
*/
|
|
163
187
|
amount?: string;
|
|
164
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* ID of the line item in the invoice that Wix sends to the customer.
|
|
190
|
+
* @format GUID
|
|
191
|
+
*/
|
|
165
192
|
_id?: string;
|
|
166
193
|
}
|
|
167
194
|
export interface InvoiceCreatedResponse {
|
|
@@ -171,6 +198,7 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
171
198
|
* ID of the subscription for which the charge limit has been updated.
|
|
172
199
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
173
200
|
* of the `subscriptionId`.
|
|
201
|
+
* @format GUID
|
|
174
202
|
*/
|
|
175
203
|
subscriptionId?: string;
|
|
176
204
|
/**
|
|
@@ -179,9 +207,13 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
179
207
|
* 3-letter currency code in
|
|
180
208
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
181
209
|
* format of the charges. Wix may add supported currencies in the future.
|
|
210
|
+
* @format CURRENCY
|
|
182
211
|
*/
|
|
183
212
|
currency?: string;
|
|
184
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Updated charge limit.
|
|
215
|
+
* @format DECIMAL_VALUE
|
|
216
|
+
*/
|
|
185
217
|
chargeLimit?: string | null;
|
|
186
218
|
}
|
|
187
219
|
export interface ChargeLimitUpdatedResponse {
|
|
@@ -199,6 +231,8 @@ export interface SpiBaseUri {
|
|
|
199
231
|
/**
|
|
200
232
|
* Base URI where the methods are called. Wix appends the path to the `baseUri`.
|
|
201
233
|
* For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
|
|
234
|
+
* @minLength 6
|
|
235
|
+
* @maxLength 2048
|
|
202
236
|
*/
|
|
203
237
|
baseUri?: string;
|
|
204
238
|
/** Alternate, custom URIs to replace the default URIs for specific service plugin methods. */
|
|
@@ -210,11 +244,15 @@ export interface AlternativeUri {
|
|
|
210
244
|
*
|
|
211
245
|
* For `methodName`, use the name of the method in PascalCase.
|
|
212
246
|
* For example, for Get Shipping Rates use `GetShippingRates`.
|
|
247
|
+
* @minLength 3
|
|
248
|
+
* @maxLength 128
|
|
213
249
|
*/
|
|
214
250
|
methodName?: string;
|
|
215
251
|
/**
|
|
216
252
|
* Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
|
|
217
253
|
* Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
|
|
254
|
+
* @minLength 6
|
|
255
|
+
* @maxLength 2048
|
|
218
256
|
*/
|
|
219
257
|
absoluteUri?: string;
|
|
220
258
|
}
|
|
@@ -234,13 +272,19 @@ export interface AlternativeUri {
|
|
|
234
272
|
export interface Context {
|
|
235
273
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
236
274
|
requestId?: string | null;
|
|
237
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
|
|
277
|
+
* @format CURRENCY
|
|
278
|
+
*/
|
|
238
279
|
currency?: string | null;
|
|
239
280
|
/** An object that describes the identity that triggered this request. */
|
|
240
281
|
identity?: IdentificationData;
|
|
241
282
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
242
283
|
languages?: string[];
|
|
243
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The service provider app's instance ID.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
244
288
|
instanceId?: string | null;
|
|
245
289
|
}
|
|
246
290
|
export declare enum IdentityType {
|
|
@@ -251,25 +295,49 @@ export declare enum IdentityType {
|
|
|
251
295
|
APP = "APP"
|
|
252
296
|
}
|
|
253
297
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
254
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* ID of a site visitor that has not logged in to the site.
|
|
300
|
+
* @format GUID
|
|
301
|
+
*/
|
|
255
302
|
anonymousVisitorId?: string;
|
|
256
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* ID of a site visitor that has logged in to the site.
|
|
305
|
+
* @format GUID
|
|
306
|
+
*/
|
|
257
307
|
memberId?: string;
|
|
258
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
310
|
+
* @format GUID
|
|
311
|
+
*/
|
|
259
312
|
wixUserId?: string;
|
|
260
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* ID of an app.
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
261
317
|
appId?: string;
|
|
262
318
|
/** @readonly */
|
|
263
319
|
identityType?: IdentityType;
|
|
264
320
|
}
|
|
265
321
|
/** @oneof */
|
|
266
322
|
export interface IdentificationDataIdOneOf {
|
|
267
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has not logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
268
327
|
anonymousVisitorId?: string;
|
|
269
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* ID of a site visitor that has logged in to the site.
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
270
332
|
memberId?: string;
|
|
271
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
272
337
|
wixUserId?: string;
|
|
273
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* ID of an app.
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
274
342
|
appId?: string;
|
|
275
343
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;AA8DA,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,kHAAkH;IAClH,uCAA6B,CAAA;IAC7B,0CAA0C;IAC1C,2CAAiC,CAAA;AACnC,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AA6ED,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sEAAsE;IACtE,4CAAmB,CAAA;IACnB,0GAA0G;IAC1G,wEAA+C,CAAA;IAC/C,yDAAyD;IACzD,8DAAqC,CAAA;IACrC,6PAA6P;IAC7P,0DAAiC,CAAA;AACnC,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AAuJD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB"}
|
|
@@ -4,6 +4,7 @@ export interface GetChargeLimitRequest {
|
|
|
4
4
|
* `null` in case Wix hasn't created the subscription when retrieving an
|
|
5
5
|
* initial charge limit. To track usage and billing for apps, we recommend to
|
|
6
6
|
* use `instanceId` instead of the `subscriptionId`.
|
|
7
|
+
* @format GUID
|
|
7
8
|
*/
|
|
8
9
|
subscriptionId?: string | null;
|
|
9
10
|
/**
|
|
@@ -12,6 +13,7 @@ export interface GetChargeLimitRequest {
|
|
|
12
13
|
* 3-letter currency code in
|
|
13
14
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
14
15
|
* format of the charge limit. Wix may add supported currencies in the future.
|
|
16
|
+
* @format CURRENCY
|
|
15
17
|
*/
|
|
16
18
|
currency?: string;
|
|
17
19
|
}
|
|
@@ -20,6 +22,8 @@ export interface GetChargeLimitResponse {
|
|
|
20
22
|
* Retrieved charge limit for the app instance. You can't update the
|
|
21
23
|
* charge limit after you've set an initial value. Site owners can increase the
|
|
22
24
|
* limit in their site's dashboard, currently they aren't allowed to decrease it.
|
|
25
|
+
* @format DECIMAL_VALUE
|
|
26
|
+
* @decimalValue options { gt:0.00 }
|
|
23
27
|
*/
|
|
24
28
|
chargeLimit?: string | null;
|
|
25
29
|
}
|
|
@@ -28,6 +32,7 @@ export interface ListChargesRequest {
|
|
|
28
32
|
* ID of the subscription for which Wix retrieves your custom charges.
|
|
29
33
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
30
34
|
* of the `subscriptionId`.
|
|
35
|
+
* @format GUID
|
|
31
36
|
*/
|
|
32
37
|
subscriptionId?: string;
|
|
33
38
|
/**
|
|
@@ -36,6 +41,7 @@ export interface ListChargesRequest {
|
|
|
36
41
|
* 3-letter currency code in
|
|
37
42
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
38
43
|
* format of your charges to return. Wix may add supported currencies in the future.
|
|
44
|
+
* @format CURRENCY
|
|
39
45
|
*/
|
|
40
46
|
currency?: string;
|
|
41
47
|
/**
|
|
@@ -62,6 +68,7 @@ export interface ListChargesResponse {
|
|
|
62
68
|
* Retrieved charges.
|
|
63
69
|
*
|
|
64
70
|
* Max: 5 charges
|
|
71
|
+
* @maxSize 5
|
|
65
72
|
*/
|
|
66
73
|
charges?: ChargeLineItem[];
|
|
67
74
|
}
|
|
@@ -71,6 +78,7 @@ export interface ChargeLineItem {
|
|
|
71
78
|
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
72
79
|
*
|
|
73
80
|
* Max: 64 characters
|
|
81
|
+
* @maxLength 64
|
|
74
82
|
*/
|
|
75
83
|
_id?: string | null;
|
|
76
84
|
/** Charge description. */
|
|
@@ -83,6 +91,7 @@ export interface ChargeLineItem {
|
|
|
83
91
|
* Wix truncates the additional minor units.
|
|
84
92
|
*
|
|
85
93
|
* Min: `0.50`
|
|
94
|
+
* @format DECIMAL_VALUE
|
|
86
95
|
*/
|
|
87
96
|
amount?: string;
|
|
88
97
|
}
|
|
@@ -91,6 +100,7 @@ export interface ChargesRejectedRequest {
|
|
|
91
100
|
* ID of the subscription for which Wix hasn't accepted your custom charges.
|
|
92
101
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
93
102
|
* of the `subscriptionId`.
|
|
103
|
+
* @format GUID
|
|
94
104
|
*/
|
|
95
105
|
subscriptionId?: string;
|
|
96
106
|
/**
|
|
@@ -99,24 +109,29 @@ export interface ChargesRejectedRequest {
|
|
|
99
109
|
* 3-letter currency code in
|
|
100
110
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
101
111
|
* format of the charges. Wix may add supported currencies in the future.
|
|
112
|
+
* @format CURRENCY
|
|
102
113
|
*/
|
|
103
114
|
currency?: string;
|
|
104
115
|
/**
|
|
105
116
|
* IDs of the rejected charges.
|
|
106
117
|
*
|
|
107
118
|
* Max: 5 charges
|
|
119
|
+
* @maxSize 5
|
|
108
120
|
*/
|
|
109
121
|
chargeIds?: string[] | null;
|
|
110
122
|
/**
|
|
111
123
|
* Maximum amount that your app may charge the customer per billing cycle.
|
|
112
124
|
*
|
|
113
125
|
* Min: `0.50`
|
|
126
|
+
* @format DECIMAL_VALUE
|
|
127
|
+
* @decimalValue options { gt:0.00 }
|
|
114
128
|
*/
|
|
115
129
|
chargeLimit?: string | null;
|
|
116
130
|
/**
|
|
117
131
|
* Information about why Wix has rejected your app's charges.
|
|
118
132
|
*
|
|
119
133
|
* Max: 20 reasons
|
|
134
|
+
* @maxSize 20
|
|
120
135
|
*/
|
|
121
136
|
reasons?: ChargesRejectedReason[];
|
|
122
137
|
}
|
|
@@ -137,6 +152,7 @@ export interface InvoiceCreatedRequest {
|
|
|
137
152
|
* ID of the subscription for which Wix has created an invoice that includes
|
|
138
153
|
* your custom charges. To track usage and billing for apps, we recommend to use
|
|
139
154
|
* `instanceId` instead of the `subscriptionId`.
|
|
155
|
+
* @format GUID
|
|
140
156
|
*/
|
|
141
157
|
subscriptionId?: string;
|
|
142
158
|
/**
|
|
@@ -145,11 +161,15 @@ export interface InvoiceCreatedRequest {
|
|
|
145
161
|
* 3-letter currency code in
|
|
146
162
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
147
163
|
* format of the charges. Wix may add supported currencies in the future.
|
|
164
|
+
* @format CURRENCY
|
|
148
165
|
*/
|
|
149
166
|
currency?: string;
|
|
150
167
|
/** ID of the created invoice. */
|
|
151
168
|
invoiceId?: string;
|
|
152
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Line items included in the invoice.
|
|
171
|
+
* @maxSize 5
|
|
172
|
+
*/
|
|
153
173
|
lineItems?: InvoiceLineItem[];
|
|
154
174
|
}
|
|
155
175
|
export interface InvoiceLineItem {
|
|
@@ -157,11 +177,18 @@ export interface InvoiceLineItem {
|
|
|
157
177
|
* ID of the charge as returned in List Charges.
|
|
158
178
|
*
|
|
159
179
|
* Max: 64 characters
|
|
180
|
+
* @maxLength 64
|
|
160
181
|
*/
|
|
161
182
|
chargeId?: string | null;
|
|
162
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Charge amount.
|
|
185
|
+
* @format DECIMAL_VALUE
|
|
186
|
+
*/
|
|
163
187
|
amount?: string;
|
|
164
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* ID of the line item in the invoice that Wix sends to the customer.
|
|
190
|
+
* @format GUID
|
|
191
|
+
*/
|
|
165
192
|
_id?: string;
|
|
166
193
|
}
|
|
167
194
|
export interface InvoiceCreatedResponse {
|
|
@@ -171,6 +198,7 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
171
198
|
* ID of the subscription for which the charge limit has been updated.
|
|
172
199
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
173
200
|
* of the `subscriptionId`.
|
|
201
|
+
* @format GUID
|
|
174
202
|
*/
|
|
175
203
|
subscriptionId?: string;
|
|
176
204
|
/**
|
|
@@ -179,9 +207,13 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
179
207
|
* 3-letter currency code in
|
|
180
208
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
181
209
|
* format of the charges. Wix may add supported currencies in the future.
|
|
210
|
+
* @format CURRENCY
|
|
182
211
|
*/
|
|
183
212
|
currency?: string;
|
|
184
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Updated charge limit.
|
|
215
|
+
* @format DECIMAL_VALUE
|
|
216
|
+
*/
|
|
185
217
|
chargeLimit?: string | null;
|
|
186
218
|
}
|
|
187
219
|
export interface ChargeLimitUpdatedResponse {
|
|
@@ -199,6 +231,8 @@ export interface SpiBaseUri {
|
|
|
199
231
|
/**
|
|
200
232
|
* Base URI where the methods are called. Wix appends the path to the `baseUri`.
|
|
201
233
|
* For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
|
|
234
|
+
* @minLength 6
|
|
235
|
+
* @maxLength 2048
|
|
202
236
|
*/
|
|
203
237
|
baseUri?: string;
|
|
204
238
|
/** Alternate, custom URIs to replace the default URIs for specific service plugin methods. */
|
|
@@ -210,11 +244,15 @@ export interface AlternativeUri {
|
|
|
210
244
|
*
|
|
211
245
|
* For `methodName`, use the name of the method in PascalCase.
|
|
212
246
|
* For example, for Get Shipping Rates use `GetShippingRates`.
|
|
247
|
+
* @minLength 3
|
|
248
|
+
* @maxLength 128
|
|
213
249
|
*/
|
|
214
250
|
methodName?: string;
|
|
215
251
|
/**
|
|
216
252
|
* Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
|
|
217
253
|
* Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
|
|
254
|
+
* @minLength 6
|
|
255
|
+
* @maxLength 2048
|
|
218
256
|
*/
|
|
219
257
|
absoluteUri?: string;
|
|
220
258
|
}
|
|
@@ -234,13 +272,19 @@ export interface AlternativeUri {
|
|
|
234
272
|
export interface Context {
|
|
235
273
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
236
274
|
requestId?: string | null;
|
|
237
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
|
|
277
|
+
* @format CURRENCY
|
|
278
|
+
*/
|
|
238
279
|
currency?: string | null;
|
|
239
280
|
/** An object that describes the identity that triggered this request. */
|
|
240
281
|
identity?: IdentificationData;
|
|
241
282
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
242
283
|
languages?: string[];
|
|
243
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The service provider app's instance ID.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
244
288
|
instanceId?: string | null;
|
|
245
289
|
}
|
|
246
290
|
export declare enum IdentityType {
|
|
@@ -251,25 +295,49 @@ export declare enum IdentityType {
|
|
|
251
295
|
APP = "APP"
|
|
252
296
|
}
|
|
253
297
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
254
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* ID of a site visitor that has not logged in to the site.
|
|
300
|
+
* @format GUID
|
|
301
|
+
*/
|
|
255
302
|
anonymousVisitorId?: string;
|
|
256
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* ID of a site visitor that has logged in to the site.
|
|
305
|
+
* @format GUID
|
|
306
|
+
*/
|
|
257
307
|
memberId?: string;
|
|
258
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
310
|
+
* @format GUID
|
|
311
|
+
*/
|
|
259
312
|
wixUserId?: string;
|
|
260
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* ID of an app.
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
261
317
|
appId?: string;
|
|
262
318
|
/** @readonly */
|
|
263
319
|
identityType?: IdentityType;
|
|
264
320
|
}
|
|
265
321
|
/** @oneof */
|
|
266
322
|
export interface IdentificationDataIdOneOf {
|
|
267
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has not logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
268
327
|
anonymousVisitorId?: string;
|
|
269
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* ID of a site visitor that has logged in to the site.
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
270
332
|
memberId?: string;
|
|
271
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
272
337
|
wixUserId?: string;
|
|
273
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* ID of an app.
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
274
342
|
appId?: string;
|
|
275
343
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"AA8DA,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,kHAAkH;IAClH,uCAA6B,CAAA;IAC7B,0CAA0C;IAC1C,2CAAiC,CAAA;AACnC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB;AA6ED,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sEAAsE;IACtE,4CAAmB,CAAA;IACnB,0GAA0G;IAC1G,wEAA+C,CAAA;IAC/C,yDAAyD;IACzD,8DAAqC,CAAA;IACrC,6PAA6P;IAC7P,0DAAiC,CAAA;AACnC,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAuJD,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
|
@@ -4,6 +4,7 @@ export interface GetChargeLimitRequest {
|
|
|
4
4
|
* `null` in case Wix hasn't created the subscription when retrieving an
|
|
5
5
|
* initial charge limit. To track usage and billing for apps, we recommend to
|
|
6
6
|
* use `instanceId` instead of the `subscriptionId`.
|
|
7
|
+
* @format GUID
|
|
7
8
|
*/
|
|
8
9
|
subscriptionId?: string | null;
|
|
9
10
|
/**
|
|
@@ -12,6 +13,7 @@ export interface GetChargeLimitRequest {
|
|
|
12
13
|
* 3-letter currency code in
|
|
13
14
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
14
15
|
* format of the charge limit. Wix may add supported currencies in the future.
|
|
16
|
+
* @format CURRENCY
|
|
15
17
|
*/
|
|
16
18
|
currency?: string;
|
|
17
19
|
}
|
|
@@ -20,6 +22,8 @@ export interface GetChargeLimitResponse {
|
|
|
20
22
|
* Retrieved charge limit for the app instance. You can't update the
|
|
21
23
|
* charge limit after you've set an initial value. Site owners can increase the
|
|
22
24
|
* limit in their site's dashboard, currently they aren't allowed to decrease it.
|
|
25
|
+
* @format DECIMAL_VALUE
|
|
26
|
+
* @decimalValue options { gt:0.00 }
|
|
23
27
|
*/
|
|
24
28
|
chargeLimit?: string | null;
|
|
25
29
|
}
|
|
@@ -28,6 +32,7 @@ export interface ListChargesRequest {
|
|
|
28
32
|
* ID of the subscription for which Wix retrieves your custom charges.
|
|
29
33
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
30
34
|
* of the `subscriptionId`.
|
|
35
|
+
* @format GUID
|
|
31
36
|
*/
|
|
32
37
|
subscriptionId?: string;
|
|
33
38
|
/**
|
|
@@ -36,6 +41,7 @@ export interface ListChargesRequest {
|
|
|
36
41
|
* 3-letter currency code in
|
|
37
42
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
38
43
|
* format of your charges to return. Wix may add supported currencies in the future.
|
|
44
|
+
* @format CURRENCY
|
|
39
45
|
*/
|
|
40
46
|
currency?: string;
|
|
41
47
|
/**
|
|
@@ -62,6 +68,7 @@ export interface ListChargesResponse {
|
|
|
62
68
|
* Retrieved charges.
|
|
63
69
|
*
|
|
64
70
|
* Max: 5 charges
|
|
71
|
+
* @maxSize 5
|
|
65
72
|
*/
|
|
66
73
|
charges?: ChargeLineItem[];
|
|
67
74
|
}
|
|
@@ -71,6 +78,7 @@ export interface ChargeLineItem {
|
|
|
71
78
|
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
72
79
|
*
|
|
73
80
|
* Max: 64 characters
|
|
81
|
+
* @maxLength 64
|
|
74
82
|
*/
|
|
75
83
|
_id?: string | null;
|
|
76
84
|
/** Charge description. */
|
|
@@ -83,6 +91,7 @@ export interface ChargeLineItem {
|
|
|
83
91
|
* Wix truncates the additional minor units.
|
|
84
92
|
*
|
|
85
93
|
* Min: `0.50`
|
|
94
|
+
* @format DECIMAL_VALUE
|
|
86
95
|
*/
|
|
87
96
|
amount?: string;
|
|
88
97
|
}
|
|
@@ -91,6 +100,7 @@ export interface ChargesRejectedRequest {
|
|
|
91
100
|
* ID of the subscription for which Wix hasn't accepted your custom charges.
|
|
92
101
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
93
102
|
* of the `subscriptionId`.
|
|
103
|
+
* @format GUID
|
|
94
104
|
*/
|
|
95
105
|
subscriptionId?: string;
|
|
96
106
|
/**
|
|
@@ -99,24 +109,29 @@ export interface ChargesRejectedRequest {
|
|
|
99
109
|
* 3-letter currency code in
|
|
100
110
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
101
111
|
* format of the charges. Wix may add supported currencies in the future.
|
|
112
|
+
* @format CURRENCY
|
|
102
113
|
*/
|
|
103
114
|
currency?: string;
|
|
104
115
|
/**
|
|
105
116
|
* IDs of the rejected charges.
|
|
106
117
|
*
|
|
107
118
|
* Max: 5 charges
|
|
119
|
+
* @maxSize 5
|
|
108
120
|
*/
|
|
109
121
|
chargeIds?: string[] | null;
|
|
110
122
|
/**
|
|
111
123
|
* Maximum amount that your app may charge the customer per billing cycle.
|
|
112
124
|
*
|
|
113
125
|
* Min: `0.50`
|
|
126
|
+
* @format DECIMAL_VALUE
|
|
127
|
+
* @decimalValue options { gt:0.00 }
|
|
114
128
|
*/
|
|
115
129
|
chargeLimit?: string | null;
|
|
116
130
|
/**
|
|
117
131
|
* Information about why Wix has rejected your app's charges.
|
|
118
132
|
*
|
|
119
133
|
* Max: 20 reasons
|
|
134
|
+
* @maxSize 20
|
|
120
135
|
*/
|
|
121
136
|
reasons?: ChargesRejectedReason[];
|
|
122
137
|
}
|
|
@@ -137,6 +152,7 @@ export interface InvoiceCreatedRequest {
|
|
|
137
152
|
* ID of the subscription for which Wix has created an invoice that includes
|
|
138
153
|
* your custom charges. To track usage and billing for apps, we recommend to use
|
|
139
154
|
* `instanceId` instead of the `subscriptionId`.
|
|
155
|
+
* @format GUID
|
|
140
156
|
*/
|
|
141
157
|
subscriptionId?: string;
|
|
142
158
|
/**
|
|
@@ -145,11 +161,15 @@ export interface InvoiceCreatedRequest {
|
|
|
145
161
|
* 3-letter currency code in
|
|
146
162
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
147
163
|
* format of the charges. Wix may add supported currencies in the future.
|
|
164
|
+
* @format CURRENCY
|
|
148
165
|
*/
|
|
149
166
|
currency?: string;
|
|
150
167
|
/** ID of the created invoice. */
|
|
151
168
|
invoiceId?: string;
|
|
152
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Line items included in the invoice.
|
|
171
|
+
* @maxSize 5
|
|
172
|
+
*/
|
|
153
173
|
lineItems?: InvoiceLineItem[];
|
|
154
174
|
}
|
|
155
175
|
export interface InvoiceLineItem {
|
|
@@ -157,11 +177,18 @@ export interface InvoiceLineItem {
|
|
|
157
177
|
* ID of the charge as returned in List Charges.
|
|
158
178
|
*
|
|
159
179
|
* Max: 64 characters
|
|
180
|
+
* @maxLength 64
|
|
160
181
|
*/
|
|
161
182
|
chargeId?: string | null;
|
|
162
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Charge amount.
|
|
185
|
+
* @format DECIMAL_VALUE
|
|
186
|
+
*/
|
|
163
187
|
amount?: string;
|
|
164
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* ID of the line item in the invoice that Wix sends to the customer.
|
|
190
|
+
* @format GUID
|
|
191
|
+
*/
|
|
165
192
|
_id?: string;
|
|
166
193
|
}
|
|
167
194
|
export interface InvoiceCreatedResponse {
|
|
@@ -171,6 +198,7 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
171
198
|
* ID of the subscription for which the charge limit has been updated.
|
|
172
199
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
173
200
|
* of the `subscriptionId`.
|
|
201
|
+
* @format GUID
|
|
174
202
|
*/
|
|
175
203
|
subscriptionId?: string;
|
|
176
204
|
/**
|
|
@@ -179,9 +207,13 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
179
207
|
* 3-letter currency code in
|
|
180
208
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
181
209
|
* format of the charges. Wix may add supported currencies in the future.
|
|
210
|
+
* @format CURRENCY
|
|
182
211
|
*/
|
|
183
212
|
currency?: string;
|
|
184
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Updated charge limit.
|
|
215
|
+
* @format DECIMAL_VALUE
|
|
216
|
+
*/
|
|
185
217
|
chargeLimit?: string | null;
|
|
186
218
|
}
|
|
187
219
|
export interface ChargeLimitUpdatedResponse {
|
|
@@ -199,6 +231,8 @@ export interface SpiBaseUri {
|
|
|
199
231
|
/**
|
|
200
232
|
* Base URI where the methods are called. Wix appends the path to the `baseUri`.
|
|
201
233
|
* For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
|
|
234
|
+
* @minLength 6
|
|
235
|
+
* @maxLength 2048
|
|
202
236
|
*/
|
|
203
237
|
baseUri?: string;
|
|
204
238
|
/** Alternate, custom URIs to replace the default URIs for specific service plugin methods. */
|
|
@@ -210,11 +244,15 @@ export interface AlternativeUri {
|
|
|
210
244
|
*
|
|
211
245
|
* For `methodName`, use the name of the method in PascalCase.
|
|
212
246
|
* For example, for Get Shipping Rates use `GetShippingRates`.
|
|
247
|
+
* @minLength 3
|
|
248
|
+
* @maxLength 128
|
|
213
249
|
*/
|
|
214
250
|
methodName?: string;
|
|
215
251
|
/**
|
|
216
252
|
* Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
|
|
217
253
|
* Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
|
|
254
|
+
* @minLength 6
|
|
255
|
+
* @maxLength 2048
|
|
218
256
|
*/
|
|
219
257
|
absoluteUri?: string;
|
|
220
258
|
}
|
|
@@ -234,13 +272,19 @@ export interface AlternativeUri {
|
|
|
234
272
|
export interface Context {
|
|
235
273
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
236
274
|
requestId?: string | null;
|
|
237
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
|
|
277
|
+
* @format CURRENCY
|
|
278
|
+
*/
|
|
238
279
|
currency?: string | null;
|
|
239
280
|
/** An object that describes the identity that triggered this request. */
|
|
240
281
|
identity?: IdentificationData;
|
|
241
282
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
242
283
|
languages?: string[];
|
|
243
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The service provider app's instance ID.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
244
288
|
instanceId?: string | null;
|
|
245
289
|
}
|
|
246
290
|
export declare enum IdentityType {
|
|
@@ -251,25 +295,49 @@ export declare enum IdentityType {
|
|
|
251
295
|
APP = "APP"
|
|
252
296
|
}
|
|
253
297
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
254
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* ID of a site visitor that has not logged in to the site.
|
|
300
|
+
* @format GUID
|
|
301
|
+
*/
|
|
255
302
|
anonymousVisitorId?: string;
|
|
256
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* ID of a site visitor that has logged in to the site.
|
|
305
|
+
* @format GUID
|
|
306
|
+
*/
|
|
257
307
|
memberId?: string;
|
|
258
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
310
|
+
* @format GUID
|
|
311
|
+
*/
|
|
259
312
|
wixUserId?: string;
|
|
260
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* ID of an app.
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
261
317
|
appId?: string;
|
|
262
318
|
/** @readonly */
|
|
263
319
|
identityType?: IdentityType;
|
|
264
320
|
}
|
|
265
321
|
/** @oneof */
|
|
266
322
|
export interface IdentificationDataIdOneOf {
|
|
267
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has not logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
268
327
|
anonymousVisitorId?: string;
|
|
269
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* ID of a site visitor that has logged in to the site.
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
270
332
|
memberId?: string;
|
|
271
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
272
337
|
wixUserId?: string;
|
|
273
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* ID of an app.
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
274
342
|
appId?: string;
|
|
275
343
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;AA8DA,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,kHAAkH;IAClH,uCAA6B,CAAA;IAC7B,0CAA0C;IAC1C,2CAAiC,CAAA;AACnC,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AA6ED,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sEAAsE;IACtE,4CAAmB,CAAA;IACnB,0GAA0G;IAC1G,wEAA+C,CAAA;IAC/C,yDAAyD;IACzD,8DAAqC,CAAA;IACrC,6PAA6P;IAC7P,0DAAiC,CAAA;AACnC,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AAuJD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB"}
|
|
@@ -4,6 +4,7 @@ export interface GetChargeLimitRequest {
|
|
|
4
4
|
* `null` in case Wix hasn't created the subscription when retrieving an
|
|
5
5
|
* initial charge limit. To track usage and billing for apps, we recommend to
|
|
6
6
|
* use `instanceId` instead of the `subscriptionId`.
|
|
7
|
+
* @format GUID
|
|
7
8
|
*/
|
|
8
9
|
subscriptionId?: string | null;
|
|
9
10
|
/**
|
|
@@ -12,6 +13,7 @@ export interface GetChargeLimitRequest {
|
|
|
12
13
|
* 3-letter currency code in
|
|
13
14
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
14
15
|
* format of the charge limit. Wix may add supported currencies in the future.
|
|
16
|
+
* @format CURRENCY
|
|
15
17
|
*/
|
|
16
18
|
currency?: string;
|
|
17
19
|
}
|
|
@@ -20,6 +22,8 @@ export interface GetChargeLimitResponse {
|
|
|
20
22
|
* Retrieved charge limit for the app instance. You can't update the
|
|
21
23
|
* charge limit after you've set an initial value. Site owners can increase the
|
|
22
24
|
* limit in their site's dashboard, currently they aren't allowed to decrease it.
|
|
25
|
+
* @format DECIMAL_VALUE
|
|
26
|
+
* @decimalValue options { gt:0.00 }
|
|
23
27
|
*/
|
|
24
28
|
chargeLimit?: string | null;
|
|
25
29
|
}
|
|
@@ -28,6 +32,7 @@ export interface ListChargesRequest {
|
|
|
28
32
|
* ID of the subscription for which Wix retrieves your custom charges.
|
|
29
33
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
30
34
|
* of the `subscriptionId`.
|
|
35
|
+
* @format GUID
|
|
31
36
|
*/
|
|
32
37
|
subscriptionId?: string;
|
|
33
38
|
/**
|
|
@@ -36,6 +41,7 @@ export interface ListChargesRequest {
|
|
|
36
41
|
* 3-letter currency code in
|
|
37
42
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
38
43
|
* format of your charges to return. Wix may add supported currencies in the future.
|
|
44
|
+
* @format CURRENCY
|
|
39
45
|
*/
|
|
40
46
|
currency?: string;
|
|
41
47
|
/**
|
|
@@ -62,6 +68,7 @@ export interface ListChargesResponse {
|
|
|
62
68
|
* Retrieved charges.
|
|
63
69
|
*
|
|
64
70
|
* Max: 5 charges
|
|
71
|
+
* @maxSize 5
|
|
65
72
|
*/
|
|
66
73
|
charges?: ChargeLineItem[];
|
|
67
74
|
}
|
|
@@ -71,6 +78,7 @@ export interface ChargeLineItem {
|
|
|
71
78
|
* reference. Identical to `lineItem.chargeId` in the Invoice Created Event.
|
|
72
79
|
*
|
|
73
80
|
* Max: 64 characters
|
|
81
|
+
* @maxLength 64
|
|
74
82
|
*/
|
|
75
83
|
_id?: string | null;
|
|
76
84
|
/** Charge description. */
|
|
@@ -83,6 +91,7 @@ export interface ChargeLineItem {
|
|
|
83
91
|
* Wix truncates the additional minor units.
|
|
84
92
|
*
|
|
85
93
|
* Min: `0.50`
|
|
94
|
+
* @format DECIMAL_VALUE
|
|
86
95
|
*/
|
|
87
96
|
amount?: string;
|
|
88
97
|
}
|
|
@@ -91,6 +100,7 @@ export interface ChargesRejectedRequest {
|
|
|
91
100
|
* ID of the subscription for which Wix hasn't accepted your custom charges.
|
|
92
101
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
93
102
|
* of the `subscriptionId`.
|
|
103
|
+
* @format GUID
|
|
94
104
|
*/
|
|
95
105
|
subscriptionId?: string;
|
|
96
106
|
/**
|
|
@@ -99,24 +109,29 @@ export interface ChargesRejectedRequest {
|
|
|
99
109
|
* 3-letter currency code in
|
|
100
110
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
101
111
|
* format of the charges. Wix may add supported currencies in the future.
|
|
112
|
+
* @format CURRENCY
|
|
102
113
|
*/
|
|
103
114
|
currency?: string;
|
|
104
115
|
/**
|
|
105
116
|
* IDs of the rejected charges.
|
|
106
117
|
*
|
|
107
118
|
* Max: 5 charges
|
|
119
|
+
* @maxSize 5
|
|
108
120
|
*/
|
|
109
121
|
chargeIds?: string[] | null;
|
|
110
122
|
/**
|
|
111
123
|
* Maximum amount that your app may charge the customer per billing cycle.
|
|
112
124
|
*
|
|
113
125
|
* Min: `0.50`
|
|
126
|
+
* @format DECIMAL_VALUE
|
|
127
|
+
* @decimalValue options { gt:0.00 }
|
|
114
128
|
*/
|
|
115
129
|
chargeLimit?: string | null;
|
|
116
130
|
/**
|
|
117
131
|
* Information about why Wix has rejected your app's charges.
|
|
118
132
|
*
|
|
119
133
|
* Max: 20 reasons
|
|
134
|
+
* @maxSize 20
|
|
120
135
|
*/
|
|
121
136
|
reasons?: ChargesRejectedReason[];
|
|
122
137
|
}
|
|
@@ -137,6 +152,7 @@ export interface InvoiceCreatedRequest {
|
|
|
137
152
|
* ID of the subscription for which Wix has created an invoice that includes
|
|
138
153
|
* your custom charges. To track usage and billing for apps, we recommend to use
|
|
139
154
|
* `instanceId` instead of the `subscriptionId`.
|
|
155
|
+
* @format GUID
|
|
140
156
|
*/
|
|
141
157
|
subscriptionId?: string;
|
|
142
158
|
/**
|
|
@@ -145,11 +161,15 @@ export interface InvoiceCreatedRequest {
|
|
|
145
161
|
* 3-letter currency code in
|
|
146
162
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
147
163
|
* format of the charges. Wix may add supported currencies in the future.
|
|
164
|
+
* @format CURRENCY
|
|
148
165
|
*/
|
|
149
166
|
currency?: string;
|
|
150
167
|
/** ID of the created invoice. */
|
|
151
168
|
invoiceId?: string;
|
|
152
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Line items included in the invoice.
|
|
171
|
+
* @maxSize 5
|
|
172
|
+
*/
|
|
153
173
|
lineItems?: InvoiceLineItem[];
|
|
154
174
|
}
|
|
155
175
|
export interface InvoiceLineItem {
|
|
@@ -157,11 +177,18 @@ export interface InvoiceLineItem {
|
|
|
157
177
|
* ID of the charge as returned in List Charges.
|
|
158
178
|
*
|
|
159
179
|
* Max: 64 characters
|
|
180
|
+
* @maxLength 64
|
|
160
181
|
*/
|
|
161
182
|
chargeId?: string | null;
|
|
162
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Charge amount.
|
|
185
|
+
* @format DECIMAL_VALUE
|
|
186
|
+
*/
|
|
163
187
|
amount?: string;
|
|
164
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* ID of the line item in the invoice that Wix sends to the customer.
|
|
190
|
+
* @format GUID
|
|
191
|
+
*/
|
|
165
192
|
_id?: string;
|
|
166
193
|
}
|
|
167
194
|
export interface InvoiceCreatedResponse {
|
|
@@ -171,6 +198,7 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
171
198
|
* ID of the subscription for which the charge limit has been updated.
|
|
172
199
|
* To track usage and billing for apps, we recommend to use `instanceId` instead
|
|
173
200
|
* of the `subscriptionId`.
|
|
201
|
+
* @format GUID
|
|
174
202
|
*/
|
|
175
203
|
subscriptionId?: string;
|
|
176
204
|
/**
|
|
@@ -179,9 +207,13 @@ export interface ChargeLimitUpdatedRequest {
|
|
|
179
207
|
* 3-letter currency code in
|
|
180
208
|
* [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
|
|
181
209
|
* format of the charges. Wix may add supported currencies in the future.
|
|
210
|
+
* @format CURRENCY
|
|
182
211
|
*/
|
|
183
212
|
currency?: string;
|
|
184
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Updated charge limit.
|
|
215
|
+
* @format DECIMAL_VALUE
|
|
216
|
+
*/
|
|
185
217
|
chargeLimit?: string | null;
|
|
186
218
|
}
|
|
187
219
|
export interface ChargeLimitUpdatedResponse {
|
|
@@ -199,6 +231,8 @@ export interface SpiBaseUri {
|
|
|
199
231
|
/**
|
|
200
232
|
* Base URI where the methods are called. Wix appends the path to the `baseUri`.
|
|
201
233
|
* For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
|
|
234
|
+
* @minLength 6
|
|
235
|
+
* @maxLength 2048
|
|
202
236
|
*/
|
|
203
237
|
baseUri?: string;
|
|
204
238
|
/** Alternate, custom URIs to replace the default URIs for specific service plugin methods. */
|
|
@@ -210,11 +244,15 @@ export interface AlternativeUri {
|
|
|
210
244
|
*
|
|
211
245
|
* For `methodName`, use the name of the method in PascalCase.
|
|
212
246
|
* For example, for Get Shipping Rates use `GetShippingRates`.
|
|
247
|
+
* @minLength 3
|
|
248
|
+
* @maxLength 128
|
|
213
249
|
*/
|
|
214
250
|
methodName?: string;
|
|
215
251
|
/**
|
|
216
252
|
* Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
|
|
217
253
|
* Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
|
|
254
|
+
* @minLength 6
|
|
255
|
+
* @maxLength 2048
|
|
218
256
|
*/
|
|
219
257
|
absoluteUri?: string;
|
|
220
258
|
}
|
|
@@ -234,13 +272,19 @@ export interface AlternativeUri {
|
|
|
234
272
|
export interface Context {
|
|
235
273
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
236
274
|
requestId?: string | null;
|
|
237
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
|
|
277
|
+
* @format CURRENCY
|
|
278
|
+
*/
|
|
238
279
|
currency?: string | null;
|
|
239
280
|
/** An object that describes the identity that triggered this request. */
|
|
240
281
|
identity?: IdentificationData;
|
|
241
282
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
242
283
|
languages?: string[];
|
|
243
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The service provider app's instance ID.
|
|
286
|
+
* @format GUID
|
|
287
|
+
*/
|
|
244
288
|
instanceId?: string | null;
|
|
245
289
|
}
|
|
246
290
|
export declare enum IdentityType {
|
|
@@ -251,25 +295,49 @@ export declare enum IdentityType {
|
|
|
251
295
|
APP = "APP"
|
|
252
296
|
}
|
|
253
297
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
254
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* ID of a site visitor that has not logged in to the site.
|
|
300
|
+
* @format GUID
|
|
301
|
+
*/
|
|
255
302
|
anonymousVisitorId?: string;
|
|
256
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* ID of a site visitor that has logged in to the site.
|
|
305
|
+
* @format GUID
|
|
306
|
+
*/
|
|
257
307
|
memberId?: string;
|
|
258
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
310
|
+
* @format GUID
|
|
311
|
+
*/
|
|
259
312
|
wixUserId?: string;
|
|
260
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* ID of an app.
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
261
317
|
appId?: string;
|
|
262
318
|
/** @readonly */
|
|
263
319
|
identityType?: IdentityType;
|
|
264
320
|
}
|
|
265
321
|
/** @oneof */
|
|
266
322
|
export interface IdentificationDataIdOneOf {
|
|
267
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* ID of a site visitor that has not logged in to the site.
|
|
325
|
+
* @format GUID
|
|
326
|
+
*/
|
|
268
327
|
anonymousVisitorId?: string;
|
|
269
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* ID of a site visitor that has logged in to the site.
|
|
330
|
+
* @format GUID
|
|
331
|
+
*/
|
|
270
332
|
memberId?: string;
|
|
271
|
-
/**
|
|
333
|
+
/**
|
|
334
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
335
|
+
* @format GUID
|
|
336
|
+
*/
|
|
272
337
|
wixUserId?: string;
|
|
273
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* ID of an app.
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
274
342
|
appId?: string;
|
|
275
343
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":"AA8DA,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,kHAAkH;IAClH,uCAA6B,CAAA;IAC7B,0CAA0C;IAC1C,2CAAiC,CAAA;AACnC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB;AA6ED,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,sEAAsE;IACtE,4CAAmB,CAAA;IACnB,0GAA0G;IAC1G,wEAA+C,CAAA;IAC/C,yDAAyD;IACzD,8DAAqC,CAAA;IACrC,6PAA6P;IAC7P,0DAAiC,CAAA;AACnC,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAuJD,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_app-management_custom-charges",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"service-plugins"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@wix/sdk-runtime": "^0.3.
|
|
32
|
-
"@wix/sdk-types": "^1.
|
|
31
|
+
"@wix/sdk-runtime": "^0.3.42",
|
|
32
|
+
"@wix/sdk-types": "^1.13.9"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"typescript": "^5.3.2"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"fqdn": "wix.interfaces.premium.v1.custom_charges_provider"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "5f52f0181eaefc5f4d6049835a88e44c7bed93feb70aa8ef03e6f96f"
|
|
52
52
|
}
|