diff --git a/README.md b/README.md index d219032..c9dbeb8 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ const allSecrets = await client.secrets().listSecrets({ - `environment` (string): The environment in which to list secrets (e.g., "dev"). - `secretPath` (str): The path to the secrets. - `expandSecretReferences` (bool, optional): Whether to expand secret references. -- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with ``. Defaults to `true. +- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with ``. Defaults to `true`. - `recursive` (bool, optional): Whether to list secrets recursively. - `includeImports` (bool, optional): Whether to include imported secrets. - `tagFilters` (string[], optional): Tags to filter secrets. @@ -149,7 +149,7 @@ const allSecrets = await client.secrets().listSecretsWithImports({ - `environment` (string): The environment in which to list secrets (e.g., "dev"). - `secretPath` (str): The path to the secrets. - `expandSecretReferences` (bool, optional): Whether to expand secret references. -- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with ``. Defaults to `true. +- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with ``. Defaults to `true`. - `recursive` (bool, optional): Whether to list secrets recursively. - `tagFilters` (string[], optional): Tags to filter secrets. @@ -254,7 +254,7 @@ const updatedSecret = await client.secrets().updateSecret("SECRET_TO_UPDATE", { - `secretName` (str): The name of the secret. - `secretPath` (str, optional): The path to the secret. - `expandSecretReferences` (bool, optional): Whether to expand secret references. -- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secret. If set to `false`, the `secretValue` is masked with ``. Defaults to `true. +- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secret. If set to `false`, the `secretValue` is masked with ``. Defaults to `true`. - `includeImports` (bool): Whether to include imported secrets. - `version` (str, optional): The version of the secret to retrieve. Fetches the latest by default. - `type` (personal | shared, optional): The type of secret to fetch. diff --git a/src/custom/secrets.ts b/src/custom/secrets.ts index 2d4085d..29e0e3a 100644 --- a/src/custom/secrets.ts +++ b/src/custom/secrets.ts @@ -68,7 +68,7 @@ export default class SecretsClient { try { const res = await this.#apiInstance.apiV3SecretsRawGet( { - viewSecretValue: convertBool(options.viewSecretValue), + viewSecretValue: options.viewSecretValue ? convertBool(options.viewSecretValue) : undefined, environment: options.environment, workspaceId: options.projectId, expandSecretReferences: convertBool(options.expandSecretReferences), @@ -107,7 +107,6 @@ export default class SecretsClient { if (!secrets.find(s => s.secretKey === importedSecret.secretKey)) { secrets.push({ ...importedSecret, - secretValueHidden: false, secretPath: imp.secretPath, // These fields are not returned by the API updatedAt: new Date().toISOString(), @@ -126,7 +125,7 @@ export default class SecretsClient { try { const res = await this.#apiInstance.apiV3SecretsRawSecretNameGet( { - viewSecretValue: convertBool(options.viewSecretValue), + viewSecretValue: options.viewSecretValue ? convertBool(options.viewSecretValue) : undefined, environment: options.environment, secretName: options.secretName, workspaceId: options.projectId,