This commit is contained in:
carlosmonastyrski
2025-06-25 00:24:24 -03:00
parent 18e733c71f
commit 0366e58a5b
14 changed files with 64 additions and 63 deletions
@@ -3,14 +3,14 @@ import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-con
import { GitLabAccessTokenType } from "../gitlab";
export enum GitlabConnectionMethod {
export enum GitLabConnectionMethod {
AccessToken = "access-token",
OAuth = "oauth"
}
export type TGitlabConnection = TRootAppConnection & { app: AppConnection.Gitlab } & (
export type TGitLabConnection = TRootAppConnection & { app: AppConnection.Gitlab } & (
| {
method: GitlabConnectionMethod.AccessToken;
method: GitLabConnectionMethod.AccessToken;
credentials: {
instanceUrl?: string;
accessToken: string;
@@ -18,7 +18,7 @@ export type TGitlabConnection = TRootAppConnection & { app: AppConnection.Gitlab
};
}
| {
method: GitlabConnectionMethod.OAuth;
method: GitLabConnectionMethod.OAuth;
credentials: {
code: string;
instanceUrl?: string;
@@ -14,7 +14,7 @@ import { TFlyioConnection } from "./flyio-connection";
import { TGcpConnection } from "./gcp-connection";
import { TGitHubConnection } from "./github-connection";
import { TGitHubRadarConnection } from "./github-radar-connection";
import { TGitlabConnection } from "./gitlab-connection";
import { TGitLabConnection } from "./gitlab-connection";
import { THCVaultConnection } from "./hc-vault-connection";
import { THerokuConnection } from "./heroku-connection";
import { THumanitecConnection } from "./humanitec-connection";
@@ -88,7 +88,7 @@ export type TAppConnection =
| THerokuConnection
| TRenderConnection
| TFlyioConnection
| TGitlabConnection
| TGitLabConnection
| TCloudflareConnection;
export type TAvailableAppConnection = Pick<TAppConnection, "name" | "id">;
@@ -144,6 +144,6 @@ export type TAppConnectionMap = {
[AppConnection.Heroku]: THerokuConnection;
[AppConnection.Render]: TRenderConnection;
[AppConnection.Flyio]: TFlyioConnection;
[AppConnection.Gitlab]: TGitlabConnection;
[AppConnection.Gitlab]: TGitLabConnection;
[AppConnection.Cloudflare]: TCloudflareConnection;
};
@@ -2,16 +2,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 enum GitlabSyncScope {
export enum GitLabSyncScope {
Project = "project",
Group = "group"
}
export type TGitlabSync = TRootSecretSync & {
export type TGitLabSync = TRootSecretSync & {
destination: SecretSync.GitLab;
destinationConfig:
| {
scope: GitlabSyncScope.Project;
scope: GitLabSyncScope.Project;
projectId: string;
projectName: string;
targetEnvironment?: string;
@@ -20,7 +20,7 @@ export type TGitlabSync = TRootSecretSync & {
shouldHideSecrets?: boolean;
}
| {
scope: GitlabSyncScope.Group;
scope: GitLabSyncScope.Group;
groupId: string;
groupName: string;
targetEnvironment?: string;
@@ -14,7 +14,7 @@ import { TDatabricksSync } from "./databricks-sync";
import { TFlyioSync } from "./flyio-sync";
import { TGcpSync } from "./gcp-sync";
import { TGitHubSync } from "./github-sync";
import { TGitlabSync } from "./gitlab-sync";
import { TGitLabSync } from "./gitlab-sync";
import { THCVaultSync } from "./hc-vault-sync";
import { THerokuSync } from "./heroku-sync";
import { THumanitecSync } from "./humanitec-sync";
@@ -52,7 +52,7 @@ export type TSecretSync =
| THerokuSync
| TRenderSync
| TFlyioSync
| TGitlabSync
| TGitLabSync
| TCloudflarePagesSync;
export type TListSecretSyncs = { secretSyncs: TSecretSync[] };