Environment variables in admin panel (read only) - backend (#9943)
Backend for https://github.com/twentyhq/core-team-issues/issues/293 POC - https://github.com/twentyhq/twenty/pull/9903 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@ -394,6 +394,69 @@ export type EmailPasswordResetLink = {
|
||||
success: Scalars['Boolean'];
|
||||
};
|
||||
|
||||
export type EnvironmentVariable = {
|
||||
__typename?: 'EnvironmentVariable';
|
||||
description: Scalars['String'];
|
||||
name: Scalars['String'];
|
||||
sensitive: Scalars['Boolean'];
|
||||
value: Scalars['String'];
|
||||
};
|
||||
|
||||
export enum EnvironmentVariablesGroup {
|
||||
Analytics = 'Analytics',
|
||||
Authentication = 'Authentication',
|
||||
Billing = 'Billing',
|
||||
Cache = 'Cache',
|
||||
Database = 'Database',
|
||||
Email = 'Email',
|
||||
Frontend = 'Frontend',
|
||||
LLM = 'LLM',
|
||||
Logging = 'Logging',
|
||||
QueueConfig = 'QueueConfig',
|
||||
Security = 'Security',
|
||||
ServerConfig = 'ServerConfig',
|
||||
Serverless = 'Serverless',
|
||||
Storage = 'Storage',
|
||||
Support = 'Support',
|
||||
Workspace = 'Workspace'
|
||||
}
|
||||
|
||||
export type EnvironmentVariablesGroupData = {
|
||||
__typename?: 'EnvironmentVariablesGroupData';
|
||||
groupName: EnvironmentVariablesGroup;
|
||||
subgroups: Array<EnvironmentVariablesSubgroupData>;
|
||||
variables: Array<EnvironmentVariable>;
|
||||
};
|
||||
|
||||
export type EnvironmentVariablesOutput = {
|
||||
__typename?: 'EnvironmentVariablesOutput';
|
||||
groups: Array<EnvironmentVariablesGroupData>;
|
||||
};
|
||||
|
||||
export enum EnvironmentVariablesSubGroup {
|
||||
CloudflareConfig = 'CloudflareConfig',
|
||||
EmailSettings = 'EmailSettings',
|
||||
FrontSupportConfig = 'FrontSupportConfig',
|
||||
GoogleAuth = 'GoogleAuth',
|
||||
LambdaConfig = 'LambdaConfig',
|
||||
MicrosoftAuth = 'MicrosoftAuth',
|
||||
PasswordAuth = 'PasswordAuth',
|
||||
RateLimiting = 'RateLimiting',
|
||||
S3Config = 'S3Config',
|
||||
SSL = 'SSL',
|
||||
SentryConfig = 'SentryConfig',
|
||||
SmtpConfig = 'SmtpConfig',
|
||||
StripeConfig = 'StripeConfig',
|
||||
TinybirdConfig = 'TinybirdConfig',
|
||||
Tokens = 'Tokens'
|
||||
}
|
||||
|
||||
export type EnvironmentVariablesSubgroupData = {
|
||||
__typename?: 'EnvironmentVariablesSubgroupData';
|
||||
subgroupName: EnvironmentVariablesSubGroup;
|
||||
variables: Array<EnvironmentVariable>;
|
||||
};
|
||||
|
||||
export type ExecuteServerlessFunctionInput = {
|
||||
/** Id of the serverless function to execute */
|
||||
id: Scalars['UUID'];
|
||||
@ -1177,6 +1240,7 @@ export type Query = {
|
||||
findWorkspaceFromInviteHash: Workspace;
|
||||
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
||||
getAvailablePackages: Scalars['JSON'];
|
||||
getEnvironmentVariablesGrouped: EnvironmentVariablesOutput;
|
||||
getHostnameDetails?: Maybe<CustomHostnameDetails>;
|
||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||
getProductPrices: BillingProductPricesOutput;
|
||||
@ -2151,6 +2215,11 @@ export type UserLookupAdminPanelMutationVariables = Exact<{
|
||||
|
||||
export type UserLookupAdminPanelMutation = { __typename?: 'Mutation', userLookupAdminPanel: { __typename?: 'UserLookup', user: { __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }, workspaces: Array<{ __typename?: 'WorkspaceInfo', id: string, name: string, logo?: string | null, totalUsers: number, allowImpersonation: boolean, users: Array<{ __typename?: 'UserInfo', id: string, email: string, firstName?: string | null, lastName?: string | null }>, featureFlags: Array<{ __typename?: 'FeatureFlag', key: FeatureFlagKey, value: boolean }> }> } };
|
||||
|
||||
export type GetEnvironmentVariablesGroupedQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type GetEnvironmentVariablesGroupedQuery = { __typename?: 'Query', getEnvironmentVariablesGrouped: { __typename?: 'EnvironmentVariablesOutput', groups: Array<{ __typename?: 'EnvironmentVariablesGroupData', groupName: EnvironmentVariablesGroup, variables: Array<{ __typename?: 'EnvironmentVariable', name: string, description: string, value: string, sensitive: boolean }>, subgroups: Array<{ __typename?: 'EnvironmentVariablesSubgroupData', subgroupName: EnvironmentVariablesSubGroup, variables: Array<{ __typename?: 'EnvironmentVariable', name: string, description: string, value: string, sensitive: boolean }> }> }> } };
|
||||
|
||||
export type UpdateLabPublicFeatureFlagMutationVariables = Exact<{
|
||||
input: UpdateLabPublicFeatureFlagInput;
|
||||
}>;
|
||||
@ -3762,6 +3831,57 @@ export function useUserLookupAdminPanelMutation(baseOptions?: Apollo.MutationHoo
|
||||
export type UserLookupAdminPanelMutationHookResult = ReturnType<typeof useUserLookupAdminPanelMutation>;
|
||||
export type UserLookupAdminPanelMutationResult = Apollo.MutationResult<UserLookupAdminPanelMutation>;
|
||||
export type UserLookupAdminPanelMutationOptions = Apollo.BaseMutationOptions<UserLookupAdminPanelMutation, UserLookupAdminPanelMutationVariables>;
|
||||
export const GetEnvironmentVariablesGroupedDocument = gql`
|
||||
query GetEnvironmentVariablesGrouped {
|
||||
getEnvironmentVariablesGrouped {
|
||||
groups {
|
||||
groupName
|
||||
variables {
|
||||
name
|
||||
description
|
||||
value
|
||||
sensitive
|
||||
}
|
||||
subgroups {
|
||||
subgroupName
|
||||
variables {
|
||||
name
|
||||
description
|
||||
value
|
||||
sensitive
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetEnvironmentVariablesGroupedQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetEnvironmentVariablesGroupedQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetEnvironmentVariablesGroupedQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetEnvironmentVariablesGroupedQuery({
|
||||
* variables: {
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetEnvironmentVariablesGroupedQuery(baseOptions?: Apollo.QueryHookOptions<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>(GetEnvironmentVariablesGroupedDocument, options);
|
||||
}
|
||||
export function useGetEnvironmentVariablesGroupedLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>(GetEnvironmentVariablesGroupedDocument, options);
|
||||
}
|
||||
export type GetEnvironmentVariablesGroupedQueryHookResult = ReturnType<typeof useGetEnvironmentVariablesGroupedQuery>;
|
||||
export type GetEnvironmentVariablesGroupedLazyQueryHookResult = ReturnType<typeof useGetEnvironmentVariablesGroupedLazyQuery>;
|
||||
export type GetEnvironmentVariablesGroupedQueryResult = Apollo.QueryResult<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>;
|
||||
export const UpdateLabPublicFeatureFlagDocument = gql`
|
||||
mutation UpdateLabPublicFeatureFlag($input: UpdateLabPublicFeatureFlagInput!) {
|
||||
updateLabPublicFeatureFlag(input: $input)
|
||||
|
||||
Reference in New Issue
Block a user