@scaleway/sdk-audit-trail 1.1.0 → 1.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.
@@ -3,8 +3,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const sdkClient = require("@scaleway/sdk-client");
4
4
  const marshalling_gen = require("./marshalling.gen.cjs");
5
5
  class API extends sdkClient.API {
6
- /** Lists the available regions of the API. */
7
- static LOCALITIES = ["fr-par", "nl-ams"];
6
+ /**
7
+ * Locality of this API.
8
+ * type ∈ {'zone','region','global','unspecified'}
9
+ */
10
+ static LOCALITY = sdkClient.toApiLocality({
11
+ regions: ["fr-par", "nl-ams"]
12
+ });
8
13
  /**
9
14
  * List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`.
10
15
  *
@@ -1,5 +1,5 @@
1
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
2
- import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
+ import type { ApiLocality } from '@scaleway/sdk-client';
3
3
  import type { ListEventsRequest, ListEventsResponse, ListProductsRequest, ListProductsResponse } from './types.gen';
4
4
  /**
5
5
  * Audit Trail API.
@@ -7,8 +7,11 @@ import type { ListEventsRequest, ListEventsResponse, ListProductsRequest, ListPr
7
7
  This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
8
8
  */
9
9
  export declare class API extends ParentAPI {
10
- /** Lists the available regions of the API. */
11
- static readonly LOCALITIES: ScwRegion[];
10
+ /**
11
+ * Locality of this API.
12
+ * type ∈ {'zone','region','global','unspecified'}
13
+ */
14
+ static readonly LOCALITY: ApiLocality;
12
15
  /**
13
16
  * List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`.
14
17
  *
@@ -1,8 +1,13 @@
1
- import { API as API$1, urlParams, validatePathParam } from "@scaleway/sdk-client";
1
+ import { API as API$1, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
2
2
  import { unmarshalListEventsResponse, unmarshalListProductsResponse } from "./marshalling.gen.js";
3
3
  class API extends API$1 {
4
- /** Lists the available regions of the API. */
5
- static LOCALITIES = ["fr-par", "nl-ams"];
4
+ /**
5
+ * Locality of this API.
6
+ * type ∈ {'zone','region','global','unspecified'}
7
+ */
8
+ static LOCALITY = toApiLocality({
9
+ regions: ["fr-par", "nl-ams"]
10
+ });
6
11
  /**
7
12
  * List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`.
8
13
  *
@@ -16,7 +16,8 @@ const unmarshalAccountUserInfo = (data) => {
16
16
  );
17
17
  }
18
18
  return {
19
- email: data.email
19
+ email: data.email,
20
+ phoneNumber: data.phone_number
20
21
  };
21
22
  };
22
23
  const unmarshalKeyManagerKeyInfo = (data) => {
@@ -72,6 +73,7 @@ const unmarshalSecretManagerSecretInfo = (data) => {
72
73
  );
73
74
  }
74
75
  return {
76
+ keyId: data.key_id,
75
77
  path: data.path
76
78
  };
77
79
  };
@@ -1,4 +1,4 @@
1
- import { isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
1
+ import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  const unmarshalAccountOrganizationInfo = (data) => {
3
3
  if (!isJSONObject(data)) {
4
4
  throw new TypeError(
@@ -14,7 +14,8 @@ const unmarshalAccountUserInfo = (data) => {
14
14
  );
15
15
  }
16
16
  return {
17
- email: data.email
17
+ email: data.email,
18
+ phoneNumber: data.phone_number
18
19
  };
19
20
  };
20
21
  const unmarshalKeyManagerKeyInfo = (data) => {
@@ -70,6 +71,7 @@ const unmarshalSecretManagerSecretInfo = (data) => {
70
71
  );
71
72
  }
72
73
  return {
74
+ keyId: data.key_id,
73
75
  path: data.path
74
76
  };
75
77
  };
@@ -5,6 +5,7 @@ export interface AccountOrganizationInfo {
5
5
  }
6
6
  export interface AccountUserInfo {
7
7
  email: string;
8
+ phoneNumber?: string;
8
9
  }
9
10
  export interface KeyManagerKeyInfo {
10
11
  }
@@ -22,6 +23,7 @@ export interface KubernetesPoolInfo {
22
23
  }
23
24
  export interface SecretManagerSecretInfo {
24
25
  path: string;
26
+ keyId?: string;
25
27
  }
26
28
  export interface SecretManagerSecretVersionInfo {
27
29
  revision: number;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-audit-trail",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Scaleway SDK audit-trail",
5
- "types": "dist/index.d.ts",
5
+ "license": "Apache-2.0",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.3"
33
+ "@scaleway/sdk-std": "1.0.5"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.2"
36
+ "@scaleway/sdk-client": "^1.3.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.2"
39
+ "@scaleway/sdk-client": "^1.3.0"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",