@wix/auto_sdk_premium_google-subscriptions 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1339 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
+
4
+ /**
5
+ * A Google subscription is a Google Workspace subscription, such as Business Email, that a Wix account purchased for one of its domains.
6
+ * It holds the number of licensed seats, the subscription's status, and the IDs Google uses for the customer and the subscription.
7
+ */
8
+ interface GoogleSubscription {
9
+ /**
10
+ * Google subscription ID.
11
+ * @format GUID
12
+ * @readonly
13
+ */
14
+ _id?: string | null;
15
+ /**
16
+ * Revision number, which increments by 1 each time the Google subscription is updated.
17
+ * To prevent conflicting changes,
18
+ * the current revision must be passed when updating the Google subscription.
19
+ *
20
+ * Ignored when creating a Google subscription.
21
+ * @readonly
22
+ */
23
+ revision?: string | null;
24
+ /**
25
+ * Date and time the Google subscription was created.
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date | null;
29
+ /**
30
+ * Date and time the Google subscription was last updated.
31
+ * @readonly
32
+ */
33
+ _updatedDate?: Date | null;
34
+ /**
35
+ * Number of licensed seats in the subscription. Each seat is 1 user account.
36
+ * @readonly
37
+ * @min 1
38
+ */
39
+ seats?: number;
40
+ /**
41
+ * ID of the Wix premium subscription this Google subscription belongs to.
42
+ * @format GUID
43
+ * @readonly
44
+ */
45
+ subscriptionId?: string;
46
+ /**
47
+ * Domain the subscription is for. For example, `my-domain.com`.
48
+ * @format HOSTNAME
49
+ * @readonly
50
+ */
51
+ domainName?: string;
52
+ /**
53
+ * Subscription status.
54
+ * @readonly
55
+ */
56
+ status?: StatusWithLiterals;
57
+ /**
58
+ * IDs Google uses for this subscription.
59
+ * @readonly
60
+ */
61
+ googleData?: GoogleData;
62
+ }
63
+ declare enum Status {
64
+ /** Unknown subscription status. */
65
+ UNKNOWN = "UNKNOWN",
66
+ /** Subscription is live and its mailboxes work. */
67
+ ACTIVE = "ACTIVE",
68
+ /** Subscription ended and wasn't renewed. */
69
+ EXPIRED = "EXPIRED",
70
+ /** Subscription was purchased, but its administrator account isn't set up yet. */
71
+ INCOMPLETE_SETUP = "INCOMPLETE_SETUP",
72
+ /** Google suspended the subscription until the customer accepts Google's terms of service. */
73
+ SUSPENDED_TOS = "SUSPENDED_TOS",
74
+ /** Wix suspended the subscription, for example after a failed payment. */
75
+ SUSPENDED_BY_WIX = "SUSPENDED_BY_WIX",
76
+ /** Subscription was transferred to another Google reseller. */
77
+ TRANSFERRED_OUT = "TRANSFERRED_OUT",
78
+ /** Purchase is in progress and the subscription isn't created at Google yet. */
79
+ PENDING = "PENDING",
80
+ /** Purchase couldn't be delivered, so no subscription was created at Google. */
81
+ NOT_DELIVERED = "NOT_DELIVERED",
82
+ /** Purchase is waiting for the customer's Google Workspace to become available, for example until the customer accepts Google's terms of service. */
83
+ PENDING_GWS = "PENDING_GWS"
84
+ }
85
+ /** @enumType */
86
+ type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'EXPIRED' | 'INCOMPLETE_SETUP' | 'SUSPENDED_TOS' | 'SUSPENDED_BY_WIX' | 'TRANSFERRED_OUT' | 'PENDING' | 'NOT_DELIVERED' | 'PENDING_GWS';
87
+ interface GoogleData {
88
+ /**
89
+ * Google customer ID of the Google Workspace that owns the subscription.
90
+ * @readonly
91
+ * @maxLength 16
92
+ */
93
+ googleCustomerId?: string | null;
94
+ /**
95
+ * Subscription ID at Google.
96
+ * @readonly
97
+ * @maxLength 16
98
+ */
99
+ googleSubscriptionId?: string | null;
100
+ /**
101
+ * ID of the Google product SKU the subscription is for, such as a specific Google Workspace edition.
102
+ * @readonly
103
+ * @maxLength 16
104
+ */
105
+ googleSkuId?: string;
106
+ }
107
+ interface IsEligibleRequest {
108
+ /**
109
+ * Domain to check. For example, `my-domain.com`.
110
+ * @format HOSTNAME
111
+ */
112
+ domainName?: string;
113
+ /**
114
+ * ID of the product to check eligibility for.
115
+ *
116
+ * Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.
117
+ * @format GUID
118
+ */
119
+ productTypeId?: string;
120
+ /** Not-eligible reasons to ignore when calculating the result. */
121
+ postEligibility?: PostEligibilityActions;
122
+ /**
123
+ * Premium subscription ID of an existing Business Email subscription, when checking eligibility to upgrade it.
124
+ * @format GUID
125
+ */
126
+ existingSubscriptionPremiumId?: string | null;
127
+ }
128
+ interface PostEligibilityActions {
129
+ /**
130
+ * Not-eligible reasons to ignore.
131
+ *
132
+ * A reason is ignored only when it exactly matches a reason the check returns, including its fields, such as `domainName`.
133
+ * @maxSize 10
134
+ * @minSize 1
135
+ */
136
+ ignoreReasons?: NotEligibleReason[];
137
+ }
138
+ interface NotEligibleReason extends NotEligibleReasonReasonOneOf {
139
+ /** Requested number of seats isn't valid. Reserved, and currently not returned. */
140
+ invalidRequestedSeats?: InvalidRequestedSeats;
141
+ /** The account has no active Business Email subscription, which the product requires. */
142
+ noGwsFound?: NoGWSFound;
143
+ /** The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned. */
144
+ incompatibleGws?: IncompatibleWithCurrentGWSProduct;
145
+ /** The customer must accept Google's terms of service first. Reserved, and currently not returned. */
146
+ acceptTosRequired?: AcceptTosRequired;
147
+ /** Another Google customer already uses the domain. Reserved, and currently not returned. */
148
+ alreadyTaken?: GoogleCustomerAlreadyTakenOnGoogle;
149
+ /** The domain already has a Business Email package. */
150
+ emailPackageAlreadyExists?: EmailPackageAlreadyExists;
151
+ /** The caller's account doesn't own the domain. */
152
+ domainNotOwnedByUser?: DomainNotOwnedByUser;
153
+ /** Couldn't find the domain. */
154
+ domainNotFound?: DomainNotFound;
155
+ /** No products are available to purchase for the domain. Reserved, and currently not returned. */
156
+ noPurchasableSkus?: NoPurchasableSkus;
157
+ /** The account already has the add-on. */
158
+ addonAlreadyExists?: AddonAlreadyExists;
159
+ /** The product isn't available in the customer's country. */
160
+ notEligibleCountry?: NotEligibleCountry;
161
+ /** Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it. */
162
+ notEligibleCloudIdentityType?: NotEligibleCloudIdentityType;
163
+ /** The domain name isn't valid. */
164
+ invalidDomainName?: InvalidDomainName;
165
+ /** The domain already has a Google Workspace subscription. Reserved, and currently not returned. */
166
+ workspaceSubscriptionAlreadyExists?: WorkspaceSubscriptionAlreadyExists;
167
+ /** Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark. */
168
+ restrictedDomainName?: RestrictedDomainName;
169
+ /** Another check failed. `reason` describes the check. */
170
+ validationFailure?: GoogleWorkspaceValidationFailure;
171
+ /** Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned. */
172
+ incompatibleSeats?: IncompatibleGWSSeats;
173
+ }
174
+ /** @oneof */
175
+ interface NotEligibleReasonReasonOneOf {
176
+ /** Requested number of seats isn't valid. Reserved, and currently not returned. */
177
+ invalidRequestedSeats?: InvalidRequestedSeats;
178
+ /** The account has no active Business Email subscription, which the product requires. */
179
+ noGwsFound?: NoGWSFound;
180
+ /** The account's current Google Workspace product isn't compatible with the product. Reserved, and currently not returned. */
181
+ incompatibleGws?: IncompatibleWithCurrentGWSProduct;
182
+ /** The customer must accept Google's terms of service first. Reserved, and currently not returned. */
183
+ acceptTosRequired?: AcceptTosRequired;
184
+ /** Another Google customer already uses the domain. Reserved, and currently not returned. */
185
+ alreadyTaken?: GoogleCustomerAlreadyTakenOnGoogle;
186
+ /** The domain already has a Business Email package. */
187
+ emailPackageAlreadyExists?: EmailPackageAlreadyExists;
188
+ /** The caller's account doesn't own the domain. */
189
+ domainNotOwnedByUser?: DomainNotOwnedByUser;
190
+ /** Couldn't find the domain. */
191
+ domainNotFound?: DomainNotFound;
192
+ /** No products are available to purchase for the domain. Reserved, and currently not returned. */
193
+ noPurchasableSkus?: NoPurchasableSkus;
194
+ /** The account already has the add-on. */
195
+ addonAlreadyExists?: AddonAlreadyExists;
196
+ /** The product isn't available in the customer's country. */
197
+ notEligibleCountry?: NotEligibleCountry;
198
+ /** Google can't set up a Google Workspace for the domain, for example because a Google customer already exists for it. */
199
+ notEligibleCloudIdentityType?: NotEligibleCloudIdentityType;
200
+ /** The domain name isn't valid. */
201
+ invalidDomainName?: InvalidDomainName;
202
+ /** The domain already has a Google Workspace subscription. Reserved, and currently not returned. */
203
+ workspaceSubscriptionAlreadyExists?: WorkspaceSubscriptionAlreadyExists;
204
+ /** Google Workspace can't be set up on the domain, for example because it's a subdomain or contains a Google trademark. */
205
+ restrictedDomainName?: RestrictedDomainName;
206
+ /** Another check failed. `reason` describes the check. */
207
+ validationFailure?: GoogleWorkspaceValidationFailure;
208
+ /** Requested number of seats isn't compatible with the current subscription. Reserved, and currently not returned. */
209
+ incompatibleSeats?: IncompatibleGWSSeats;
210
+ }
211
+ interface InvalidRequestedSeats {
212
+ /** Number of seats that can be purchased. */
213
+ availableSeats?: number;
214
+ /** Number of seats requested. */
215
+ requestedSeat?: number;
216
+ }
217
+ interface NoGWSFound {
218
+ }
219
+ interface IncompatibleWithCurrentGWSProduct {
220
+ /**
221
+ * Google SKU ID of the account's current Google Workspace product.
222
+ * @maxLength 16
223
+ */
224
+ gwsSkuId?: string;
225
+ }
226
+ interface AcceptTosRequired {
227
+ /**
228
+ * ID of the Google Workspace subscription whose terms of service must be accepted.
229
+ * @format GUID
230
+ */
231
+ acceptTosGwsId?: string;
232
+ }
233
+ interface GoogleCustomerAlreadyTakenOnGoogle {
234
+ /**
235
+ * Domain another Google customer already uses.
236
+ * @format HOSTNAME
237
+ */
238
+ domainName?: string;
239
+ }
240
+ interface EmailPackageAlreadyExists {
241
+ /**
242
+ * Domain that already has a Business Email package.
243
+ * @format HOSTNAME
244
+ */
245
+ domainName?: string;
246
+ /**
247
+ * ID of the Wix account that owns the existing package.
248
+ * @format GUID
249
+ */
250
+ targetAccountId?: string;
251
+ }
252
+ interface DomainNotOwnedByUser {
253
+ /**
254
+ * Domain the caller's account doesn't own.
255
+ * @format HOSTNAME
256
+ */
257
+ domainName?: string;
258
+ }
259
+ interface DomainNotFound {
260
+ /**
261
+ * Domain that couldn't be found.
262
+ * @format HOSTNAME
263
+ */
264
+ domainName?: string;
265
+ }
266
+ interface NoPurchasableSkus {
267
+ /**
268
+ * Domain with no products available to purchase.
269
+ * @format HOSTNAME
270
+ */
271
+ domainName?: string;
272
+ }
273
+ interface AddonAlreadyExists {
274
+ /**
275
+ * Domain whose Google Workspace already has the add-on.
276
+ * @format HOSTNAME
277
+ */
278
+ domainName?: string;
279
+ /**
280
+ * Status of the existing add-on subscription. For example, `ACTIVE`.
281
+ * @maxLength 16
282
+ */
283
+ status?: string;
284
+ /**
285
+ * Product type ID of the existing add-on.
286
+ * @format GUID
287
+ */
288
+ productTypeId?: string;
289
+ }
290
+ interface NotEligibleCountry {
291
+ /**
292
+ * Domain that was checked.
293
+ * @format HOSTNAME
294
+ */
295
+ domainName?: string;
296
+ /**
297
+ * 2-letter code, in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, of the country where the product isn't available.
298
+ * @minLength 2
299
+ * @maxLength 2
300
+ */
301
+ countryCode?: string;
302
+ }
303
+ interface NotEligibleCloudIdentityType {
304
+ /**
305
+ * Domain that was checked.
306
+ * @format HOSTNAME
307
+ */
308
+ domainName?: string;
309
+ /**
310
+ * Why Google can't set up a Google Workspace for the domain.
311
+ * @minLength 1
312
+ * @maxLength 50
313
+ */
314
+ reason?: string;
315
+ }
316
+ interface InvalidDomainName {
317
+ /**
318
+ * Domain name that isn't valid.
319
+ * @maxLength 200
320
+ */
321
+ domainName?: string;
322
+ }
323
+ interface WorkspaceSubscriptionAlreadyExists {
324
+ /**
325
+ * Domain that already has a Google Workspace subscription.
326
+ * @format HOSTNAME
327
+ */
328
+ domainName?: string;
329
+ /**
330
+ * Status of the existing subscription. For example, `ACTIVE`.
331
+ * @maxLength 16
332
+ */
333
+ status?: string;
334
+ /**
335
+ * Product type ID of the existing subscription.
336
+ * @format GUID
337
+ */
338
+ productTypeId?: string;
339
+ }
340
+ interface RestrictedDomainName {
341
+ /**
342
+ * Restricted domain.
343
+ * @maxLength 200
344
+ */
345
+ domainName?: string;
346
+ /** Why the domain is restricted. */
347
+ reason?: RestrictedDomainReasonWithLiterals;
348
+ }
349
+ /** Why a well-formed domain cannot host Google Workspace */
350
+ declare enum RestrictedDomainReason {
351
+ /** Unknown restriction reason. */
352
+ RESTRICTED_DOMAIN_REASON_UNSPECIFIED = "RESTRICTED_DOMAIN_REASON_UNSPECIFIED",
353
+ /** Not a registrable domain, e.g. app.example.com */
354
+ SUBDOMAIN = "SUBDOMAIN",
355
+ /** Contains a Google trademark, e.g. gmail / youtube */
356
+ BRAND = "BRAND",
357
+ /** Top-level domain Google does not serve */
358
+ TLD = "TLD"
359
+ }
360
+ /** @enumType */
361
+ type RestrictedDomainReasonWithLiterals = RestrictedDomainReason | 'RESTRICTED_DOMAIN_REASON_UNSPECIFIED' | 'SUBDOMAIN' | 'BRAND' | 'TLD';
362
+ interface GoogleWorkspaceValidationFailure {
363
+ /**
364
+ * Description of the check that failed.
365
+ * @minLength 1
366
+ * @maxLength 50
367
+ */
368
+ reason?: string;
369
+ }
370
+ interface IncompatibleGWSSeats {
371
+ /** Number of seats in the current subscription. */
372
+ seats?: number;
373
+ }
374
+ interface IsEligibleResponse {
375
+ /**
376
+ * Domain that was checked.
377
+ * @format HOSTNAME
378
+ */
379
+ domainName?: string;
380
+ /** Overall eligibility result. */
381
+ result?: EligibilityResult;
382
+ /**
383
+ * Eligibility result for each product family.
384
+ *
385
+ * Returned only for the Google Voice add-on.
386
+ */
387
+ results?: EligibilityResult[];
388
+ }
389
+ interface EligibilityResult extends EligibilityResultResultOneOf {
390
+ /** Returned when the account can purchase the product. */
391
+ eligible?: Eligible;
392
+ /** Returned when the account can't purchase the product. */
393
+ notEligible?: NotEligible;
394
+ /**
395
+ * ID of the product family this result is for.
396
+ *
397
+ * Returned only in `results`.
398
+ */
399
+ productFamilyId?: string | null;
400
+ }
401
+ /** @oneof */
402
+ interface EligibilityResultResultOneOf {
403
+ /** Returned when the account can purchase the product. */
404
+ eligible?: Eligible;
405
+ /** Returned when the account can't purchase the product. */
406
+ notEligible?: NotEligible;
407
+ }
408
+ interface Eligible {
409
+ /**
410
+ * Maximum number of seats the account can purchase.
411
+ *
412
+ * For a new Business Email purchase, `20`. For an upgrade, the subscription's current number of seats plus 20. For a repurchase or transfer, the previous subscription's number of seats.
413
+ */
414
+ seats?: number;
415
+ /**
416
+ * Whether the purchase includes a free trial.
417
+ *
418
+ * Currently always `false`.
419
+ */
420
+ freeTrial?: boolean;
421
+ /** Whether, and how, the purchase renews a previous subscription. */
422
+ renewalType?: RenewalTypeWithLiterals;
423
+ }
424
+ /** Whether, and how, a purchase renews a previous subscription. */
425
+ declare enum RenewalType {
426
+ /** Not a renewal. Returned for a new purchase. */
427
+ RENEWAL_TYPE_UNSPECIFIED = "RENEWAL_TYPE_UNSPECIFIED",
428
+ /** New subscription purchase. Reserved, and currently not returned. A new purchase returns `RENEWAL_TYPE_UNSPECIFIED`. */
429
+ NEW_PURCHASE = "NEW_PURCHASE",
430
+ /** Repurchase of a subscription that Wix suspended. */
431
+ REPURCHASE = "REPURCHASE",
432
+ /** Transfer back to Wix of a subscription that was transferred out to another reseller. */
433
+ TRANSFER_IN = "TRANSFER_IN"
434
+ }
435
+ /** @enumType */
436
+ type RenewalTypeWithLiterals = RenewalType | 'RENEWAL_TYPE_UNSPECIFIED' | 'NEW_PURCHASE' | 'REPURCHASE' | 'TRANSFER_IN';
437
+ interface NotEligible {
438
+ /**
439
+ * Reasons the account can't purchase the product.
440
+ * @maxSize 10
441
+ * @minSize 1
442
+ */
443
+ reasons?: NotEligibleReason[];
444
+ }
445
+ interface ResolveEmailActionRequest {
446
+ /**
447
+ * Domain to evaluate. Must be a domain the caller's account owns.
448
+ * @format HOSTNAME
449
+ */
450
+ domainName?: string;
451
+ }
452
+ interface ResolveEmailActionResponse {
453
+ /** Proposed recovery action. */
454
+ action?: RecoveryActionWithLiterals;
455
+ /** Why the action was proposed. */
456
+ reason?: RecoveryReasonWithLiterals;
457
+ }
458
+ /** The action the resolver proposes for a mailbox target. */
459
+ declare enum RecoveryAction {
460
+ /** Unknown recovery action. */
461
+ RECOVERY_ACTION_UNSPECIFIED = "RECOVERY_ACTION_UNSPECIFIED",
462
+ /** An unresolved paid purchase already exists; no new purchase. */
463
+ RECOVERY_ACTION_PROCESSING = "RECOVERY_ACTION_PROCESSING",
464
+ /** Required evidence could not be read; offer a recheck rather than claim absence. */
465
+ RECOVERY_ACTION_RETRY = "RECOVERY_ACTION_RETRY",
466
+ /** No safe action; existing shared unavailable/support experience. */
467
+ RECOVERY_ACTION_UNAVAILABLE = "RECOVERY_ACTION_UNAVAILABLE",
468
+ /** Customer must accept Google Workspace terms. */
469
+ RECOVERY_ACTION_ACCEPT_GOOGLE_TOS = "RECOVERY_ACTION_ACCEPT_GOOGLE_TOS",
470
+ /** Subscription is still in Wix's channel and restorable. */
471
+ RECOVERY_ACTION_RENEW = "RECOVERY_ACTION_RENEW",
472
+ /** Customer must authorize Wix before a transfer can be attempted. */
473
+ RECOVERY_ACTION_AUTHORIZE_WIX = "RECOVERY_ACTION_AUTHORIZE_WIX",
474
+ /** A supported transfer is available. */
475
+ RECOVERY_ACTION_TRANSFER_IN = "RECOVERY_ACTION_TRANSFER_IN",
476
+ /** Healthy service; normal Business Email management. */
477
+ RECOVERY_ACTION_MANAGE = "RECOVERY_ACTION_MANAGE",
478
+ /** Confirmed absence; hand off to unchanged initial purchase. */
479
+ RECOVERY_ACTION_INITIAL_PURCHASE = "RECOVERY_ACTION_INITIAL_PURCHASE"
480
+ }
481
+ /** @enumType */
482
+ type RecoveryActionWithLiterals = RecoveryAction | 'RECOVERY_ACTION_UNSPECIFIED' | 'RECOVERY_ACTION_PROCESSING' | 'RECOVERY_ACTION_RETRY' | 'RECOVERY_ACTION_UNAVAILABLE' | 'RECOVERY_ACTION_ACCEPT_GOOGLE_TOS' | 'RECOVERY_ACTION_RENEW' | 'RECOVERY_ACTION_AUTHORIZE_WIX' | 'RECOVERY_ACTION_TRANSFER_IN' | 'RECOVERY_ACTION_MANAGE' | 'RECOVERY_ACTION_INITIAL_PURCHASE';
483
+ /** Why the resolver selected its action. */
484
+ declare enum RecoveryReason {
485
+ /** Unknown recovery reason. */
486
+ RECOVERY_REASON_UNSPECIFIED = "RECOVERY_REASON_UNSPECIFIED",
487
+ /** A recovery for the domain is already in progress. */
488
+ RECOVERY_REASON_RECOVERY_IN_PROGRESS = "RECOVERY_REASON_RECOVERY_IN_PROGRESS",
489
+ /** An earlier recovery for the domain needs attention before it can continue. */
490
+ RECOVERY_REASON_RECOVERY_NEEDS_ATTENTION = "RECOVERY_REASON_RECOVERY_NEEDS_ATTENTION",
491
+ /** An earlier recovery for the domain is waiting for the customer to accept Google's terms of service. */
492
+ RECOVERY_REASON_RECOVERY_TOS_REQUIRED = "RECOVERY_REASON_RECOVERY_TOS_REQUIRED",
493
+ /** Data needed for the decision couldn't be read. */
494
+ RECOVERY_REASON_REQUIRED_EVIDENCE_UNAVAILABLE = "RECOVERY_REASON_REQUIRED_EVIDENCE_UNAVAILABLE",
495
+ /** The domain's Google identity needs a manual review. */
496
+ RECOVERY_REASON_IDENTITY_REQUIRES_REVIEW = "RECOVERY_REASON_IDENTITY_REQUIRES_REVIEW",
497
+ /** The customer must accept Google's terms of service. */
498
+ RECOVERY_REASON_GOOGLE_TOS_REQUIRED = "RECOVERY_REASON_GOOGLE_TOS_REQUIRED",
499
+ /** The subscription is still with Wix and can be renewed. */
500
+ RECOVERY_REASON_RETAINED_SUBSCRIPTION_RENEWABLE = "RECOVERY_REASON_RETAINED_SUBSCRIPTION_RENEWABLE",
501
+ /** The customer must authorize Wix before the subscription can be transferred. */
502
+ RECOVERY_REASON_TRANSFER_AUTHORIZATION_REQUIRED = "RECOVERY_REASON_TRANSFER_AUTHORIZATION_REQUIRED",
503
+ /** The subscription can be transferred to Wix. */
504
+ RECOVERY_REASON_SUPPORTED_TRANSFER_AVAILABLE = "RECOVERY_REASON_SUPPORTED_TRANSFER_AVAILABLE",
505
+ /** The subscription is working normally. */
506
+ RECOVERY_REASON_SUBSCRIPTION_HEALTHY = "RECOVERY_REASON_SUBSCRIPTION_HEALTHY",
507
+ /** Google has no customer for the domain. */
508
+ RECOVERY_REASON_GOOGLE_CUSTOMER_ABSENCE_CONFIRMED = "RECOVERY_REASON_GOOGLE_CUSTOMER_ABSENCE_CONFIRMED",
509
+ /** Google has an organization for the domain, but it has no subscription. */
510
+ RECOVERY_REASON_EXISTING_ORGANIZATION_WITHOUT_SUBSCRIPTION = "RECOVERY_REASON_EXISTING_ORGANIZATION_WITHOUT_SUBSCRIPTION",
511
+ /** The domain's state has no supported recovery. */
512
+ RECOVERY_REASON_UNSUPPORTED_RECOVERY = "RECOVERY_REASON_UNSUPPORTED_RECOVERY",
513
+ /** The domain's release from its previous Google setup isn't resolved. */
514
+ RECOVERY_REASON_RELEASE_UNRESOLVED = "RECOVERY_REASON_RELEASE_UNRESOLVED",
515
+ /** The available data doesn't support a decision. */
516
+ RECOVERY_REASON_INCONCLUSIVE = "RECOVERY_REASON_INCONCLUSIVE",
517
+ /** The customer hasn't finished setting up Business Email: Google's terms of service aren't accepted and no seat is licensed yet. */
518
+ RECOVERY_REASON_SETUP_INCOMPLETE = "RECOVERY_REASON_SETUP_INCOMPLETE"
519
+ }
520
+ /** @enumType */
521
+ type RecoveryReasonWithLiterals = RecoveryReason | 'RECOVERY_REASON_UNSPECIFIED' | 'RECOVERY_REASON_RECOVERY_IN_PROGRESS' | 'RECOVERY_REASON_RECOVERY_NEEDS_ATTENTION' | 'RECOVERY_REASON_RECOVERY_TOS_REQUIRED' | 'RECOVERY_REASON_REQUIRED_EVIDENCE_UNAVAILABLE' | 'RECOVERY_REASON_IDENTITY_REQUIRES_REVIEW' | 'RECOVERY_REASON_GOOGLE_TOS_REQUIRED' | 'RECOVERY_REASON_RETAINED_SUBSCRIPTION_RENEWABLE' | 'RECOVERY_REASON_TRANSFER_AUTHORIZATION_REQUIRED' | 'RECOVERY_REASON_SUPPORTED_TRANSFER_AVAILABLE' | 'RECOVERY_REASON_SUBSCRIPTION_HEALTHY' | 'RECOVERY_REASON_GOOGLE_CUSTOMER_ABSENCE_CONFIRMED' | 'RECOVERY_REASON_EXISTING_ORGANIZATION_WITHOUT_SUBSCRIPTION' | 'RECOVERY_REASON_UNSUPPORTED_RECOVERY' | 'RECOVERY_REASON_RELEASE_UNRESOLVED' | 'RECOVERY_REASON_INCONCLUSIVE' | 'RECOVERY_REASON_SETUP_INCOMPLETE';
522
+ interface ObserveEmailActionsRequest {
523
+ /**
524
+ * Domains to evaluate. For example, `my-domain.com`.
525
+ *
526
+ * Duplicates are ignored, regardless of case. Domains the caller's account doesn't own are skipped.
527
+ *
528
+ * Up to 20 distinct domains are evaluated per request. Any others are counted in `skipped`.
529
+ * @maxSize 50
530
+ * @minSize 1
531
+ * @format HOSTNAME
532
+ */
533
+ domainNames?: string[];
534
+ }
535
+ interface ObserveEmailActionsResponse {
536
+ /** Number of distinct domains that were evaluated. Includes domains where some of the data needed for the evaluation couldn't be read. */
537
+ observed?: number;
538
+ /** Number of requested domains that weren't evaluated. Includes duplicates, domains the caller's account doesn't own, domains beyond the per-request limit, and domains whose evaluation failed. */
539
+ skipped?: number;
540
+ }
541
+ interface DomainEvent extends DomainEventBodyOneOf {
542
+ createdEvent?: EntityCreatedEvent;
543
+ updatedEvent?: EntityUpdatedEvent;
544
+ deletedEvent?: EntityDeletedEvent;
545
+ actionEvent?: ActionEvent;
546
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
547
+ _id?: string;
548
+ /**
549
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
550
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
551
+ */
552
+ entityFqdn?: string;
553
+ /**
554
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
555
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
556
+ */
557
+ slug?: string;
558
+ /** ID of the entity associated with the event. */
559
+ entityId?: string;
560
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
561
+ eventTime?: Date | null;
562
+ /**
563
+ * Whether the event was triggered as a result of a privacy regulation application
564
+ * (for example, GDPR).
565
+ */
566
+ triggeredByAnonymizeRequest?: boolean | null;
567
+ /** If present, indicates the action that triggered the event. */
568
+ originatedFrom?: string | null;
569
+ /**
570
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
571
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
572
+ */
573
+ entityEventSequence?: string | null;
574
+ }
575
+ /** @oneof */
576
+ interface DomainEventBodyOneOf {
577
+ createdEvent?: EntityCreatedEvent;
578
+ updatedEvent?: EntityUpdatedEvent;
579
+ deletedEvent?: EntityDeletedEvent;
580
+ actionEvent?: ActionEvent;
581
+ }
582
+ interface EntityCreatedEvent {
583
+ entity?: string;
584
+ }
585
+ interface RestoreInfo {
586
+ deletedDate?: Date | null;
587
+ }
588
+ interface EntityUpdatedEvent {
589
+ /**
590
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
591
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
592
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
593
+ */
594
+ currentEntity?: string;
595
+ }
596
+ interface EntityDeletedEvent {
597
+ /** Entity that was deleted. */
598
+ deletedEntity?: string | null;
599
+ }
600
+ interface ActionEvent {
601
+ body?: string;
602
+ }
603
+ interface MessageEnvelope {
604
+ /**
605
+ * App instance ID.
606
+ * @format GUID
607
+ */
608
+ instanceId?: string | null;
609
+ /**
610
+ * Event type.
611
+ * @maxLength 150
612
+ */
613
+ eventType?: string;
614
+ /** The identification type and identity data. */
615
+ identity?: IdentificationData;
616
+ /** Stringify payload. */
617
+ data?: string;
618
+ /** Details related to the account */
619
+ accountInfo?: AccountInfo;
620
+ }
621
+ interface IdentificationData extends IdentificationDataIdOneOf {
622
+ /**
623
+ * ID of a site visitor that has not logged in to the site.
624
+ * @format GUID
625
+ */
626
+ anonymousVisitorId?: string;
627
+ /**
628
+ * ID of a site visitor that has logged in to the site.
629
+ * @format GUID
630
+ */
631
+ memberId?: string;
632
+ /**
633
+ * ID of a Wix user (site owner, contributor, etc.).
634
+ * @format GUID
635
+ */
636
+ wixUserId?: string;
637
+ /**
638
+ * ID of an app.
639
+ * @format GUID
640
+ */
641
+ appId?: string;
642
+ /** @readonly */
643
+ identityType?: WebhookIdentityTypeWithLiterals;
644
+ }
645
+ /** @oneof */
646
+ interface IdentificationDataIdOneOf {
647
+ /**
648
+ * ID of a site visitor that has not logged in to the site.
649
+ * @format GUID
650
+ */
651
+ anonymousVisitorId?: string;
652
+ /**
653
+ * ID of a site visitor that has logged in to the site.
654
+ * @format GUID
655
+ */
656
+ memberId?: string;
657
+ /**
658
+ * ID of a Wix user (site owner, contributor, etc.).
659
+ * @format GUID
660
+ */
661
+ wixUserId?: string;
662
+ /**
663
+ * ID of an app.
664
+ * @format GUID
665
+ */
666
+ appId?: string;
667
+ }
668
+ declare enum WebhookIdentityType {
669
+ UNKNOWN = "UNKNOWN",
670
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
671
+ MEMBER = "MEMBER",
672
+ WIX_USER = "WIX_USER",
673
+ APP = "APP"
674
+ }
675
+ /** @enumType */
676
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
677
+ interface AccountInfo {
678
+ /**
679
+ * ID of the Wix account associated with the event.
680
+ * @format GUID
681
+ */
682
+ accountId?: string | null;
683
+ /**
684
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
685
+ * @format GUID
686
+ */
687
+ parentAccountId?: string | null;
688
+ /**
689
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
690
+ * @format GUID
691
+ */
692
+ siteId?: string | null;
693
+ }
694
+ interface RawHttpRequest {
695
+ body?: Uint8Array;
696
+ pathParams?: PathParametersEntry[];
697
+ queryParams?: QueryParametersEntry[];
698
+ headers?: HeadersEntry[];
699
+ method?: string;
700
+ rawPath?: string;
701
+ rawQuery?: string;
702
+ }
703
+ interface PathParametersEntry {
704
+ key?: string;
705
+ value?: string;
706
+ }
707
+ interface QueryParametersEntry {
708
+ key?: string;
709
+ value?: string;
710
+ }
711
+ interface HeadersEntry {
712
+ key?: string;
713
+ value?: string;
714
+ }
715
+ interface RawHttpResponse {
716
+ body?: Uint8Array;
717
+ statusCode?: number | null;
718
+ headers?: HeadersEntry[];
719
+ }
720
+ interface CreateGoogleSubscriptionRequest {
721
+ /** Google subscription to create. */
722
+ googleSubscription?: GoogleSubscription;
723
+ }
724
+ interface CreateGoogleSubscriptionResponse {
725
+ /** Created Google subscription. */
726
+ googleSubscription?: GoogleSubscription;
727
+ }
728
+ interface GetGoogleSubscriptionRequest {
729
+ /**
730
+ * ID of the Google subscription to retrieve.
731
+ * @format GUID
732
+ */
733
+ googleSubscriptionId?: string;
734
+ }
735
+ interface GetGoogleSubscriptionResponse {
736
+ /** Retrieved Google subscription. */
737
+ googleSubscription?: GoogleSubscription;
738
+ }
739
+ interface UpdateGoogleSubscriptionRequest {
740
+ /** Google subscription to update. May be partial. */
741
+ googleSubscription?: GoogleSubscription;
742
+ /**
743
+ * Set of fields to update.
744
+ *
745
+ * Fields that aren't included in `fieldMask.paths` are ignored.
746
+ * @internal
747
+ */
748
+ fieldMask?: string[];
749
+ }
750
+ interface UpdateGoogleSubscriptionResponse {
751
+ /** Updated Google subscription. */
752
+ googleSubscription?: GoogleSubscription;
753
+ }
754
+ interface DeleteGoogleSubscriptionRequest {
755
+ /**
756
+ * ID of the Google subscription to delete.
757
+ * @format GUID
758
+ */
759
+ googleSubscriptionId?: string;
760
+ }
761
+ interface DeleteGoogleSubscriptionResponse {
762
+ }
763
+ interface QueryGoogleSubscriptionsRequest {
764
+ /** Query options. */
765
+ query?: QueryV2;
766
+ }
767
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
768
+ /** Paging options to limit and skip the number of items. */
769
+ paging?: Paging;
770
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
771
+ cursorPaging?: CursorPaging;
772
+ /**
773
+ * Filter object in the following format:
774
+ * `"filter" : {
775
+ * "fieldName1": "value1",
776
+ * "fieldName2":{"$operator":"value2"}
777
+ * }`
778
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
779
+ */
780
+ filter?: Record<string, any> | null;
781
+ /**
782
+ * Sort object in the following format:
783
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
784
+ * @maxSize 4
785
+ */
786
+ sort?: Sorting[];
787
+ /**
788
+ * Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned.
789
+ * @maxLength 200
790
+ * @maxSize 20
791
+ */
792
+ fields?: string[];
793
+ /**
794
+ * Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned.
795
+ * @maxLength 200
796
+ * @maxSize 20
797
+ */
798
+ fieldsets?: string[];
799
+ }
800
+ /** @oneof */
801
+ interface QueryV2PagingMethodOneOf {
802
+ /** Paging options to limit and skip the number of items. */
803
+ paging?: Paging;
804
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
805
+ cursorPaging?: CursorPaging;
806
+ }
807
+ interface Sorting {
808
+ /**
809
+ * Name of the field to sort by.
810
+ * @maxLength 50
811
+ */
812
+ fieldName?: string;
813
+ /** Sort order. */
814
+ order?: SortOrderWithLiterals;
815
+ }
816
+ declare enum SortOrder {
817
+ ASC = "ASC",
818
+ DESC = "DESC"
819
+ }
820
+ /** @enumType */
821
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
822
+ interface Paging {
823
+ /** Number of items to load. */
824
+ limit?: number | null;
825
+ /** Number of items to skip in the current sort order. */
826
+ offset?: number | null;
827
+ }
828
+ interface CursorPaging {
829
+ /**
830
+ * Number of items to load.
831
+ * @max 100
832
+ */
833
+ limit?: number | null;
834
+ /**
835
+ * Pointer to the next or previous page in the list of results.
836
+ *
837
+ * You can get the relevant cursor token
838
+ * from the `pagingMetadata` object in the previous call's response.
839
+ * Not relevant for the first request.
840
+ * @maxLength 16000
841
+ */
842
+ cursor?: string | null;
843
+ }
844
+ interface QueryGoogleSubscriptionsResponse {
845
+ /** Retrieved Google subscriptions. */
846
+ googleSubscriptions?: GoogleSubscription[];
847
+ /** Paging metadata. */
848
+ pagingMetadata?: CursorPagingMetadata;
849
+ }
850
+ interface CursorPagingMetadata {
851
+ /** Number of items returned in the response. */
852
+ count?: number | null;
853
+ /** Offset that was requested. */
854
+ cursors?: Cursors;
855
+ /**
856
+ * Indicates if there are more results after the current page.
857
+ * If `true`, another page of results can be retrieved.
858
+ * If `false`, this is the last page.
859
+ */
860
+ hasNext?: boolean | null;
861
+ }
862
+ interface Cursors {
863
+ /**
864
+ * Cursor pointing to next page in the list of results.
865
+ * @maxLength 16000
866
+ */
867
+ next?: string | null;
868
+ /**
869
+ * Cursor pointing to previous page in the list of results.
870
+ * @maxLength 16000
871
+ */
872
+ prev?: string | null;
873
+ }
874
+ interface UpdateExtendedFieldsRequest {
875
+ /** ID of the entity to update. */
876
+ _id?: string;
877
+ /** Identifier for the app whose extended fields are being updated. */
878
+ namespace?: string;
879
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
880
+ namespaceData?: Record<string, any> | null;
881
+ }
882
+ interface UpdateExtendedFieldsResponse {
883
+ /** Updated Google subscription. */
884
+ googleSubscription?: GoogleSubscription;
885
+ }
886
+ interface RetrieveUsersByDomainRequest {
887
+ /**
888
+ * Domain whose Google Workspace users to retrieve. Must be a domain the caller's account owns.
889
+ * @format HOSTNAME
890
+ */
891
+ domainName: string;
892
+ }
893
+ interface RetrieveUsersByDomainResponse {
894
+ /**
895
+ * Retrieved users.
896
+ *
897
+ * Limited to 300 users.
898
+ */
899
+ users?: User[];
900
+ }
901
+ /**
902
+ * A Google user is a user account in a Google Workspace, such as a Business Email mailbox.
903
+ * It holds the user's primary email address, name, administrator role, and recovery details.
904
+ */
905
+ interface User {
906
+ /**
907
+ * Google user ID.
908
+ * @minLength 1
909
+ * @maxLength 36
910
+ */
911
+ _id?: string;
912
+ /**
913
+ * User's primary email address. For example, `jane@my-domain.com`.
914
+ * @format EMAIL
915
+ */
916
+ primaryEmail?: string;
917
+ /** User's name. */
918
+ name?: UserName;
919
+ /** Whether the user is a super administrator of the Google Workspace. */
920
+ admin?: boolean;
921
+ /** Whether the user is a delegated administrator of the Google Workspace, with a subset of administrator privileges. */
922
+ delegatedAdmin?: boolean;
923
+ /**
924
+ * Google customer ID of the Google Workspace the user belongs to.
925
+ * @minLength 1
926
+ * @maxLength 36
927
+ */
928
+ customerId?: string;
929
+ /**
930
+ * User's Google Voice phone number.
931
+ *
932
+ * Returned only when the user has a Google Voice number.
933
+ * @maxLength 20
934
+ */
935
+ googleVoiceNumber?: string | null;
936
+ /**
937
+ * Product type IDs of the products licensed to the user, such as Business Email or the Google Voice add-on.
938
+ *
939
+ * Not returned by [Retrieve Users by Domain](https://dev.wix.com/docs/api-reference/account-level/premium/business-email/google-subscription-v1/retrieve-users-by-domain).
940
+ * @format GUID
941
+ * @maxSize 20
942
+ */
943
+ licensedProductTypeIds?: string[];
944
+ /**
945
+ * Recovery email address Google uses to verify the user when they can't sign in.
946
+ * @maxLength 255
947
+ */
948
+ recoveryEmail?: string | null;
949
+ /**
950
+ * Recovery phone number Google uses to verify the user when they can't sign in, in [E.164](https://en.wikipedia.org/wiki/E.164) format. For example, `+12025550123`.
951
+ * @maxLength 20
952
+ */
953
+ recoveryPhone?: string | null;
954
+ }
955
+ interface UserName {
956
+ /**
957
+ * User's given name (first name).
958
+ * @maxLength 60
959
+ */
960
+ givenName?: string | null;
961
+ /**
962
+ * User's family name (last name).
963
+ * @maxLength 60
964
+ */
965
+ familyName?: string | null;
966
+ /**
967
+ * User's full name. Calculated from `givenName` and `familyName`.
968
+ * @maxLength 120
969
+ * @readonly
970
+ */
971
+ fullName?: string | null;
972
+ }
973
+ interface GetStorageUsageRequest {
974
+ /**
975
+ * Premium subscription ID of the Google Workspace whose storage usage to retrieve.
976
+ * @format GUID
977
+ */
978
+ googleWorkspacePremiumId: string;
979
+ }
980
+ interface GetStorageUsageResponse {
981
+ /**
982
+ * Day of the usage report the numbers describe, in `YYYY-MM-DD` format. Google publishes storage usage once a day, using the UTC-8 time zone, so the numbers trail live usage.
983
+ *
984
+ * Returned only when usage data is available.
985
+ * @maxLength 10
986
+ */
987
+ asOfDate?: string | null;
988
+ /** Storage used across the whole Google Workspace, in MB. Includes all mailboxes, Google Drive, and Google Photos. */
989
+ usedMb?: string | null;
990
+ /** Pooled storage quota, in MB, shared by all users. Equals the edition's storage allowance per seat multiplied by the number of licensed seats. */
991
+ quotaMb?: string | null;
992
+ }
993
+ interface AssignLicenseRequest {
994
+ /**
995
+ * Premium subscription ID of the Google subscription.
996
+ * @format GUID
997
+ */
998
+ premiumId?: string;
999
+ /**
1000
+ * Primary email address of the user to assign the license to.
1001
+ * @format EMAIL
1002
+ */
1003
+ userEmail?: string;
1004
+ }
1005
+ interface AssignLicenseResponse {
1006
+ }
1007
+ interface RevokeLicenseRequest {
1008
+ /**
1009
+ * Premium subscription ID of the Google subscription.
1010
+ * @format GUID
1011
+ */
1012
+ premiumId?: string;
1013
+ /**
1014
+ * Primary email address of the user whose license to revoke.
1015
+ * @format EMAIL
1016
+ */
1017
+ userEmail?: string;
1018
+ }
1019
+ interface RevokeLicenseResponse {
1020
+ }
1021
+ /** @docsIgnore */
1022
+ type GetStorageUsageApplicationErrors = {
1023
+ code?: 'NOT_FOUND_GWS_FOR_STORAGE_USAGE';
1024
+ description?: string;
1025
+ data?: Record<string, any>;
1026
+ } | {
1027
+ code?: 'PERMISSION_DENIED_FOR_STORAGE_USAGE';
1028
+ description?: string;
1029
+ data?: Record<string, any>;
1030
+ };
1031
+ /**
1032
+ * Checks whether the caller's account can purchase a Google product for a domain.
1033
+ *
1034
+ * Specify the product in `productTypeId`. Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.
1035
+ *
1036
+ * The response contains either an eligible result, with the maximum number of seats the account can purchase, or a not-eligible result that lists the reasons.
1037
+ *
1038
+ * To check eligibility to upgrade an existing Business Email subscription, specify `existingSubscriptionPremiumId`.
1039
+ * @public
1040
+ * @documentationMaturity preview
1041
+ * @permissionId PREMIUM.GOOGLE_SUBSCRIPTION_ELIGIBILITY
1042
+ * @applicableIdentity APP
1043
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleProductEligibility.IsEligible
1044
+ */
1045
+ declare function isEligible(options?: IsEligibleOptions): Promise<NonNullablePaths<IsEligibleResponse, `domainName` | `result.eligible.seats` | `result.eligible.freeTrial` | `result.eligible.renewalType` | `result.notEligible.reasons` | `result.notEligible.reasons.${number}.invalidRequestedSeats.availableSeats` | `result.notEligible.reasons.${number}.invalidRequestedSeats.requestedSeat` | `result.notEligible.reasons.${number}.incompatibleGws.gwsSkuId` | `result.notEligible.reasons.${number}.acceptTosRequired.acceptTosGwsId` | `result.notEligible.reasons.${number}.alreadyTaken.domainName` | `result.notEligible.reasons.${number}.emailPackageAlreadyExists.domainName` | `result.notEligible.reasons.${number}.emailPackageAlreadyExists.targetAccountId` | `result.notEligible.reasons.${number}.domainNotOwnedByUser.domainName` | `result.notEligible.reasons.${number}.domainNotFound.domainName` | `result.notEligible.reasons.${number}.noPurchasableSkus.domainName` | `result.notEligible.reasons.${number}.addonAlreadyExists.domainName` | `result.notEligible.reasons.${number}.addonAlreadyExists.status` | `result.notEligible.reasons.${number}.addonAlreadyExists.productTypeId` | `result.notEligible.reasons.${number}.notEligibleCountry.domainName` | `result.notEligible.reasons.${number}.notEligibleCountry.countryCode` | `result.notEligible.reasons.${number}.notEligibleCloudIdentityType.domainName` | `result.notEligible.reasons.${number}.notEligibleCloudIdentityType.reason` | `result.notEligible.reasons.${number}.invalidDomainName.domainName` | `result.notEligible.reasons.${number}.workspaceSubscriptionAlreadyExists.domainName` | `result.notEligible.reasons.${number}.workspaceSubscriptionAlreadyExists.status` | `result.notEligible.reasons.${number}.workspaceSubscriptionAlreadyExists.productTypeId` | `result.notEligible.reasons.${number}.restrictedDomainName.domainName` | `result.notEligible.reasons.${number}.restrictedDomainName.reason` | `result.notEligible.reasons.${number}.validationFailure.reason` | `result.notEligible.reasons.${number}.incompatibleSeats.seats` | `results` | `results.${number}.eligible.seats` | `results.${number}.eligible.freeTrial` | `results.${number}.eligible.renewalType`, 5>>;
1046
+ interface IsEligibleOptions {
1047
+ /**
1048
+ * Domain to check. For example, `my-domain.com`.
1049
+ * @format HOSTNAME
1050
+ */
1051
+ domainName?: string;
1052
+ /**
1053
+ * ID of the product to check eligibility for.
1054
+ *
1055
+ * Supported products: Business Email, Business Email for Base44, Google Workspace, and the Google Voice add-on.
1056
+ * @format GUID
1057
+ */
1058
+ productTypeId?: string;
1059
+ /** Not-eligible reasons to ignore when calculating the result. */
1060
+ postEligibility?: PostEligibilityActions;
1061
+ /**
1062
+ * Premium subscription ID of an existing Business Email subscription, when checking eligibility to upgrade it.
1063
+ * @format GUID
1064
+ */
1065
+ existingSubscriptionPremiumId?: string | null;
1066
+ }
1067
+ /**
1068
+ * Evaluates the email recovery state of the specified domains.
1069
+ *
1070
+ * Returns only how many domains were evaluated and how many were skipped. Results for individual domains aren't returned, and the method doesn't change any data.
1071
+ *
1072
+ * Domains the caller's account doesn't own are skipped. Up to 20 distinct domains are evaluated per request, and any others are counted in `skipped`.
1073
+ *
1074
+ * Evaluation isn't available for every caller. When it isn't available, every requested domain is counted in `skipped`.
1075
+ * @public
1076
+ * @documentationMaturity preview
1077
+ * @permissionId PREMIUM.GOOGLE_SUBSCRIPTION_ELIGIBILITY
1078
+ * @applicableIdentity APP
1079
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleProductEligibility.ObserveEmailActions
1080
+ */
1081
+ declare function observeEmailActions(options?: ObserveEmailActionsOptions): Promise<NonNullablePaths<ObserveEmailActionsResponse, `observed` | `skipped`, 0>>;
1082
+ interface ObserveEmailActionsOptions {
1083
+ /**
1084
+ * Domains to evaluate. For example, `my-domain.com`.
1085
+ *
1086
+ * Duplicates are ignored, regardless of case. Domains the caller's account doesn't own are skipped.
1087
+ *
1088
+ * Up to 20 distinct domains are evaluated per request. Any others are counted in `skipped`.
1089
+ * @maxSize 50
1090
+ * @minSize 1
1091
+ * @format HOSTNAME
1092
+ */
1093
+ domainNames?: string[];
1094
+ }
1095
+ /**
1096
+ * Receives Google Cloud Channel push notifications about Business Email customers, and isn't intended to be called by apps.
1097
+ * @public
1098
+ * @documentationMaturity preview
1099
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.ReceiveCloudChannelPush
1100
+ */
1101
+ declare function receiveCloudChannelPush(options?: ReceiveCloudChannelPushOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 2>>;
1102
+ interface ReceiveCloudChannelPushOptions {
1103
+ body?: Uint8Array;
1104
+ pathParams?: PathParametersEntry[];
1105
+ queryParams?: QueryParametersEntry[];
1106
+ headers?: HeadersEntry[];
1107
+ method?: string;
1108
+ rawPath?: string;
1109
+ rawQuery?: string;
1110
+ }
1111
+ /**
1112
+ * Retrieves a list of up to 1,000 Google subscriptions, given the provided paging, filtering, and sorting.
1113
+ *
1114
+ * Query Google Subscriptions runs with these defaults, which you can override:
1115
+ *
1116
+ * - `createdDate` is sorted in `DESC` order
1117
+ * - `paging.limit` is `50`
1118
+ * - `paging.offset` is `0`
1119
+ *
1120
+ * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).
1121
+ * @internal
1122
+ * @documentationMaturity preview
1123
+ * @permissionId PREMIUM.GOOGLE_SUBSCRIPTION_READ
1124
+ * @applicableIdentity APP
1125
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.QueryGoogleSubscriptions
1126
+ */
1127
+ declare function queryGoogleSubscriptions(): GoogleSubscriptionsQueryBuilder;
1128
+ interface QueryCursorResult {
1129
+ cursors: Cursors;
1130
+ hasNext: () => boolean;
1131
+ hasPrev: () => boolean;
1132
+ length: number;
1133
+ pageSize: number;
1134
+ }
1135
+ interface GoogleSubscriptionsQueryResult extends QueryCursorResult {
1136
+ items: GoogleSubscription[];
1137
+ query: GoogleSubscriptionsQueryBuilder;
1138
+ next: () => Promise<GoogleSubscriptionsQueryResult>;
1139
+ prev: () => Promise<GoogleSubscriptionsQueryResult>;
1140
+ }
1141
+ interface GoogleSubscriptionsQueryBuilder {
1142
+ /** @param propertyName - Property whose value is compared with `value`.
1143
+ * @param value - Value to compare against.
1144
+ * @documentationMaturity preview
1145
+ */
1146
+ eq: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1147
+ /** @param propertyName - Property whose value is compared with `value`.
1148
+ * @param value - Value to compare against.
1149
+ * @documentationMaturity preview
1150
+ */
1151
+ ne: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1152
+ /** @param propertyName - Property whose value is compared with `value`.
1153
+ * @param value - Value to compare against.
1154
+ * @documentationMaturity preview
1155
+ */
1156
+ ge: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1157
+ /** @param propertyName - Property whose value is compared with `value`.
1158
+ * @param value - Value to compare against.
1159
+ * @documentationMaturity preview
1160
+ */
1161
+ gt: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1162
+ /** @param propertyName - Property whose value is compared with `value`.
1163
+ * @param value - Value to compare against.
1164
+ * @documentationMaturity preview
1165
+ */
1166
+ le: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1167
+ /** @param propertyName - Property whose value is compared with `value`.
1168
+ * @param value - Value to compare against.
1169
+ * @documentationMaturity preview
1170
+ */
1171
+ lt: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1172
+ /** @param propertyName - Property whose value is compared with `string`.
1173
+ * @param string - String to compare against. Case-insensitive.
1174
+ * @documentationMaturity preview
1175
+ */
1176
+ startsWith: (propertyName: '_id' | 'subscriptionId', value: string) => GoogleSubscriptionsQueryBuilder;
1177
+ /** @documentationMaturity preview */
1178
+ in: (propertyName: '_id' | 'subscriptionId', value: any) => GoogleSubscriptionsQueryBuilder;
1179
+ /** @documentationMaturity preview */
1180
+ exists: (propertyName: '_id' | 'subscriptionId', value: boolean) => GoogleSubscriptionsQueryBuilder;
1181
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1182
+ * @documentationMaturity preview
1183
+ */
1184
+ ascending: (...propertyNames: Array<'_id' | 'subscriptionId'>) => GoogleSubscriptionsQueryBuilder;
1185
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1186
+ * @documentationMaturity preview
1187
+ */
1188
+ descending: (...propertyNames: Array<'_id' | 'subscriptionId'>) => GoogleSubscriptionsQueryBuilder;
1189
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1190
+ * @documentationMaturity preview
1191
+ */
1192
+ limit: (limit: number) => GoogleSubscriptionsQueryBuilder;
1193
+ /** @param cursor - A pointer to specific record
1194
+ * @documentationMaturity preview
1195
+ */
1196
+ skipTo: (cursor: string) => GoogleSubscriptionsQueryBuilder;
1197
+ /** @documentationMaturity preview */
1198
+ find: () => Promise<GoogleSubscriptionsQueryResult>;
1199
+ }
1200
+ /**
1201
+ * @hidden
1202
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.QueryGoogleSubscriptions
1203
+ * @requiredField query
1204
+ */
1205
+ declare function typedQueryGoogleSubscriptions(query: GoogleSubscriptionQuery): Promise<NonNullablePaths<QueryGoogleSubscriptionsResponse, `googleSubscriptions` | `googleSubscriptions.${number}.seats` | `googleSubscriptions.${number}.subscriptionId` | `googleSubscriptions.${number}.domainName` | `googleSubscriptions.${number}.status` | `googleSubscriptions.${number}.googleData.googleSkuId`, 3>>;
1206
+ interface GoogleSubscriptionQuerySpec extends QuerySpec {
1207
+ paging: 'cursor';
1208
+ wql: [
1209
+ {
1210
+ fields: ['_id', 'subscriptionId'];
1211
+ operators: '*';
1212
+ sort: 'BOTH';
1213
+ }
1214
+ ];
1215
+ }
1216
+ type CommonQueryWithEntityContext = Query<GoogleSubscription, GoogleSubscriptionQuerySpec>;
1217
+ type GoogleSubscriptionQuery = {
1218
+ /**
1219
+ Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
1220
+ */
1221
+ cursorPaging?: {
1222
+ /**
1223
+ Number of items to load.
1224
+ @max: 100
1225
+ */
1226
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
1227
+ /**
1228
+ Pointer to the next or previous page in the list of results.
1229
+
1230
+ You can get the relevant cursor token
1231
+ from the `pagingMetadata` object in the previous call's response.
1232
+ Not relevant for the first request.
1233
+ @maxLength: 16000
1234
+ */
1235
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
1236
+ };
1237
+ /**
1238
+ Filter object in the following format:
1239
+ `"filter" : {
1240
+ "fieldName1": "value1",
1241
+ "fieldName2":{"$operator":"value2"}
1242
+ }`
1243
+ Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1244
+ */
1245
+ filter?: CommonQueryWithEntityContext['filter'] | null;
1246
+ /**
1247
+ Sort object in the following format:
1248
+ `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1249
+ @maxSize: 4
1250
+ */
1251
+ sort?: {
1252
+ /**
1253
+ Name of the field to sort by.
1254
+ @maxLength: 50
1255
+ */
1256
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
1257
+ /**
1258
+ Sort order.
1259
+ */
1260
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1261
+ }[];
1262
+ };
1263
+ declare const utils: {
1264
+ query: _wix_sdk_types.QueryHelpers<GoogleSubscription, GoogleSubscriptionQuerySpec, GoogleSubscriptionQuery>;
1265
+ };
1266
+ /**
1267
+ * Retrieves the users of the Google Workspace on a domain owned by the caller's account.
1268
+ *
1269
+ * Returns all users, including administrators, up to 300 users. Additional users aren't returned, and the method doesn't support paging.
1270
+ * @param domainName - Domain whose Google Workspace users to retrieve. Must be a domain the caller's account owns.
1271
+ * @public
1272
+ * @documentationMaturity preview
1273
+ * @requiredField domainName
1274
+ * @permissionId PREMIUM.GOOGLE_SUBSCRIPTION_READ
1275
+ * @applicableIdentity APP
1276
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.RetrieveUsersByDomain
1277
+ */
1278
+ declare function retrieveUsersByDomain(domainName: string): Promise<NonNullablePaths<RetrieveUsersByDomainResponse, `users` | `users.${number}._id` | `users.${number}.primaryEmail` | `users.${number}.admin` | `users.${number}.delegatedAdmin` | `users.${number}.customerId`, 2>>;
1279
+ /**
1280
+ * Retrieves how much storage a Google Workspace has used out of its pooled quota.
1281
+ *
1282
+ * The numbers come from Google's daily usage report, so they trail live usage by about a day. `asOfDate` is the report day.
1283
+ *
1284
+ * The response is empty when no usage data is available. For example, when the subscription isn't live, when Google doesn't grant access to the customer's reports, or when the day's report isn't published yet.
1285
+ *
1286
+ * Storage usage isn't available for every caller. When it isn't available, the response is empty.
1287
+ * @param googleWorkspacePremiumId - Premium subscription ID of the Google Workspace whose storage usage to retrieve.
1288
+ * @public
1289
+ * @documentationMaturity preview
1290
+ * @requiredField googleWorkspacePremiumId
1291
+ * @permissionId PREMIUM.GOOGLE_SUBSCRIPTION_READ
1292
+ * @applicableIdentity APP
1293
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.GetStorageUsage
1294
+ */
1295
+ declare function getStorageUsage(googleWorkspacePremiumId: string): Promise<GetStorageUsageResponse & {
1296
+ __applicationErrorsType?: GetStorageUsageApplicationErrors;
1297
+ }>;
1298
+ /**
1299
+ * Assigns a Google subscription license to a user.
1300
+ * @internal
1301
+ * @documentationMaturity preview
1302
+ * @permissionId PREMIUM.GOOGLE_LICENSES_WRITE
1303
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.AssignLicense
1304
+ */
1305
+ declare function assignLicense(options?: AssignLicenseOptions): Promise<void>;
1306
+ interface AssignLicenseOptions {
1307
+ /**
1308
+ * Premium subscription ID of the Google subscription.
1309
+ * @format GUID
1310
+ */
1311
+ premiumId?: string;
1312
+ /**
1313
+ * Primary email address of the user to assign the license to.
1314
+ * @format EMAIL
1315
+ */
1316
+ userEmail?: string;
1317
+ }
1318
+ /**
1319
+ * Revokes a user's Google subscription license.
1320
+ * @internal
1321
+ * @documentationMaturity preview
1322
+ * @permissionId PREMIUM.GOOGLE_LICENSES_WRITE
1323
+ * @fqn wix.premium.googlesubscriptions.v1.GoogleSubscriptions.RevokeLicense
1324
+ */
1325
+ declare function revokeLicense(options?: RevokeLicenseOptions): Promise<void>;
1326
+ interface RevokeLicenseOptions {
1327
+ /**
1328
+ * Premium subscription ID of the Google subscription.
1329
+ * @format GUID
1330
+ */
1331
+ premiumId?: string;
1332
+ /**
1333
+ * Primary email address of the user whose license to revoke.
1334
+ * @format EMAIL
1335
+ */
1336
+ userEmail?: string;
1337
+ }
1338
+
1339
+ export { type AcceptTosRequired, type AccountInfo, type ActionEvent, type AddonAlreadyExists, type AssignLicenseOptions, type AssignLicenseRequest, type AssignLicenseResponse, type CommonQueryWithEntityContext, type CreateGoogleSubscriptionRequest, type CreateGoogleSubscriptionResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteGoogleSubscriptionRequest, type DeleteGoogleSubscriptionResponse, type DomainEvent, type DomainEventBodyOneOf, type DomainNotFound, type DomainNotOwnedByUser, type EligibilityResult, type EligibilityResultResultOneOf, type Eligible, type EmailPackageAlreadyExists, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetGoogleSubscriptionRequest, type GetGoogleSubscriptionResponse, type GetStorageUsageApplicationErrors, type GetStorageUsageRequest, type GetStorageUsageResponse, type GoogleCustomerAlreadyTakenOnGoogle, type GoogleData, type GoogleSubscription, type GoogleSubscriptionQuery, type GoogleSubscriptionQuerySpec, type GoogleSubscriptionsQueryBuilder, type GoogleSubscriptionsQueryResult, type GoogleWorkspaceValidationFailure, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type IncompatibleGWSSeats, type IncompatibleWithCurrentGWSProduct, type InvalidDomainName, type InvalidRequestedSeats, type IsEligibleOptions, type IsEligibleRequest, type IsEligibleResponse, type MessageEnvelope, type NoGWSFound, type NoPurchasableSkus, type NotEligible, type NotEligibleCloudIdentityType, type NotEligibleCountry, type NotEligibleReason, type NotEligibleReasonReasonOneOf, type ObserveEmailActionsOptions, type ObserveEmailActionsRequest, type ObserveEmailActionsResponse, type Paging, type PathParametersEntry, type PostEligibilityActions, type QueryGoogleSubscriptionsRequest, type QueryGoogleSubscriptionsResponse, type QueryParametersEntry, type QueryV2, type QueryV2PagingMethodOneOf, type RawHttpRequest, type RawHttpResponse, type ReceiveCloudChannelPushOptions, RecoveryAction, type RecoveryActionWithLiterals, RecoveryReason, type RecoveryReasonWithLiterals, RenewalType, type RenewalTypeWithLiterals, type ResolveEmailActionRequest, type ResolveEmailActionResponse, type RestoreInfo, type RestrictedDomainName, RestrictedDomainReason, type RestrictedDomainReasonWithLiterals, type RetrieveUsersByDomainRequest, type RetrieveUsersByDomainResponse, type RevokeLicenseOptions, type RevokeLicenseRequest, type RevokeLicenseResponse, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateGoogleSubscriptionRequest, type UpdateGoogleSubscriptionResponse, type User, type UserName, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WorkspaceSubscriptionAlreadyExists, assignLicense, getStorageUsage, isEligible, observeEmailActions, queryGoogleSubscriptions, receiveCloudChannelPush, retrieveUsersByDomain, revokeLicense, typedQueryGoogleSubscriptions, utils };