@wix/app-management 1.0.12 → 1.0.13

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.
@@ -0,0 +1,1453 @@
1
+ /**
2
+ * An `appPlans` object describes how you charge users for using your app.
3
+ * You can set up multiple plans for a single app, with different plans giving access to
4
+ * different tiers of functionality. For example, you can offer a free plan and
5
+ * 3 paid plans with an increasing number of benefits. Learn more about
6
+ * [setting up your app pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-your-app-pricing).
7
+ */
8
+ interface AppPlans$1 {
9
+ /** App ID, as defined in the [Wix Dev Center](https://dev.wix.com/). */
10
+ id?: string;
11
+ /**
12
+ * List of the app's pricing plans.
13
+ *
14
+ * Min: `0` plans
15
+ * Max: `50` plans
16
+ */
17
+ plans?: Plan$1[];
18
+ }
19
+ interface Cycle$1 {
20
+ /**
21
+ * Type of the billing cycle.
22
+ *
23
+ * + `"UNKNOWN_UNIT"`: There is no information about the billing cycle.
24
+ * + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment.
25
+ * + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule.
26
+ */
27
+ cycleType?: CycleType$1;
28
+ /** Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. */
29
+ cycleDuration?: Duration$1;
30
+ }
31
+ declare enum DurationUnit$1 {
32
+ /** unknown interval unit */
33
+ UNKNOWN_UNIT = "UNKNOWN_UNIT",
34
+ /** month */
35
+ MONTH = "MONTH",
36
+ /** year */
37
+ YEAR = "YEAR"
38
+ }
39
+ declare enum CycleType$1 {
40
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
41
+ ONE_TIME = "ONE_TIME",
42
+ RECURRING = "RECURRING"
43
+ }
44
+ interface Duration$1 {
45
+ /** Unit of the billing cycle. */
46
+ unit?: DurationUnit$1;
47
+ /** Count of units that make up the billing cycle. */
48
+ count?: number;
49
+ }
50
+ interface UsageBasedDetails$1 {
51
+ /**
52
+ * Smallest possible amount that your app charges customers in usage-based
53
+ * pricing. For example, the price of a single SMS message if your
54
+ * app charges customers for sending text messages. Always in
55
+ * [USD](https://en.wikipedia.org/wiki/United_States_dollar).
56
+ *
57
+ * Min: `0.00`
58
+ * Max: 1024 characters
59
+ */
60
+ minimumChargeIncrement?: string | null;
61
+ /**
62
+ * Recurring, monthly base fee in usaged-based pricing that your app
63
+ * charges customers regardless of how much they use your app.
64
+ *
65
+ * Min: `0.00`
66
+ * Max: 1024 characters
67
+ */
68
+ monthlyBaseFee?: string | null;
69
+ /**
70
+ * Description of the usaged-based pricing plan, as defined in the
71
+ * [Dev Center](https://dev.wix.com/).
72
+ *
73
+ * Max: 1024 characters
74
+ */
75
+ customChargeDescription?: string | null;
76
+ }
77
+ interface Price$1 {
78
+ /**
79
+ * Price without taxes. For yearly plans, Wix calculates and returns the
80
+ * average price per month. You can get thefull price by multiplying the
81
+ * returned price with 12.
82
+ *
83
+ * Min: `0.00`
84
+ * Max: 1024 characters
85
+ */
86
+ priceBeforeTax?: string;
87
+ /**
88
+ * Total price including taxes.
89
+ *
90
+ * Min: `0.00`
91
+ * Max: 1024 characters
92
+ */
93
+ totalPrice?: string;
94
+ /** Information about the plan's recurring billing cycle or single payment. */
95
+ billingCycle?: Cycle$1;
96
+ /**
97
+ * Details about the plan's usage-based pricing.
98
+ * Available only for plans with
99
+ * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
100
+ */
101
+ usageBaseOptions?: UsageBasedDetails$1;
102
+ }
103
+ interface Plan$1 {
104
+ /**
105
+ * ID of the app plan.
106
+ * @readonly
107
+ */
108
+ id?: string;
109
+ /**
110
+ * ID of your app's pricing plan, as displayed in the [Dev Center](https://dev.wix.com/).
111
+ * Identical to `vendorProductId` in the
112
+ * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
113
+ */
114
+ vendorId?: string;
115
+ /** Name of your app's pricing plan, as defined by you in the [Dev Center](https://dev.wix.com/). */
116
+ name?: string;
117
+ /**
118
+ * List of your plan's benefits, as defined by you in the [Dev Center](https://dev.wix.com/).
119
+ * Currently, the benefits are available only in English.
120
+ *
121
+ * Min: `0` benefits
122
+ * Max: `4` benefits
123
+ * Max per benefit: 1024 characters
124
+ */
125
+ benefits?: string[];
126
+ /**
127
+ * List of the plan's prices. Available only when the plan's prices are managed
128
+ * by Wix and not externally.
129
+ *
130
+ * Min: `0` prices
131
+ * Max: `10` prices
132
+ */
133
+ prices?: Price$1[];
134
+ }
135
+ interface ListAppPlansByAppIdRequest$1 {
136
+ /**
137
+ * List of app IDs to retrieve plans for.
138
+ *
139
+ * Min: 1 app ID
140
+ * Max: 100 app IDs
141
+ */
142
+ appIds: string[];
143
+ }
144
+ interface ListAppPlansByAppIdResponse$1 {
145
+ /**
146
+ * Tax settings. Wix calculates the tax settings based on the country code that
147
+ * you pass in the call's header. If you don't pass a country code in the header,
148
+ * Wix calculates the tax settings based on the caller's IP address. Note that the
149
+ * tax settings may not resolve properly if you call through a VPN.
150
+ */
151
+ taxSettings?: TaxSettings$1;
152
+ /**
153
+ * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
154
+ * format. Wix calculates the currency based on the country code that
155
+ * you pass in the call's header. If you don't pass a country code in the header,
156
+ * Wix calculates the currency based on the caller's IP address. Note that the
157
+ * currency may not resolve properly if you call through a VPN.
158
+ */
159
+ currency?: string;
160
+ /**
161
+ * Currency symbol in decimal HTML entity format. For example, `$` for $
162
+ * (United States Dollar). Wix calculates the currency symbol based on the
163
+ * country code that you pass in the call's header. If you don't pass a country
164
+ * code in the header, Wix calculates the tax settings based on the caller's IP
165
+ * address. Note that the currency symbol may not resolve properly if you call
166
+ * through a VPN.
167
+ */
168
+ currencySymbol?: string;
169
+ /**
170
+ * Retrieved app plans.
171
+ *
172
+ * Min: 0 plans
173
+ * Max: 50 plans
174
+ */
175
+ appPlans?: AppPlans$1[];
176
+ }
177
+ interface TaxSettings$1 {
178
+ /**
179
+ * Whether you must display the total price including taxes in the given
180
+ * country.
181
+ */
182
+ showPriceWithTax?: boolean;
183
+ /**
184
+ * Tax rate for the given country as percentage. Returned as `0` when
185
+ * `{"showPriceWithTax": false}`.
186
+ */
187
+ percentage?: string | null;
188
+ /**
189
+ * Type of tax required in the given country.
190
+ *
191
+ * + `"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.
192
+ * + `"VAT"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).
193
+ * + `"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).
194
+ */
195
+ taxType?: TaxType$1;
196
+ }
197
+ declare enum TaxType$1 {
198
+ NOT_APPLICABLE = "NOT_APPLICABLE",
199
+ VAT = "VAT",
200
+ GST = "GST"
201
+ }
202
+ interface ListAppPlansByAppIdResponseNonNullableFields$1 {
203
+ taxSettings?: {
204
+ showPriceWithTax: boolean;
205
+ taxType: TaxType$1;
206
+ };
207
+ currency: string;
208
+ currencySymbol: string;
209
+ appPlans: {
210
+ id: string;
211
+ plans: {
212
+ id: string;
213
+ vendorId: string;
214
+ name: string;
215
+ benefits: string[];
216
+ prices: {
217
+ priceBeforeTax: string;
218
+ totalPrice: string;
219
+ billingCycle?: {
220
+ cycleType: CycleType$1;
221
+ cycleDuration?: {
222
+ unit: DurationUnit$1;
223
+ count: number;
224
+ };
225
+ };
226
+ }[];
227
+ }[];
228
+ }[];
229
+ }
230
+
231
+ /**
232
+ * An `appPlans` object describes how you charge users for using your app.
233
+ * You can set up multiple plans for a single app, with different plans giving access to
234
+ * different tiers of functionality. For example, you can offer a free plan and
235
+ * 3 paid plans with an increasing number of benefits. Learn more about
236
+ * [setting up your app pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/set-up-your-app-pricing).
237
+ */
238
+ interface AppPlans {
239
+ /** App ID, as defined in the [Wix Dev Center](https://dev.wix.com/). */
240
+ _id?: string;
241
+ /**
242
+ * List of the app's pricing plans.
243
+ *
244
+ * Min: `0` plans
245
+ * Max: `50` plans
246
+ */
247
+ plans?: Plan[];
248
+ }
249
+ interface Cycle {
250
+ /**
251
+ * Type of the billing cycle.
252
+ *
253
+ * + `"UNKNOWN_UNIT"`: There is no information about the billing cycle.
254
+ * + `"ONE_TIME"`: The customer pays for unlimited usage of the app with a single payment.
255
+ * + `"RECURRING"`: The customer pays for a subscription to the app on a recurring schedule.
256
+ */
257
+ cycleType?: CycleType;
258
+ /** Duration of the billing cycle. Available only for `{"cycleType": "RECURRING"}`. */
259
+ cycleDuration?: Duration;
260
+ }
261
+ declare enum DurationUnit {
262
+ /** unknown interval unit */
263
+ UNKNOWN_UNIT = "UNKNOWN_UNIT",
264
+ /** month */
265
+ MONTH = "MONTH",
266
+ /** year */
267
+ YEAR = "YEAR"
268
+ }
269
+ declare enum CycleType {
270
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
271
+ ONE_TIME = "ONE_TIME",
272
+ RECURRING = "RECURRING"
273
+ }
274
+ interface Duration {
275
+ /** Unit of the billing cycle. */
276
+ unit?: DurationUnit;
277
+ /** Count of units that make up the billing cycle. */
278
+ count?: number;
279
+ }
280
+ interface UsageBasedDetails {
281
+ /**
282
+ * Smallest possible amount that your app charges customers in usage-based
283
+ * pricing. For example, the price of a single SMS message if your
284
+ * app charges customers for sending text messages. Always in
285
+ * [USD](https://en.wikipedia.org/wiki/United_States_dollar).
286
+ *
287
+ * Min: `0.00`
288
+ * Max: 1024 characters
289
+ */
290
+ minimumChargeIncrement?: string | null;
291
+ /**
292
+ * Recurring, monthly base fee in usaged-based pricing that your app
293
+ * charges customers regardless of how much they use your app.
294
+ *
295
+ * Min: `0.00`
296
+ * Max: 1024 characters
297
+ */
298
+ monthlyBaseFee?: string | null;
299
+ /**
300
+ * Description of the usaged-based pricing plan, as defined in the
301
+ * [Dev Center](https://dev.wix.com/).
302
+ *
303
+ * Max: 1024 characters
304
+ */
305
+ customChargeDescription?: string | null;
306
+ }
307
+ interface Price {
308
+ /**
309
+ * Price without taxes. For yearly plans, Wix calculates and returns the
310
+ * average price per month. You can get thefull price by multiplying the
311
+ * returned price with 12.
312
+ *
313
+ * Min: `0.00`
314
+ * Max: 1024 characters
315
+ */
316
+ priceBeforeTax?: string;
317
+ /**
318
+ * Total price including taxes.
319
+ *
320
+ * Min: `0.00`
321
+ * Max: 1024 characters
322
+ */
323
+ totalPrice?: string;
324
+ /** Information about the plan's recurring billing cycle or single payment. */
325
+ billingCycle?: Cycle;
326
+ /**
327
+ * Details about the plan's usage-based pricing.
328
+ * Available only for plans with
329
+ * [usage-based pricing](https://dev.wix.com/docs/build-apps/build-your-app/pricing-plans/usage-based-pricing).
330
+ */
331
+ usageBaseOptions?: UsageBasedDetails;
332
+ }
333
+ interface Plan {
334
+ /**
335
+ * ID of the app plan.
336
+ * @readonly
337
+ */
338
+ _id?: string;
339
+ /**
340
+ * ID of your app's pricing plan, as displayed in the [Dev Center](https://dev.wix.com/).
341
+ * Identical to `vendorProductId` in the
342
+ * [Paid Plan Purchased webhook](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/paid-plan-purchased).
343
+ */
344
+ vendorId?: string;
345
+ /** Name of your app's pricing plan, as defined by you in the [Dev Center](https://dev.wix.com/). */
346
+ name?: string;
347
+ /**
348
+ * List of your plan's benefits, as defined by you in the [Dev Center](https://dev.wix.com/).
349
+ * Currently, the benefits are available only in English.
350
+ *
351
+ * Min: `0` benefits
352
+ * Max: `4` benefits
353
+ * Max per benefit: 1024 characters
354
+ */
355
+ benefits?: string[];
356
+ /**
357
+ * List of the plan's prices. Available only when the plan's prices are managed
358
+ * by Wix and not externally.
359
+ *
360
+ * Min: `0` prices
361
+ * Max: `10` prices
362
+ */
363
+ prices?: Price[];
364
+ }
365
+ interface ListAppPlansByAppIdRequest {
366
+ /**
367
+ * List of app IDs to retrieve plans for.
368
+ *
369
+ * Min: 1 app ID
370
+ * Max: 100 app IDs
371
+ */
372
+ appIds: string[];
373
+ }
374
+ interface ListAppPlansByAppIdResponse {
375
+ /**
376
+ * Tax settings. Wix calculates the tax settings based on the country code that
377
+ * you pass in the call's header. If you don't pass a country code in the header,
378
+ * Wix calculates the tax settings based on the caller's IP address. Note that the
379
+ * tax settings may not resolve properly if you call through a VPN.
380
+ */
381
+ taxSettings?: TaxSettings;
382
+ /**
383
+ * 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)
384
+ * format. Wix calculates the currency based on the country code that
385
+ * you pass in the call's header. If you don't pass a country code in the header,
386
+ * Wix calculates the currency based on the caller's IP address. Note that the
387
+ * currency may not resolve properly if you call through a VPN.
388
+ */
389
+ currency?: string;
390
+ /**
391
+ * Currency symbol in decimal HTML entity format. For example, `$` for $
392
+ * (United States Dollar). Wix calculates the currency symbol based on the
393
+ * country code that you pass in the call's header. If you don't pass a country
394
+ * code in the header, Wix calculates the tax settings based on the caller's IP
395
+ * address. Note that the currency symbol may not resolve properly if you call
396
+ * through a VPN.
397
+ */
398
+ currencySymbol?: string;
399
+ /**
400
+ * Retrieved app plans.
401
+ *
402
+ * Min: 0 plans
403
+ * Max: 50 plans
404
+ */
405
+ appPlans?: AppPlans[];
406
+ }
407
+ interface TaxSettings {
408
+ /**
409
+ * Whether you must display the total price including taxes in the given
410
+ * country.
411
+ */
412
+ showPriceWithTax?: boolean;
413
+ /**
414
+ * Tax rate for the given country as percentage. Returned as `0` when
415
+ * `{"showPriceWithTax": false}`.
416
+ */
417
+ percentage?: string | null;
418
+ /**
419
+ * Type of tax required in the given country.
420
+ *
421
+ * + `"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.
422
+ * + `"VAT"`: The given country requires that you display the total price including [value-added tax (VAT)](https://en.wikipedia.org/wiki/Value-added_tax).
423
+ * + `"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).
424
+ */
425
+ taxType?: TaxType;
426
+ }
427
+ declare enum TaxType {
428
+ NOT_APPLICABLE = "NOT_APPLICABLE",
429
+ VAT = "VAT",
430
+ GST = "GST"
431
+ }
432
+ interface ListAppPlansByAppIdResponseNonNullableFields {
433
+ taxSettings?: {
434
+ showPriceWithTax: boolean;
435
+ taxType: TaxType;
436
+ };
437
+ currency: string;
438
+ currencySymbol: string;
439
+ appPlans: {
440
+ _id: string;
441
+ plans: {
442
+ _id: string;
443
+ vendorId: string;
444
+ name: string;
445
+ benefits: string[];
446
+ prices: {
447
+ priceBeforeTax: string;
448
+ totalPrice: string;
449
+ billingCycle?: {
450
+ cycleType: CycleType;
451
+ cycleDuration?: {
452
+ unit: DurationUnit;
453
+ count: number;
454
+ };
455
+ };
456
+ }[];
457
+ }[];
458
+ }[];
459
+ }
460
+
461
+ type __PublicMethodMetaInfo$4<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
462
+ getUrl: (context: any) => string;
463
+ httpMethod: K;
464
+ path: string;
465
+ pathParams: M;
466
+ __requestType: T;
467
+ __originalRequestType: S;
468
+ __responseType: Q;
469
+ __originalResponseType: R;
470
+ };
471
+ declare function listAppPlansByAppId(): __PublicMethodMetaInfo$4<'GET', {
472
+ appIds: string;
473
+ }, ListAppPlansByAppIdRequest, ListAppPlansByAppIdRequest$1, ListAppPlansByAppIdResponse & ListAppPlansByAppIdResponseNonNullableFields, ListAppPlansByAppIdResponse$1 & ListAppPlansByAppIdResponseNonNullableFields$1>;
474
+
475
+ declare const meta$4_listAppPlansByAppId: typeof listAppPlansByAppId;
476
+ declare namespace meta$4 {
477
+ export { type __PublicMethodMetaInfo$4 as __PublicMethodMetaInfo, meta$4_listAppPlansByAppId as listAppPlansByAppId };
478
+ }
479
+
480
+ /**
481
+ * An app instance is a specific occurrence of your app on a particular Wix site.
482
+ * When a site owner installs your app, a unique instance is generated for that
483
+ * specific site. Use the `instanceId` to keep track of the individual data
484
+ * associated with each app instance.
485
+ */
486
+ interface AppInstance$1 {
487
+ /**
488
+ * ID of the app instance. You can use it to keep track of the individual
489
+ * data that's associated with the specific occurence of your app that's
490
+ * installed on a Wix site.
491
+ */
492
+ instanceId?: string;
493
+ /**
494
+ * App name, as set by you in the Wix Developers Center during the app creation
495
+ * process.
496
+ */
497
+ appName?: string;
498
+ /**
499
+ * Version of your app that's installed on the Wix site, as set by you in the
500
+ * Wix Developers Center during the app creation process.
501
+ */
502
+ appVersion?: string | null;
503
+ /**
504
+ * Whether the site owners have installed a free or paid version of your app
505
+ * on their site.
506
+ */
507
+ isFree?: boolean;
508
+ /**
509
+ * Billing information for the app instance. Available only in case
510
+ * `{"isFree": false}`.
511
+ */
512
+ billing?: BillingInfo$1;
513
+ /**
514
+ * List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
515
+ * that the site owners have granted your app. You set the list of permissions that
516
+ * your app requires from the site owners in the Wix Developers Center during the
517
+ * app creation process.
518
+ */
519
+ permissions?: string[];
520
+ /** Plans available to this app instance. */
521
+ availablePlans?: AvailablePlan$1[];
522
+ /**
523
+ * ID of the Wix site from which the instance of your app has been cloned.
524
+ * Available only in case `{"copiedFromTemplate": true}`.
525
+ * All visual settings of the Wix site and app data are duplicated during the
526
+ * cloning process. Wix also notifies you in case there is any additional
527
+ * external functionality for the original site.
528
+ */
529
+ originInstanceId?: string | null;
530
+ /**
531
+ * __Deprecated__. This parameter will be removed on March 30, 2023. Use
532
+ * `copiedFromTemplate` instead.
533
+ * @deprecated
534
+ */
535
+ isOriginSiteTemplate?: boolean;
536
+ /** Whether the app instance was created when another Wix site was cloned. */
537
+ copiedFromTemplate?: boolean;
538
+ /** Whether the app instance includes a free trial that hasn't started yet. */
539
+ freeTrialAvailable?: boolean;
540
+ }
541
+ interface BillingInfo$1 {
542
+ /** Name of the package that the site owner has paid for. */
543
+ packageName?: string;
544
+ /**
545
+ * Interval of the billing cycle. `"ONE_TIME"` means that site owners have
546
+ * purchased unlimited access to the app with a single, upfront payment.
547
+ */
548
+ billingCycle?: PaymentCycle$3;
549
+ /**
550
+ * Date and time the site owners have purchased the app's paid plan in
551
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
552
+ */
553
+ timeStamp?: string;
554
+ /**
555
+ * Date and time the app's current billing cycle ends in
556
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format. Available only for yearly and
557
+ * multi-yearly plans.
558
+ */
559
+ expirationDate?: string | null;
560
+ /**
561
+ * Whether the app's subscription automatically renews at the end of the
562
+ * current billing cycle.
563
+ */
564
+ autoRenewing?: boolean | null;
565
+ /** ID of the invoice for the current billing cycle. */
566
+ invoiceId?: string | null;
567
+ /**
568
+ * Information about any discounts applied to the app instance's current billing cycle.
569
+ * If the site owners applied a developer coupon or Wix Voucher
570
+ * when installing the paid version of your app, this field holds the coupon's
571
+ * name or `“Wix discount coupon”`. Site owners may receive a Wix Voucher when
572
+ * upgrading their Wix subscription. If there is no discount for the
573
+ * current billing cycle, the field is an empty string.
574
+ */
575
+ source?: string | null;
576
+ /** Information about the free trial applied, if relevant. */
577
+ freeTrialInfo?: FreeTrialInfo$1;
578
+ }
579
+ declare enum PaymentCycle$3 {
580
+ NO_CYCLE = "NO_CYCLE",
581
+ MONTHLY = "MONTHLY",
582
+ YEARLY = "YEARLY",
583
+ ONE_TIME = "ONE_TIME",
584
+ TWO_YEARS = "TWO_YEARS",
585
+ THREE_YEARS = "THREE_YEARS",
586
+ FOUR_YEARS = "FOUR_YEARS",
587
+ FIVE_YEARS = "FIVE_YEARS"
588
+ }
589
+ interface FreeTrialInfo$1 {
590
+ /**
591
+ * Current free trial status.
592
+ *
593
+ * Supported values:
594
+ *
595
+ * - `IN_PROGRESS`: The free trial is currently in progress.
596
+ * - `ENDED`: The free trial has ended.
597
+ * - `NOT_AVAILABLE`: No free trial was applied, as none was available.
598
+ * @readonly
599
+ */
600
+ status?: FreeTrialStatus$1;
601
+ /**
602
+ * When the free trial has ended. Populated only once the free trial is over.
603
+ * @readonly
604
+ */
605
+ endDate?: Date;
606
+ }
607
+ declare enum FreeTrialStatus$1 {
608
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
609
+ IN_PROGRESS = "IN_PROGRESS",
610
+ ENDED = "ENDED",
611
+ NOT_AVAILABLE = "NOT_AVAILABLE"
612
+ }
613
+ interface AvailablePlan$1 {
614
+ /** Package name of the available plan. */
615
+ packageName?: string;
616
+ /** Source of the available plan. Can be a bundle or 3rd-party app. */
617
+ source?: string;
618
+ }
619
+ interface GetAppInstanceRequest$1 {
620
+ }
621
+ interface GetAppInstanceResponse$1 {
622
+ /** Retrieved app instance. */
623
+ instance?: AppInstance$1;
624
+ /** Information about the corresponding Wix site. */
625
+ site?: SiteInfo$1;
626
+ }
627
+ interface SiteInfo$1 {
628
+ /** Display name of the site. */
629
+ siteDisplayName?: string | null;
630
+ /**
631
+ * 2-letter language code of the site's locale in
632
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
633
+ */
634
+ locale?: string;
635
+ /**
636
+ * 3-letter currency code for the site's billing in
637
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
638
+ */
639
+ paymentCurrency?: string;
640
+ /** Information about the site's supported languages. */
641
+ multilingual?: Multilingual$1;
642
+ /** URL of the site. Available only in case the site has been published. */
643
+ url?: string | null;
644
+ /** Description of the site. */
645
+ description?: string | null;
646
+ /** Wix apps that are installed on the site. */
647
+ installedWixApps?: string[];
648
+ /**
649
+ * > **Deprecation Notice:** This parameter will be removed on June 30, 2022. Use `ownerInfo` instead.
650
+ * @deprecated
651
+ */
652
+ ownerEmail?: string | null;
653
+ /**
654
+ * Information about the site owner. Available only when calling
655
+ * _Get App Instance_ with the __Read Site Owner Email__ permission scope.
656
+ */
657
+ ownerInfo?: OwnerInfo$1;
658
+ /** Site ID. */
659
+ siteId?: string;
660
+ }
661
+ interface Multilingual$1 {
662
+ /** Whether the site supports more than a single language. */
663
+ isMultiLingual?: boolean;
664
+ /** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
665
+ supportedLanguages?: SupportedLanguage$1[];
666
+ }
667
+ interface SupportedLanguage$1 {
668
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
669
+ languageCode?: string;
670
+ /** Locale. */
671
+ locale?: Locale$1;
672
+ /** Whether the supported language is the primary language for the site. */
673
+ isPrimary?: boolean;
674
+ /** Language icon. */
675
+ countryCode?: string;
676
+ /** How the language will be resolved. For internal use. */
677
+ resolutionMethod?: ResolutionMethod$1;
678
+ }
679
+ interface Locale$1 {
680
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
681
+ languageCode?: string;
682
+ /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
683
+ country?: string;
684
+ }
685
+ declare enum ResolutionMethod$1 {
686
+ QUERY_PARAM = "QUERY_PARAM",
687
+ SUBDOMAIN = "SUBDOMAIN",
688
+ SUBDIRECTORY = "SUBDIRECTORY"
689
+ }
690
+ interface OwnerInfo$1 {
691
+ /** Site owner's email address. Identical to the site owner's login email. */
692
+ email?: string;
693
+ /**
694
+ * Supported values: `VERIFIED_OPT_IN`, `VERIFIED_OPT_OUT`,
695
+ * `NOT_VERIFIED_OPT_IN`, `NOT_VERIFIED_OPT_OUT`.
696
+ *
697
+ * Whether the site owner has verified their email and whether they have chosen
698
+ * to receive email notifications from Wix.
699
+ */
700
+ emailStatus?: string;
701
+ }
702
+ interface GetAppInstanceResponseNonNullableFields$1 {
703
+ instance?: {
704
+ instanceId: string;
705
+ appName: string;
706
+ isFree: boolean;
707
+ billing?: {
708
+ packageName: string;
709
+ billingCycle: PaymentCycle$3;
710
+ timeStamp: string;
711
+ freeTrialInfo?: {
712
+ status: FreeTrialStatus$1;
713
+ };
714
+ };
715
+ permissions: string[];
716
+ availablePlans: {
717
+ packageName: string;
718
+ source: string;
719
+ }[];
720
+ isOriginSiteTemplate: boolean;
721
+ copiedFromTemplate: boolean;
722
+ freeTrialAvailable: boolean;
723
+ };
724
+ site?: {
725
+ locale: string;
726
+ paymentCurrency: string;
727
+ multilingual?: {
728
+ isMultiLingual: boolean;
729
+ supportedLanguages: {
730
+ languageCode: string;
731
+ locale?: {
732
+ languageCode: string;
733
+ country: string;
734
+ };
735
+ isPrimary: boolean;
736
+ countryCode: string;
737
+ resolutionMethod: ResolutionMethod$1;
738
+ }[];
739
+ };
740
+ installedWixApps: string[];
741
+ ownerInfo?: {
742
+ email: string;
743
+ emailStatus: string;
744
+ };
745
+ siteId: string;
746
+ };
747
+ }
748
+
749
+ /**
750
+ * An app instance is a specific occurrence of your app on a particular Wix site.
751
+ * When a site owner installs your app, a unique instance is generated for that
752
+ * specific site. Use the `instanceId` to keep track of the individual data
753
+ * associated with each app instance.
754
+ */
755
+ interface AppInstance {
756
+ /**
757
+ * ID of the app instance. You can use it to keep track of the individual
758
+ * data that's associated with the specific occurence of your app that's
759
+ * installed on a Wix site.
760
+ */
761
+ instanceId?: string;
762
+ /**
763
+ * App name, as set by you in the Wix Developers Center during the app creation
764
+ * process.
765
+ */
766
+ appName?: string;
767
+ /**
768
+ * Version of your app that's installed on the Wix site, as set by you in the
769
+ * Wix Developers Center during the app creation process.
770
+ */
771
+ appVersion?: string | null;
772
+ /**
773
+ * Whether the site owners have installed a free or paid version of your app
774
+ * on their site.
775
+ */
776
+ isFree?: boolean;
777
+ /**
778
+ * Billing information for the app instance. Available only in case
779
+ * `{"isFree": false}`.
780
+ */
781
+ billing?: BillingInfo;
782
+ /**
783
+ * List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
784
+ * that the site owners have granted your app. You set the list of permissions that
785
+ * your app requires from the site owners in the Wix Developers Center during the
786
+ * app creation process.
787
+ */
788
+ permissions?: string[];
789
+ /** Plans available to this app instance. */
790
+ availablePlans?: AvailablePlan[];
791
+ /**
792
+ * ID of the Wix site from which the instance of your app has been cloned.
793
+ * Available only in case `{"copiedFromTemplate": true}`.
794
+ * All visual settings of the Wix site and app data are duplicated during the
795
+ * cloning process. Wix also notifies you in case there is any additional
796
+ * external functionality for the original site.
797
+ */
798
+ originInstanceId?: string | null;
799
+ /**
800
+ * __Deprecated__. This parameter will be removed on March 30, 2023. Use
801
+ * `copiedFromTemplate` instead.
802
+ * @deprecated
803
+ */
804
+ isOriginSiteTemplate?: boolean;
805
+ /** Whether the app instance was created when another Wix site was cloned. */
806
+ copiedFromTemplate?: boolean;
807
+ /** Whether the app instance includes a free trial that hasn't started yet. */
808
+ freeTrialAvailable?: boolean;
809
+ }
810
+ interface BillingInfo {
811
+ /** Name of the package that the site owner has paid for. */
812
+ packageName?: string;
813
+ /**
814
+ * Interval of the billing cycle. `"ONE_TIME"` means that site owners have
815
+ * purchased unlimited access to the app with a single, upfront payment.
816
+ */
817
+ billingCycle?: PaymentCycle$2;
818
+ /**
819
+ * Date and time the site owners have purchased the app's paid plan in
820
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
821
+ */
822
+ timeStamp?: string;
823
+ /**
824
+ * Date and time the app's current billing cycle ends in
825
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format. Available only for yearly and
826
+ * multi-yearly plans.
827
+ */
828
+ expirationDate?: string | null;
829
+ /**
830
+ * Whether the app's subscription automatically renews at the end of the
831
+ * current billing cycle.
832
+ */
833
+ autoRenewing?: boolean | null;
834
+ /** ID of the invoice for the current billing cycle. */
835
+ invoiceId?: string | null;
836
+ /**
837
+ * Information about any discounts applied to the app instance's current billing cycle.
838
+ * If the site owners applied a developer coupon or Wix Voucher
839
+ * when installing the paid version of your app, this field holds the coupon's
840
+ * name or `“Wix discount coupon”`. Site owners may receive a Wix Voucher when
841
+ * upgrading their Wix subscription. If there is no discount for the
842
+ * current billing cycle, the field is an empty string.
843
+ */
844
+ source?: string | null;
845
+ /** Information about the free trial applied, if relevant. */
846
+ freeTrialInfo?: FreeTrialInfo;
847
+ }
848
+ declare enum PaymentCycle$2 {
849
+ NO_CYCLE = "NO_CYCLE",
850
+ MONTHLY = "MONTHLY",
851
+ YEARLY = "YEARLY",
852
+ ONE_TIME = "ONE_TIME",
853
+ TWO_YEARS = "TWO_YEARS",
854
+ THREE_YEARS = "THREE_YEARS",
855
+ FOUR_YEARS = "FOUR_YEARS",
856
+ FIVE_YEARS = "FIVE_YEARS"
857
+ }
858
+ interface FreeTrialInfo {
859
+ /**
860
+ * Current free trial status.
861
+ *
862
+ * Supported values:
863
+ *
864
+ * - `IN_PROGRESS`: The free trial is currently in progress.
865
+ * - `ENDED`: The free trial has ended.
866
+ * - `NOT_AVAILABLE`: No free trial was applied, as none was available.
867
+ * @readonly
868
+ */
869
+ status?: FreeTrialStatus;
870
+ /**
871
+ * When the free trial has ended. Populated only once the free trial is over.
872
+ * @readonly
873
+ */
874
+ endDate?: Date;
875
+ }
876
+ declare enum FreeTrialStatus {
877
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
878
+ IN_PROGRESS = "IN_PROGRESS",
879
+ ENDED = "ENDED",
880
+ NOT_AVAILABLE = "NOT_AVAILABLE"
881
+ }
882
+ interface AvailablePlan {
883
+ /** Package name of the available plan. */
884
+ packageName?: string;
885
+ /** Source of the available plan. Can be a bundle or 3rd-party app. */
886
+ source?: string;
887
+ }
888
+ interface GetAppInstanceRequest {
889
+ }
890
+ interface GetAppInstanceResponse {
891
+ /** Retrieved app instance. */
892
+ instance?: AppInstance;
893
+ /** Information about the corresponding Wix site. */
894
+ site?: SiteInfo;
895
+ }
896
+ interface SiteInfo {
897
+ /** Display name of the site. */
898
+ siteDisplayName?: string | null;
899
+ /**
900
+ * 2-letter language code of the site's locale in
901
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
902
+ */
903
+ locale?: string;
904
+ /**
905
+ * 3-letter currency code for the site's billing in
906
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
907
+ */
908
+ paymentCurrency?: string;
909
+ /** Information about the site's supported languages. */
910
+ multilingual?: Multilingual;
911
+ /** URL of the site. Available only in case the site has been published. */
912
+ url?: string | null;
913
+ /** Description of the site. */
914
+ description?: string | null;
915
+ /** Wix apps that are installed on the site. */
916
+ installedWixApps?: string[];
917
+ /**
918
+ * > **Deprecation Notice:** This parameter will be removed on June 30, 2022. Use `ownerInfo` instead.
919
+ * @deprecated
920
+ */
921
+ ownerEmail?: string | null;
922
+ /**
923
+ * Information about the site owner. Available only when calling
924
+ * _Get App Instance_ with the __Read Site Owner Email__ permission scope.
925
+ */
926
+ ownerInfo?: OwnerInfo;
927
+ /** Site ID. */
928
+ siteId?: string;
929
+ }
930
+ interface Multilingual {
931
+ /** Whether the site supports more than a single language. */
932
+ isMultiLingual?: boolean;
933
+ /** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
934
+ supportedLanguages?: SupportedLanguage[];
935
+ }
936
+ interface SupportedLanguage {
937
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
938
+ languageCode?: string;
939
+ /** Locale. */
940
+ locale?: Locale;
941
+ /** Whether the supported language is the primary language for the site. */
942
+ isPrimary?: boolean;
943
+ /** Language icon. */
944
+ countryCode?: string;
945
+ /** How the language will be resolved. For internal use. */
946
+ resolutionMethod?: ResolutionMethod;
947
+ }
948
+ interface Locale {
949
+ /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
950
+ languageCode?: string;
951
+ /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
952
+ country?: string;
953
+ }
954
+ declare enum ResolutionMethod {
955
+ QUERY_PARAM = "QUERY_PARAM",
956
+ SUBDOMAIN = "SUBDOMAIN",
957
+ SUBDIRECTORY = "SUBDIRECTORY"
958
+ }
959
+ interface OwnerInfo {
960
+ /** Site owner's email address. Identical to the site owner's login email. */
961
+ email?: string;
962
+ /**
963
+ * Supported values: `VERIFIED_OPT_IN`, `VERIFIED_OPT_OUT`,
964
+ * `NOT_VERIFIED_OPT_IN`, `NOT_VERIFIED_OPT_OUT`.
965
+ *
966
+ * Whether the site owner has verified their email and whether they have chosen
967
+ * to receive email notifications from Wix.
968
+ */
969
+ emailStatus?: string;
970
+ }
971
+ interface GetAppInstanceResponseNonNullableFields {
972
+ instance?: {
973
+ instanceId: string;
974
+ appName: string;
975
+ isFree: boolean;
976
+ billing?: {
977
+ packageName: string;
978
+ billingCycle: PaymentCycle$2;
979
+ timeStamp: string;
980
+ freeTrialInfo?: {
981
+ status: FreeTrialStatus;
982
+ };
983
+ };
984
+ permissions: string[];
985
+ availablePlans: {
986
+ packageName: string;
987
+ source: string;
988
+ }[];
989
+ isOriginSiteTemplate: boolean;
990
+ copiedFromTemplate: boolean;
991
+ freeTrialAvailable: boolean;
992
+ };
993
+ site?: {
994
+ locale: string;
995
+ paymentCurrency: string;
996
+ multilingual?: {
997
+ isMultiLingual: boolean;
998
+ supportedLanguages: {
999
+ languageCode: string;
1000
+ locale?: {
1001
+ languageCode: string;
1002
+ country: string;
1003
+ };
1004
+ isPrimary: boolean;
1005
+ countryCode: string;
1006
+ resolutionMethod: ResolutionMethod;
1007
+ }[];
1008
+ };
1009
+ installedWixApps: string[];
1010
+ ownerInfo?: {
1011
+ email: string;
1012
+ emailStatus: string;
1013
+ };
1014
+ siteId: string;
1015
+ };
1016
+ }
1017
+
1018
+ type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1019
+ getUrl: (context: any) => string;
1020
+ httpMethod: K;
1021
+ path: string;
1022
+ pathParams: M;
1023
+ __requestType: T;
1024
+ __originalRequestType: S;
1025
+ __responseType: Q;
1026
+ __originalResponseType: R;
1027
+ };
1028
+ declare function getAppInstance(): __PublicMethodMetaInfo$3<'GET', {}, GetAppInstanceRequest, GetAppInstanceRequest$1, GetAppInstanceResponse & GetAppInstanceResponseNonNullableFields, GetAppInstanceResponse$1 & GetAppInstanceResponseNonNullableFields$1>;
1029
+
1030
+ declare const meta$3_getAppInstance: typeof getAppInstance;
1031
+ declare namespace meta$3 {
1032
+ export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_getAppInstance as getAppInstance };
1033
+ }
1034
+
1035
+ interface SendBIEventResponse$1 {
1036
+ }
1037
+ interface SendBIEventRequest$1 {
1038
+ /**
1039
+ * Name of the event that's triggered in your app.
1040
+ *
1041
+ * + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
1042
+ * + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in the Wix Developers Center.
1043
+ * + `"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.
1044
+ * + `"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.
1045
+ * + `"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`.
1046
+ * + `"FUNDS_RETURNED"`: Trigger this event when you send money back to a site owner (for example, refunds or chargebacks). Make sure to also send the charge amount inside `eventData`. For example, `{"eventData": {"sum": "5.99"}}`.
1047
+ * + `"CUSTOM"`: Any event that's not listed here. Make sure to also send `customEventName`.
1048
+ * + `"APP_DEPLOYED"`: Your app’s internal code implementation is changed and might affect user flows or cause a regression.
1049
+ * + `"APP_FINISH_BUSINESS_SETUP"`: __Deprecation Notice:__ This enum value will be removed on March 30, 2023. Use `"APP_SETUP_FINISHED"` instead.
1050
+ * + `"APP_SETUP_FINISHED"`: The site owner completes your app's required business setup.
1051
+ */
1052
+ eventName?: EventName$1;
1053
+ /**
1054
+ * Name of your app's custom event that was triggered. Required when `{"eventName": "CUSTOM"}`.
1055
+ *
1056
+ * Min: 2 characters
1057
+ */
1058
+ customEventName?: string | null;
1059
+ /**
1060
+ * Supported values include: `"cycle_name"`, `"currency"`, `"sum"`, `"reason"`, `"app_plan_id"`.
1061
+ * You may also submit data with keys that aren't listed here.
1062
+ *
1063
+ * Additional data about your app's event.
1064
+ *
1065
+ * + `"cycle_name"`: Supported values: `"monthly"`, `"yearly"`, `"2 years"`, `"one time"`.
1066
+ * + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1067
+ * + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
1068
+ * + `"reason"`: Information about why the event was triggered in your app.
1069
+ * + `"app_plan_id"`: ID of the your app's plan as displayed in the Developers Center. 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).
1070
+ */
1071
+ eventData?: Record<string, string>;
1072
+ }
1073
+ declare enum EventName$1 {
1074
+ UNKNOWN = "UNKNOWN",
1075
+ APP_DASHBOARD_LOADED = "APP_DASHBOARD_LOADED",
1076
+ APP_FINISHED_CONFIGURATION = "APP_FINISHED_CONFIGURATION",
1077
+ APP_UPGRADED = "APP_UPGRADED",
1078
+ PRIMARY_ACTION_PERFORMED = "PRIMARY_ACTION_PERFORMED",
1079
+ CUSTOM = "CUSTOM",
1080
+ CHARGE = "CHARGE",
1081
+ FUNDS_RETURNED = "FUNDS_RETURNED",
1082
+ APP_FINISH_BUSINESS_SETUP = "APP_FINISH_BUSINESS_SETUP",
1083
+ APP_DEPLOYED = "APP_DEPLOYED",
1084
+ APP_SETUP_FINISHED = "APP_SETUP_FINISHED"
1085
+ }
1086
+
1087
+ interface SendBIEventResponse {
1088
+ }
1089
+ interface SendBIEventRequest {
1090
+ /**
1091
+ * Name of the event that's triggered in your app.
1092
+ *
1093
+ * + `"APP_DASHBOARD_LOADED"`: A site onwer or contributor loads your app's dashboard.
1094
+ * + `"APP_FINISHED_CONFIGURATION"`: The site owner completes all required configurations for your app in the Wix Developers Center.
1095
+ * + `"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.
1096
+ * + `"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.
1097
+ * + `"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`.
1098
+ * + `"FUNDS_RETURNED"`: Trigger this event when you send money back to a site owner (for example, refunds or chargebacks). Make sure to also send the charge amount inside `eventData`. For example, `{"eventData": {"sum": "5.99"}}`.
1099
+ * + `"CUSTOM"`: Any event that's not listed here. Make sure to also send `customEventName`.
1100
+ * + `"APP_DEPLOYED"`: Your app’s internal code implementation is changed and might affect user flows or cause a regression.
1101
+ * + `"APP_FINISH_BUSINESS_SETUP"`: __Deprecation Notice:__ This enum value will be removed on March 30, 2023. Use `"APP_SETUP_FINISHED"` instead.
1102
+ * + `"APP_SETUP_FINISHED"`: The site owner completes your app's required business setup.
1103
+ */
1104
+ eventName?: EventName;
1105
+ /**
1106
+ * Name of your app's custom event that was triggered. Required when `{"eventName": "CUSTOM"}`.
1107
+ *
1108
+ * Min: 2 characters
1109
+ */
1110
+ customEventName?: string | null;
1111
+ /**
1112
+ * Supported values include: `"cycle_name"`, `"currency"`, `"sum"`, `"reason"`, `"app_plan_id"`.
1113
+ * You may also submit data with keys that aren't listed here.
1114
+ *
1115
+ * Additional data about your app's event.
1116
+ *
1117
+ * + `"cycle_name"`: Supported values: `"monthly"`, `"yearly"`, `"2 years"`, `"one time"`.
1118
+ * + `"currency"`: 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1119
+ * + `"sum"`: Amount of money. Required for `{"eventName": "CHARGE"}` and `{"eventName": "FUNDS_RETURNED"}`.
1120
+ * + `"reason"`: Information about why the event was triggered in your app.
1121
+ * + `"app_plan_id"`: ID of the your app's plan as displayed in the Developers Center. 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).
1122
+ */
1123
+ eventData?: Record<string, string>;
1124
+ }
1125
+ declare enum EventName {
1126
+ UNKNOWN = "UNKNOWN",
1127
+ APP_DASHBOARD_LOADED = "APP_DASHBOARD_LOADED",
1128
+ APP_FINISHED_CONFIGURATION = "APP_FINISHED_CONFIGURATION",
1129
+ APP_UPGRADED = "APP_UPGRADED",
1130
+ PRIMARY_ACTION_PERFORMED = "PRIMARY_ACTION_PERFORMED",
1131
+ CUSTOM = "CUSTOM",
1132
+ CHARGE = "CHARGE",
1133
+ FUNDS_RETURNED = "FUNDS_RETURNED",
1134
+ APP_FINISH_BUSINESS_SETUP = "APP_FINISH_BUSINESS_SETUP",
1135
+ APP_DEPLOYED = "APP_DEPLOYED",
1136
+ APP_SETUP_FINISHED = "APP_SETUP_FINISHED"
1137
+ }
1138
+
1139
+ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1140
+ getUrl: (context: any) => string;
1141
+ httpMethod: K;
1142
+ path: string;
1143
+ pathParams: M;
1144
+ __requestType: T;
1145
+ __originalRequestType: S;
1146
+ __responseType: Q;
1147
+ __originalResponseType: R;
1148
+ };
1149
+ declare function sendBiEvent(): __PublicMethodMetaInfo$2<'POST', {}, SendBIEventRequest, SendBIEventRequest$1, SendBIEventResponse, SendBIEventResponse$1>;
1150
+
1151
+ declare const meta$2_sendBiEvent: typeof sendBiEvent;
1152
+ declare namespace meta$2 {
1153
+ export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_sendBiEvent as sendBiEvent };
1154
+ }
1155
+
1156
+ interface PurchasedItem$1 {
1157
+ /** ID of your app's paid plan. */
1158
+ productId?: string;
1159
+ /** Price of your app's paid plan. For example, `9.95`. */
1160
+ price?: string;
1161
+ /**
1162
+ * 3-letter currency code in
1163
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1164
+ */
1165
+ currency?: string;
1166
+ /** Information about the billing cycle for your app's paid plan. */
1167
+ billingCycle?: PaymentCycle$1;
1168
+ /**
1169
+ * Date and time the site onwers have purchased your app's paid plan in
1170
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
1171
+ */
1172
+ dateCreated?: Date;
1173
+ }
1174
+ declare enum PaymentCycle$1 {
1175
+ NO_CYCLE = "NO_CYCLE",
1176
+ MONTHLY = "MONTHLY",
1177
+ YEARLY = "YEARLY",
1178
+ ONE_TIME = "ONE_TIME",
1179
+ TWO_YEARS = "TWO_YEARS",
1180
+ THREE_YEARS = "THREE_YEARS",
1181
+ FOUR_YEARS = "FOUR_YEARS",
1182
+ FIVE_YEARS = "FIVE_YEARS"
1183
+ }
1184
+ interface GetUrlRequest$1 {
1185
+ /**
1186
+ * ID of your app's paid plan to retrieve the Wix checkout URL for. Check the
1187
+ * Wix Developers Center for a list of your app's supported product IDs.
1188
+ */
1189
+ productId: string;
1190
+ /**
1191
+ * URL for the Wix checkout page. Redirect site owners to this URL after
1192
+ * they've successfully purchased a paid plan for your app.
1193
+ */
1194
+ successUrl?: string | null;
1195
+ /**
1196
+ * Whether the checkout is for testing purposes only. Testing is mainly
1197
+ * relevant for in-app purchase flows. When `true`, Wix charges the site
1198
+ * owners an amount of `0.00`.
1199
+ */
1200
+ testCheckout?: boolean;
1201
+ /** Information about the paid plan's billing cycle. */
1202
+ billingCycle?: PaymentCycle$1;
1203
+ /**
1204
+ * 2-letter country code in
1205
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
1206
+ * format.
1207
+ *
1208
+ * Default: `"US"`
1209
+ */
1210
+ countryCode?: string | null;
1211
+ /**
1212
+ * 2-letter language code in
1213
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
1214
+ *
1215
+ * Default: `"EN"`
1216
+ */
1217
+ languageCode?: string | null;
1218
+ /** Coupon code for the paid plan. Available only in case there is a discount. */
1219
+ couponCode?: string | null;
1220
+ }
1221
+ interface GetUrlResponse$1 {
1222
+ /** URL for the Wix checkout page. */
1223
+ checkoutUrl?: string;
1224
+ /**
1225
+ * Token for the Wix checkout page. The token holds all data about the order
1226
+ * you're creating a checkout for. It is [signed](),
1227
+ * so you can verify that it comes from Wix.
1228
+ */
1229
+ token?: string | null;
1230
+ }
1231
+ interface GetPurchaseHistoryRequest$1 {
1232
+ }
1233
+ interface GetPurchaseHistoryResponse$1 {
1234
+ /** Retrieved purchases the site owners have completed for you app. */
1235
+ purchases?: PurchasedItem$1[];
1236
+ }
1237
+ interface GetUrlResponseNonNullableFields$1 {
1238
+ checkoutUrl: string;
1239
+ }
1240
+ interface GetPurchaseHistoryResponseNonNullableFields$1 {
1241
+ purchases: {
1242
+ productId: string;
1243
+ price: string;
1244
+ currency: string;
1245
+ billingCycle: PaymentCycle$1;
1246
+ }[];
1247
+ }
1248
+
1249
+ interface PurchasedItem {
1250
+ /** ID of your app's paid plan. */
1251
+ productId?: string;
1252
+ /** Price of your app's paid plan. For example, `9.95`. */
1253
+ price?: string;
1254
+ /**
1255
+ * 3-letter currency code in
1256
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
1257
+ */
1258
+ currency?: string;
1259
+ /** Information about the billing cycle for your app's paid plan. */
1260
+ billingCycle?: PaymentCycle;
1261
+ /**
1262
+ * Date and time the site onwers have purchased your app's paid plan in
1263
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
1264
+ */
1265
+ dateCreated?: Date;
1266
+ }
1267
+ declare enum PaymentCycle {
1268
+ NO_CYCLE = "NO_CYCLE",
1269
+ MONTHLY = "MONTHLY",
1270
+ YEARLY = "YEARLY",
1271
+ ONE_TIME = "ONE_TIME",
1272
+ TWO_YEARS = "TWO_YEARS",
1273
+ THREE_YEARS = "THREE_YEARS",
1274
+ FOUR_YEARS = "FOUR_YEARS",
1275
+ FIVE_YEARS = "FIVE_YEARS"
1276
+ }
1277
+ interface GetUrlRequest {
1278
+ /**
1279
+ * ID of your app's paid plan to retrieve the Wix checkout URL for. Check the
1280
+ * Wix Developers Center for a list of your app's supported product IDs.
1281
+ */
1282
+ productId: string;
1283
+ /**
1284
+ * URL for the Wix checkout page. Redirect site owners to this URL after
1285
+ * they've successfully purchased a paid plan for your app.
1286
+ */
1287
+ successUrl?: string | null;
1288
+ /**
1289
+ * Whether the checkout is for testing purposes only. Testing is mainly
1290
+ * relevant for in-app purchase flows. When `true`, Wix charges the site
1291
+ * owners an amount of `0.00`.
1292
+ */
1293
+ testCheckout?: boolean;
1294
+ /** Information about the paid plan's billing cycle. */
1295
+ billingCycle?: PaymentCycle;
1296
+ /**
1297
+ * 2-letter country code in
1298
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
1299
+ * format.
1300
+ *
1301
+ * Default: `"US"`
1302
+ */
1303
+ countryCode?: string | null;
1304
+ /**
1305
+ * 2-letter language code in
1306
+ * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
1307
+ *
1308
+ * Default: `"EN"`
1309
+ */
1310
+ languageCode?: string | null;
1311
+ /** Coupon code for the paid plan. Available only in case there is a discount. */
1312
+ couponCode?: string | null;
1313
+ }
1314
+ interface GetUrlResponse {
1315
+ /** URL for the Wix checkout page. */
1316
+ checkoutUrl?: string;
1317
+ /**
1318
+ * Token for the Wix checkout page. The token holds all data about the order
1319
+ * you're creating a checkout for. It is [signed](),
1320
+ * so you can verify that it comes from Wix.
1321
+ */
1322
+ token?: string | null;
1323
+ }
1324
+ interface GetPurchaseHistoryRequest {
1325
+ }
1326
+ interface GetPurchaseHistoryResponse {
1327
+ /** Retrieved purchases the site owners have completed for you app. */
1328
+ purchases?: PurchasedItem[];
1329
+ }
1330
+ interface GetUrlResponseNonNullableFields {
1331
+ checkoutUrl: string;
1332
+ }
1333
+ interface GetPurchaseHistoryResponseNonNullableFields {
1334
+ purchases: {
1335
+ productId: string;
1336
+ price: string;
1337
+ currency: string;
1338
+ billingCycle: PaymentCycle;
1339
+ }[];
1340
+ }
1341
+
1342
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1343
+ getUrl: (context: any) => string;
1344
+ httpMethod: K;
1345
+ path: string;
1346
+ pathParams: M;
1347
+ __requestType: T;
1348
+ __originalRequestType: S;
1349
+ __responseType: Q;
1350
+ __originalResponseType: R;
1351
+ };
1352
+ declare function getUrl(): __PublicMethodMetaInfo$1<'POST', {}, GetUrlRequest, GetUrlRequest$1, GetUrlResponse & GetUrlResponseNonNullableFields, GetUrlResponse$1 & GetUrlResponseNonNullableFields$1>;
1353
+ declare function getPurchaseHistory(): __PublicMethodMetaInfo$1<'GET', {}, GetPurchaseHistoryRequest, GetPurchaseHistoryRequest$1, GetPurchaseHistoryResponse & GetPurchaseHistoryResponseNonNullableFields, GetPurchaseHistoryResponse$1 & GetPurchaseHistoryResponseNonNullableFields$1>;
1354
+
1355
+ declare const meta$1_getPurchaseHistory: typeof getPurchaseHistory;
1356
+ declare const meta$1_getUrl: typeof getUrl;
1357
+ declare namespace meta$1 {
1358
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_getPurchaseHistory as getPurchaseHistory, meta$1_getUrl as getUrl };
1359
+ }
1360
+
1361
+ /** Embedded script data */
1362
+ interface ScriptProperties$1 {
1363
+ /** Script parameters */
1364
+ parameters?: Record<string, string>;
1365
+ /** Whether script is disabled or not, defaults to false (not disabled) */
1366
+ disabled?: boolean;
1367
+ }
1368
+ interface EmbedScriptRequest$1 {
1369
+ /** Details of the script to embed. */
1370
+ properties: ScriptProperties$1;
1371
+ /** ID of the corresponding embedded script component. */
1372
+ componentId?: string | null;
1373
+ }
1374
+ interface EmbedScriptResponse$1 {
1375
+ /** Details of the embedded script. */
1376
+ properties?: ScriptProperties$1;
1377
+ }
1378
+ interface GetEmbeddedScriptRequest$1 {
1379
+ /** Component ID of the embedded script to retrieve. */
1380
+ componentId?: string | null;
1381
+ }
1382
+ interface GetEmbeddedScriptResponse$1 {
1383
+ /** Details of the retrieved embedded script. */
1384
+ properties?: ScriptProperties$1;
1385
+ }
1386
+ interface EmbedScriptResponseNonNullableFields$1 {
1387
+ properties?: {
1388
+ disabled: boolean;
1389
+ };
1390
+ }
1391
+ interface GetEmbeddedScriptResponseNonNullableFields$1 {
1392
+ properties?: {
1393
+ disabled: boolean;
1394
+ };
1395
+ }
1396
+
1397
+ /** Embedded script data */
1398
+ interface ScriptProperties {
1399
+ /** Script parameters */
1400
+ parameters?: Record<string, string>;
1401
+ /** Whether script is disabled or not, defaults to false (not disabled) */
1402
+ disabled?: boolean;
1403
+ }
1404
+ interface EmbedScriptRequest {
1405
+ /** Details of the script to embed. */
1406
+ properties: ScriptProperties;
1407
+ /** ID of the corresponding embedded script component. */
1408
+ componentId?: string | null;
1409
+ }
1410
+ interface EmbedScriptResponse {
1411
+ /** Details of the embedded script. */
1412
+ properties?: ScriptProperties;
1413
+ }
1414
+ interface GetEmbeddedScriptRequest {
1415
+ /** Component ID of the embedded script to retrieve. */
1416
+ componentId?: string | null;
1417
+ }
1418
+ interface GetEmbeddedScriptResponse {
1419
+ /** Details of the retrieved embedded script. */
1420
+ properties?: ScriptProperties;
1421
+ }
1422
+ interface EmbedScriptResponseNonNullableFields {
1423
+ properties?: {
1424
+ disabled: boolean;
1425
+ };
1426
+ }
1427
+ interface GetEmbeddedScriptResponseNonNullableFields {
1428
+ properties?: {
1429
+ disabled: boolean;
1430
+ };
1431
+ }
1432
+
1433
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1434
+ getUrl: (context: any) => string;
1435
+ httpMethod: K;
1436
+ path: string;
1437
+ pathParams: M;
1438
+ __requestType: T;
1439
+ __originalRequestType: S;
1440
+ __responseType: Q;
1441
+ __originalResponseType: R;
1442
+ };
1443
+ declare function embedScript(): __PublicMethodMetaInfo<'POST', {}, EmbedScriptRequest, EmbedScriptRequest$1, EmbedScriptResponse & EmbedScriptResponseNonNullableFields, EmbedScriptResponse$1 & EmbedScriptResponseNonNullableFields$1>;
1444
+ declare function getEmbeddedScript(): __PublicMethodMetaInfo<'GET', {}, GetEmbeddedScriptRequest, GetEmbeddedScriptRequest$1, GetEmbeddedScriptResponse & GetEmbeddedScriptResponseNonNullableFields, GetEmbeddedScriptResponse$1 & GetEmbeddedScriptResponseNonNullableFields$1>;
1445
+
1446
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
1447
+ declare const meta_embedScript: typeof embedScript;
1448
+ declare const meta_getEmbeddedScript: typeof getEmbeddedScript;
1449
+ declare namespace meta {
1450
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_embedScript as embedScript, meta_getEmbeddedScript as getEmbeddedScript };
1451
+ }
1452
+
1453
+ export { meta$3 as appInstances, meta$4 as appPlans, meta$2 as biEvents, meta$1 as billing, meta as embeddedScripts };