@wix/auto_sdk_app-management_app-instances 1.0.5 → 1.0.7

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 (134) 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-B6ZXBoac.d.mts} +69 -31
  2. package/build/{internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.d.ts} +69 -31
  3. package/build/index.d.mts +46 -0
  4. package/build/index.d.ts +46 -0
  5. package/build/index.js +295 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +260 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{es/src/devcenter-app-instance-v1-app-instance-app-instances.types.d.ts → internal/devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.d.mts} +69 -31
  10. 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-B6ZXBoac.d.ts} +69 -31
  11. package/build/internal/index.d.mts +46 -0
  12. package/build/internal/index.d.ts +46 -0
  13. package/build/internal/index.js +295 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +260 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +235 -0
  18. package/build/internal/meta.d.ts +235 -0
  19. package/build/internal/meta.js +148 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +121 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +235 -0
  24. package/build/meta.d.ts +235 -0
  25. package/build/meta.js +148 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +121 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -33
  40. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -42
  41. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  42. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  43. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -112
  44. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  45. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  46. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -47
  47. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  48. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -26
  49. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -46
  50. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  51. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -56
  52. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  53. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -591
  54. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -123
  55. package/build/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -33
  67. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -33
  68. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  69. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  70. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -108
  71. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  72. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  73. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -20
  74. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  75. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -26
  76. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -36
  77. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  78. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -53
  79. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  80. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -591
  81. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -96
  82. package/build/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -33
  93. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -42
  94. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  95. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  96. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -112
  97. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  98. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  99. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -47
  100. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  101. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -26
  102. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -46
  103. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  104. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -56
  105. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  106. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -591
  107. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -123
  108. package/build/internal/cjs/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.d.ts +0 -33
  119. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js +0 -33
  120. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.context.js.map +0 -1
  121. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.d.ts +0 -13
  122. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js +0 -108
  123. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.http.js.map +0 -1
  124. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.d.ts +0 -13
  125. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js +0 -20
  126. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.meta.js.map +0 -1
  127. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.d.ts +0 -26
  128. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js +0 -36
  129. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.public.js.map +0 -1
  130. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js +0 -53
  131. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.types.js.map +0 -1
  132. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.d.ts +0 -591
  133. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js +0 -96
  134. package/build/internal/es/src/devcenter-app-instance-v1-app-instance-app-instances.universal.js.map +0 -1
@@ -4,7 +4,7 @@
4
4
  * specific site. Use the `instanceId` to keep track of the individual data
5
5
  * associated with each app instance.
6
6
  */
7
- export interface AppInstance {
7
+ interface AppInstance {
8
8
  /**
9
9
  * App instance ID. Useful to keep track of the
10
10
  * data that's associated with the specific instance of your app
@@ -52,12 +52,14 @@ export interface AppInstance {
52
52
  /** Whether this app instance includes a free trial that hasn't started yet. */
53
53
  freeTrialAvailable?: boolean;
54
54
  }
55
- export interface BillingInfo {
55
+ interface BillingInfo {
56
56
  /** Name of the package that the site owner has paid for. */
57
57
  packageName?: string;
58
58
  /**
59
- * Interval of the billing cycle. `"ONE_TIME"` means that site owners have
60
- * purchased unlimited access to the app with a single, upfront payment.
59
+ * Interval of the billing cycle. `ONE_TIME` indicates that the Wix user has
60
+ * made a single upfront payment without any automatic subscription renewal.
61
+ * This is primarily for usage credits (for example, 5 SMS) but may occasionally apply
62
+ * to a one-time setup for the app.
61
63
  */
62
64
  billingCycle?: PaymentCycle;
63
65
  /**
@@ -90,7 +92,7 @@ export interface BillingInfo {
90
92
  /** Information about the free trial applied, if relevant. */
91
93
  freeTrialInfo?: FreeTrialInfo;
92
94
  }
93
- export declare enum PaymentCycle {
95
+ declare enum PaymentCycle {
94
96
  NO_CYCLE = "NO_CYCLE",
95
97
  MONTHLY = "MONTHLY",
96
98
  YEARLY = "YEARLY",
@@ -100,7 +102,7 @@ export declare enum PaymentCycle {
100
102
  FOUR_YEARS = "FOUR_YEARS",
101
103
  FIVE_YEARS = "FIVE_YEARS"
102
104
  }
103
- export interface FreeTrialInfo {
105
+ interface FreeTrialInfo {
104
106
  /**
105
107
  * Current free trial status.
106
108
  * @readonly
@@ -112,7 +114,7 @@ export interface FreeTrialInfo {
112
114
  */
113
115
  endDate?: Date | null;
114
116
  }
115
- export declare enum FreeTrialStatus {
117
+ declare enum FreeTrialStatus {
116
118
  /** Unknown trial status. */
117
119
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
118
120
  /** The free trial is currently in progress. */
@@ -122,13 +124,13 @@ export declare enum FreeTrialStatus {
122
124
  /** No free trial was applied, as none was available. */
123
125
  NOT_AVAILABLE = "NOT_AVAILABLE"
124
126
  }
125
- export interface AvailablePlan {
127
+ interface AvailablePlan {
126
128
  /** Package name of the available plan. */
127
129
  packageName?: string;
128
130
  /** Source of the available plan. Can be a bundle or 3rd-party app. */
129
131
  source?: string;
130
132
  }
131
- export interface AppInstalled {
133
+ interface AppInstalled {
132
134
  /**
133
135
  * Unique identifier of the app within the website.
134
136
  * @format GUID
@@ -140,14 +142,14 @@ export interface AppInstalled {
140
142
  */
141
143
  originInstanceId?: string | null;
142
144
  }
143
- export interface AppRemoved {
145
+ interface AppRemoved {
144
146
  /**
145
147
  * Unique identifier of the app within the website.
146
148
  * @format GUID
147
149
  */
148
150
  appId?: string;
149
151
  }
150
- export interface PaidPlanPurchased {
152
+ interface PaidPlanPurchased {
151
153
  /** Date and time of purchase. */
152
154
  operationTimeStamp?: Date | null;
153
155
  /**
@@ -170,7 +172,7 @@ export interface PaidPlanPurchased {
170
172
  */
171
173
  invoiceId?: string | null;
172
174
  }
173
- export interface PaidPlanChanged {
175
+ interface PaidPlanChanged {
174
176
  /** Date and time of change. */
175
177
  operationTimeStamp?: Date | null;
176
178
  /**
@@ -198,7 +200,7 @@ export interface PaidPlanChanged {
198
200
  */
199
201
  invoiceId?: string | null;
200
202
  }
201
- export interface PaidPlanAutoRenewalCancelled {
203
+ interface PaidPlanAutoRenewalCancelled {
202
204
  /** Date and time of auto-renewal cancellation. */
203
205
  operationTimeStamp?: Date | null;
204
206
  /**
@@ -226,7 +228,7 @@ export interface PaidPlanAutoRenewalCancelled {
226
228
  /** Whether the cancellation occurred during a free trial. */
227
229
  cancelledDuringFreeTrial?: FreeTrialPeriod;
228
230
  }
229
- export declare enum FreeTrialPeriod {
231
+ declare enum FreeTrialPeriod {
230
232
  /** Free trial status unknown. */
231
233
  FREE_TRIAL_PERIOD_UNKNOWN = "FREE_TRIAL_PERIOD_UNKNOWN",
232
234
  /** During a free trial period. */
@@ -234,7 +236,7 @@ export declare enum FreeTrialPeriod {
234
236
  /** Not during a free trial period. */
235
237
  NOT_DURING_FREE_TRIAL = "NOT_DURING_FREE_TRIAL"
236
238
  }
237
- export interface PlanTransferred {
239
+ interface PlanTransferred {
238
240
  /** Date and time of transfer. */
239
241
  operationTimeStamp?: Date | null;
240
242
  /**
@@ -260,7 +262,7 @@ export interface PlanTransferred {
260
262
  */
261
263
  targetInstanceId?: string | null;
262
264
  }
263
- export interface PlanReactivated {
265
+ interface PlanReactivated {
264
266
  /** Date and time of reactivation. */
265
267
  operationTimeStamp?: Date | null;
266
268
  /**
@@ -280,13 +282,13 @@ export interface PlanReactivated {
280
282
  /** Reason for reactivation. */
281
283
  reason?: ReactivationReason;
282
284
  }
283
- export declare enum ReactivationReason {
285
+ declare enum ReactivationReason {
284
286
  /** Reactivation reason unknown. */
285
287
  REACTIVATION_REASON_UNKNOWN = "REACTIVATION_REASON_UNKNOWN",
286
288
  /** The subscription's auto-renew is turned on. */
287
289
  AUTO_RENEW_TURNED_ON = "AUTO_RENEW_TURNED_ON"
288
290
  }
289
- export interface PlanFreeTrialConvertedToPaid {
291
+ interface PlanFreeTrialConvertedToPaid {
290
292
  /** Date and time of conversion to paid subscription (free-trial ended). */
291
293
  operationTimeStamp?: Date | null;
292
294
  /**
@@ -299,15 +301,15 @@ export interface PlanFreeTrialConvertedToPaid {
299
301
  /** Plan expiration date. */
300
302
  expiresOn?: Date | null;
301
303
  }
302
- export interface GetAppInstanceRequest {
304
+ interface GetAppInstanceRequest {
303
305
  }
304
- export interface GetAppInstanceResponse {
306
+ interface GetAppInstanceResponse {
305
307
  /** Retrieved app instance. */
306
308
  instance?: AppInstance;
307
309
  /** Information about the site. */
308
310
  site?: SiteInfo;
309
311
  }
310
- export interface SiteInfo {
312
+ interface SiteInfo {
311
313
  /** Display name of the site. */
312
314
  siteDisplayName?: string | null;
313
315
  /**
@@ -342,13 +344,13 @@ export interface SiteInfo {
342
344
  /** Site ID. */
343
345
  siteId?: string;
344
346
  }
345
- export interface Multilingual {
347
+ interface Multilingual {
346
348
  /** Whether the site supports more than a single language. */
347
349
  isMultiLingual?: boolean;
348
350
  /** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
349
351
  supportedLanguages?: SupportedLanguage[];
350
352
  }
351
- export interface SupportedLanguage {
353
+ interface SupportedLanguage {
352
354
  /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
353
355
  languageCode?: string;
354
356
  /** Locale. */
@@ -360,18 +362,18 @@ export interface SupportedLanguage {
360
362
  /** How the language will be resolved. For internal use. */
361
363
  resolutionMethod?: ResolutionMethod;
362
364
  }
363
- export interface Locale {
365
+ interface Locale {
364
366
  /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
365
367
  languageCode?: string;
366
368
  /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
367
369
  country?: string;
368
370
  }
369
- export declare enum ResolutionMethod {
371
+ declare enum ResolutionMethod {
370
372
  QUERY_PARAM = "QUERY_PARAM",
371
373
  SUBDOMAIN = "SUBDOMAIN",
372
374
  SUBDIRECTORY = "SUBDIRECTORY"
373
375
  }
374
- export interface OwnerInfo {
376
+ interface OwnerInfo {
375
377
  /**
376
378
  * Wix user's email address. Identical to the their login email.
377
379
  * @format EMAIL
@@ -386,14 +388,14 @@ export interface OwnerInfo {
386
388
  */
387
389
  emailStatus?: string;
388
390
  }
389
- export interface GetAppInstanceByInstanceIdRequest {
391
+ interface GetAppInstanceByInstanceIdRequest {
390
392
  /**
391
393
  * ID of the app instance to retrieve.
392
394
  * @format GUID
393
395
  */
394
396
  instanceId?: string;
395
397
  }
396
- export interface MessageEnvelope {
398
+ interface MessageEnvelope {
397
399
  /**
398
400
  * App instance ID.
399
401
  * @format GUID
@@ -409,7 +411,7 @@ export interface MessageEnvelope {
409
411
  /** Stringify payload. */
410
412
  data?: string;
411
413
  }
412
- export interface IdentificationData extends IdentificationDataIdOneOf {
414
+ interface IdentificationData extends IdentificationDataIdOneOf {
413
415
  /**
414
416
  * ID of a site visitor that has not logged in to the site.
415
417
  * @format GUID
@@ -434,7 +436,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
434
436
  identityType?: WebhookIdentityType;
435
437
  }
436
438
  /** @oneof */
437
- export interface IdentificationDataIdOneOf {
439
+ interface IdentificationDataIdOneOf {
438
440
  /**
439
441
  * ID of a site visitor that has not logged in to the site.
440
442
  * @format GUID
@@ -456,10 +458,46 @@ export interface IdentificationDataIdOneOf {
456
458
  */
457
459
  appId?: string;
458
460
  }
459
- export declare enum WebhookIdentityType {
461
+ declare enum WebhookIdentityType {
460
462
  UNKNOWN = "UNKNOWN",
461
463
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
462
464
  MEMBER = "MEMBER",
463
465
  WIX_USER = "WIX_USER",
464
466
  APP = "APP"
465
467
  }
468
+ interface BaseEventMetadata {
469
+ /**
470
+ * App instance ID.
471
+ * @format GUID
472
+ */
473
+ instanceId?: string | null;
474
+ /**
475
+ * Event type.
476
+ * @maxLength 150
477
+ */
478
+ eventType?: string;
479
+ /** The identification type and identity data. */
480
+ identity?: IdentificationData;
481
+ }
482
+ interface AppInstanceInstalledEnvelope {
483
+ data: AppInstalled;
484
+ metadata: BaseEventMetadata;
485
+ }
486
+ interface AppInstanceRemovedEnvelope {
487
+ data: AppRemoved;
488
+ metadata: BaseEventMetadata;
489
+ }
490
+ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
491
+ data: PaidPlanAutoRenewalCancelled;
492
+ metadata: BaseEventMetadata;
493
+ }
494
+ interface AppInstancePaidPlanChangedEnvelope {
495
+ data: PaidPlanChanged;
496
+ metadata: BaseEventMetadata;
497
+ }
498
+ interface AppInstancePaidPlanPurchasedEnvelope {
499
+ data: PaidPlanPurchased;
500
+ metadata: BaseEventMetadata;
501
+ }
502
+
503
+ export { type AppInstance as A, type BillingInfo as B, FreeTrialStatus as F, type GetAppInstanceResponse as G, type IdentificationData as I, type Locale as L, type Multilingual as M, type OwnerInfo as O, PaymentCycle as P, ReactivationReason as R, type SiteInfo as S, WebhookIdentityType as W, FreeTrialPeriod as a, ResolutionMethod as b, type FreeTrialInfo as c, type AvailablePlan as d, type AppInstalled as e, type AppRemoved as f, type PaidPlanPurchased as g, type PaidPlanChanged as h, type PaidPlanAutoRenewalCancelled as i, type PlanTransferred as j, type PlanReactivated as k, type PlanFreeTrialConvertedToPaid as l, type GetAppInstanceRequest as m, type SupportedLanguage as n, type GetAppInstanceByInstanceIdRequest as o, type MessageEnvelope as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r, type AppInstanceInstalledEnvelope as s, type AppInstanceRemovedEnvelope as t, type AppInstancePaidPlanAutoRenewalCancelledEnvelope as u, type AppInstancePaidPlanChangedEnvelope as v, type AppInstancePaidPlanPurchasedEnvelope as w };
@@ -4,7 +4,7 @@
4
4
  * specific site. Use the `instanceId` to keep track of the individual data
5
5
  * associated with each app instance.
6
6
  */
7
- export interface AppInstance {
7
+ interface AppInstance {
8
8
  /**
9
9
  * App instance ID. Useful to keep track of the
10
10
  * data that's associated with the specific instance of your app
@@ -52,12 +52,14 @@ export interface AppInstance {
52
52
  /** Whether this app instance includes a free trial that hasn't started yet. */
53
53
  freeTrialAvailable?: boolean;
54
54
  }
55
- export interface BillingInfo {
55
+ interface BillingInfo {
56
56
  /** Name of the package that the site owner has paid for. */
57
57
  packageName?: string;
58
58
  /**
59
- * Interval of the billing cycle. `"ONE_TIME"` means that site owners have
60
- * purchased unlimited access to the app with a single, upfront payment.
59
+ * Interval of the billing cycle. `ONE_TIME` indicates that the Wix user has
60
+ * made a single upfront payment without any automatic subscription renewal.
61
+ * This is primarily for usage credits (for example, 5 SMS) but may occasionally apply
62
+ * to a one-time setup for the app.
61
63
  */
62
64
  billingCycle?: PaymentCycle;
63
65
  /**
@@ -90,7 +92,7 @@ export interface BillingInfo {
90
92
  /** Information about the free trial applied, if relevant. */
91
93
  freeTrialInfo?: FreeTrialInfo;
92
94
  }
93
- export declare enum PaymentCycle {
95
+ declare enum PaymentCycle {
94
96
  NO_CYCLE = "NO_CYCLE",
95
97
  MONTHLY = "MONTHLY",
96
98
  YEARLY = "YEARLY",
@@ -100,7 +102,7 @@ export declare enum PaymentCycle {
100
102
  FOUR_YEARS = "FOUR_YEARS",
101
103
  FIVE_YEARS = "FIVE_YEARS"
102
104
  }
103
- export interface FreeTrialInfo {
105
+ interface FreeTrialInfo {
104
106
  /**
105
107
  * Current free trial status.
106
108
  * @readonly
@@ -112,7 +114,7 @@ export interface FreeTrialInfo {
112
114
  */
113
115
  endDate?: Date | null;
114
116
  }
115
- export declare enum FreeTrialStatus {
117
+ declare enum FreeTrialStatus {
116
118
  /** Unknown trial status. */
117
119
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
118
120
  /** The free trial is currently in progress. */
@@ -122,13 +124,13 @@ export declare enum FreeTrialStatus {
122
124
  /** No free trial was applied, as none was available. */
123
125
  NOT_AVAILABLE = "NOT_AVAILABLE"
124
126
  }
125
- export interface AvailablePlan {
127
+ interface AvailablePlan {
126
128
  /** Package name of the available plan. */
127
129
  packageName?: string;
128
130
  /** Source of the available plan. Can be a bundle or 3rd-party app. */
129
131
  source?: string;
130
132
  }
131
- export interface AppInstalled {
133
+ interface AppInstalled {
132
134
  /**
133
135
  * Unique identifier of the app within the website.
134
136
  * @format GUID
@@ -140,14 +142,14 @@ export interface AppInstalled {
140
142
  */
141
143
  originInstanceId?: string | null;
142
144
  }
143
- export interface AppRemoved {
145
+ interface AppRemoved {
144
146
  /**
145
147
  * Unique identifier of the app within the website.
146
148
  * @format GUID
147
149
  */
148
150
  appId?: string;
149
151
  }
150
- export interface PaidPlanPurchased {
152
+ interface PaidPlanPurchased {
151
153
  /** Date and time of purchase. */
152
154
  operationTimeStamp?: Date | null;
153
155
  /**
@@ -170,7 +172,7 @@ export interface PaidPlanPurchased {
170
172
  */
171
173
  invoiceId?: string | null;
172
174
  }
173
- export interface PaidPlanChanged {
175
+ interface PaidPlanChanged {
174
176
  /** Date and time of change. */
175
177
  operationTimeStamp?: Date | null;
176
178
  /**
@@ -198,7 +200,7 @@ export interface PaidPlanChanged {
198
200
  */
199
201
  invoiceId?: string | null;
200
202
  }
201
- export interface PaidPlanAutoRenewalCancelled {
203
+ interface PaidPlanAutoRenewalCancelled {
202
204
  /** Date and time of auto-renewal cancellation. */
203
205
  operationTimeStamp?: Date | null;
204
206
  /**
@@ -226,7 +228,7 @@ export interface PaidPlanAutoRenewalCancelled {
226
228
  /** Whether the cancellation occurred during a free trial. */
227
229
  cancelledDuringFreeTrial?: FreeTrialPeriod;
228
230
  }
229
- export declare enum FreeTrialPeriod {
231
+ declare enum FreeTrialPeriod {
230
232
  /** Free trial status unknown. */
231
233
  FREE_TRIAL_PERIOD_UNKNOWN = "FREE_TRIAL_PERIOD_UNKNOWN",
232
234
  /** During a free trial period. */
@@ -234,7 +236,7 @@ export declare enum FreeTrialPeriod {
234
236
  /** Not during a free trial period. */
235
237
  NOT_DURING_FREE_TRIAL = "NOT_DURING_FREE_TRIAL"
236
238
  }
237
- export interface PlanTransferred {
239
+ interface PlanTransferred {
238
240
  /** Date and time of transfer. */
239
241
  operationTimeStamp?: Date | null;
240
242
  /**
@@ -260,7 +262,7 @@ export interface PlanTransferred {
260
262
  */
261
263
  targetInstanceId?: string | null;
262
264
  }
263
- export interface PlanReactivated {
265
+ interface PlanReactivated {
264
266
  /** Date and time of reactivation. */
265
267
  operationTimeStamp?: Date | null;
266
268
  /**
@@ -280,13 +282,13 @@ export interface PlanReactivated {
280
282
  /** Reason for reactivation. */
281
283
  reason?: ReactivationReason;
282
284
  }
283
- export declare enum ReactivationReason {
285
+ declare enum ReactivationReason {
284
286
  /** Reactivation reason unknown. */
285
287
  REACTIVATION_REASON_UNKNOWN = "REACTIVATION_REASON_UNKNOWN",
286
288
  /** The subscription's auto-renew is turned on. */
287
289
  AUTO_RENEW_TURNED_ON = "AUTO_RENEW_TURNED_ON"
288
290
  }
289
- export interface PlanFreeTrialConvertedToPaid {
291
+ interface PlanFreeTrialConvertedToPaid {
290
292
  /** Date and time of conversion to paid subscription (free-trial ended). */
291
293
  operationTimeStamp?: Date | null;
292
294
  /**
@@ -299,15 +301,15 @@ export interface PlanFreeTrialConvertedToPaid {
299
301
  /** Plan expiration date. */
300
302
  expiresOn?: Date | null;
301
303
  }
302
- export interface GetAppInstanceRequest {
304
+ interface GetAppInstanceRequest {
303
305
  }
304
- export interface GetAppInstanceResponse {
306
+ interface GetAppInstanceResponse {
305
307
  /** Retrieved app instance. */
306
308
  instance?: AppInstance;
307
309
  /** Information about the site. */
308
310
  site?: SiteInfo;
309
311
  }
310
- export interface SiteInfo {
312
+ interface SiteInfo {
311
313
  /** Display name of the site. */
312
314
  siteDisplayName?: string | null;
313
315
  /**
@@ -342,13 +344,13 @@ export interface SiteInfo {
342
344
  /** Site ID. */
343
345
  siteId?: string;
344
346
  }
345
- export interface Multilingual {
347
+ interface Multilingual {
346
348
  /** Whether the site supports more than a single language. */
347
349
  isMultiLingual?: boolean;
348
350
  /** List of supported languages. Returned only when `{"isMultiLingual": true}`. */
349
351
  supportedLanguages?: SupportedLanguage[];
350
352
  }
351
- export interface SupportedLanguage {
353
+ interface SupportedLanguage {
352
354
  /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
353
355
  languageCode?: string;
354
356
  /** Locale. */
@@ -360,18 +362,18 @@ export interface SupportedLanguage {
360
362
  /** How the language will be resolved. For internal use. */
361
363
  resolutionMethod?: ResolutionMethod;
362
364
  }
363
- export interface Locale {
365
+ interface Locale {
364
366
  /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
365
367
  languageCode?: string;
366
368
  /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */
367
369
  country?: string;
368
370
  }
369
- export declare enum ResolutionMethod {
371
+ declare enum ResolutionMethod {
370
372
  QUERY_PARAM = "QUERY_PARAM",
371
373
  SUBDOMAIN = "SUBDOMAIN",
372
374
  SUBDIRECTORY = "SUBDIRECTORY"
373
375
  }
374
- export interface OwnerInfo {
376
+ interface OwnerInfo {
375
377
  /**
376
378
  * Wix user's email address. Identical to the their login email.
377
379
  * @format EMAIL
@@ -386,14 +388,14 @@ export interface OwnerInfo {
386
388
  */
387
389
  emailStatus?: string;
388
390
  }
389
- export interface GetAppInstanceByInstanceIdRequest {
391
+ interface GetAppInstanceByInstanceIdRequest {
390
392
  /**
391
393
  * ID of the app instance to retrieve.
392
394
  * @format GUID
393
395
  */
394
396
  instanceId?: string;
395
397
  }
396
- export interface MessageEnvelope {
398
+ interface MessageEnvelope {
397
399
  /**
398
400
  * App instance ID.
399
401
  * @format GUID
@@ -409,7 +411,7 @@ export interface MessageEnvelope {
409
411
  /** Stringify payload. */
410
412
  data?: string;
411
413
  }
412
- export interface IdentificationData extends IdentificationDataIdOneOf {
414
+ interface IdentificationData extends IdentificationDataIdOneOf {
413
415
  /**
414
416
  * ID of a site visitor that has not logged in to the site.
415
417
  * @format GUID
@@ -434,7 +436,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
434
436
  identityType?: WebhookIdentityType;
435
437
  }
436
438
  /** @oneof */
437
- export interface IdentificationDataIdOneOf {
439
+ interface IdentificationDataIdOneOf {
438
440
  /**
439
441
  * ID of a site visitor that has not logged in to the site.
440
442
  * @format GUID
@@ -456,10 +458,46 @@ export interface IdentificationDataIdOneOf {
456
458
  */
457
459
  appId?: string;
458
460
  }
459
- export declare enum WebhookIdentityType {
461
+ declare enum WebhookIdentityType {
460
462
  UNKNOWN = "UNKNOWN",
461
463
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
462
464
  MEMBER = "MEMBER",
463
465
  WIX_USER = "WIX_USER",
464
466
  APP = "APP"
465
467
  }
468
+ interface BaseEventMetadata {
469
+ /**
470
+ * App instance ID.
471
+ * @format GUID
472
+ */
473
+ instanceId?: string | null;
474
+ /**
475
+ * Event type.
476
+ * @maxLength 150
477
+ */
478
+ eventType?: string;
479
+ /** The identification type and identity data. */
480
+ identity?: IdentificationData;
481
+ }
482
+ interface AppInstanceInstalledEnvelope {
483
+ data: AppInstalled;
484
+ metadata: BaseEventMetadata;
485
+ }
486
+ interface AppInstanceRemovedEnvelope {
487
+ data: AppRemoved;
488
+ metadata: BaseEventMetadata;
489
+ }
490
+ interface AppInstancePaidPlanAutoRenewalCancelledEnvelope {
491
+ data: PaidPlanAutoRenewalCancelled;
492
+ metadata: BaseEventMetadata;
493
+ }
494
+ interface AppInstancePaidPlanChangedEnvelope {
495
+ data: PaidPlanChanged;
496
+ metadata: BaseEventMetadata;
497
+ }
498
+ interface AppInstancePaidPlanPurchasedEnvelope {
499
+ data: PaidPlanPurchased;
500
+ metadata: BaseEventMetadata;
501
+ }
502
+
503
+ export { type AppInstance as A, type BillingInfo as B, FreeTrialStatus as F, type GetAppInstanceResponse as G, type IdentificationData as I, type Locale as L, type Multilingual as M, type OwnerInfo as O, PaymentCycle as P, ReactivationReason as R, type SiteInfo as S, WebhookIdentityType as W, FreeTrialPeriod as a, ResolutionMethod as b, type FreeTrialInfo as c, type AvailablePlan as d, type AppInstalled as e, type AppRemoved as f, type PaidPlanPurchased as g, type PaidPlanChanged as h, type PaidPlanAutoRenewalCancelled as i, type PlanTransferred as j, type PlanReactivated as k, type PlanFreeTrialConvertedToPaid as l, type GetAppInstanceRequest as m, type SupportedLanguage as n, type GetAppInstanceByInstanceIdRequest as o, type MessageEnvelope as p, type IdentificationDataIdOneOf as q, type BaseEventMetadata as r, type AppInstanceInstalledEnvelope as s, type AppInstanceRemovedEnvelope as t, type AppInstancePaidPlanAutoRenewalCancelledEnvelope as u, type AppInstancePaidPlanChangedEnvelope as v, type AppInstancePaidPlanPurchasedEnvelope as w };
@@ -0,0 +1,46 @@
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { G as GetAppInstanceResponse } from './devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.mjs';
3
+ export { e as AppInstalled, A as AppInstance, s as AppInstanceInstalledEnvelope, u as AppInstancePaidPlanAutoRenewalCancelledEnvelope, v as AppInstancePaidPlanChangedEnvelope, w as AppInstancePaidPlanPurchasedEnvelope, t as AppInstanceRemovedEnvelope, f as AppRemoved, d as AvailablePlan, r as BaseEventMetadata, B as BillingInfo, c as FreeTrialInfo, a as FreeTrialPeriod, F as FreeTrialStatus, o as GetAppInstanceByInstanceIdRequest, m as GetAppInstanceRequest, I as IdentificationData, q as IdentificationDataIdOneOf, L as Locale, p as MessageEnvelope, M as Multilingual, O as OwnerInfo, i as PaidPlanAutoRenewalCancelled, h as PaidPlanChanged, g as PaidPlanPurchased, P as PaymentCycle, l as PlanFreeTrialConvertedToPaid, k as PlanReactivated, j as PlanTransferred, R as ReactivationReason, b as ResolutionMethod, S as SiteInfo, n as SupportedLanguage, W as WebhookIdentityType } from './devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.mjs';
4
+ import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
5
+
6
+ declare function getAppInstance$1(httpClient: HttpClient): GetAppInstanceSignature;
7
+ interface GetAppInstanceSignature {
8
+ /**
9
+ * Retrieves data about the instance of your app that's installed on a Wix
10
+ * 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,
11
+ * or to check which apps made by Wix are installed on the site.
12
+ *
13
+ * You must authenticate this method as a Wix app ([REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#wix-app) | [SDK](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps)).
14
+ *
15
+ * To retrieve `site.ownerInfo` in the response, you must
16
+ * have the __READ SITE OWNER EMAIL__ permission scope in addition to
17
+ * __MANAGE YOUR APP__.
18
+ */
19
+ (): Promise<GetAppInstanceResponse>;
20
+ }
21
+
22
+ declare const getAppInstance: MaybeContext<BuildRESTFunction<typeof getAppInstance$1> & typeof getAppInstance$1>;
23
+ /**
24
+ * Triggered when an instance of your app is installed on a Wix site.
25
+ */
26
+ declare const onAppInstanceInstalled: ReturnType<typeof createEventModule<typeof publicOnAppInstanceInstalled>>;
27
+ /**
28
+ * Triggered when an instance of your app is uninstalled from a Wix site.
29
+ */
30
+ declare const onAppInstanceRemoved: ReturnType<typeof createEventModule<typeof publicOnAppInstanceRemoved>>;
31
+ /**
32
+ * Triggered when a Wix user cancels a paid plan for your app. The
33
+ * Wix user can continue to use your app until the end of the current billing
34
+ * cycle.
35
+ */
36
+ declare const onAppInstancePaidPlanAutoRenewalCancelled: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanAutoRenewalCancelled>>;
37
+ /**
38
+ * Triggered when a Wix user upgrades or downgrades their plan for your app.
39
+ */
40
+ declare const onAppInstancePaidPlanChanged: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanChanged>>;
41
+ /**
42
+ * Triggered when a Wix user purchases a paid plan for your app.
43
+ */
44
+ declare const onAppInstancePaidPlanPurchased: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanPurchased>>;
45
+
46
+ export { GetAppInstanceResponse, getAppInstance, onAppInstanceInstalled, onAppInstancePaidPlanAutoRenewalCancelled, onAppInstancePaidPlanChanged, onAppInstancePaidPlanPurchased, onAppInstanceRemoved };
@@ -0,0 +1,46 @@
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { G as GetAppInstanceResponse } from './devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.js';
3
+ export { e as AppInstalled, A as AppInstance, s as AppInstanceInstalledEnvelope, u as AppInstancePaidPlanAutoRenewalCancelledEnvelope, v as AppInstancePaidPlanChangedEnvelope, w as AppInstancePaidPlanPurchasedEnvelope, t as AppInstanceRemovedEnvelope, f as AppRemoved, d as AvailablePlan, r as BaseEventMetadata, B as BillingInfo, c as FreeTrialInfo, a as FreeTrialPeriod, F as FreeTrialStatus, o as GetAppInstanceByInstanceIdRequest, m as GetAppInstanceRequest, I as IdentificationData, q as IdentificationDataIdOneOf, L as Locale, p as MessageEnvelope, M as Multilingual, O as OwnerInfo, i as PaidPlanAutoRenewalCancelled, h as PaidPlanChanged, g as PaidPlanPurchased, P as PaymentCycle, l as PlanFreeTrialConvertedToPaid, k as PlanReactivated, j as PlanTransferred, R as ReactivationReason, b as ResolutionMethod, S as SiteInfo, n as SupportedLanguage, W as WebhookIdentityType } from './devcenter-app-instance-v1-app-instance-app-instances.universal-B6ZXBoac.js';
4
+ import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
5
+
6
+ declare function getAppInstance$1(httpClient: HttpClient): GetAppInstanceSignature;
7
+ interface GetAppInstanceSignature {
8
+ /**
9
+ * Retrieves data about the instance of your app that's installed on a Wix
10
+ * 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,
11
+ * or to check which apps made by Wix are installed on the site.
12
+ *
13
+ * You must authenticate this method as a Wix app ([REST](https://dev.wix.com/docs/rest/articles/getting-started/about-identities#wix-app) | [SDK](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-apps)).
14
+ *
15
+ * To retrieve `site.ownerInfo` in the response, you must
16
+ * have the __READ SITE OWNER EMAIL__ permission scope in addition to
17
+ * __MANAGE YOUR APP__.
18
+ */
19
+ (): Promise<GetAppInstanceResponse>;
20
+ }
21
+
22
+ declare const getAppInstance: MaybeContext<BuildRESTFunction<typeof getAppInstance$1> & typeof getAppInstance$1>;
23
+ /**
24
+ * Triggered when an instance of your app is installed on a Wix site.
25
+ */
26
+ declare const onAppInstanceInstalled: ReturnType<typeof createEventModule<typeof publicOnAppInstanceInstalled>>;
27
+ /**
28
+ * Triggered when an instance of your app is uninstalled from a Wix site.
29
+ */
30
+ declare const onAppInstanceRemoved: ReturnType<typeof createEventModule<typeof publicOnAppInstanceRemoved>>;
31
+ /**
32
+ * Triggered when a Wix user cancels a paid plan for your app. The
33
+ * Wix user can continue to use your app until the end of the current billing
34
+ * cycle.
35
+ */
36
+ declare const onAppInstancePaidPlanAutoRenewalCancelled: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanAutoRenewalCancelled>>;
37
+ /**
38
+ * Triggered when a Wix user upgrades or downgrades their plan for your app.
39
+ */
40
+ declare const onAppInstancePaidPlanChanged: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanChanged>>;
41
+ /**
42
+ * Triggered when a Wix user purchases a paid plan for your app.
43
+ */
44
+ declare const onAppInstancePaidPlanPurchased: ReturnType<typeof createEventModule<typeof publicOnAppInstancePaidPlanPurchased>>;
45
+
46
+ export { GetAppInstanceResponse, getAppInstance, onAppInstanceInstalled, onAppInstancePaidPlanAutoRenewalCancelled, onAppInstancePaidPlanChanged, onAppInstancePaidPlanPurchased, onAppInstanceRemoved };