mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 18:41:21 +00:00
feat(infisical-pg): changed frontend api types _id to normal id
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
export type APIKeyDataV2 = {
|
||||
id: string;
|
||||
name: string;
|
||||
user: string;
|
||||
lastUsed?: string;
|
||||
usageCount: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
id: string;
|
||||
name: string;
|
||||
user: string;
|
||||
lastUsed?: string;
|
||||
usageCount: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type CreateAPIKeyDataV2DTO = {
|
||||
name: string;
|
||||
}
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type CreateServiceTokenDataV3Res = {
|
||||
apiKeyData: APIKeyDataV2;
|
||||
apiKey: string;
|
||||
}
|
||||
apiKeyData: APIKeyDataV2;
|
||||
apiKey: string;
|
||||
};
|
||||
|
||||
export type UpdateAPIKeyDataV2DTO = {
|
||||
apiKeyDataId: string;
|
||||
name: string;
|
||||
}
|
||||
apiKeyDataId: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type DeleteAPIKeyDataV2DTO = {
|
||||
apiKeyDataId: string;
|
||||
}
|
||||
apiKeyDataId: string;
|
||||
};
|
||||
|
||||
@@ -194,7 +194,8 @@ interface DeleteServiceTokenEvent {
|
||||
};
|
||||
}
|
||||
|
||||
interface CreateIdentityEvent { // note: currently not logging org-role
|
||||
interface CreateIdentityEvent {
|
||||
// note: currently not logging org-role
|
||||
type: EventType.CREATE_IDENTITY;
|
||||
metadata: {
|
||||
identityId: string;
|
||||
@@ -218,7 +219,7 @@ interface DeleteIdentityEvent {
|
||||
}
|
||||
|
||||
interface LoginIdentityUniversalAuthEvent {
|
||||
type: EventType.LOGIN_IDENTITY_UNIVERSAL_AUTH ;
|
||||
type: EventType.LOGIN_IDENTITY_UNIVERSAL_AUTH;
|
||||
metadata: {
|
||||
identityId: string;
|
||||
identityUniversalAuthId: string;
|
||||
@@ -259,7 +260,7 @@ interface GetIdentityUniversalAuthEvent {
|
||||
}
|
||||
|
||||
interface CreateIdentityUniversalAuthClientSecretEvent {
|
||||
type: EventType.CREATE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET ;
|
||||
type: EventType.CREATE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET;
|
||||
metadata: {
|
||||
identityId: string;
|
||||
clientSecretId: string;
|
||||
@@ -273,9 +274,8 @@ interface GetIdentityUniversalAuthClientSecretsEvent {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
interface RevokeIdentityUniversalAuthClientSecretEvent {
|
||||
type: EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET ;
|
||||
type: EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET;
|
||||
metadata: {
|
||||
identityId: string;
|
||||
clientSecretId: string;
|
||||
@@ -507,7 +507,7 @@ export type Event =
|
||||
| UpdateUserDeniedPermissions;
|
||||
|
||||
export type AuditLog = {
|
||||
_id: string;
|
||||
id: string;
|
||||
actor: Actor;
|
||||
organization: string;
|
||||
workspace: string;
|
||||
|
||||
@@ -55,14 +55,14 @@ export type BitBucketWorkspace = {
|
||||
uuid: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type NorthflankSecretGroup = {
|
||||
name: string;
|
||||
groupId: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type TeamCityBuildConfig = {
|
||||
name: string;
|
||||
buildConfigId: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,9 +32,9 @@ export type TIntegration = {
|
||||
__v: number;
|
||||
metadata?: {
|
||||
secretSuffix?: string;
|
||||
scope: string;
|
||||
scope: string;
|
||||
org: string;
|
||||
project: string;
|
||||
environment: string;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export type RenameOrgDTO = {
|
||||
export type BillingDetails = {
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type PlanBillingInfo = {
|
||||
amount: number;
|
||||
@@ -22,7 +22,7 @@ export type PlanBillingInfo = {
|
||||
interval: "month" | "year";
|
||||
intervalCount: number;
|
||||
quantity: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type Invoice = {
|
||||
id: string;
|
||||
@@ -31,23 +31,23 @@ export type Invoice = {
|
||||
number: string;
|
||||
paid: boolean;
|
||||
total: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type PmtMethod = {
|
||||
id: string;
|
||||
brand: string;
|
||||
exp_month: number;
|
||||
exp_month: number;
|
||||
exp_year: number;
|
||||
funding: string;
|
||||
last4: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type TaxID = {
|
||||
id: string;
|
||||
country: string;
|
||||
type: string;
|
||||
value: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type License = {
|
||||
id: string;
|
||||
@@ -58,22 +58,22 @@ export type License = {
|
||||
expiresAt: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type OrgPlanTableHead = {
|
||||
name: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type OrgPlanTableRow = {
|
||||
name: string;
|
||||
allowed: number | boolean | null;
|
||||
used: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type OrgPlanTable = {
|
||||
head: OrgPlanTableHead[];
|
||||
rows: OrgPlanTableRow[];
|
||||
}
|
||||
};
|
||||
|
||||
export type ProductsTableHead = {
|
||||
name: string;
|
||||
@@ -82,7 +82,7 @@ export type ProductsTableHead = {
|
||||
productId: string;
|
||||
slug: string;
|
||||
tier: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type ProductsTableRow = {
|
||||
name: string;
|
||||
@@ -90,9 +90,9 @@ export type ProductsTableRow = {
|
||||
team: number | boolean | null;
|
||||
pro: number | boolean | null;
|
||||
enterprise: number | boolean | null;
|
||||
}
|
||||
};
|
||||
|
||||
export type ProductsTable = {
|
||||
head: ProductsTableHead[];
|
||||
rows: ProductsTableRow[];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ export type ServiceTokenScope = {
|
||||
};
|
||||
|
||||
export type ServiceToken = {
|
||||
_id: string;
|
||||
id: string;
|
||||
name: string;
|
||||
workspace: string;
|
||||
scopes: ServiceTokenScope[];
|
||||
@@ -32,4 +32,4 @@ export type CreateServiceTokenRes = {
|
||||
serviceTokenData: ServiceToken;
|
||||
};
|
||||
|
||||
export type DeleteServiceTokenRes = { serviceTokenData: ServiceToken };
|
||||
export type DeleteServiceTokenRes = { serviceTokenData: ServiceToken };
|
||||
|
||||
@@ -9,7 +9,7 @@ export type WsTag = {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
__v: number;
|
||||
}
|
||||
};
|
||||
|
||||
export type WorkspaceTag = { id: string; name: string; slug: string };
|
||||
|
||||
@@ -30,7 +30,7 @@ export type CreateTagRes = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
export type DeleteTagDTO = { tagID: string; };
|
||||
export type DeleteTagDTO = { tagID: string };
|
||||
|
||||
export type DeleteWsTagRes = {
|
||||
name: string;
|
||||
@@ -41,17 +41,16 @@ export type DeleteWsTagRes = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
export type SecretTags = {
|
||||
id: string;
|
||||
export type SecretTags = {
|
||||
id: string;
|
||||
slug: string;
|
||||
slug: string;
|
||||
tagColor: string;
|
||||
}
|
||||
};
|
||||
|
||||
export type TagColor = {
|
||||
export type TagColor = {
|
||||
id: number;
|
||||
hex: string
|
||||
rgba: string
|
||||
name: string
|
||||
selected: boolean
|
||||
}
|
||||
hex: string;
|
||||
rgba: string;
|
||||
name: string;
|
||||
selected: boolean;
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export type TrustedIp = {
|
||||
id: string;
|
||||
workspace: string;
|
||||
ipAddress: string;
|
||||
type: "ipv4" | "ipv6";
|
||||
isActive: boolean;
|
||||
comment: string;
|
||||
prefix?: number;
|
||||
};
|
||||
id: string;
|
||||
workspace: string;
|
||||
ipAddress: string;
|
||||
type: "ipv4" | "ipv6";
|
||||
isActive: boolean;
|
||||
comment: string;
|
||||
prefix?: number;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ export * from "./secrets/types";
|
||||
export type { CreateServiceTokenDTO, ServiceToken } from "./serviceTokens/types";
|
||||
export type { SubscriptionPlan } from "./subscriptions/types";
|
||||
export type { WsTag } from "./tags/types";
|
||||
export type { AddUserToWsDTO, OrgUser, TWorkspaceUser, User } from "./users/types";
|
||||
export type { AddUserToWsDTO, OrgUser, TWorkspaceUser, User, UserEnc } from "./users/types";
|
||||
export type { TWebhook } from "./webhooks/types";
|
||||
export type {
|
||||
CreateEnvironmentDTO,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -22,7 +22,7 @@ export type NameWorkspaceSecretsDTO = {
|
||||
secretName: string;
|
||||
id: string;
|
||||
}[];
|
||||
}
|
||||
};
|
||||
|
||||
// mutation dto
|
||||
export type CreateWorkspaceDTO = {
|
||||
@@ -47,7 +47,6 @@ export type ReorderEnvironmentsDTO = {
|
||||
environmentName: string;
|
||||
otherEnvironmentSlug: string;
|
||||
otherEnvironmentName: string;
|
||||
|
||||
};
|
||||
|
||||
export type UpdateEnvironmentDTO = {
|
||||
@@ -57,4 +56,4 @@ export type UpdateEnvironmentDTO = {
|
||||
environmentName: string;
|
||||
};
|
||||
|
||||
export type DeleteEnvironmentDTO = { workspaceID: string; environmentSlug: string };
|
||||
export type DeleteEnvironmentDTO = { workspaceID: string; environmentSlug: string };
|
||||
|
||||
Reference in New Issue
Block a user