80 lines
2.0 KiB
TypeScript
80 lines
2.0 KiB
TypeScript
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;
|
|
};
|
|
}
|