mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 01:05:40 +00:00
38 lines
829 B
TypeScript
38 lines
829 B
TypeScript
import { apiRequest } from "@app/config/request";
|
|
|
|
interface RequestType {
|
|
method: string;
|
|
secret: {
|
|
type: string;
|
|
secretKeyCiphertext: string;
|
|
secretKeyIV: string;
|
|
secretKeyTag: string;
|
|
secretValueCiphertext: string;
|
|
secretValueIV: string;
|
|
secretValueTag: string;
|
|
secretCommentCiphertext: string;
|
|
secretCommentIV: string;
|
|
secretCommentTag: string;
|
|
tags: string[];
|
|
}
|
|
}
|
|
|
|
const batchSecrets = async ({
|
|
workspaceId,
|
|
environment,
|
|
requests
|
|
}: {
|
|
workspaceId: string;
|
|
environment: string;
|
|
requests: RequestType[];
|
|
}) => {
|
|
const { data } = await apiRequest.post("/api/v2/secrets/batch", {
|
|
workspaceId,
|
|
environment,
|
|
requests
|
|
});
|
|
|
|
return data;
|
|
}
|
|
|
|
export default batchSecrets; |