UNPKG

@oystehr/sdk

Version:

Oystehr SDK

51 lines (48 loc) 1.58 kB
import { SDKResource } from '../../client/client.js'; // AUTOGENERATED -- DO NOT EDIT class Secret extends SDKResource { constructor(config) { super(config); } #baseUrlThunk() { return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1'; } /** * Get a list of all secrets in the Project. * * Access Policy Action: `Zambda:ListAllSecrets` * Access Policy Resource: `Zambda:Secret` */ list(request) { return this.request('/secret', 'get', this.#baseUrlThunk.bind(this))(request); } /** * Create a secret for a project. If the secret is already defined, update it. * * Access Policy Action: `Zambda:CreateSecret` * Access Policy Resource: `Zambda:Secret` */ set(params, request) { return this.request('/secret', 'post', this.#baseUrlThunk.bind(this))(params, request); } /** * Get the secret with the provided name. * * Access Policy Action: `Zambda:GetSecret` * Access Policy Resource: `Zambda:Secret` */ get(params, request) { return this.request('/secret/{name}', 'get', this.#baseUrlThunk.bind(this))(params, request); } /** * Delete the secret with the provided name. * * Access Policy Action: `Zambda:DeleteSecret` * Access Policy Resource: `Zambda:Secret` */ delete(params, request) { return this.request('/secret/{name}', 'delete', this.#baseUrlThunk.bind(this))(params, request); } } export { Secret }; //# sourceMappingURL=secret.js.map