feat(infisical-pg): connected project api changes with frontend

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:22 +05:30
parent 4f3582a98b
commit 8a6ab7f2f6
39 changed files with 343 additions and 339 deletions
+93 -93
View File
@@ -1,123 +1,123 @@
import { TRole } from "../roles/types";
import { TOrgRole, TProjectRole } from "../roles/types";
import { IdentityAuthMethod } from "./enums";
export type IdentityTrustedIp = {
id: string;
ipAddress: string;
type: "ipv4" | "ipv6";
prefix?: number;
}
id: string;
ipAddress: string;
type: "ipv4" | "ipv6";
prefix?: number;
};
export type Identity = {
id: string;
name: string;
authMethod?: IdentityAuthMethod;
createdAt: string;
updatedAt: string;
id: string;
name: string;
authMethod?: IdentityAuthMethod;
createdAt: string;
updatedAt: string;
};
export type IdentityMembershipOrg = {
id: string;
identity: Identity;
organization: string;
role: "admin" | "member" | "viewer" | "no-access" | "custom";
customRole?: TRole<string>;
createdAt: string;
updatedAt: string;
}
id: string;
identity: Identity;
organization: string;
role: "admin" | "member" | "viewer" | "no-access" | "custom";
customRole?: TOrgRole;
createdAt: string;
updatedAt: string;
};
export type IdentityMembership = {
id: string;
identity: Identity;
organization: string;
role: "admin" | "member" | "viewer" | "no-access" | "custom";
customRole?: TRole<string>;
createdAt: string;
updatedAt: string;
}
id: string;
identity: Identity;
organization: string;
role: "admin" | "member" | "viewer" | "no-access" | "custom";
customRole?: TProjectRole;
createdAt: string;
updatedAt: string;
};
export type CreateIdentityDTO = {
name: string;
organizationId: string;
role?: string;
}
name: string;
organizationId: string;
role?: string;
};
export type UpdateIdentityDTO = {
identityId: string;
name?: string;
role?: string;
organizationId: string;
}
identityId: string;
name?: string;
role?: string;
organizationId: string;
};
export type DeleteIdentityDTO = {
identityId: string;
organizationId: string;
}
identityId: string;
organizationId: string;
};
export type IdentityUniversalAuth = {
identityId: string;
clientId: string;
clientSecretTrustedIps: IdentityTrustedIp[];
accessTokenTTL: number;
accessTokenMaxTTL: number;
accessTokenNumUsesLimit: number;
accessTokenTrustedIps: IdentityTrustedIp[];
}
identityId: string;
clientId: string;
clientSecretTrustedIps: IdentityTrustedIp[];
accessTokenTTL: number;
accessTokenMaxTTL: number;
accessTokenNumUsesLimit: number;
accessTokenTrustedIps: IdentityTrustedIp[];
};
export type AddIdentityUniversalAuthDTO = {
organizationId: string;
identityId: string;
clientSecretTrustedIps: {
ipAddress: string;
}[];
accessTokenTTL: number;
accessTokenMaxTTL: number;
accessTokenNumUsesLimit: number;
accessTokenTrustedIps: {
ipAddress: string;
}[];
}
organizationId: string;
identityId: string;
clientSecretTrustedIps: {
ipAddress: string;
}[];
accessTokenTTL: number;
accessTokenMaxTTL: number;
accessTokenNumUsesLimit: number;
accessTokenTrustedIps: {
ipAddress: string;
}[];
};
export type UpdateIdentityUniversalAuthDTO = {
organizationId: string;
identityId: string;
clientSecretTrustedIps?: {
ipAddress: string;
}[];
accessTokenTTL?: number;
accessTokenMaxTTL?: number;
accessTokenNumUsesLimit?: number;
accessTokenTrustedIps?: {
ipAddress: string;
}[];
}
organizationId: string;
identityId: string;
clientSecretTrustedIps?: {
ipAddress: string;
}[];
accessTokenTTL?: number;
accessTokenMaxTTL?: number;
accessTokenNumUsesLimit?: number;
accessTokenTrustedIps?: {
ipAddress: string;
}[];
};
export type CreateIdentityUniversalAuthClientSecretDTO = {
identityId: string;
description?: string;
ttl?: number;
numUsesLimit?: number;
}
identityId: string;
description?: string;
ttl?: number;
numUsesLimit?: number;
};
export type ClientSecretData = {
id: string;
identityUniversalAuth: string;
isClientSecretRevoked: boolean;
description: string;
clientSecretPrefix: string;
clientSecretNumUses: number;
clientSecretNumUsesLimit: number;
clientSecretTTL: number;
createdAt: string;
updatedAt: string;
}
id: string;
identityUniversalAuth: string;
isClientSecretRevoked: boolean;
description: string;
clientSecretPrefix: string;
clientSecretNumUses: number;
clientSecretNumUsesLimit: number;
clientSecretTTL: number;
createdAt: string;
updatedAt: string;
};
export type CreateIdentityUniversalAuthClientSecretRes = {
clientSecret: string;
clientSecretData: ClientSecretData;
}
clientSecret: string;
clientSecretData: ClientSecretData;
};
export type DeleteIdentityUniversalAuthClientSecretDTO = {
identityId: string;
clientSecretId: string;
}
identityId: string;
clientSecretId: string;
};