@wix/domains 1.0.3 → 1.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/domains",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,15 +18,14 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/domains_connected-domain-setup-info": "1.0.0",
22
- "@wix/domains_connected-domains": "1.0.0",
23
- "@wix/domains_domain-availability": "1.0.0",
24
- "@wix/domains_domain-dns": "1.0.0",
25
- "@wix/domains_domain-suggestions": "1.0.0",
26
- "@wix/domains_registered-domains": "1.0.0"
21
+ "@wix/domains_connected-domain-setup-info": "1.0.1",
22
+ "@wix/domains_connected-domains": "1.0.1",
23
+ "@wix/domains_domain-availability": "1.0.1",
24
+ "@wix/domains_domain-dns": "1.0.1",
25
+ "@wix/domains_domain-suggestions": "1.0.1",
26
+ "@wix/domains_registered-domains": "1.0.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
30
29
  "glob": "^10.4.1",
31
30
  "rollup": "^4.18.0",
32
31
  "rollup-plugin-dts": "^6.1.1",
@@ -48,5 +47,5 @@
48
47
  "fqdn": ""
49
48
  }
50
49
  },
51
- "falconPackageHash": "5b79477d37c741dc02407fb41f8de422f013b421dc5cf4fd5388e844"
50
+ "falconPackageHash": "8d8d10823f9a833d80724bd382a57ae7b85222ccf679a47985f4c66f"
52
51
  }
@@ -248,42 +248,50 @@ interface ListConnectedDomainsOptions {
248
248
  paging?: CursorPaging$1;
249
249
  }
250
250
 
251
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
252
- interface HttpClient {
253
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
251
+ type RESTFunctionDescriptor$5<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$5) => T;
252
+ interface HttpClient$5 {
253
+ request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
254
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
254
255
  }
255
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
256
- type HttpResponse<T = any> = {
256
+ type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
257
+ type HttpResponse$5<T = any> = {
257
258
  data: T;
258
259
  status: number;
259
260
  statusText: string;
260
261
  headers: any;
261
262
  request?: any;
262
263
  };
263
- type RequestOptions<_TResponse = any, Data = any> = {
264
+ type RequestOptions$5<_TResponse = any, Data = any> = {
264
265
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
265
266
  url: string;
266
267
  data?: Data;
267
268
  params?: URLSearchParams;
268
- } & APIMetadata;
269
- type APIMetadata = {
269
+ } & APIMetadata$5;
270
+ type APIMetadata$5 = {
270
271
  methodFqn?: string;
271
272
  entityFqdn?: string;
272
273
  packageName?: string;
273
274
  };
274
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
275
+ type BuildRESTFunction$5<T extends RESTFunctionDescriptor$5> = T extends RESTFunctionDescriptor$5<infer U> ? U : never;
275
276
  type EventDefinition<Payload = unknown, Type extends string = string> = {
276
277
  __type: 'event-definition';
277
278
  type: Type;
278
279
  isDomainEvent?: boolean;
279
- transformations?: unknown;
280
+ transformations?: (envelope: unknown) => Payload;
280
281
  __payload: Payload;
281
282
  };
282
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
283
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
283
284
  type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
284
285
  type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
285
286
 
286
- declare function createConnectedDomain$1(httpClient: HttpClient): (connectedDomain: ConnectedDomain) => Promise<ConnectedDomain & {
287
+ declare global {
288
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
289
+ interface SymbolConstructor {
290
+ readonly observable: symbol;
291
+ }
292
+ }
293
+
294
+ declare function createConnectedDomain$1(httpClient: HttpClient$5): (connectedDomain: ConnectedDomain) => Promise<ConnectedDomain & {
287
295
  _id: string;
288
296
  domain: string;
289
297
  connectionType: ConnectionType;
@@ -296,7 +304,7 @@ declare function createConnectedDomain$1(httpClient: HttpClient): (connectedDoma
296
304
  suppressNotifications: boolean;
297
305
  dnsPropagationStatus: DnsPropagationStatus$1;
298
306
  }>;
299
- declare function getConnectedDomain$1(httpClient: HttpClient): (connectedDomainId: string) => Promise<ConnectedDomain & {
307
+ declare function getConnectedDomain$1(httpClient: HttpClient$5): (connectedDomainId: string) => Promise<ConnectedDomain & {
300
308
  _id: string;
301
309
  domain: string;
302
310
  connectionType: ConnectionType;
@@ -309,12 +317,12 @@ declare function getConnectedDomain$1(httpClient: HttpClient): (connectedDomainI
309
317
  suppressNotifications: boolean;
310
318
  dnsPropagationStatus: DnsPropagationStatus$1;
311
319
  }>;
312
- declare function listConnectedDomains$1(httpClient: HttpClient): (options?: ListConnectedDomainsOptions) => Promise<ListConnectedDomainsResponse & ListConnectedDomainsResponseNonNullableFields>;
320
+ declare function listConnectedDomains$1(httpClient: HttpClient$5): (options?: ListConnectedDomainsOptions) => Promise<ListConnectedDomainsResponse & ListConnectedDomainsResponseNonNullableFields>;
313
321
  declare const onConnectedDomainRemoved$1: EventDefinition<ConnectedDomainRemovedEnvelope, "wix.premium.domains.v1.connected_domain_removed">;
314
322
 
315
- declare const createConnectedDomain: BuildRESTFunction<typeof createConnectedDomain$1>;
316
- declare const getConnectedDomain: BuildRESTFunction<typeof getConnectedDomain$1>;
317
- declare const listConnectedDomains: BuildRESTFunction<typeof listConnectedDomains$1>;
323
+ declare const createConnectedDomain: BuildRESTFunction$5<typeof createConnectedDomain$1>;
324
+ declare const getConnectedDomain: BuildRESTFunction$5<typeof getConnectedDomain$1>;
325
+ declare const listConnectedDomains: BuildRESTFunction$5<typeof listConnectedDomains$1>;
318
326
  declare const onConnectedDomainRemoved: BuildEventDefinition<typeof onConnectedDomainRemoved$1>;
319
327
 
320
328
  declare const context$5_createConnectedDomain: typeof createConnectedDomain;
@@ -484,9 +492,42 @@ interface GetConnectedDomainSetupInfoResponseNonNullableFields {
484
492
  };
485
493
  }
486
494
 
487
- declare function getConnectedDomainSetupInfo$1(httpClient: HttpClient): (connectedDomainId: string) => Promise<GetConnectedDomainSetupInfoResponse & GetConnectedDomainSetupInfoResponseNonNullableFields>;
495
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
496
+ interface HttpClient$4 {
497
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
498
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
499
+ }
500
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
501
+ type HttpResponse$4<T = any> = {
502
+ data: T;
503
+ status: number;
504
+ statusText: string;
505
+ headers: any;
506
+ request?: any;
507
+ };
508
+ type RequestOptions$4<_TResponse = any, Data = any> = {
509
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
510
+ url: string;
511
+ data?: Data;
512
+ params?: URLSearchParams;
513
+ } & APIMetadata$4;
514
+ type APIMetadata$4 = {
515
+ methodFqn?: string;
516
+ entityFqdn?: string;
517
+ packageName?: string;
518
+ };
519
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
520
+
521
+ declare global {
522
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
523
+ interface SymbolConstructor {
524
+ readonly observable: symbol;
525
+ }
526
+ }
488
527
 
489
- declare const getConnectedDomainSetupInfo: BuildRESTFunction<typeof getConnectedDomainSetupInfo$1>;
528
+ declare function getConnectedDomainSetupInfo$1(httpClient: HttpClient$4): (connectedDomainId: string) => Promise<GetConnectedDomainSetupInfoResponse & GetConnectedDomainSetupInfoResponseNonNullableFields>;
529
+
530
+ declare const getConnectedDomainSetupInfo: BuildRESTFunction$4<typeof getConnectedDomainSetupInfo$1>;
490
531
 
491
532
  declare const context$4_getConnectedDomainSetupInfo: typeof getConnectedDomainSetupInfo;
492
533
  declare namespace context$4 {
@@ -622,7 +663,40 @@ interface UpdateDnsZoneOptions {
622
663
  dnssecEnabled?: boolean | null;
623
664
  }
624
665
 
625
- declare function createDnsZone$1(httpClient: HttpClient): (dnsZone: DnsZone) => Promise<DnsZone & {
666
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
667
+ interface HttpClient$3 {
668
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
669
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
670
+ }
671
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
672
+ type HttpResponse$3<T = any> = {
673
+ data: T;
674
+ status: number;
675
+ statusText: string;
676
+ headers: any;
677
+ request?: any;
678
+ };
679
+ type RequestOptions$3<_TResponse = any, Data = any> = {
680
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
681
+ url: string;
682
+ data?: Data;
683
+ params?: URLSearchParams;
684
+ } & APIMetadata$3;
685
+ type APIMetadata$3 = {
686
+ methodFqn?: string;
687
+ entityFqdn?: string;
688
+ packageName?: string;
689
+ };
690
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
691
+
692
+ declare global {
693
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
694
+ interface SymbolConstructor {
695
+ readonly observable: symbol;
696
+ }
697
+ }
698
+
699
+ declare function createDnsZone$1(httpClient: HttpClient$3): (dnsZone: DnsZone) => Promise<DnsZone & {
626
700
  domainName: string;
627
701
  records: {
628
702
  type: RecordType;
@@ -633,7 +707,7 @@ declare function createDnsZone$1(httpClient: HttpClient): (dnsZone: DnsZone) =>
633
707
  _id: string;
634
708
  dnssecEnabled: boolean;
635
709
  }>;
636
- declare function getDnsZone$1(httpClient: HttpClient): (domainName: string) => Promise<DnsZone & {
710
+ declare function getDnsZone$1(httpClient: HttpClient$3): (domainName: string) => Promise<DnsZone & {
637
711
  domainName: string;
638
712
  records: {
639
713
  type: RecordType;
@@ -644,15 +718,15 @@ declare function getDnsZone$1(httpClient: HttpClient): (domainName: string) => P
644
718
  _id: string;
645
719
  dnssecEnabled: boolean;
646
720
  }>;
647
- declare function updateDnsZone$1(httpClient: HttpClient): (domainName: string, options?: UpdateDnsZoneOptions) => Promise<UpdateDnsZoneResponse & UpdateDnsZoneResponseNonNullableFields>;
648
- declare function deleteDnsZone$1(httpClient: HttpClient): (domainName: string) => Promise<void>;
649
- declare function previewDnsZone$1(httpClient: HttpClient): (domainName: string) => Promise<PreviewDnsZoneResponse & PreviewDnsZoneResponseNonNullableFields>;
721
+ declare function updateDnsZone$1(httpClient: HttpClient$3): (domainName: string, options?: UpdateDnsZoneOptions) => Promise<UpdateDnsZoneResponse & UpdateDnsZoneResponseNonNullableFields>;
722
+ declare function deleteDnsZone$1(httpClient: HttpClient$3): (domainName: string) => Promise<void>;
723
+ declare function previewDnsZone$1(httpClient: HttpClient$3): (domainName: string) => Promise<PreviewDnsZoneResponse & PreviewDnsZoneResponseNonNullableFields>;
650
724
 
651
- declare const createDnsZone: BuildRESTFunction<typeof createDnsZone$1>;
652
- declare const getDnsZone: BuildRESTFunction<typeof getDnsZone$1>;
653
- declare const updateDnsZone: BuildRESTFunction<typeof updateDnsZone$1>;
654
- declare const deleteDnsZone: BuildRESTFunction<typeof deleteDnsZone$1>;
655
- declare const previewDnsZone: BuildRESTFunction<typeof previewDnsZone$1>;
725
+ declare const createDnsZone: BuildRESTFunction$3<typeof createDnsZone$1>;
726
+ declare const getDnsZone: BuildRESTFunction$3<typeof getDnsZone$1>;
727
+ declare const updateDnsZone: BuildRESTFunction$3<typeof updateDnsZone$1>;
728
+ declare const deleteDnsZone: BuildRESTFunction$3<typeof deleteDnsZone$1>;
729
+ declare const previewDnsZone: BuildRESTFunction$3<typeof previewDnsZone$1>;
656
730
 
657
731
  declare const context$3_createDnsZone: typeof createDnsZone;
658
732
  declare const context$3_deleteDnsZone: typeof deleteDnsZone;
@@ -1228,7 +1302,40 @@ interface ListRegisteredDomainsOptions {
1228
1302
  paging?: CursorPaging;
1229
1303
  }
1230
1304
 
1231
- declare function createRegisteredDomain$1(httpClient: HttpClient): (registeredDomain: RegisteredDomain) => Promise<RegisteredDomain & {
1305
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
1306
+ interface HttpClient$2 {
1307
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
1308
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1309
+ }
1310
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
1311
+ type HttpResponse$2<T = any> = {
1312
+ data: T;
1313
+ status: number;
1314
+ statusText: string;
1315
+ headers: any;
1316
+ request?: any;
1317
+ };
1318
+ type RequestOptions$2<_TResponse = any, Data = any> = {
1319
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1320
+ url: string;
1321
+ data?: Data;
1322
+ params?: URLSearchParams;
1323
+ } & APIMetadata$2;
1324
+ type APIMetadata$2 = {
1325
+ methodFqn?: string;
1326
+ entityFqdn?: string;
1327
+ packageName?: string;
1328
+ };
1329
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
1330
+
1331
+ declare global {
1332
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1333
+ interface SymbolConstructor {
1334
+ readonly observable: symbol;
1335
+ }
1336
+ }
1337
+
1338
+ declare function createRegisteredDomain$1(httpClient: HttpClient$2): (registeredDomain: RegisteredDomain) => Promise<RegisteredDomain & {
1232
1339
  pendingRegistrationInfo?: {
1233
1340
  latestAttempt?: {
1234
1341
  number: number;
@@ -1288,7 +1395,7 @@ declare function createRegisteredDomain$1(httpClient: HttpClient): (registeredDo
1288
1395
  } | undefined;
1289
1396
  dnsPropagationStatus: DnsPropagationStatus;
1290
1397
  }>;
1291
- declare function getRegisteredDomain$1(httpClient: HttpClient): (registeredDomainId: string) => Promise<RegisteredDomain & {
1398
+ declare function getRegisteredDomain$1(httpClient: HttpClient$2): (registeredDomainId: string) => Promise<RegisteredDomain & {
1292
1399
  pendingRegistrationInfo?: {
1293
1400
  latestAttempt?: {
1294
1401
  number: number;
@@ -1348,13 +1455,13 @@ declare function getRegisteredDomain$1(httpClient: HttpClient): (registeredDomai
1348
1455
  } | undefined;
1349
1456
  dnsPropagationStatus: DnsPropagationStatus;
1350
1457
  }>;
1351
- declare function listRegisteredDomains$1(httpClient: HttpClient): (options?: ListRegisteredDomainsOptions) => Promise<ListRegisteredDomainsResponse & ListRegisteredDomainsResponseNonNullableFields>;
1352
- declare function redeemRegisteredDomain$1(httpClient: HttpClient): (registeredDomainId: string) => Promise<RedeemRegisteredDomainResponse & RedeemRegisteredDomainResponseNonNullableFields>;
1458
+ declare function listRegisteredDomains$1(httpClient: HttpClient$2): (options?: ListRegisteredDomainsOptions) => Promise<ListRegisteredDomainsResponse & ListRegisteredDomainsResponseNonNullableFields>;
1459
+ declare function redeemRegisteredDomain$1(httpClient: HttpClient$2): (registeredDomainId: string) => Promise<RedeemRegisteredDomainResponse & RedeemRegisteredDomainResponseNonNullableFields>;
1353
1460
 
1354
- declare const createRegisteredDomain: BuildRESTFunction<typeof createRegisteredDomain$1>;
1355
- declare const getRegisteredDomain: BuildRESTFunction<typeof getRegisteredDomain$1>;
1356
- declare const listRegisteredDomains: BuildRESTFunction<typeof listRegisteredDomains$1>;
1357
- declare const redeemRegisteredDomain: BuildRESTFunction<typeof redeemRegisteredDomain$1>;
1461
+ declare const createRegisteredDomain: BuildRESTFunction$2<typeof createRegisteredDomain$1>;
1462
+ declare const getRegisteredDomain: BuildRESTFunction$2<typeof getRegisteredDomain$1>;
1463
+ declare const listRegisteredDomains: BuildRESTFunction$2<typeof listRegisteredDomains$1>;
1464
+ declare const redeemRegisteredDomain: BuildRESTFunction$2<typeof redeemRegisteredDomain$1>;
1358
1465
 
1359
1466
  declare const context$2_createRegisteredDomain: typeof createRegisteredDomain;
1360
1467
  declare const context$2_getRegisteredDomain: typeof getRegisteredDomain;
@@ -1385,9 +1492,42 @@ interface CheckDomainAvailabilityResponseNonNullableFields {
1385
1492
  };
1386
1493
  }
1387
1494
 
1388
- declare function checkDomainAvailability$1(httpClient: HttpClient): (domain: string) => Promise<CheckDomainAvailabilityResponse & CheckDomainAvailabilityResponseNonNullableFields>;
1495
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
1496
+ interface HttpClient$1 {
1497
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1498
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1499
+ }
1500
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1501
+ type HttpResponse$1<T = any> = {
1502
+ data: T;
1503
+ status: number;
1504
+ statusText: string;
1505
+ headers: any;
1506
+ request?: any;
1507
+ };
1508
+ type RequestOptions$1<_TResponse = any, Data = any> = {
1509
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1510
+ url: string;
1511
+ data?: Data;
1512
+ params?: URLSearchParams;
1513
+ } & APIMetadata$1;
1514
+ type APIMetadata$1 = {
1515
+ methodFqn?: string;
1516
+ entityFqdn?: string;
1517
+ packageName?: string;
1518
+ };
1519
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
1520
+
1521
+ declare global {
1522
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1523
+ interface SymbolConstructor {
1524
+ readonly observable: symbol;
1525
+ }
1526
+ }
1527
+
1528
+ declare function checkDomainAvailability$1(httpClient: HttpClient$1): (domain: string) => Promise<CheckDomainAvailabilityResponse & CheckDomainAvailabilityResponseNonNullableFields>;
1389
1529
 
1390
- declare const checkDomainAvailability: BuildRESTFunction<typeof checkDomainAvailability$1>;
1530
+ declare const checkDomainAvailability: BuildRESTFunction$1<typeof checkDomainAvailability$1>;
1391
1531
 
1392
1532
  declare const context$1_checkDomainAvailability: typeof checkDomainAvailability;
1393
1533
  declare namespace context$1 {
@@ -1428,6 +1568,39 @@ interface SuggestDomainsOptions {
1428
1568
  limit?: number | null;
1429
1569
  }
1430
1570
 
1571
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
1572
+ interface HttpClient {
1573
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1574
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1575
+ }
1576
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1577
+ type HttpResponse<T = any> = {
1578
+ data: T;
1579
+ status: number;
1580
+ statusText: string;
1581
+ headers: any;
1582
+ request?: any;
1583
+ };
1584
+ type RequestOptions<_TResponse = any, Data = any> = {
1585
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1586
+ url: string;
1587
+ data?: Data;
1588
+ params?: URLSearchParams;
1589
+ } & APIMetadata;
1590
+ type APIMetadata = {
1591
+ methodFqn?: string;
1592
+ entityFqdn?: string;
1593
+ packageName?: string;
1594
+ };
1595
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
1596
+
1597
+ declare global {
1598
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1599
+ interface SymbolConstructor {
1600
+ readonly observable: symbol;
1601
+ }
1602
+ }
1603
+
1431
1604
  declare function suggestDomains$1(httpClient: HttpClient): (query: string, options?: SuggestDomainsOptions) => Promise<SuggestDomainsResponse & SuggestDomainsResponseNonNullableFields>;
1432
1605
 
1433
1606
  declare const suggestDomains: BuildRESTFunction<typeof suggestDomains$1>;
@@ -381,24 +381,25 @@ interface ListConnectedDomainsOptions {
381
381
  paging?: CursorPaging$1;
382
382
  }
383
383
 
384
- interface HttpClient {
385
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
384
+ interface HttpClient$5 {
385
+ request<TResponse, TData = any>(req: RequestOptionsFactory$5<TResponse, TData>): Promise<HttpResponse$5<TResponse>>;
386
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
386
387
  }
387
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
388
- type HttpResponse<T = any> = {
388
+ type RequestOptionsFactory$5<TResponse = any, TData = any> = (context: any) => RequestOptions$5<TResponse, TData>;
389
+ type HttpResponse$5<T = any> = {
389
390
  data: T;
390
391
  status: number;
391
392
  statusText: string;
392
393
  headers: any;
393
394
  request?: any;
394
395
  };
395
- type RequestOptions<_TResponse = any, Data = any> = {
396
+ type RequestOptions$5<_TResponse = any, Data = any> = {
396
397
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
397
398
  url: string;
398
399
  data?: Data;
399
400
  params?: URLSearchParams;
400
- } & APIMetadata;
401
- type APIMetadata = {
401
+ } & APIMetadata$5;
402
+ type APIMetadata$5 = {
402
403
  methodFqn?: string;
403
404
  entityFqdn?: string;
404
405
  packageName?: string;
@@ -407,15 +408,22 @@ type EventDefinition<Payload = unknown, Type extends string = string> = {
407
408
  __type: 'event-definition';
408
409
  type: Type;
409
410
  isDomainEvent?: boolean;
410
- transformations?: unknown;
411
+ transformations?: (envelope: unknown) => Payload;
411
412
  __payload: Payload;
412
413
  };
413
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
414
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
415
+
416
+ declare global {
417
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
418
+ interface SymbolConstructor {
419
+ readonly observable: symbol;
420
+ }
421
+ }
414
422
 
415
423
  declare const __metadata$5: {
416
424
  PACKAGE_NAME: string;
417
425
  };
418
- declare function createConnectedDomain(httpClient: HttpClient): (connectedDomain: ConnectedDomain) => Promise<ConnectedDomain & {
426
+ declare function createConnectedDomain(httpClient: HttpClient$5): (connectedDomain: ConnectedDomain) => Promise<ConnectedDomain & {
419
427
  _id: string;
420
428
  domain: string;
421
429
  connectionType: ConnectionType$1;
@@ -428,7 +436,7 @@ declare function createConnectedDomain(httpClient: HttpClient): (connectedDomain
428
436
  suppressNotifications: boolean;
429
437
  dnsPropagationStatus: DnsPropagationStatus$1;
430
438
  }>;
431
- declare function getConnectedDomain(httpClient: HttpClient): (connectedDomainId: string) => Promise<ConnectedDomain & {
439
+ declare function getConnectedDomain(httpClient: HttpClient$5): (connectedDomainId: string) => Promise<ConnectedDomain & {
432
440
  _id: string;
433
441
  domain: string;
434
442
  connectionType: ConnectionType$1;
@@ -441,7 +449,7 @@ declare function getConnectedDomain(httpClient: HttpClient): (connectedDomainId:
441
449
  suppressNotifications: boolean;
442
450
  dnsPropagationStatus: DnsPropagationStatus$1;
443
451
  }>;
444
- declare function listConnectedDomains(httpClient: HttpClient): (options?: ListConnectedDomainsOptions) => Promise<ListConnectedDomainsResponse & ListConnectedDomainsResponseNonNullableFields>;
452
+ declare function listConnectedDomains(httpClient: HttpClient$5): (options?: ListConnectedDomainsOptions) => Promise<ListConnectedDomainsResponse & ListConnectedDomainsResponseNonNullableFields>;
445
453
  declare const onConnectedDomainRemoved: EventDefinition<ConnectedDomainRemovedEnvelope, "wix.premium.domains.v1.connected_domain_removed">;
446
454
 
447
455
  type index_d$5_BaseEventMetadata = BaseEventMetadata;
@@ -684,10 +692,41 @@ interface GetConnectedDomainSetupInfoResponseNonNullableFields {
684
692
  };
685
693
  }
686
694
 
695
+ interface HttpClient$4 {
696
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
697
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
698
+ }
699
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
700
+ type HttpResponse$4<T = any> = {
701
+ data: T;
702
+ status: number;
703
+ statusText: string;
704
+ headers: any;
705
+ request?: any;
706
+ };
707
+ type RequestOptions$4<_TResponse = any, Data = any> = {
708
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
709
+ url: string;
710
+ data?: Data;
711
+ params?: URLSearchParams;
712
+ } & APIMetadata$4;
713
+ type APIMetadata$4 = {
714
+ methodFqn?: string;
715
+ entityFqdn?: string;
716
+ packageName?: string;
717
+ };
718
+
719
+ declare global {
720
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
721
+ interface SymbolConstructor {
722
+ readonly observable: symbol;
723
+ }
724
+ }
725
+
687
726
  declare const __metadata$4: {
688
727
  PACKAGE_NAME: string;
689
728
  };
690
- declare function getConnectedDomainSetupInfo(httpClient: HttpClient): (connectedDomainId: string) => Promise<GetConnectedDomainSetupInfoResponse & GetConnectedDomainSetupInfoResponseNonNullableFields>;
729
+ declare function getConnectedDomainSetupInfo(httpClient: HttpClient$4): (connectedDomainId: string) => Promise<GetConnectedDomainSetupInfoResponse & GetConnectedDomainSetupInfoResponseNonNullableFields>;
691
730
 
692
731
  type index_d$4_ARecord = ARecord;
693
732
  type index_d$4_CnameRecord = CnameRecord;
@@ -1025,10 +1064,41 @@ interface UpdateDnsZoneOptions {
1025
1064
  dnssecEnabled?: boolean | null;
1026
1065
  }
1027
1066
 
1067
+ interface HttpClient$3 {
1068
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
1069
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1070
+ }
1071
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
1072
+ type HttpResponse$3<T = any> = {
1073
+ data: T;
1074
+ status: number;
1075
+ statusText: string;
1076
+ headers: any;
1077
+ request?: any;
1078
+ };
1079
+ type RequestOptions$3<_TResponse = any, Data = any> = {
1080
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1081
+ url: string;
1082
+ data?: Data;
1083
+ params?: URLSearchParams;
1084
+ } & APIMetadata$3;
1085
+ type APIMetadata$3 = {
1086
+ methodFqn?: string;
1087
+ entityFqdn?: string;
1088
+ packageName?: string;
1089
+ };
1090
+
1091
+ declare global {
1092
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1093
+ interface SymbolConstructor {
1094
+ readonly observable: symbol;
1095
+ }
1096
+ }
1097
+
1028
1098
  declare const __metadata$3: {
1029
1099
  PACKAGE_NAME: string;
1030
1100
  };
1031
- declare function createDnsZone(httpClient: HttpClient): (dnsZone: DnsZone) => Promise<DnsZone & {
1101
+ declare function createDnsZone(httpClient: HttpClient$3): (dnsZone: DnsZone) => Promise<DnsZone & {
1032
1102
  domainName: string;
1033
1103
  records: {
1034
1104
  type: RecordType;
@@ -1039,7 +1109,7 @@ declare function createDnsZone(httpClient: HttpClient): (dnsZone: DnsZone) => Pr
1039
1109
  _id: string;
1040
1110
  dnssecEnabled: boolean;
1041
1111
  }>;
1042
- declare function getDnsZone(httpClient: HttpClient): (domainName: string) => Promise<DnsZone & {
1112
+ declare function getDnsZone(httpClient: HttpClient$3): (domainName: string) => Promise<DnsZone & {
1043
1113
  domainName: string;
1044
1114
  records: {
1045
1115
  type: RecordType;
@@ -1050,9 +1120,9 @@ declare function getDnsZone(httpClient: HttpClient): (domainName: string) => Pro
1050
1120
  _id: string;
1051
1121
  dnssecEnabled: boolean;
1052
1122
  }>;
1053
- declare function updateDnsZone(httpClient: HttpClient): (domainName: string, options?: UpdateDnsZoneOptions) => Promise<UpdateDnsZoneResponse & UpdateDnsZoneResponseNonNullableFields>;
1054
- declare function deleteDnsZone(httpClient: HttpClient): (domainName: string) => Promise<void>;
1055
- declare function previewDnsZone(httpClient: HttpClient): (domainName: string) => Promise<PreviewDnsZoneResponse & PreviewDnsZoneResponseNonNullableFields>;
1123
+ declare function updateDnsZone(httpClient: HttpClient$3): (domainName: string, options?: UpdateDnsZoneOptions) => Promise<UpdateDnsZoneResponse & UpdateDnsZoneResponseNonNullableFields>;
1124
+ declare function deleteDnsZone(httpClient: HttpClient$3): (domainName: string) => Promise<void>;
1125
+ declare function previewDnsZone(httpClient: HttpClient$3): (domainName: string) => Promise<PreviewDnsZoneResponse & PreviewDnsZoneResponseNonNullableFields>;
1056
1126
 
1057
1127
  type index_d$3_CreateDnsZoneRequest = CreateDnsZoneRequest;
1058
1128
  type index_d$3_CreateDnsZoneResponse = CreateDnsZoneResponse;
@@ -1912,10 +1982,41 @@ interface ListRegisteredDomainsOptions {
1912
1982
  paging?: CursorPaging;
1913
1983
  }
1914
1984
 
1985
+ interface HttpClient$2 {
1986
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
1987
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1988
+ }
1989
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
1990
+ type HttpResponse$2<T = any> = {
1991
+ data: T;
1992
+ status: number;
1993
+ statusText: string;
1994
+ headers: any;
1995
+ request?: any;
1996
+ };
1997
+ type RequestOptions$2<_TResponse = any, Data = any> = {
1998
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1999
+ url: string;
2000
+ data?: Data;
2001
+ params?: URLSearchParams;
2002
+ } & APIMetadata$2;
2003
+ type APIMetadata$2 = {
2004
+ methodFqn?: string;
2005
+ entityFqdn?: string;
2006
+ packageName?: string;
2007
+ };
2008
+
2009
+ declare global {
2010
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2011
+ interface SymbolConstructor {
2012
+ readonly observable: symbol;
2013
+ }
2014
+ }
2015
+
1915
2016
  declare const __metadata$2: {
1916
2017
  PACKAGE_NAME: string;
1917
2018
  };
1918
- declare function createRegisteredDomain(httpClient: HttpClient): (registeredDomain: RegisteredDomain) => Promise<RegisteredDomain & {
2019
+ declare function createRegisteredDomain(httpClient: HttpClient$2): (registeredDomain: RegisteredDomain) => Promise<RegisteredDomain & {
1919
2020
  pendingRegistrationInfo?: {
1920
2021
  latestAttempt?: {
1921
2022
  number: number;
@@ -1975,7 +2076,7 @@ declare function createRegisteredDomain(httpClient: HttpClient): (registeredDoma
1975
2076
  } | undefined;
1976
2077
  dnsPropagationStatus: DnsPropagationStatus;
1977
2078
  }>;
1978
- declare function getRegisteredDomain(httpClient: HttpClient): (registeredDomainId: string) => Promise<RegisteredDomain & {
2079
+ declare function getRegisteredDomain(httpClient: HttpClient$2): (registeredDomainId: string) => Promise<RegisteredDomain & {
1979
2080
  pendingRegistrationInfo?: {
1980
2081
  latestAttempt?: {
1981
2082
  number: number;
@@ -2035,8 +2136,8 @@ declare function getRegisteredDomain(httpClient: HttpClient): (registeredDomainI
2035
2136
  } | undefined;
2036
2137
  dnsPropagationStatus: DnsPropagationStatus;
2037
2138
  }>;
2038
- declare function listRegisteredDomains(httpClient: HttpClient): (options?: ListRegisteredDomainsOptions) => Promise<ListRegisteredDomainsResponse & ListRegisteredDomainsResponseNonNullableFields>;
2039
- declare function redeemRegisteredDomain(httpClient: HttpClient): (registeredDomainId: string) => Promise<RedeemRegisteredDomainResponse & RedeemRegisteredDomainResponseNonNullableFields>;
2139
+ declare function listRegisteredDomains(httpClient: HttpClient$2): (options?: ListRegisteredDomainsOptions) => Promise<ListRegisteredDomainsResponse & ListRegisteredDomainsResponseNonNullableFields>;
2140
+ declare function redeemRegisteredDomain(httpClient: HttpClient$2): (registeredDomainId: string) => Promise<RedeemRegisteredDomainResponse & RedeemRegisteredDomainResponseNonNullableFields>;
2040
2141
 
2041
2142
  type index_d$2_ActionEvent = ActionEvent;
2042
2143
  type index_d$2_AssignmentType = AssignmentType;
@@ -2130,10 +2231,41 @@ interface CheckDomainAvailabilityResponseNonNullableFields {
2130
2231
  };
2131
2232
  }
2132
2233
 
2234
+ interface HttpClient$1 {
2235
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
2236
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2237
+ }
2238
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
2239
+ type HttpResponse$1<T = any> = {
2240
+ data: T;
2241
+ status: number;
2242
+ statusText: string;
2243
+ headers: any;
2244
+ request?: any;
2245
+ };
2246
+ type RequestOptions$1<_TResponse = any, Data = any> = {
2247
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2248
+ url: string;
2249
+ data?: Data;
2250
+ params?: URLSearchParams;
2251
+ } & APIMetadata$1;
2252
+ type APIMetadata$1 = {
2253
+ methodFqn?: string;
2254
+ entityFqdn?: string;
2255
+ packageName?: string;
2256
+ };
2257
+
2258
+ declare global {
2259
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2260
+ interface SymbolConstructor {
2261
+ readonly observable: symbol;
2262
+ }
2263
+ }
2264
+
2133
2265
  declare const __metadata$1: {
2134
2266
  PACKAGE_NAME: string;
2135
2267
  };
2136
- declare function checkDomainAvailability(httpClient: HttpClient): (domain: string) => Promise<CheckDomainAvailabilityResponse & CheckDomainAvailabilityResponseNonNullableFields>;
2268
+ declare function checkDomainAvailability(httpClient: HttpClient$1): (domain: string) => Promise<CheckDomainAvailabilityResponse & CheckDomainAvailabilityResponseNonNullableFields>;
2137
2269
 
2138
2270
  type index_d$1_CheckDomainAvailabilityRequest = CheckDomainAvailabilityRequest;
2139
2271
  type index_d$1_CheckDomainAvailabilityResponse = CheckDomainAvailabilityResponse;
@@ -2206,6 +2338,37 @@ interface SuggestDomainsOptions {
2206
2338
  limit?: number | null;
2207
2339
  }
2208
2340
 
2341
+ interface HttpClient {
2342
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
2343
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2344
+ }
2345
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
2346
+ type HttpResponse<T = any> = {
2347
+ data: T;
2348
+ status: number;
2349
+ statusText: string;
2350
+ headers: any;
2351
+ request?: any;
2352
+ };
2353
+ type RequestOptions<_TResponse = any, Data = any> = {
2354
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2355
+ url: string;
2356
+ data?: Data;
2357
+ params?: URLSearchParams;
2358
+ } & APIMetadata;
2359
+ type APIMetadata = {
2360
+ methodFqn?: string;
2361
+ entityFqdn?: string;
2362
+ packageName?: string;
2363
+ };
2364
+
2365
+ declare global {
2366
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2367
+ interface SymbolConstructor {
2368
+ readonly observable: symbol;
2369
+ }
2370
+ }
2371
+
2209
2372
  declare const __metadata: {
2210
2373
  PACKAGE_NAME: string;
2211
2374
  };