@scaleway/sdk-key-manager 2.18.1 → 2.19.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,5 +1,5 @@
1
1
  import { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyRotation, ListAlgorithmsRequest, ListAlgorithmsResponse, ListKeyRotationsRequest, ListKeyRotationsResponse, ListKeysRequest, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
2
- import { API, ApiLocality } from "@scaleway/sdk-client";
2
+ import { API, ApiLocality, RequestOptions } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha1/api.gen.d.ts
4
4
  /**
5
5
  * Key Manager API.
@@ -18,70 +18,70 @@ declare class API$1 extends API {
18
18
  * @param request - The request {@link CreateKeyRequest}
19
19
  * @returns A Promise of Key
20
20
  */
21
- createKey: (request: Readonly<CreateKeyRequest>) => Promise<Key>;
21
+ createKey: (request: Readonly<CreateKeyRequest>, options?: RequestOptions) => Promise<Key>;
22
22
  /**
23
23
  * Get key metadata. Retrieve metadata for a specified key using the `region` and `key_id` parameters.
24
24
  *
25
25
  * @param request - The request {@link GetKeyRequest}
26
26
  * @returns A Promise of Key
27
27
  */
28
- getKey: (request: Readonly<GetKeyRequest>) => Promise<Key>;
28
+ getKey: (request: Readonly<GetKeyRequest>, options?: RequestOptions) => Promise<Key>;
29
29
  /**
30
30
  * Get the public key in PEM format.. Retrieves the public portion of an asymmetric cryptographic key in PEM format.
31
31
  *
32
32
  * @param request - The request {@link GetPublicKeyRequest}
33
33
  * @returns A Promise of PublicKey
34
34
  */
35
- getPublicKey: (request: Readonly<GetPublicKeyRequest>) => Promise<PublicKey>;
35
+ getPublicKey: (request: Readonly<GetPublicKeyRequest>, options?: RequestOptions) => Promise<PublicKey>;
36
36
  /**
37
37
  * Update a key. Modify a key's metadata including name, description and tags, specified by the `key_id` and `region` parameters.
38
38
  *
39
39
  * @param request - The request {@link UpdateKeyRequest}
40
40
  * @returns A Promise of Key
41
41
  */
42
- updateKey: (request: Readonly<UpdateKeyRequest>) => Promise<Key>;
42
+ updateKey: (request: Readonly<UpdateKeyRequest>, options?: RequestOptions) => Promise<Key>;
43
43
  /**
44
44
  * Delete a key. Permanently delete a key specified by the `region` and `key_id` parameters. This action is irreversible. Any data encrypted with this key, including data encryption keys, will no longer be decipherable.
45
45
  *
46
46
  * @param request - The request {@link DeleteKeyRequest}
47
47
  */
48
- deleteKey: (request: Readonly<DeleteKeyRequest>) => Promise<void>;
48
+ deleteKey: (request: Readonly<DeleteKeyRequest>, options?: RequestOptions) => Promise<void>;
49
49
  /**
50
50
  * Rotate a key. Generate a new version of an existing key with new key material. Previous key versions remain usable to decrypt previously encrypted data, but the key's new version will be used for subsequent encryption operations and data key generation.
51
51
  *
52
52
  * @param request - The request {@link RotateKeyRequest}
53
53
  * @returns A Promise of Key
54
54
  */
55
- rotateKey: (request: Readonly<RotateKeyRequest>) => Promise<Key>;
55
+ rotateKey: (request: Readonly<RotateKeyRequest>, options?: RequestOptions) => Promise<Key>;
56
56
  /**
57
57
  * Apply key protection. Apply protection to a given key specified by the `key_id` parameter. Applying key protection means that your key can be used and modified, but it cannot be deleted.
58
58
  *
59
59
  * @param request - The request {@link ProtectKeyRequest}
60
60
  * @returns A Promise of Key
61
61
  */
62
- protectKey: (request: Readonly<ProtectKeyRequest>) => Promise<Key>;
62
+ protectKey: (request: Readonly<ProtectKeyRequest>, options?: RequestOptions) => Promise<Key>;
63
63
  /**
64
64
  * Remove key protection. Remove key protection from a given key specified by the `key_id` parameter. Removing key protection means that your key can be deleted anytime.
65
65
  *
66
66
  * @param request - The request {@link UnprotectKeyRequest}
67
67
  * @returns A Promise of Key
68
68
  */
69
- unprotectKey: (request: Readonly<UnprotectKeyRequest>) => Promise<Key>;
69
+ unprotectKey: (request: Readonly<UnprotectKeyRequest>, options?: RequestOptions) => Promise<Key>;
70
70
  /**
71
71
  * Enable key. Enable a given key to be used for cryptographic operations. Enabling a key allows you to make a disabled key usable again. You must specify the `region` and `key_id` parameters.
72
72
  *
73
73
  * @param request - The request {@link EnableKeyRequest}
74
74
  * @returns A Promise of Key
75
75
  */
76
- enableKey: (request: Readonly<EnableKeyRequest>) => Promise<Key>;
76
+ enableKey: (request: Readonly<EnableKeyRequest>, options?: RequestOptions) => Promise<Key>;
77
77
  /**
78
78
  * Disable key. Disable a given key, preventing it to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
79
79
  *
80
80
  * @param request - The request {@link DisableKeyRequest}
81
81
  * @returns A Promise of Key
82
82
  */
83
- disableKey: (request: Readonly<DisableKeyRequest>) => Promise<Key>;
84
- protected pageOfListKeys: (request: Readonly<ListKeysRequest>) => Promise<ListKeysResponse>;
83
+ disableKey: (request: Readonly<DisableKeyRequest>, options?: RequestOptions) => Promise<Key>;
84
+ protected pageOfListKeys: (request: Readonly<ListKeysRequest>, options?: RequestOptions) => Promise<ListKeysResponse>;
85
85
  /**
86
86
  * List keys. Retrieve a list of keys across all Projects in an Organization or within a specific Project.
87
87
  If the user has permissions for all current and future projects: Either organization_id or project_id is required.
@@ -91,11 +91,11 @@ declare class API$1 extends API {
91
91
  * @param request - The request {@link ListKeysRequest}
92
92
  * @returns A Promise of ListKeysResponse
93
93
  */
94
- listKeys: (request: Readonly<ListKeysRequest>) => Promise<ListKeysResponse> & {
94
+ listKeys: (request: Readonly<ListKeysRequest>, options?: RequestOptions) => Promise<ListKeysResponse> & {
95
95
  all: () => Promise<Key[]>;
96
96
  [Symbol.asyncIterator]: () => AsyncGenerator<Key[], void, void>;
97
97
  };
98
- protected pageOfListKeyRotations: (request: Readonly<ListKeyRotationsRequest>) => Promise<ListKeyRotationsResponse>;
98
+ protected pageOfListKeyRotations: (request: Readonly<ListKeyRotationsRequest>, options?: RequestOptions) => Promise<ListKeyRotationsResponse>;
99
99
  /**
100
100
  * List key rotations. Retrieve a list of all rotations associated with a specific key.
101
101
  The `key_id` and `region` parameters in the path are required.
@@ -103,7 +103,7 @@ declare class API$1 extends API {
103
103
  * @param request - The request {@link ListKeyRotationsRequest}
104
104
  * @returns A Promise of ListKeyRotationsResponse
105
105
  */
106
- listKeyRotations: (request: Readonly<ListKeyRotationsRequest>) => Promise<ListKeyRotationsResponse> & {
106
+ listKeyRotations: (request: Readonly<ListKeyRotationsRequest>, options?: RequestOptions) => Promise<ListKeyRotationsResponse> & {
107
107
  all: () => Promise<KeyRotation[]>;
108
108
  [Symbol.asyncIterator]: () => AsyncGenerator<KeyRotation[], void, void>;
109
109
  };
@@ -115,76 +115,76 @@ declare class API$1 extends API {
115
115
  * @param request - The request {@link GenerateDataKeyRequest}
116
116
  * @returns A Promise of DataKey
117
117
  */
118
- generateDataKey: (request: Readonly<GenerateDataKeyRequest>) => Promise<DataKey>;
118
+ generateDataKey: (request: Readonly<GenerateDataKeyRequest>, options?: RequestOptions) => Promise<DataKey>;
119
119
  /**
120
120
  * Encrypt a payload. Encrypt a payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be encrypted is 64 KB of plaintext.
121
121
  *
122
122
  * @param request - The request {@link EncryptRequest}
123
123
  * @returns A Promise of EncryptResponse
124
124
  */
125
- encrypt: (request: Readonly<EncryptRequest>) => Promise<EncryptResponse>;
125
+ encrypt: (request: Readonly<EncryptRequest>, options?: RequestOptions) => Promise<EncryptResponse>;
126
126
  /**
127
127
  * Decrypt an encrypted payload. Decrypt an encrypted payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is equivalent to the encrypted output of 64 KB of data (around 131 KB).
128
128
  *
129
129
  * @param request - The request {@link DecryptRequest}
130
130
  * @returns A Promise of DecryptResponse
131
131
  */
132
- decrypt: (request: Readonly<DecryptRequest>) => Promise<DecryptResponse>;
132
+ decrypt: (request: Readonly<DecryptRequest>, options?: RequestOptions) => Promise<DecryptResponse>;
133
133
  /**
134
134
  * Sign a message digest. Use a given key to sign a message digest. The key must have its usage set to `asymmetric_signing`. The digest must be created using the same digest algorithm that is defined in the key's algorithm configuration.
135
135
  *
136
136
  * @param request - The request {@link SignRequest}
137
137
  * @returns A Promise of SignResponse
138
138
  */
139
- sign: (request: Readonly<SignRequest>) => Promise<SignResponse>;
139
+ sign: (request: Readonly<SignRequest>, options?: RequestOptions) => Promise<SignResponse>;
140
140
  /**
141
141
  * Verify a message signature. Use a given key to verify a message signature against a message digest. The key must have its usage set to `asymmetric_signing`. The message digest must be generated using the same digest algorithm that is defined in the key's algorithm configuration.
142
142
  *
143
143
  * @param request - The request {@link VerifyRequest}
144
144
  * @returns A Promise of VerifyResponse
145
145
  */
146
- verify: (request: Readonly<VerifyRequest>) => Promise<VerifyResponse>;
146
+ verify: (request: Readonly<VerifyRequest>, options?: RequestOptions) => Promise<VerifyResponse>;
147
147
  /**
148
148
  * Import key material. Import externally generated key material into Key Manager to derive a new cryptographic key. The key's origin must be `external`.
149
149
  *
150
150
  * @param request - The request {@link ImportKeyMaterialRequest}
151
151
  * @returns A Promise of Key
152
152
  */
153
- importKeyMaterial: (request: Readonly<ImportKeyMaterialRequest>) => Promise<Key>;
153
+ importKeyMaterial: (request: Readonly<ImportKeyMaterialRequest>, options?: RequestOptions) => Promise<Key>;
154
154
  /**
155
155
  * Delete key material. Delete previously imported key material. This renders the associated cryptographic key unusable for any operation. The key's origin must be `external`.
156
156
  *
157
157
  * @param request - The request {@link DeleteKeyMaterialRequest}
158
158
  */
159
- deleteKeyMaterial: (request: Readonly<DeleteKeyMaterialRequest>) => Promise<void>;
159
+ deleteKeyMaterial: (request: Readonly<DeleteKeyMaterialRequest>, options?: RequestOptions) => Promise<void>;
160
160
  /**
161
161
  * Restore a key. Restore a key and all its rotations scheduled for deletion specified by the `region` and `key_id` parameters.
162
162
  *
163
163
  * @param request - The request {@link RestoreKeyRequest}
164
164
  * @returns A Promise of Key
165
165
  */
166
- restoreKey: (request: Readonly<RestoreKeyRequest>) => Promise<Key>;
166
+ restoreKey: (request: Readonly<RestoreKeyRequest>, options?: RequestOptions) => Promise<Key>;
167
167
  /**
168
168
  * List all available algorithms. Lists all cryptographic algorithms supported by the Key Manager service.
169
169
  *
170
170
  * @param request - The request {@link ListAlgorithmsRequest}
171
171
  * @returns A Promise of ListAlgorithmsResponse
172
172
  */
173
- listAlgorithms: (request?: Readonly<ListAlgorithmsRequest>) => Promise<ListAlgorithmsResponse>;
173
+ listAlgorithms: (request?: Readonly<ListAlgorithmsRequest>, options?: RequestOptions) => Promise<ListAlgorithmsResponse>;
174
174
  /**
175
175
  * Wrap a key. Wrap (encrypt) a key using an existing key, specified by the `key_id` parameter. The key must use ML-KEM algorithm. The maximum key size that can be wrapped is 2 KB of plaintext.
176
176
  *
177
177
  * @param request - The request {@link WrapKeyRequest}
178
178
  * @returns A Promise of WrapKeyResponse
179
179
  */
180
- wrapKey: (request: Readonly<WrapKeyRequest>) => Promise<WrapKeyResponse>;
180
+ wrapKey: (request: Readonly<WrapKeyRequest>, options?: RequestOptions) => Promise<WrapKeyResponse>;
181
181
  /**
182
182
  * Unwrap a key. Unwrap (decrypt) a wrapped key using an existing key, specified by the `key_id` parameter. The key must use ML-KEM algorithm. The maximum key size that can be unwrapped is 4 KB of ciphertext.
183
183
  *
184
184
  * @param request - The request {@link UnwrapKeyRequest}
185
185
  * @returns A Promise of UnwrapKeyResponse
186
186
  */
187
- unwrapKey: (request: Readonly<UnwrapKeyRequest>) => Promise<UnwrapKeyResponse>;
187
+ unwrapKey: (request: Readonly<UnwrapKeyRequest>, options?: RequestOptions) => Promise<UnwrapKeyResponse>;
188
188
  }
189
189
  //#endregion
190
190
  export { API$1 as API };
@@ -11,136 +11,159 @@ This API allows you to create, manage and use cryptographic keys in a centralize
11
11
  var API$1 = class extends API {
12
12
  constructor(..._args) {
13
13
  super(..._args);
14
- this.createKey = (request) => this.client.fetch({
14
+ this.createKey = (request, options) => this.client.fetch({
15
15
  body: JSON.stringify(marshalCreateKeyRequest(request, this.client.settings)),
16
16
  headers: jsonContentHeaders,
17
17
  method: "POST",
18
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`
18
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
19
+ signal: options?.signal
19
20
  }, unmarshalKey);
20
- this.getKey = (request) => this.client.fetch({
21
+ this.getKey = (request, options) => this.client.fetch({
21
22
  method: "GET",
22
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`
23
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
24
+ signal: options?.signal
23
25
  }, unmarshalKey);
24
- this.getPublicKey = (request) => this.client.fetch({
26
+ this.getPublicKey = (request, options) => this.client.fetch({
25
27
  method: "GET",
26
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/public-key`
28
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/public-key`,
29
+ signal: options?.signal
27
30
  }, unmarshalPublicKey);
28
- this.updateKey = (request) => this.client.fetch({
31
+ this.updateKey = (request, options) => this.client.fetch({
29
32
  body: JSON.stringify(marshalUpdateKeyRequest(request, this.client.settings)),
30
33
  headers: jsonContentHeaders,
31
34
  method: "PATCH",
32
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`
35
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
36
+ signal: options?.signal
33
37
  }, unmarshalKey);
34
- this.deleteKey = (request) => this.client.fetch({
38
+ this.deleteKey = (request, options) => this.client.fetch({
35
39
  method: "DELETE",
36
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`
40
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
41
+ signal: options?.signal
37
42
  });
38
- this.rotateKey = (request) => this.client.fetch({
43
+ this.rotateKey = (request, options) => this.client.fetch({
39
44
  body: "{}",
40
45
  headers: jsonContentHeaders,
41
46
  method: "POST",
42
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotate`
47
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotate`,
48
+ signal: options?.signal
43
49
  }, unmarshalKey);
44
- this.protectKey = (request) => this.client.fetch({
50
+ this.protectKey = (request, options) => this.client.fetch({
45
51
  body: "{}",
46
52
  headers: jsonContentHeaders,
47
53
  method: "POST",
48
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/protect`
54
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/protect`,
55
+ signal: options?.signal
49
56
  }, unmarshalKey);
50
- this.unprotectKey = (request) => this.client.fetch({
57
+ this.unprotectKey = (request, options) => this.client.fetch({
51
58
  body: "{}",
52
59
  headers: jsonContentHeaders,
53
60
  method: "POST",
54
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unprotect`
61
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unprotect`,
62
+ signal: options?.signal
55
63
  }, unmarshalKey);
56
- this.enableKey = (request) => this.client.fetch({
64
+ this.enableKey = (request, options) => this.client.fetch({
57
65
  body: "{}",
58
66
  headers: jsonContentHeaders,
59
67
  method: "POST",
60
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/enable`
68
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/enable`,
69
+ signal: options?.signal
61
70
  }, unmarshalKey);
62
- this.disableKey = (request) => this.client.fetch({
71
+ this.disableKey = (request, options) => this.client.fetch({
63
72
  body: "{}",
64
73
  headers: jsonContentHeaders,
65
74
  method: "POST",
66
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/disable`
75
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/disable`,
76
+ signal: options?.signal
67
77
  }, unmarshalKey);
68
- this.pageOfListKeys = (request) => this.client.fetch({
78
+ this.pageOfListKeys = (request, options) => this.client.fetch({
69
79
  method: "GET",
70
80
  path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
71
- urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["protection_level", request.protectionLevel], ["scheduled_for_deletion", request.scheduledForDeletion], ["tags", request.tags], ["usage", request.usage])
81
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["protection_level", request.protectionLevel], ["scheduled_for_deletion", request.scheduledForDeletion], ["tags", request.tags], ["usage", request.usage]),
82
+ signal: options?.signal
72
83
  }, unmarshalListKeysResponse);
73
- this.listKeys = (request) => enrichForPagination("keys", this.pageOfListKeys, request);
74
- this.pageOfListKeyRotations = (request) => this.client.fetch({
84
+ this.listKeys = (request, options) => enrichForPagination("keys", this.pageOfListKeys, request, options);
85
+ this.pageOfListKeyRotations = (request, options) => this.client.fetch({
75
86
  method: "GET",
76
87
  path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotations`,
77
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["status", request.status])
88
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["status", request.status]),
89
+ signal: options?.signal
78
90
  }, unmarshalListKeyRotationsResponse);
79
- this.listKeyRotations = (request) => enrichForPagination("rotations", this.pageOfListKeyRotations, request);
80
- this.generateDataKey = (request) => this.client.fetch({
91
+ this.listKeyRotations = (request, options) => enrichForPagination("rotations", this.pageOfListKeyRotations, request, options);
92
+ this.generateDataKey = (request, options) => this.client.fetch({
81
93
  body: JSON.stringify(marshalGenerateDataKeyRequest(request, this.client.settings)),
82
94
  headers: jsonContentHeaders,
83
95
  method: "POST",
84
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/generate-data-key`
96
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/generate-data-key`,
97
+ signal: options?.signal
85
98
  }, unmarshalDataKey);
86
- this.encrypt = (request) => this.client.fetch({
99
+ this.encrypt = (request, options) => this.client.fetch({
87
100
  body: JSON.stringify(marshalEncryptRequest(request, this.client.settings)),
88
101
  headers: jsonContentHeaders,
89
102
  method: "POST",
90
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/encrypt`
103
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/encrypt`,
104
+ signal: options?.signal
91
105
  }, unmarshalEncryptResponse);
92
- this.decrypt = (request) => this.client.fetch({
106
+ this.decrypt = (request, options) => this.client.fetch({
93
107
  body: JSON.stringify(marshalDecryptRequest(request, this.client.settings)),
94
108
  headers: jsonContentHeaders,
95
109
  method: "POST",
96
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/decrypt`
110
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/decrypt`,
111
+ signal: options?.signal
97
112
  }, unmarshalDecryptResponse);
98
- this.sign = (request) => this.client.fetch({
113
+ this.sign = (request, options) => this.client.fetch({
99
114
  body: JSON.stringify(marshalSignRequest(request, this.client.settings)),
100
115
  headers: jsonContentHeaders,
101
116
  method: "POST",
102
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/sign`
117
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/sign`,
118
+ signal: options?.signal
103
119
  }, unmarshalSignResponse);
104
- this.verify = (request) => this.client.fetch({
120
+ this.verify = (request, options) => this.client.fetch({
105
121
  body: JSON.stringify(marshalVerifyRequest(request, this.client.settings)),
106
122
  headers: jsonContentHeaders,
107
123
  method: "POST",
108
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/verify`
124
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/verify`,
125
+ signal: options?.signal
109
126
  }, unmarshalVerifyResponse);
110
- this.importKeyMaterial = (request) => this.client.fetch({
127
+ this.importKeyMaterial = (request, options) => this.client.fetch({
111
128
  body: JSON.stringify(marshalImportKeyMaterialRequest(request, this.client.settings)),
112
129
  headers: jsonContentHeaders,
113
130
  method: "POST",
114
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-key-material`
131
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-key-material`,
132
+ signal: options?.signal
115
133
  }, unmarshalKey);
116
- this.deleteKeyMaterial = (request) => this.client.fetch({
134
+ this.deleteKeyMaterial = (request, options) => this.client.fetch({
117
135
  body: JSON.stringify(marshalDeleteKeyMaterialRequest(request, this.client.settings)),
118
136
  headers: jsonContentHeaders,
119
137
  method: "POST",
120
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material`
138
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material`,
139
+ signal: options?.signal
121
140
  });
122
- this.restoreKey = (request) => this.client.fetch({
141
+ this.restoreKey = (request, options) => this.client.fetch({
123
142
  body: "{}",
124
143
  headers: jsonContentHeaders,
125
144
  method: "POST",
126
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/restore`
145
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/restore`,
146
+ signal: options?.signal
127
147
  }, unmarshalKey);
128
- this.listAlgorithms = (request = {}) => this.client.fetch({
148
+ this.listAlgorithms = (request = {}, options) => this.client.fetch({
129
149
  method: "GET",
130
150
  path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/algorithms`,
131
- urlParams: urlParams(["usages", request.usages])
151
+ urlParams: urlParams(["usages", request.usages]),
152
+ signal: options?.signal
132
153
  }, unmarshalListAlgorithmsResponse);
133
- this.wrapKey = (request) => this.client.fetch({
154
+ this.wrapKey = (request, options) => this.client.fetch({
134
155
  body: JSON.stringify(marshalWrapKeyRequest(request, this.client.settings)),
135
156
  headers: jsonContentHeaders,
136
157
  method: "POST",
137
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/wrap`
158
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/wrap`,
159
+ signal: options?.signal
138
160
  }, unmarshalWrapKeyResponse);
139
- this.unwrapKey = (request) => this.client.fetch({
161
+ this.unwrapKey = (request, options) => this.client.fetch({
140
162
  body: JSON.stringify(marshalUnwrapKeyRequest(request, this.client.settings)),
141
163
  headers: jsonContentHeaders,
142
164
  method: "POST",
143
- path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unwrap`
165
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unwrap`,
166
+ signal: options?.signal
144
167
  }, unmarshalUnwrapKeyResponse);
145
168
  }
146
169
  static {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-key-manager",
3
- "version": "2.18.1",
3
+ "version": "2.19.0",
4
4
  "description": "Scaleway SDK key-manager",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {