@scaleway/sdk-domain 2.2.0 → 2.2.2

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.
@@ -18,10 +18,7 @@ class API extends API$1 {
18
18
  ["order_by", request.orderBy],
19
19
  ["organization_id", request.organizationId],
20
20
  ["page", request.page],
21
- [
22
- "page_size",
23
- request.pageSize ?? this.client.settings.defaultPageSize
24
- ],
21
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
25
22
  ["project_id", request.projectId],
26
23
  ["updated_after", request.updatedAfter],
27
24
  ["updated_before", request.updatedBefore]
@@ -97,10 +94,9 @@ class API extends API$1 {
97
94
  {
98
95
  method: "DELETE",
99
96
  path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}`,
100
- urlParams: urlParams([
101
- "project_id",
102
- request.projectId ?? this.client.settings.defaultProjectId
103
- ])
97
+ urlParams: urlParams(
98
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
99
+ )
104
100
  },
105
101
  unmarshalDeleteDNSZoneResponse
106
102
  );
@@ -113,10 +109,7 @@ class API extends API$1 {
113
109
  ["name", request.name],
114
110
  ["order_by", request.orderBy],
115
111
  ["page", request.page],
116
- [
117
- "page_size",
118
- request.pageSize ?? this.client.settings.defaultPageSize
119
- ],
112
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
120
113
  ["project_id", request.projectId],
121
114
  ["type", request.type]
122
115
  )
@@ -166,7 +159,9 @@ class API extends API$1 {
166
159
  {
167
160
  method: "GET",
168
161
  path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/nameservers`,
169
- urlParams: urlParams(["project_id", request.projectId])
162
+ urlParams: urlParams(
163
+ ["project_id", request.projectId]
164
+ )
170
165
  },
171
166
  unmarshalListDNSZoneNameserversResponse
172
167
  );
@@ -207,12 +202,17 @@ class API extends API$1 {
207
202
  * @param request - The request {@link ExportRawDNSZoneRequest}
208
203
  * @returns A Promise of Blob
209
204
  */
210
- exportRawDNSZone = (request) => this.client.fetch({
211
- method: "GET",
212
- path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`,
213
- urlParams: urlParams(["dl", 1], ["format", request.format]),
214
- responseType: "blob"
215
- });
205
+ exportRawDNSZone = (request) => this.client.fetch(
206
+ {
207
+ method: "GET",
208
+ path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`,
209
+ urlParams: urlParams(
210
+ ["dl", 1],
211
+ ["format", request.format]
212
+ ),
213
+ responseType: "blob"
214
+ }
215
+ );
216
216
  /**
217
217
  * Import a raw DNS zone. Import and replace the format of records from a given provider, with default name servers.
218
218
  *
@@ -271,10 +271,7 @@ class API extends API$1 {
271
271
  path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/versions`,
272
272
  urlParams: urlParams(
273
273
  ["page", request.page],
274
- [
275
- "page_size",
276
- request.pageSize ?? this.client.settings.defaultPageSize
277
- ]
274
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
278
275
  )
279
276
  },
280
277
  unmarshalListDNSZoneVersionsResponse
@@ -293,10 +290,7 @@ class API extends API$1 {
293
290
  path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}`,
294
291
  urlParams: urlParams(
295
292
  ["page", request.page],
296
- [
297
- "page_size",
298
- request.pageSize ?? this.client.settings.defaultPageSize
299
- ]
293
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
300
294
  )
301
295
  },
302
296
  unmarshalListDNSZoneVersionRecordsResponse
@@ -307,11 +301,7 @@ class API extends API$1 {
307
301
  * @param request - The request {@link ListDNSZoneVersionRecordsRequest}
308
302
  * @returns A Promise of ListDNSZoneVersionRecordsResponse
309
303
  */
310
- listDNSZoneVersionRecords = (request) => enrichForPagination(
311
- "records",
312
- this.pageOfListDNSZoneVersionRecords,
313
- request
314
- );
304
+ listDNSZoneVersionRecords = (request) => enrichForPagination("records", this.pageOfListDNSZoneVersionRecords, request);
315
305
  /**
316
306
  * Access differences from a specific DNS zone version. Access a previous DNS zone version to see the differences from another specific version.
317
307
  *
@@ -361,9 +351,7 @@ class API extends API$1 {
361
351
  * @returns A Promise of SSLCertificate
362
352
  */
363
353
  waitForSSLCertificate = (request, options) => waitForResource(
364
- options?.stop ?? ((res) => Promise.resolve(
365
- !SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status)
366
- )),
354
+ options?.stop ?? ((res) => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))),
367
355
  this.getSSLCertificate,
368
356
  request,
369
357
  options
@@ -392,10 +380,7 @@ class API extends API$1 {
392
380
  urlParams: urlParams(
393
381
  ["dns_zone", request.dnsZone],
394
382
  ["page", request.page],
395
- [
396
- "page_size",
397
- request.pageSize ?? this.client.settings.defaultPageSize
398
- ],
383
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
399
384
  ["project_id", request.projectId]
400
385
  )
401
386
  },
@@ -439,10 +424,12 @@ class API extends API$1 {
439
424
  *
440
425
  * @param request - The request {@link DeleteDNSZoneTsigKeyRequest}
441
426
  */
442
- deleteDNSZoneTsigKey = (request) => this.client.fetch({
443
- method: "DELETE",
444
- path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
445
- });
427
+ deleteDNSZoneTsigKey = (request) => this.client.fetch(
428
+ {
429
+ method: "DELETE",
430
+ path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
431
+ }
432
+ );
446
433
  }
447
434
  class RegistrarAPI extends API$1 {
448
435
  pageOfListTasks = (request = {}) => this.client.fetch(
@@ -454,10 +441,7 @@ class RegistrarAPI extends API$1 {
454
441
  ["order_by", request.orderBy],
455
442
  ["organization_id", request.organizationId],
456
443
  ["page", request.page],
457
- [
458
- "page_size",
459
- request.pageSize ?? this.client.settings.defaultPageSize
460
- ],
444
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
461
445
  ["project_id", request.projectId],
462
446
  ["statuses", request.statuses],
463
447
  ["types", request.types]
@@ -479,19 +463,10 @@ class RegistrarAPI extends API$1 {
479
463
  path: `/domain/v2beta1/inbound-transfers`,
480
464
  urlParams: urlParams(
481
465
  ["domain", request.domain],
482
- [
483
- "organization_id",
484
- request.organizationId ?? this.client.settings.defaultOrganizationId
485
- ],
466
+ ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId],
486
467
  ["page", request.page],
487
- [
488
- "page_size",
489
- request.pageSize ?? this.client.settings.defaultPageSize
490
- ],
491
- [
492
- "project_id",
493
- request.projectId ?? this.client.settings.defaultProjectId
494
- ]
468
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
469
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
495
470
  )
496
471
  },
497
472
  unmarshalListInboundTransfersResponse
@@ -503,11 +478,7 @@ class RegistrarAPI extends API$1 {
503
478
  * @param request - The request {@link RegistrarApiListInboundTransfersRequest}
504
479
  * @returns A Promise of ListInboundTransfersResponse
505
480
  */
506
- listInboundTransfers = (request) => enrichForPagination(
507
- "inboundTransfers",
508
- this.pageOfListInboundTransfers,
509
- request
510
- );
481
+ listInboundTransfers = (request) => enrichForPagination("inboundTransfers", this.pageOfListInboundTransfers, request);
511
482
  /**
512
483
  * Retry the inbound transfer of a domain. Request a retry for the transfer of a domain from another registrar to Scaleway Domains and DNS.
513
484
  *
@@ -517,10 +488,7 @@ class RegistrarAPI extends API$1 {
517
488
  retryInboundTransfer = (request) => this.client.fetch(
518
489
  {
519
490
  body: JSON.stringify(
520
- marshalRegistrarApiRetryInboundTransferRequest(
521
- request,
522
- this.client.settings
523
- )
491
+ marshalRegistrarApiRetryInboundTransferRequest(request, this.client.settings)
524
492
  ),
525
493
  headers: jsonContentHeaders,
526
494
  method: "POST",
@@ -572,10 +540,7 @@ class RegistrarAPI extends API$1 {
572
540
  transferInDomain = (request) => this.client.fetch(
573
541
  {
574
542
  body: JSON.stringify(
575
- marshalRegistrarApiTransferInDomainRequest(
576
- request,
577
- this.client.settings
578
- )
543
+ marshalRegistrarApiTransferInDomainRequest(request, this.client.settings)
579
544
  ),
580
545
  headers: jsonContentHeaders,
581
546
  method: "POST",
@@ -612,10 +577,7 @@ class RegistrarAPI extends API$1 {
612
577
  registerExternalDomain = (request) => this.client.fetch(
613
578
  {
614
579
  body: JSON.stringify(
615
- marshalRegistrarApiRegisterExternalDomainRequest(
616
- request,
617
- this.client.settings
618
- )
580
+ marshalRegistrarApiRegisterExternalDomainRequest(request, this.client.settings)
619
581
  ),
620
582
  headers: jsonContentHeaders,
621
583
  method: "POST",
@@ -646,10 +608,7 @@ class RegistrarAPI extends API$1 {
646
608
  checkContactsCompatibility = (request = {}) => this.client.fetch(
647
609
  {
648
610
  body: JSON.stringify(
649
- marshalRegistrarApiCheckContactsCompatibilityRequest(
650
- request,
651
- this.client.settings
652
- )
611
+ marshalRegistrarApiCheckContactsCompatibilityRequest(request, this.client.settings)
653
612
  ),
654
613
  headers: jsonContentHeaders,
655
614
  method: "POST",
@@ -666,10 +625,7 @@ class RegistrarAPI extends API$1 {
666
625
  ["email_status", request.emailStatus],
667
626
  ["organization_id", request.organizationId],
668
627
  ["page", request.page],
669
- [
670
- "page_size",
671
- request.pageSize ?? this.client.settings.defaultPageSize
672
- ],
628
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
673
629
  ["project_id", request.projectId],
674
630
  ["role", request.role]
675
631
  )
@@ -706,10 +662,7 @@ class RegistrarAPI extends API$1 {
706
662
  updateContact = (request) => this.client.fetch(
707
663
  {
708
664
  body: JSON.stringify(
709
- marshalRegistrarApiUpdateContactRequest(
710
- request,
711
- this.client.settings
712
- )
665
+ marshalRegistrarApiUpdateContactRequest(request, this.client.settings)
713
666
  ),
714
667
  headers: jsonContentHeaders,
715
668
  method: "PATCH",
@@ -727,10 +680,7 @@ class RegistrarAPI extends API$1 {
727
680
  ["order_by", request.orderBy],
728
681
  ["organization_id", request.organizationId],
729
682
  ["page", request.page],
730
- [
731
- "page_size",
732
- request.pageSize ?? this.client.settings.defaultPageSize
733
- ],
683
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
734
684
  ["project_id", request.projectId],
735
685
  ["registrar", request.registrar],
736
686
  ["status", request.status]
@@ -753,10 +703,7 @@ class RegistrarAPI extends API$1 {
753
703
  ["order_by", request.orderBy],
754
704
  ["organization_id", request.organizationId],
755
705
  ["page", request.page],
756
- [
757
- "page_size",
758
- request.pageSize ?? this.client.settings.defaultPageSize
759
- ],
706
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
760
707
  ["project_id", request.projectId]
761
708
  )
762
709
  },
@@ -790,9 +737,7 @@ class RegistrarAPI extends API$1 {
790
737
  * @returns A Promise of Domain
791
738
  */
792
739
  waitForDomain = (request, options) => waitForResource(
793
- options?.stop ?? ((res) => Promise.resolve(
794
- !DOMAIN_TRANSIENT_STATUSES.includes(res.status)
795
- )),
740
+ options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))),
796
741
  this.getDomain,
797
742
  request,
798
743
  options
@@ -898,10 +843,7 @@ class RegistrarAPI extends API$1 {
898
843
  enableDomainDNSSEC = (request) => this.client.fetch(
899
844
  {
900
845
  body: JSON.stringify(
901
- marshalRegistrarApiEnableDomainDNSSECRequest(
902
- request,
903
- this.client.settings
904
- )
846
+ marshalRegistrarApiEnableDomainDNSSECRequest(request, this.client.settings)
905
847
  ),
906
848
  headers: jsonContentHeaders,
907
849
  method: "POST",
@@ -951,10 +893,7 @@ class RegistrarAPI extends API$1 {
951
893
  urlParams: urlParams(
952
894
  ["order_by", request.orderBy],
953
895
  ["page", request.page],
954
- [
955
- "page_size",
956
- request.pageSize ?? this.client.settings.defaultPageSize
957
- ],
896
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
958
897
  ["tlds", request.tlds]
959
898
  )
960
899
  },
@@ -976,10 +915,7 @@ class RegistrarAPI extends API$1 {
976
915
  createDomainHost = (request) => this.client.fetch(
977
916
  {
978
917
  body: JSON.stringify(
979
- marshalRegistrarApiCreateDomainHostRequest(
980
- request,
981
- this.client.settings
982
- )
918
+ marshalRegistrarApiCreateDomainHostRequest(request, this.client.settings)
983
919
  ),
984
920
  headers: jsonContentHeaders,
985
921
  method: "POST",
@@ -993,10 +929,7 @@ class RegistrarAPI extends API$1 {
993
929
  path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts`,
994
930
  urlParams: urlParams(
995
931
  ["page", request.page],
996
- [
997
- "page_size",
998
- request.pageSize ?? this.client.settings.defaultPageSize
999
- ]
932
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
1000
933
  )
1001
934
  },
1002
935
  unmarshalListDomainHostsResponse
@@ -1017,10 +950,7 @@ class RegistrarAPI extends API$1 {
1017
950
  updateDomainHost = (request) => this.client.fetch(
1018
951
  {
1019
952
  body: JSON.stringify(
1020
- marshalRegistrarApiUpdateDomainHostRequest(
1021
- request,
1022
- this.client.settings
1023
- )
953
+ marshalRegistrarApiUpdateDomainHostRequest(request, this.client.settings)
1024
954
  ),
1025
955
  headers: jsonContentHeaders,
1026
956
  method: "PATCH",
@@ -1,9 +1,14 @@
1
- const DNS_ZONE_TRANSIENT_STATUSES = ["pending"];
1
+ const DNS_ZONE_TRANSIENT_STATUSES = [
2
+ "pending"
3
+ ];
2
4
  const DOMAIN_FEATURE_TRANSIENT_STATUSES = [
3
5
  "enabling",
4
6
  "disabling"
5
7
  ];
6
- const DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES = ["pending", "processing"];
8
+ const DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES = [
9
+ "pending",
10
+ "processing"
11
+ ];
7
12
  const DOMAIN_TRANSIENT_STATUSES = [
8
13
  "creating",
9
14
  "renewing",
@@ -13,11 +18,16 @@ const DOMAIN_TRANSIENT_STATUSES = [
13
18
  "checking",
14
19
  "deleting"
15
20
  ];
16
- const HOST_TRANSIENT_STATUSES = ["updating", "deleting"];
21
+ const HOST_TRANSIENT_STATUSES = [
22
+ "updating",
23
+ "deleting"
24
+ ];
17
25
  const SSL_CERTIFICATE_TRANSIENT_STATUSES = [
18
26
  "pending"
19
27
  ];
20
- const TASK_TRANSIENT_STATUSES = ["pending"];
28
+ const TASK_TRANSIENT_STATUSES = [
29
+ "pending"
30
+ ];
21
31
  export {
22
32
  DNS_ZONE_TRANSIENT_STATUSES,
23
33
  DOMAIN_FEATURE_TRANSIENT_STATUSES,
@@ -212,16 +212,10 @@ const unmarshalCheckContactsCompatibilityResponse = (data) => {
212
212
  );
213
213
  }
214
214
  return {
215
- administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(
216
- data.administrative_check_result
217
- ) : void 0,
215
+ administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : void 0,
218
216
  compatible: data.compatible,
219
- ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(
220
- data.owner_check_result
221
- ) : void 0,
222
- technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(
223
- data.technical_check_result
224
- ) : void 0
217
+ ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : void 0,
218
+ technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : void 0
225
219
  };
226
220
  };
227
221
  const unmarshalClearDNSZoneRecordsResponse = (data) => {
@@ -366,9 +360,7 @@ const unmarshalDomain = (data) => {
366
360
  domain: data.domain,
367
361
  eppCode: data.epp_code,
368
362
  expiredAt: unmarshalDate(data.expired_at),
369
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(
370
- data.external_domain_registration_status
371
- ) : void 0,
363
+ externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
372
364
  isExternal: data.is_external,
373
365
  linkedProducts: data.linked_products,
374
366
  organizationId: data.organization_id,
@@ -379,9 +371,7 @@ const unmarshalDomain = (data) => {
379
371
  status: data.status,
380
372
  technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : void 0,
381
373
  tld: data.tld ? unmarshalTld(data.tld) : void 0,
382
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(
383
- data.transfer_registration_status
384
- ) : void 0,
374
+ transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
385
375
  updatedAt: unmarshalDate(data.updated_at)
386
376
  };
387
377
  };
@@ -439,10 +429,7 @@ const unmarshalDomainRecordGeoIPConfig = (data) => {
439
429
  }
440
430
  return {
441
431
  default: data.default,
442
- matches: unmarshalArrayOfObject(
443
- data.matches,
444
- unmarshalDomainRecordGeoIPConfigMatch
445
- )
432
+ matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
446
433
  };
447
434
  };
448
435
  const unmarshalDomainRecordHTTPServiceConfig = (data) => {
@@ -466,10 +453,7 @@ const unmarshalDomainRecordViewConfig = (data) => {
466
453
  );
467
454
  }
468
455
  return {
469
- views: unmarshalArrayOfObject(
470
- data.views,
471
- unmarshalDomainRecordViewConfigView
472
- )
456
+ views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
473
457
  };
474
458
  };
475
459
  const unmarshalDomainRecordWeightedConfig = (data) => {
@@ -479,10 +463,7 @@ const unmarshalDomainRecordWeightedConfig = (data) => {
479
463
  );
480
464
  }
481
465
  return {
482
- weightedIps: unmarshalArrayOfObject(
483
- data.weighted_ips,
484
- unmarshalDomainRecordWeightedConfigWeightedIP
485
- )
466
+ weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
486
467
  };
487
468
  };
488
469
  const unmarshalDomainRecord = (data) => {
@@ -746,18 +727,14 @@ const unmarshalDomainSummary = (data) => {
746
727
  domain: data.domain,
747
728
  eppCode: data.epp_code,
748
729
  expiredAt: unmarshalDate(data.expired_at),
749
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(
750
- data.external_domain_registration_status
751
- ) : void 0,
730
+ externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
752
731
  isExternal: data.is_external,
753
732
  organizationId: data.organization_id,
754
733
  pendingTrade: data.pending_trade,
755
734
  projectId: data.project_id,
756
735
  registrar: data.registrar,
757
736
  status: data.status,
758
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(
759
- data.transfer_registration_status
760
- ) : void 0,
737
+ transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
761
738
  updatedAt: unmarshalDate(data.updated_at)
762
739
  };
763
740
  };
@@ -796,10 +773,7 @@ const unmarshalListInboundTransfersResponse = (data) => {
796
773
  );
797
774
  }
798
775
  return {
799
- inboundTransfers: unmarshalArrayOfObject(
800
- data.inbound_transfers,
801
- unmarshalInboundTransfer
802
- ),
776
+ inboundTransfers: unmarshalArrayOfObject(data.inbound_transfers, unmarshalInboundTransfer),
803
777
  totalCount: data.total_count
804
778
  };
805
779
  };
@@ -840,10 +814,7 @@ const unmarshalListSSLCertificatesResponse = (data) => {
840
814
  );
841
815
  }
842
816
  return {
843
- certificates: unmarshalArrayOfObject(
844
- data.certificates,
845
- unmarshalSSLCertificate
846
- ),
817
+ certificates: unmarshalArrayOfObject(data.certificates, unmarshalSSLCertificate),
847
818
  totalCount: data.total_count
848
819
  };
849
820
  };
@@ -961,10 +932,7 @@ const unmarshalSearchAvailableDomainsConsoleResponse = (data) => {
961
932
  );
962
933
  }
963
934
  return {
964
- availableDomains: unmarshalArrayOfObject(
965
- data.available_domains,
966
- unmarshalAvailableDomain
967
- ),
935
+ availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain),
968
936
  exactMatchDomain: data.exact_match_domain ? unmarshalAvailableDomain(data.exact_match_domain) : void 0
969
937
  };
970
938
  };
@@ -975,10 +943,7 @@ const unmarshalSearchAvailableDomainsResponse = (data) => {
975
943
  );
976
944
  }
977
945
  return {
978
- availableDomains: unmarshalArrayOfObject(
979
- data.available_domains,
980
- unmarshalAvailableDomain
981
- )
946
+ availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain)
982
947
  };
983
948
  };
984
949
  const unmarshalUpdateDNSZoneNameserversResponse = (data) => {
@@ -1022,9 +987,7 @@ const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
1022
987
  ...resolveOneOf([
1023
988
  {
1024
989
  param: "online_v1",
1025
- value: request.onlineV1 !== void 0 ? marshalImportProviderDNSZoneRequestOnlineV1(
1026
- request.onlineV1
1027
- ) : void 0
990
+ value: request.onlineV1 !== void 0 ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1) : void 0
1028
991
  }
1029
992
  ])
1030
993
  });
@@ -1047,15 +1010,11 @@ const marshalImportRawDNSZoneRequest = (request, defaults) => ({
1047
1010
  ...resolveOneOf([
1048
1011
  {
1049
1012
  param: "bind_source",
1050
- value: request.bindSource !== void 0 ? marshalImportRawDNSZoneRequestBindSource(
1051
- request.bindSource
1052
- ) : void 0
1013
+ value: request.bindSource !== void 0 ? marshalImportRawDNSZoneRequestBindSource(request.bindSource) : void 0
1053
1014
  },
1054
1015
  {
1055
1016
  param: "axfr_source",
1056
- value: request.axfrSource !== void 0 ? marshalImportRawDNSZoneRequestAXFRSource(
1057
- request.axfrSource
1058
- ) : void 0
1017
+ value: request.axfrSource !== void 0 ? marshalImportRawDNSZoneRequestAXFRSource(request.axfrSource) : void 0
1059
1018
  }
1060
1019
  ])
1061
1020
  });
@@ -1088,9 +1047,7 @@ const marshalContactExtensionFR = (request, defaults) => ({
1088
1047
  ...resolveOneOf([
1089
1048
  {
1090
1049
  param: "individual_info",
1091
- value: request.individualInfo !== void 0 ? marshalContactExtensionFRIndividualInfo(
1092
- request.individualInfo
1093
- ) : void 0
1050
+ value: request.individualInfo !== void 0 ? marshalContactExtensionFRIndividualInfo(request.individualInfo) : void 0
1094
1051
  },
1095
1052
  {
1096
1053
  param: "duns_info",
@@ -1098,21 +1055,15 @@ const marshalContactExtensionFR = (request, defaults) => ({
1098
1055
  },
1099
1056
  {
1100
1057
  param: "association_info",
1101
- value: request.associationInfo !== void 0 ? marshalContactExtensionFRAssociationInfo(
1102
- request.associationInfo
1103
- ) : void 0
1058
+ value: request.associationInfo !== void 0 ? marshalContactExtensionFRAssociationInfo(request.associationInfo) : void 0
1104
1059
  },
1105
1060
  {
1106
1061
  param: "trademark_info",
1107
- value: request.trademarkInfo !== void 0 ? marshalContactExtensionFRTrademarkInfo(
1108
- request.trademarkInfo
1109
- ) : void 0
1062
+ value: request.trademarkInfo !== void 0 ? marshalContactExtensionFRTrademarkInfo(request.trademarkInfo) : void 0
1110
1063
  },
1111
1064
  {
1112
1065
  param: "code_auth_afnic_info",
1113
- value: request.codeAuthAfnicInfo !== void 0 ? marshalContactExtensionFRCodeAuthAfnicInfo(
1114
- request.codeAuthAfnicInfo
1115
- ) : void 0
1066
+ value: request.codeAuthAfnicInfo !== void 0 ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo) : void 0
1116
1067
  }
1117
1068
  ])
1118
1069
  });
@@ -1160,7 +1111,10 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1160
1111
  duration_in_years: request.durationInYears,
1161
1112
  project_id: request.projectId ?? defaults.defaultProjectId,
1162
1113
  ...resolveOneOf([
1163
- { param: "owner_contact_id", value: request.ownerContactId },
1114
+ {
1115
+ param: "owner_contact_id",
1116
+ value: request.ownerContactId
1117
+ },
1164
1118
  {
1165
1119
  param: "owner_contact",
1166
1120
  value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
@@ -1177,7 +1131,10 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1177
1131
  }
1178
1132
  ]),
1179
1133
  ...resolveOneOf([
1180
- { param: "technical_contact_id", value: request.technicalContactId },
1134
+ {
1135
+ param: "technical_contact_id",
1136
+ value: request.technicalContactId
1137
+ },
1181
1138
  {
1182
1139
  param: "technical_contact",
1183
1140
  value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
@@ -1188,7 +1145,10 @@ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults)
1188
1145
  domains: request.domains,
1189
1146
  tlds: request.tlds,
1190
1147
  ...resolveOneOf([
1191
- { param: "owner_contact_id", value: request.ownerContactId },
1148
+ {
1149
+ param: "owner_contact_id",
1150
+ value: request.ownerContactId
1151
+ },
1192
1152
  {
1193
1153
  param: "owner_contact",
1194
1154
  value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
@@ -1205,7 +1165,10 @@ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults)
1205
1165
  }
1206
1166
  ]),
1207
1167
  ...resolveOneOf([
1208
- { param: "technical_contact_id", value: request.technicalContactId },
1168
+ {
1169
+ param: "technical_contact_id",
1170
+ value: request.technicalContactId
1171
+ },
1209
1172
  {
1210
1173
  param: "technical_contact",
1211
1174
  value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
@@ -1258,7 +1221,10 @@ const marshalRegistrarApiRetryInboundTransferRequest = (request, defaults) => ({
1258
1221
  const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
1259
1222
  project_id: request.projectId ?? defaults.defaultProjectId,
1260
1223
  ...resolveOneOf([
1261
- { param: "new_owner_contact_id", value: request.newOwnerContactId },
1224
+ {
1225
+ param: "new_owner_contact_id",
1226
+ value: request.newOwnerContactId
1227
+ },
1262
1228
  {
1263
1229
  param: "new_owner_contact",
1264
1230
  value: request.newOwnerContact !== void 0 ? marshalNewContact(request.newOwnerContact) : void 0
@@ -1270,12 +1236,13 @@ const marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
1270
1236
  domain: request.domain
1271
1237
  });
1272
1238
  const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
1273
- domains: request.domains.map(
1274
- (elt) => marshalTransferInDomainRequestTransferRequest(elt)
1275
- ),
1239
+ domains: request.domains.map((elt) => marshalTransferInDomainRequestTransferRequest(elt)),
1276
1240
  project_id: request.projectId ?? defaults.defaultProjectId,
1277
1241
  ...resolveOneOf([
1278
- { param: "owner_contact_id", value: request.ownerContactId },
1242
+ {
1243
+ param: "owner_contact_id",
1244
+ value: request.ownerContactId
1245
+ },
1279
1246
  {
1280
1247
  param: "owner_contact",
1281
1248
  value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
@@ -1292,7 +1259,10 @@ const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
1292
1259
  }
1293
1260
  ]),
1294
1261
  ...resolveOneOf([
1295
- { param: "technical_contact_id", value: request.technicalContactId },
1262
+ {
1263
+ param: "technical_contact_id",
1264
+ value: request.technicalContactId
1265
+ },
1296
1266
  {
1297
1267
  param: "technical_contact",
1298
1268
  value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
@@ -1318,9 +1288,7 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
1318
1288
  fax_number: request.faxNumber,
1319
1289
  lang: request.lang,
1320
1290
  phone_number: request.phoneNumber,
1321
- questions: request.questions !== void 0 ? request.questions.map(
1322
- (elt) => marshalUpdateContactRequestQuestion(elt)
1323
- ) : void 0,
1291
+ questions: request.questions !== void 0 ? request.questions.map((elt) => marshalUpdateContactRequestQuestion(elt)) : void 0,
1324
1292
  resale: request.resale,
1325
1293
  state: request.state,
1326
1294
  vat_identification_code: request.vatIdentificationCode,
@@ -1332,14 +1300,20 @@ const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
1332
1300
  });
1333
1301
  const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
1334
1302
  ...resolveOneOf([
1335
- { param: "technical_contact_id", value: request.technicalContactId },
1303
+ {
1304
+ param: "technical_contact_id",
1305
+ value: request.technicalContactId
1306
+ },
1336
1307
  {
1337
1308
  param: "technical_contact",
1338
1309
  value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
1339
1310
  }
1340
1311
  ]),
1341
1312
  ...resolveOneOf([
1342
- { param: "owner_contact_id", value: request.ownerContactId },
1313
+ {
1314
+ param: "owner_contact_id",
1315
+ value: request.ownerContactId
1316
+ },
1343
1317
  {
1344
1318
  param: "owner_contact",
1345
1319
  value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
@@ -1378,9 +1352,7 @@ const marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
1378
1352
  });
1379
1353
  const marshalDomainRecordGeoIPConfig = (request, defaults) => ({
1380
1354
  default: request.default,
1381
- matches: request.matches.map(
1382
- (elt) => marshalDomainRecordGeoIPConfigMatch(elt)
1383
- )
1355
+ matches: request.matches.map((elt) => marshalDomainRecordGeoIPConfigMatch(elt))
1384
1356
  });
1385
1357
  const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
1386
1358
  ips: request.ips,
@@ -1390,14 +1362,10 @@ const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
1390
1362
  user_agent: request.userAgent
1391
1363
  });
1392
1364
  const marshalDomainRecordViewConfig = (request, defaults) => ({
1393
- views: request.views.map(
1394
- (elt) => marshalDomainRecordViewConfigView(elt)
1395
- )
1365
+ views: request.views.map((elt) => marshalDomainRecordViewConfigView(elt))
1396
1366
  });
1397
1367
  const marshalDomainRecordWeightedConfig = (request, defaults) => ({
1398
- weighted_ips: request.weightedIps.map(
1399
- (elt) => marshalDomainRecordWeightedConfigWeightedIP(elt)
1400
- )
1368
+ weighted_ips: request.weightedIps.map((elt) => marshalDomainRecordWeightedConfigWeightedIP(elt))
1401
1369
  });
1402
1370
  const marshalDomainRecord = (request, defaults) => ({
1403
1371
  comment: request.comment,
@@ -1414,9 +1382,7 @@ const marshalDomainRecord = (request, defaults) => ({
1414
1382
  },
1415
1383
  {
1416
1384
  param: "http_service_config",
1417
- value: request.httpServiceConfig !== void 0 ? marshalDomainRecordHTTPServiceConfig(
1418
- request.httpServiceConfig
1419
- ) : void 0
1385
+ value: request.httpServiceConfig !== void 0 ? marshalDomainRecordHTTPServiceConfig(request.httpServiceConfig) : void 0
1420
1386
  },
1421
1387
  {
1422
1388
  param: "weighted_config",
@@ -1440,7 +1406,10 @@ const marshalRecordChangeAdd = (request, defaults) => ({
1440
1406
  const marshalRecordChangeClear = (request, defaults) => ({});
1441
1407
  const marshalRecordChangeDelete = (request, defaults) => ({
1442
1408
  ...resolveOneOf([
1443
- { param: "id", value: request.id },
1409
+ {
1410
+ param: "id",
1411
+ value: request.id
1412
+ },
1444
1413
  {
1445
1414
  param: "id_fields",
1446
1415
  value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields) : void 0
@@ -1450,7 +1419,10 @@ const marshalRecordChangeDelete = (request, defaults) => ({
1450
1419
  const marshalRecordChangeSet = (request, defaults) => ({
1451
1420
  records: request.records.map((elt) => marshalDomainRecord(elt)),
1452
1421
  ...resolveOneOf([
1453
- { param: "id", value: request.id },
1422
+ {
1423
+ param: "id",
1424
+ value: request.id
1425
+ },
1454
1426
  {
1455
1427
  param: "id_fields",
1456
1428
  value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields) : void 0
@@ -151,13 +151,21 @@ export interface ContactExtensionFR {
151
151
  }
152
152
  export interface ContactExtensionIT {
153
153
  /**
154
- * @deprecated
154
+ * @deprecated This option is useless anymore.
155
155
  */
156
156
  europeanCitizenship?: string;
157
157
  /**
158
- * @deprecated
158
+ * @deprecated Tax_code is renamed to pin.
159
159
  */
160
160
  taxCode?: string;
161
+ /**
162
+ * Domain name registrant's Taxcode (mandatory / only optional when the trustee is used)
163
+
164
+ If the requester:
165
+ * is an Italian natural person it contains his/her Codice Fiscale (16 characters format).
166
+ * For others than residents of IT it can contain a document number. (ID Card).
167
+ * In all other cases it must be equal to VAT number (in the 16 characters format if nationality is IT) or the numeric Codice Fiscale.
168
+ */
161
169
  pin: string;
162
170
  }
163
171
  export interface ContactExtensionNL {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-domain",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Scaleway SDK domain",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"