@scaleway/sdk-rdb 2.2.0 → 2.2.1

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,7 +10,11 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: ["fr-par", "nl-ams", "pl-waw"]
13
+ regions: [
14
+ "fr-par",
15
+ "nl-ams",
16
+ "pl-waw"
17
+ ]
14
18
  });
15
19
  pageOfListDatabaseEngines = (request = {}) => this.client.fetch(
16
20
  {
@@ -19,10 +23,7 @@ class API extends API$1 {
19
23
  urlParams: urlParams(
20
24
  ["name", request.name],
21
25
  ["page", request.page],
22
- [
23
- "page_size",
24
- request.pageSize ?? this.client.settings.defaultPageSize
25
- ],
26
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
26
27
  ["version", request.version]
27
28
  )
28
29
  },
@@ -42,10 +43,7 @@ class API extends API$1 {
42
43
  urlParams: urlParams(
43
44
  ["include_disabled_types", request.includeDisabledTypes],
44
45
  ["page", request.page],
45
- [
46
- "page_size",
47
- request.pageSize ?? this.client.settings.defaultPageSize
48
- ]
46
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
49
47
  )
50
48
  },
51
49
  unmarshalListNodeTypesResponse
@@ -67,10 +65,7 @@ class API extends API$1 {
67
65
  ["order_by", request.orderBy],
68
66
  ["organization_id", request.organizationId],
69
67
  ["page", request.page],
70
- [
71
- "page_size",
72
- request.pageSize ?? this.client.settings.defaultPageSize
73
- ],
68
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
74
69
  ["project_id", request.projectId]
75
70
  )
76
71
  },
@@ -82,11 +77,7 @@ class API extends API$1 {
82
77
  * @param request - The request {@link ListDatabaseBackupsRequest}
83
78
  * @returns A Promise of ListDatabaseBackupsResponse
84
79
  */
85
- listDatabaseBackups = (request = {}) => enrichForPagination(
86
- "databaseBackups",
87
- this.pageOfListDatabaseBackups,
88
- request
89
- );
80
+ listDatabaseBackups = (request = {}) => enrichForPagination("databaseBackups", this.pageOfListDatabaseBackups, request);
90
81
  /**
91
82
  * Create a database backup. Create a new backup. You must set the `instance_id`, `database_name`, `name` and `expires_at` parameters.
92
83
  *
@@ -125,9 +116,7 @@ class API extends API$1 {
125
116
  * @returns A Promise of DatabaseBackup
126
117
  */
127
118
  waitForDatabaseBackup = (request, options) => waitForResource(
128
- options?.stop ?? ((res) => Promise.resolve(
129
- !DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status)
130
- )),
119
+ options?.stop ?? ((res) => Promise.resolve(!DATABASE_BACKUP_TRANSIENT_STATUSES.includes(res.status))),
131
120
  this.getDatabaseBackup,
132
121
  request,
133
122
  options
@@ -221,10 +210,7 @@ class API extends API$1 {
221
210
  ["order_by", request.orderBy],
222
211
  ["organization_id", request.organizationId],
223
212
  ["page", request.page],
224
- [
225
- "page_size",
226
- request.pageSize ?? this.client.settings.defaultPageSize
227
- ],
213
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
228
214
  ["project_id", request.projectId],
229
215
  ["tags", request.tags]
230
216
  )
@@ -259,9 +245,7 @@ class API extends API$1 {
259
245
  * @returns A Promise of Instance
260
246
  */
261
247
  waitForInstance = (request, options) => waitForResource(
262
- options?.stop ?? ((res) => Promise.resolve(
263
- !INSTANCE_TRANSIENT_STATUSES.includes(res.status)
264
- )),
248
+ options?.stop ?? ((res) => Promise.resolve(!INSTANCE_TRANSIENT_STATUSES.includes(res.status))),
265
249
  this.getInstance,
266
250
  request,
267
251
  options
@@ -351,23 +335,29 @@ class API extends API$1 {
351
335
  * @param request - The request {@link GetInstanceCertificateRequest}
352
336
  * @returns A Promise of Blob
353
337
  */
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
- });
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
+ );
360
348
  /**
361
349
  * 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.
362
350
  *
363
351
  * @param request - The request {@link RenewInstanceCertificateRequest}
364
352
  */
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
- });
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
+ );
371
361
  /**
372
362
  * [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.
373
363
  *
@@ -425,9 +415,7 @@ class API extends API$1 {
425
415
  * @returns A Promise of ReadReplica
426
416
  */
427
417
  waitForReadReplica = (request, options) => waitForResource(
428
- options?.stop ?? ((res) => Promise.resolve(
429
- !READ_REPLICA_TRANSIENT_STATUSES.includes(res.status)
430
- )),
418
+ options?.stop ?? ((res) => Promise.resolve(!READ_REPLICA_TRANSIENT_STATUSES.includes(res.status))),
431
419
  this.getReadReplica,
432
420
  request,
433
421
  options
@@ -485,10 +473,7 @@ class API extends API$1 {
485
473
  createReadReplicaEndpoint = (request) => this.client.fetch(
486
474
  {
487
475
  body: JSON.stringify(
488
- marshalCreateReadReplicaEndpointRequest(
489
- request,
490
- this.client.settings
491
- )
476
+ marshalCreateReadReplicaEndpointRequest(request, this.client.settings)
492
477
  ),
493
478
  headers: jsonContentHeaders,
494
479
  method: "POST",
@@ -523,7 +508,9 @@ class API extends API$1 {
523
508
  {
524
509
  method: "GET",
525
510
  path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/logs`,
526
- urlParams: urlParams(["order_by", request.orderBy])
511
+ urlParams: urlParams(
512
+ ["order_by", request.orderBy]
513
+ )
527
514
  },
528
515
  unmarshalListInstanceLogsResponse
529
516
  );
@@ -548,9 +535,7 @@ class API extends API$1 {
548
535
  * @returns A Promise of InstanceLog
549
536
  */
550
537
  waitForInstanceLog = (request, options) => waitForResource(
551
- options?.stop ?? ((res) => Promise.resolve(
552
- !INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status)
553
- )),
538
+ options?.stop ?? ((res) => Promise.resolve(!INSTANCE_LOG_TRANSIENT_STATUSES.includes(res.status))),
554
539
  this.getInstanceLog,
555
540
  request,
556
541
  options
@@ -560,14 +545,16 @@ class API extends API$1 {
560
545
  *
561
546
  * @param request - The request {@link PurgeInstanceLogsRequest}
562
547
  */
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
- });
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
+ );
571
558
  /**
572
559
  * 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.
573
560
  *
@@ -638,10 +625,7 @@ class API extends API$1 {
638
625
  path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/acls`,
639
626
  urlParams: urlParams(
640
627
  ["page", request.page],
641
- [
642
- "page_size",
643
- request.pageSize ?? this.client.settings.defaultPageSize
644
- ]
628
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
645
629
  )
646
630
  },
647
631
  unmarshalListInstanceACLRulesResponse
@@ -712,10 +696,7 @@ class API extends API$1 {
712
696
  ["name", request.name],
713
697
  ["order_by", request.orderBy],
714
698
  ["page", request.page],
715
- [
716
- "page_size",
717
- request.pageSize ?? this.client.settings.defaultPageSize
718
- ]
699
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
719
700
  )
720
701
  },
721
702
  unmarshalListUsersResponse
@@ -766,10 +747,12 @@ class API extends API$1 {
766
747
  *
767
748
  * @param request - The request {@link DeleteUserRequest}
768
749
  */
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
- });
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
+ );
773
756
  pageOfListDatabases = (request) => this.client.fetch(
774
757
  {
775
758
  method: "GET",
@@ -780,10 +763,7 @@ class API extends API$1 {
780
763
  ["order_by", request.orderBy],
781
764
  ["owner", request.owner],
782
765
  ["page", request.page],
783
- [
784
- "page_size",
785
- request.pageSize ?? this.client.settings.defaultPageSize
786
- ],
766
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
787
767
  ["skip_size_retrieval", request.skipSizeRetrieval]
788
768
  )
789
769
  },
@@ -818,10 +798,12 @@ class API extends API$1 {
818
798
  *
819
799
  * @param request - The request {@link DeleteDatabaseRequest}
820
800
  */
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
- });
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
+ );
825
807
  pageOfListPrivileges = (request) => this.client.fetch(
826
808
  {
827
809
  method: "GET",
@@ -830,10 +812,7 @@ class API extends API$1 {
830
812
  ["database_name", request.databaseName],
831
813
  ["order_by", request.orderBy],
832
814
  ["page", request.page],
833
- [
834
- "page_size",
835
- request.pageSize ?? this.client.settings.defaultPageSize
836
- ],
815
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
837
816
  ["user_name", request.userName]
838
817
  )
839
818
  },
@@ -873,10 +852,7 @@ class API extends API$1 {
873
852
  ["order_by", request.orderBy],
874
853
  ["organization_id", request.organizationId],
875
854
  ["page", request.page],
876
- [
877
- "page_size",
878
- request.pageSize ?? this.client.settings.defaultPageSize
879
- ],
855
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
880
856
  ["project_id", request.projectId]
881
857
  )
882
858
  },
@@ -910,9 +886,7 @@ class API extends API$1 {
910
886
  * @returns A Promise of Snapshot
911
887
  */
912
888
  waitForSnapshot = (request, options) => waitForResource(
913
- options?.stop ?? ((res) => Promise.resolve(
914
- !SNAPSHOT_TRANSIENT_STATUSES.includes(res.status)
915
- )),
889
+ options?.stop ?? ((res) => Promise.resolve(!SNAPSHOT_TRANSIENT_STATUSES.includes(res.status))),
916
890
  this.getSnapshot,
917
891
  request,
918
892
  options
@@ -973,10 +947,7 @@ class API extends API$1 {
973
947
  createInstanceFromSnapshot = (request) => this.client.fetch(
974
948
  {
975
949
  body: JSON.stringify(
976
- marshalCreateInstanceFromSnapshotRequest(
977
- request,
978
- this.client.settings
979
- )
950
+ marshalCreateInstanceFromSnapshotRequest(request, this.client.settings)
980
951
  ),
981
952
  headers: jsonContentHeaders,
982
953
  method: "POST",
@@ -1006,10 +977,12 @@ class API extends API$1 {
1006
977
  *
1007
978
  * @param request - The request {@link DeleteEndpointRequest}
1008
979
  */
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
- });
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
+ );
1013
986
  /**
1014
987
  * 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.
1015
988
  *
@@ -4,7 +4,9 @@ const DATABASE_BACKUP_TRANSIENT_STATUSES = [
4
4
  "deleting",
5
5
  "exporting"
6
6
  ];
7
- const INSTANCE_LOG_TRANSIENT_STATUSES = ["creating"];
7
+ const INSTANCE_LOG_TRANSIENT_STATUSES = [
8
+ "creating"
9
+ ];
8
10
  const INSTANCE_TRANSIENT_STATUSES = [
9
11
  "provisioning",
10
12
  "configuring",
@@ -15,7 +17,9 @@ const INSTANCE_TRANSIENT_STATUSES = [
15
17
  "snapshotting",
16
18
  "restarting"
17
19
  ];
18
- const MAINTENANCE_TRANSIENT_STATUSES = ["ongoing"];
20
+ const MAINTENANCE_TRANSIENT_STATUSES = [
21
+ "ongoing"
22
+ ];
19
23
  const READ_REPLICA_TRANSIENT_STATUSES = [
20
24
  "provisioning",
21
25
  "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,32 +214,20 @@ const unmarshalInstance = (data) => {
214
214
  endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
215
215
  engine: data.engine,
216
216
  id: data.id,
217
- initSettings: unmarshalArrayOfObject(
218
- data.init_settings,
219
- unmarshalInstanceSetting
220
- ),
217
+ initSettings: unmarshalArrayOfObject(data.init_settings, unmarshalInstanceSetting),
221
218
  isHaCluster: data.is_ha_cluster,
222
219
  logsPolicy: data.logs_policy ? unmarshalLogsPolicy(data.logs_policy) : void 0,
223
- maintenances: unmarshalArrayOfObject(
224
- data.maintenances,
225
- unmarshalMaintenance
226
- ),
220
+ maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalMaintenance),
227
221
  name: data.name,
228
222
  nodeType: data.node_type,
229
223
  organizationId: data.organization_id,
230
224
  projectId: data.project_id,
231
- readReplicas: unmarshalArrayOfObject(
232
- data.read_replicas,
233
- unmarshalReadReplica
234
- ),
225
+ readReplicas: unmarshalArrayOfObject(data.read_replicas, unmarshalReadReplica),
235
226
  region: data.region,
236
227
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
237
228
  status: data.status,
238
229
  tags: data.tags,
239
- upgradableVersion: unmarshalArrayOfObject(
240
- data.upgradable_version,
241
- unmarshalUpgradableVersion
242
- ),
230
+ upgradableVersion: unmarshalArrayOfObject(data.upgradable_version, unmarshalUpgradableVersion),
243
231
  volume: data.volume ? unmarshalVolume(data.volume) : void 0
244
232
  };
245
233
  };
@@ -370,10 +358,7 @@ const unmarshalListDatabaseBackupsResponse = (data) => {
370
358
  );
371
359
  }
372
360
  return {
373
- databaseBackups: unmarshalArrayOfObject(
374
- data.database_backups,
375
- unmarshalDatabaseBackup
376
- ),
361
+ databaseBackups: unmarshalArrayOfObject(data.database_backups, unmarshalDatabaseBackup),
377
362
  totalCount: data.total_count
378
363
  };
379
364
  };
@@ -404,14 +389,8 @@ const unmarshalEngineVersion = (data) => {
404
389
  );
405
390
  }
406
391
  return {
407
- availableInitSettings: unmarshalArrayOfObject(
408
- data.available_init_settings,
409
- unmarshalEngineSetting
410
- ),
411
- availableSettings: unmarshalArrayOfObject(
412
- data.available_settings,
413
- unmarshalEngineSetting
414
- ),
392
+ availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
393
+ availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalEngineSetting),
415
394
  beta: data.beta,
416
395
  disabled: data.disabled,
417
396
  endOfLife: unmarshalDate(data.end_of_life),
@@ -483,10 +462,7 @@ const unmarshalListInstanceLogsDetailsResponse = (data) => {
483
462
  );
484
463
  }
485
464
  return {
486
- details: unmarshalArrayOfObject(
487
- data.details,
488
- unmarshalListInstanceLogsDetailsResponseInstanceLogDetail
489
- )
465
+ details: unmarshalArrayOfObject(data.details, unmarshalListInstanceLogsDetailsResponseInstanceLogDetail)
490
466
  };
491
467
  };
492
468
  const unmarshalListInstanceLogsResponse = (data) => {
@@ -496,10 +472,7 @@ const unmarshalListInstanceLogsResponse = (data) => {
496
472
  );
497
473
  }
498
474
  return {
499
- instanceLogs: unmarshalArrayOfObject(
500
- data.instance_logs,
501
- unmarshalInstanceLog
502
- )
475
+ instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog)
503
476
  };
504
477
  };
505
478
  const unmarshalListInstancesResponse = (data) => {
@@ -546,10 +519,7 @@ const unmarshalNodeType = (data) => {
546
519
  );
547
520
  }
548
521
  return {
549
- availableVolumeTypes: unmarshalArrayOfObject(
550
- data.available_volume_types,
551
- unmarshalNodeTypeVolumeType
552
- ),
522
+ availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
553
523
  beta: data.beta,
554
524
  description: data.description,
555
525
  disabled: data.disabled,
@@ -616,10 +586,7 @@ const unmarshalPrepareInstanceLogsResponse = (data) => {
616
586
  );
617
587
  }
618
588
  return {
619
- instanceLogs: unmarshalArrayOfObject(
620
- data.instance_logs,
621
- unmarshalInstanceLog
622
- )
589
+ instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog)
623
590
  };
624
591
  };
625
592
  const unmarshalSetInstanceACLRulesResponse = (data) => {
@@ -674,12 +641,13 @@ const marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
674
641
  const marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
675
642
  private_network_id: request.privateNetworkId,
676
643
  ...resolveOneOf([
677
- { param: "service_ip", value: request.serviceIp },
644
+ {
645
+ param: "service_ip",
646
+ value: request.serviceIp
647
+ },
678
648
  {
679
649
  param: "ipam_config",
680
- value: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkIpamConfig(
681
- request.ipamConfig
682
- ) : void 0
650
+ value: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : void 0
683
651
  }
684
652
  ])
685
653
  });
@@ -739,12 +707,13 @@ const marshalReadReplicaEndpointSpecDirectAccess = (request, defaults) => ({});
739
707
  const marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
740
708
  private_network_id: request.privateNetworkId,
741
709
  ...resolveOneOf([
742
- { param: "service_ip", value: request.serviceIp },
710
+ {
711
+ param: "service_ip",
712
+ value: request.serviceIp
713
+ },
743
714
  {
744
715
  param: "ipam_config",
745
- value: request.ipamConfig !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(
746
- request.ipamConfig
747
- ) : void 0
716
+ value: request.ipamConfig !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig) : void 0
748
717
  }
749
718
  ])
750
719
  });
@@ -752,27 +721,19 @@ const marshalReadReplicaEndpointSpec = (request, defaults) => ({
752
721
  ...resolveOneOf([
753
722
  {
754
723
  param: "direct_access",
755
- value: request.directAccess !== void 0 ? marshalReadReplicaEndpointSpecDirectAccess(
756
- request.directAccess
757
- ) : void 0
724
+ value: request.directAccess !== void 0 ? marshalReadReplicaEndpointSpecDirectAccess(request.directAccess) : void 0
758
725
  },
759
726
  {
760
727
  param: "private_network",
761
- value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(
762
- request.privateNetwork
763
- ) : void 0
728
+ value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork) : void 0
764
729
  }
765
730
  ])
766
731
  });
767
732
  const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({
768
- endpoint_spec: request.endpointSpec.map(
769
- (elt) => marshalReadReplicaEndpointSpec(elt)
770
- )
733
+ endpoint_spec: request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt))
771
734
  });
772
735
  const marshalCreateReadReplicaRequest = (request, defaults) => ({
773
- endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map(
774
- (elt) => marshalReadReplicaEndpointSpec(elt)
775
- ) : void 0,
736
+ endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt)) : void 0,
776
737
  instance_id: request.instanceId,
777
738
  same_zone: request.sameZone
778
739
  });
@@ -848,18 +809,34 @@ const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) =>
848
809
  });
849
810
  const marshalUpgradeInstanceRequest = (request, defaults) => ({
850
811
  ...resolveOneOf([
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 },
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
+ },
856
832
  {
857
833
  param: "major_upgrade_workflow",
858
- value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(
859
- request.majorUpgradeWorkflow
860
- ) : void 0
834
+ value: request.majorUpgradeWorkflow !== void 0 ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(request.majorUpgradeWorkflow) : void 0
861
835
  },
862
- { param: "enable_encryption", value: request.enableEncryption }
836
+ {
837
+ param: "enable_encryption",
838
+ value: request.enableEncryption
839
+ }
863
840
  ])
864
841
  });
865
842
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-rdb",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Scaleway SDK rdb",
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"