Files
threshold-ui/addons/api/addon/models/credential-library.js
T

33 lines
653 B
JavaScript
Raw Normal View History

2021-07-08 11:38:41 -04:00
import GeneratedCredentialLibraryModel from '../generated/models/credential-library';
2021-07-18 14:31:45 -04:00
/**
* Enum options for credential library.
*/
export const options = {
http_method: ['GET', 'POST'],
2021-07-18 14:31:45 -04:00
};
2022-09-20 17:31:16 -07:00
/**
* Supported Credential Library types.
*/
export const types = ['vault'];
export default class CredentialLibraryModel extends GeneratedCredentialLibraryModel {
// =attributes
/**
* True if credential is an unknown type.
* @type {boolean}
*/
get isUnknown() {
return !types.includes(this.type);
}
/**
* True if credential is a vault type.
* @type {boolean}
*/
get isVault() {
return this.type === 'vault';
}
}