@scaleway/sdk-secret 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.
@@ -9,7 +9,11 @@ class API extends API$1 {
9
9
  * type ∈ {'zone','region','global','unspecified'}
10
10
  */
11
11
  static LOCALITY = toApiLocality({
12
- regions: ["fr-par", "nl-ams", "pl-waw"]
12
+ regions: [
13
+ "fr-par",
14
+ "nl-ams",
15
+ "pl-waw"
16
+ ]
13
17
  });
14
18
  /**
15
19
  * Create a secret. Create a secret in a given region specified by the `region` parameter.
@@ -63,10 +67,12 @@ class API extends API$1 {
63
67
  *
64
68
  * @param request - The request {@link DeleteSecretRequest}
65
69
  */
66
- deleteSecret = (request) => this.client.fetch({
67
- method: "DELETE",
68
- path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
69
- });
70
+ deleteSecret = (request) => this.client.fetch(
71
+ {
72
+ method: "DELETE",
73
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
74
+ }
75
+ );
70
76
  pageOfListSecrets = (request) => this.client.fetch(
71
77
  {
72
78
  method: "GET",
@@ -77,10 +83,7 @@ class API extends API$1 {
77
83
  ["order_by", request.orderBy],
78
84
  ["organization_id", request.organizationId],
79
85
  ["page", request.page],
80
- [
81
- "page_size",
82
- request.pageSize ?? this.client.settings.defaultPageSize
83
- ],
86
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
84
87
  ["path", request.path],
85
88
  ["project_id", request.projectId],
86
89
  ["scheduled_for_deletion", request.scheduledForDeletion],
@@ -110,10 +113,7 @@ class API extends API$1 {
110
113
  urlParams: urlParams(
111
114
  ["order_by", request.orderBy],
112
115
  ["page", request.page],
113
- [
114
- "page_size",
115
- request.pageSize ?? this.client.settings.defaultPageSize
116
- ],
116
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
117
117
  ["prefix", request.prefix],
118
118
  ["project_id", request.projectId],
119
119
  ["tags", request.tags],
@@ -157,14 +157,16 @@ class API extends API$1 {
157
157
  *
158
158
  * @param request - The request {@link AddSecretOwnerRequest}
159
159
  */
160
- addSecretOwner = (request) => this.client.fetch({
161
- body: JSON.stringify(
162
- marshalAddSecretOwnerRequest(request, this.client.settings)
163
- ),
164
- headers: jsonContentHeaders,
165
- method: "POST",
166
- path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/add-owner`
167
- });
160
+ addSecretOwner = (request) => this.client.fetch(
161
+ {
162
+ body: JSON.stringify(
163
+ marshalAddSecretOwnerRequest(request, this.client.settings)
164
+ ),
165
+ headers: jsonContentHeaders,
166
+ method: "POST",
167
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/add-owner`
168
+ }
169
+ );
168
170
  /**
169
171
  * Create a version. Create a version of a given secret specified by the `region` and `secret_id` parameters.
170
172
  *
@@ -217,20 +219,19 @@ class API extends API$1 {
217
219
  *
218
220
  * @param request - The request {@link DeleteSecretVersionRequest}
219
221
  */
220
- deleteSecretVersion = (request) => this.client.fetch({
221
- method: "DELETE",
222
- path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions/${validatePathParam("revision", request.revision)}`
223
- });
222
+ deleteSecretVersion = (request) => this.client.fetch(
223
+ {
224
+ method: "DELETE",
225
+ path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions/${validatePathParam("revision", request.revision)}`
226
+ }
227
+ );
224
228
  pageOfListSecretVersions = (request) => this.client.fetch(
225
229
  {
226
230
  method: "GET",
227
231
  path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions`,
228
232
  urlParams: urlParams(
229
233
  ["page", request.page],
230
- [
231
- "page_size",
232
- request.pageSize ?? this.client.settings.defaultPageSize
233
- ],
234
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
234
235
  ["status", request.status]
235
236
  )
236
237
  },
@@ -267,10 +268,7 @@ class API extends API$1 {
267
268
  method: "GET",
268
269
  path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets-by-path/versions/${validatePathParam("revision", request.revision)}/access`,
269
270
  urlParams: urlParams(
270
- [
271
- "project_id",
272
- request.projectId ?? this.client.settings.defaultProjectId
273
- ],
271
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
274
272
  ["secret_name", request.secretName],
275
273
  ["secret_path", request.secretPath]
276
274
  )
@@ -313,14 +311,8 @@ class API extends API$1 {
313
311
  path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tags`,
314
312
  urlParams: urlParams(
315
313
  ["page", request.page],
316
- [
317
- "page_size",
318
- request.pageSize ?? this.client.settings.defaultPageSize
319
- ],
320
- [
321
- "project_id",
322
- request.projectId ?? this.client.settings.defaultProjectId
323
- ]
314
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
315
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
324
316
  )
325
317
  },
326
318
  unmarshalListTagsResponse
@@ -338,14 +330,8 @@ class API extends API$1 {
338
330
  path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secret-types`,
339
331
  urlParams: urlParams(
340
332
  ["page", request.page],
341
- [
342
- "page_size",
343
- request.pageSize ?? this.client.settings.defaultPageSize
344
- ],
345
- [
346
- "project_id",
347
- request.projectId ?? this.client.settings.defaultProjectId
348
- ]
333
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
334
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
349
335
  )
350
336
  },
351
337
  unmarshalListSecretTypesResponse
@@ -1,4 +1,4 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './marshalling.gen.js';
3
3
  export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, RestoreSecretRequest, RestoreSecretVersionRequest, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, SSHKey, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen.js';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -129,10 +129,7 @@ const unmarshalBrowseSecretsResponse = (data) => {
129
129
  }
130
130
  return {
131
131
  currentPath: data.current_path,
132
- items: unmarshalArrayOfObject(
133
- data.items,
134
- unmarshalBrowseSecretsResponseItem
135
- ),
132
+ items: unmarshalArrayOfObject(data.items, unmarshalBrowseSecretsResponseItem),
136
133
  totalCount: data.total_count
137
134
  };
138
135
  };
@@ -70,10 +70,10 @@ export interface SecretVersion {
70
70
  secretId: string;
71
71
  /**
72
72
  * * `unknown_status`: the version is in an invalid state.
73
- * `enabled`: the version is accessible.
74
- * `disabled`: the version is not accessible but can be enabled.
75
- * `scheduled_for_deletion`: the version is scheduled for deletion. It will be deleted in 7 days.
76
- * `deleted`: the version is permanently deleted. It is not possible to recover it.
73
+ * `enabled`: the version is accessible.
74
+ * `disabled`: the version is not accessible but can be enabled.
75
+ * `scheduled_for_deletion`: the version is scheduled for deletion. It will be deleted in 7 days.
76
+ * `deleted`: the version is permanently deleted. It is not possible to recover it.
77
77
  */
78
78
  status: SecretVersionStatus;
79
79
  /**
@@ -124,7 +124,7 @@ export interface Secret {
124
124
  name: string;
125
125
  /**
126
126
  * * `ready`: the secret can be read, modified and deleted.
127
- * `locked`: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
127
+ * `locked`: no action can be performed on the secret. This status can only be applied and removed by Scaleway.
128
128
  */
129
129
  status: SecretStatus;
130
130
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-secret",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Scaleway SDK secret",
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"