fix(secret-management): Refactor secret management to use distinct secret bundle and group APIs. Introduce API client classes for secret bundles and groups.
This commit is contained in:
79
ts_interfaces/requests/secretbundle.ts
Normal file
79
ts_interfaces/requests/secretbundle.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
/**
|
||||
* when retrieving secrets for actual use, you do this in the form of an envBundle.
|
||||
*/
|
||||
export interface IReq_GetEnvBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetEnvBundle
|
||||
> {
|
||||
method: 'getEnvBundle';
|
||||
request: {
|
||||
authorization: string;
|
||||
/**
|
||||
* specify this if you want to get a warning, if the envBundle is for an unexpected environment
|
||||
*/
|
||||
environment?: string;
|
||||
};
|
||||
response: {
|
||||
envBundle: data.IEnvBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretBundles extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundles
|
||||
> {
|
||||
method: 'getSecretBundles';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
secretBundles: data.ISecretBundle[];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_CreateSecretBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateSecretBundle
|
||||
> {
|
||||
method: 'createSecretBundle';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
response: {
|
||||
resultSecretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateSecretBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateSecretBundle
|
||||
> {
|
||||
method: 'updateSecretBundle';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
response: {
|
||||
resultSecretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteSecretBundleById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteSecretBundleById
|
||||
> {
|
||||
method: 'deleteSecretBundleById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user