mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
Fix ts type linter
This commit is contained in:
@@ -27,7 +27,8 @@ import { getFullPamFolderPath } from "../pam-folder/pam-folder-fns";
|
|||||||
import { TPamResourceDALFactory } from "../pam-resource/pam-resource-dal";
|
import { TPamResourceDALFactory } from "../pam-resource/pam-resource-dal";
|
||||||
import { PamResource } from "../pam-resource/pam-resource-enums";
|
import { PamResource } from "../pam-resource/pam-resource-enums";
|
||||||
import { TPamAccountCredentials } from "../pam-resource/pam-resource-types";
|
import { TPamAccountCredentials } from "../pam-resource/pam-resource-types";
|
||||||
import { TSqlResourceConnectionDetails } from "../pam-resource/shared/sql/sql-resource-types";
|
import { TSqlAccountCredentials, TSqlResourceConnectionDetails } from "../pam-resource/shared/sql/sql-resource-types";
|
||||||
|
import { TSSHAccountCredentials } from "../pam-resource/ssh/ssh-resource-types";
|
||||||
import { TPamSessionDALFactory } from "../pam-session/pam-session-dal";
|
import { TPamSessionDALFactory } from "../pam-session/pam-session-dal";
|
||||||
import { PamSessionStatus } from "../pam-session/pam-session-enums";
|
import { PamSessionStatus } from "../pam-session/pam-session-enums";
|
||||||
import { OrgPermissionGatewayActions, OrgPermissionSubjects } from "../permission/org-permission";
|
import { OrgPermissionGatewayActions, OrgPermissionSubjects } from "../permission/org-permission";
|
||||||
@@ -606,7 +607,7 @@ export const pamAccountServiceFactory = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
metadata = {
|
metadata = {
|
||||||
username: credentials.username,
|
username: (credentials as TSqlAccountCredentials).username,
|
||||||
database: connectionCredentials.database,
|
database: connectionCredentials.database,
|
||||||
accountName: account.name,
|
accountName: account.name,
|
||||||
accountPath: folderPath
|
accountPath: folderPath
|
||||||
@@ -622,18 +623,16 @@ export const pamAccountServiceFactory = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
metadata = {
|
metadata = {
|
||||||
username: credentials.username
|
username: (credentials as TSSHAccountCredentials).username
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PamResource.Kubernetes:
|
case PamResource.Kubernetes:
|
||||||
{
|
metadata = {
|
||||||
metadata = {
|
resourceName: resource.name,
|
||||||
resourceName: resource.name,
|
accountName: account.name,
|
||||||
accountName: account.name,
|
accountPath
|
||||||
accountPath
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { PamSessionCommandLogSchema, SanitizedSessionSchema, TerminalEventSchema } from "./pam-session-schemas";
|
import {
|
||||||
|
HttpEventSchema,
|
||||||
|
PamSessionCommandLogSchema,
|
||||||
|
SanitizedSessionSchema,
|
||||||
|
TerminalEventSchema
|
||||||
|
} from "./pam-session-schemas";
|
||||||
|
|
||||||
export type TPamSessionCommandLog = z.infer<typeof PamSessionCommandLogSchema>;
|
export type TPamSessionCommandLog = z.infer<typeof PamSessionCommandLogSchema>;
|
||||||
export type TTerminalEvent = z.infer<typeof TerminalEventSchema>;
|
export type TTerminalEvent = z.infer<typeof TerminalEventSchema>;
|
||||||
|
export type THttpEvent = z.infer<typeof HttpEventSchema>;
|
||||||
export type TPamSanitizedSession = z.infer<typeof SanitizedSessionSchema>;
|
export type TPamSanitizedSession = z.infer<typeof SanitizedSessionSchema>;
|
||||||
|
|
||||||
// DTOs
|
// DTOs
|
||||||
export type TUpdateSessionLogsDTO = {
|
export type TUpdateSessionLogsDTO = {
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
logs: (TPamSessionCommandLog | TTerminalEvent)[];
|
logs: (TPamSessionCommandLog | TTerminalEvent | THttpEvent)[];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user