feat(infisical-pg): changed frontend api types _id to normal id

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:22 +05:30
parent f3b37de3f3
commit aaba4a0895
161 changed files with 5358 additions and 4510 deletions
+3 -2
View File
@@ -14,7 +14,8 @@ import {
RenameUserDTO,
TokenVersion,
UpdateOrgUserRoleDTO,
User
User,
UserEnc
} from "./types";
export const userKeys = {
@@ -29,7 +30,7 @@ export const userKeys = {
};
export const fetchUserDetails = async () => {
const { data } = await apiRequest.get<{ user: User }>("/api/v1/user");
const { data } = await apiRequest.get<{ user: User & UserEnc }>("/api/v1/user");
return data.user;
};
+10 -8
View File
@@ -19,6 +19,12 @@ export type User = {
lastName?: string;
authProvider?: AuthMethod;
authMethods: AuthMethod[];
isMfaEnabled: boolean;
seenIps: string[];
id: string;
};
export type UserEnc = {
encryptionVersion?: number;
protectedKey?: string;
protectedKeyIV?: string;
@@ -27,19 +33,15 @@ export type User = {
encryptedPrivateKey?: string;
iv?: string;
tag?: string;
isMfaEnabled: boolean;
seenIps: string[];
_id: string;
__v: number;
};
export type OrgUser = {
_id: string;
id: string;
user: {
email: string;
firstName: string;
lastName: string;
_id: string;
id: string;
publicKey: string;
};
inviteEmail: string;
@@ -88,7 +90,7 @@ export type RenameUserDTO = {
};
export type APIKeyData = {
_id: string;
id: string;
name: string;
user: string;
lastUsed: string;
@@ -97,7 +99,7 @@ export type APIKeyData = {
};
export type TokenVersion = {
_id: string;
id: string;
user: string;
userAgent: string;
ip: string;