@scaleway/sdk 1.39.0 → 1.40.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.
@@ -17,7 +17,7 @@ const jsonContentHeaders = {
17
17
  */
18
18
  class API extends API$1 {
19
19
  /** Lists the available regions of the API. */
20
- static LOCALITIES = ['fr-par'];
20
+ static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
21
21
 
22
22
  /**
23
23
  * Create a secret. You must specify the `region` to create a secret.
@@ -99,7 +99,7 @@ class API extends API$1 {
99
99
  return _this.client.fetch({
100
100
  method: 'GET',
101
101
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/secrets`,
102
- urlParams: urlParams(['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
102
+ urlParams: urlParams(['is_ephemeral', request.isEphemeral], ['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
103
103
  }, unmarshalListSecretsResponse);
104
104
  };
105
105
  })();
@@ -22,6 +22,8 @@ const unmarshalSecret = data => {
22
22
  return {
23
23
  createdAt: unmarshalDate(data.created_at),
24
24
  description: data.description,
25
+ ephemeralAction: data.ephemeral_action,
26
+ expiresAt: unmarshalDate(data.expires_at),
25
27
  id: data.id,
26
28
  isManaged: data.is_managed,
27
29
  isProtected: data.is_protected,
@@ -115,6 +117,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
115
117
  });
116
118
  const marshalCreateSecretRequest = (request, defaults) => ({
117
119
  description: request.description,
120
+ ephemeral_action: request.ephemeralAction ?? 'unknown_ephemeral_action',
121
+ expires_at: request.expiresAt,
118
122
  name: request.name,
119
123
  path: request.path,
120
124
  project_id: request.projectId ?? defaults.defaultProjectId,
package/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v1.38.1';
500
+ const version = 'v1.39.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () =>
@@ -23714,6 +23714,8 @@ const unmarshalSecret = data => {
23714
23714
  return {
23715
23715
  createdAt: unmarshalDate(data.created_at),
23716
23716
  description: data.description,
23717
+ ephemeralAction: data.ephemeral_action,
23718
+ expiresAt: unmarshalDate(data.expires_at),
23717
23719
  id: data.id,
23718
23720
  isManaged: data.is_managed,
23719
23721
  isProtected: data.is_protected,
@@ -23807,6 +23809,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
23807
23809
  });
23808
23810
  const marshalCreateSecretRequest = (request, defaults) => ({
23809
23811
  description: request.description,
23812
+ ephemeral_action: request.ephemeralAction ?? 'unknown_ephemeral_action',
23813
+ expires_at: request.expiresAt,
23810
23814
  name: request.name,
23811
23815
  path: request.path,
23812
23816
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -23856,7 +23860,7 @@ const jsonContentHeaders$6 = {
23856
23860
  */
23857
23861
  let API$6 = class API extends API$v {
23858
23862
  /** Lists the available regions of the API. */
23859
- static LOCALITIES = ['fr-par'];
23863
+ static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
23860
23864
 
23861
23865
  /**
23862
23866
  * Create a secret. You must specify the `region` to create a secret.
@@ -23932,7 +23936,7 @@ let API$6 = class API extends API$v {
23932
23936
  pageOfListSecrets = (request = {}) => this.client.fetch({
23933
23937
  method: 'GET',
23934
23938
  path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets`,
23935
- urlParams: urlParams(['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
23939
+ urlParams: urlParams(['is_ephemeral', request.isEphemeral], ['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
23936
23940
  }, unmarshalListSecretsResponse);
23937
23941
 
23938
23942
  /**
package/dist/index.d.ts CHANGED
@@ -27992,6 +27992,7 @@ declare namespace index$6 {
27992
27992
  type ListFoldersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
27993
27993
  type ListSecretsRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
27994
27994
  type Product = 'unknown';
27995
+ type SecretEphemeralAction = 'unknown_ephemeral_action' | 'delete_secret' | 'disable_secret';
27995
27996
  type SecretStatus = 'ready' | 'locked';
27996
27997
  type SecretType = 'unknown_secret_type' | 'opaque' | 'certificate' | 'key_value';
27997
27998
  type SecretVersionStatus = 'unknown' | 'enabled' | 'disabled' | 'destroyed';
@@ -28098,6 +28099,16 @@ interface Secret {
28098
28099
  type: SecretType;
28099
28100
  /** Path of the secret. Location of the secret in the directory structure. */
28100
28101
  path: string;
28102
+ /**
28103
+ * Expiration date of the secret. (Optional.) Date on which the secret will be
28104
+ * deleted or deactivated.
28105
+ */
28106
+ expiresAt?: Date;
28107
+ /**
28108
+ * Action to be taken when the secret expires. See `Secret.EphemeralAction`
28109
+ * enum for description of values.
28110
+ */
28111
+ ephemeralAction: SecretEphemeralAction;
28101
28112
  /** Region of the secret. */
28102
28113
  region: Region;
28103
28114
  }
@@ -28150,6 +28161,13 @@ type CreateSecretRequest = {
28150
28161
  * structure. If not specified, the path is `/`.
28151
28162
  */
28152
28163
  path?: string;
28164
+ /**
28165
+ * Expiration date of the secret. (Optional.) Date on which the secret will be
28166
+ * deleted or deactivated.
28167
+ */
28168
+ expiresAt?: Date;
28169
+ /** Action to be taken when the secret expires. */
28170
+ ephemeralAction?: SecretEphemeralAction;
28153
28171
  };
28154
28172
  type CreateFolderRequest = {
28155
28173
  /**
@@ -28231,6 +28249,8 @@ type ListSecretsRequest = {
28231
28249
  isManaged?: boolean;
28232
28250
  /** Filter by path (optional). */
28233
28251
  path?: string;
28252
+ /** Filter by ephemeral / not ephemeral (optional). */
28253
+ isEphemeral?: boolean;
28234
28254
  };
28235
28255
  type ListFoldersRequest = {
28236
28256
  /**
@@ -28841,6 +28861,7 @@ type index_gen$6_PasswordGenerationParams = PasswordGenerationParams;
28841
28861
  type index_gen$6_Product = Product;
28842
28862
  type index_gen$6_ProtectSecretRequest = ProtectSecretRequest;
28843
28863
  type index_gen$6_Secret = Secret;
28864
+ type index_gen$6_SecretEphemeralAction = SecretEphemeralAction;
28844
28865
  type index_gen$6_SecretStatus = SecretStatus;
28845
28866
  type index_gen$6_SecretType = SecretType;
28846
28867
  type index_gen$6_SecretVersion = SecretVersion;
@@ -28849,7 +28870,7 @@ type index_gen$6_UnprotectSecretRequest = UnprotectSecretRequest;
28849
28870
  type index_gen$6_UpdateSecretRequest = UpdateSecretRequest;
28850
28871
  type index_gen$6_UpdateSecretVersionRequest = UpdateSecretVersionRequest;
28851
28872
  declare namespace index_gen$6 {
28852
- export { API$6 as API, type index_gen$6_AccessSecretVersionByNameRequest as AccessSecretVersionByNameRequest, type index_gen$6_AccessSecretVersionRequest as AccessSecretVersionRequest, type index_gen$6_AccessSecretVersionResponse as AccessSecretVersionResponse, type index_gen$6_AddSecretOwnerRequest as AddSecretOwnerRequest, type index_gen$6_CreateFolderRequest as CreateFolderRequest, type index_gen$6_CreateSecretRequest as CreateSecretRequest, type index_gen$6_CreateSecretVersionRequest as CreateSecretVersionRequest, type index_gen$6_DeleteFolderRequest as DeleteFolderRequest, type index_gen$6_DeleteSecretRequest as DeleteSecretRequest, type index_gen$6_DestroySecretVersionRequest as DestroySecretVersionRequest, type index_gen$6_DisableSecretVersionRequest as DisableSecretVersionRequest, type index_gen$6_EnableSecretVersionRequest as EnableSecretVersionRequest, type index_gen$6_Folder as Folder, type index_gen$6_GeneratePasswordRequest as GeneratePasswordRequest, type index_gen$6_GetSecretByNameRequest as GetSecretByNameRequest, type index_gen$6_GetSecretRequest as GetSecretRequest, type index_gen$6_GetSecretVersionByNameRequest as GetSecretVersionByNameRequest, type index_gen$6_GetSecretVersionRequest as GetSecretVersionRequest, type index_gen$6_ListFoldersRequest as ListFoldersRequest, type index_gen$6_ListFoldersRequestOrderBy as ListFoldersRequestOrderBy, type index_gen$6_ListFoldersResponse as ListFoldersResponse, type index_gen$6_ListSecretVersionsByNameRequest as ListSecretVersionsByNameRequest, type index_gen$6_ListSecretVersionsRequest as ListSecretVersionsRequest, type index_gen$6_ListSecretVersionsResponse as ListSecretVersionsResponse, type index_gen$6_ListSecretsRequest as ListSecretsRequest, type index_gen$6_ListSecretsRequestOrderBy as ListSecretsRequestOrderBy, type index_gen$6_ListSecretsResponse as ListSecretsResponse, type index_gen$6_ListTagsRequest as ListTagsRequest, type index_gen$6_ListTagsResponse as ListTagsResponse, type index_gen$6_PasswordGenerationParams as PasswordGenerationParams, type index_gen$6_Product as Product, type index_gen$6_ProtectSecretRequest as ProtectSecretRequest, type index_gen$6_Secret as Secret, type index_gen$6_SecretStatus as SecretStatus, type index_gen$6_SecretType as SecretType, type index_gen$6_SecretVersion as SecretVersion, type index_gen$6_SecretVersionStatus as SecretVersionStatus, type index_gen$6_UnprotectSecretRequest as UnprotectSecretRequest, type index_gen$6_UpdateSecretRequest as UpdateSecretRequest, type index_gen$6_UpdateSecretVersionRequest as UpdateSecretVersionRequest };
28873
+ export { API$6 as API, type index_gen$6_AccessSecretVersionByNameRequest as AccessSecretVersionByNameRequest, type index_gen$6_AccessSecretVersionRequest as AccessSecretVersionRequest, type index_gen$6_AccessSecretVersionResponse as AccessSecretVersionResponse, type index_gen$6_AddSecretOwnerRequest as AddSecretOwnerRequest, type index_gen$6_CreateFolderRequest as CreateFolderRequest, type index_gen$6_CreateSecretRequest as CreateSecretRequest, type index_gen$6_CreateSecretVersionRequest as CreateSecretVersionRequest, type index_gen$6_DeleteFolderRequest as DeleteFolderRequest, type index_gen$6_DeleteSecretRequest as DeleteSecretRequest, type index_gen$6_DestroySecretVersionRequest as DestroySecretVersionRequest, type index_gen$6_DisableSecretVersionRequest as DisableSecretVersionRequest, type index_gen$6_EnableSecretVersionRequest as EnableSecretVersionRequest, type index_gen$6_Folder as Folder, type index_gen$6_GeneratePasswordRequest as GeneratePasswordRequest, type index_gen$6_GetSecretByNameRequest as GetSecretByNameRequest, type index_gen$6_GetSecretRequest as GetSecretRequest, type index_gen$6_GetSecretVersionByNameRequest as GetSecretVersionByNameRequest, type index_gen$6_GetSecretVersionRequest as GetSecretVersionRequest, type index_gen$6_ListFoldersRequest as ListFoldersRequest, type index_gen$6_ListFoldersRequestOrderBy as ListFoldersRequestOrderBy, type index_gen$6_ListFoldersResponse as ListFoldersResponse, type index_gen$6_ListSecretVersionsByNameRequest as ListSecretVersionsByNameRequest, type index_gen$6_ListSecretVersionsRequest as ListSecretVersionsRequest, type index_gen$6_ListSecretVersionsResponse as ListSecretVersionsResponse, type index_gen$6_ListSecretsRequest as ListSecretsRequest, type index_gen$6_ListSecretsRequestOrderBy as ListSecretsRequestOrderBy, type index_gen$6_ListSecretsResponse as ListSecretsResponse, type index_gen$6_ListTagsRequest as ListTagsRequest, type index_gen$6_ListTagsResponse as ListTagsResponse, type index_gen$6_PasswordGenerationParams as PasswordGenerationParams, type index_gen$6_Product as Product, type index_gen$6_ProtectSecretRequest as ProtectSecretRequest, type index_gen$6_Secret as Secret, type index_gen$6_SecretEphemeralAction as SecretEphemeralAction, type index_gen$6_SecretStatus as SecretStatus, type index_gen$6_SecretType as SecretType, type index_gen$6_SecretVersion as SecretVersion, type index_gen$6_SecretVersionStatus as SecretVersionStatus, type index_gen$6_UnprotectSecretRequest as UnprotectSecretRequest, type index_gen$6_UpdateSecretRequest as UpdateSecretRequest, type index_gen$6_UpdateSecretVersionRequest as UpdateSecretVersionRequest };
28853
28874
  }
28854
28875
 
28855
28876
  declare namespace index$5 {
@@ -1,4 +1,4 @@
1
- const version = 'v1.38.1';
1
+ const version = 'v1.39.0';
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
 
4
4
  export { userAgent, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "1.39.0",
3
+ "version": "1.40.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -35,5 +35,5 @@
35
35
  "bundledDependencies": [
36
36
  "@scaleway/random-name"
37
37
  ],
38
- "gitHead": "a41cbdaf36cd061bb42585d2be29d067c19e5745"
38
+ "gitHead": "2871a6bff26dbbe85f11caae39632d4a9ff13f60"
39
39
  }