Skip to content

Commit

Permalink
refactor: try to generate types for WorkflowStatus and WorkflowVersio…
Browse files Browse the repository at this point in the history
…nStatus
  • Loading branch information
Devessier committed Sep 3, 2024
1 parent 9a1493c commit 08de8f8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
29 changes: 15 additions & 14 deletions packages/twenty-front/src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export type ExecuteServerlessFunctionInput = {
/** Id of the serverless function to execute */
id: Scalars['UUID'];
/** Payload in JSON format */
payload?: InputMaybe<Scalars['JSON']>;
payload: Scalars['JSON'];
/** Version of the serverless function to execute */
version?: Scalars['String'];
};
Expand Down Expand Up @@ -337,6 +337,7 @@ export enum MessageChannelVisibility {

export type Mutation = {
__typename?: 'Mutation';
activateWorkflowVersion: Scalars['Boolean'];
activateWorkspace: Workspace;
addUserToWorkspace: User;
authorizeApp: AuthorizeApp;
Expand All @@ -346,15 +347,14 @@ export type Mutation = {
createOneObject: Object;
createOneServerlessFunction: ServerlessFunction;
createOneServerlessFunctionFromFile: ServerlessFunction;
deactivateWorkflowVersion: Scalars['Boolean'];
deleteCurrentWorkspace: Workspace;
deleteOneObject: Object;
deleteOneServerlessFunction: ServerlessFunction;
deleteUser: User;
disablePostgresProxy: PostgresCredentials;
disableWorkflowTrigger: Scalars['Boolean'];
emailPasswordResetLink: EmailPasswordResetLink;
enablePostgresProxy: PostgresCredentials;
enableWorkflowTrigger: Scalars['Boolean'];
exchangeAuthorizationCode: ExchangeAuthCode;
executeOneServerlessFunction: ServerlessFunctionExecutionResult;
generateApiKeyToken: ApiKeyToken;
Expand All @@ -381,6 +381,11 @@ export type Mutation = {
};


export type MutationActivateWorkflowVersionArgs = {
workflowVersionId: Scalars['String'];
};


export type MutationActivateWorkspaceArgs = {
data: ActivateWorkspaceInput;
};
Expand Down Expand Up @@ -422,6 +427,11 @@ export type MutationCreateOneServerlessFunctionFromFileArgs = {
};


export type MutationDeactivateWorkflowVersionArgs = {
workflowVersionId: Scalars['String'];
};


export type MutationDeleteOneObjectArgs = {
input: DeleteOneObjectInput;
};
Expand All @@ -432,21 +442,11 @@ export type MutationDeleteOneServerlessFunctionArgs = {
};


export type MutationDisableWorkflowTriggerArgs = {
workflowVersionId: Scalars['String'];
};


export type MutationEmailPasswordResetLinkArgs = {
email: Scalars['String'];
};


export type MutationEnableWorkflowTriggerArgs = {
workflowVersionId: Scalars['String'];
};


export type MutationExchangeAuthorizationCodeArgs = {
authorizationCode: Scalars['String'];
clientSecret?: InputMaybe<Scalars['String']>;
Expand Down Expand Up @@ -637,9 +637,10 @@ export type Query = {
currentWorkspace: Workspace;
findWorkspaceFromInviteHash: Workspace;
getAISQLQuery: AisqlQueryResult;
getAvailablePackages: Scalars['JSON'];
getPostgresCredentials?: Maybe<PostgresCredentials>;
getProductPrices: ProductPricesEntity;
getServerlessFunctionSourceCode: Scalars['String'];
getServerlessFunctionSourceCode?: Maybe<Scalars['String']>;
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
getTimelineCalendarEventsFromPersonId: TimelineCalendarEventsWithTotal;
getTimelineThreadsFromCompanyId: TimelineThreadsWithTotal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { registerEnumType } from '@nestjs/graphql';

import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';

import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
Expand Down Expand Up @@ -31,6 +33,8 @@ export enum WorkflowVersionStatus {
ARCHIVED = 'ARCHIVED',
}

registerEnumType(WorkflowVersionStatus, { name: 'WorkflowVersionStatus' });

const WorkflowVersionStatusOptions = [
{
value: WorkflowVersionStatus.DRAFT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { registerEnumType } from '@nestjs/graphql';

import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';

import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
Expand Down Expand Up @@ -26,6 +28,8 @@ export enum WorkflowStatus {
DEACTIVATED = 'DEACTIVATED',
}

registerEnumType(WorkflowStatus, { name: 'WorkflowStatus' });

const WorkflowStatusOptions = [
{
value: WorkflowStatus.DRAFT,
Expand Down

0 comments on commit 08de8f8

Please sign in to comment.