@scaleway/sdk-mongodb 1.0.5 → 1.0.6

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.
@@ -44,6 +44,20 @@ const unmarshalInstanceSetting = (data) => {
44
44
  value: data.value
45
45
  };
46
46
  };
47
+ const unmarshalInstanceSnapshotSchedule = (data) => {
48
+ if (!isJSONObject(data)) {
49
+ throw new TypeError(
50
+ `Unmarshalling the type 'InstanceSnapshotSchedule' failed as data isn't a dictionary.`
51
+ );
52
+ }
53
+ return {
54
+ enabled: data.enabled,
55
+ frequencyHours: data.frequency_hours,
56
+ lastRun: unmarshalDate(data.last_run),
57
+ nextUpdate: unmarshalDate(data.next_update),
58
+ retentionDays: data.retention_days
59
+ };
60
+ };
47
61
  const unmarshalVolume = (data) => {
48
62
  if (!isJSONObject(data)) {
49
63
  throw new TypeError(
@@ -71,6 +85,7 @@ const unmarshalInstance = (data) => {
71
85
  projectId: data.project_id,
72
86
  region: data.region,
73
87
  settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
88
+ snapshotSchedule: data.snapshot_schedule ? unmarshalInstanceSnapshotSchedule(data.snapshot_schedule) : void 0,
74
89
  status: data.status,
75
90
  tags: data.tags,
76
91
  version: data.version,
@@ -350,6 +365,7 @@ export {
350
365
  unmarshalEndpoint,
351
366
  unmarshalInstance,
352
367
  unmarshalInstanceSetting,
368
+ unmarshalInstanceSnapshotSchedule,
353
369
  unmarshalListInstancesResponse,
354
370
  unmarshalListNodeTypesResponse,
355
371
  unmarshalListSnapshotsResponse,
@@ -67,6 +67,13 @@ export interface InstanceSetting {
67
67
  */
68
68
  value: string;
69
69
  }
70
+ export interface InstanceSnapshotSchedule {
71
+ frequencyHours: number;
72
+ retentionDays: number;
73
+ enabled: boolean;
74
+ nextUpdate?: Date;
75
+ lastRun?: Date;
76
+ }
70
77
  export interface Volume {
71
78
  /**
72
79
  * Type of volume where data is stored.
@@ -237,6 +244,10 @@ export interface Instance {
237
244
  * Creation date (must follow the ISO 8601 format).
238
245
  */
239
246
  createdAt?: Date;
247
+ /**
248
+ * Snapshot schedule configuration of the Database Instance.
249
+ */
250
+ snapshotSchedule?: InstanceSnapshotSchedule;
240
251
  /**
241
252
  * Region the Database Instance is in.
242
253
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-mongodb",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Scaleway SDK mongodb",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.4"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.3"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.3"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",