@scaleway/sdk 0.1.0-beta.6 → 0.1.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  This SDK enables you to interact with Scaleway APIs.
4
4
 
5
5
  **🔗  Important links:**
6
- * Reference documentation (soon)
6
+ * [Reference documentation](https://scaleway.github.io/scaleway-sdk-js)
7
7
  * [Example projects](https://github.com/scaleway/scaleway-sdk-js/tree/master/examples)
8
8
  * [Developers website](https://developers.scaleway.com) (API documentation)
9
9
 
@@ -2,7 +2,7 @@ import { API } from '../../../scw/api.js';
2
2
  import { unmarshalScwFile } from '../../../scw/custom-marshalling.js';
3
3
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
4
4
  import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
5
- import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse } from './marshalling.gen.js';
5
+ import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, marshalRegistrarApiCheckContactsCompatibilityRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse } from './marshalling.gen.js';
6
6
 
7
7
  // This file was automatically generated. DO NOT EDIT.
8
8
  const jsonContentHeaders = {
@@ -239,6 +239,19 @@ class DomainRegistrarV2Beta1GenAPI extends API {
239
239
  path: `/domain/v2beta1/external-domains/${validatePathParam('domain', request.domain)}`
240
240
  }, unmarshalDeleteExternalDomainResponse);
241
241
 
242
+ this.checkContactsCompatibility = function (request) {
243
+ if (request === void 0) {
244
+ request = {};
245
+ }
246
+
247
+ return _this.client.fetch({
248
+ body: JSON.stringify(marshalRegistrarApiCheckContactsCompatibilityRequest(request, _this.client.settings)),
249
+ headers: jsonContentHeaders,
250
+ method: 'POST',
251
+ path: `/domain/v2beta1/check-contacts-compatibility`
252
+ }, unmarshalCheckContactsCompatibilityResponse);
253
+ };
254
+
242
255
  this.pageOfListContacts = function (request) {
243
256
  if (request === void 0) {
244
257
  request = {};
@@ -399,6 +399,17 @@ const unmarshalAvailableDomain = data => {
399
399
  };
400
400
  };
401
401
 
402
+ const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
403
+ if (!isJSONObject(data)) {
404
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
405
+ }
406
+
407
+ return {
408
+ compatible: data.compatible,
409
+ errorMessage: data.error_message
410
+ };
411
+ };
412
+
402
413
  const unmarshalContactRoles = data => {
403
414
  if (!isJSONObject(data)) {
404
415
  throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
@@ -545,6 +556,18 @@ const unmarshalTask = data => {
545
556
  };
546
557
  };
547
558
 
559
+ const unmarshalCheckContactsCompatibilityResponse = data => {
560
+ if (!isJSONObject(data)) {
561
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
562
+ }
563
+
564
+ return {
565
+ administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
566
+ compatible: data.compatible,
567
+ ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : undefined,
568
+ technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : undefined
569
+ };
570
+ };
548
571
  const unmarshalClearDNSZoneRecordsResponse = data => {
549
572
  if (!isJSONObject(data)) {
550
573
  throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
@@ -1121,6 +1144,35 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1121
1144
  value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1122
1145
  }])
1123
1146
  });
1147
+ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({ ...resolveOneOf([{
1148
+ param: 'administrative_contact_id',
1149
+ value: request.administrativeContactId
1150
+ }, {
1151
+ param: 'administrative_contact',
1152
+ value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
1153
+ }]),
1154
+ ...resolveOneOf([{
1155
+ param: 'owner_contact_id',
1156
+ value: request.ownerContactId
1157
+ }, {
1158
+ param: 'owner_contact',
1159
+ value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
1160
+ }]),
1161
+ ...resolveOneOf([{
1162
+ param: 'domain',
1163
+ value: request.domain
1164
+ }, {
1165
+ param: 'tld',
1166
+ value: request.tld
1167
+ }]),
1168
+ ...resolveOneOf([{
1169
+ param: 'technical_contact_id',
1170
+ value: request.technicalContactId
1171
+ }, {
1172
+ param: 'technical_contact',
1173
+ value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1174
+ }])
1175
+ });
1124
1176
  const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
1125
1177
  ds_record: request.dsRecord ? marshalDSRecord(request.dsRecord) : undefined
1126
1178
  });
@@ -1225,4 +1277,4 @@ const marshalUpdateDNSZoneRequest = (request, defaults) => ({
1225
1277
  project_id: request.projectId ?? defaults.defaultProjectId
1226
1278
  });
1227
1279
 
1228
- export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
1280
+ export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
package/dist/index.cjs CHANGED
@@ -367,7 +367,7 @@ const assertValidSettings = obj => {
367
367
  if (typeof obj.userAgent !== 'string') throw new Error(`Invalid User-Agent`);
368
368
  };
369
369
 
370
- const version = 'v0.1.0-beta.5';
370
+ const version = 'v0.1.0-beta.6';
371
371
  const userAgent = `scaleway-sdk-js/${version}`;
372
372
 
373
373
  const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
@@ -953,30 +953,13 @@ class PermissionsDeniedError extends ScalewayError {
953
953
  */
954
954
 
955
955
  const buildMessage$1 = (precondition, helpMessage) => {
956
- let message;
957
-
958
- switch (precondition) {
959
- case 'unknown_precondition':
960
- message = 'unknown precondition';
961
- break;
962
-
963
- case 'resource_still_in_use':
964
- message = 'resource is still in use';
965
- break;
966
-
967
- case 'attribute_must_be_set':
968
- message = 'attribute must be set';
969
- break;
970
-
971
- default:
972
- message = '';
973
- }
956
+ let message = `precondition failed: ${precondition}`;
974
957
 
975
958
  if (typeof helpMessage === 'string' && helpMessage.length > 0) {
976
959
  message = message.concat(', ', helpMessage);
977
960
  }
978
961
 
979
- return `precondition failed: ${message}`;
962
+ return message;
980
963
  };
981
964
  /**
982
965
  * PreconditionFailed error is used when a precondition is not respected.
@@ -4561,6 +4544,17 @@ const unmarshalAvailableDomain = data => {
4561
4544
  };
4562
4545
  };
4563
4546
 
4547
+ const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
4548
+ if (!isJSONObject(data)) {
4549
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
4550
+ }
4551
+
4552
+ return {
4553
+ compatible: data.compatible,
4554
+ errorMessage: data.error_message
4555
+ };
4556
+ };
4557
+
4564
4558
  const unmarshalContactRoles = data => {
4565
4559
  if (!isJSONObject(data)) {
4566
4560
  throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
@@ -4707,6 +4701,18 @@ const unmarshalTask$1 = data => {
4707
4701
  };
4708
4702
  };
4709
4703
 
4704
+ const unmarshalCheckContactsCompatibilityResponse = data => {
4705
+ if (!isJSONObject(data)) {
4706
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
4707
+ }
4708
+
4709
+ return {
4710
+ administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
4711
+ compatible: data.compatible,
4712
+ ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : undefined,
4713
+ technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : undefined
4714
+ };
4715
+ };
4710
4716
  const unmarshalClearDNSZoneRecordsResponse = data => {
4711
4717
  if (!isJSONObject(data)) {
4712
4718
  throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
@@ -5283,6 +5289,35 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
5283
5289
  value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
5284
5290
  }])
5285
5291
  });
5292
+ const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({ ...resolveOneOf([{
5293
+ param: 'administrative_contact_id',
5294
+ value: request.administrativeContactId
5295
+ }, {
5296
+ param: 'administrative_contact',
5297
+ value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
5298
+ }]),
5299
+ ...resolveOneOf([{
5300
+ param: 'owner_contact_id',
5301
+ value: request.ownerContactId
5302
+ }, {
5303
+ param: 'owner_contact',
5304
+ value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
5305
+ }]),
5306
+ ...resolveOneOf([{
5307
+ param: 'domain',
5308
+ value: request.domain
5309
+ }, {
5310
+ param: 'tld',
5311
+ value: request.tld
5312
+ }]),
5313
+ ...resolveOneOf([{
5314
+ param: 'technical_contact_id',
5315
+ value: request.technicalContactId
5316
+ }, {
5317
+ param: 'technical_contact',
5318
+ value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
5319
+ }])
5320
+ });
5286
5321
  const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
5287
5322
  ds_record: request.dsRecord ? marshalDSRecord(request.dsRecord) : undefined
5288
5323
  });
@@ -5817,6 +5852,20 @@ class DomainRegistrarV2Beta1GenAPI extends API {
5817
5852
  method: 'DELETE',
5818
5853
  path: `/domain/v2beta1/external-domains/${validatePathParam('domain', request.domain)}`
5819
5854
  }, unmarshalDeleteExternalDomainResponse);
5855
+ /**
5856
+ * Check if contacts are compatible against a domain or a tld. If not, it will
5857
+ * return the information requiring a correction.
5858
+ *
5859
+ * @param request - The request {@link RegistrarApiCheckContactsCompatibilityRequest}
5860
+ * @returns A Promise of CheckContactsCompatibilityResponse
5861
+ */
5862
+
5863
+ checkContactsCompatibility = (request = {}) => this.client.fetch({
5864
+ body: JSON.stringify(marshalRegistrarApiCheckContactsCompatibilityRequest(request, this.client.settings)),
5865
+ headers: jsonContentHeaders$e,
5866
+ method: 'POST',
5867
+ path: `/domain/v2beta1/check-contacts-compatibility`
5868
+ }, unmarshalCheckContactsCompatibilityResponse);
5820
5869
  pageOfListContacts = (request = {}) => this.client.fetch({
5821
5870
  method: 'GET',
5822
5871
  path: `/domain/v2beta1/contacts`,
package/dist/index.d.ts CHANGED
@@ -3179,6 +3179,17 @@ interface AvailableDomain {
3179
3179
  available: boolean;
3180
3180
  tld?: Tld;
3181
3181
  }
3182
+ /** Check contacts compatibility response */
3183
+ interface CheckContactsCompatibilityResponse {
3184
+ compatible: boolean;
3185
+ ownerCheckResult?: CheckContactsCompatibilityResponseContactCheckResult;
3186
+ administrativeCheckResult?: CheckContactsCompatibilityResponseContactCheckResult;
3187
+ technicalCheckResult?: CheckContactsCompatibilityResponseContactCheckResult;
3188
+ }
3189
+ interface CheckContactsCompatibilityResponseContactCheckResult {
3190
+ compatible: boolean;
3191
+ errorMessage?: string;
3192
+ }
3182
3193
  /** Clear dns zone records response */
3183
3194
  interface ClearDNSZoneRecordsResponse {
3184
3195
  }
@@ -3960,6 +3971,42 @@ declare type RegistrarApiRegisterExternalDomainRequest = {
3960
3971
  declare type RegistrarApiDeleteExternalDomainRequest = {
3961
3972
  domain: string;
3962
3973
  };
3974
+ declare type RegistrarApiCheckContactsCompatibilityRequest = {
3975
+ /** One-of ('parameter'): at most one of 'domain', 'tld' could be set. */
3976
+ domain?: string;
3977
+ /** One-of ('parameter'): at most one of 'domain', 'tld' could be set. */
3978
+ tld?: string;
3979
+ /**
3980
+ * One-of ('ownerContactType'): at most one of 'ownerContactId',
3981
+ * 'ownerContact' could be set.
3982
+ */
3983
+ ownerContactId?: string;
3984
+ /**
3985
+ * One-of ('ownerContactType'): at most one of 'ownerContactId',
3986
+ * 'ownerContact' could be set.
3987
+ */
3988
+ ownerContact?: NewContact;
3989
+ /**
3990
+ * One-of ('administrativeContactType'): at most one of
3991
+ * 'administrativeContactId', 'administrativeContact' could be set.
3992
+ */
3993
+ administrativeContactId?: string;
3994
+ /**
3995
+ * One-of ('administrativeContactType'): at most one of
3996
+ * 'administrativeContactId', 'administrativeContact' could be set.
3997
+ */
3998
+ administrativeContact?: NewContact;
3999
+ /**
4000
+ * One-of ('technicalContactType'): at most one of 'technicalContactId',
4001
+ * 'technicalContact' could be set.
4002
+ */
4003
+ technicalContactId?: string;
4004
+ /**
4005
+ * One-of ('technicalContactType'): at most one of 'technicalContactId',
4006
+ * 'technicalContact' could be set.
4007
+ */
4008
+ technicalContact?: NewContact;
4009
+ };
3963
4010
  declare type RegistrarApiListContactsRequest = {
3964
4011
  page?: number;
3965
4012
  pageSize?: number;
@@ -4354,6 +4401,14 @@ declare class DomainRegistrarV2Beta1GenAPI extends API {
4354
4401
  * @returns A Promise of DeleteExternalDomainResponse
4355
4402
  */
4356
4403
  deleteExternalDomain: (request: Readonly<RegistrarApiDeleteExternalDomainRequest>) => Promise<DeleteExternalDomainResponse>;
4404
+ /**
4405
+ * Check if contacts are compatible against a domain or a tld. If not, it will
4406
+ * return the information requiring a correction.
4407
+ *
4408
+ * @param request - The request {@link RegistrarApiCheckContactsCompatibilityRequest}
4409
+ * @returns A Promise of CheckContactsCompatibilityResponse
4410
+ */
4411
+ checkContactsCompatibility: (request?: Readonly<RegistrarApiCheckContactsCompatibilityRequest>) => Promise<CheckContactsCompatibilityResponse>;
4357
4412
  protected pageOfListContacts: (request?: Readonly<RegistrarApiListContactsRequest>) => Promise<ListContactsResponse>;
4358
4413
  /**
4359
4414
  * Return a list of contacts with their domains and roles. You can filter the
@@ -4528,6 +4583,8 @@ type index$v_RenewableDomainStatus = RenewableDomainStatus;
4528
4583
  type index$v_SSLCertificateStatus = SSLCertificateStatus;
4529
4584
  type index$v_TaskType = TaskType;
4530
4585
  type index$v_AvailableDomain = AvailableDomain;
4586
+ type index$v_CheckContactsCompatibilityResponse = CheckContactsCompatibilityResponse;
4587
+ type index$v_CheckContactsCompatibilityResponseContactCheckResult = CheckContactsCompatibilityResponseContactCheckResult;
4531
4588
  type index$v_ClearDNSZoneRecordsResponse = ClearDNSZoneRecordsResponse;
4532
4589
  type index$v_Contact = Contact;
4533
4590
  type index$v_ContactExtensionEU = ContactExtensionEU;
@@ -4631,6 +4688,7 @@ type index$v_RegistrarApiTransferInDomainRequest = RegistrarApiTransferInDomainR
4631
4688
  type index$v_RegistrarApiTradeDomainRequest = RegistrarApiTradeDomainRequest;
4632
4689
  type index$v_RegistrarApiRegisterExternalDomainRequest = RegistrarApiRegisterExternalDomainRequest;
4633
4690
  type index$v_RegistrarApiDeleteExternalDomainRequest = RegistrarApiDeleteExternalDomainRequest;
4691
+ type index$v_RegistrarApiCheckContactsCompatibilityRequest = RegistrarApiCheckContactsCompatibilityRequest;
4634
4692
  type index$v_RegistrarApiListContactsRequest = RegistrarApiListContactsRequest;
4635
4693
  type index$v_RegistrarApiGetContactRequest = RegistrarApiGetContactRequest;
4636
4694
  type index$v_RegistrarApiUpdateContactRequest = RegistrarApiUpdateContactRequest;
@@ -4674,6 +4732,8 @@ declare namespace index$v {
4674
4732
  TaskStatus$1 as TaskStatus,
4675
4733
  index$v_TaskType as TaskType,
4676
4734
  index$v_AvailableDomain as AvailableDomain,
4735
+ index$v_CheckContactsCompatibilityResponse as CheckContactsCompatibilityResponse,
4736
+ index$v_CheckContactsCompatibilityResponseContactCheckResult as CheckContactsCompatibilityResponseContactCheckResult,
4677
4737
  index$v_ClearDNSZoneRecordsResponse as ClearDNSZoneRecordsResponse,
4678
4738
  index$v_Contact as Contact,
4679
4739
  index$v_ContactExtensionEU as ContactExtensionEU,
@@ -4780,6 +4840,7 @@ declare namespace index$v {
4780
4840
  index$v_RegistrarApiTradeDomainRequest as RegistrarApiTradeDomainRequest,
4781
4841
  index$v_RegistrarApiRegisterExternalDomainRequest as RegistrarApiRegisterExternalDomainRequest,
4782
4842
  index$v_RegistrarApiDeleteExternalDomainRequest as RegistrarApiDeleteExternalDomainRequest,
4843
+ index$v_RegistrarApiCheckContactsCompatibilityRequest as RegistrarApiCheckContactsCompatibilityRequest,
4783
4844
  index$v_RegistrarApiListContactsRequest as RegistrarApiListContactsRequest,
4784
4845
  index$v_RegistrarApiGetContactRequest as RegistrarApiGetContactRequest,
4785
4846
  index$v_RegistrarApiUpdateContactRequest as RegistrarApiUpdateContactRequest,
@@ -11022,8 +11083,10 @@ interface CreateClusterRequestPoolConfig {
11022
11083
  /** The name of the pool */
11023
11084
  name: string;
11024
11085
  /**
11025
- * The node type is the type of Scaleway Instance wanted for the pool, nodes
11026
- * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST)
11086
+ * The node type is the type of Scaleway Instance wanted for the pool. Nodes
11087
+ * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST).
11088
+ * 'external' is a special node type used to provision instances from other
11089
+ * cloud providers.
11027
11090
  */
11028
11091
  nodeType: string;
11029
11092
  /** The placement group ID in which all the nodes of the pool will be created */
@@ -11033,12 +11096,12 @@ interface CreateClusterRequestPoolConfig {
11033
11096
  /** The size (number of nodes) of the pool */
11034
11097
  size: number;
11035
11098
  /**
11036
- * The minimun size of the pool. Note that this fields will be used only when
11099
+ * The minimum size of the pool. Note that this field will be used only when
11037
11100
  * autoscaling is enabled.
11038
11101
  */
11039
11102
  minSize?: number;
11040
11103
  /**
11041
- * The maximum size of the pool. Note that this fields will be used only when
11104
+ * The maximum size of the pool. Note that this field will be used only when
11042
11105
  * autoscaling is enabled.
11043
11106
  */
11044
11107
  maxSize?: number;
@@ -11174,8 +11237,10 @@ interface Pool {
11174
11237
  /** The version of the pool */
11175
11238
  version: string;
11176
11239
  /**
11177
- * The node type is the type of Scaleway Instance wanted for the pool, nodes
11178
- * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST)
11240
+ * The node type is the type of Scaleway Instance wanted for the pool. Nodes
11241
+ * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST).
11242
+ * 'external' is a special node type used to provision instances from other
11243
+ * cloud providers.
11179
11244
  */
11180
11245
  nodeType: string;
11181
11246
  /** The enablement of the autoscaling feature for the pool */
@@ -11183,12 +11248,12 @@ interface Pool {
11183
11248
  /** The size (number of nodes) of the pool */
11184
11249
  size: number;
11185
11250
  /**
11186
- * The minimun size of the pool. Note that this fields will be used only when
11251
+ * The minimum size of the pool. Note that this field will be used only when
11187
11252
  * autoscaling is enabled.
11188
11253
  */
11189
11254
  minSize: number;
11190
11255
  /**
11191
- * The maximum size of the pool. Note that this fields will be used only when
11256
+ * The maximum size of the pool. Note that this field will be used only when
11192
11257
  * autoscaling is enabled.
11193
11258
  */
11194
11259
  maxSize: number;
@@ -11328,8 +11393,8 @@ interface Version$1 {
11328
11393
  region: Region;
11329
11394
  /** The supported Container Network Interface (CNI) plugins for this version */
11330
11395
  availableCnis: Array<CNI>;
11331
- /** The supported Ingress Controllers for this version */
11332
- availableIngresses: Array<Ingress>;
11396
+ /** @deprecated The supported Ingress Controllers for this version */
11397
+ availableIngresses?: Array<Ingress>;
11333
11398
  /** The supported container runtimes for this version */
11334
11399
  availableContainerRuntimes: Array<Runtime>;
11335
11400
  /** The supported feature gates for this version */
@@ -11530,8 +11595,10 @@ declare type CreatePoolRequest = {
11530
11595
  /** The name of the pool */
11531
11596
  name?: string;
11532
11597
  /**
11533
- * The node type is the type of Scaleway Instance wanted for the pool, nodes
11534
- * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST)
11598
+ * The node type is the type of Scaleway Instance wanted for the pool. Nodes
11599
+ * with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST).
11600
+ * 'external' is a special node type used to provision instances from other
11601
+ * cloud providers.
11535
11602
  */
11536
11603
  nodeType: string;
11537
11604
  /** The placement group ID in which all the nodes of the pool will be created */
@@ -11541,12 +11608,12 @@ declare type CreatePoolRequest = {
11541
11608
  /** The size (number of nodes) of the pool */
11542
11609
  size: number;
11543
11610
  /**
11544
- * The minimun size of the pool. Note that this fields will be used only when
11611
+ * The minimum size of the pool. Note that this field will be used only when
11545
11612
  * autoscaling is enabled.
11546
11613
  */
11547
11614
  minSize?: number;
11548
11615
  /**
11549
- * The maximum size of the pool. Note that this fields will be used only when
11616
+ * The maximum size of the pool. Note that this field will be used only when
11550
11617
  * autoscaling is enabled.
11551
11618
  */
11552
11619
  maxSize?: number;
@@ -1,4 +1,4 @@
1
- const version = 'v0.1.0-beta.5';
1
+ const version = 'v0.1.0-beta.6';
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
 
4
4
  export { userAgent, version };
@@ -11,30 +11,13 @@ import { ScalewayError } from '../scw-error.js';
11
11
  */
12
12
 
13
13
  const buildMessage = (precondition, helpMessage) => {
14
- let message;
15
-
16
- switch (precondition) {
17
- case 'unknown_precondition':
18
- message = 'unknown precondition';
19
- break;
20
-
21
- case 'resource_still_in_use':
22
- message = 'resource is still in use';
23
- break;
24
-
25
- case 'attribute_must_be_set':
26
- message = 'attribute must be set';
27
- break;
28
-
29
- default:
30
- message = '';
31
- }
14
+ let message = `precondition failed: ${precondition}`;
32
15
 
33
16
  if (typeof helpMessage === 'string' && helpMessage.length > 0) {
34
17
  message = message.concat(', ', helpMessage);
35
18
  }
36
19
 
37
- return `precondition failed: ${message}`;
20
+ return message;
38
21
  };
39
22
  /**
40
23
  * PreconditionFailed error is used when a precondition is not respected.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "0.1.0-beta.6",
3
+ "version": "0.1.0-beta.7",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -36,5 +36,5 @@
36
36
  "bundledDependencies": [
37
37
  "@scaleway/random-name"
38
38
  ],
39
- "gitHead": "988ff828009fd072d4ee192e880a80c1b0afe276"
39
+ "gitHead": "a1b9eea1b656d771d50b23127909825314902734"
40
40
  }