Renamed
This commit is contained in:
@@ -8,10 +8,35 @@ import { InfisicalSDK } from "../src";
|
||||
clientSecret: "CLIENT_SECRET"
|
||||
});
|
||||
|
||||
const secrets = await client.secrets().listSecrets({
|
||||
const allSecrets = await client.secrets().listSecrets({
|
||||
environment: "dev",
|
||||
workspaceId: "PROJECT_ID"
|
||||
});
|
||||
console.log(allSecrets.secrets);
|
||||
|
||||
console.log(secrets.secrets);
|
||||
const singleSecret = await client.secrets().getSecret({
|
||||
secretName: "SECRET_NAME",
|
||||
environment: "dev"
|
||||
});
|
||||
console.log(`Fetched single secret, ${singleSecret.secretKey}=${singleSecret.secretValue}`);
|
||||
|
||||
const newSecret = await client.secrets().createSecret("NEW_SECRET_NAME", {
|
||||
environment: "dev",
|
||||
workspaceId: "PROJECT_ID",
|
||||
secretValue: "INITIAL SECRET VALUE!"
|
||||
});
|
||||
console.log(`You created a new secret: ${newSecret.secret}`);
|
||||
|
||||
const updatedSecret = await client.secrets().updateSecret("NEW_SECRET_NAME", {
|
||||
environment: "dev",
|
||||
workspaceId: "PROJECT_ID",
|
||||
secretValue: "NEW SECRET VALUE!"
|
||||
});
|
||||
console.log(`You updated the secret: ${updatedSecret.secret}`);
|
||||
|
||||
const deletedSecret = await client.secrets().deleteSecret("NEW_SECRET_NAME", {
|
||||
environment: "dev",
|
||||
workspaceId: "PROJECT_ID"
|
||||
});
|
||||
console.log(`You deleted the secret: ${deletedSecret.secret}`);
|
||||
})();
|
||||
|
||||
@@ -27,7 +27,8 @@ const desiredEndpoints: Endpoint[] = [
|
||||
{ path: "/api/v1/auth/token-auth/identities/{identityId}/tokens", method: "GET" },
|
||||
{ path: "/api/v1/auth/token-auth/identities/{identityId}/tokens", method: "POST" },
|
||||
{ path: "/api/v1/auth/token-auth/tokens/{tokenId}", method: "PATCH" },
|
||||
{ path: "/v1/auth/token-auth/tokens/{tokenId}/revoke", method: "POST" }
|
||||
{ path: "/v1/auth/token-auth/tokens/{tokenId}/revoke", method: "POST" },
|
||||
|
||||
];
|
||||
|
||||
https
|
||||
|
||||
Reference in New Issue
Block a user