deconflict merge

This commit is contained in:
Scott Wilson
2025-06-20 12:33:37 -07:00
137 changed files with 2735 additions and 183 deletions
@@ -35,7 +35,7 @@ export type Approver = {
id: string;
type: ApproverType;
sequence?: number;
approvals?: number;
approvalsRequired?: number;
};
export type Bypasser = {
@@ -23,6 +23,7 @@ export enum AppConnection {
TeamCity = "teamcity",
OCI = "oci",
OnePass = "1password",
Heroku = "heroku",
Render = "render",
Flyio = "flyio"
}
@@ -0,0 +1,2 @@
export * from "./queries";
export * from "./types";
@@ -0,0 +1,36 @@
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
import { appConnectionKeys } from "../queries";
import { THerokuApp } from "./types";
const herokuConnectionKeys = {
all: [...appConnectionKeys.all, "heroku"] as const,
listApps: (connectionId: string) => [...herokuConnectionKeys.all, "apps", connectionId] as const
};
export const useHerokuConnectionListApps = (
connectionId: string,
options?: Omit<
UseQueryOptions<
THerokuApp[],
unknown,
THerokuApp[],
ReturnType<typeof herokuConnectionKeys.listApps>
>,
"queryKey" | "queryFn"
>
) => {
return useQuery({
queryKey: herokuConnectionKeys.listApps(connectionId),
queryFn: async () => {
const { data } = await apiRequest.get<THerokuApp[]>(
`/api/v1/app-connections/heroku/${connectionId}/apps`
);
return data;
},
...options
});
};
@@ -0,0 +1,4 @@
export type THerokuApp = {
id: string;
name: string;
};
@@ -106,6 +106,11 @@ export type TOCIConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.OCI;
};
export type THerokuConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.Heroku;
oauthClientId?: string;
};
export type TOnePassConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.OnePass;
};
@@ -141,6 +146,7 @@ export type TAppConnectionOption =
| TTeamCityConnectionOption
| TOCIConnectionOption
| TOnePassConnectionOption
| THerokuConnectionOption
| TRenderConnectionOption
| TFlyioConnectionOption;
@@ -169,6 +175,7 @@ export type TAppConnectionOptionMap = {
[AppConnection.TeamCity]: TTeamCityConnectionOption;
[AppConnection.OCI]: TOCIConnectionOption;
[AppConnection.OnePass]: TOnePassConnectionOption;
[AppConnection.Heroku]: THerokuConnectionOption;
[AppConnection.Render]: TRenderConnectionOption;
[AppConnection.Flyio]: TFlyioConnectionOption;
};
@@ -0,0 +1,22 @@
import { AppConnection } from "@app/hooks/api/appConnections/enums";
import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
export enum HerokuConnectionMethod {
AuthToken = "auth-token",
OAuth = "oauth"
}
export type THerokuConnection = TRootAppConnection & { app: AppConnection.Heroku } & (
| {
method: HerokuConnectionMethod.AuthToken;
credentials: {
authToken: string;
};
}
| {
method: HerokuConnectionMethod.OAuth;
credentials: {
code: string;
};
}
);
@@ -14,6 +14,7 @@ import { TGcpConnection } from "./gcp-connection";
import { TGitHubConnection } from "./github-connection";
import { TGitHubRadarConnection } from "./github-radar-connection";
import { THCVaultConnection } from "./hc-vault-connection";
import { THerokuConnection } from "./heroku-connection";
import { THumanitecConnection } from "./humanitec-connection";
import { TLdapConnection } from "./ldap-connection";
import { TMsSqlConnection } from "./mssql-connection";
@@ -41,6 +42,7 @@ export * from "./gcp-connection";
export * from "./github-connection";
export * from "./github-radar-connection";
export * from "./hc-vault-connection";
export * from "./heroku-connection";
export * from "./humanitec-connection";
export * from "./ldap-connection";
export * from "./mssql-connection";
@@ -79,6 +81,7 @@ export type TAppConnection =
| TTeamCityConnection
| TOCIConnection
| TOnePassConnection
| THerokuConnection
| TRenderConnection
| TFlyioConnection;
@@ -132,6 +135,7 @@ export type TAppConnectionMap = {
[AppConnection.TeamCity]: TTeamCityConnection;
[AppConnection.OCI]: TOCIConnection;
[AppConnection.OnePass]: TOnePassConnection;
[AppConnection.Heroku]: THerokuConnection;
[AppConnection.Render]: TRenderConnection;
[AppConnection.Flyio]: TFlyioConnection;
};
-1
View File
@@ -73,7 +73,6 @@ export const selectOrganization = async (data: {
}) => {
const { data: res } = await apiRequest.post<{
token: string;
refreshToken: string;
isMfaEnabled: boolean;
mfaMethod?: MfaMethod;
}>("/api/v3/auth/select-organization", data);
+15 -2
View File
@@ -12,9 +12,10 @@ export type TDynamicSecret = {
defaultTTL: string;
status?: DynamicSecretStatus;
statusDetails?: string;
maxTTL: string;
maxTTL?: string;
usernameTemplate?: string | null;
metadata?: { key: string; value: string }[];
tags?: { key: string; value: string }[];
};
export enum DynamicSecretProviders {
@@ -35,7 +36,8 @@ export enum DynamicSecretProviders {
SapAse = "sap-ase",
Kubernetes = "kubernetes",
Vertica = "vertica",
GcpIam = "gcp-iam"
GcpIam = "gcp-iam",
Github = "github"
}
export enum KubernetesDynamicSecretCredentialType {
@@ -89,6 +91,7 @@ export type TDynamicSecretProvider =
}
| {
type: DynamicSecretProviders.AwsIam;
tags?: { key: string; value: string }[];
inputs:
| {
method: DynamicSecretAwsIamAuth.AccessKey;
@@ -333,6 +336,14 @@ export type TDynamicSecretProvider =
inputs: {
serviceAccountEmail: string;
};
}
| {
type: DynamicSecretProviders.Github;
inputs: {
appId: number;
installationId: number;
privateKey: string;
};
};
export type TCreateDynamicSecretDTO = {
@@ -345,6 +356,7 @@ export type TCreateDynamicSecretDTO = {
name: string;
metadata?: { key: string; value: string }[];
usernameTemplate?: string;
tags?: { key: string; value: string }[];
};
export type TUpdateDynamicSecretDTO = {
@@ -359,6 +371,7 @@ export type TUpdateDynamicSecretDTO = {
maxTTL?: string | null;
inputs?: unknown;
usernameTemplate?: string | null;
tags?: { key: string; value: string }[];
};
};
@@ -16,6 +16,7 @@ export enum SecretSync {
TeamCity = "teamcity",
OCIVault = "oci-vault",
OnePass = "1password",
Heroku = "heroku",
Render = "render",
Flyio = "flyio"
}
@@ -0,0 +1,16 @@
import { AppConnection } from "@app/hooks/api/appConnections/enums";
import { SecretSync } from "@app/hooks/api/secretSyncs";
import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";
export type THerokuSync = TRootSecretSync & {
destination: SecretSync.Heroku;
destinationConfig: {
app: string;
appName: string;
};
connection: {
app: AppConnection.Heroku;
name: string;
id: string;
};
};
@@ -14,6 +14,7 @@ import { TFlyioSync } from "./flyio-sync";
import { TGcpSync } from "./gcp-sync";
import { TGitHubSync } from "./github-sync";
import { THCVaultSync } from "./hc-vault-sync";
import { THerokuSync } from "./heroku-sync";
import { THumanitecSync } from "./humanitec-sync";
import { TOCIVaultSync } from "./oci-vault-sync";
import { TTeamCitySync } from "./teamcity-sync";
@@ -46,6 +47,7 @@ export type TSecretSync =
| TTeamCitySync
| TOCIVaultSync
| TOnePassSync
| THerokuSync
| TRenderSync
| TFlyioSync;