@scaleway/sdk-rdb 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,7 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: [
14
- "fr-par",
15
- "nl-ams",
16
- "pl-waw"
17
- ]
13
+ regions: ["fr-par", "nl-ams", "pl-waw"]
18
14
  });
19
15
  pageOfListDatabaseEngines = (request = {}) => this.client.fetch(
20
16
  {
@@ -23,7 +19,10 @@ class API extends API$1 {
23
19
  urlParams: urlParams(
24
20
  ["name", request.name],
25
21
  ["page", request.page],
26
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
22
+ [
23
+ "page_size",
24
+ request.pageSize ?? this.client.settings.defaultPageSize
25
+ ],
27
26
  ["version", request.version]
28
27
  )
29
28
  },
@@ -43,7 +42,10 @@ class API extends API$1 {
43
42
  urlParams: urlParams(
44
43
  ["include_disabled_types", request.includeDisabledTypes],
45
44
  ["page", request.page],
46
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
45
+ [
46
+ "page_size",
47
+ request.pageSize ?? this.client.settings.defaultPageSize
48
+ ]
47
49
  )
48
50
  },
49
51
  unmarshalListNodeTypesResponse
@@ -65,7 +67,10 @@ class API extends API$1 {
65
67
  ["order_by", request.orderBy],
66
68
  ["organization_id", request.organizationId],
67
69
  ["page", request.page],
68
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
70
+ [
71
+ "page_size",
72
+ request.pageSize ?? this.client.settings.defaultPageSize
73
+ ],
69
74
  ["project_id", request.projectId]
70
75
  )
71
76
  },
@@ -77,7 +82,11 @@ class API extends API$1 {
77
82
  * @param request - The request {@link ListDatabaseBackupsRequest}
78
83
  * @returns A Promise of ListDatabaseBackupsResponse
79
84
  */
80
- listDatabaseBackups = (request = {}) => enrichForPagination("databaseBackups", this.pageOfListDatabaseBackups, request);
85
+ listDatabaseBackups = (request = {}) => enrichForPagination(
86
+ "databaseBackups",
87
+ this.pageOfListDatabaseBackups,
88
+ request
89
+ );
81
90
  /**
82
91
  * Create a database backup. Create a new backup. You must set the `instance_id`, `database_name`, `name` and `expires_at` parameters.
83
92
  *
@@ -116,7 +125,9 @@ class API extends API$1 {
116
125
  * @returns A Promise of DatabaseBackup
117
126
  */
118
127
  waitForDatabaseBackup = (request, options) => waitForResource(
119
- options?.stop ?? ((res) => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))),
128
+ options?.stop ?? ((res) => Promise.resolve(
129
+ !DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status)
130
+ )),
120
131
  this.getDatabaseBackup,
121
132
  request,
122
133
  options
@@ -210,7 +221,10 @@ class API extends API$1 {
210
221
  ["order_by", request.orderBy],
211
222
  ["organization_id", request.organizationId],
212
223
  ["page", request.page],
213
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
224
+ [
225
+ "page_size",
226
+ request.pageSize ?? this.client.settings.defaultPageSize
227
+ ],
214
228
  ["project_id", request.projectId],
215
229
  ["tags", request.tags]
216
230
  )
@@ -245,7 +259,9 @@ class API extends API$1 {
245
259
  * @returns A Promise of Instance
246
260
  */
247
261
  waitForInstance = (request, options) => waitForResource(
248
- options?.stop ?? ((res) => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
262
+ options?.stop ?? ((res) => Promise.resolve(
263
+ !INSTANCE_TRANSIENT_STATUSES.includes(res.status)
264
+ )),
249
265
  this.getInstance,
250
266
  request,
251
267
  options
@@ -335,29 +351,23 @@ class API extends API$1 {
335
351
  * @param request - The request {@link GetInstanceCertificateRequest}
336
352
  * @returns A Promise of Blob
337
353
  */
338
- getInstanceCertificate = (request) => this.client.fetch(
339
- {
340
- method: "GET",
341
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/certificate`,
342
- urlParams: urlParams(
343
- ["dl", 1]
344
- ),
345
- responseType: "blob"
346
- }
347
- );
354
+ getInstanceCertificate = (request) => this.client.fetch({
355
+ method: "GET",
356
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/certificate`,
357
+ urlParams: urlParams(["dl", 1]),
358
+ responseType: "blob"
359
+ });
348
360
  /**
349
361
  * Renew the TLS certificate of a Database Instance. Renew a TLS for a Database Instance. Renewing a certificate means that you will not be able to connect to your Database Instance using the previous certificate. You will also need to download and update the new certificate for all database clients.
350
362
  *
351
363
  * @param request - The request {@link RenewInstanceCertificateRequest}
352
364
  */
353
- renewInstanceCertificate = (request) => this.client.fetch(
354
- {
355
- body: "{}",
356
- headers: jsonContentHeaders,
357
- method: "POST",
358
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/renew-certificate`
359
- }
360
- );
365
+ renewInstanceCertificate = (request) => this.client.fetch({
366
+ body: "{}",
367
+ headers: jsonContentHeaders,
368
+ method: "POST",
369
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/renew-certificate`
370
+ });
361
371
  /**
362
372
  * [deprecated] Get Database Instance metrics. Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`. This method is deprecated and will be removed in a future version.
363
373
  *
@@ -415,7 +425,9 @@ class API extends API$1 {
415
425
  * @returns A Promise of ReadReplica
416
426
  */
417
427
  waitForReadReplica = (request, options) => waitForResource(
418
- options?.stop ?? ((res) => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))),
428
+ options?.stop ?? ((res) => Promise.resolve(
429
+ !READ_REPLICA_TRANSIENT_STATUSES.includes(res.status)
430
+ )),
419
431
  this.getReadReplica,
420
432
  request,
421
433
  options
@@ -473,7 +485,10 @@ class API extends API$1 {
473
485
  createReadReplicaEndpoint = (request) => this.client.fetch(
474
486
  {
475
487
  body: JSON.stringify(
476
- marshalCreateReadReplicaEndpointRequest(request, this.client.settings)
488
+ marshalCreateReadReplicaEndpointRequest(
489
+ request,
490
+ this.client.settings
491
+ )
477
492
  ),
478
493
  headers: jsonContentHeaders,
479
494
  method: "POST",
@@ -508,9 +523,7 @@ class API extends API$1 {
508
523
  {
509
524
  method: "GET",
510
525
  path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs`,
511
- urlParams: urlParams(
512
- ["order_by", request.orderBy]
513
- )
526
+ urlParams: urlParams(["order_by", request.orderBy])
514
527
  },
515
528
  unmarshalListInstanceLogsResponse
516
529
  );
@@ -535,7 +548,9 @@ class API extends API$1 {
535
548
  * @returns A Promise of InstanceLog
536
549
  */
537
550
  waitForInstanceLog = (request, options) => waitForResource(
538
- options?.stop ?? ((res) => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))),
551
+ options?.stop ?? ((res) => Promise.resolve(
552
+ !INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status)
553
+ )),
539
554
  this.getInstanceLog,
540
555
  request,
541
556
  options
@@ -545,16 +560,14 @@ class API extends API$1 {
545
560
  *
546
561
  * @param request - The request {@link PurgeInstanceLogsRequest}
547
562
  */
548
- purgeInstanceLogs = (request) => this.client.fetch(
549
- {
550
- body: JSON.stringify(
551
- marshalPurgeInstanceLogsRequest(request, this.client.settings)
552
- ),
553
- headers: jsonContentHeaders,
554
- method: "POST",
555
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/purge-logs`
556
- }
557
- );
563
+ purgeInstanceLogs = (request) => this.client.fetch({
564
+ body: JSON.stringify(
565
+ marshalPurgeInstanceLogsRequest(request, this.client.settings)
566
+ ),
567
+ headers: jsonContentHeaders,
568
+ method: "POST",
569
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/purge-logs`
570
+ });
558
571
  /**
559
572
  * List remote Database Instance logs details. List remote log details. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
560
573
  *
@@ -625,7 +638,10 @@ class API extends API$1 {
625
638
  path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`,
626
639
  urlParams: urlParams(
627
640
  ["page", request.page],
628
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
641
+ [
642
+ "page_size",
643
+ request.pageSize ?? this.client.settings.defaultPageSize
644
+ ]
629
645
  )
630
646
  },
631
647
  unmarshalListInstanceACLRulesResponse
@@ -696,7 +712,10 @@ class API extends API$1 {
696
712
  ["name", request.name],
697
713
  ["order_by", request.orderBy],
698
714
  ["page", request.page],
699
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
715
+ [
716
+ "page_size",
717
+ request.pageSize ?? this.client.settings.defaultPageSize
718
+ ]
700
719
  )
701
720
  },
702
721
  unmarshalListUsersResponse
@@ -747,12 +766,10 @@ class API extends API$1 {
747
766
  *
748
767
  * @param request - The request {@link DeleteUserRequest}
749
768
  */
750
- deleteUser = (request) => this.client.fetch(
751
- {
752
- method: "DELETE",
753
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
754
- }
755
- );
769
+ deleteUser = (request) => this.client.fetch({
770
+ method: "DELETE",
771
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/users/${validatePathParam("name", request.name)}`
772
+ });
756
773
  pageOfListDatabases = (request) => this.client.fetch(
757
774
  {
758
775
  method: "GET",
@@ -763,7 +780,10 @@ class API extends API$1 {
763
780
  ["order_by", request.orderBy],
764
781
  ["owner", request.owner],
765
782
  ["page", request.page],
766
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
783
+ [
784
+ "page_size",
785
+ request.pageSize ?? this.client.settings.defaultPageSize
786
+ ],
767
787
  ["skip_size_retrieval", request.skipSizeRetrieval]
768
788
  )
769
789
  },
@@ -798,12 +818,10 @@ class API extends API$1 {
798
818
  *
799
819
  * @param request - The request {@link DeleteDatabaseRequest}
800
820
  */
801
- deleteDatabase = (request) => this.client.fetch(
802
- {
803
- method: "DELETE",
804
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases/${validatePathParam("name", request.name)}`
805
- }
806
- );
821
+ deleteDatabase = (request) => this.client.fetch({
822
+ method: "DELETE",
823
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/databases/${validatePathParam("name", request.name)}`
824
+ });
807
825
  pageOfListPrivileges = (request) => this.client.fetch(
808
826
  {
809
827
  method: "GET",
@@ -812,7 +830,10 @@ class API extends API$1 {
812
830
  ["database_name", request.databaseName],
813
831
  ["order_by", request.orderBy],
814
832
  ["page", request.page],
815
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
833
+ [
834
+ "page_size",
835
+ request.pageSize ?? this.client.settings.defaultPageSize
836
+ ],
816
837
  ["user_name", request.userName]
817
838
  )
818
839
  },
@@ -852,7 +873,10 @@ class API extends API$1 {
852
873
  ["order_by", request.orderBy],
853
874
  ["organization_id", request.organizationId],
854
875
  ["page", request.page],
855
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
876
+ [
877
+ "page_size",
878
+ request.pageSize ?? this.client.settings.defaultPageSize
879
+ ],
856
880
  ["project_id", request.projectId]
857
881
  )
858
882
  },
@@ -886,7 +910,9 @@ class API extends API$1 {
886
910
  * @returns A Promise of Snapshot
887
911
  */
888
912
  waitForSnapshot = (request, options) => waitForResource(
889
- options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
913
+ options?.stop ?? ((res) => Promise.resolve(
914
+ !SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
915
+ )),
890
916
  this.getSnapshot,
891
917
  request,
892
918
  options
@@ -947,7 +973,10 @@ class API extends API$1 {
947
973
  createInstanceFromSnapshot = (request) => this.client.fetch(
948
974
  {
949
975
  body: JSON.stringify(
950
- marshalCreateInstanceFromSnapshotRequest(request, this.client.settings)
976
+ marshalCreateInstanceFromSnapshotRequest(
977
+ request,
978
+ this.client.settings
979
+ )
951
980
  ),
952
981
  headers: jsonContentHeaders,
953
982
  method: "POST",
@@ -977,12 +1006,10 @@ class API extends API$1 {
977
1006
  *
978
1007
  * @param request - The request {@link DeleteEndpointRequest}
979
1008
  */
980
- deleteEndpoint = (request) => this.client.fetch(
981
- {
982
- method: "DELETE",
983
- path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
984
- }
985
- );
1009
+ deleteEndpoint = (request) => this.client.fetch({
1010
+ method: "DELETE",
1011
+ path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
1012
+ });
986
1013
  /**
987
1014
  * Get a Database Instance endpoint. Retrieve information about a Database Instance endpoint. Full details about the endpoint, like `ip`, `port`, `private_network` and `load_balancer` specifications are returned in the response.
988
1015
  *
@@ -4,9 +4,7 @@ const DATABASE_BACKUP_TRANSIENT_STATUSES = [
4
4
  "deleting",
5
5
  "exporting"
6
6
  ];
7
- const INSTANCE_LOG_TRANSIENT_STATUSES = [
8
- "creating"
9
- ];
7
+ const INSTANCE_LOG_TRANSIENT_STATUSES = ["creating"];
10
8
  const INSTANCE_TRANSIENT_STATUSES = [
11
9
  "provisioning",
12
10
  "configuring",
@@ -17,9 +15,7 @@ const INSTANCE_TRANSIENT_STATUSES = [
17
15
  "snapshotting",
18
16
  "restarting"
19
17
  ];
20
- const MAINTENANCE_TRANSIENT_STATUSES = [
21
- "ongoing"
22
- ];
18
+ const MAINTENANCE_TRANSIENT_STATUSES = ["ongoing"];
23
19
  const READ_REPLICA_TRANSIENT_STATUSES = [
24
20
  "provisioning",
25
21
  "initializing",
@@ -1,4 +1,4 @@
1
- export { API, } from './api.gen.js';
1
+ export { API } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
4
  export type { ACLRule, ACLRuleAction, ACLRuleDirection, ACLRuleProtocol, ACLRuleRequest, AddInstanceACLRulesRequest, AddInstanceACLRulesResponse, AddInstanceSettingsRequest, AddInstanceSettingsResponse, ApplyInstanceMaintenanceRequest, BackupSchedule, CloneInstanceRequest, CreateDatabaseBackupRequest, CreateDatabaseRequest, CreateEndpointRequest, CreateInstanceFromSnapshotRequest, CreateInstanceRequest, CreateReadReplicaEndpointRequest, CreateReadReplicaRequest, CreateSnapshotRequest, CreateUserRequest, Database, DatabaseBackup, DatabaseBackupStatus, DatabaseEngine, DeleteDatabaseBackupRequest, DeleteDatabaseRequest, DeleteEndpointRequest, DeleteInstanceACLRulesRequest, DeleteInstanceACLRulesResponse, DeleteInstanceRequest, DeleteInstanceSettingsRequest, DeleteInstanceSettingsResponse, DeleteReadReplicaRequest, DeleteSnapshotRequest, DeleteUserRequest, EncryptionAtRest, Endpoint, EndpointDirectAccessDetails, EndpointLoadBalancerDetails, EndpointPrivateNetworkDetails, EndpointPrivateNetworkDetailsProvisioningMode, EndpointSpec, EndpointSpecLoadBalancer, EndpointSpecPrivateNetwork, EndpointSpecPrivateNetworkIpamConfig, EngineSetting, EngineSettingPropertyType, EngineVersion, ExportDatabaseBackupRequest, GetDatabaseBackupRequest, GetEndpointRequest, GetInstanceCertificateRequest, GetInstanceLogRequest, GetInstanceMetricsRequest, GetInstanceRequest, GetReadReplicaRequest, GetSnapshotRequest, Instance, InstanceLog, InstanceLogStatus, InstanceMetrics, InstanceSetting, InstanceStatus, ListDatabaseBackupsRequest, ListDatabaseBackupsRequestOrderBy, ListDatabaseBackupsResponse, ListDatabaseEnginesRequest, ListDatabaseEnginesResponse, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListInstanceACLRulesRequest, ListInstanceACLRulesResponse, ListInstanceLogsDetailsRequest, ListInstanceLogsDetailsResponse, ListInstanceLogsDetailsResponseInstanceLogDetail, ListInstanceLogsRequest, ListInstanceLogsRequestOrderBy, ListInstanceLogsResponse, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListPrivilegesRequest, ListPrivilegesRequestOrderBy, ListPrivilegesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, LogsPolicy, Maintenance, MaintenanceStatus, MigrateEndpointRequest, NodeType, NodeTypeGeneration, NodeTypeStock, NodeTypeVolumeConstraintSizes, NodeTypeVolumeType, Permission, PrepareInstanceLogsRequest, PrepareInstanceLogsResponse, Privilege, PromoteReadReplicaRequest, PurgeInstanceLogsRequest, ReadReplica, ReadReplicaEndpointSpec, ReadReplicaEndpointSpecDirectAccess, ReadReplicaEndpointSpecPrivateNetwork, ReadReplicaEndpointSpecPrivateNetworkIpamConfig, ReadReplicaStatus, RenewInstanceCertificateRequest, ResetReadReplicaRequest, RestartInstanceRequest, RestoreDatabaseBackupRequest, SetInstanceACLRulesRequest, SetInstanceACLRulesResponse, SetInstanceSettingsRequest, SetInstanceSettingsResponse, SetPrivilegeRequest, Snapshot, SnapshotStatus, SnapshotVolumeType, StorageClass, UpdateDatabaseBackupRequest, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradableVersion, UpgradeInstanceRequest, UpgradeInstanceRequestMajorUpgradeWorkflow, User, Volume, VolumeType, } from './types.gen.js';
@@ -214,20 +214,32 @@ const unmarshalInstance = (data) => {
214
214
  endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
215
215
  engine: data.engine,
216
216
  id: data.id,
217
- initSettings: unmarshalArrayOfObject(data.init_settings, unmarshalInstanceSetting),
217
+ initSettings: unmarshalArrayOfObject(
218
+ data.init_settings,
219
+ unmarshalInstanceSetting
220
+ ),
218
221
  isHaCluster: data.is_ha_cluster,
219
222
  logsPolicy: data.logs_policy ? unmarshalLogsPolicy(data.logs_policy) : void 0,
220
- maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalMaintenance),
223
+ maintenances: unmarshalArrayOfObject(
224
+ data.maintenances,
225
+ unmarshalMaintenance
226
+ ),
221
227
  name: data.name,
222
228
  nodeType: data.node_type,
223
229
  organizationId: data.organization_id,
224
230
  projectId: data.project_id,
225
- readReplicas: unmarshalArrayOfObject(data.read_replicas, unmarshalReadReplica),
231
+ readReplicas: unmarshalArrayOfObject(
232
+ data.read_replicas,
233
+ unmarshalReadReplica
234
+ ),
226
235
  region: data.region,
227
236
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
228
237
  status: data.status,
229
238
  tags: data.tags,
230
- upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
239
+ upgradableVersion: unmarshalArrayOfObject(
240
+ data.upgradable_version,
241
+ unmarshalUpgradableVersion
242
+ ),
231
243
  volume: data.volume ? unmarshalVolume(data.volume) : void 0
232
244
  };
233
245
  };
@@ -358,7 +370,10 @@ const unmarshalListDatabaseBackupsResponse = (data) => {
358
370
  );
359
371
  }
360
372
  return {
361
- databaseBackups: unmarshalArrayOfObject(data.database_backups, unmarshalDatabaseBackup),
373
+ databaseBackups: unmarshalArrayOfObject(
374
+ data.database_backups,
375
+ unmarshalDatabaseBackup
376
+ ),
362
377
  totalCount: data.total_count
363
378
  };
364
379
  };
@@ -389,8 +404,14 @@ const unmarshalEngineVersion = (data) => {
389
404
  );
390
405
  }
391
406
  return {
392
- availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
393
- availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalEngineSetting),
407
+ availableInitSettings: unmarshalArrayOfObject(
408
+ data.available_init_settings,
409
+ unmarshalEngineSetting
410
+ ),
411
+ availableSettings: unmarshalArrayOfObject(
412
+ data.available_settings,
413
+ unmarshalEngineSetting
414
+ ),
394
415
  beta: data.beta,
395
416
  disabled: data.disabled,
396
417
  endOfLife: unmarshalDate(data.end_of_life),
@@ -462,7 +483,10 @@ const unmarshalListInstanceLogsDetailsResponse = (data) => {
462
483
  );
463
484
  }
464
485
  return {
465
- details: unmarshalArrayOfObject(data.details, unmarshalListInstanceLogsDetailsResponseInstanceLogDetail)
486
+ details: unmarshalArrayOfObject(
487
+ data.details,
488
+ unmarshalListInstanceLogsDetailsResponseInstanceLogDetail
489
+ )
466
490
  };
467
491
  };
468
492
  const unmarshalListInstanceLogsResponse = (data) => {
@@ -472,7 +496,10 @@ const unmarshalListInstanceLogsResponse = (data) => {
472
496
  );
473
497
  }
474
498
  return {
475
- instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog)
499
+ instanceLogs: unmarshalArrayOfObject(
500
+ data.instance_logs,
501
+ unmarshalInstanceLog
502
+ )
476
503
  };
477
504
  };
478
505
  const unmarshalListInstancesResponse = (data) => {
@@ -519,7 +546,10 @@ const unmarshalNodeType = (data) => {
519
546
  );
520
547
  }
521
548
  return {
522
- availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
549
+ availableVolumeTypes: unmarshalArrayOfObject(
550
+ data.available_volume_types,
551
+ unmarshalNodeTypeVolumeType
552
+ ),
523
553
  beta: data.beta,
524
554
  description: data.description,
525
555
  disabled: data.disabled,
@@ -586,7 +616,10 @@ const unmarshalPrepareInstanceLogsResponse = (data) => {
586
616
  );
587
617
  }
588
618
  return {
589
- instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog)
619
+ instanceLogs: unmarshalArrayOfObject(
620
+ data.instance_logs,
621
+ unmarshalInstanceLog
622
+ )
590
623
  };
591
624
  };
592
625
  const unmarshalSetInstanceACLRulesResponse = (data) => {
@@ -641,13 +674,12 @@ const marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
641
674
  const marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
642
675
  private_network_id: request.privateNetworkId,
643
676
  ...resolveOneOf([
644
- {
645
- param: "service_ip",
646
- value: request.serviceIp
647
- },
677
+ { param: "service_ip", value: request.serviceIp },
648
678
  {
649
679
  param: "ipam_config",
650
- value: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : void 0
680
+ value: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkIpamConfig(
681
+ request.ipamConfig
682
+ ) : void 0
651
683
  }
652
684
  ])
653
685
  });
@@ -707,13 +739,12 @@ const marshalReadReplicaEndpointSpecDirectAccess = (request, defaults) => ({});
707
739
  const marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
708
740
  private_network_id: request.privateNetworkId,
709
741
  ...resolveOneOf([
710
- {
711
- param: "service_ip",
712
- value: request.serviceIp
713
- },
742
+ { param: "service_ip", value: request.serviceIp },
714
743
  {
715
744
  param: "ipam_config",
716
- value: request.ipamConfig !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : void 0
745
+ value: request.ipamConfig !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(
746
+ request.ipamConfig
747
+ ) : void 0
717
748
  }
718
749
  ])
719
750
  });
@@ -721,19 +752,27 @@ const marshalReadReplicaEndpointSpec = (request, defaults) => ({
721
752
  ...resolveOneOf([
722
753
  {
723
754
  param: "direct_access",
724
- value: request.directAccess !== void 0 ? marshalReadReplicaEndpointSpecDirectAccess(request.directAccess) : void 0
755
+ value: request.directAccess !== void 0 ? marshalReadReplicaEndpointSpecDirectAccess(
756
+ request.directAccess
757
+ ) : void 0
725
758
  },
726
759
  {
727
760
  param: "private_network",
728
- value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork) : void 0
761
+ value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(
762
+ request.privateNetwork
763
+ ) : void 0
729
764
  }
730
765
  ])
731
766
  });
732
767
  const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({
733
- endpoint_spec: request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt))
768
+ endpoint_spec: request.endpointSpec.map(
769
+ (elt) => marshalReadReplicaEndpointSpec(elt)
770
+ )
734
771
  });
735
772
  const marshalCreateReadReplicaRequest = (request, defaults) => ({
736
- endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt)) : void 0,
773
+ endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map(
774
+ (elt) => marshalReadReplicaEndpointSpec(elt)
775
+ ) : void 0,
737
776
  instance_id: request.instanceId,
738
777
  same_zone: request.sameZone
739
778
  });
@@ -809,34 +848,18 @@ const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) =>
809
848
  });
810
849
  const marshalUpgradeInstanceRequest = (request, defaults) => ({
811
850
  ...resolveOneOf([
812
- {
813
- param: "node_type",
814
- value: request.nodeType
815
- },
816
- {
817
- param: "enable_ha",
818
- value: request.enableHa
819
- },
820
- {
821
- param: "volume_size",
822
- value: request.volumeSize
823
- },
824
- {
825
- param: "volume_type",
826
- value: request.volumeType
827
- },
828
- {
829
- param: "upgradable_version_id",
830
- value: request.upgradableVersionId
831
- },
851
+ { param: "node_type", value: request.nodeType },
852
+ { param: "enable_ha", value: request.enableHa },
853
+ { param: "volume_size", value: request.volumeSize },
854
+ { param: "volume_type", value: request.volumeType },
855
+ { param: "upgradable_version_id", value: request.upgradableVersionId },
832
856
  {
833
857
  param: "major_upgrade_workflow",
834
- value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(request.majorUpgradeWorkflow) : void 0
858
+ value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(
859
+ request.majorUpgradeWorkflow
860
+ ) : void 0
835
861
  },
836
- {
837
- param: "enable_encryption",
838
- value: request.enableEncryption
839
- }
862
+ { param: "enable_encryption", value: request.enableEncryption }
840
863
  ])
841
864
  });
842
865
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-rdb",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Scaleway SDK rdb",
5
5
  "license": "Apache-2.0",
6
6
  "files": [