mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Schemas
This commit is contained in:
@@ -8,7 +8,7 @@ import { z } from "zod";
|
|||||||
import { TImmutableDBKeys } from "./models";
|
import { TImmutableDBKeys } from "./models";
|
||||||
|
|
||||||
export const IdentityAccessTokensSchema = z.object({
|
export const IdentityAccessTokensSchema = z.object({
|
||||||
id: z.string().uuid(),
|
id: z.string(),
|
||||||
accessTokenTTL: z.coerce.number().default(2592000),
|
accessTokenTTL: z.coerce.number().default(2592000),
|
||||||
accessTokenMaxTTL: z.coerce.number().default(2592000),
|
accessTokenMaxTTL: z.coerce.number().default(2592000),
|
||||||
accessTokenNumUses: z.coerce.number().default(0),
|
accessTokenNumUses: z.coerce.number().default(0),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const OrganizationsSchema = z.object({
|
|||||||
customerId: z.string().nullable().optional(),
|
customerId: z.string().nullable().optional(),
|
||||||
slug: z.string(),
|
slug: z.string(),
|
||||||
createdAt: z.date(),
|
createdAt: z.date(),
|
||||||
updatedAt: z.date()
|
updatedAt: z.date(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type TOrganizations = z.infer<typeof OrganizationsSchema>;
|
export type TOrganizations = z.infer<typeof OrganizationsSchema>;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { TImmutableDBKeys } from "./models";
|
|||||||
export const SecretApprovalRequestsSecretsSchema = z.object({
|
export const SecretApprovalRequestsSecretsSchema = z.object({
|
||||||
id: z.string().uuid(),
|
id: z.string().uuid(),
|
||||||
version: z.number().default(1).nullable().optional(),
|
version: z.number().default(1).nullable().optional(),
|
||||||
secretBlindIndex: z.string(),
|
secretBlindIndex: z.string().nullable().optional(),
|
||||||
secretKeyCiphertext: z.string(),
|
secretKeyCiphertext: z.string(),
|
||||||
secretKeyIV: z.string(),
|
secretKeyIV: z.string(),
|
||||||
secretKeyTag: z.string(),
|
secretKeyTag: z.string(),
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ export const UserEncryptionKeysSchema = z.object({
|
|||||||
clientPublicKey: z.string().nullable().optional(),
|
clientPublicKey: z.string().nullable().optional(),
|
||||||
serverPrivateKey: z.string().nullable().optional(),
|
serverPrivateKey: z.string().nullable().optional(),
|
||||||
encryptionVersion: z.number().default(2).nullable().optional(),
|
encryptionVersion: z.number().default(2).nullable().optional(),
|
||||||
protectedKey: z.string().nullable(),
|
protectedKey: z.string().nullable().optional(),
|
||||||
protectedKeyIV: z.string().nullable(),
|
protectedKeyIV: z.string().nullable().optional(),
|
||||||
protectedKeyTag: z.string().nullable(),
|
protectedKeyTag: z.string().nullable().optional(),
|
||||||
publicKey: z.string(),
|
publicKey: z.string(),
|
||||||
encryptedPrivateKey: z.string(),
|
encryptedPrivateKey: z.string(),
|
||||||
iv: z.string(),
|
iv: z.string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user