@wix/app-management 1.0.32 → 1.0.34
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.34",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -19,8 +19,8 @@
|
|
|
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.
|
|
22
|
+
"@wix/app-management_app-instances": "1.0.19",
|
|
23
|
+
"@wix/app-management_app-plans": "1.0.19",
|
|
24
24
|
"@wix/app-management_bi-events": "1.0.17",
|
|
25
25
|
"@wix/app-management_billing": "1.0.18",
|
|
26
26
|
"@wix/app-management_custom-charges": "1.0.15",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"fqdn": ""
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"falconPackageHash": "
|
|
52
|
+
"falconPackageHash": "a969692c2fcc3714b71c0b92b0896127e30538971302b3a6c3387569"
|
|
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
|
/**
|
|
@@ -735,16 +773,13 @@ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
|
|
|
735
773
|
declare function getAppInstance$1(httpClient: HttpClient): GetAppInstanceSignature;
|
|
736
774
|
interface GetAppInstanceSignature {
|
|
737
775
|
/**
|
|
738
|
-
* Retrieves data about the instance of your app that's installed on the
|
|
739
|
-
* site and the site itself.
|
|
776
|
+
* Retrieves data about the instance of your app that's installed on a Wix site and data about the site itself.
|
|
740
777
|
*
|
|
778
|
+
* Call this function when you need information about a specific instance of your app and the site it’s installed on. For example, you may need to know whether the user has installed a free or paid version of your app, or to check what other Wix apps are installed on the site.
|
|
741
779
|
*
|
|
742
|
-
* You
|
|
743
|
-
* the request, since this information is taken automatically from the context.
|
|
780
|
+
* You must authenticate as a [Wix App](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps). If you are calling this function from a [dashboard extension](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/about-dashboard-extensions) in the [CLI](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-cli/about-the-wix-cli-for-apps), Wix App authentication is passed automatically. Otherwise, you need to call the function with [elevated permissions](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/about-elevated-permissions).
|
|
744
781
|
*
|
|
745
|
-
*
|
|
746
|
-
* have the __Read Site Owner Email__ permission scope in addition to
|
|
747
|
-
* __WIX_DEVELOPERS.MANAGE_APP_INSTANCE__.
|
|
782
|
+
* If you want `site.ownerInfo` to be included in the response, you must have the __Read Site Owner Email__ permission scope in addition to __WIX_DEVELOPERS.MANAGE_APP_INSTANCE__.
|
|
748
783
|
*/
|
|
749
784
|
(): Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
750
785
|
}
|
|
@@ -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
|
/**
|
|
@@ -735,16 +773,13 @@ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
|
|
|
735
773
|
declare function getAppInstance$1(httpClient: HttpClient): GetAppInstanceSignature;
|
|
736
774
|
interface GetAppInstanceSignature {
|
|
737
775
|
/**
|
|
738
|
-
* Retrieves data about the instance of your app that's installed on the
|
|
739
|
-
* site and the site itself.
|
|
776
|
+
* Retrieves data about the instance of your app that's installed on a Wix site and data about the site itself.
|
|
740
777
|
*
|
|
778
|
+
* Call this function when you need information about a specific instance of your app and the site it’s installed on. For example, you may need to know whether the user has installed a free or paid version of your app, or to check what other Wix apps are installed on the site.
|
|
741
779
|
*
|
|
742
|
-
* You
|
|
743
|
-
* the request, since this information is taken automatically from the context.
|
|
780
|
+
* You must authenticate as a [Wix App](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps). If you are calling this function from a [dashboard extension](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/about-dashboard-extensions) in the [CLI](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-cli/about-the-wix-cli-for-apps), Wix App authentication is passed automatically. Otherwise, you need to call the function with [elevated permissions](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/about-elevated-permissions).
|
|
744
781
|
*
|
|
745
|
-
*
|
|
746
|
-
* have the __Read Site Owner Email__ permission scope in addition to
|
|
747
|
-
* __WIX_DEVELOPERS.MANAGE_APP_INSTANCE__.
|
|
782
|
+
* If you want `site.ownerInfo` to be included in the response, you must have the __Read Site Owner Email__ permission scope in addition to __WIX_DEVELOPERS.MANAGE_APP_INSTANCE__.
|
|
748
783
|
*/
|
|
749
784
|
(): Promise<GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields>;
|
|
750
785
|
}
|
|
@@ -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;
|