rename core-module environment to twenty-config (#11445)
closes https://github.com/twentyhq/core-team-issues/issues/759
This commit is contained in:
@ -145,6 +145,25 @@ export type Billing = {
|
||||
trialPeriods: Array<BillingTrialPeriodDto>;
|
||||
};
|
||||
|
||||
export type BillingEndTrialPeriodOutput = {
|
||||
__typename?: 'BillingEndTrialPeriodOutput';
|
||||
/** Boolean that confirms if a payment method was found */
|
||||
hasPaymentMethod: Scalars['Boolean']['output'];
|
||||
/** Updated subscription status */
|
||||
status?: Maybe<SubscriptionStatus>;
|
||||
};
|
||||
|
||||
export type BillingMeteredProductUsageOutput = {
|
||||
__typename?: 'BillingMeteredProductUsageOutput';
|
||||
includedFreeQuantity: Scalars['Float']['output'];
|
||||
periodEnd: Scalars['DateTime']['output'];
|
||||
periodStart: Scalars['DateTime']['output'];
|
||||
productKey: BillingProductKey;
|
||||
totalCostCents: Scalars['Float']['output'];
|
||||
unitPriceCents: Scalars['Float']['output'];
|
||||
usageQuantity: Scalars['Float']['output'];
|
||||
};
|
||||
|
||||
/** The different billing plans available */
|
||||
export enum BillingPlanKey {
|
||||
ENTERPRISE = 'ENTERPRISE',
|
||||
@ -153,9 +172,9 @@ export enum BillingPlanKey {
|
||||
|
||||
export type BillingPlanOutput = {
|
||||
__typename?: 'BillingPlanOutput';
|
||||
baseProduct: BillingProductDto;
|
||||
meteredProducts: Array<BillingProductDto>;
|
||||
otherLicensedProducts: Array<BillingProductDto>;
|
||||
baseProduct: BillingProduct;
|
||||
meteredProducts: Array<BillingProduct>;
|
||||
otherLicensedProducts: Array<BillingProduct>;
|
||||
planKey: BillingPlanKey;
|
||||
};
|
||||
|
||||
@ -191,13 +210,26 @@ export enum BillingPriceTiersMode {
|
||||
|
||||
export type BillingPriceUnionDto = BillingPriceLicensedDto | BillingPriceMeteredDto;
|
||||
|
||||
export type BillingProductDto = {
|
||||
__typename?: 'BillingProductDTO';
|
||||
export type BillingProduct = {
|
||||
__typename?: 'BillingProduct';
|
||||
description: Scalars['String']['output'];
|
||||
images?: Maybe<Array<Scalars['String']['output']>>;
|
||||
metadata: BillingProductMetadata;
|
||||
name: Scalars['String']['output'];
|
||||
prices: Array<BillingPriceUnionDto>;
|
||||
type: BillingUsageType;
|
||||
prices?: Maybe<Array<BillingPriceUnionDto>>;
|
||||
};
|
||||
|
||||
/** The different billing products available */
|
||||
export enum BillingProductKey {
|
||||
BASE_PRODUCT = 'BASE_PRODUCT',
|
||||
WORKFLOW_NODE_EXECUTION = 'WORKFLOW_NODE_EXECUTION'
|
||||
}
|
||||
|
||||
export type BillingProductMetadata = {
|
||||
__typename?: 'BillingProductMetadata';
|
||||
planKey: BillingPlanKey;
|
||||
priceUsageBased: BillingUsageType;
|
||||
productKey: BillingProductKey;
|
||||
};
|
||||
|
||||
export type BillingSessionOutput = {
|
||||
@ -207,11 +239,19 @@ export type BillingSessionOutput = {
|
||||
|
||||
export type BillingSubscription = {
|
||||
__typename?: 'BillingSubscription';
|
||||
billingSubscriptionItems?: Maybe<Array<BillingSubscriptionItem>>;
|
||||
id: Scalars['UUID']['output'];
|
||||
interval?: Maybe<SubscriptionInterval>;
|
||||
status: SubscriptionStatus;
|
||||
};
|
||||
|
||||
export type BillingSubscriptionItem = {
|
||||
__typename?: 'BillingSubscriptionItem';
|
||||
billingProduct?: Maybe<BillingProduct>;
|
||||
hasReachedCurrentPeriodCap: Scalars['Boolean']['output'];
|
||||
id: Scalars['UUID']['output'];
|
||||
};
|
||||
|
||||
export type BillingTrialPeriodDto = {
|
||||
__typename?: 'BillingTrialPeriodDTO';
|
||||
duration: Scalars['Float']['output'];
|
||||
@ -280,6 +320,49 @@ export type ComputeStepOutputSchemaInput = {
|
||||
step: Scalars['JSON']['input'];
|
||||
};
|
||||
|
||||
export type ConfigVariable = {
|
||||
__typename?: 'ConfigVariable';
|
||||
description: Scalars['String']['output'];
|
||||
isSensitive: Scalars['Boolean']['output'];
|
||||
name: Scalars['String']['output'];
|
||||
value: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export enum ConfigVariablesGroup {
|
||||
AnalyticsConfig = 'AnalyticsConfig',
|
||||
BillingConfig = 'BillingConfig',
|
||||
CaptchaConfig = 'CaptchaConfig',
|
||||
CloudflareConfig = 'CloudflareConfig',
|
||||
EmailSettings = 'EmailSettings',
|
||||
ExceptionHandler = 'ExceptionHandler',
|
||||
GoogleAuth = 'GoogleAuth',
|
||||
LLM = 'LLM',
|
||||
Logging = 'Logging',
|
||||
Metering = 'Metering',
|
||||
MicrosoftAuth = 'MicrosoftAuth',
|
||||
Other = 'Other',
|
||||
RateLimiting = 'RateLimiting',
|
||||
SSL = 'SSL',
|
||||
ServerConfig = 'ServerConfig',
|
||||
ServerlessConfig = 'ServerlessConfig',
|
||||
StorageConfig = 'StorageConfig',
|
||||
SupportChatConfig = 'SupportChatConfig',
|
||||
TokensDuration = 'TokensDuration'
|
||||
}
|
||||
|
||||
export type ConfigVariablesGroupData = {
|
||||
__typename?: 'ConfigVariablesGroupData';
|
||||
description: Scalars['String']['output'];
|
||||
isHiddenOnLoad: Scalars['Boolean']['output'];
|
||||
name: ConfigVariablesGroup;
|
||||
variables: Array<ConfigVariable>;
|
||||
};
|
||||
|
||||
export type ConfigVariablesOutput = {
|
||||
__typename?: 'ConfigVariablesOutput';
|
||||
groups: Array<ConfigVariablesGroupData>;
|
||||
};
|
||||
|
||||
export type CreateAppTokenInput = {
|
||||
expiresAt: Scalars['DateTime']['input'];
|
||||
};
|
||||
@ -498,49 +581,6 @@ export type EmailPasswordResetLink = {
|
||||
success: Scalars['Boolean']['output'];
|
||||
};
|
||||
|
||||
export type EnvironmentVariable = {
|
||||
__typename?: 'EnvironmentVariable';
|
||||
description: Scalars['String']['output'];
|
||||
name: Scalars['String']['output'];
|
||||
sensitive: Scalars['Boolean']['output'];
|
||||
value: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export enum EnvironmentVariablesGroup {
|
||||
AnalyticsConfig = 'AnalyticsConfig',
|
||||
BillingConfig = 'BillingConfig',
|
||||
CaptchaConfig = 'CaptchaConfig',
|
||||
CloudflareConfig = 'CloudflareConfig',
|
||||
EmailSettings = 'EmailSettings',
|
||||
ExceptionHandler = 'ExceptionHandler',
|
||||
GoogleAuth = 'GoogleAuth',
|
||||
LLM = 'LLM',
|
||||
Logging = 'Logging',
|
||||
Metering = 'Metering',
|
||||
MicrosoftAuth = 'MicrosoftAuth',
|
||||
Other = 'Other',
|
||||
RateLimiting = 'RateLimiting',
|
||||
SSL = 'SSL',
|
||||
ServerConfig = 'ServerConfig',
|
||||
ServerlessConfig = 'ServerlessConfig',
|
||||
StorageConfig = 'StorageConfig',
|
||||
SupportChatConfig = 'SupportChatConfig',
|
||||
TokensDuration = 'TokensDuration'
|
||||
}
|
||||
|
||||
export type EnvironmentVariablesGroupData = {
|
||||
__typename?: 'EnvironmentVariablesGroupData';
|
||||
description: Scalars['String']['output'];
|
||||
isHiddenOnLoad: Scalars['Boolean']['output'];
|
||||
name: EnvironmentVariablesGroup;
|
||||
variables: Array<EnvironmentVariable>;
|
||||
};
|
||||
|
||||
export type EnvironmentVariablesOutput = {
|
||||
__typename?: 'EnvironmentVariablesOutput';
|
||||
groups: Array<EnvironmentVariablesGroupData>;
|
||||
};
|
||||
|
||||
export type ExecuteServerlessFunctionInput = {
|
||||
/** Id of the serverless function to execute */
|
||||
id: Scalars['UUID']['input'];
|
||||
@ -908,6 +948,7 @@ export type Mutation = {
|
||||
editSSOIdentityProvider: EditSsoOutput;
|
||||
emailPasswordResetLink: EmailPasswordResetLink;
|
||||
enablePostgresProxy: PostgresCredentials;
|
||||
endSubscriptionTrialPeriod: BillingEndTrialPeriodOutput;
|
||||
executeOneServerlessFunction: ServerlessFunctionExecutionResult;
|
||||
generateApiKeyToken: ApiKeyToken;
|
||||
generateTransientToken: TransientToken;
|
||||
@ -926,11 +967,11 @@ export type Mutation = {
|
||||
signUpInNewWorkspace: SignUpOutput;
|
||||
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
|
||||
submitFormStep: Scalars['Boolean']['output'];
|
||||
switchToYearlyInterval: BillingUpdateOutput;
|
||||
syncRemoteTable: RemoteTable;
|
||||
syncRemoteTableSchemaChanges: RemoteTable;
|
||||
track: Analytics;
|
||||
unsyncRemoteTable: RemoteTable;
|
||||
updateBillingSubscription: BillingUpdateOutput;
|
||||
updateLabPublicFeatureFlag: FeatureFlag;
|
||||
updateOneField: Field;
|
||||
updateOneObject: Object;
|
||||
@ -1524,8 +1565,9 @@ export type Query = {
|
||||
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
||||
getApprovedAccessDomains: Array<ApprovedAccessDomain>;
|
||||
getAvailablePackages: Scalars['JSON']['output'];
|
||||
getEnvironmentVariablesGrouped: EnvironmentVariablesOutput;
|
||||
getConfigVariablesGrouped: ConfigVariablesOutput;
|
||||
getIndicatorHealthStatus: AdminPanelHealthServiceData;
|
||||
getMeteredProductsUsage: Array<BillingMeteredProductUsageOutput>;
|
||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||
getPublicWorkspaceDataByDomain: PublicWorkspaceDataOutput;
|
||||
getQueueMetrics: QueueMetricsData;
|
||||
@ -1545,6 +1587,7 @@ export type Query = {
|
||||
relationMetadata: RelationMetadataConnection;
|
||||
search: Array<SearchRecord>;
|
||||
validatePasswordResetToken: ValidatePasswordResetToken;
|
||||
versionInfo: VersionInfo;
|
||||
};
|
||||
|
||||
|
||||
@ -2369,6 +2412,12 @@ export type ValidatePasswordResetToken = {
|
||||
id: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type VersionInfo = {
|
||||
__typename?: 'VersionInfo';
|
||||
currentVersion?: Maybe<Scalars['String']['output']>;
|
||||
latestVersion: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type WorkerQueueMetrics = {
|
||||
__typename?: 'WorkerQueueMetrics';
|
||||
active: Scalars['Float']['output'];
|
||||
|
||||
@ -312,6 +312,49 @@ export type ComputeStepOutputSchemaInput = {
|
||||
step: Scalars['JSON'];
|
||||
};
|
||||
|
||||
export type ConfigVariable = {
|
||||
__typename?: 'ConfigVariable';
|
||||
description: Scalars['String'];
|
||||
isSensitive: Scalars['Boolean'];
|
||||
name: Scalars['String'];
|
||||
value: Scalars['String'];
|
||||
};
|
||||
|
||||
export enum ConfigVariablesGroup {
|
||||
AnalyticsConfig = 'AnalyticsConfig',
|
||||
BillingConfig = 'BillingConfig',
|
||||
CaptchaConfig = 'CaptchaConfig',
|
||||
CloudflareConfig = 'CloudflareConfig',
|
||||
EmailSettings = 'EmailSettings',
|
||||
ExceptionHandler = 'ExceptionHandler',
|
||||
GoogleAuth = 'GoogleAuth',
|
||||
LLM = 'LLM',
|
||||
Logging = 'Logging',
|
||||
Metering = 'Metering',
|
||||
MicrosoftAuth = 'MicrosoftAuth',
|
||||
Other = 'Other',
|
||||
RateLimiting = 'RateLimiting',
|
||||
SSL = 'SSL',
|
||||
ServerConfig = 'ServerConfig',
|
||||
ServerlessConfig = 'ServerlessConfig',
|
||||
StorageConfig = 'StorageConfig',
|
||||
SupportChatConfig = 'SupportChatConfig',
|
||||
TokensDuration = 'TokensDuration'
|
||||
}
|
||||
|
||||
export type ConfigVariablesGroupData = {
|
||||
__typename?: 'ConfigVariablesGroupData';
|
||||
description: Scalars['String'];
|
||||
isHiddenOnLoad: Scalars['Boolean'];
|
||||
name: ConfigVariablesGroup;
|
||||
variables: Array<ConfigVariable>;
|
||||
};
|
||||
|
||||
export type ConfigVariablesOutput = {
|
||||
__typename?: 'ConfigVariablesOutput';
|
||||
groups: Array<ConfigVariablesGroupData>;
|
||||
};
|
||||
|
||||
export type CreateApprovedAccessDomainInput = {
|
||||
domain: Scalars['String'];
|
||||
email: Scalars['String'];
|
||||
@ -469,49 +512,6 @@ 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 {
|
||||
AnalyticsConfig = 'AnalyticsConfig',
|
||||
BillingConfig = 'BillingConfig',
|
||||
CaptchaConfig = 'CaptchaConfig',
|
||||
CloudflareConfig = 'CloudflareConfig',
|
||||
EmailSettings = 'EmailSettings',
|
||||
ExceptionHandler = 'ExceptionHandler',
|
||||
GoogleAuth = 'GoogleAuth',
|
||||
LLM = 'LLM',
|
||||
Logging = 'Logging',
|
||||
Metering = 'Metering',
|
||||
MicrosoftAuth = 'MicrosoftAuth',
|
||||
Other = 'Other',
|
||||
RateLimiting = 'RateLimiting',
|
||||
SSL = 'SSL',
|
||||
ServerConfig = 'ServerConfig',
|
||||
ServerlessConfig = 'ServerlessConfig',
|
||||
StorageConfig = 'StorageConfig',
|
||||
SupportChatConfig = 'SupportChatConfig',
|
||||
TokensDuration = 'TokensDuration'
|
||||
}
|
||||
|
||||
export type EnvironmentVariablesGroupData = {
|
||||
__typename?: 'EnvironmentVariablesGroupData';
|
||||
description: Scalars['String'];
|
||||
isHiddenOnLoad: Scalars['Boolean'];
|
||||
name: EnvironmentVariablesGroup;
|
||||
variables: Array<EnvironmentVariable>;
|
||||
};
|
||||
|
||||
export type EnvironmentVariablesOutput = {
|
||||
__typename?: 'EnvironmentVariablesOutput';
|
||||
groups: Array<EnvironmentVariablesGroupData>;
|
||||
};
|
||||
|
||||
export type ExecuteServerlessFunctionInput = {
|
||||
/** Id of the serverless function to execute */
|
||||
id: Scalars['UUID'];
|
||||
@ -1428,7 +1428,7 @@ export type Query = {
|
||||
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
||||
getApprovedAccessDomains: Array<ApprovedAccessDomain>;
|
||||
getAvailablePackages: Scalars['JSON'];
|
||||
getEnvironmentVariablesGrouped: EnvironmentVariablesOutput;
|
||||
getConfigVariablesGrouped: ConfigVariablesOutput;
|
||||
getIndicatorHealthStatus: AdminPanelHealthServiceData;
|
||||
getMeteredProductsUsage: Array<BillingMeteredProductUsageOutput>;
|
||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||
@ -2625,10 +2625,10 @@ 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 GetConfigVariablesGroupedQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type GetEnvironmentVariablesGroupedQuery = { __typename?: 'Query', getEnvironmentVariablesGrouped: { __typename?: 'EnvironmentVariablesOutput', groups: Array<{ __typename?: 'EnvironmentVariablesGroupData', name: EnvironmentVariablesGroup, description: string, isHiddenOnLoad: boolean, variables: Array<{ __typename?: 'EnvironmentVariable', name: string, description: string, value: string, sensitive: boolean }> }> } };
|
||||
export type GetConfigVariablesGroupedQuery = { __typename?: 'Query', getConfigVariablesGrouped: { __typename?: 'ConfigVariablesOutput', groups: Array<{ __typename?: 'ConfigVariablesGroupData', name: ConfigVariablesGroup, description: string, isHiddenOnLoad: boolean, variables: Array<{ __typename?: 'ConfigVariable', name: string, description: string, value: string, isSensitive: boolean }> }> } };
|
||||
|
||||
export type GetVersionInfoQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@ -4578,9 +4578,9 @@ 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 {
|
||||
export const GetConfigVariablesGroupedDocument = gql`
|
||||
query GetConfigVariablesGrouped {
|
||||
getConfigVariablesGrouped {
|
||||
groups {
|
||||
name
|
||||
description
|
||||
@ -4589,7 +4589,7 @@ export const GetEnvironmentVariablesGroupedDocument = gql`
|
||||
name
|
||||
description
|
||||
value
|
||||
sensitive
|
||||
isSensitive
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4597,31 +4597,31 @@ export const GetEnvironmentVariablesGroupedDocument = gql`
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetEnvironmentVariablesGroupedQuery__
|
||||
* __useGetConfigVariablesGroupedQuery__
|
||||
*
|
||||
* 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
|
||||
* To run a query within a React component, call `useGetConfigVariablesGroupedQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetConfigVariablesGroupedQuery` 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({
|
||||
* const { data, loading, error } = useGetConfigVariablesGroupedQuery({
|
||||
* variables: {
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetEnvironmentVariablesGroupedQuery(baseOptions?: Apollo.QueryHookOptions<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>) {
|
||||
export function useGetConfigVariablesGroupedQuery(baseOptions?: Apollo.QueryHookOptions<GetConfigVariablesGroupedQuery, GetConfigVariablesGroupedQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>(GetEnvironmentVariablesGroupedDocument, options);
|
||||
return Apollo.useQuery<GetConfigVariablesGroupedQuery, GetConfigVariablesGroupedQueryVariables>(GetConfigVariablesGroupedDocument, options);
|
||||
}
|
||||
export function useGetEnvironmentVariablesGroupedLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>) {
|
||||
export function useGetConfigVariablesGroupedLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetConfigVariablesGroupedQuery, GetConfigVariablesGroupedQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>(GetEnvironmentVariablesGroupedDocument, options);
|
||||
return Apollo.useLazyQuery<GetConfigVariablesGroupedQuery, GetConfigVariablesGroupedQueryVariables>(GetConfigVariablesGroupedDocument, options);
|
||||
}
|
||||
export type GetEnvironmentVariablesGroupedQueryHookResult = ReturnType<typeof useGetEnvironmentVariablesGroupedQuery>;
|
||||
export type GetEnvironmentVariablesGroupedLazyQueryHookResult = ReturnType<typeof useGetEnvironmentVariablesGroupedLazyQuery>;
|
||||
export type GetEnvironmentVariablesGroupedQueryResult = Apollo.QueryResult<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>;
|
||||
export type GetConfigVariablesGroupedQueryHookResult = ReturnType<typeof useGetConfigVariablesGroupedQuery>;
|
||||
export type GetConfigVariablesGroupedLazyQueryHookResult = ReturnType<typeof useGetConfigVariablesGroupedLazyQuery>;
|
||||
export type GetConfigVariablesGroupedQueryResult = Apollo.QueryResult<GetConfigVariablesGroupedQuery, GetConfigVariablesGroupedQueryVariables>;
|
||||
export const GetVersionInfoDocument = gql`
|
||||
query GetVersionInfo {
|
||||
versionInfo {
|
||||
|
||||
@ -5,10 +5,10 @@ import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useGetEnvironmentVariablesGroupedQuery } from '~/generated/graphql';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
import { Card, Section } from 'twenty-ui/layout';
|
||||
import { H2Title, IconHeartRateMonitor } from 'twenty-ui/display';
|
||||
import { Card, Section } from 'twenty-ui/layout';
|
||||
import { useGetConfigVariablesGroupedQuery } from '~/generated/graphql';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
|
||||
const StyledGroupContainer = styled.div``;
|
||||
|
||||
@ -22,17 +22,17 @@ const StyledCard = styled(Card)`
|
||||
|
||||
export const SettingsAdminEnvVariables = () => {
|
||||
const theme = useTheme();
|
||||
const { data: environmentVariables, loading: environmentVariablesLoading } =
|
||||
useGetEnvironmentVariablesGroupedQuery({
|
||||
const { data: configVariables, loading: configVariablesLoading } =
|
||||
useGetConfigVariablesGroupedQuery({
|
||||
fetchPolicy: 'network-only',
|
||||
});
|
||||
|
||||
const visibleGroups =
|
||||
environmentVariables?.getEnvironmentVariablesGrouped.groups.filter(
|
||||
configVariables?.getConfigVariablesGrouped.groups.filter(
|
||||
(group) => !group.isHiddenOnLoad,
|
||||
) ?? [];
|
||||
|
||||
if (environmentVariablesLoading) {
|
||||
if (configVariablesLoading) {
|
||||
return <SettingsAdminTabSkeletonLoader />;
|
||||
}
|
||||
|
||||
|
||||
@ -6,16 +6,16 @@ import { useTheme } from '@emotion/react';
|
||||
import styled from '@emotion/styled';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { AnimatedExpandableContainer } from 'twenty-ui/layout';
|
||||
import { IconChevronRight, IconEye, IconEyeOff } from 'twenty-ui/display';
|
||||
import { LightIconButton } from 'twenty-ui/input';
|
||||
import { AnimatedExpandableContainer } from 'twenty-ui/layout';
|
||||
|
||||
type SettingsAdminEnvVariablesRowProps = {
|
||||
variable: {
|
||||
name: string;
|
||||
description: string;
|
||||
value: string;
|
||||
sensitive: boolean;
|
||||
isSensitive: boolean;
|
||||
};
|
||||
isExpanded: boolean;
|
||||
onExpandToggle: (name: string) => void;
|
||||
@ -79,7 +79,7 @@ export const SettingsAdminEnvVariablesRow = ({
|
||||
const displayValue =
|
||||
variable.value === ''
|
||||
? 'null'
|
||||
: variable.sensitive && !showSensitiveValue
|
||||
: variable.isSensitive && !showSensitiveValue
|
||||
? '••••••'
|
||||
: variable.value;
|
||||
|
||||
@ -112,7 +112,7 @@ export const SettingsAdminEnvVariablesRow = ({
|
||||
displayText={displayValue}
|
||||
multiline={true}
|
||||
/>
|
||||
{variable.sensitive && variable.value !== '' && (
|
||||
{variable.isSensitive && variable.value !== '' && (
|
||||
<LightIconButton
|
||||
Icon={showSensitiveValue ? IconEyeOff : IconEye}
|
||||
size="small"
|
||||
|
||||
@ -15,7 +15,7 @@ type SettingsAdminEnvVariablesTableProps = {
|
||||
name: string;
|
||||
description: string;
|
||||
value: string;
|
||||
sensitive: boolean;
|
||||
isSensitive: boolean;
|
||||
}>;
|
||||
};
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_ENVIRONMENT_VARIABLES_GROUPED = gql`
|
||||
query GetEnvironmentVariablesGrouped {
|
||||
getEnvironmentVariablesGrouped {
|
||||
export const GET_CONFIG_VARIABLES_GROUPED = gql`
|
||||
query GetConfigVariablesGrouped {
|
||||
getConfigVariablesGrouped {
|
||||
groups {
|
||||
name
|
||||
description
|
||||
@ -11,7 +11,7 @@ export const GET_ENVIRONMENT_VARIABLES_GROUPED = gql`
|
||||
name
|
||||
description
|
||||
value
|
||||
sensitive
|
||||
isSensitive
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,24 +5,26 @@ import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { useGetEnvironmentVariablesGroupedQuery } from '~/generated/graphql';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
import { H2Title } from 'twenty-ui/display';
|
||||
import { useGetConfigVariablesGroupedQuery } from '~/generated/graphql';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
|
||||
const StyledGroupContainer = styled.div``;
|
||||
|
||||
export const SettingsAdminSecondaryEnvVariables = () => {
|
||||
const { data: environmentVariables, loading: environmentVariablesLoading } =
|
||||
useGetEnvironmentVariablesGroupedQuery({
|
||||
fetchPolicy: 'network-only',
|
||||
});
|
||||
const {
|
||||
data: secondaryConfigVariables,
|
||||
loading: secondaryConfigVariablesLoading,
|
||||
} = useGetConfigVariablesGroupedQuery({
|
||||
fetchPolicy: 'network-only',
|
||||
});
|
||||
|
||||
const hiddenGroups =
|
||||
environmentVariables?.getEnvironmentVariablesGrouped.groups.filter(
|
||||
secondaryConfigVariables?.getConfigVariablesGrouped.groups.filter(
|
||||
(group) => group.isHiddenOnLoad,
|
||||
) ?? [];
|
||||
|
||||
if (environmentVariablesLoading) {
|
||||
if (secondaryConfigVariablesLoading) {
|
||||
return <SettingsSkeletonLoader />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user