@scaleway/sdk-key-manager 2.3.1 → 2.4.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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,12 +1,13 @@
1
1
  import { marshalCreateKeyRequest, marshalDecryptRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUpdateKeyRequest, marshalVerifyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalVerifyResponse } from "./marshalling.gen.js";
2
- import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
2
+ import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ //#region src/v1alpha1/api.gen.ts
3
4
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
5
  /**
5
6
  * Key Manager API.
6
7
 
7
8
  This API allows you to create, manage and use cryptographic keys in a centralized and secure service.
8
9
  */
9
- var API$1 = class extends API {
10
+ var API = class extends API$1 {
10
11
  /**
11
12
  * Locality of this API.
12
13
  * type ∈ {'zone','region','global','unspecified'}
@@ -250,4 +251,5 @@ var API$1 = class extends API {
250
251
  urlParams: urlParams(["usages", request.usages])
251
252
  }, unmarshalListAlgorithmsResponse);
252
253
  };
253
- export { API$1 as API };
254
+ //#endregion
255
+ export { API };
@@ -1,6 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { marshalCreateKeyRequest, marshalDecryptRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUpdateKeyRequest, marshalVerifyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalVerifyResponse } from "./marshalling.gen.js";
3
3
  import { API } from "./api.gen.js";
4
+ //#region src/v1alpha1/index.gen.ts
4
5
  var index_gen_exports = /* @__PURE__ */ __exportAll({
5
6
  API: () => API,
6
7
  marshalCreateKeyRequest: () => marshalCreateKeyRequest,
@@ -21,4 +22,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
21
22
  unmarshalSignResponse: () => unmarshalSignResponse,
22
23
  unmarshalVerifyResponse: () => unmarshalVerifyResponse
23
24
  });
24
- export { index_gen_exports };
25
+ //#endregion
26
+ export { API, index_gen_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUpdateKeyRequest, marshalVerifyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalVerifyResponse };
@@ -1,4 +1,5 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
+ //#region src/v1alpha1/marshalling.gen.ts
2
3
  var unmarshalKeyRotationPolicy = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KeyRotationPolicy' failed as data isn't a dictionary.`);
4
5
  return {
@@ -14,7 +15,7 @@ var unmarshalKeyUsage = (data) => {
14
15
  symmetricEncryption: data.symmetric_encryption ? data.symmetric_encryption : void 0
15
16
  };
16
17
  };
17
- const unmarshalKey = (data) => {
18
+ var unmarshalKey = (data) => {
18
19
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Key' failed as data isn't a dictionary.`);
19
20
  return {
20
21
  createdAt: unmarshalDate(data.created_at),
@@ -36,7 +37,7 @@ const unmarshalKey = (data) => {
36
37
  usage: data.usage ? unmarshalKeyUsage(data.usage) : void 0
37
38
  };
38
39
  };
39
- const unmarshalDataKey = (data) => {
40
+ var unmarshalDataKey = (data) => {
40
41
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DataKey' failed as data isn't a dictionary.`);
41
42
  return {
42
43
  algorithm: data.algorithm,
@@ -46,7 +47,7 @@ const unmarshalDataKey = (data) => {
46
47
  plaintext: data.plaintext
47
48
  };
48
49
  };
49
- const unmarshalDecryptResponse = (data) => {
50
+ var unmarshalDecryptResponse = (data) => {
50
51
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DecryptResponse' failed as data isn't a dictionary.`);
51
52
  return {
52
53
  ciphertext: data.ciphertext,
@@ -54,7 +55,7 @@ const unmarshalDecryptResponse = (data) => {
54
55
  plaintext: data.plaintext
55
56
  };
56
57
  };
57
- const unmarshalEncryptResponse = (data) => {
58
+ var unmarshalEncryptResponse = (data) => {
58
59
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EncryptResponse' failed as data isn't a dictionary.`);
59
60
  return {
60
61
  ciphertext: data.ciphertext,
@@ -69,29 +70,29 @@ var unmarshalListAlgorithmsResponseAlgorithm = (data) => {
69
70
  usage: data.usage
70
71
  };
71
72
  };
72
- const unmarshalListAlgorithmsResponse = (data) => {
73
+ var unmarshalListAlgorithmsResponse = (data) => {
73
74
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAlgorithmsResponse' failed as data isn't a dictionary.`);
74
75
  return { algorithms: unmarshalArrayOfObject(data.algorithms, unmarshalListAlgorithmsResponseAlgorithm) };
75
76
  };
76
- const unmarshalListKeysResponse = (data) => {
77
+ var unmarshalListKeysResponse = (data) => {
77
78
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListKeysResponse' failed as data isn't a dictionary.`);
78
79
  return {
79
80
  keys: unmarshalArrayOfObject(data.keys, unmarshalKey),
80
81
  totalCount: data.total_count
81
82
  };
82
83
  };
83
- const unmarshalPublicKey = (data) => {
84
+ var unmarshalPublicKey = (data) => {
84
85
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicKey' failed as data isn't a dictionary.`);
85
86
  return { pem: data.pem };
86
87
  };
87
- const unmarshalSignResponse = (data) => {
88
+ var unmarshalSignResponse = (data) => {
88
89
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SignResponse' failed as data isn't a dictionary.`);
89
90
  return {
90
91
  keyId: data.key_id,
91
92
  signature: data.signature
92
93
  };
93
94
  };
94
- const unmarshalVerifyResponse = (data) => {
95
+ var unmarshalVerifyResponse = (data) => {
95
96
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VerifyResponse' failed as data isn't a dictionary.`);
96
97
  return {
97
98
  keyId: data.key_id,
@@ -116,7 +117,7 @@ var marshalKeyUsage = (request, defaults) => ({ ...resolveOneOf([
116
117
  value: request.asymmetricSigning
117
118
  }
118
119
  ]) });
119
- const marshalCreateKeyRequest = (request, defaults) => ({
120
+ var marshalCreateKeyRequest = (request, defaults) => ({
120
121
  description: request.description,
121
122
  name: request.name,
122
123
  origin: request.origin,
@@ -126,31 +127,32 @@ const marshalCreateKeyRequest = (request, defaults) => ({
126
127
  unprotected: request.unprotected,
127
128
  usage: request.usage !== void 0 ? marshalKeyUsage(request.usage, defaults) : void 0
128
129
  });
129
- const marshalDecryptRequest = (request, defaults) => ({
130
+ var marshalDecryptRequest = (request, defaults) => ({
130
131
  associated_data: request.associatedData,
131
132
  ciphertext: request.ciphertext
132
133
  });
133
- const marshalEncryptRequest = (request, defaults) => ({
134
+ var marshalEncryptRequest = (request, defaults) => ({
134
135
  associated_data: request.associatedData,
135
136
  plaintext: request.plaintext
136
137
  });
137
- const marshalGenerateDataKeyRequest = (request, defaults) => ({
138
+ var marshalGenerateDataKeyRequest = (request, defaults) => ({
138
139
  algorithm: request.algorithm,
139
140
  without_plaintext: request.withoutPlaintext
140
141
  });
141
- const marshalImportKeyMaterialRequest = (request, defaults) => ({
142
+ var marshalImportKeyMaterialRequest = (request, defaults) => ({
142
143
  key_material: request.keyMaterial,
143
144
  salt: request.salt
144
145
  });
145
- const marshalSignRequest = (request, defaults) => ({ digest: request.digest });
146
- const marshalUpdateKeyRequest = (request, defaults) => ({
146
+ var marshalSignRequest = (request, defaults) => ({ digest: request.digest });
147
+ var marshalUpdateKeyRequest = (request, defaults) => ({
147
148
  description: request.description,
148
149
  name: request.name,
149
150
  rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy, defaults) : void 0,
150
151
  tags: request.tags
151
152
  });
152
- const marshalVerifyRequest = (request, defaults) => ({
153
+ var marshalVerifyRequest = (request, defaults) => ({
153
154
  digest: request.digest,
154
155
  signature: request.signature
155
156
  });
157
+ //#endregion
156
158
  export { marshalCreateKeyRequest, marshalDecryptRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUpdateKeyRequest, marshalVerifyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalVerifyResponse };
@@ -0,0 +1,48 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "key_manager";
3
+ readonly version: "v1alpha1";
4
+ readonly folderName: "keyManagerv1alpha1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "getKey";
9
+ readonly protoName: "GetKey";
10
+ readonly paramsType: "GetKeyRequest";
11
+ readonly returnType: "Key";
12
+ readonly isList: false;
13
+ readonly paginationType: "none";
14
+ readonly isPrivate: false;
15
+ readonly description: "\"";
16
+ }, {
17
+ readonly methodName: "getPublicKey";
18
+ readonly protoName: "GetPublicKey";
19
+ readonly paramsType: "GetPublicKeyRequest";
20
+ readonly returnType: "PublicKey";
21
+ readonly isList: false;
22
+ readonly paginationType: "none";
23
+ readonly isPrivate: false;
24
+ readonly description: "\"";
25
+ }, {
26
+ readonly methodName: "listKeys";
27
+ readonly protoName: "ListKeys";
28
+ readonly paramsType: "ListKeysRequest";
29
+ readonly returnType: "ListKeysResponse";
30
+ readonly isList: true;
31
+ readonly paginationType: "offset";
32
+ readonly pageParamKey: "page";
33
+ readonly listItemType: "Key";
34
+ readonly isPrivate: false;
35
+ readonly description: "\"";
36
+ }, {
37
+ readonly methodName: "listAlgorithms";
38
+ readonly protoName: "ListAlgorithms";
39
+ readonly paramsType: "ListAlgorithmsRequest";
40
+ readonly returnType: "ListAlgorithmsResponse";
41
+ readonly isList: false;
42
+ readonly paginationType: "none";
43
+ readonly isPrivate: false;
44
+ readonly description: "\"";
45
+ }];
46
+ }];
47
+ };
48
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,55 @@
1
+ //#region src/v1alpha1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "key_manager",
4
+ version: "v1alpha1",
5
+ folderName: "keyManagerv1alpha1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "getKey",
11
+ protoName: "GetKey",
12
+ paramsType: "GetKeyRequest",
13
+ returnType: "Key",
14
+ isList: false,
15
+ paginationType: "none",
16
+ isPrivate: false,
17
+ description: "\""
18
+ },
19
+ {
20
+ methodName: "getPublicKey",
21
+ protoName: "GetPublicKey",
22
+ paramsType: "GetPublicKeyRequest",
23
+ returnType: "PublicKey",
24
+ isList: false,
25
+ paginationType: "none",
26
+ isPrivate: false,
27
+ description: "\""
28
+ },
29
+ {
30
+ methodName: "listKeys",
31
+ protoName: "ListKeys",
32
+ paramsType: "ListKeysRequest",
33
+ returnType: "ListKeysResponse",
34
+ isList: true,
35
+ paginationType: "offset",
36
+ pageParamKey: "page",
37
+ listItemType: "Key",
38
+ isPrivate: false,
39
+ description: "\""
40
+ },
41
+ {
42
+ methodName: "listAlgorithms",
43
+ protoName: "ListAlgorithms",
44
+ paramsType: "ListAlgorithmsRequest",
45
+ returnType: "ListAlgorithmsResponse",
46
+ isList: false,
47
+ paginationType: "none",
48
+ isPrivate: false,
49
+ description: "\""
50
+ }
51
+ ]
52
+ }]
53
+ };
54
+ //#endregion
55
+ export { queriesMetadata };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-key-manager",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK key-manager",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",