@oystehr/sdk
Version:
Oystehr SDK
53 lines (49 loc) • 1.61 kB
JavaScript
'use strict';
var client = require('../../client/client.cjs');
// AUTOGENERATED -- DO NOT EDIT
class Secret extends client.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);
}
}
exports.Secret = Secret;
//# sourceMappingURL=secret.cjs.map