@wix/auto_sdk_app-management_app-plans 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/appmarket-v1-app-plans-app-plans.context.d.ts +5 -0
  11. package/build/cjs/src/appmarket-v1-app-plans-app-plans.context.js +15 -0
  12. package/build/cjs/src/appmarket-v1-app-plans-app-plans.context.js.map +1 -0
  13. package/build/cjs/src/appmarket-v1-app-plans-app-plans.http.d.ts +23 -0
  14. package/build/cjs/src/appmarket-v1-app-plans-app-plans.http.js +147 -0
  15. package/build/cjs/src/appmarket-v1-app-plans-app-plans.http.js.map +1 -0
  16. package/build/cjs/src/appmarket-v1-app-plans-app-plans.meta.d.ts +15 -0
  17. package/build/cjs/src/appmarket-v1-app-plans-app-plans.meta.js +47 -0
  18. package/build/cjs/src/appmarket-v1-app-plans-app-plans.meta.js.map +1 -0
  19. package/build/cjs/src/appmarket-v1-app-plans-app-plans.public.d.ts +35 -0
  20. package/build/cjs/src/appmarket-v1-app-plans-app-plans.public.js +20 -0
  21. package/build/cjs/src/appmarket-v1-app-plans-app-plans.public.js.map +1 -0
  22. package/build/cjs/src/appmarket-v1-app-plans-app-plans.types.d.ts +342 -0
  23. package/build/cjs/src/appmarket-v1-app-plans-app-plans.types.js +59 -0
  24. package/build/cjs/src/appmarket-v1-app-plans-app-plans.types.js.map +1 -0
  25. package/build/cjs/src/appmarket-v1-app-plans-app-plans.universal.d.ts +372 -0
  26. package/build/cjs/src/appmarket-v1-app-plans-app-plans.universal.js +136 -0
  27. package/build/cjs/src/appmarket-v1-app-plans-app-plans.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/appmarket-v1-app-plans-app-plans.context.d.ts +5 -0
  39. package/build/es/src/appmarket-v1-app-plans-app-plans.context.js +5 -0
  40. package/build/es/src/appmarket-v1-app-plans-app-plans.context.js.map +1 -0
  41. package/build/es/src/appmarket-v1-app-plans-app-plans.http.d.ts +23 -0
  42. package/build/es/src/appmarket-v1-app-plans-app-plans.http.js +143 -0
  43. package/build/es/src/appmarket-v1-app-plans-app-plans.http.js.map +1 -0
  44. package/build/es/src/appmarket-v1-app-plans-app-plans.meta.d.ts +15 -0
  45. package/build/es/src/appmarket-v1-app-plans-app-plans.meta.js +20 -0
  46. package/build/es/src/appmarket-v1-app-plans-app-plans.meta.js.map +1 -0
  47. package/build/es/src/appmarket-v1-app-plans-app-plans.public.d.ts +35 -0
  48. package/build/es/src/appmarket-v1-app-plans-app-plans.public.js +9 -0
  49. package/build/es/src/appmarket-v1-app-plans-app-plans.public.js.map +1 -0
  50. package/build/es/src/appmarket-v1-app-plans-app-plans.types.d.ts +342 -0
  51. package/build/es/src/appmarket-v1-app-plans-app-plans.types.js +56 -0
  52. package/build/es/src/appmarket-v1-app-plans-app-plans.types.js.map +1 -0
  53. package/build/es/src/appmarket-v1-app-plans-app-plans.universal.d.ts +372 -0
  54. package/build/es/src/appmarket-v1-app-plans-app-plans.universal.js +109 -0
  55. package/build/es/src/appmarket-v1-app-plans-app-plans.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.context.d.ts +5 -0
  66. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.context.js +15 -0
  67. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.context.js.map +1 -0
  68. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.http.d.ts +23 -0
  69. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.http.js +147 -0
  70. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.http.js.map +1 -0
  71. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.meta.d.ts +15 -0
  72. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.meta.js +47 -0
  73. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.meta.js.map +1 -0
  74. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.public.d.ts +35 -0
  75. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.public.js +20 -0
  76. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.public.js.map +1 -0
  77. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.types.d.ts +344 -0
  78. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.types.js +59 -0
  79. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.types.js.map +1 -0
  80. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.universal.d.ts +379 -0
  81. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.universal.js +136 -0
  82. package/build/internal/cjs/src/appmarket-v1-app-plans-app-plans.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.context.d.ts +5 -0
  93. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.context.js +5 -0
  94. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.context.js.map +1 -0
  95. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.http.d.ts +23 -0
  96. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.http.js +143 -0
  97. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.http.js.map +1 -0
  98. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.meta.d.ts +15 -0
  99. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.meta.js +20 -0
  100. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.meta.js.map +1 -0
  101. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.public.d.ts +35 -0
  102. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.public.js +9 -0
  103. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.public.js.map +1 -0
  104. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.types.d.ts +344 -0
  105. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.types.js +56 -0
  106. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.types.js.map +1 -0
  107. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.universal.d.ts +379 -0
  108. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.universal.js +109 -0
  109. package/build/internal/es/src/appmarket-v1-app-plans-app-plans.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,379 @@
1
+ export interface AppPlans {
2
+ /** App ID, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view). */
3
+ _id?: string;
4
+ /**
5
+ * List of the app's pricing plans.
6
+ *
7
+ * Min: `0` plans
8
+ * Max: `50` plans
9
+ */
10
+ plans?: Plan[];
11
+ }
12
+ export declare enum SaleType {
13
+ /** Default value, can be used when no specific sale is associated. */
14
+ SALE_TYPE_UNSPECIFIED = "SALE_TYPE_UNSPECIFIED",
15
+ CYBER_MONDAY = "CYBER_MONDAY",
16
+ NOVEMBER_SALE = "NOVEMBER_SALE",
17
+ BLACK_FRIDAY = "BLACK_FRIDAY",
18
+ DEVELOPER_SALE = "DEVELOPER_SALE"
19
+ }
20
+ export declare enum DiscountType {
21
+ DISCOUNT_TYPE_UNSPECIFIED = "DISCOUNT_TYPE_UNSPECIFIED",
22
+ /** Discount is a fixed amount in USD. */
23
+ FIXED_AMOUNT = "FIXED_AMOUNT",
24
+ /** Discount is a percentage of the total price. */
25
+ PERCENTAGE = "PERCENTAGE"
26
+ }
27
+ export declare enum SourceType {
28
+ /** Default value, can be used when no specific source is associated. */
29
+ SOURCE_TYPE_UNSPECIFIED = "SOURCE_TYPE_UNSPECIFIED",
30
+ /** Discount is due to Wix/Developer Sale */
31
+ SALE = "SALE",
32
+ /** Discount is due to App Benefit */
33
+ APP_BENEFIT = "APP_BENEFIT"
34
+ }
35
+ export interface SaleSource {
36
+ saleId?: string | null;
37
+ saleType?: SaleType;
38
+ startDate?: Date | null;
39
+ endDate?: Date | null;
40
+ }
41
+ export interface Cycle {
42
+ /**
43
+ * Type of the billing cycle.
44
+ *
45
+ * + `"UNKNOWN_UNIT"`: There is no information about the billing cycle.
46
+ * + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment.
47
+ * + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule.
48
+ */
49
+ cycleType?: CycleType;
50
+ /** Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. */
51
+ cycleDuration?: Duration;
52
+ }
53
+ export declare enum DurationUnit {
54
+ /** unknown interval unit */
55
+ UNKNOWN_UNIT = "UNKNOWN_UNIT",
56
+ /** month */
57
+ MONTH = "MONTH",
58
+ /** year */
59
+ YEAR = "YEAR"
60
+ }
61
+ export declare enum CycleType {
62
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
63
+ ONE_TIME = "ONE_TIME",
64
+ RECURRING = "RECURRING"
65
+ }
66
+ export interface Duration {
67
+ /** Unit of the billing cycle. */
68
+ unit?: DurationUnit;
69
+ /** Count of units that make up the billing cycle. */
70
+ count?: number;
71
+ }
72
+ export interface UsageBasedDetails {
73
+ /**
74
+ * Smallest possible amount that your app charges customers in usage-based
75
+ * pricing. For example, the price of a single SMS message if your
76
+ * app charges customers for sending text messages. Always in
77
+ * [USD](https://en.wikipedia.org/wiki/United_States_dollar).
78
+ *
79
+ * Min: `0.00`
80
+ * Max: 1024 characters
81
+ */
82
+ minimumChargeIncrement?: string | null;
83
+ /**
84
+ * Recurring, monthly base fee in usage-based pricing that your app
85
+ * charges customers regardless of how much they use your app.
86
+ *
87
+ * Min: `0.00`
88
+ * Max: 1024 characters
89
+ */
90
+ monthlyBaseFee?: string | null;
91
+ /**
92
+ * Description of the usage-based pricing plan, as defined in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
93
+ *
94
+ * Max: 1024 characters
95
+ */
96
+ customChargeDescription?: string | null;
97
+ }
98
+ export interface Discount extends DiscountSourceDataOneOf {
99
+ type?: DiscountType;
100
+ /** Discount amount */
101
+ amount?: string;
102
+ /**
103
+ * Price without taxes. For yearly plans, Wix calculates and returns the
104
+ * average price per month. You can get the full price by multiplying the
105
+ * returned price with 12.
106
+ * Min: `0.00`
107
+ * Max: 1024 characters
108
+ */
109
+ priceBeforeTax?: string;
110
+ /**
111
+ * Total price including taxes.
112
+ * Min: `0.00`
113
+ * Max: 1024 characters
114
+ */
115
+ totalPrice?: string;
116
+ /**
117
+ * Source of the discount.
118
+ * @internal
119
+ */
120
+ sourceType?: SourceType;
121
+ }
122
+ /** @oneof */
123
+ export interface DiscountSourceDataOneOf {
124
+ }
125
+ export declare enum BillingSource {
126
+ UNKNOWN = "UNKNOWN",
127
+ /** plan billing and charges is managed by Wix */
128
+ WIX = "WIX",
129
+ /** plan billing and charges is managed by the app */
130
+ EXTERNAL = "EXTERNAL"
131
+ }
132
+ export interface Price {
133
+ /**
134
+ * Price without taxes. For yearly plans, Wix calculates and returns the
135
+ * average price per month. You can get the full price by multiplying the
136
+ * returned price by 12.
137
+ *
138
+ * Min: `0.00`
139
+ * Max: 1024 characters
140
+ */
141
+ priceBeforeTax?: string;
142
+ /**
143
+ * Total price including taxes.
144
+ *
145
+ * Min: `0.00`
146
+ * Max: 1024 characters
147
+ */
148
+ totalPrice?: string;
149
+ /** Information about the plan's recurring billing cycle or single payment. */
150
+ billingCycle?: Cycle;
151
+ /**
152
+ * Details about the plan's usage-based pricing.
153
+ * Available only for plans with
154
+ * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
155
+ */
156
+ usageBaseOptions?: UsageBasedDetails;
157
+ discount?: Discount;
158
+ billingSource?: BillingSource;
159
+ /** Can be shown instead of plan price - used for dynamic plans */
160
+ customPaymentTitle?: string | null;
161
+ }
162
+ export interface Plan {
163
+ /**
164
+ * ID of the app plan.
165
+ * @readonly
166
+ */
167
+ _id?: string;
168
+ /**
169
+ * ID of your app's pricing plan, as displayed in the [app dashboard](https://dev.wix.com/apps/my-apps?viewId=active-apps-view).
170
+ * Identical to `vendorProductId` in the
171
+ * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
172
+ */
173
+ vendorId?: string;
174
+ /** 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). */
175
+ name?: string;
176
+ /**
177
+ * 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).
178
+ * Currently, the benefits are available only in English.
179
+ *
180
+ * Min: `0` benefits
181
+ * Max: `4` benefits
182
+ * Max per benefit: 1024 characters
183
+ */
184
+ benefits?: string[];
185
+ /**
186
+ * List of the plan's prices. Available only when the plan's prices are managed
187
+ * by Wix and not externally.
188
+ *
189
+ * Min: `0` prices
190
+ * Max: `10` prices
191
+ */
192
+ prices?: Price[];
193
+ }
194
+ export interface ListAppPlansByAppIdRequest {
195
+ /**
196
+ * List of app IDs to retrieve plans for.
197
+ *
198
+ * Min: 1 app ID
199
+ * Max: 100 app IDs
200
+ */
201
+ appIds: string[];
202
+ }
203
+ export interface ListAppPlansByAppIdResponse {
204
+ /**
205
+ * Tax settings. Wix calculates the tax settings based on the country code that
206
+ * you pass in the call's header. If you don't pass a country code in the header,
207
+ * Wix calculates the tax settings based on the caller's IP address. Note that the
208
+ * tax settings may not resolve properly if you call through a VPN.
209
+ */
210
+ taxSettings?: TaxSettings;
211
+ /**
212
+ * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
213
+ * format. Wix calculates the currency based on the country code that
214
+ * you pass in the call's header. If you don't pass a country code in the header,
215
+ * Wix calculates the currency based on the caller's IP address. Note that the
216
+ * currency may not resolve properly if you call through a VPN.
217
+ */
218
+ currency?: string;
219
+ /**
220
+ * Currency symbol in decimal HTML entity format. For example, `$` for $
221
+ * (United States Dollar). Wix calculates the currency symbol based on the
222
+ * country code that you pass in the call's header. If you don't pass a country
223
+ * code in the header, Wix calculates the tax settings based on the caller's IP
224
+ * address. Note that the currency symbol may not resolve properly if you call
225
+ * through a VPN.
226
+ */
227
+ currencySymbol?: string;
228
+ /**
229
+ * Retrieved app plans.
230
+ *
231
+ * Min: 0 plans
232
+ * Max: 50 plans
233
+ *
234
+ * If any plans aren't returned, it's likely because they haven't been activated yet.
235
+ */
236
+ appPlans?: AppPlans[];
237
+ }
238
+ export interface TaxSettings {
239
+ /**
240
+ * Whether you must display the total price including taxes in the given
241
+ * country.
242
+ */
243
+ showPriceWithTax?: boolean;
244
+ /**
245
+ * Tax rate for the given country as percentage. Returned as `0` when
246
+ * `{"showPriceWithTax": false}`.
247
+ */
248
+ percentage?: string | null;
249
+ /**
250
+ * Type of tax required in the given country.
251
+ *
252
+ * + `"NOT_APPLICABLE"`: The country doesn't require that you display the total price including taxes, or Wix failed to calculate the country based on the call's IP address.
253
+ * + `"VAT"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).
254
+ * + `"GST"`: The given country requires that you display the total price including [generation-skipping transfer tax (GST)](https://en.wikipedia.org/wiki/Generation-skipping_transfer_tax).
255
+ */
256
+ taxType?: TaxType;
257
+ }
258
+ export declare enum TaxType {
259
+ NOT_APPLICABLE = "NOT_APPLICABLE",
260
+ VAT = "VAT",
261
+ GST = "GST"
262
+ }
263
+ export interface GetAvailableAppPlansRequest {
264
+ /** AppId to get the available app plans for. */
265
+ appId?: string;
266
+ /** The specific app plan info to retrieve the available app plans for. */
267
+ appPlanInfo?: AppPlanInfo;
268
+ }
269
+ /**
270
+ * An `AppPlanInfo` object describes which app plan you want to retrieve data for.
271
+ * Every plan in an app is identified by a unique combination of `productId` and `billingCycle`.
272
+ */
273
+ export interface AppPlanInfo {
274
+ /**
275
+ * The app plan's vendorId to retrieve the response for.
276
+ *
277
+ * Max: 100 characters
278
+ */
279
+ vendorId?: string;
280
+ /** The app plan cycle to retrieve the response for. */
281
+ billingCycle?: Cycle;
282
+ }
283
+ export interface GetAvailableAppPlansResponse {
284
+ /** The available upgrades for the given app plan. */
285
+ availableUpgrades?: AppPlans;
286
+ /** The available downgrades for the given app plan. */
287
+ availableDowngrades?: AppPlans;
288
+ /** The current app plan. */
289
+ currentPlan?: Plan;
290
+ }
291
+ export interface GetPricingPageUrlRequest {
292
+ /** AppId to get the pricing page url for. */
293
+ appId?: string;
294
+ /** The specific app plan to retrieve the pricing page url for. */
295
+ appPlanInfo?: AppPlanInfo;
296
+ }
297
+ export interface GetPricingPageUrlResponse {
298
+ /** the pricing page url, if there is a app plan that is upgradable. */
299
+ packagePickerUrl?: string | null;
300
+ }
301
+ interface TaxSettingsNonNullableFields {
302
+ showPriceWithTax: boolean;
303
+ taxType: TaxType;
304
+ }
305
+ interface DurationNonNullableFields {
306
+ unit: DurationUnit;
307
+ count: number;
308
+ }
309
+ interface CycleNonNullableFields {
310
+ cycleType: CycleType;
311
+ cycleDuration?: DurationNonNullableFields;
312
+ }
313
+ interface SaleSourceNonNullableFields {
314
+ saleType: SaleType;
315
+ }
316
+ interface DiscountNonNullableFields {
317
+ saleOptions?: SaleSourceNonNullableFields;
318
+ type: DiscountType;
319
+ amount: string;
320
+ priceBeforeTax: string;
321
+ totalPrice: string;
322
+ /** @internal */
323
+ sourceType: SourceType;
324
+ }
325
+ interface PriceNonNullableFields {
326
+ priceBeforeTax: string;
327
+ totalPrice: string;
328
+ billingCycle?: CycleNonNullableFields;
329
+ discount?: DiscountNonNullableFields;
330
+ billingSource: BillingSource;
331
+ }
332
+ interface PlanNonNullableFields {
333
+ _id: string;
334
+ vendorId: string;
335
+ name: string;
336
+ benefits: string[];
337
+ prices: PriceNonNullableFields[];
338
+ }
339
+ interface AppPlansNonNullableFields {
340
+ _id: string;
341
+ plans: PlanNonNullableFields[];
342
+ }
343
+ export interface ListAppPlansByAppIdResponseNonNullableFields {
344
+ taxSettings?: TaxSettingsNonNullableFields;
345
+ currency: string;
346
+ currencySymbol: string;
347
+ appPlans: AppPlansNonNullableFields[];
348
+ }
349
+ /**
350
+ * Retrieves plans for the given apps.
351
+ *
352
+ *
353
+ * Also returns tax settings and currency details. Wix calculates this information
354
+ * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
355
+ * format that you pass in the call's header. If you don't pass a country code in
356
+ * the header, Wix calculates the tax settings and currency details based on the
357
+ * call's IP address. Note that the tax settings and currency details may not resolve
358
+ * properly if you call through a VPN.
359
+ *
360
+ * Prices for plans that are managed outside of Wix aren't returned.
361
+ *
362
+ * Consumers must pay for yearly and multi-yearly plans of your app every month.
363
+ * For these plans this endpoint returns the price that the consumer must pay every
364
+ * month and not the total price for the entire year.
365
+ *
366
+ * > **Notes:**
367
+ * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.
368
+ * > - This endpoint only returns app plans that have been activated. ([REST](https://dev.wix.com/docs/rest/app-management/app-billing/app-plans/introduction#before-you-begin)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/app-management/app-plans/introduction)).
369
+ * @param appIds - List of app IDs to retrieve plans for.
370
+ *
371
+ * Min: 1 app ID
372
+ * Max: 100 app IDs
373
+ * @public
374
+ * @documentationMaturity preview
375
+ * @requiredField appIds
376
+ * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId
377
+ */
378
+ export declare function listAppPlansByAppId(appIds: string[]): Promise<ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields>;
379
+ export {};
@@ -0,0 +1,109 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
+ import * as ambassadorWixAppmarketV1AppPlans from './appmarket-v1-app-plans-app-plans.http.js';
4
+ export var SaleType;
5
+ (function (SaleType) {
6
+ /** Default value, can be used when no specific sale is associated. */
7
+ SaleType["SALE_TYPE_UNSPECIFIED"] = "SALE_TYPE_UNSPECIFIED";
8
+ SaleType["CYBER_MONDAY"] = "CYBER_MONDAY";
9
+ SaleType["NOVEMBER_SALE"] = "NOVEMBER_SALE";
10
+ SaleType["BLACK_FRIDAY"] = "BLACK_FRIDAY";
11
+ SaleType["DEVELOPER_SALE"] = "DEVELOPER_SALE";
12
+ })(SaleType || (SaleType = {}));
13
+ export var DiscountType;
14
+ (function (DiscountType) {
15
+ DiscountType["DISCOUNT_TYPE_UNSPECIFIED"] = "DISCOUNT_TYPE_UNSPECIFIED";
16
+ /** Discount is a fixed amount in USD. */
17
+ DiscountType["FIXED_AMOUNT"] = "FIXED_AMOUNT";
18
+ /** Discount is a percentage of the total price. */
19
+ DiscountType["PERCENTAGE"] = "PERCENTAGE";
20
+ })(DiscountType || (DiscountType = {}));
21
+ export var SourceType;
22
+ (function (SourceType) {
23
+ /** Default value, can be used when no specific source is associated. */
24
+ SourceType["SOURCE_TYPE_UNSPECIFIED"] = "SOURCE_TYPE_UNSPECIFIED";
25
+ /** Discount is due to Wix/Developer Sale */
26
+ SourceType["SALE"] = "SALE";
27
+ /** Discount is due to App Benefit */
28
+ SourceType["APP_BENEFIT"] = "APP_BENEFIT";
29
+ })(SourceType || (SourceType = {}));
30
+ export var DurationUnit;
31
+ (function (DurationUnit) {
32
+ /** unknown interval unit */
33
+ DurationUnit["UNKNOWN_UNIT"] = "UNKNOWN_UNIT";
34
+ /** month */
35
+ DurationUnit["MONTH"] = "MONTH";
36
+ /** year */
37
+ DurationUnit["YEAR"] = "YEAR";
38
+ })(DurationUnit || (DurationUnit = {}));
39
+ export var CycleType;
40
+ (function (CycleType) {
41
+ CycleType["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
42
+ CycleType["ONE_TIME"] = "ONE_TIME";
43
+ CycleType["RECURRING"] = "RECURRING";
44
+ })(CycleType || (CycleType = {}));
45
+ export var BillingSource;
46
+ (function (BillingSource) {
47
+ BillingSource["UNKNOWN"] = "UNKNOWN";
48
+ /** plan billing and charges is managed by Wix */
49
+ BillingSource["WIX"] = "WIX";
50
+ /** plan billing and charges is managed by the app */
51
+ BillingSource["EXTERNAL"] = "EXTERNAL";
52
+ })(BillingSource || (BillingSource = {}));
53
+ export var TaxType;
54
+ (function (TaxType) {
55
+ TaxType["NOT_APPLICABLE"] = "NOT_APPLICABLE";
56
+ TaxType["VAT"] = "VAT";
57
+ TaxType["GST"] = "GST";
58
+ })(TaxType || (TaxType = {}));
59
+ /**
60
+ * Retrieves plans for the given apps.
61
+ *
62
+ *
63
+ * Also returns tax settings and currency details. Wix calculates this information
64
+ * based on the 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
65
+ * format that you pass in the call's header. If you don't pass a country code in
66
+ * the header, Wix calculates the tax settings and currency details based on the
67
+ * call's IP address. Note that the tax settings and currency details may not resolve
68
+ * properly if you call through a VPN.
69
+ *
70
+ * Prices for plans that are managed outside of Wix aren't returned.
71
+ *
72
+ * Consumers must pay for yearly and multi-yearly plans of your app every month.
73
+ * For these plans this endpoint returns the price that the consumer must pay every
74
+ * month and not the total price for the entire year.
75
+ *
76
+ * > **Notes:**
77
+ * > - The App Plans API doesn't follow any tenancy model. You don't need any permissions to call `List App Plans by App ID`.
78
+ * > - This endpoint only returns app plans that have been activated. ([REST](https://dev.wix.com/docs/rest/app-management/app-billing/app-plans/introduction#before-you-begin)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/app-management/app-plans/introduction)).
79
+ * @param appIds - List of app IDs to retrieve plans for.
80
+ *
81
+ * Min: 1 app ID
82
+ * Max: 100 app IDs
83
+ * @public
84
+ * @documentationMaturity preview
85
+ * @requiredField appIds
86
+ * @fqn wix.appmarket.app_plans.v1.AppsPlans.ListAppPlansByAppId
87
+ */
88
+ export async function listAppPlansByAppId(appIds) {
89
+ // @ts-ignore
90
+ const { httpClient, sideEffects } = arguments[1];
91
+ const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });
92
+ const reqOpts = ambassadorWixAppmarketV1AppPlans.listAppPlansByAppId(payload);
93
+ sideEffects?.onSiteCall?.();
94
+ try {
95
+ const result = await httpClient.request(reqOpts);
96
+ sideEffects?.onSuccess?.(result);
97
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
98
+ }
99
+ catch (err) {
100
+ const transformedError = sdkTransformError(err, {
101
+ spreadPathsToArguments: {},
102
+ explicitPathsToArguments: { appIds: '$[0]' },
103
+ singleArgumentUnchanged: false,
104
+ }, ['appIds']);
105
+ sideEffects?.onError?.(err);
106
+ throw transformedError;
107
+ }
108
+ }
109
+ //# sourceMappingURL=appmarket-v1-app-plans-app-plans.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appmarket-v1-app-plans-app-plans.universal.js","sourceRoot":"","sources":["../../../../src/appmarket-v1-app-plans-app-plans.universal.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "main": "../build/cjs/meta.js"
3
+ }
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@wix/auto_sdk_app-management_app-plans",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org/",
6
+ "access": "public"
7
+ },
8
+ "keywords": [],
9
+ "sideEffects": false,
10
+ "main": "./build/cjs/index.js",
11
+ "types": "./build/es/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./build/es/index.js",
15
+ "require": "./build/cjs/index.js",
16
+ "types": "./build/es/index.d.ts"
17
+ },
18
+ "./package.json": "./package.json",
19
+ "./meta": {
20
+ "import": "./build/es/meta.js",
21
+ "require": "./build/cjs/meta.js",
22
+ "types": "./build/es/meta.d.ts"
23
+ }
24
+ },
25
+ "files": [
26
+ "build",
27
+ "meta",
28
+ "service-plugins"
29
+ ],
30
+ "dependencies": {
31
+ "@wix/sdk-runtime": "^0.3.35",
32
+ "@wix/sdk-types": "^1.12.4"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.3.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
39
+ "test": ":"
40
+ },
41
+ "wix": {
42
+ "artifact": {
43
+ "artifactId": "auto-sdk-app-management-app-plans",
44
+ "groupId": "com.wixpress.public-sdk-dependencies"
45
+ },
46
+ "sdkDependency": {
47
+ "fqdnNamespace": "appPlans",
48
+ "fqdn": "wix.appmarket.v1.app_plans"
49
+ }
50
+ },
51
+ "falconPackageHash": "0abb16af3c80b296f62c1b2b90b9dfefaa399d380affcfb36e124ab1"
52
+ }