@wix/auto_sdk_app-management_app-instances 1.0.19 → 1.0.21

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 (121) hide show
  1. package/build/cjs/{src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → devcenter-app-instance-v1-app-instance-app-instances.universal-Bfi1qsvM.d.ts} +83 -35
  2. package/build/cjs/index.d.ts +65 -1
  3. package/build/cjs/index.js +343 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +243 -1
  6. package/build/cjs/meta.js +145 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → es/devcenter-app-instance-v1-app-instance-app-instances.universal-Bfi1qsvM.d.mts} +83 -35
  9. package/build/es/index.d.mts +65 -0
  10. package/build/es/index.mjs +308 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/meta.d.mts +243 -0
  13. package/build/es/meta.mjs +121 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/{es/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → internal/cjs/devcenter-app-instance-v1-app-instance-app-instances.universal-Bfi1qsvM.d.ts} +83 -35
  16. package/build/internal/cjs/index.d.ts +65 -1
  17. package/build/internal/cjs/index.js +343 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +243 -1
  20. package/build/internal/cjs/meta.js +145 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/{src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → devcenter-app-instance-v1-app-instance-app-instances.universal-Bfi1qsvM.d.mts} +83 -35
  23. package/build/internal/es/index.d.mts +65 -0
  24. package/build/internal/es/index.mjs +308 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/es/meta.d.mts +243 -0
  27. package/build/internal/es/meta.mjs +121 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -48
  34. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -57
  35. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  36. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  37. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -112
  38. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  39. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  40. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -47
  41. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  42. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -29
  43. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -70
  44. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  45. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -56
  46. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  47. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -651
  48. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -123
  49. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -48
  60. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -48
  61. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  62. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  63. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -108
  64. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  65. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  66. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -20
  67. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  68. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -29
  69. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -60
  70. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  71. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -53
  72. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  73. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -651
  74. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -96
  75. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  76. package/build/internal/cjs/index.typings.d.ts +0 -1
  77. package/build/internal/cjs/index.typings.js +0 -18
  78. package/build/internal/cjs/index.typings.js.map +0 -1
  79. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -48
  80. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -57
  81. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  82. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  83. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -112
  84. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  85. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  86. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -47
  87. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  88. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -29
  89. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -70
  90. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  91. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -56
  92. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  93. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -651
  94. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -123
  95. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  96. package/build/internal/es/index.d.ts +0 -1
  97. package/build/internal/es/index.js +0 -2
  98. package/build/internal/es/index.js.map +0 -1
  99. package/build/internal/es/index.typings.d.ts +0 -1
  100. package/build/internal/es/index.typings.js +0 -2
  101. package/build/internal/es/index.typings.js.map +0 -1
  102. package/build/internal/es/meta.d.ts +0 -1
  103. package/build/internal/es/meta.js +0 -2
  104. package/build/internal/es/meta.js.map +0 -1
  105. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -48
  106. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -48
  107. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  108. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  109. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -108
  110. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  111. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  112. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -20
  113. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  114. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -29
  115. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -60
  116. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  117. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -53
  118. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  119. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -651
  120. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -96
  121. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
@@ -1,651 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- /**
3
- * An app instance is a specific occurrence of an app on a Wix site.
4
- * When a Wix user installs an app, a unique instance is generated for that
5
- * specific site. Use the `instanceId` to keep track of the individual data
6
- * associated with each app instance.
7
- */
8
- export interface AppInstance {
9
- /**
10
- * App instance ID. Useful to keep track of the
11
- * data that's associated with the specific instance of your app
12
- * installed on a Wix site.
13
- */
14
- instanceId?: string;
15
- /** App name, as you entered it in the App Dashboard. */
16
- appName?: string;
17
- /** Version of your app that's installed on the Wix site. */
18
- appVersion?: string | null;
19
- /**
20
- * Whether the Wix user has installed a free or paid version of your app
21
- * on their site.
22
- */
23
- isFree?: boolean;
24
- /**
25
- * Billing information for the app instance. Available only in case
26
- * `{"isFree": false}`.
27
- */
28
- billing?: BillingInfo;
29
- /**
30
- * List of [permissions](https://dev.wix.com/docs/build-apps/developer-tools/developers-center/example-app-walkthrough/build-an-app#4-add-permissions)
31
- * that the Wix user has granted your app. You set the list of permissions that
32
- * your app requires from the Wix user in your app's Permissions page.
33
- */
34
- permissions?: string[];
35
- /** Plans available to this app instance. */
36
- availablePlans?: AvailablePlan[];
37
- /**
38
- * ID of the Wix site from which the instance of your app has been cloned.
39
- * Available only when `{"copiedFromTemplate": true}`.
40
- * All visual settings of the Wix site and app data are duplicated during the
41
- * cloning process. Wix also notifies you in case there is any additional
42
- * external functionality for the original site.
43
- */
44
- originInstanceId?: string | null;
45
- /**
46
- * __Deprecated__. This parameter will be removed on March 30, 2023. Use
47
- * `copiedFromTemplate` instead.
48
- * @deprecated
49
- */
50
- isOriginSiteTemplate?: boolean;
51
- /** Whether this app instance was created when another Wix site was cloned. */
52
- copiedFromTemplate?: boolean;
53
- /** Whether this app instance includes a free trial that hasn't started yet. */
54
- freeTrialAvailable?: boolean;
55
- }
56
- export interface BillingInfo {
57
- /** Name of the package that the site owner has paid for. */
58
- packageName?: string;
59
- /**
60
- * Interval of the billing cycle. `ONE_TIME` indicates that the Wix user has
61
- * made a single upfront payment without any automatic subscription renewal.
62
- * This is primarily for usage credits (for example, 5 SMS) but may occasionally apply
63
- * to a one-time setup for the app.
64
- */
65
- billingCycle?: PaymentCycleWithLiterals;
66
- /**
67
- * Date and time the Wix user purchased the app's paid plan or began their free trial. In
68
- * `YYYY-MM-DDThh:mm:ss.sssZ` format.
69
- */
70
- timeStamp?: string;
71
- /**
72
- * Date and time the app's current billing cycle ends in
73
- * `YYYY-MM-DDThh:mm:ss.sssZ` format. Available only for yearly and
74
- * multi-yearly plans.
75
- */
76
- expirationDate?: string | null;
77
- /**
78
- * Whether the app's subscription automatically renews at the end of the
79
- * current billing cycle.
80
- */
81
- autoRenewing?: boolean | null;
82
- /** ID of the invoice for the current billing cycle. */
83
- invoiceId?: string | null;
84
- /**
85
- * Information about any discounts applied to the app instance's current billing cycle.
86
- * If the site owners applied a developer coupon or Wix Voucher
87
- * when installing the paid version of your app, this field holds the coupon's
88
- * name or `“Wix discount coupon”`. Site owners may receive a Wix Voucher when
89
- * upgrading their Wix subscription. If there is no discount for the
90
- * current billing cycle, the field is an empty string.
91
- */
92
- source?: string | null;
93
- /** Information about the free trial applied, if relevant. */
94
- freeTrialInfo?: FreeTrialInfo;
95
- }
96
- export declare enum PaymentCycle {
97
- NO_CYCLE = "NO_CYCLE",
98
- MONTHLY = "MONTHLY",
99
- YEARLY = "YEARLY",
100
- ONE_TIME = "ONE_TIME",
101
- TWO_YEARS = "TWO_YEARS",
102
- THREE_YEARS = "THREE_YEARS",
103
- FOUR_YEARS = "FOUR_YEARS",
104
- FIVE_YEARS = "FIVE_YEARS"
105
- }
106
- /** @enumType */
107
- export type PaymentCycleWithLiterals = PaymentCycle | 'NO_CYCLE' | 'MONTHLY' | 'YEARLY' | 'ONE_TIME' | 'TWO_YEARS' | 'THREE_YEARS' | 'FOUR_YEARS' | 'FIVE_YEARS';
108
- export interface FreeTrialInfo {
109
- /**
110
- * Current free trial status.
111
- * @readonly
112
- */
113
- status?: FreeTrialStatusWithLiterals;
114
- /**
115
- * When the free trial has ended. Populated only once the free trial is over.
116
- * @readonly
117
- */
118
- endDate?: Date | null;
119
- }
120
- export declare enum FreeTrialStatus {
121
- /** Unknown trial status. */
122
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
123
- /** The free trial is currently in progress. */
124
- IN_PROGRESS = "IN_PROGRESS",
125
- /** The free trial has ended. */
126
- ENDED = "ENDED",
127
- /** No free trial was applied, as none was available. */
128
- NOT_AVAILABLE = "NOT_AVAILABLE"
129
- }
130
- /** @enumType */
131
- export type FreeTrialStatusWithLiterals = FreeTrialStatus | 'UNKNOWN_STATUS' | 'IN_PROGRESS' | 'ENDED' | 'NOT_AVAILABLE';
132
- export interface AvailablePlan {
133
- /** Package name of the available plan. */
134
- packageName?: string;
135
- /** Source of the available plan. Can be a bundle or 3rd-party app. */
136
- source?: string;
137
- }
138
- export interface AppInstalled {
139
- /**
140
- * Unique identifier of the app within the website.
141
- * @format GUID
142
- */
143
- appId?: string;
144
- /**
145
- * Instance ID of the app in the original website (relevant only when this site was [duplicated from another site](https://support.wix.com/en/article/duplicating-your-site-1472847)).
146
- * @format GUID
147
- */
148
- originInstanceId?: string | null;
149
- }
150
- export interface AppRemoved {
151
- /**
152
- * Unique identifier of the app within the website.
153
- * @format GUID
154
- */
155
- appId?: string;
156
- }
157
- export interface PaidPlanPurchased {
158
- /** Date and time of purchase. */
159
- operationTimeStamp?: Date | null;
160
- /**
161
- * Purchased app plan.
162
- * @maxLength 100
163
- */
164
- vendorProductId?: string;
165
- /** Selected payment cycle. */
166
- cycle?: PaymentCycleWithLiterals;
167
- /** Plan expiration date. */
168
- expiresOn?: Date | null;
169
- /**
170
- * Coupon applied to purchase (if relevant).
171
- * @maxLength 150
172
- */
173
- couponName?: string | null;
174
- /**
175
- * Invoice ID.
176
- * @maxLength 50
177
- */
178
- invoiceId?: string | null;
179
- }
180
- export interface PaidPlanChanged {
181
- /** Date and time of change. */
182
- operationTimeStamp?: Date | null;
183
- /**
184
- * Newly purchased app plan.
185
- * @maxLength 100
186
- */
187
- vendorProductId?: string;
188
- /** Newly selected payment cycle. */
189
- cycle?: PaymentCycleWithLiterals;
190
- /**
191
- * Previous app plan.
192
- * @maxLength 100
193
- */
194
- previousVendorProductId?: string | null;
195
- /** Previous payment cycle. */
196
- previousCycle?: PaymentCycleWithLiterals;
197
- /**
198
- * Coupon applied to purchase (if relevant).
199
- * @maxLength 150
200
- */
201
- couponName?: string | null;
202
- /**
203
- * Invoice ID.
204
- * @maxLength 50
205
- */
206
- invoiceId?: string | null;
207
- }
208
- export interface PaidPlanAutoRenewalCancelled {
209
- /** Date and time of auto-renewal cancellation. */
210
- operationTimeStamp?: Date | null;
211
- /**
212
- * Current app plan.
213
- * @maxLength 100
214
- */
215
- vendorProductId?: string;
216
- /** Current payment cycle. */
217
- cycle?: PaymentCycleWithLiterals;
218
- /**
219
- * Supported values: `UNKNOWN_CANCELLATION_TYPE_ERROR_STATE`, `USER_CANCEL`, `FAILED_PAYMENT`, `TRANSFER_CANCELLATION_REASON`. Reason provided by app for cancellation (if relevant).
220
- * @maxLength 100
221
- */
222
- cancelReason?: string | null;
223
- /**
224
- * Reason provided by site owner for cancellation (if relevant).
225
- * @maxLength 150
226
- */
227
- userReason?: string | null;
228
- /**
229
- * Cancellation type.
230
- * @maxLength 100
231
- */
232
- subscriptionCancellationType?: string | null;
233
- /** Whether the cancellation occurred during a free trial. */
234
- cancelledDuringFreeTrial?: FreeTrialPeriodWithLiterals;
235
- }
236
- export declare enum FreeTrialPeriod {
237
- /** Free trial status unknown. */
238
- FREE_TRIAL_PERIOD_UNKNOWN = "FREE_TRIAL_PERIOD_UNKNOWN",
239
- /** During a free trial period. */
240
- DURING_FREE_TRIAL = "DURING_FREE_TRIAL",
241
- /** Not during a free trial period. */
242
- NOT_DURING_FREE_TRIAL = "NOT_DURING_FREE_TRIAL"
243
- }
244
- /** @enumType */
245
- export type FreeTrialPeriodWithLiterals = FreeTrialPeriod | 'FREE_TRIAL_PERIOD_UNKNOWN' | 'DURING_FREE_TRIAL' | 'NOT_DURING_FREE_TRIAL';
246
- export interface PlanTransferred {
247
- /** Date and time of transfer. */
248
- operationTimeStamp?: Date | null;
249
- /**
250
- * Current app plan.
251
- * @maxLength 100
252
- */
253
- vendorProductId?: string;
254
- /** Selected payment cycle. */
255
- cycle?: PaymentCycleWithLiterals;
256
- /**
257
- * Invoice ID.
258
- * @maxLength 50
259
- */
260
- invoiceId?: string | null;
261
- }
262
- export interface PlanReactivated {
263
- /** Date and time of reactivation. */
264
- operationTimeStamp?: Date | null;
265
- /**
266
- * Current app plan.
267
- * @maxLength 100
268
- */
269
- vendorProductId?: string;
270
- /** Selected payment cycle. */
271
- cycle?: PaymentCycleWithLiterals;
272
- /** Plan expiration date. */
273
- expiresOn?: Date | null;
274
- /**
275
- * Invoice ID.
276
- * @maxLength 50
277
- */
278
- invoiceId?: string | null;
279
- /** Reason for reactivation. */
280
- reason?: ReactivationReasonWithLiterals;
281
- }
282
- export declare enum ReactivationReason {
283
- /** Reactivation reason unknown. */
284
- REACTIVATION_REASON_UNKNOWN = "REACTIVATION_REASON_UNKNOWN",
285
- /** The subscription's auto-renewal is turned on. */
286
- AUTO_RENEW_TURNED_ON = "AUTO_RENEW_TURNED_ON"
287
- }
288
- /** @enumType */
289
- export type ReactivationReasonWithLiterals = ReactivationReason | 'REACTIVATION_REASON_UNKNOWN' | 'AUTO_RENEW_TURNED_ON';
290
- export interface PlanConvertedToPaid {
291
- /** Date and time of conversion to paid subscription (free-trial ended). */
292
- operationTimeStamp?: Date | null;
293
- /**
294
- * Current app plan.
295
- * @maxLength 100
296
- */
297
- vendorProductId?: string;
298
- /** Selected payment cycle. */
299
- cycle?: PaymentCycleWithLiterals;
300
- /** Plan expiration date. */
301
- expiresOn?: Date | null;
302
- }
303
- export interface GetAppInstanceRequest {
304
- }
305
- export interface GetAppInstanceResponse {
306
- /** Retrieved app instance. */
307
- instance?: AppInstance;
308
- /** Information about the site. */
309
- site?: SiteInfo;
310
- }
311
- export interface SiteInfo {
312
- /** Display name of the site. */
313
- siteDisplayName?: string | null;
314
- /**
315
- * 2-letter language code of the site's locale in
316
- * [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
317
- */
318
- locale?: string;
319
- /**
320
- * 3-letter currency code for the site's billing in
321
- * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
322
- */
323
- paymentCurrency?: string;
324
- /** Information about the site's supported languages. */
325
- multilingual?: Multilingual;
326
- /** URL of the site. Available only when the site has been published. */
327
- url?: string | null;
328
- /** Description of the site. */
329
- description?: string | null;
330
- /** Apps made by Wix that are installed on the site. */
331
- installedWixApps?: string[];
332
- /**
333
- * > **Deprecation Notice:** This parameter will be removed on June 30, 2022. Use `ownerInfo` instead.
334
- * @format EMAIL
335
- * @deprecated
336
- */
337
- ownerEmail?: string | null;
338
- /**
339
- * Information about the site's Wix user. Available only when calling
340
- * _Get App Instance_ with the __Read Site Owner Email__ permission scope.
341
- */
342
- ownerInfo?: OwnerInfo;
343
- /** Site ID. */
344
- siteId?: string;
345
- }
346
- export interface Multilingual {
347
- /** Whether the site supports more than a single language. */
348
- isMultiLingual?: boolean;
349
- /** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
350
- supportedLanguages?: SupportedLanguage[];
351
- }
352
- export interface SupportedLanguage {
353
- /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
354
- languageCode?: string;
355
- /** Locale. */
356
- locale?: Locale;
357
- /** Whether the supported language is the primary language for the site. */
358
- isPrimary?: boolean;
359
- /** Language icon. */
360
- countryCode?: string;
361
- /** How the language will be resolved. For internal use. */
362
- resolutionMethod?: ResolutionMethodWithLiterals;
363
- /** Whether the supported language is the primary language for site visitors. */
364
- isVisitorPrimary?: boolean | null;
365
- }
366
- export interface Locale {
367
- /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
368
- languageCode?: string;
369
- /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
370
- country?: string;
371
- }
372
- export declare enum ResolutionMethod {
373
- QUERY_PARAM = "QUERY_PARAM",
374
- SUBDOMAIN = "SUBDOMAIN",
375
- SUBDIRECTORY = "SUBDIRECTORY"
376
- }
377
- /** @enumType */
378
- export type ResolutionMethodWithLiterals = ResolutionMethod | 'QUERY_PARAM' | 'SUBDOMAIN' | 'SUBDIRECTORY';
379
- export interface OwnerInfo {
380
- /**
381
- * Wix user's email address. Identical to the their login email.
382
- * @format EMAIL
383
- */
384
- email?: string;
385
- /**
386
- * Supported values: `VERIFIED_OPT_IN`, `VERIFIED_OPT_OUT`,
387
- * `NOT_VERIFIED_OPT_IN`, `NOT_VERIFIED_OPT_OUT`.
388
- *
389
- * Whether the Wix user has verified their email and whether they have chosen
390
- * to receive email notifications from Wix.
391
- */
392
- emailStatus?: string;
393
- }
394
- export interface GetAppInstanceByInstanceIdRequest {
395
- /**
396
- * ID of the app instance to retrieve.
397
- * @format GUID
398
- */
399
- instanceId?: string;
400
- }
401
- export interface MessageEnvelope {
402
- /**
403
- * App instance ID.
404
- * @format GUID
405
- */
406
- instanceId?: string | null;
407
- /**
408
- * Event type.
409
- * @maxLength 150
410
- */
411
- eventType?: string;
412
- /** The identification type and identity data. */
413
- identity?: IdentificationData;
414
- /** Stringify payload. */
415
- data?: string;
416
- }
417
- export interface IdentificationData extends IdentificationDataIdOneOf {
418
- /**
419
- * ID of a site visitor that has not logged in to the site.
420
- * @format GUID
421
- */
422
- anonymousVisitorId?: string;
423
- /**
424
- * ID of a site visitor that has logged in to the site.
425
- * @format GUID
426
- */
427
- memberId?: string;
428
- /**
429
- * ID of a Wix user (site owner, contributor, etc.).
430
- * @format GUID
431
- */
432
- wixUserId?: string;
433
- /**
434
- * ID of an app.
435
- * @format GUID
436
- */
437
- appId?: string;
438
- /** @readonly */
439
- identityType?: WebhookIdentityTypeWithLiterals;
440
- }
441
- /** @oneof */
442
- export interface IdentificationDataIdOneOf {
443
- /**
444
- * ID of a site visitor that has not logged in to the site.
445
- * @format GUID
446
- */
447
- anonymousVisitorId?: string;
448
- /**
449
- * ID of a site visitor that has logged in to the site.
450
- * @format GUID
451
- */
452
- memberId?: string;
453
- /**
454
- * ID of a Wix user (site owner, contributor, etc.).
455
- * @format GUID
456
- */
457
- wixUserId?: string;
458
- /**
459
- * ID of an app.
460
- * @format GUID
461
- */
462
- appId?: string;
463
- }
464
- export declare enum WebhookIdentityType {
465
- UNKNOWN = "UNKNOWN",
466
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
467
- MEMBER = "MEMBER",
468
- WIX_USER = "WIX_USER",
469
- APP = "APP"
470
- }
471
- /** @enumType */
472
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
473
- export interface BaseEventMetadata {
474
- /**
475
- * App instance ID.
476
- * @format GUID
477
- */
478
- instanceId?: string | null;
479
- /**
480
- * Event type.
481
- * @maxLength 150
482
- */
483
- eventType?: string;
484
- /** The identification type and identity data. */
485
- identity?: IdentificationData;
486
- }
487
- export interface AppInstanceInstalledEnvelope {
488
- data: AppInstalled;
489
- metadata: BaseEventMetadata;
490
- }
491
- /**
492
- * Triggered when an instance of your app is installed on a Wix site.
493
- * @permissionScope Manage Your App
494
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
495
- * @permissionScope Read site, business, and email details
496
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
497
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
498
- * @webhook
499
- * @eventType AppInstalled
500
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
501
- * @slug installed
502
- */
503
- export declare function onAppInstanceInstalled(handler: (event: AppInstanceInstalledEnvelope) => void | Promise<void>): void;
504
- export interface AppInstanceRemovedEnvelope {
505
- data: AppRemoved;
506
- metadata: BaseEventMetadata;
507
- }
508
- /**
509
- * Triggered when an instance of your app is uninstalled from a Wix site.
510
- * @permissionScope Manage Your App
511
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
512
- * @permissionScope Read site, business, and email details
513
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
514
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
515
- * @webhook
516
- * @eventType AppRemoved
517
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
518
- * @slug removed
519
- */
520
- export declare function onAppInstanceRemoved(handler: (event: AppInstanceRemovedEnvelope) => void | Promise<void>): void;
521
- export interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
522
- data: PaidPlanAutoRenewalCancelled;
523
- metadata: BaseEventMetadata;
524
- }
525
- /**
526
- * Triggered when a Wix user either cancels a paid plan for your app, or cancels the plan's auto-renewal. The
527
- * Wix user can continue to use your app until the end of the current billing
528
- * cycle.
529
- * @permissionScope Manage Your App
530
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
531
- * @permissionScope Read site, business, and email details
532
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
533
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
534
- * @webhook
535
- * @eventType PaidPlanAutoRenewalCancelled
536
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
537
- * @slug paid_plan_auto_renewal_cancelled
538
- */
539
- export declare function onAppInstancePaidPlanAutoRenewalCancelled(handler: (event: AppInstancePaidPlanAutoRenewalCancelledEnvelope) => void | Promise<void>): void;
540
- export interface AppInstancePaidPlanChangedEnvelope {
541
- data: PaidPlanChanged;
542
- metadata: BaseEventMetadata;
543
- }
544
- /**
545
- * Triggered when a Wix user upgrades or downgrades their plan for your app.
546
- * @permissionScope Manage Your App
547
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
548
- * @permissionScope Read site, business, and email details
549
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
550
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
551
- * @webhook
552
- * @eventType PaidPlanChanged
553
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
554
- * @slug paid_plan_changed
555
- */
556
- export declare function onAppInstancePaidPlanChanged(handler: (event: AppInstancePaidPlanChangedEnvelope) => void | Promise<void>): void;
557
- export interface AppInstancePaidPlanPurchasedEnvelope {
558
- data: PaidPlanPurchased;
559
- metadata: BaseEventMetadata;
560
- }
561
- /**
562
- * Triggered when a Wix user purchases a paid plan for your app.
563
- * @permissionScope Manage Your App
564
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
565
- * @permissionScope Read site, business, and email details
566
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
567
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
568
- * @webhook
569
- * @eventType PaidPlanPurchased
570
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
571
- * @slug paid_plan_purchased
572
- */
573
- export declare function onAppInstancePaidPlanPurchased(handler: (event: AppInstancePaidPlanPurchasedEnvelope) => void | Promise<void>): void;
574
- export interface AppInstancePlanConvertedToPaidEnvelope {
575
- data: PlanConvertedToPaid;
576
- metadata: BaseEventMetadata;
577
- }
578
- /**
579
- * Triggered when a Wix user reaches the end of a free-trial period and is charged successfully.
580
- * @permissionScope Manage Your App
581
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
582
- * @permissionScope Read site, business, and email details
583
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
584
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
585
- * @webhook
586
- * @eventType PlanConvertedToPaid
587
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
588
- * @slug plan_converted_to_paid
589
- * @documentationMaturity preview
590
- */
591
- export declare function onAppInstancePlanConvertedToPaid(handler: (event: AppInstancePlanConvertedToPaidEnvelope) => void | Promise<void>): void;
592
- export interface AppInstancePlanReactivatedEnvelope {
593
- data: PlanReactivated;
594
- metadata: BaseEventMetadata;
595
- }
596
- /**
597
- * Triggered when auto-renewal is turned on for a paid plan.
598
- * @permissionScope Manage Your App
599
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
600
- * @permissionScope Read site, business, and email details
601
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
602
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
603
- * @webhook
604
- * @eventType PlanReactivated
605
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
606
- * @slug plan_reactivated
607
- * @documentationMaturity preview
608
- */
609
- export declare function onAppInstancePlanReactivated(handler: (event: AppInstancePlanReactivatedEnvelope) => void | Promise<void>): void;
610
- export interface AppInstancePlanTransferredEnvelope {
611
- data: PlanTransferred;
612
- metadata: BaseEventMetadata;
613
- }
614
- /**
615
- * Triggered when a paid plan for your app is transferred to a different Wix account.
616
- * @permissionScope Manage Your App
617
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
618
- * @permissionScope Read site, business, and email details
619
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
620
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
621
- * @webhook
622
- * @eventType PlanTransferred
623
- * @serviceIdentifier com.wixpress.market.aim.api.AppInstanceService
624
- * @slug plan_transferred
625
- * @documentationMaturity preview
626
- */
627
- export declare function onAppInstancePlanTransferred(handler: (event: AppInstancePlanTransferredEnvelope) => void | Promise<void>): void;
628
- type AppInstanceNonNullablePaths = `instanceId` | `appName` | `isFree` | `billing.packageName` | `billing.billingCycle` | `billing.timeStamp` | `billing.freeTrialInfo.status` | `permissions` | `availablePlans` | `availablePlans.${number}.packageName` | `availablePlans.${number}.source` | `isOriginSiteTemplate` | `copiedFromTemplate` | `freeTrialAvailable`;
629
- /**
630
- * Retrieves data about the instance of your app that's installed on a Wix
631
- * site and data about the site itself. For example, to check whether the Wix user has installed a free or paid version of your app,
632
- * or to check which apps made by Wix are installed on the site.
633
- *
634
- * You must authenticate this method [as a Wix app](https://dev.wix.com/docs/build-apps/develop-your-app/access/authentication/authenticate-using-oauth#step-2--make-an-authenticated-api-request).
635
- *
636
- * To retrieve `site.ownerInfo` in the response, you must
637
- * have the __READ SITE OWNER EMAIL__ permission scope in addition to
638
- * __MANAGE YOUR APP__.
639
- * @public
640
- * @permissionId WIX_DEVELOPERS.MANAGE_APP_INSTANCE
641
- * @permissionScope Manage Your App
642
- * @permissionScopeId SCOPE.DC.MANAGE-YOUR-APP
643
- * @permissionScope Read site, business, and email details
644
- * @permissionScopeId SCOPE.DEV_CENTER.APP-INSTANCE-READ-BASIC-INFO
645
- * @applicableIdentity APP
646
- * @fqn com.wixpress.market.aim.api.AppInstanceService.GetAppInstance
647
- */
648
- export declare function getAppInstance(): Promise<NonNullablePaths<GetAppInstanceResponse, {
649
- [P in AppInstanceNonNullablePaths]: `instance.${P}`;
650
- }[AppInstanceNonNullablePaths] | `site.locale` | `site.paymentCurrency` | `site.multilingual.isMultiLingual` | `site.multilingual.supportedLanguages` | `site.multilingual.supportedLanguages.${number}.languageCode` | `site.multilingual.supportedLanguages.${number}.locale.languageCode` | `site.multilingual.supportedLanguages.${number}.locale.country` | `site.multilingual.supportedLanguages.${number}.isPrimary` | `site.multilingual.supportedLanguages.${number}.countryCode` | `site.multilingual.supportedLanguages.${number}.resolutionMethod` | `site.installedWixApps` | `site.ownerInfo.email` | `site.ownerInfo.emailStatus` | `site.siteId`>>;
651
- export {};