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 = {
|
2021-07-22 17:42:37 -04:00
|
|
|
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';
|
|
|
|
|
}
|
|
|
|
|
}
|