@wix/app-management 1.0.33 → 1.0.35
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/app-management",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"service-plugins"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@wix/app-management_app-instances": "1.0.
|
|
23
|
-
"@wix/app-management_app-plans": "1.0.
|
|
24
|
-
"@wix/app-management_bi-events": "1.0.
|
|
25
|
-
"@wix/app-management_billing": "1.0.
|
|
22
|
+
"@wix/app-management_app-instances": "1.0.20",
|
|
23
|
+
"@wix/app-management_app-plans": "1.0.19",
|
|
24
|
+
"@wix/app-management_bi-events": "1.0.18",
|
|
25
|
+
"@wix/app-management_billing": "1.0.19",
|
|
26
26
|
"@wix/app-management_custom-charges": "1.0.15",
|
|
27
27
|
"@wix/app-management_embedded-scripts": "1.0.15"
|
|
28
28
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"fqdn": ""
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"falconPackageHash": "
|
|
52
|
+
"falconPackageHash": "9904f6c73ad75d44c4d2763f0c9cc0c4b0ef4aabddeddd97f9a0c89a"
|
|
53
53
|
}
|
|
@@ -43,7 +43,7 @@ declare global {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
interface AppPlans {
|
|
46
|
-
/** App ID, as defined in the [
|
|
46
|
+
/** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
47
47
|
_id?: string;
|
|
48
48
|
/**
|
|
49
49
|
* List of the app's pricing plans.
|
|
@@ -53,6 +53,13 @@ interface AppPlans {
|
|
|
53
53
|
*/
|
|
54
54
|
plans?: Plan[];
|
|
55
55
|
}
|
|
56
|
+
declare enum DiscountType {
|
|
57
|
+
DISCOUNT_TYPE_UNSPECIFIED = "DISCOUNT_TYPE_UNSPECIFIED",
|
|
58
|
+
/** Discount is a fixed amount in USD. */
|
|
59
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
60
|
+
/** Discount is a percentage of the total price. */
|
|
61
|
+
PERCENTAGE = "PERCENTAGE"
|
|
62
|
+
}
|
|
56
63
|
interface Cycle {
|
|
57
64
|
/**
|
|
58
65
|
* Type of the billing cycle.
|
|
@@ -104,13 +111,33 @@ interface UsageBasedDetails {
|
|
|
104
111
|
*/
|
|
105
112
|
monthlyBaseFee?: string | null;
|
|
106
113
|
/**
|
|
107
|
-
* Description of the usaged-based pricing plan, as defined in the
|
|
108
|
-
* [Dev Center](https://dev.wix.com/).
|
|
114
|
+
* Description of the usaged-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
109
115
|
*
|
|
110
116
|
* Max: 1024 characters
|
|
111
117
|
*/
|
|
112
118
|
customChargeDescription?: string | null;
|
|
113
119
|
}
|
|
120
|
+
interface Discount {
|
|
121
|
+
type?: DiscountType;
|
|
122
|
+
/** Discount amount */
|
|
123
|
+
amount?: string;
|
|
124
|
+
/** if a discount is applied to a specific sale */
|
|
125
|
+
saleId?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
128
|
+
* average price per month. You can get thefull price by multiplying the
|
|
129
|
+
* returned price with 12.
|
|
130
|
+
* Min: `0.00`
|
|
131
|
+
* Max: 1024 characters
|
|
132
|
+
*/
|
|
133
|
+
priceBeforeTax?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Total price including taxes.
|
|
136
|
+
* Min: `0.00`
|
|
137
|
+
* Max: 1024 characters
|
|
138
|
+
*/
|
|
139
|
+
totalPrice?: string;
|
|
140
|
+
}
|
|
114
141
|
interface Price {
|
|
115
142
|
/**
|
|
116
143
|
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
@@ -136,6 +163,7 @@ interface Price {
|
|
|
136
163
|
* [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
|
|
137
164
|
*/
|
|
138
165
|
usageBaseOptions?: UsageBasedDetails;
|
|
166
|
+
discount?: Discount;
|
|
139
167
|
}
|
|
140
168
|
interface Plan {
|
|
141
169
|
/**
|
|
@@ -144,15 +172,15 @@ interface Plan {
|
|
|
144
172
|
*/
|
|
145
173
|
_id?: string;
|
|
146
174
|
/**
|
|
147
|
-
* ID of your app's pricing plan, as displayed in the [
|
|
175
|
+
* ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
148
176
|
* Identical to `vendorProductId` in the
|
|
149
177
|
* [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
150
178
|
*/
|
|
151
179
|
vendorId?: string;
|
|
152
|
-
/** Name of your app's pricing plan, as defined by you in the [
|
|
180
|
+
/** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
153
181
|
name?: string;
|
|
154
182
|
/**
|
|
155
|
-
* List of your plan's benefits, as defined by you in the [
|
|
183
|
+
* List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
156
184
|
* Currently, the benefits are available only in English.
|
|
157
185
|
*
|
|
158
186
|
* Min: `0` benefits
|
|
@@ -248,10 +276,17 @@ interface CycleNonNullableFields {
|
|
|
248
276
|
cycleType: CycleType;
|
|
249
277
|
cycleDuration?: DurationNonNullableFields;
|
|
250
278
|
}
|
|
279
|
+
interface DiscountNonNullableFields {
|
|
280
|
+
type: DiscountType;
|
|
281
|
+
amount: string;
|
|
282
|
+
priceBeforeTax: string;
|
|
283
|
+
totalPrice: string;
|
|
284
|
+
}
|
|
251
285
|
interface PriceNonNullableFields {
|
|
252
286
|
priceBeforeTax: string;
|
|
253
287
|
totalPrice: string;
|
|
254
288
|
billingCycle?: CycleNonNullableFields;
|
|
289
|
+
discount?: DiscountNonNullableFields;
|
|
255
290
|
}
|
|
256
291
|
interface PlanNonNullableFields {
|
|
257
292
|
_id: string;
|
|
@@ -311,6 +346,9 @@ type context$4_AppPlans = AppPlans;
|
|
|
311
346
|
type context$4_Cycle = Cycle;
|
|
312
347
|
type context$4_CycleType = CycleType;
|
|
313
348
|
declare const context$4_CycleType: typeof CycleType;
|
|
349
|
+
type context$4_Discount = Discount;
|
|
350
|
+
type context$4_DiscountType = DiscountType;
|
|
351
|
+
declare const context$4_DiscountType: typeof DiscountType;
|
|
314
352
|
type context$4_Duration = Duration;
|
|
315
353
|
type context$4_DurationUnit = DurationUnit;
|
|
316
354
|
declare const context$4_DurationUnit: typeof DurationUnit;
|
|
@@ -325,7 +363,7 @@ declare const context$4_TaxType: typeof TaxType;
|
|
|
325
363
|
type context$4_UsageBasedDetails = UsageBasedDetails;
|
|
326
364
|
declare const context$4_listAppPlansByAppId: typeof listAppPlansByAppId;
|
|
327
365
|
declare namespace context$4 {
|
|
328
|
-
export { type context$4_AppPlans as AppPlans, type context$4_Cycle as Cycle, context$4_CycleType as CycleType, type context$4_Duration as Duration, context$4_DurationUnit as DurationUnit, type context$4_ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequest, type context$4_ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponse, type context$4_ListAppPlansByAppIdResponseNonNullableFields as ListAppPlansByAppIdResponseNonNullableFields, type context$4_Plan as Plan, type context$4_Price as Price, type context$4_TaxSettings as TaxSettings, context$4_TaxType as TaxType, type context$4_UsageBasedDetails as UsageBasedDetails, context$4_listAppPlansByAppId as listAppPlansByAppId };
|
|
366
|
+
export { type context$4_AppPlans as AppPlans, type context$4_Cycle as Cycle, context$4_CycleType as CycleType, type context$4_Discount as Discount, context$4_DiscountType as DiscountType, type context$4_Duration as Duration, context$4_DurationUnit as DurationUnit, type context$4_ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequest, type context$4_ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponse, type context$4_ListAppPlansByAppIdResponseNonNullableFields as ListAppPlansByAppIdResponseNonNullableFields, type context$4_Plan as Plan, type context$4_Price as Price, type context$4_TaxSettings as TaxSettings, context$4_TaxType as TaxType, type context$4_UsageBasedDetails as UsageBasedDetails, context$4_listAppPlansByAppId as listAppPlansByAppId };
|
|
329
367
|
}
|
|
330
368
|
|
|
331
369
|
/**
|
|
@@ -342,14 +380,11 @@ interface AppInstance {
|
|
|
342
380
|
*/
|
|
343
381
|
instanceId?: string;
|
|
344
382
|
/**
|
|
345
|
-
* App name, as set by you in the
|
|
383
|
+
* App name, as set by you in the Customs Apps page during the app creation
|
|
346
384
|
* process.
|
|
347
385
|
*/
|
|
348
386
|
appName?: string;
|
|
349
|
-
/**
|
|
350
|
-
* Version of your app that's installed on the Wix site, as set by you in the
|
|
351
|
-
* Wix Developers Center during the app creation process.
|
|
352
|
-
*/
|
|
387
|
+
/** Version of your app that's installed on the Wix site, as set by you during the app creation process. */
|
|
353
388
|
appVersion?: string | null;
|
|
354
389
|
/**
|
|
355
390
|
* Whether the site owners have installed a free or paid version of your app
|
|
@@ -364,7 +399,7 @@ interface AppInstance {
|
|
|
364
399
|
/**
|
|
365
400
|
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
366
401
|
* that the site owners have granted your app. You set the list of permissions that
|
|
367
|
-
* your app requires from the site owners in
|
|
402
|
+
* your app requires from the site owners in your app's Permissions page during the
|
|
368
403
|
* app creation process.
|
|
369
404
|
*/
|
|
370
405
|
permissions?: string[];
|
|
@@ -837,7 +872,7 @@ interface SendBIEventRequest {
|
|
|
837
872
|
* Name of the event that's triggered in your app.
|
|
838
873
|
*
|
|
839
874
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
840
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
875
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
841
876
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
842
877
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
843
878
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -864,7 +899,7 @@ interface SendBIEventRequest {
|
|
|
864
899
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
865
900
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
866
901
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
867
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
902
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
868
903
|
*/
|
|
869
904
|
eventData?: Record<string, string>;
|
|
870
905
|
}
|
|
@@ -886,7 +921,7 @@ interface SendBiEventOptions {
|
|
|
886
921
|
* Name of the event that's triggered in your app.
|
|
887
922
|
*
|
|
888
923
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
889
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
924
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
890
925
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
891
926
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
892
927
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -913,7 +948,7 @@ interface SendBiEventOptions {
|
|
|
913
948
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
914
949
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
915
950
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
916
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
951
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
917
952
|
*/
|
|
918
953
|
eventData?: Record<string, string>;
|
|
919
954
|
}
|
|
@@ -986,8 +1021,8 @@ declare enum InvoiceStatus {
|
|
|
986
1021
|
}
|
|
987
1022
|
interface GetUrlRequest {
|
|
988
1023
|
/**
|
|
989
|
-
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
990
|
-
*
|
|
1024
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1025
|
+
* for a list of your app's supported product IDs.
|
|
991
1026
|
*/
|
|
992
1027
|
productId: string;
|
|
993
1028
|
/**
|
|
@@ -1024,8 +1059,7 @@ interface GetUrlRequest {
|
|
|
1024
1059
|
interface ChargeOverride {
|
|
1025
1060
|
/**
|
|
1026
1061
|
* Override price. In case you omit the override price, Wix charges site
|
|
1027
|
-
* owners the app's default price that's configured in the
|
|
1028
|
-
* Center.
|
|
1062
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
1029
1063
|
*/
|
|
1030
1064
|
price?: number;
|
|
1031
1065
|
/**
|
|
@@ -1198,14 +1232,14 @@ interface GetUrlSignature {
|
|
|
1198
1232
|
*
|
|
1199
1233
|
*
|
|
1200
1234
|
* This call succeeds only in case you have previously
|
|
1201
|
-
* [set up an external pricing page in
|
|
1235
|
+
* [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).
|
|
1202
1236
|
*
|
|
1203
1237
|
* The returned checkout URL is valid for 48 hours.
|
|
1204
1238
|
*
|
|
1205
1239
|
* This API allows your app to manage your pricing page outside of Wix while
|
|
1206
1240
|
* still using the standard Wix checkout flow.
|
|
1207
|
-
* @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
1208
|
-
*
|
|
1241
|
+
* @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1242
|
+
* for a list of your app's supported product IDs.
|
|
1209
1243
|
*/
|
|
1210
1244
|
(productId: string, options?: GetUrlOptions | undefined): Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
1211
1245
|
}
|
|
@@ -43,7 +43,7 @@ declare global {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
interface AppPlans {
|
|
46
|
-
/** App ID, as defined in the [
|
|
46
|
+
/** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
47
47
|
_id?: string;
|
|
48
48
|
/**
|
|
49
49
|
* List of the app's pricing plans.
|
|
@@ -53,6 +53,13 @@ interface AppPlans {
|
|
|
53
53
|
*/
|
|
54
54
|
plans?: Plan[];
|
|
55
55
|
}
|
|
56
|
+
declare enum DiscountType {
|
|
57
|
+
DISCOUNT_TYPE_UNSPECIFIED = "DISCOUNT_TYPE_UNSPECIFIED",
|
|
58
|
+
/** Discount is a fixed amount in USD. */
|
|
59
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
60
|
+
/** Discount is a percentage of the total price. */
|
|
61
|
+
PERCENTAGE = "PERCENTAGE"
|
|
62
|
+
}
|
|
56
63
|
interface Cycle {
|
|
57
64
|
/**
|
|
58
65
|
* Type of the billing cycle.
|
|
@@ -104,13 +111,33 @@ interface UsageBasedDetails {
|
|
|
104
111
|
*/
|
|
105
112
|
monthlyBaseFee?: string | null;
|
|
106
113
|
/**
|
|
107
|
-
* Description of the usaged-based pricing plan, as defined in the
|
|
108
|
-
* [Dev Center](https://dev.wix.com/).
|
|
114
|
+
* Description of the usaged-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
109
115
|
*
|
|
110
116
|
* Max: 1024 characters
|
|
111
117
|
*/
|
|
112
118
|
customChargeDescription?: string | null;
|
|
113
119
|
}
|
|
120
|
+
interface Discount {
|
|
121
|
+
type?: DiscountType;
|
|
122
|
+
/** Discount amount */
|
|
123
|
+
amount?: string;
|
|
124
|
+
/** if a discount is applied to a specific sale */
|
|
125
|
+
saleId?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
128
|
+
* average price per month. You can get thefull price by multiplying the
|
|
129
|
+
* returned price with 12.
|
|
130
|
+
* Min: `0.00`
|
|
131
|
+
* Max: 1024 characters
|
|
132
|
+
*/
|
|
133
|
+
priceBeforeTax?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Total price including taxes.
|
|
136
|
+
* Min: `0.00`
|
|
137
|
+
* Max: 1024 characters
|
|
138
|
+
*/
|
|
139
|
+
totalPrice?: string;
|
|
140
|
+
}
|
|
114
141
|
interface Price {
|
|
115
142
|
/**
|
|
116
143
|
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
@@ -136,6 +163,7 @@ interface Price {
|
|
|
136
163
|
* [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
|
|
137
164
|
*/
|
|
138
165
|
usageBaseOptions?: UsageBasedDetails;
|
|
166
|
+
discount?: Discount;
|
|
139
167
|
}
|
|
140
168
|
interface Plan {
|
|
141
169
|
/**
|
|
@@ -144,15 +172,15 @@ interface Plan {
|
|
|
144
172
|
*/
|
|
145
173
|
_id?: string;
|
|
146
174
|
/**
|
|
147
|
-
* ID of your app's pricing plan, as displayed in the [
|
|
175
|
+
* ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
148
176
|
* Identical to `vendorProductId` in the
|
|
149
177
|
* [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
150
178
|
*/
|
|
151
179
|
vendorId?: string;
|
|
152
|
-
/** Name of your app's pricing plan, as defined by you in the [
|
|
180
|
+
/** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
153
181
|
name?: string;
|
|
154
182
|
/**
|
|
155
|
-
* List of your plan's benefits, as defined by you in the [
|
|
183
|
+
* List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
156
184
|
* Currently, the benefits are available only in English.
|
|
157
185
|
*
|
|
158
186
|
* Min: `0` benefits
|
|
@@ -248,10 +276,17 @@ interface CycleNonNullableFields {
|
|
|
248
276
|
cycleType: CycleType;
|
|
249
277
|
cycleDuration?: DurationNonNullableFields;
|
|
250
278
|
}
|
|
279
|
+
interface DiscountNonNullableFields {
|
|
280
|
+
type: DiscountType;
|
|
281
|
+
amount: string;
|
|
282
|
+
priceBeforeTax: string;
|
|
283
|
+
totalPrice: string;
|
|
284
|
+
}
|
|
251
285
|
interface PriceNonNullableFields {
|
|
252
286
|
priceBeforeTax: string;
|
|
253
287
|
totalPrice: string;
|
|
254
288
|
billingCycle?: CycleNonNullableFields;
|
|
289
|
+
discount?: DiscountNonNullableFields;
|
|
255
290
|
}
|
|
256
291
|
interface PlanNonNullableFields {
|
|
257
292
|
_id: string;
|
|
@@ -311,6 +346,9 @@ type index_d$4_AppPlans = AppPlans;
|
|
|
311
346
|
type index_d$4_Cycle = Cycle;
|
|
312
347
|
type index_d$4_CycleType = CycleType;
|
|
313
348
|
declare const index_d$4_CycleType: typeof CycleType;
|
|
349
|
+
type index_d$4_Discount = Discount;
|
|
350
|
+
type index_d$4_DiscountType = DiscountType;
|
|
351
|
+
declare const index_d$4_DiscountType: typeof DiscountType;
|
|
314
352
|
type index_d$4_Duration = Duration;
|
|
315
353
|
type index_d$4_DurationUnit = DurationUnit;
|
|
316
354
|
declare const index_d$4_DurationUnit: typeof DurationUnit;
|
|
@@ -325,7 +363,7 @@ declare const index_d$4_TaxType: typeof TaxType;
|
|
|
325
363
|
type index_d$4_UsageBasedDetails = UsageBasedDetails;
|
|
326
364
|
declare const index_d$4_listAppPlansByAppId: typeof listAppPlansByAppId;
|
|
327
365
|
declare namespace index_d$4 {
|
|
328
|
-
export { type index_d$4_AppPlans as AppPlans, type index_d$4_Cycle as Cycle, index_d$4_CycleType as CycleType, type index_d$4_Duration as Duration, index_d$4_DurationUnit as DurationUnit, type index_d$4_ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequest, type index_d$4_ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponse, type index_d$4_ListAppPlansByAppIdResponseNonNullableFields as ListAppPlansByAppIdResponseNonNullableFields, type index_d$4_Plan as Plan, type index_d$4_Price as Price, type index_d$4_TaxSettings as TaxSettings, index_d$4_TaxType as TaxType, type index_d$4_UsageBasedDetails as UsageBasedDetails, index_d$4_listAppPlansByAppId as listAppPlansByAppId };
|
|
366
|
+
export { type index_d$4_AppPlans as AppPlans, type index_d$4_Cycle as Cycle, index_d$4_CycleType as CycleType, type index_d$4_Discount as Discount, index_d$4_DiscountType as DiscountType, type index_d$4_Duration as Duration, index_d$4_DurationUnit as DurationUnit, type index_d$4_ListAppPlansByAppIdRequest as ListAppPlansByAppIdRequest, type index_d$4_ListAppPlansByAppIdResponse as ListAppPlansByAppIdResponse, type index_d$4_ListAppPlansByAppIdResponseNonNullableFields as ListAppPlansByAppIdResponseNonNullableFields, type index_d$4_Plan as Plan, type index_d$4_Price as Price, type index_d$4_TaxSettings as TaxSettings, index_d$4_TaxType as TaxType, type index_d$4_UsageBasedDetails as UsageBasedDetails, index_d$4_listAppPlansByAppId as listAppPlansByAppId };
|
|
329
367
|
}
|
|
330
368
|
|
|
331
369
|
/**
|
|
@@ -342,14 +380,11 @@ interface AppInstance {
|
|
|
342
380
|
*/
|
|
343
381
|
instanceId?: string;
|
|
344
382
|
/**
|
|
345
|
-
* App name, as set by you in the
|
|
383
|
+
* App name, as set by you in the Customs Apps page during the app creation
|
|
346
384
|
* process.
|
|
347
385
|
*/
|
|
348
386
|
appName?: string;
|
|
349
|
-
/**
|
|
350
|
-
* Version of your app that's installed on the Wix site, as set by you in the
|
|
351
|
-
* Wix Developers Center during the app creation process.
|
|
352
|
-
*/
|
|
387
|
+
/** Version of your app that's installed on the Wix site, as set by you during the app creation process. */
|
|
353
388
|
appVersion?: string | null;
|
|
354
389
|
/**
|
|
355
390
|
* Whether the site owners have installed a free or paid version of your app
|
|
@@ -364,7 +399,7 @@ interface AppInstance {
|
|
|
364
399
|
/**
|
|
365
400
|
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
366
401
|
* that the site owners have granted your app. You set the list of permissions that
|
|
367
|
-
* your app requires from the site owners in
|
|
402
|
+
* your app requires from the site owners in your app's Permissions page during the
|
|
368
403
|
* app creation process.
|
|
369
404
|
*/
|
|
370
405
|
permissions?: string[];
|
|
@@ -837,7 +872,7 @@ interface SendBIEventRequest {
|
|
|
837
872
|
* Name of the event that's triggered in your app.
|
|
838
873
|
*
|
|
839
874
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
840
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
875
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
841
876
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
842
877
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
843
878
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -864,7 +899,7 @@ interface SendBIEventRequest {
|
|
|
864
899
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
865
900
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
866
901
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
867
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
902
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
868
903
|
*/
|
|
869
904
|
eventData?: Record<string, string>;
|
|
870
905
|
}
|
|
@@ -886,7 +921,7 @@ interface SendBiEventOptions {
|
|
|
886
921
|
* Name of the event that's triggered in your app.
|
|
887
922
|
*
|
|
888
923
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
889
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
924
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
890
925
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
891
926
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
892
927
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -913,7 +948,7 @@ interface SendBiEventOptions {
|
|
|
913
948
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
914
949
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
915
950
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
916
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
951
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
917
952
|
*/
|
|
918
953
|
eventData?: Record<string, string>;
|
|
919
954
|
}
|
|
@@ -986,8 +1021,8 @@ declare enum InvoiceStatus {
|
|
|
986
1021
|
}
|
|
987
1022
|
interface GetUrlRequest {
|
|
988
1023
|
/**
|
|
989
|
-
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
990
|
-
*
|
|
1024
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1025
|
+
* for a list of your app's supported product IDs.
|
|
991
1026
|
*/
|
|
992
1027
|
productId: string;
|
|
993
1028
|
/**
|
|
@@ -1024,8 +1059,7 @@ interface GetUrlRequest {
|
|
|
1024
1059
|
interface ChargeOverride {
|
|
1025
1060
|
/**
|
|
1026
1061
|
* Override price. In case you omit the override price, Wix charges site
|
|
1027
|
-
* owners the app's default price that's configured in the
|
|
1028
|
-
* Center.
|
|
1062
|
+
* owners the app's default price that's configured in the Pricing page of your app's dashboard.
|
|
1029
1063
|
*/
|
|
1030
1064
|
price?: number;
|
|
1031
1065
|
/**
|
|
@@ -1198,14 +1232,14 @@ interface GetUrlSignature {
|
|
|
1198
1232
|
*
|
|
1199
1233
|
*
|
|
1200
1234
|
* This call succeeds only in case you have previously
|
|
1201
|
-
* [set up an external pricing page in
|
|
1235
|
+
* [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).
|
|
1202
1236
|
*
|
|
1203
1237
|
* The returned checkout URL is valid for 48 hours.
|
|
1204
1238
|
*
|
|
1205
1239
|
* This API allows your app to manage your pricing page outside of Wix while
|
|
1206
1240
|
* still using the standard Wix checkout flow.
|
|
1207
|
-
* @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
1208
|
-
*
|
|
1241
|
+
* @param - ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1242
|
+
* for a list of your app's supported product IDs.
|
|
1209
1243
|
*/
|
|
1210
1244
|
(productId: string, options?: GetUrlOptions | undefined): Promise<GetUrlResponse & GetUrlResponseNonNullableFields>;
|
|
1211
1245
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface AppPlans$1 {
|
|
2
|
-
/** App ID, as defined in the [
|
|
2
|
+
/** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
3
3
|
id?: string;
|
|
4
4
|
/**
|
|
5
5
|
* List of the app's pricing plans.
|
|
@@ -9,6 +9,13 @@ interface AppPlans$1 {
|
|
|
9
9
|
*/
|
|
10
10
|
plans?: Plan$1[];
|
|
11
11
|
}
|
|
12
|
+
declare enum DiscountType$1 {
|
|
13
|
+
DISCOUNT_TYPE_UNSPECIFIED = "DISCOUNT_TYPE_UNSPECIFIED",
|
|
14
|
+
/** Discount is a fixed amount in USD. */
|
|
15
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
16
|
+
/** Discount is a percentage of the total price. */
|
|
17
|
+
PERCENTAGE = "PERCENTAGE"
|
|
18
|
+
}
|
|
12
19
|
interface Cycle$1 {
|
|
13
20
|
/**
|
|
14
21
|
* Type of the billing cycle.
|
|
@@ -60,13 +67,33 @@ interface UsageBasedDetails$1 {
|
|
|
60
67
|
*/
|
|
61
68
|
monthlyBaseFee?: string | null;
|
|
62
69
|
/**
|
|
63
|
-
* Description of the usaged-based pricing plan, as defined in the
|
|
64
|
-
* [Dev Center](https://dev.wix.com/).
|
|
70
|
+
* Description of the usaged-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
65
71
|
*
|
|
66
72
|
* Max: 1024 characters
|
|
67
73
|
*/
|
|
68
74
|
customChargeDescription?: string | null;
|
|
69
75
|
}
|
|
76
|
+
interface Discount$1 {
|
|
77
|
+
type?: DiscountType$1;
|
|
78
|
+
/** Discount amount */
|
|
79
|
+
amount?: string;
|
|
80
|
+
/** if a discount is applied to a specific sale */
|
|
81
|
+
saleId?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
84
|
+
* average price per month. You can get thefull price by multiplying the
|
|
85
|
+
* returned price with 12.
|
|
86
|
+
* Min: `0.00`
|
|
87
|
+
* Max: 1024 characters
|
|
88
|
+
*/
|
|
89
|
+
priceBeforeTax?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Total price including taxes.
|
|
92
|
+
* Min: `0.00`
|
|
93
|
+
* Max: 1024 characters
|
|
94
|
+
*/
|
|
95
|
+
totalPrice?: string;
|
|
96
|
+
}
|
|
70
97
|
interface Price$1 {
|
|
71
98
|
/**
|
|
72
99
|
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
@@ -92,6 +119,7 @@ interface Price$1 {
|
|
|
92
119
|
* [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
|
|
93
120
|
*/
|
|
94
121
|
usageBaseOptions?: UsageBasedDetails$1;
|
|
122
|
+
discount?: Discount$1;
|
|
95
123
|
}
|
|
96
124
|
interface Plan$1 {
|
|
97
125
|
/**
|
|
@@ -100,15 +128,15 @@ interface Plan$1 {
|
|
|
100
128
|
*/
|
|
101
129
|
id?: string;
|
|
102
130
|
/**
|
|
103
|
-
* ID of your app's pricing plan, as displayed in the [
|
|
131
|
+
* ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
104
132
|
* Identical to `vendorProductId` in the
|
|
105
133
|
* [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
106
134
|
*/
|
|
107
135
|
vendorId?: string;
|
|
108
|
-
/** Name of your app's pricing plan, as defined by you in the [
|
|
136
|
+
/** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
109
137
|
name?: string;
|
|
110
138
|
/**
|
|
111
|
-
* List of your plan's benefits, as defined by you in the [
|
|
139
|
+
* List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
112
140
|
* Currently, the benefits are available only in English.
|
|
113
141
|
*
|
|
114
142
|
* Min: `0` benefits
|
|
@@ -204,10 +232,17 @@ interface CycleNonNullableFields$1 {
|
|
|
204
232
|
cycleType: CycleType$1;
|
|
205
233
|
cycleDuration?: DurationNonNullableFields$1;
|
|
206
234
|
}
|
|
235
|
+
interface DiscountNonNullableFields$1 {
|
|
236
|
+
type: DiscountType$1;
|
|
237
|
+
amount: string;
|
|
238
|
+
priceBeforeTax: string;
|
|
239
|
+
totalPrice: string;
|
|
240
|
+
}
|
|
207
241
|
interface PriceNonNullableFields$1 {
|
|
208
242
|
priceBeforeTax: string;
|
|
209
243
|
totalPrice: string;
|
|
210
244
|
billingCycle?: CycleNonNullableFields$1;
|
|
245
|
+
discount?: DiscountNonNullableFields$1;
|
|
211
246
|
}
|
|
212
247
|
interface PlanNonNullableFields$1 {
|
|
213
248
|
id: string;
|
|
@@ -228,7 +263,7 @@ interface ListAppPlansByAppIdResponseNonNullableFields$1 {
|
|
|
228
263
|
}
|
|
229
264
|
|
|
230
265
|
interface AppPlans {
|
|
231
|
-
/** App ID, as defined in the [
|
|
266
|
+
/** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
232
267
|
_id?: string;
|
|
233
268
|
/**
|
|
234
269
|
* List of the app's pricing plans.
|
|
@@ -238,6 +273,13 @@ interface AppPlans {
|
|
|
238
273
|
*/
|
|
239
274
|
plans?: Plan[];
|
|
240
275
|
}
|
|
276
|
+
declare enum DiscountType {
|
|
277
|
+
DISCOUNT_TYPE_UNSPECIFIED = "DISCOUNT_TYPE_UNSPECIFIED",
|
|
278
|
+
/** Discount is a fixed amount in USD. */
|
|
279
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
280
|
+
/** Discount is a percentage of the total price. */
|
|
281
|
+
PERCENTAGE = "PERCENTAGE"
|
|
282
|
+
}
|
|
241
283
|
interface Cycle {
|
|
242
284
|
/**
|
|
243
285
|
* Type of the billing cycle.
|
|
@@ -289,13 +331,33 @@ interface UsageBasedDetails {
|
|
|
289
331
|
*/
|
|
290
332
|
monthlyBaseFee?: string | null;
|
|
291
333
|
/**
|
|
292
|
-
* Description of the usaged-based pricing plan, as defined in the
|
|
293
|
-
* [Dev Center](https://dev.wix.com/).
|
|
334
|
+
* Description of the usaged-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
294
335
|
*
|
|
295
336
|
* Max: 1024 characters
|
|
296
337
|
*/
|
|
297
338
|
customChargeDescription?: string | null;
|
|
298
339
|
}
|
|
340
|
+
interface Discount {
|
|
341
|
+
type?: DiscountType;
|
|
342
|
+
/** Discount amount */
|
|
343
|
+
amount?: string;
|
|
344
|
+
/** if a discount is applied to a specific sale */
|
|
345
|
+
saleId?: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
348
|
+
* average price per month. You can get thefull price by multiplying the
|
|
349
|
+
* returned price with 12.
|
|
350
|
+
* Min: `0.00`
|
|
351
|
+
* Max: 1024 characters
|
|
352
|
+
*/
|
|
353
|
+
priceBeforeTax?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Total price including taxes.
|
|
356
|
+
* Min: `0.00`
|
|
357
|
+
* Max: 1024 characters
|
|
358
|
+
*/
|
|
359
|
+
totalPrice?: string;
|
|
360
|
+
}
|
|
299
361
|
interface Price {
|
|
300
362
|
/**
|
|
301
363
|
* Price without taxes. For yearly plans, Wix calculates and returns the
|
|
@@ -321,6 +383,7 @@ interface Price {
|
|
|
321
383
|
* [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
|
|
322
384
|
*/
|
|
323
385
|
usageBaseOptions?: UsageBasedDetails;
|
|
386
|
+
discount?: Discount;
|
|
324
387
|
}
|
|
325
388
|
interface Plan {
|
|
326
389
|
/**
|
|
@@ -329,15 +392,15 @@ interface Plan {
|
|
|
329
392
|
*/
|
|
330
393
|
_id?: string;
|
|
331
394
|
/**
|
|
332
|
-
* ID of your app's pricing plan, as displayed in the [
|
|
395
|
+
* ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
333
396
|
* Identical to `vendorProductId` in the
|
|
334
397
|
* [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
335
398
|
*/
|
|
336
399
|
vendorId?: string;
|
|
337
|
-
/** Name of your app's pricing plan, as defined by you in the [
|
|
400
|
+
/** Name of your app's pricing plan, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
|
|
338
401
|
name?: string;
|
|
339
402
|
/**
|
|
340
|
-
* List of your plan's benefits, as defined by you in the [
|
|
403
|
+
* List of your plan's benefits, as defined by you in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
|
|
341
404
|
* Currently, the benefits are available only in English.
|
|
342
405
|
*
|
|
343
406
|
* Min: `0` benefits
|
|
@@ -433,10 +496,17 @@ interface CycleNonNullableFields {
|
|
|
433
496
|
cycleType: CycleType;
|
|
434
497
|
cycleDuration?: DurationNonNullableFields;
|
|
435
498
|
}
|
|
499
|
+
interface DiscountNonNullableFields {
|
|
500
|
+
type: DiscountType;
|
|
501
|
+
amount: string;
|
|
502
|
+
priceBeforeTax: string;
|
|
503
|
+
totalPrice: string;
|
|
504
|
+
}
|
|
436
505
|
interface PriceNonNullableFields {
|
|
437
506
|
priceBeforeTax: string;
|
|
438
507
|
totalPrice: string;
|
|
439
508
|
billingCycle?: CycleNonNullableFields;
|
|
509
|
+
discount?: DiscountNonNullableFields;
|
|
440
510
|
}
|
|
441
511
|
interface PlanNonNullableFields {
|
|
442
512
|
_id: string;
|
|
@@ -489,14 +559,11 @@ interface AppInstance$1 {
|
|
|
489
559
|
*/
|
|
490
560
|
instanceId?: string;
|
|
491
561
|
/**
|
|
492
|
-
* App name, as set by you in the
|
|
562
|
+
* App name, as set by you in the Customs Apps page during the app creation
|
|
493
563
|
* process.
|
|
494
564
|
*/
|
|
495
565
|
appName?: string;
|
|
496
|
-
/**
|
|
497
|
-
* Version of your app that's installed on the Wix site, as set by you in the
|
|
498
|
-
* Wix Developers Center during the app creation process.
|
|
499
|
-
*/
|
|
566
|
+
/** Version of your app that's installed on the Wix site, as set by you during the app creation process. */
|
|
500
567
|
appVersion?: string | null;
|
|
501
568
|
/**
|
|
502
569
|
* Whether the site owners have installed a free or paid version of your app
|
|
@@ -511,7 +578,7 @@ interface AppInstance$1 {
|
|
|
511
578
|
/**
|
|
512
579
|
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
513
580
|
* that the site owners have granted your app. You set the list of permissions that
|
|
514
|
-
* your app requires from the site owners in
|
|
581
|
+
* your app requires from the site owners in your app's Permissions page during the
|
|
515
582
|
* app creation process.
|
|
516
583
|
*/
|
|
517
584
|
permissions?: string[];
|
|
@@ -767,14 +834,11 @@ interface AppInstance {
|
|
|
767
834
|
*/
|
|
768
835
|
instanceId?: string;
|
|
769
836
|
/**
|
|
770
|
-
* App name, as set by you in the
|
|
837
|
+
* App name, as set by you in the Customs Apps page during the app creation
|
|
771
838
|
* process.
|
|
772
839
|
*/
|
|
773
840
|
appName?: string;
|
|
774
|
-
/**
|
|
775
|
-
* Version of your app that's installed on the Wix site, as set by you in the
|
|
776
|
-
* Wix Developers Center during the app creation process.
|
|
777
|
-
*/
|
|
841
|
+
/** Version of your app that's installed on the Wix site, as set by you during the app creation process. */
|
|
778
842
|
appVersion?: string | null;
|
|
779
843
|
/**
|
|
780
844
|
* Whether the site owners have installed a free or paid version of your app
|
|
@@ -789,7 +853,7 @@ interface AppInstance {
|
|
|
789
853
|
/**
|
|
790
854
|
* List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
|
|
791
855
|
* that the site owners have granted your app. You set the list of permissions that
|
|
792
|
-
* your app requires from the site owners in
|
|
856
|
+
* your app requires from the site owners in your app's Permissions page during the
|
|
793
857
|
* app creation process.
|
|
794
858
|
*/
|
|
795
859
|
permissions?: string[];
|
|
@@ -1055,7 +1119,7 @@ interface SendBIEventRequest$1 {
|
|
|
1055
1119
|
* Name of the event that's triggered in your app.
|
|
1056
1120
|
*
|
|
1057
1121
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
1058
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
1122
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
1059
1123
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
1060
1124
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
1061
1125
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -1082,7 +1146,7 @@ interface SendBIEventRequest$1 {
|
|
|
1082
1146
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
1083
1147
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
1084
1148
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
1085
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
1149
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
1086
1150
|
*/
|
|
1087
1151
|
eventData?: Record<string, string>;
|
|
1088
1152
|
}
|
|
@@ -1107,7 +1171,7 @@ interface SendBIEventRequest {
|
|
|
1107
1171
|
* Name of the event that's triggered in your app.
|
|
1108
1172
|
*
|
|
1109
1173
|
* + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
|
|
1110
|
-
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in
|
|
1174
|
+
* + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in your app's dashboard.
|
|
1111
1175
|
* + `"APP_UPGRADED"`: The site owner upgrades your app's paid plan. An upgrade means that they have finished the checkout flow on the app's side but not necessarily on Wix's side.
|
|
1112
1176
|
* + `"PRIMARY_ACTION_PERFORMED"`: A site owner, contributor, or visitor triggers your app's primary action. For example, a site visitor writes a product review using your product review app.
|
|
1113
1177
|
* + `"CHARGE"`: You charge money from the site owner. For example, when the site owner purchases or renews a subscription for your app. Make sure to also send `eventData` and a key of `sum`.
|
|
@@ -1134,7 +1198,7 @@ interface SendBIEventRequest {
|
|
|
1134
1198
|
* + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
|
|
1135
1199
|
* + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
|
|
1136
1200
|
* + `"reason"`: Information about why the event was triggered in your app.
|
|
1137
|
-
* + `"app_plan_id"`: ID of the your app's plan as displayed in
|
|
1201
|
+
* + `"app_plan_id"`: ID of the your app's plan as displayed in your app's dashboard. Note that it's the same value as `vendorProductId` in the [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
|
|
1138
1202
|
*/
|
|
1139
1203
|
eventData?: Record<string, string>;
|
|
1140
1204
|
}
|
|
@@ -1199,8 +1263,8 @@ declare enum PaymentCycle$1 {
|
|
|
1199
1263
|
}
|
|
1200
1264
|
interface GetUrlRequest$1 {
|
|
1201
1265
|
/**
|
|
1202
|
-
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
1203
|
-
*
|
|
1266
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1267
|
+
* for a list of your app's supported product IDs.
|
|
1204
1268
|
*/
|
|
1205
1269
|
productId: string;
|
|
1206
1270
|
/**
|
|
@@ -1293,8 +1357,8 @@ declare enum PaymentCycle {
|
|
|
1293
1357
|
}
|
|
1294
1358
|
interface GetUrlRequest {
|
|
1295
1359
|
/**
|
|
1296
|
-
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check
|
|
1297
|
-
*
|
|
1360
|
+
* ID of your app's paid plan to retrieve the Wix checkout URL for. Check your app's dashboard
|
|
1361
|
+
* for a list of your app's supported product IDs.
|
|
1298
1362
|
*/
|
|
1299
1363
|
productId: string;
|
|
1300
1364
|
/**
|