@scaleway/sdk 1.39.0 → 1.41.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
  })();
@@ -12,7 +12,8 @@ const unmarshalFolder = data => {
12
12
  id: data.id,
13
13
  name: data.name,
14
14
  path: data.path,
15
- projectId: data.project_id
15
+ projectId: data.project_id,
16
+ region: data.region
16
17
  };
17
18
  };
18
19
  const unmarshalSecret = data => {
@@ -22,6 +23,8 @@ const unmarshalSecret = data => {
22
23
  return {
23
24
  createdAt: unmarshalDate(data.created_at),
24
25
  description: data.description,
26
+ ephemeralAction: data.ephemeral_action,
27
+ expiresAt: unmarshalDate(data.expires_at),
25
28
  id: data.id,
26
29
  isManaged: data.is_managed,
27
30
  isProtected: data.is_protected,
@@ -115,6 +118,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
115
118
  });
116
119
  const marshalCreateSecretRequest = (request, defaults) => ({
117
120
  description: request.description,
121
+ ephemeral_action: request.ephemeralAction ?? 'unknown_ephemeral_action',
122
+ expires_at: request.expiresAt,
118
123
  name: request.name,
119
124
  path: request.path,
120
125
  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.40.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () =>
@@ -23704,7 +23704,8 @@ const unmarshalFolder = data => {
23704
23704
  id: data.id,
23705
23705
  name: data.name,
23706
23706
  path: data.path,
23707
- projectId: data.project_id
23707
+ projectId: data.project_id,
23708
+ region: data.region
23708
23709
  };
23709
23710
  };
23710
23711
  const unmarshalSecret = data => {
@@ -23714,6 +23715,8 @@ const unmarshalSecret = data => {
23714
23715
  return {
23715
23716
  createdAt: unmarshalDate(data.created_at),
23716
23717
  description: data.description,
23718
+ ephemeralAction: data.ephemeral_action,
23719
+ expiresAt: unmarshalDate(data.expires_at),
23717
23720
  id: data.id,
23718
23721
  isManaged: data.is_managed,
23719
23722
  isProtected: data.is_protected,
@@ -23807,6 +23810,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
23807
23810
  });
23808
23811
  const marshalCreateSecretRequest = (request, defaults) => ({
23809
23812
  description: request.description,
23813
+ ephemeral_action: request.ephemeralAction ?? 'unknown_ephemeral_action',
23814
+ expires_at: request.expiresAt,
23810
23815
  name: request.name,
23811
23816
  path: request.path,
23812
23817
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -23856,7 +23861,7 @@ const jsonContentHeaders$6 = {
23856
23861
  */
23857
23862
  let API$6 = class API extends API$v {
23858
23863
  /** Lists the available regions of the API. */
23859
- static LOCALITIES = ['fr-par'];
23864
+ static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
23860
23865
 
23861
23866
  /**
23862
23867
  * Create a secret. You must specify the `region` to create a secret.
@@ -23932,7 +23937,7 @@ let API$6 = class API extends API$v {
23932
23937
  pageOfListSecrets = (request = {}) => this.client.fetch({
23933
23938
  method: 'GET',
23934
23939
  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])
23940
+ 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
23941
  }, unmarshalListSecretsResponse);
23937
23942
 
23938
23943
  /**
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';
@@ -28024,6 +28025,8 @@ interface Folder {
28024
28025
  path: string;
28025
28026
  /** Date and time of the folder's creation. */
28026
28027
  createdAt?: Date;
28028
+ /** Region of the folder. */
28029
+ region: Region;
28027
28030
  }
28028
28031
  /** List folders response. */
28029
28032
  interface ListFoldersResponse {
@@ -28098,6 +28101,16 @@ interface Secret {
28098
28101
  type: SecretType;
28099
28102
  /** Path of the secret. Location of the secret in the directory structure. */
28100
28103
  path: string;
28104
+ /**
28105
+ * Expiration date of the secret. (Optional.) Date on which the secret will be
28106
+ * deleted or deactivated.
28107
+ */
28108
+ expiresAt?: Date;
28109
+ /**
28110
+ * Action to be taken when the secret expires. See `Secret.EphemeralAction`
28111
+ * enum for description of values.
28112
+ */
28113
+ ephemeralAction: SecretEphemeralAction;
28101
28114
  /** Region of the secret. */
28102
28115
  region: Region;
28103
28116
  }
@@ -28150,6 +28163,13 @@ type CreateSecretRequest = {
28150
28163
  * structure. If not specified, the path is `/`.
28151
28164
  */
28152
28165
  path?: string;
28166
+ /**
28167
+ * Expiration date of the secret. (Optional.) Date on which the secret will be
28168
+ * deleted or deactivated.
28169
+ */
28170
+ expiresAt?: Date;
28171
+ /** Action to be taken when the secret expires. */
28172
+ ephemeralAction?: SecretEphemeralAction;
28153
28173
  };
28154
28174
  type CreateFolderRequest = {
28155
28175
  /**
@@ -28231,6 +28251,8 @@ type ListSecretsRequest = {
28231
28251
  isManaged?: boolean;
28232
28252
  /** Filter by path (optional). */
28233
28253
  path?: string;
28254
+ /** Filter by ephemeral / not ephemeral (optional). */
28255
+ isEphemeral?: boolean;
28234
28256
  };
28235
28257
  type ListFoldersRequest = {
28236
28258
  /**
@@ -28841,6 +28863,7 @@ type index_gen$6_PasswordGenerationParams = PasswordGenerationParams;
28841
28863
  type index_gen$6_Product = Product;
28842
28864
  type index_gen$6_ProtectSecretRequest = ProtectSecretRequest;
28843
28865
  type index_gen$6_Secret = Secret;
28866
+ type index_gen$6_SecretEphemeralAction = SecretEphemeralAction;
28844
28867
  type index_gen$6_SecretStatus = SecretStatus;
28845
28868
  type index_gen$6_SecretType = SecretType;
28846
28869
  type index_gen$6_SecretVersion = SecretVersion;
@@ -28849,7 +28872,7 @@ type index_gen$6_UnprotectSecretRequest = UnprotectSecretRequest;
28849
28872
  type index_gen$6_UpdateSecretRequest = UpdateSecretRequest;
28850
28873
  type index_gen$6_UpdateSecretVersionRequest = UpdateSecretVersionRequest;
28851
28874
  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 };
28875
+ 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
28876
  }
28854
28877
 
28855
28878
  declare namespace index$5 {
@@ -1,4 +1,4 @@
1
- const version = 'v1.38.1';
1
+ const version = 'v1.40.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.41.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": "886419d4bd8be4b8762e5084c3760940ca62c1b2"
39
39
  }