@wix/domains 1.0.18 → 1.0.20

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.
@@ -1,3 +1,318 @@
1
+ /** A `connectedDomain` object holds information about an external domain and its connection to a Wix site. */
2
+ interface ConnectedDomain {
3
+ /**
4
+ * ID of the connected domain. Identical to the domain name including TLD.
5
+ * @readonly
6
+ */
7
+ _id?: string;
8
+ /**
9
+ * Domain name including TLD.
10
+ * Both root domains and subdomains are supported.
11
+ */
12
+ domain?: string;
13
+ /**
14
+ * How the domain is connected to the Wix site.
15
+ *
16
+ * + `"UNKNOWN_CONNECTION_TYPE"`: There is no information about the connection type.
17
+ * + `"POINTING"`: The domain is connected by pointing. Wix doesn't manage DNS information.
18
+ * + `"NAMESERVERS"`: The domain is connected by nameservers. Wix manages DNS information.
19
+ * + `"HIDDEN"`: The domain isn't visible to site visitors.
20
+ */
21
+ connectionType?: ConnectionType$1;
22
+ /**
23
+ * Information about the site to which the domain is assigned, and whether
24
+ * it's the primary domain or a redirect.
25
+ */
26
+ siteInfo?: SiteInfo$1;
27
+ /**
28
+ * Whether the site owner receives standard email notifications from Wix about
29
+ * the connected domain.
30
+ *
31
+ * Default: `false`
32
+ */
33
+ suppressNotifications?: boolean;
34
+ /**
35
+ * DNS propagation status.
36
+ *
37
+ * + `"UNKNOWN_DNS_PROPAGATION_STATUS"`: There's no information about the domain's DNS propagation status.
38
+ * + `"IN_PROGRESS"`: The domain's DNS propagation process has started but hasn't successfully completed yet.
39
+ * + `"COMPLETED"`: The domain's DNS propagation process has successfully finished.
40
+ * + `"FAILED"`: The domain's DNS propagation process has failed.
41
+ * @readonly
42
+ */
43
+ dnsPropagationStatus?: DnsPropagationStatus$1;
44
+ }
45
+ declare enum ConnectionType$1 {
46
+ /** Used by sub domain */
47
+ UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
48
+ POINTING = "POINTING",
49
+ NAMESERVERS = "NAMESERVERS",
50
+ /**
51
+ * internal used by photography company.
52
+ * when a customer creates a photo album, each album has its sub domain and this sub domain
53
+ * is not visible in my domains page.
54
+ */
55
+ HIDDEN = "HIDDEN"
56
+ }
57
+ interface SiteInfo$1 extends SiteInfoAssignmentInfoOneOf$1 {
58
+ /**
59
+ * Redirect information, relevant when `assignmentType` = `REDIRECT`.
60
+ * @readonly
61
+ */
62
+ redirectInfo?: RedirectAssignmentInfo$1;
63
+ /**
64
+ * ID of the site to which the domain is assigned.
65
+ * @readonly
66
+ */
67
+ _id?: string | null;
68
+ /**
69
+ * The relationship assigned for this domain to the site:
70
+ * + `"UNKNOWN_ASSIGNMENT_TYPE"`: There is no information about the domain assignment type.
71
+ * + `"PRIMARY"`: The singular primary domain for a site. When this type is assigned, this domain will lead directly to the site.
72
+ * + `"REDIRECT"`: A redirect domain for a site. Each site can have multiple redirect domains. When this type is assigned, this domain will redirect to the primary domain.
73
+ * Read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains).
74
+ */
75
+ assignmentType?: AssignmentType$1;
76
+ }
77
+ /** @oneof */
78
+ interface SiteInfoAssignmentInfoOneOf$1 {
79
+ /**
80
+ * Redirect information, relevant when `assignmentType` = `REDIRECT`.
81
+ * @readonly
82
+ */
83
+ redirectInfo?: RedirectAssignmentInfo$1;
84
+ }
85
+ declare enum AssignmentType$1 {
86
+ UNKNOWN_ASSIGNMENT_TYPE = "UNKNOWN_ASSIGNMENT_TYPE",
87
+ PRIMARY = "PRIMARY",
88
+ REDIRECT = "REDIRECT"
89
+ }
90
+ interface RedirectAssignmentInfo$1 {
91
+ /**
92
+ * Primary domain to which this domain will redirect.
93
+ * @readonly
94
+ */
95
+ primaryDomain?: string;
96
+ }
97
+ declare enum DnsPropagationStatus$1 {
98
+ UNKNOWN_DNS_PROPAGATION_STATUS = "UNKNOWN_DNS_PROPAGATION_STATUS",
99
+ COMPLETED = "COMPLETED",
100
+ FAILED = "FAILED",
101
+ IN_PROGRESS = "IN_PROGRESS"
102
+ }
103
+ interface DomainRemovedEvent$1 {
104
+ /**
105
+ * Domain name including TLD.
106
+ * Both root domains and subdomains are supported.
107
+ */
108
+ domain?: string;
109
+ }
110
+ interface CreateConnectedDomainRequest {
111
+ /** Domain to connect. */
112
+ connectedDomain: ConnectedDomain;
113
+ }
114
+ interface CreateConnectedDomainResponse {
115
+ /** Connected domain. */
116
+ connectedDomain?: ConnectedDomain;
117
+ }
118
+ interface GetConnectedDomainRequest {
119
+ /** ID of the connected domain. Identical to the domain name including TLD. */
120
+ connectedDomainId: string;
121
+ }
122
+ interface GetConnectedDomainResponse {
123
+ /** Retrieved connected domain. */
124
+ connectedDomain?: ConnectedDomain;
125
+ }
126
+ interface DeleteConnectedDomainRequest {
127
+ /** ID of the connected domain to delete. Identical to the domain name including TLD. */
128
+ connectedDomainId: string;
129
+ }
130
+ interface DeleteConnectedDomainResponse {
131
+ }
132
+ interface ListConnectedDomainsRequest {
133
+ /** Cursor paging options. */
134
+ paging?: CursorPaging$2;
135
+ }
136
+ interface CursorPaging$2 {
137
+ /**
138
+ * Number of domains to load.
139
+ *
140
+ * Min: `0`
141
+ * Max: `100`
142
+ */
143
+ limit?: number | null;
144
+ /**
145
+ * Pointer to the next or previous page in the list of results.
146
+ *
147
+ * You can get the relevant cursor token
148
+ * from the `pagingMetadata` object in the previous call's response.
149
+ * Not relevant for the first request.
150
+ */
151
+ cursor?: string | null;
152
+ }
153
+ interface ListConnectedDomainsResponse {
154
+ /** Metadata about the returned list of connected domains. */
155
+ pagingMetadata?: CursorPagingMetadata$2;
156
+ /** Retrieved connected domains. */
157
+ connectedDomains?: ConnectedDomain[];
158
+ }
159
+ interface CursorPagingMetadata$2 {
160
+ /** Number of domains returned in the response. */
161
+ count?: number | null;
162
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
163
+ cursors?: Cursors$2;
164
+ /**
165
+ * Indicates if there are more results after the current page.
166
+ * If `true`, another page of results can be retrieved.
167
+ * If `false`, this is the last page.
168
+ */
169
+ hasNext?: boolean | null;
170
+ }
171
+ interface Cursors$2 {
172
+ /** Cursor pointing to next page in the list of results. */
173
+ next?: string | null;
174
+ /** Cursor pointing to previous page in the list of results. */
175
+ prev?: string | null;
176
+ }
177
+ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
178
+ createdEvent?: EntityCreatedEvent$2;
179
+ updatedEvent?: EntityUpdatedEvent$2;
180
+ deletedEvent?: EntityDeletedEvent$2;
181
+ actionEvent?: ActionEvent$2;
182
+ /**
183
+ * Unique event ID.
184
+ * Allows clients to ignore duplicate webhooks.
185
+ */
186
+ _id?: string;
187
+ /**
188
+ * Assumes actions are also always typed to an entity_type
189
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
190
+ */
191
+ entityFqdn?: string;
192
+ /**
193
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
194
+ * This is although the created/updated/deleted notion is duplication of the oneof types
195
+ * Example: created/updated/deleted/started/completed/email_opened
196
+ */
197
+ slug?: string;
198
+ /** ID of the entity associated with the event. */
199
+ entityId?: string;
200
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
201
+ eventTime?: Date;
202
+ /**
203
+ * Whether the event was triggered as a result of a privacy regulation application
204
+ * (for example, GDPR).
205
+ */
206
+ triggeredByAnonymizeRequest?: boolean | null;
207
+ /** If present, indicates the action that triggered the event. */
208
+ originatedFrom?: string | null;
209
+ /**
210
+ * A sequence number defining the order of updates to the underlying entity.
211
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
212
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
213
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
214
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
215
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
216
+ */
217
+ entityEventSequence?: string | null;
218
+ }
219
+ /** @oneof */
220
+ interface DomainEventBodyOneOf$2 {
221
+ createdEvent?: EntityCreatedEvent$2;
222
+ updatedEvent?: EntityUpdatedEvent$2;
223
+ deletedEvent?: EntityDeletedEvent$2;
224
+ actionEvent?: ActionEvent$2;
225
+ }
226
+ interface EntityCreatedEvent$2 {
227
+ entity?: string;
228
+ }
229
+ interface RestoreInfo$1 {
230
+ deletedDate?: Date;
231
+ }
232
+ interface EntityUpdatedEvent$2 {
233
+ /**
234
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
235
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
236
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
237
+ */
238
+ currentEntity?: string;
239
+ }
240
+ interface EntityDeletedEvent$2 {
241
+ /** Entity that was deleted */
242
+ deletedEntity?: string | null;
243
+ }
244
+ interface ActionEvent$2 {
245
+ body?: string;
246
+ }
247
+ interface MessageEnvelope$2 {
248
+ /** App instance ID. */
249
+ instanceId?: string | null;
250
+ /** Event type. */
251
+ eventType?: string;
252
+ /** The identification type and identity data. */
253
+ identity?: IdentificationData$2;
254
+ /** Stringify payload. */
255
+ data?: string;
256
+ }
257
+ interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
258
+ /** ID of a site visitor that has not logged in to the site. */
259
+ anonymousVisitorId?: string;
260
+ /** ID of a site visitor that has logged in to the site. */
261
+ memberId?: string;
262
+ /** ID of a Wix user (site owner, contributor, etc.). */
263
+ wixUserId?: string;
264
+ /** ID of an app. */
265
+ appId?: string;
266
+ /** @readonly */
267
+ identityType?: WebhookIdentityType$2;
268
+ }
269
+ /** @oneof */
270
+ interface IdentificationDataIdOneOf$2 {
271
+ /** ID of a site visitor that has not logged in to the site. */
272
+ anonymousVisitorId?: string;
273
+ /** ID of a site visitor that has logged in to the site. */
274
+ memberId?: string;
275
+ /** ID of a Wix user (site owner, contributor, etc.). */
276
+ wixUserId?: string;
277
+ /** ID of an app. */
278
+ appId?: string;
279
+ }
280
+ declare enum WebhookIdentityType$2 {
281
+ UNKNOWN = "UNKNOWN",
282
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
283
+ MEMBER = "MEMBER",
284
+ WIX_USER = "WIX_USER",
285
+ APP = "APP"
286
+ }
287
+ interface RedirectAssignmentInfoNonNullableFields$1 {
288
+ primaryDomain: string;
289
+ }
290
+ interface SiteInfoNonNullableFields$1 {
291
+ redirectInfo?: RedirectAssignmentInfoNonNullableFields$1;
292
+ assignmentType: AssignmentType$1;
293
+ }
294
+ interface ConnectedDomainNonNullableFields {
295
+ _id: string;
296
+ domain: string;
297
+ connectionType: ConnectionType$1;
298
+ siteInfo?: SiteInfoNonNullableFields$1;
299
+ suppressNotifications: boolean;
300
+ dnsPropagationStatus: DnsPropagationStatus$1;
301
+ }
302
+ interface CreateConnectedDomainResponseNonNullableFields {
303
+ connectedDomain?: ConnectedDomainNonNullableFields;
304
+ }
305
+ interface GetConnectedDomainResponseNonNullableFields {
306
+ connectedDomain?: ConnectedDomainNonNullableFields;
307
+ }
308
+ interface ListConnectedDomainsResponseNonNullableFields {
309
+ connectedDomains: ConnectedDomainNonNullableFields[];
310
+ }
311
+ interface ListConnectedDomainsOptions {
312
+ /** Cursor paging options. */
313
+ paging?: CursorPaging$2;
314
+ }
315
+
1
316
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
317
  interface HttpClient {
3
318
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
@@ -24,16 +339,6 @@ type APIMetadata = {
24
339
  packageName?: string;
25
340
  };
26
341
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
- type EventDefinition<Payload = unknown, Type extends string = string> = {
28
- __type: 'event-definition';
29
- type: Type;
30
- isDomainEvent?: boolean;
31
- transformations?: (envelope: unknown) => Payload;
32
- __payload: Payload;
33
- };
34
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
342
 
38
343
  declare global {
39
344
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -44,30 +349,542 @@ declare global {
44
349
 
45
350
  declare function createRESTModule$5<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
46
351
 
47
- declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
48
-
49
352
  declare const createConnectedDomain: ReturnType<typeof createRESTModule$5<typeof publicCreateConnectedDomain>>;
50
353
  declare const getConnectedDomain: ReturnType<typeof createRESTModule$5<typeof publicGetConnectedDomain>>;
51
354
  declare const deleteConnectedDomain: ReturnType<typeof createRESTModule$5<typeof publicDeleteConnectedDomain>>;
52
355
  declare const listConnectedDomains: ReturnType<typeof createRESTModule$5<typeof publicListConnectedDomains>>;
53
- declare const onConnectedDomainRemoved: ReturnType<typeof createEventModule<typeof publicOnConnectedDomainRemoved>>;
54
356
 
357
+ type context$5_ConnectedDomain = ConnectedDomain;
358
+ type context$5_ConnectedDomainNonNullableFields = ConnectedDomainNonNullableFields;
359
+ type context$5_CreateConnectedDomainRequest = CreateConnectedDomainRequest;
360
+ type context$5_CreateConnectedDomainResponse = CreateConnectedDomainResponse;
361
+ type context$5_CreateConnectedDomainResponseNonNullableFields = CreateConnectedDomainResponseNonNullableFields;
362
+ type context$5_DeleteConnectedDomainRequest = DeleteConnectedDomainRequest;
363
+ type context$5_DeleteConnectedDomainResponse = DeleteConnectedDomainResponse;
364
+ type context$5_GetConnectedDomainRequest = GetConnectedDomainRequest;
365
+ type context$5_GetConnectedDomainResponse = GetConnectedDomainResponse;
366
+ type context$5_GetConnectedDomainResponseNonNullableFields = GetConnectedDomainResponseNonNullableFields;
367
+ type context$5_ListConnectedDomainsOptions = ListConnectedDomainsOptions;
368
+ type context$5_ListConnectedDomainsRequest = ListConnectedDomainsRequest;
369
+ type context$5_ListConnectedDomainsResponse = ListConnectedDomainsResponse;
370
+ type context$5_ListConnectedDomainsResponseNonNullableFields = ListConnectedDomainsResponseNonNullableFields;
55
371
  declare const context$5_createConnectedDomain: typeof createConnectedDomain;
56
372
  declare const context$5_deleteConnectedDomain: typeof deleteConnectedDomain;
57
373
  declare const context$5_getConnectedDomain: typeof getConnectedDomain;
58
374
  declare const context$5_listConnectedDomains: typeof listConnectedDomains;
59
- declare const context$5_onConnectedDomainRemoved: typeof onConnectedDomainRemoved;
60
375
  declare namespace context$5 {
61
- export { context$5_createConnectedDomain as createConnectedDomain, context$5_deleteConnectedDomain as deleteConnectedDomain, context$5_getConnectedDomain as getConnectedDomain, context$5_listConnectedDomains as listConnectedDomains, context$5_onConnectedDomainRemoved as onConnectedDomainRemoved };
376
+ export { type ActionEvent$2 as ActionEvent, AssignmentType$1 as AssignmentType, type context$5_ConnectedDomain as ConnectedDomain, type context$5_ConnectedDomainNonNullableFields as ConnectedDomainNonNullableFields, ConnectionType$1 as ConnectionType, type context$5_CreateConnectedDomainRequest as CreateConnectedDomainRequest, type context$5_CreateConnectedDomainResponse as CreateConnectedDomainResponse, type context$5_CreateConnectedDomainResponseNonNullableFields as CreateConnectedDomainResponseNonNullableFields, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type Cursors$2 as Cursors, type context$5_DeleteConnectedDomainRequest as DeleteConnectedDomainRequest, type context$5_DeleteConnectedDomainResponse as DeleteConnectedDomainResponse, DnsPropagationStatus$1 as DnsPropagationStatus, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type DomainRemovedEvent$1 as DomainRemovedEvent, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type context$5_GetConnectedDomainRequest as GetConnectedDomainRequest, type context$5_GetConnectedDomainResponse as GetConnectedDomainResponse, type context$5_GetConnectedDomainResponseNonNullableFields as GetConnectedDomainResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$5_ListConnectedDomainsOptions as ListConnectedDomainsOptions, type context$5_ListConnectedDomainsRequest as ListConnectedDomainsRequest, type context$5_ListConnectedDomainsResponse as ListConnectedDomainsResponse, type context$5_ListConnectedDomainsResponseNonNullableFields as ListConnectedDomainsResponseNonNullableFields, type MessageEnvelope$2 as MessageEnvelope, type RedirectAssignmentInfo$1 as RedirectAssignmentInfo, type RestoreInfo$1 as RestoreInfo, type SiteInfo$1 as SiteInfo, type SiteInfoAssignmentInfoOneOf$1 as SiteInfoAssignmentInfoOneOf, WebhookIdentityType$2 as WebhookIdentityType, context$5_createConnectedDomain as createConnectedDomain, context$5_deleteConnectedDomain as deleteConnectedDomain, context$5_getConnectedDomain as getConnectedDomain, context$5_listConnectedDomains as listConnectedDomains };
377
+ }
378
+
379
+ /**
380
+ * A `connectedDomainSetupInfo` object holds information the connected domain's
381
+ * external registrar and some DNS records. You can use this information to guide
382
+ * the site owner through the domain's setup process.
383
+ */
384
+ interface ConnectedDomainSetupInfo extends ConnectedDomainSetupInfoDnsRecordsOneOf {
385
+ /**
386
+ * Information about domains connected using nameservers. Available only for
387
+ * `{"connectionType": "NAMESERVERS"}`.
388
+ */
389
+ nameserverRecord?: NameserverRecord;
390
+ /**
391
+ * Information about domains connected by pointing. Available only for
392
+ * `{"connectionType": "POINTING"}`.
393
+ * @readonly
394
+ */
395
+ pointingRecords?: PointingRecords;
396
+ /**
397
+ * Information about subdomains. Available only for subdomains.
398
+ * @readonly
399
+ */
400
+ subdomainRecords?: SubdomainRecords;
401
+ /** ID of the connected domain. Identical to the domain name including TLD. */
402
+ connectedDomainId?: string;
403
+ /**
404
+ * Information about the external domain registrar including current name
405
+ * servers.
406
+ */
407
+ registrar?: Registrar;
408
+ }
409
+ /** @oneof */
410
+ interface ConnectedDomainSetupInfoDnsRecordsOneOf {
411
+ /**
412
+ * Information about domains connected using nameservers. Available only for
413
+ * `{"connectionType": "NAMESERVERS"}`.
414
+ */
415
+ nameserverRecord?: NameserverRecord;
416
+ /**
417
+ * Information about domains connected by pointing. Available only for
418
+ * `{"connectionType": "POINTING"}`.
419
+ * @readonly
420
+ */
421
+ pointingRecords?: PointingRecords;
422
+ /**
423
+ * Information about subdomains. Available only for subdomains.
424
+ * @readonly
425
+ */
426
+ subdomainRecords?: SubdomainRecords;
427
+ }
428
+ interface Registrar {
429
+ /**
430
+ * Name of the external domain registrar. For subdomains it's the registrar of the root domain.
431
+ * @readonly
432
+ */
433
+ name?: string | null;
434
+ /**
435
+ * Values of the current name server records. In case you connect an external
436
+ * domain using name servers, site owners must replace these current name servers
437
+ * with the new name servers found in `connectedDomainSetupInfo.nameserverRecord.nsRecord.values`
438
+ * during the initial domain setup.
439
+ * The replacement can't be performed through Wix APIs, you must use the
440
+ * infrastructure of the external domain registrar. Read more about
441
+ * [connecting domains using nameservers](https://dev.wix.com/api/rest/account-level-apis/connected-domains/sample-flows#account-level-apis_connected-domains_sample-flows_connect-an-external-domain-using-nameservers).
442
+ * @readonly
443
+ */
444
+ nameServers?: string[];
445
+ }
446
+ /** Information about domains connected by nameservers. */
447
+ interface NameserverRecord {
448
+ /**
449
+ * Default [nameserver record](https://en.wikipedia.org/wiki/List_of_DNS_record_types#NS).
450
+ * @readonly
451
+ */
452
+ nsRecord?: NsRecord;
453
+ }
454
+ interface NsRecord {
455
+ /** Domain host name. For example `domain.com` or `mail.domain.com`. Can be a subdomain. */
456
+ hostName?: string;
457
+ /** [Time to live](https://en.wikipedia.org/wiki/Time_to_live) in seconds. */
458
+ ttl?: number;
459
+ /** DNS record values. */
460
+ values?: string[];
461
+ }
462
+ /** Information about domains connected by pointing. */
463
+ interface PointingRecords {
464
+ /**
465
+ * [Address record](https://en.wikipedia.org/wiki/List_of_DNS_record_types#A).
466
+ * @readonly
467
+ */
468
+ aRecord?: ARecord;
469
+ /**
470
+ * [Canonical Name record](https://en.wikipedia.org/wiki/CNAME_record).
471
+ * @readonly
472
+ */
473
+ cnameRecord?: CnameRecord;
474
+ }
475
+ interface ARecord {
476
+ /** Domain host name. For example `domain.com` or `mail.domain.com`. Can be a subdomain. */
477
+ hostName?: string;
478
+ /** [Time to live](https://en.wikipedia.org/wiki/Time_to_live) in seconds. */
479
+ ttl?: number;
480
+ /** DNS record values. */
481
+ values?: string[];
482
+ }
483
+ interface CnameRecord {
484
+ /** Domain host name. For example `domain.com` or `mail.domain.com`. Can be a subdomain. */
485
+ hostName?: string;
486
+ /** [Time to live](https://en.wikipedia.org/wiki/Time_to_live) in seconds. */
487
+ ttl?: number;
488
+ /** DNS record value. */
489
+ value?: string;
490
+ }
491
+ /** Information about subdomains. */
492
+ interface SubdomainRecords {
493
+ /**
494
+ * [Canonical Name records](https://en.wikipedia.org/wiki/CNAME_record).
495
+ * @readonly
496
+ */
497
+ cnameRecords?: CnameRecord[];
498
+ }
499
+ interface GetSetupInfoRequest {
500
+ /** Domain name including TLD */
501
+ domain?: string;
502
+ /**
503
+ * How the domain should be to connected the Wix site.
504
+ *
505
+ * + `"UNKNOWN_CONNECTION_TYPE"`: supported only for subdomain.
506
+ * + `"POINTING"`: Get domain or subdomain setup by pointing
507
+ * + `"NAMESERVERS"`: Get domain setup by nameservers
508
+ * + `"HIDDEN"`: supported only for subdomain.
509
+ */
510
+ connectionType?: ConnectionType;
511
+ /** Whether to return registrar information or not. Default is false. */
512
+ includeRegistrar?: boolean;
513
+ }
514
+ declare enum ConnectionType {
515
+ /** Used by sub domain */
516
+ UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
517
+ POINTING = "POINTING",
518
+ NAMESERVERS = "NAMESERVERS",
519
+ /**
520
+ * internal used by photography company.
521
+ * when a customer creates a photo album, each album has its sub domain and this sub domain
522
+ * is not visible in my domains page.
523
+ */
524
+ HIDDEN = "HIDDEN"
525
+ }
526
+ interface GetSetupInfoResponse {
527
+ /** Retrieved setup information. */
528
+ domainSetupInfo?: ConnectedDomainSetupInfo;
529
+ }
530
+ interface GetConnectedDomainSetupInfoRequest {
531
+ /**
532
+ * ID of the connected domain to retrieve setup information for.
533
+ * Identical to the domain name including TLD.
534
+ */
535
+ connectedDomainId: string;
536
+ }
537
+ interface GetConnectedDomainSetupInfoResponse {
538
+ /** Retrieved setup information. */
539
+ connectedDomainSetupInfo?: ConnectedDomainSetupInfo;
540
+ }
541
+ interface NsRecordNonNullableFields {
542
+ hostName: string;
543
+ ttl: number;
544
+ values: string[];
545
+ }
546
+ interface NameserverRecordNonNullableFields {
547
+ nsRecord?: NsRecordNonNullableFields;
548
+ }
549
+ interface ARecordNonNullableFields {
550
+ hostName: string;
551
+ ttl: number;
552
+ values: string[];
553
+ }
554
+ interface CnameRecordNonNullableFields {
555
+ hostName: string;
556
+ ttl: number;
557
+ value: string;
558
+ }
559
+ interface PointingRecordsNonNullableFields {
560
+ aRecord?: ARecordNonNullableFields;
561
+ cnameRecord?: CnameRecordNonNullableFields;
562
+ }
563
+ interface SubdomainRecordsNonNullableFields {
564
+ cnameRecords: CnameRecordNonNullableFields[];
565
+ }
566
+ interface RegistrarNonNullableFields {
567
+ nameServers: string[];
568
+ }
569
+ interface ConnectedDomainSetupInfoNonNullableFields {
570
+ nameserverRecord?: NameserverRecordNonNullableFields;
571
+ pointingRecords?: PointingRecordsNonNullableFields;
572
+ subdomainRecords?: SubdomainRecordsNonNullableFields;
573
+ connectedDomainId: string;
574
+ registrar?: RegistrarNonNullableFields;
575
+ }
576
+ interface GetConnectedDomainSetupInfoResponseNonNullableFields {
577
+ connectedDomainSetupInfo?: ConnectedDomainSetupInfoNonNullableFields;
62
578
  }
63
579
 
64
580
  declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
65
581
 
66
582
  declare const getConnectedDomainSetupInfo: ReturnType<typeof createRESTModule$4<typeof publicGetConnectedDomainSetupInfo>>;
67
583
 
584
+ type context$4_ARecord = ARecord;
585
+ type context$4_CnameRecord = CnameRecord;
586
+ type context$4_ConnectedDomainSetupInfo = ConnectedDomainSetupInfo;
587
+ type context$4_ConnectedDomainSetupInfoDnsRecordsOneOf = ConnectedDomainSetupInfoDnsRecordsOneOf;
588
+ type context$4_ConnectionType = ConnectionType;
589
+ declare const context$4_ConnectionType: typeof ConnectionType;
590
+ type context$4_GetConnectedDomainSetupInfoRequest = GetConnectedDomainSetupInfoRequest;
591
+ type context$4_GetConnectedDomainSetupInfoResponse = GetConnectedDomainSetupInfoResponse;
592
+ type context$4_GetConnectedDomainSetupInfoResponseNonNullableFields = GetConnectedDomainSetupInfoResponseNonNullableFields;
593
+ type context$4_GetSetupInfoRequest = GetSetupInfoRequest;
594
+ type context$4_GetSetupInfoResponse = GetSetupInfoResponse;
595
+ type context$4_NameserverRecord = NameserverRecord;
596
+ type context$4_NsRecord = NsRecord;
597
+ type context$4_PointingRecords = PointingRecords;
598
+ type context$4_Registrar = Registrar;
599
+ type context$4_SubdomainRecords = SubdomainRecords;
68
600
  declare const context$4_getConnectedDomainSetupInfo: typeof getConnectedDomainSetupInfo;
69
601
  declare namespace context$4 {
70
- export { context$4_getConnectedDomainSetupInfo as getConnectedDomainSetupInfo };
602
+ export { type context$4_ARecord as ARecord, type context$4_CnameRecord as CnameRecord, type context$4_ConnectedDomainSetupInfo as ConnectedDomainSetupInfo, type context$4_ConnectedDomainSetupInfoDnsRecordsOneOf as ConnectedDomainSetupInfoDnsRecordsOneOf, context$4_ConnectionType as ConnectionType, type context$4_GetConnectedDomainSetupInfoRequest as GetConnectedDomainSetupInfoRequest, type context$4_GetConnectedDomainSetupInfoResponse as GetConnectedDomainSetupInfoResponse, type context$4_GetConnectedDomainSetupInfoResponseNonNullableFields as GetConnectedDomainSetupInfoResponseNonNullableFields, type context$4_GetSetupInfoRequest as GetSetupInfoRequest, type context$4_GetSetupInfoResponse as GetSetupInfoResponse, type context$4_NameserverRecord as NameserverRecord, type context$4_NsRecord as NsRecord, type context$4_PointingRecords as PointingRecords, type context$4_Registrar as Registrar, type context$4_SubdomainRecords as SubdomainRecords, context$4_getConnectedDomainSetupInfo as getConnectedDomainSetupInfo };
603
+ }
604
+
605
+ /** DNS zones hold information about the records that map a domain's URL to an IP address. */
606
+ interface DnsZone {
607
+ /** Domain name including the TLD. Both root domains and subdomains are supported. */
608
+ domainName?: string;
609
+ /**
610
+ * DNS records. You can only set up a single `record` object per DNS record
611
+ * type. If you want to specify multiple values for the same record type, you
612
+ * must save them in the `values` for the relevant type.
613
+ *
614
+ * Min: 2 DNS record - a DNS zone file has to have at least two required DNS records: NS and SOA records
615
+ * Max: 5000 DNS records
616
+ */
617
+ records?: DnsRecord[];
618
+ /**
619
+ * ID of the Dns Zone. Identical to the domain name including TLD.
620
+ * @readonly
621
+ */
622
+ _id?: string;
623
+ /**
624
+ * Whether [DNS Security Extensions (DNSSEC)](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions) are enabled.
625
+ *
626
+ * Default: `false`
627
+ */
628
+ dnssecEnabled?: boolean;
629
+ }
630
+ interface DnsRecord {
631
+ /**
632
+ * [DNS record type](https://en.wikipedia.org/wiki/List_of_DNS_record_types).
633
+ *
634
+ * + `UNKNOWN`: Default value. Used in case the record type isn't known. You can't set a record type to `UNKNOWN`.
635
+ * + `A`: Address record. Most fundamental type of DNS record that indicates the IP address of a given domain.
636
+ * + `AAAA`: Address record in [IPv6 format](https://en.wikipedia.org/wiki/IPv6).
637
+ * + `NS`: Name server record. Describes which server contains the actual DNS record.
638
+ * + `SOA`: [Start of authority record](https://en.wikipedia.org/wiki/SOA_record). Holds adminstrative information about the zone.
639
+ * + `CNAME`: [CNAME record](https://en.wikipedia.org/wiki/CNAME_record). Maps an alias name to the canonical domain name.
640
+ * + `MX`: MX record. Directs emails to mail servers.
641
+ * + `TXT`: [TXT record](https://en.wikipedia.org/wiki/TXT_record). Used by domain admins to add human readable descriptions.
642
+ * + `SPF`: SPF record. Used for email authentication.
643
+ * + `SRV`: [Service record](https://en.wikipedia.org/wiki/SRV_record). Defines the server location.
644
+ * + `PTR`: Pointer record. Specifies which host is supported for a given IP address.
645
+ * + `NAPTR`: [Name Authority Pointer record](https://en.wikipedia.org/wiki/NAPTR_record). Used by Internet telephony applications.
646
+ */
647
+ type?: RecordType;
648
+ /**
649
+ * Host name. Can be a subdomain. For example, `domain.com` or
650
+ * `mail.domain.com`. Equal to the domain name, except for `CNAME` records.
651
+ */
652
+ hostName?: string;
653
+ /** [Time to live](https://en.wikipedia.org/wiki/Time_to_live) in seconds. */
654
+ ttl?: number;
655
+ /**
656
+ * DNS record values. Wix limits DNS records to 50 values per type. External
657
+ * providers may support a different maximum number of DNS records for a
658
+ * specific type, Wix doesn't validate that you don't exceed these external
659
+ * limits.
660
+ *
661
+ * Max: 50 records
662
+ */
663
+ values?: string[];
664
+ }
665
+ declare enum RecordType {
666
+ UNKNOWN = "UNKNOWN",
667
+ A = "A",
668
+ AAAA = "AAAA",
669
+ NS = "NS",
670
+ SOA = "SOA",
671
+ CNAME = "CNAME",
672
+ MX = "MX",
673
+ TXT = "TXT",
674
+ SPF = "SPF",
675
+ SRV = "SRV",
676
+ PTR = "PTR",
677
+ NAPTR = "NAPTR"
678
+ }
679
+ interface DomainRemovedEvent {
680
+ /**
681
+ * Domain name including TLD.
682
+ * Both root domains and subdomains are supported.
683
+ */
684
+ domain?: string;
685
+ }
686
+ interface CreateDnsZoneRequest {
687
+ /** DNS zone to create. */
688
+ dnsZone: DnsZone;
689
+ }
690
+ interface CreateDnsZoneResponse {
691
+ /** Created DNS zone. */
692
+ dnsZone?: DnsZone;
693
+ }
694
+ interface GetDnsZoneRequest {
695
+ /** Domain to retrieve the DNS zone for. */
696
+ domainName: string;
697
+ }
698
+ interface GetDnsZoneResponse {
699
+ /** Retrieved DNS zone. */
700
+ dnsZone?: DnsZone;
701
+ }
702
+ interface UpdateDnsZoneRequest {
703
+ /** Domain to update the DNS zone for. Must include the TLD. */
704
+ domainName: string;
705
+ /**
706
+ * DNS records to add to the DNS zone.
707
+ *
708
+ * Max: 10 additions
709
+ */
710
+ additions?: DnsRecord[];
711
+ /**
712
+ * DNS records to remove from the DNS zone.
713
+ *
714
+ * Max: 10 deletions
715
+ */
716
+ deletions?: DnsRecord[];
717
+ /** Whether you want to enable or disable [DNS Security Extensions (DNSSEC)](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions). */
718
+ dnssecEnabled?: boolean | null;
719
+ }
720
+ interface UpdateDnsZoneResponse {
721
+ /** Updated DNS zone. */
722
+ dnsZone?: DnsZone;
723
+ }
724
+ interface DeleteDnsZoneRequest {
725
+ /** Domain name to delete the DNS zone for. */
726
+ domainName: string;
727
+ }
728
+ interface DeleteDnsZoneResponse {
729
+ }
730
+ interface PreviewDnsZoneRequest {
731
+ /** Domain name to generate a DNS zone preview for. */
732
+ domainName: string;
733
+ }
734
+ interface PreviewDnsZoneResponse {
735
+ /**
736
+ * DNS zone preview.
737
+ *
738
+ * Includes calculated `A`, `CNAME`, `NS` and `SOA` records.
739
+ */
740
+ dnsZone?: DnsZone;
741
+ }
742
+ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
743
+ createdEvent?: EntityCreatedEvent$1;
744
+ updatedEvent?: EntityUpdatedEvent$1;
745
+ deletedEvent?: EntityDeletedEvent$1;
746
+ actionEvent?: ActionEvent$1;
747
+ /**
748
+ * Unique event ID.
749
+ * Allows clients to ignore duplicate webhooks.
750
+ */
751
+ _id?: string;
752
+ /**
753
+ * Assumes actions are also always typed to an entity_type
754
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
755
+ */
756
+ entityFqdn?: string;
757
+ /**
758
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
759
+ * This is although the created/updated/deleted notion is duplication of the oneof types
760
+ * Example: created/updated/deleted/started/completed/email_opened
761
+ */
762
+ slug?: string;
763
+ /** ID of the entity associated with the event. */
764
+ entityId?: string;
765
+ /** Event timestamp. */
766
+ eventTime?: Date;
767
+ /**
768
+ * Whether the event was triggered as a result of a privacy regulation application
769
+ * (for example, GDPR).
770
+ */
771
+ triggeredByAnonymizeRequest?: boolean | null;
772
+ /** If present, indicates the action that triggered the event. */
773
+ originatedFrom?: string | null;
774
+ /**
775
+ * A sequence number defining the order of updates to the underlying entity.
776
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
777
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
778
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
779
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
780
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
781
+ */
782
+ entityEventSequence?: string | null;
783
+ }
784
+ /** @oneof */
785
+ interface DomainEventBodyOneOf$1 {
786
+ createdEvent?: EntityCreatedEvent$1;
787
+ updatedEvent?: EntityUpdatedEvent$1;
788
+ deletedEvent?: EntityDeletedEvent$1;
789
+ actionEvent?: ActionEvent$1;
790
+ }
791
+ interface EntityCreatedEvent$1 {
792
+ entity?: string;
793
+ }
794
+ interface EntityUpdatedEvent$1 {
795
+ /**
796
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
797
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
798
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
799
+ */
800
+ currentEntity?: string;
801
+ }
802
+ interface EntityDeletedEvent$1 {
803
+ /** Entity that was deleted */
804
+ deletedEntity?: string | null;
805
+ }
806
+ interface ActionEvent$1 {
807
+ body?: string;
808
+ }
809
+ interface MessageEnvelope$1 {
810
+ /** App instance ID. */
811
+ instanceId?: string | null;
812
+ /** Event type. */
813
+ eventType?: string;
814
+ /** The identification type and identity data. */
815
+ identity?: IdentificationData$1;
816
+ /** Stringify payload. */
817
+ data?: string;
818
+ }
819
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
820
+ /** ID of a site visitor that has not logged in to the site. */
821
+ anonymousVisitorId?: string;
822
+ /** ID of a site visitor that has logged in to the site. */
823
+ memberId?: string;
824
+ /** ID of a Wix user (site owner, contributor, etc.). */
825
+ wixUserId?: string;
826
+ /** ID of an app. */
827
+ appId?: string;
828
+ /** @readonly */
829
+ identityType?: WebhookIdentityType$1;
830
+ }
831
+ /** @oneof */
832
+ interface IdentificationDataIdOneOf$1 {
833
+ /** ID of a site visitor that has not logged in to the site. */
834
+ anonymousVisitorId?: string;
835
+ /** ID of a site visitor that has logged in to the site. */
836
+ memberId?: string;
837
+ /** ID of a Wix user (site owner, contributor, etc.). */
838
+ wixUserId?: string;
839
+ /** ID of an app. */
840
+ appId?: string;
841
+ }
842
+ declare enum WebhookIdentityType$1 {
843
+ UNKNOWN = "UNKNOWN",
844
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
845
+ MEMBER = "MEMBER",
846
+ WIX_USER = "WIX_USER",
847
+ APP = "APP"
848
+ }
849
+ interface DnsRecordNonNullableFields {
850
+ type: RecordType;
851
+ hostName: string;
852
+ ttl: number;
853
+ values: string[];
854
+ }
855
+ interface DnsZoneNonNullableFields {
856
+ domainName: string;
857
+ records: DnsRecordNonNullableFields[];
858
+ _id: string;
859
+ dnssecEnabled: boolean;
860
+ }
861
+ interface CreateDnsZoneResponseNonNullableFields {
862
+ dnsZone?: DnsZoneNonNullableFields;
863
+ }
864
+ interface GetDnsZoneResponseNonNullableFields {
865
+ dnsZone?: DnsZoneNonNullableFields;
866
+ }
867
+ interface UpdateDnsZoneResponseNonNullableFields {
868
+ dnsZone?: DnsZoneNonNullableFields;
869
+ }
870
+ interface PreviewDnsZoneResponseNonNullableFields {
871
+ dnsZone?: DnsZoneNonNullableFields;
872
+ }
873
+ interface UpdateDnsZoneOptions {
874
+ /**
875
+ * DNS records to add to the DNS zone.
876
+ *
877
+ * Max: 10 additions
878
+ */
879
+ additions?: DnsRecord[];
880
+ /**
881
+ * DNS records to remove from the DNS zone.
882
+ *
883
+ * Max: 10 deletions
884
+ */
885
+ deletions?: DnsRecord[];
886
+ /** Whether you want to enable or disable [DNS Security Extensions (DNSSEC)](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions). */
887
+ dnssecEnabled?: boolean | null;
71
888
  }
72
889
 
73
890
  declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
@@ -78,13 +895,684 @@ declare const updateDnsZone: ReturnType<typeof createRESTModule$3<typeof publicU
78
895
  declare const deleteDnsZone: ReturnType<typeof createRESTModule$3<typeof publicDeleteDnsZone>>;
79
896
  declare const previewDnsZone: ReturnType<typeof createRESTModule$3<typeof publicPreviewDnsZone>>;
80
897
 
898
+ type context$3_CreateDnsZoneRequest = CreateDnsZoneRequest;
899
+ type context$3_CreateDnsZoneResponse = CreateDnsZoneResponse;
900
+ type context$3_CreateDnsZoneResponseNonNullableFields = CreateDnsZoneResponseNonNullableFields;
901
+ type context$3_DeleteDnsZoneRequest = DeleteDnsZoneRequest;
902
+ type context$3_DeleteDnsZoneResponse = DeleteDnsZoneResponse;
903
+ type context$3_DnsRecord = DnsRecord;
904
+ type context$3_DnsZone = DnsZone;
905
+ type context$3_DnsZoneNonNullableFields = DnsZoneNonNullableFields;
906
+ type context$3_DomainRemovedEvent = DomainRemovedEvent;
907
+ type context$3_GetDnsZoneRequest = GetDnsZoneRequest;
908
+ type context$3_GetDnsZoneResponse = GetDnsZoneResponse;
909
+ type context$3_GetDnsZoneResponseNonNullableFields = GetDnsZoneResponseNonNullableFields;
910
+ type context$3_PreviewDnsZoneRequest = PreviewDnsZoneRequest;
911
+ type context$3_PreviewDnsZoneResponse = PreviewDnsZoneResponse;
912
+ type context$3_PreviewDnsZoneResponseNonNullableFields = PreviewDnsZoneResponseNonNullableFields;
913
+ type context$3_RecordType = RecordType;
914
+ declare const context$3_RecordType: typeof RecordType;
915
+ type context$3_UpdateDnsZoneOptions = UpdateDnsZoneOptions;
916
+ type context$3_UpdateDnsZoneRequest = UpdateDnsZoneRequest;
917
+ type context$3_UpdateDnsZoneResponse = UpdateDnsZoneResponse;
918
+ type context$3_UpdateDnsZoneResponseNonNullableFields = UpdateDnsZoneResponseNonNullableFields;
81
919
  declare const context$3_createDnsZone: typeof createDnsZone;
82
920
  declare const context$3_deleteDnsZone: typeof deleteDnsZone;
83
921
  declare const context$3_getDnsZone: typeof getDnsZone;
84
922
  declare const context$3_previewDnsZone: typeof previewDnsZone;
85
923
  declare const context$3_updateDnsZone: typeof updateDnsZone;
86
924
  declare namespace context$3 {
87
- export { context$3_createDnsZone as createDnsZone, context$3_deleteDnsZone as deleteDnsZone, context$3_getDnsZone as getDnsZone, context$3_previewDnsZone as previewDnsZone, context$3_updateDnsZone as updateDnsZone };
925
+ export { type ActionEvent$1 as ActionEvent, type context$3_CreateDnsZoneRequest as CreateDnsZoneRequest, type context$3_CreateDnsZoneResponse as CreateDnsZoneResponse, type context$3_CreateDnsZoneResponseNonNullableFields as CreateDnsZoneResponseNonNullableFields, type context$3_DeleteDnsZoneRequest as DeleteDnsZoneRequest, type context$3_DeleteDnsZoneResponse as DeleteDnsZoneResponse, type context$3_DnsRecord as DnsRecord, type context$3_DnsZone as DnsZone, type context$3_DnsZoneNonNullableFields as DnsZoneNonNullableFields, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$3_DomainRemovedEvent as DomainRemovedEvent, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type context$3_GetDnsZoneRequest as GetDnsZoneRequest, type context$3_GetDnsZoneResponse as GetDnsZoneResponse, type context$3_GetDnsZoneResponseNonNullableFields as GetDnsZoneResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$3_PreviewDnsZoneRequest as PreviewDnsZoneRequest, type context$3_PreviewDnsZoneResponse as PreviewDnsZoneResponse, type context$3_PreviewDnsZoneResponseNonNullableFields as PreviewDnsZoneResponseNonNullableFields, context$3_RecordType as RecordType, type context$3_UpdateDnsZoneOptions as UpdateDnsZoneOptions, type context$3_UpdateDnsZoneRequest as UpdateDnsZoneRequest, type context$3_UpdateDnsZoneResponse as UpdateDnsZoneResponse, type context$3_UpdateDnsZoneResponseNonNullableFields as UpdateDnsZoneResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, context$3_createDnsZone as createDnsZone, context$3_deleteDnsZone as deleteDnsZone, context$3_getDnsZone as getDnsZone, context$3_previewDnsZone as previewDnsZone, context$3_updateDnsZone as updateDnsZone };
926
+ }
927
+
928
+ /**
929
+ * A registered domain is a domain that Wix has registered on behalf of a customer
930
+ * with an external registar.
931
+ */
932
+ interface RegisteredDomain extends RegisteredDomainStatusInfoOneOf {
933
+ /**
934
+ * Information about a domain that hasn't been successfully registered
935
+ * yet. Includes the timestamp of the latest registration attempt.
936
+ * @readonly
937
+ */
938
+ pendingRegistrationInfo?: PendingRegistrationInfo;
939
+ /**
940
+ * Information about a domain that couldn't be registered. Includes
941
+ * failure code and message.
942
+ * @readonly
943
+ */
944
+ failedRegistrationInfo?: FailedRegistrationInfo;
945
+ /**
946
+ * Domain ID. Identical to `domain`.
947
+ * @readonly
948
+ */
949
+ _id?: string;
950
+ /**
951
+ * Name of the domain including TLD.
952
+ * Subdomains aren't supported. You can only register a root domain.
953
+ * Domain name and TLD must be separated by a dot. For example,
954
+ * `my-new-domain.com`. Only alphanumeric characters, hyphens, and dots are
955
+ * supported.
956
+ *
957
+ * Min: 3 characters
958
+ * Max: 63 characters
959
+ */
960
+ domain?: string;
961
+ /**
962
+ * ID of the product instance from the
963
+ * [Resellers API](https://dev.wix.com/docs/rest/api-reference/account-level-apis/resellers/packages-and-product-instances/packages-object)
964
+ * that belongs to the `registeredDomain` object.
965
+ * Your account must own a product that supports the chosen TLD, regardless of
966
+ * whether you want to assign the domain to a site or keep it floating. If
967
+ * you want to assign the domain to a site, the relevant site must also
968
+ * own a Premium plan. Contact the [Wix B2B team](mailto:bizdev@wix.com)
969
+ * for more information about how to become a reseller and a list of available
970
+ * product IDs.
971
+ */
972
+ productInstanceId?: string;
973
+ /**
974
+ * Date and time the `registeredDomain` object was created in
975
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
976
+ * @readonly
977
+ */
978
+ _createdDate?: Date;
979
+ /**
980
+ * Date and time the `registeredDomain` object was last updated in
981
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
982
+ * @readonly
983
+ */
984
+ _updatedDate?: Date;
985
+ /**
986
+ * Revision number, which increments by 1 each time the registered domain
987
+ * is updated. To prevent conflicting changes, the current revision must be
988
+ * passed when updating the registered domain.
989
+ *
990
+ * Ignored when creating a registered domain.
991
+ */
992
+ revision?: string | null;
993
+ /**
994
+ * Information about the Wix site the domain is connected to and whether the
995
+ * domain is assigned as the primary domain or a redirect.
996
+ */
997
+ siteInfo?: SiteInfo;
998
+ /**
999
+ * Contact details for the registrant, admin, and tech support of the registered domain.
1000
+ * You can read more about which
1001
+ * [Contact Field Validations](https://https://dev.wix.com/api/rest/account-level-apis/registered-domains/contact-field-validations)
1002
+ * are implemented.
1003
+ */
1004
+ contacts?: Contacts;
1005
+ /**
1006
+ * Status of the registered domain.
1007
+ *
1008
+ * + `"UNKNOWN_STATUS"`: There's no information about the status of the registered domain.
1009
+ * + `"PENDING_REGISTRATION"`: Wix has started the domain registration process, but the domain hasn't been successfully registered yet.
1010
+ * + `"ACTIVE"`: The domain has been registered successfully and is active.
1011
+ * + `"FAILED_REGISTRATION"`: Wix has tried to register the domain, but has stopped the process due to too many failed attempts. Contact the [Wix B2B team](mailto:bizdev@wix.com) for more information.
1012
+ * + `"CANCELED"`: The domain has been canceled and isn't active any longer.
1013
+ * @readonly
1014
+ */
1015
+ status?: Status;
1016
+ /**
1017
+ * ICANN confirmation status.
1018
+ *
1019
+ * + `"UNKNOWN_ICANN_CONFIRMATION_STATUS"`: There's no information about the status of the ICANN confirmation process.
1020
+ * + `"PENDING"`: Wix has started the ICANN confirmation process, but not all contacts have confirmed the domain yet.
1021
+ * + `"CONFIRMED_BY_ALL"`: The domain has been successfully confirmed by all contacts.
1022
+ * + `"EXPIRED"`: The domain hasn't been confirmed by all contacts before the ICANN confirmation process expired. The domain isn't active and a new confirmation process must be started. Contact the [Wix B2B team](mailto:bizdev@wix.com) for more information.
1023
+ * @readonly
1024
+ */
1025
+ icannConfirmationStatus?: ICANNConfirmationStatus;
1026
+ /**
1027
+ * Details about the ICANN confirmation status.
1028
+ * @readonly
1029
+ */
1030
+ icannConfirmationStatusInfo?: ICANNConfirmationStatusInfo;
1031
+ /**
1032
+ * DNS propagation status.
1033
+ *
1034
+ * + `"UNKNOWN_DNS_PROPAGATION_STATUS"`: There's no information about the domain's DNS propagation status.
1035
+ * + `"IN_PROGRESS"`: The domain's DNS propagation process has started but hasn't successfully completed yet.
1036
+ * + `"COMPLETED"`: The domain's DNS propagation process has successfully finished.
1037
+ * + `"FAILED"`: The domain's DNS propagation process has failed.
1038
+ * @readonly
1039
+ */
1040
+ dnsPropagationStatus?: DnsPropagationStatus;
1041
+ /**
1042
+ * Expiration date of the registered domain in `YYYY-MM-DDThh:mm:ss.sssZ`
1043
+ * format.
1044
+ * @readonly
1045
+ */
1046
+ expirationDate?: Date;
1047
+ }
1048
+ /** @oneof */
1049
+ interface RegisteredDomainStatusInfoOneOf {
1050
+ /**
1051
+ * Information about a domain that hasn't been successfully registered
1052
+ * yet. Includes the timestamp of the latest registration attempt.
1053
+ * @readonly
1054
+ */
1055
+ pendingRegistrationInfo?: PendingRegistrationInfo;
1056
+ /**
1057
+ * Information about a domain that couldn't be registered. Includes
1058
+ * failure code and message.
1059
+ * @readonly
1060
+ */
1061
+ failedRegistrationInfo?: FailedRegistrationInfo;
1062
+ }
1063
+ interface SiteInfo extends SiteInfoAssignmentInfoOneOf {
1064
+ /**
1065
+ * Extra details if `{"assignmentType": `"REDIRECT"}`.
1066
+ * @readonly
1067
+ */
1068
+ redirectInfo?: RedirectAssignmentInfo;
1069
+ /**
1070
+ * ID of the site to which the domain is assigned.
1071
+ * @readonly
1072
+ */
1073
+ _id?: string | null;
1074
+ /**
1075
+ * Whether the domain is assigned as the primary domain or a redirect.
1076
+ * Read more about [primary and redirected domains](https://support.wix.com/en/article/switching-your-primary-and-redirected-domains).
1077
+ * __Note:__ When you connect a domain or subdomain, you can't pass `"UNKNOWN_ASSIGNMENT_TYPE"`
1078
+ * in the request of the Create Registered Domain call.
1079
+ *
1080
+ * + `"UNKNOWN_ASSIGNMENT_TYPE"`: There's no information about the assignment type.
1081
+ * + `"PRIMARY"`: The domain is assigned as the primary domain to the Wix site.
1082
+ * + `"REDIRECT"`: The domain is assigned as a redirect to the Wix site.
1083
+ */
1084
+ assignmentType?: AssignmentType;
1085
+ }
1086
+ /** @oneof */
1087
+ interface SiteInfoAssignmentInfoOneOf {
1088
+ /**
1089
+ * Extra details if `{"assignmentType": `"REDIRECT"}`.
1090
+ * @readonly
1091
+ */
1092
+ redirectInfo?: RedirectAssignmentInfo;
1093
+ }
1094
+ declare enum AssignmentType {
1095
+ UNKNOWN_ASSIGNMENT_TYPE = "UNKNOWN_ASSIGNMENT_TYPE",
1096
+ PRIMARY = "PRIMARY",
1097
+ REDIRECT = "REDIRECT"
1098
+ }
1099
+ interface RedirectAssignmentInfo {
1100
+ /**
1101
+ * Primary domain the redirect points to.
1102
+ * @readonly
1103
+ */
1104
+ primaryDomain?: string;
1105
+ }
1106
+ interface Contacts {
1107
+ /** Contact information for the domain registrant. */
1108
+ registrant?: ContactData;
1109
+ /** Contact information for the domain admin. */
1110
+ admin?: ContactData;
1111
+ /** Contact information for the tech support of the domain. */
1112
+ tech?: ContactData;
1113
+ }
1114
+ interface ContactData {
1115
+ /**
1116
+ * First name. Only
1117
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1118
+ * are supported.
1119
+ *
1120
+ * Min: 2 characters
1121
+ * Max: 64 characters
1122
+ */
1123
+ firstName?: string;
1124
+ /**
1125
+ * Last name. Only
1126
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1127
+ * are supported.
1128
+ *
1129
+ * Min: 2 characters
1130
+ * Max: 64 characters
1131
+ */
1132
+ lastName?: string;
1133
+ /**
1134
+ * Email address. Only
1135
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1136
+ * and a single `@` are supported. Wix doesn't validate that the email address
1137
+ * exists.
1138
+ *
1139
+ * Min: 3 characters
1140
+ * Max: 64 characters before the `@` and 63 after
1141
+ */
1142
+ email?: string;
1143
+ /**
1144
+ * Address details, including street name and house number. Only
1145
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1146
+ * are supported.
1147
+ *
1148
+ * Min: 2 characters
1149
+ * Max: 64 characters
1150
+ */
1151
+ address?: string;
1152
+ /**
1153
+ * City. Only
1154
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1155
+ * are supported.
1156
+ *
1157
+ * Min: 2 characters
1158
+ * Max: 64 characters
1159
+ */
1160
+ city?: string;
1161
+ /**
1162
+ * Subdivision code in
1163
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
1164
+ * format. Only
1165
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1166
+ * are supported.
1167
+ * __Required__ for these countries:
1168
+ * `”AE"`, `"AR"`, `"AT"`, `"AU"`, `"BE"`, `"BR"`, `"CA"`, `"CH"`, `"CL"`,
1169
+ * `"CO"`, `"CR"`, `"CZ"`, `"DE"`, `"DK"`, `"ES"`, `"FI"`, `"FR"`, `"GR"`,
1170
+ * `"IE"`, `"IN"`, `"IT"`, `"JP"`, `"KR"`, `"MX"`, `"MY"`, `"NL"`, `"NO"`,
1171
+ * `"NZ"`, `"PE"`, `"PL"`, `"PT"`, `"RU"`, `"SE"`, `"SG"`, `"TH"`, `"TR"`,
1172
+ * `"TW"`, `"UA"`, `"US"`, `”ZA”`.
1173
+ *
1174
+ * Min: 2 characters
1175
+ * Max: 2 characters
1176
+ */
1177
+ subdivisionCode?: string | null;
1178
+ /**
1179
+ * Postal code. Only
1180
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1181
+ * are supported.
1182
+ *
1183
+ * Min: 2 characters
1184
+ * Max: 16 characters
1185
+ */
1186
+ postalCode?: string | null;
1187
+ /**
1188
+ * Country code in
1189
+ * [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-2#Subdivisions_included_in_ISO_3166-1)
1190
+ * format. Only
1191
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1192
+ * are supported. Wix doesn't validate that the postal code is valid for the
1193
+ * given country.
1194
+ *
1195
+ * Min: 2 characters
1196
+ * Max: 2 characters
1197
+ */
1198
+ countryCode?: string;
1199
+ /**
1200
+ * Phone number. Only
1201
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1202
+ * are supported. For example, `+15551234567`. Wix doesn't validate that the
1203
+ * phone number belongs to the specified country.
1204
+ *
1205
+ * Min: 2 characters
1206
+ * Max: 20 characters
1207
+ */
1208
+ phone?: string;
1209
+ /**
1210
+ * Company name. Only
1211
+ * [alphanumerical characters](https://en.wikipedia.org/wiki/Alphanumericals)
1212
+ * are supported.
1213
+ *
1214
+ * Max: 2 characters
1215
+ * Max: 64 characters
1216
+ */
1217
+ company?: string | null;
1218
+ }
1219
+ declare enum Status {
1220
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
1221
+ PENDING_REGISTRATION = "PENDING_REGISTRATION",
1222
+ ACTIVE = "ACTIVE",
1223
+ FAILED_REGISTRATION = "FAILED_REGISTRATION",
1224
+ CANCELED = "CANCELED"
1225
+ }
1226
+ interface PendingRegistrationInfo {
1227
+ /**
1228
+ * Information about the latest attempt to register
1229
+ * the domain. Wix tries to register the domain several times if the
1230
+ * first attempt is unsuccessful. You can contact the
1231
+ * [Wix B2B team](mailto:bizdev@wix.com)
1232
+ * for more information about the number of attempts and their timing.
1233
+ * @readonly
1234
+ */
1235
+ latestAttempt?: LatestAttempt;
1236
+ }
1237
+ interface LatestAttempt {
1238
+ /**
1239
+ * Number of the latest attempt to register the domain.
1240
+ * @readonly
1241
+ */
1242
+ number?: number;
1243
+ /**
1244
+ * Date and time of the latest domain registration attempt in
1245
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
1246
+ * @readonly
1247
+ */
1248
+ timestamp?: Date;
1249
+ }
1250
+ interface FailedRegistrationInfo {
1251
+ /**
1252
+ * Failure code.
1253
+ *
1254
+ * + `"UNKNOWN_FAILURE_CODE"`: There's no information about the failure code.
1255
+ * + `"OTHER"`: There was a failure, but none of the listed failure codes applies.
1256
+ * @readonly
1257
+ */
1258
+ code?: FailureCode;
1259
+ /**
1260
+ * Failure message.
1261
+ * @readonly
1262
+ */
1263
+ message?: string;
1264
+ }
1265
+ declare enum FailureCode {
1266
+ UNKNOWN_FAILURE_CODE = "UNKNOWN_FAILURE_CODE",
1267
+ OTHER = "OTHER"
1268
+ }
1269
+ /**
1270
+ * he confirmation status types, a record:
1271
+ * starts at pending
1272
+ * ends either at confirmed_by_all or expired
1273
+ */
1274
+ declare enum ICANNConfirmationStatus {
1275
+ UNKNOWN_ICANN_CONFIRMATION_STATUS = "UNKNOWN_ICANN_CONFIRMATION_STATUS",
1276
+ PENDING = "PENDING",
1277
+ CONFIRMED_BY_ALL = "CONFIRMED_BY_ALL",
1278
+ EXPIRED = "EXPIRED"
1279
+ }
1280
+ interface ICANNConfirmationStatusInfo extends ICANNConfirmationStatusInfoStatusOneOf {
1281
+ /** Details about domains with `"PENDING"` ICANN confirmation status. */
1282
+ pending?: Pending;
1283
+ /** Details about domains with `"EXPIRED"` ICANN confirmation status. */
1284
+ expired?: Expired;
1285
+ }
1286
+ /** @oneof */
1287
+ interface ICANNConfirmationStatusInfoStatusOneOf {
1288
+ /** Details about domains with `"PENDING"` ICANN confirmation status. */
1289
+ pending?: Pending;
1290
+ /** Details about domains with `"EXPIRED"` ICANN confirmation status. */
1291
+ expired?: Expired;
1292
+ }
1293
+ interface Pending {
1294
+ /**
1295
+ * Expiration date of the ICANN confirmation process in
1296
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format. All contacts must confirm the domain
1297
+ * before this date or the domain won't be active.
1298
+ */
1299
+ expirationDate?: Date;
1300
+ /**
1301
+ * Email addresses of the contacts who haven't confirmed the domain with ICANN
1302
+ * yet.
1303
+ */
1304
+ notConfirmedBy?: string[];
1305
+ }
1306
+ interface Expired {
1307
+ /**
1308
+ * Email addresses of the contacts who haven't confirmed the domain with ICANN
1309
+ * in time.
1310
+ */
1311
+ notConfirmedBy?: string[];
1312
+ }
1313
+ declare enum DnsPropagationStatus {
1314
+ UNKNOWN_DNS_PROPAGATION_STATUS = "UNKNOWN_DNS_PROPAGATION_STATUS",
1315
+ COMPLETED = "COMPLETED",
1316
+ FAILED = "FAILED",
1317
+ IN_PROGRESS = "IN_PROGRESS"
1318
+ }
1319
+ interface CreateRegisteredDomainRequest {
1320
+ /** Information about the domain to register including contact details. */
1321
+ registeredDomain: RegisteredDomain;
1322
+ }
1323
+ interface CreateRegisteredDomainResponse {
1324
+ /** Created registered domain. */
1325
+ registeredDomain?: RegisteredDomain;
1326
+ }
1327
+ interface GetRegisteredDomainRequest {
1328
+ /** ID of the registered domain to retrieve. */
1329
+ registeredDomainId: string;
1330
+ }
1331
+ interface GetRegisteredDomainResponse {
1332
+ /** Retrieved registered domain. */
1333
+ registeredDomain?: RegisteredDomain;
1334
+ }
1335
+ interface ListRegisteredDomainsRequest {
1336
+ /** Cursor paging options. */
1337
+ paging?: CursorPaging$1;
1338
+ }
1339
+ interface CursorPaging$1 {
1340
+ /**
1341
+ * Number of domains to load.
1342
+ *
1343
+ * Min: `0`
1344
+ * Max: `100`
1345
+ */
1346
+ limit?: number | null;
1347
+ /**
1348
+ * Pointer to the next or previous page in the list of results.
1349
+ *
1350
+ * You can get the relevant cursor token
1351
+ * from the `pagingMetadata` object in the previous call's response.
1352
+ * Not relevant for the first request.
1353
+ */
1354
+ cursor?: string | null;
1355
+ }
1356
+ interface ListRegisteredDomainsResponse {
1357
+ /** Metadata about the returned list of registered domains. */
1358
+ pagingMetadata?: CursorPagingMetadata$1;
1359
+ /** Retrieved registered domains. */
1360
+ registeredDomains?: RegisteredDomain[];
1361
+ }
1362
+ interface CursorPagingMetadata$1 {
1363
+ /** Number of domains returned in the response. */
1364
+ count?: number | null;
1365
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1366
+ cursors?: Cursors$1;
1367
+ /**
1368
+ * Indicates if there are more results after the current page.
1369
+ * If `true`, another page of results can be retrieved.
1370
+ * If `false`, this is the last page.
1371
+ */
1372
+ hasNext?: boolean | null;
1373
+ }
1374
+ interface Cursors$1 {
1375
+ /** Cursor pointing to next page in the list of results. */
1376
+ next?: string | null;
1377
+ /** Cursor pointing to previous page in the list of results. */
1378
+ prev?: string | null;
1379
+ }
1380
+ interface DeleteRegisteredDomainByIdRequest {
1381
+ /** ID of the registered domain to delete. */
1382
+ registeredDomainId?: string;
1383
+ }
1384
+ interface DeleteRegisteredDomainByIdResponse {
1385
+ }
1386
+ interface RedeemRegisteredDomainRequest {
1387
+ /**
1388
+ * ID of the registered domain to redeem. Identical to the domain name
1389
+ * including TLD.
1390
+ */
1391
+ registeredDomainId: string;
1392
+ }
1393
+ interface RedeemRegisteredDomainResponse {
1394
+ /** Registered domain to redeem. */
1395
+ registeredDomain?: RegisteredDomain;
1396
+ }
1397
+ interface DomainEvent extends DomainEventBodyOneOf {
1398
+ createdEvent?: EntityCreatedEvent;
1399
+ updatedEvent?: EntityUpdatedEvent;
1400
+ deletedEvent?: EntityDeletedEvent;
1401
+ actionEvent?: ActionEvent;
1402
+ /**
1403
+ * Unique event ID.
1404
+ * Allows clients to ignore duplicate webhooks.
1405
+ */
1406
+ _id?: string;
1407
+ /**
1408
+ * Assumes actions are also always typed to an entity_type
1409
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1410
+ */
1411
+ entityFqdn?: string;
1412
+ /**
1413
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1414
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1415
+ * Example: created/updated/deleted/started/completed/email_opened
1416
+ */
1417
+ slug?: string;
1418
+ /** ID of the entity associated with the event. */
1419
+ entityId?: string;
1420
+ /** Event timestamp. */
1421
+ eventTime?: Date;
1422
+ /**
1423
+ * Whether the event was triggered as a result of a privacy regulation application
1424
+ * (for example, GDPR).
1425
+ */
1426
+ triggeredByAnonymizeRequest?: boolean | null;
1427
+ /** If present, indicates the action that triggered the event. */
1428
+ originatedFrom?: string | null;
1429
+ /**
1430
+ * A sequence number defining the order of updates to the underlying entity.
1431
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1432
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1433
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1434
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1435
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1436
+ */
1437
+ entityEventSequence?: string | null;
1438
+ }
1439
+ /** @oneof */
1440
+ interface DomainEventBodyOneOf {
1441
+ createdEvent?: EntityCreatedEvent;
1442
+ updatedEvent?: EntityUpdatedEvent;
1443
+ deletedEvent?: EntityDeletedEvent;
1444
+ actionEvent?: ActionEvent;
1445
+ }
1446
+ interface EntityCreatedEvent {
1447
+ entity?: string;
1448
+ }
1449
+ interface RestoreInfo {
1450
+ deletedDate?: Date;
1451
+ }
1452
+ interface EntityUpdatedEvent {
1453
+ /**
1454
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1455
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1456
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1457
+ */
1458
+ currentEntity?: string;
1459
+ }
1460
+ interface EntityDeletedEvent {
1461
+ /** Entity that was deleted */
1462
+ deletedEntity?: string | null;
1463
+ }
1464
+ interface ActionEvent {
1465
+ body?: string;
1466
+ }
1467
+ interface MessageEnvelope {
1468
+ /** App instance ID. */
1469
+ instanceId?: string | null;
1470
+ /** Event type. */
1471
+ eventType?: string;
1472
+ /** The identification type and identity data. */
1473
+ identity?: IdentificationData;
1474
+ /** Stringify payload. */
1475
+ data?: string;
1476
+ }
1477
+ interface IdentificationData extends IdentificationDataIdOneOf {
1478
+ /** ID of a site visitor that has not logged in to the site. */
1479
+ anonymousVisitorId?: string;
1480
+ /** ID of a site visitor that has logged in to the site. */
1481
+ memberId?: string;
1482
+ /** ID of a Wix user (site owner, contributor, etc.). */
1483
+ wixUserId?: string;
1484
+ /** ID of an app. */
1485
+ appId?: string;
1486
+ /** @readonly */
1487
+ identityType?: WebhookIdentityType;
1488
+ }
1489
+ /** @oneof */
1490
+ interface IdentificationDataIdOneOf {
1491
+ /** ID of a site visitor that has not logged in to the site. */
1492
+ anonymousVisitorId?: string;
1493
+ /** ID of a site visitor that has logged in to the site. */
1494
+ memberId?: string;
1495
+ /** ID of a Wix user (site owner, contributor, etc.). */
1496
+ wixUserId?: string;
1497
+ /** ID of an app. */
1498
+ appId?: string;
1499
+ }
1500
+ declare enum WebhookIdentityType {
1501
+ UNKNOWN = "UNKNOWN",
1502
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1503
+ MEMBER = "MEMBER",
1504
+ WIX_USER = "WIX_USER",
1505
+ APP = "APP"
1506
+ }
1507
+ interface LatestAttemptNonNullableFields {
1508
+ number: number;
1509
+ }
1510
+ interface PendingRegistrationInfoNonNullableFields {
1511
+ latestAttempt?: LatestAttemptNonNullableFields;
1512
+ }
1513
+ interface FailedRegistrationInfoNonNullableFields {
1514
+ code: FailureCode;
1515
+ message: string;
1516
+ }
1517
+ interface RedirectAssignmentInfoNonNullableFields {
1518
+ primaryDomain: string;
1519
+ }
1520
+ interface SiteInfoNonNullableFields {
1521
+ redirectInfo?: RedirectAssignmentInfoNonNullableFields;
1522
+ assignmentType: AssignmentType;
1523
+ }
1524
+ interface ContactDataNonNullableFields {
1525
+ firstName: string;
1526
+ lastName: string;
1527
+ email: string;
1528
+ address: string;
1529
+ city: string;
1530
+ countryCode: string;
1531
+ phone: string;
1532
+ }
1533
+ interface ContactsNonNullableFields {
1534
+ registrant?: ContactDataNonNullableFields;
1535
+ admin?: ContactDataNonNullableFields;
1536
+ tech?: ContactDataNonNullableFields;
1537
+ }
1538
+ interface PendingNonNullableFields {
1539
+ notConfirmedBy: string[];
1540
+ }
1541
+ interface ExpiredNonNullableFields {
1542
+ notConfirmedBy: string[];
1543
+ }
1544
+ interface ICANNConfirmationStatusInfoNonNullableFields {
1545
+ pending?: PendingNonNullableFields;
1546
+ expired?: ExpiredNonNullableFields;
1547
+ }
1548
+ interface RegisteredDomainNonNullableFields {
1549
+ pendingRegistrationInfo?: PendingRegistrationInfoNonNullableFields;
1550
+ failedRegistrationInfo?: FailedRegistrationInfoNonNullableFields;
1551
+ _id: string;
1552
+ domain: string;
1553
+ productInstanceId: string;
1554
+ siteInfo?: SiteInfoNonNullableFields;
1555
+ contacts?: ContactsNonNullableFields;
1556
+ status: Status;
1557
+ icannConfirmationStatus: ICANNConfirmationStatus;
1558
+ icannConfirmationStatusInfo?: ICANNConfirmationStatusInfoNonNullableFields;
1559
+ dnsPropagationStatus: DnsPropagationStatus;
1560
+ }
1561
+ interface CreateRegisteredDomainResponseNonNullableFields {
1562
+ registeredDomain?: RegisteredDomainNonNullableFields;
1563
+ }
1564
+ interface GetRegisteredDomainResponseNonNullableFields {
1565
+ registeredDomain?: RegisteredDomainNonNullableFields;
1566
+ }
1567
+ interface ListRegisteredDomainsResponseNonNullableFields {
1568
+ registeredDomains: RegisteredDomainNonNullableFields[];
1569
+ }
1570
+ interface RedeemRegisteredDomainResponseNonNullableFields {
1571
+ registeredDomain?: RegisteredDomainNonNullableFields;
1572
+ }
1573
+ interface ListRegisteredDomainsOptions {
1574
+ /** Cursor paging options. */
1575
+ paging?: CursorPaging$1;
88
1576
  }
89
1577
 
90
1578
  declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
@@ -94,30 +1582,248 @@ declare const getRegisteredDomain: ReturnType<typeof createRESTModule$2<typeof p
94
1582
  declare const listRegisteredDomains: ReturnType<typeof createRESTModule$2<typeof publicListRegisteredDomains>>;
95
1583
  declare const redeemRegisteredDomain: ReturnType<typeof createRESTModule$2<typeof publicRedeemRegisteredDomain>>;
96
1584
 
1585
+ type context$2_ActionEvent = ActionEvent;
1586
+ type context$2_AssignmentType = AssignmentType;
1587
+ declare const context$2_AssignmentType: typeof AssignmentType;
1588
+ type context$2_ContactData = ContactData;
1589
+ type context$2_Contacts = Contacts;
1590
+ type context$2_CreateRegisteredDomainRequest = CreateRegisteredDomainRequest;
1591
+ type context$2_CreateRegisteredDomainResponse = CreateRegisteredDomainResponse;
1592
+ type context$2_CreateRegisteredDomainResponseNonNullableFields = CreateRegisteredDomainResponseNonNullableFields;
1593
+ type context$2_DeleteRegisteredDomainByIdRequest = DeleteRegisteredDomainByIdRequest;
1594
+ type context$2_DeleteRegisteredDomainByIdResponse = DeleteRegisteredDomainByIdResponse;
1595
+ type context$2_DnsPropagationStatus = DnsPropagationStatus;
1596
+ declare const context$2_DnsPropagationStatus: typeof DnsPropagationStatus;
1597
+ type context$2_DomainEvent = DomainEvent;
1598
+ type context$2_DomainEventBodyOneOf = DomainEventBodyOneOf;
1599
+ type context$2_EntityCreatedEvent = EntityCreatedEvent;
1600
+ type context$2_EntityDeletedEvent = EntityDeletedEvent;
1601
+ type context$2_EntityUpdatedEvent = EntityUpdatedEvent;
1602
+ type context$2_Expired = Expired;
1603
+ type context$2_FailedRegistrationInfo = FailedRegistrationInfo;
1604
+ type context$2_FailureCode = FailureCode;
1605
+ declare const context$2_FailureCode: typeof FailureCode;
1606
+ type context$2_GetRegisteredDomainRequest = GetRegisteredDomainRequest;
1607
+ type context$2_GetRegisteredDomainResponse = GetRegisteredDomainResponse;
1608
+ type context$2_GetRegisteredDomainResponseNonNullableFields = GetRegisteredDomainResponseNonNullableFields;
1609
+ type context$2_ICANNConfirmationStatus = ICANNConfirmationStatus;
1610
+ declare const context$2_ICANNConfirmationStatus: typeof ICANNConfirmationStatus;
1611
+ type context$2_ICANNConfirmationStatusInfo = ICANNConfirmationStatusInfo;
1612
+ type context$2_ICANNConfirmationStatusInfoStatusOneOf = ICANNConfirmationStatusInfoStatusOneOf;
1613
+ type context$2_IdentificationData = IdentificationData;
1614
+ type context$2_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1615
+ type context$2_LatestAttempt = LatestAttempt;
1616
+ type context$2_ListRegisteredDomainsOptions = ListRegisteredDomainsOptions;
1617
+ type context$2_ListRegisteredDomainsRequest = ListRegisteredDomainsRequest;
1618
+ type context$2_ListRegisteredDomainsResponse = ListRegisteredDomainsResponse;
1619
+ type context$2_ListRegisteredDomainsResponseNonNullableFields = ListRegisteredDomainsResponseNonNullableFields;
1620
+ type context$2_MessageEnvelope = MessageEnvelope;
1621
+ type context$2_Pending = Pending;
1622
+ type context$2_PendingRegistrationInfo = PendingRegistrationInfo;
1623
+ type context$2_RedeemRegisteredDomainRequest = RedeemRegisteredDomainRequest;
1624
+ type context$2_RedeemRegisteredDomainResponse = RedeemRegisteredDomainResponse;
1625
+ type context$2_RedeemRegisteredDomainResponseNonNullableFields = RedeemRegisteredDomainResponseNonNullableFields;
1626
+ type context$2_RedirectAssignmentInfo = RedirectAssignmentInfo;
1627
+ type context$2_RegisteredDomain = RegisteredDomain;
1628
+ type context$2_RegisteredDomainNonNullableFields = RegisteredDomainNonNullableFields;
1629
+ type context$2_RegisteredDomainStatusInfoOneOf = RegisteredDomainStatusInfoOneOf;
1630
+ type context$2_RestoreInfo = RestoreInfo;
1631
+ type context$2_SiteInfo = SiteInfo;
1632
+ type context$2_SiteInfoAssignmentInfoOneOf = SiteInfoAssignmentInfoOneOf;
1633
+ type context$2_Status = Status;
1634
+ declare const context$2_Status: typeof Status;
1635
+ type context$2_WebhookIdentityType = WebhookIdentityType;
1636
+ declare const context$2_WebhookIdentityType: typeof WebhookIdentityType;
97
1637
  declare const context$2_createRegisteredDomain: typeof createRegisteredDomain;
98
1638
  declare const context$2_getRegisteredDomain: typeof getRegisteredDomain;
99
1639
  declare const context$2_listRegisteredDomains: typeof listRegisteredDomains;
100
1640
  declare const context$2_redeemRegisteredDomain: typeof redeemRegisteredDomain;
101
1641
  declare namespace context$2 {
102
- export { context$2_createRegisteredDomain as createRegisteredDomain, context$2_getRegisteredDomain as getRegisteredDomain, context$2_listRegisteredDomains as listRegisteredDomains, context$2_redeemRegisteredDomain as redeemRegisteredDomain };
1642
+ export { type context$2_ActionEvent as ActionEvent, context$2_AssignmentType as AssignmentType, type context$2_ContactData as ContactData, type context$2_Contacts as Contacts, type context$2_CreateRegisteredDomainRequest as CreateRegisteredDomainRequest, type context$2_CreateRegisteredDomainResponse as CreateRegisteredDomainResponse, type context$2_CreateRegisteredDomainResponseNonNullableFields as CreateRegisteredDomainResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type Cursors$1 as Cursors, type context$2_DeleteRegisteredDomainByIdRequest as DeleteRegisteredDomainByIdRequest, type context$2_DeleteRegisteredDomainByIdResponse as DeleteRegisteredDomainByIdResponse, context$2_DnsPropagationStatus as DnsPropagationStatus, type context$2_DomainEvent as DomainEvent, type context$2_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$2_EntityCreatedEvent as EntityCreatedEvent, type context$2_EntityDeletedEvent as EntityDeletedEvent, type context$2_EntityUpdatedEvent as EntityUpdatedEvent, type context$2_Expired as Expired, type context$2_FailedRegistrationInfo as FailedRegistrationInfo, context$2_FailureCode as FailureCode, type context$2_GetRegisteredDomainRequest as GetRegisteredDomainRequest, type context$2_GetRegisteredDomainResponse as GetRegisteredDomainResponse, type context$2_GetRegisteredDomainResponseNonNullableFields as GetRegisteredDomainResponseNonNullableFields, context$2_ICANNConfirmationStatus as ICANNConfirmationStatus, type context$2_ICANNConfirmationStatusInfo as ICANNConfirmationStatusInfo, type context$2_ICANNConfirmationStatusInfoStatusOneOf as ICANNConfirmationStatusInfoStatusOneOf, type context$2_IdentificationData as IdentificationData, type context$2_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$2_LatestAttempt as LatestAttempt, type context$2_ListRegisteredDomainsOptions as ListRegisteredDomainsOptions, type context$2_ListRegisteredDomainsRequest as ListRegisteredDomainsRequest, type context$2_ListRegisteredDomainsResponse as ListRegisteredDomainsResponse, type context$2_ListRegisteredDomainsResponseNonNullableFields as ListRegisteredDomainsResponseNonNullableFields, type context$2_MessageEnvelope as MessageEnvelope, type context$2_Pending as Pending, type context$2_PendingRegistrationInfo as PendingRegistrationInfo, type context$2_RedeemRegisteredDomainRequest as RedeemRegisteredDomainRequest, type context$2_RedeemRegisteredDomainResponse as RedeemRegisteredDomainResponse, type context$2_RedeemRegisteredDomainResponseNonNullableFields as RedeemRegisteredDomainResponseNonNullableFields, type context$2_RedirectAssignmentInfo as RedirectAssignmentInfo, type context$2_RegisteredDomain as RegisteredDomain, type context$2_RegisteredDomainNonNullableFields as RegisteredDomainNonNullableFields, type context$2_RegisteredDomainStatusInfoOneOf as RegisteredDomainStatusInfoOneOf, type context$2_RestoreInfo as RestoreInfo, type context$2_SiteInfo as SiteInfo, type context$2_SiteInfoAssignmentInfoOneOf as SiteInfoAssignmentInfoOneOf, context$2_Status as Status, context$2_WebhookIdentityType as WebhookIdentityType, context$2_createRegisteredDomain as createRegisteredDomain, context$2_getRegisteredDomain as getRegisteredDomain, context$2_listRegisteredDomains as listRegisteredDomains, context$2_redeemRegisteredDomain as redeemRegisteredDomain };
1643
+ }
1644
+
1645
+ interface DomainAvailability {
1646
+ /** Domain name including TLD. For example, `my-new-domain.com`. */
1647
+ domain?: string;
1648
+ /**
1649
+ * Whether the domain is available for purchase. You can purchase the
1650
+ * domain in case the boolean is `true`. The domain is already taken
1651
+ * when `false` is returned.
1652
+ */
1653
+ available?: boolean;
1654
+ }
1655
+ interface CheckDomainAvailabilityRequest {
1656
+ /**
1657
+ * Domain name. Must include the TLD. For example, `my-new-domain.com`. Only
1658
+ * alphanumeric characters, hyphens, and dots are supported.
1659
+ *
1660
+ * Min: 3 characters
1661
+ * Max: 63 characters
1662
+ */
1663
+ domain: string;
1664
+ }
1665
+ interface CheckDomainAvailabilityResponse {
1666
+ /** Information about the domain's availability. */
1667
+ availability?: DomainAvailability;
1668
+ }
1669
+ interface DomainAvailabilityNonNullableFields {
1670
+ domain: string;
1671
+ available: boolean;
1672
+ }
1673
+ interface CheckDomainAvailabilityResponseNonNullableFields {
1674
+ availability?: DomainAvailabilityNonNullableFields;
103
1675
  }
104
1676
 
105
1677
  declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
106
1678
 
107
1679
  declare const checkDomainAvailability: ReturnType<typeof createRESTModule$1<typeof publicCheckDomainAvailability>>;
108
1680
 
1681
+ type context$1_CheckDomainAvailabilityRequest = CheckDomainAvailabilityRequest;
1682
+ type context$1_CheckDomainAvailabilityResponse = CheckDomainAvailabilityResponse;
1683
+ type context$1_CheckDomainAvailabilityResponseNonNullableFields = CheckDomainAvailabilityResponseNonNullableFields;
1684
+ type context$1_DomainAvailability = DomainAvailability;
109
1685
  declare const context$1_checkDomainAvailability: typeof checkDomainAvailability;
110
1686
  declare namespace context$1 {
111
- export { context$1_checkDomainAvailability as checkDomainAvailability };
1687
+ export { type context$1_CheckDomainAvailabilityRequest as CheckDomainAvailabilityRequest, type context$1_CheckDomainAvailabilityResponse as CheckDomainAvailabilityResponse, type context$1_CheckDomainAvailabilityResponseNonNullableFields as CheckDomainAvailabilityResponseNonNullableFields, type context$1_DomainAvailability as DomainAvailability, context$1_checkDomainAvailability as checkDomainAvailability };
1688
+ }
1689
+
1690
+ interface DomainSuggestion {
1691
+ /** Suggested domain name including TLD. */
1692
+ domain?: string;
1693
+ }
1694
+ interface SuggestDomainsRequest {
1695
+ /**
1696
+ * Input to base your domain suggestions on. May include
1697
+ * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.
1698
+ *
1699
+ * Min: 3 characters
1700
+ * Max: 100 characters
1701
+ */
1702
+ query: string;
1703
+ /**
1704
+ * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must
1705
+ * not include the dot. For example, `com`, not `.com`. Not all TLDs can be
1706
+ * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.
1707
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more
1708
+ * information.
1709
+ *
1710
+ * Max: 10 TLDs
1711
+ */
1712
+ tlds?: string[];
1713
+ /**
1714
+ * Number of domain suggestions to return.
1715
+ *
1716
+ * Min: `1`
1717
+ * Max: `20`
1718
+ * Default: `10`
1719
+ * Note: limit field is deprecated from Aug 1, 2024, use `paging.limit` instead.
1720
+ * @deprecated Number of domain suggestions to return.
1721
+ *
1722
+ * Min: `1`
1723
+ * Max: `20`
1724
+ * Default: `10`
1725
+ * Note: limit field is deprecated from Aug 1, 2024, use `paging.limit` instead.
1726
+ * @replacedBy paging.limit
1727
+ * @targetRemovalDate 2025-03-01
1728
+ */
1729
+ limit?: number | null;
1730
+ /** Cursor paging options. */
1731
+ paging?: CursorPaging;
1732
+ }
1733
+ interface CursorPaging {
1734
+ /**
1735
+ * Number of domains to load.
1736
+ *
1737
+ * Min: `0`
1738
+ * Max: `20`
1739
+ */
1740
+ limit?: number | null;
1741
+ /**
1742
+ * Pointer to the next or previous page in the list of results.
1743
+ *
1744
+ * You can get the relevant cursor token
1745
+ * from the `pagingMetadata` object in the previous call's response.
1746
+ * Not relevant for the first request.
1747
+ */
1748
+ cursor?: string | null;
1749
+ }
1750
+ interface SuggestDomainsResponse {
1751
+ /** List of suggested available domains. */
1752
+ suggestions?: DomainSuggestion[];
1753
+ /** Metadata about the returned list of suggested domains. */
1754
+ pagingMetadata?: CursorPagingMetadata;
1755
+ }
1756
+ interface CursorPagingMetadata {
1757
+ /** Number of domains returned in the response. */
1758
+ count?: number | null;
1759
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1760
+ cursors?: Cursors;
1761
+ /**
1762
+ * Indicates if there are more results after the current page.
1763
+ * If `true`, another page of results can be retrieved.
1764
+ * If `false`, this is the last page.
1765
+ */
1766
+ hasNext?: boolean | null;
1767
+ }
1768
+ interface Cursors {
1769
+ /** Cursor pointing to next page in the list of results. */
1770
+ next?: string | null;
1771
+ /** Cursor pointing to previous page in the list of results. */
1772
+ prev?: string | null;
1773
+ }
1774
+ interface DomainSuggestionNonNullableFields {
1775
+ domain: string;
1776
+ }
1777
+ interface SuggestDomainsResponseNonNullableFields {
1778
+ suggestions: DomainSuggestionNonNullableFields[];
1779
+ }
1780
+ interface SuggestDomainsOptions {
1781
+ /**
1782
+ * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must
1783
+ * not include the dot. For example, `com`, not `.com`. Not all TLDs can be
1784
+ * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.
1785
+ * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more
1786
+ * information.
1787
+ *
1788
+ * Max: 10 TLDs
1789
+ */
1790
+ tlds?: string[];
1791
+ /**
1792
+ * Number of domain suggestions to return.
1793
+ *
1794
+ * Min: `1`
1795
+ * Max: `20`
1796
+ * Default: `10`
1797
+ * Note: limit field is deprecated from Aug 1, 2024, use `paging.limit` instead.
1798
+ * @deprecated Number of domain suggestions to return.
1799
+ *
1800
+ * Min: `1`
1801
+ * Max: `20`
1802
+ * Default: `10`
1803
+ * Note: limit field is deprecated from Aug 1, 2024, use `paging.limit` instead.
1804
+ * @replacedBy paging.limit
1805
+ * @targetRemovalDate 2025-03-01
1806
+ */
1807
+ limit?: number | null;
1808
+ /** Cursor paging options. */
1809
+ paging?: CursorPaging;
112
1810
  }
113
1811
 
114
1812
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
115
1813
 
116
1814
  declare const suggestDomains: ReturnType<typeof createRESTModule<typeof publicSuggestDomains>>;
117
1815
 
1816
+ type context_CursorPaging = CursorPaging;
1817
+ type context_CursorPagingMetadata = CursorPagingMetadata;
1818
+ type context_Cursors = Cursors;
1819
+ type context_DomainSuggestion = DomainSuggestion;
1820
+ type context_SuggestDomainsOptions = SuggestDomainsOptions;
1821
+ type context_SuggestDomainsRequest = SuggestDomainsRequest;
1822
+ type context_SuggestDomainsResponse = SuggestDomainsResponse;
1823
+ type context_SuggestDomainsResponseNonNullableFields = SuggestDomainsResponseNonNullableFields;
118
1824
  declare const context_suggestDomains: typeof suggestDomains;
119
1825
  declare namespace context {
120
- export { context_suggestDomains as suggestDomains };
1826
+ export { type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_Cursors as Cursors, type context_DomainSuggestion as DomainSuggestion, type context_SuggestDomainsOptions as SuggestDomainsOptions, type context_SuggestDomainsRequest as SuggestDomainsRequest, type context_SuggestDomainsResponse as SuggestDomainsResponse, type context_SuggestDomainsResponseNonNullableFields as SuggestDomainsResponseNonNullableFields, context_suggestDomains as suggestDomains };
121
1827
  }
122
1828
 
123
1829
  export { context$4 as connectedDomainSetupInfo, context$5 as connectedDomains, context$1 as domainAvailability, context$3 as domainDns, context as domainSuggestions, context$2 as registeredDomains };