mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 08:14:06 +00:00
feat(infisical-pg): changed frontend api types _id to normal id
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user