mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 06:35:21 +00:00
requested changes
This commit is contained in:
@@ -2,5 +2,6 @@ export enum AppConnection {
|
||||
AWS = "aws",
|
||||
GitHub = "github",
|
||||
GCP = "gcp",
|
||||
Azure = "azure"
|
||||
AzureKeyVault = "azure-key-vault",
|
||||
AzureAppConfiguration = "azure-app-configuration"
|
||||
}
|
||||
|
||||
@@ -20,8 +20,13 @@ export type TGcpConnectionOption = TAppConnectionOptionBase & {
|
||||
app: AppConnection.GCP;
|
||||
};
|
||||
|
||||
export type TAzureConnectionOption = TAppConnectionOptionBase & {
|
||||
app: AppConnection.Azure;
|
||||
export type TAzureKeyVaultConnectionOption = TAppConnectionOptionBase & {
|
||||
app: AppConnection.AzureKeyVault;
|
||||
oauthClientId?: string;
|
||||
};
|
||||
|
||||
export type TAzureAppConfigurationConnectionOption = TAppConnectionOptionBase & {
|
||||
app: AppConnection.AzureKeyVault;
|
||||
oauthClientId?: string;
|
||||
};
|
||||
|
||||
@@ -31,5 +36,6 @@ export type TAppConnectionOptionMap = {
|
||||
[AppConnection.AWS]: TAwsConnectionOption;
|
||||
[AppConnection.GitHub]: TGitHubConnectionOption;
|
||||
[AppConnection.GCP]: TGcpConnectionOption;
|
||||
[AppConnection.Azure]: TAzureConnectionOption;
|
||||
[AppConnection.AzureKeyVault]: TAzureKeyVaultConnectionOption;
|
||||
[AppConnection.AzureAppConfiguration]: TAzureAppConfigurationConnectionOption;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { AppConnection } from "@app/hooks/api/appConnections/enums";
|
||||
import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
|
||||
|
||||
export enum AzureAppConfigurationConnectionMethod {
|
||||
OAuth = "oauth"
|
||||
}
|
||||
|
||||
export type TAzureAppConfigurationConnection = TRootAppConnection & {
|
||||
app: AppConnection.AzureAppConfiguration;
|
||||
} & {
|
||||
method: AzureAppConfigurationConnectionMethod.OAuth;
|
||||
credentials: {
|
||||
code: string;
|
||||
tenantId?: string;
|
||||
};
|
||||
};
|
||||
@@ -1,26 +0,0 @@
|
||||
import { AppConnection } from "@app/hooks/api/appConnections/enums";
|
||||
import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
|
||||
|
||||
export enum AzureConnectionMethod {
|
||||
OAuth = "oauth"
|
||||
}
|
||||
|
||||
export enum AzureResources {
|
||||
KeyVault = "key-vault",
|
||||
AppConfiguration = "app-configuration"
|
||||
}
|
||||
|
||||
export const azureResourcesMap: Record<AzureResources, string> = {
|
||||
[AzureResources.AppConfiguration]: "App Configuration",
|
||||
[AzureResources.KeyVault]: "Key Vault"
|
||||
};
|
||||
|
||||
export type TAzureConnection = TRootAppConnection & { app: AppConnection.Azure } & {
|
||||
method: AzureConnectionMethod.OAuth;
|
||||
resource: AzureResources;
|
||||
credentials: {
|
||||
code: string;
|
||||
tenantId?: string;
|
||||
resource: AzureResources;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import { AppConnection } from "@app/hooks/api/appConnections/enums";
|
||||
import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
|
||||
|
||||
export enum AzureKeyVaultConnectionMethod {
|
||||
OAuth = "oauth"
|
||||
}
|
||||
|
||||
export type TAzureKeyVaultConnection = TRootAppConnection & { app: AppConnection.AzureKeyVault } & {
|
||||
method: AzureKeyVaultConnectionMethod.OAuth;
|
||||
credentials: {
|
||||
code: string;
|
||||
tenantId?: string;
|
||||
};
|
||||
};
|
||||
@@ -3,22 +3,24 @@ import { TAppConnectionOption } from "@app/hooks/api/appConnections/types/app-op
|
||||
import { TAwsConnection } from "@app/hooks/api/appConnections/types/aws-connection";
|
||||
import { TGitHubConnection } from "@app/hooks/api/appConnections/types/github-connection";
|
||||
|
||||
import { AzureResources, TAzureConnection } from "./azure-connection";
|
||||
import { TAzureAppConfigurationConnection } from "./azure-app-configuration-connection";
|
||||
import { TAzureKeyVaultConnection } from "./azure-key-vault-connection";
|
||||
import { TGcpConnection } from "./gcp-connection";
|
||||
|
||||
export * from "./aws-connection";
|
||||
export * from "./azure-connection";
|
||||
export * from "./azure-app-configuration-connection";
|
||||
export * from "./azure-key-vault-connection";
|
||||
export * from "./gcp-connection";
|
||||
export * from "./github-connection";
|
||||
|
||||
export type TAppConnection = TAwsConnection | TGitHubConnection | TGcpConnection | TAzureConnection;
|
||||
export type TAppConnection =
|
||||
| TAwsConnection
|
||||
| TGitHubConnection
|
||||
| TGcpConnection
|
||||
| TAzureKeyVaultConnection
|
||||
| TAzureAppConfigurationConnection;
|
||||
|
||||
export type TAvailableAppConnection =
|
||||
| (Pick<TAppConnection, "name" | "id"> & { app: Exclude<AppConnection, AppConnection.Azure> })
|
||||
| (Pick<TAppConnection, "name" | "id"> & {
|
||||
app: AppConnection.Azure;
|
||||
azureResource?: AzureResources;
|
||||
});
|
||||
export type TAvailableAppConnection = Pick<TAppConnection, "name" | "id">;
|
||||
|
||||
export type TListAppConnections<T extends TAppConnection> = { appConnections: T[] };
|
||||
export type TGetAppConnection<T extends TAppConnection> = { appConnection: T };
|
||||
@@ -47,5 +49,6 @@ export type TAppConnectionMap = {
|
||||
[AppConnection.AWS]: TAwsConnection;
|
||||
[AppConnection.GitHub]: TGitHubConnection;
|
||||
[AppConnection.GCP]: TGcpConnection;
|
||||
[AppConnection.Azure]: TAzureConnection;
|
||||
[AppConnection.AzureKeyVault]: TAzureKeyVaultConnection;
|
||||
[AppConnection.AzureAppConfiguration]: TAzureAppConfigurationConnection;
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ export type TAzureAppConfigurationSync = TRootSecretSync & {
|
||||
label?: string;
|
||||
};
|
||||
connection: {
|
||||
app: AppConnection.Azure;
|
||||
app: AppConnection.AzureAppConfiguration;
|
||||
name: string;
|
||||
id: string;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ export type TAzureKeyVaultSync = TRootSecretSync & {
|
||||
vaultBaseUrl: string;
|
||||
};
|
||||
connection: {
|
||||
app: AppConnection.Azure;
|
||||
app: AppConnection.AzureKeyVault;
|
||||
name: string;
|
||||
id: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user