diff --git a/packages/twenty-front/src/modules/object-record/record-field/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/form-types/components/FormMultiSelectFieldInput.tsx index 2646c8725431..5ba322b34573 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/form-types/components/FormMultiSelectFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/form-types/components/FormMultiSelectFieldInput.tsx @@ -27,6 +27,7 @@ type FormMultiSelectFieldInputProps = { VariablePicker?: VariablePickerComponent; readonly?: boolean; placeholder?: string; + testId?: string; }; const StyledDisplayModeReadonlyContainer = styled.div` @@ -68,6 +69,7 @@ export const FormMultiSelectFieldInput = ({ VariablePicker, readonly, placeholder, + testId, }: FormMultiSelectFieldInputProps) => { const inputId = useId(); const theme = useTheme(); @@ -176,7 +178,7 @@ export const FormMultiSelectFieldInput = ({ const placeholderText = placeholder ?? label; return ( - + {label ? {label} : null} diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepHeader.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepHeader.tsx index d0db052fdd05..ffb92117f0c8 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepHeader.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowStepHeader.tsx @@ -49,12 +49,14 @@ export const WorkflowStepHeader = ({ iconColor, initialTitle, headerType, + disabled, }: { onTitleChange: (newTitle: string) => void; Icon: IconComponent; iconColor: string; initialTitle: string; headerType: string; + disabled?: boolean; }) => { const theme = useTheme(); const [title, setTitle] = useState(initialTitle); @@ -67,17 +69,16 @@ export const WorkflowStepHeader = ({ return ( - { - - } + = { + title: 'Modules/Workflow/WorkflowStepHeader', + component: WorkflowStepHeader, + args: { + onTitleChange: fn(), + }, + argTypes: {}, + decorators: [ComponentDecorator], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + headerType: 'Action', + iconColor: THEME_LIGHT.font.color.tertiary, + initialTitle: 'Create Record', + Icon: IconPlus, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + expect(await canvas.findByDisplayValue('Create Record')).toBeVisible(); + expect(await canvas.findByText('Action')).toBeVisible(); + }, +}; + +export const EditableTitle: Story = { + args: { + headerType: 'Action', + iconColor: THEME_LIGHT.font.color.tertiary, + initialTitle: 'Create Record', + Icon: IconPlus, + onTitleChange: fn(), + }, + play: async ({ canvasElement, args }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Create Record'); + + const NEW_TITLE = 'New Title'; + + await userEvent.clear(titleInput); + + await waitFor(() => { + expect(args.onTitleChange).toHaveBeenCalledWith(''); + }); + + await userEvent.type(titleInput, NEW_TITLE); + + await waitFor(() => { + expect(args.onTitleChange).toHaveBeenCalledWith(NEW_TITLE); + }); + + expect(args.onTitleChange).toHaveBeenCalledTimes(2); + expect(titleInput).toHaveValue(NEW_TITLE); + }, +}; + +export const Disabled: Story = { + args: { + headerType: 'Action', + iconColor: THEME_LIGHT.font.color.tertiary, + initialTitle: 'Create Record', + Icon: IconPlus, + disabled: true, + onTitleChange: fn(), + }, + play: async ({ canvasElement, args }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Create Record'); + expect(titleInput).toBeDisabled(); + + const NEW_TITLE = 'New Title'; + + await userEvent.type(titleInput, NEW_TITLE); + + expect(args.onTitleChange).not.toHaveBeenCalled(); + expect(titleInput).toHaveValue('Create Record'); + }, +}; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormCreateRecord.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormCreateRecord.tsx index d4c074da6f35..cb47cb32217b 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormCreateRecord.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormCreateRecord.tsx @@ -177,6 +177,7 @@ export const WorkflowEditActionFormCreateRecord = ({ iconColor={theme.font.color.tertiary} initialTitle={headerTitle} headerType="Action" + disabled={isFormDisabled} /> diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormUpdateRecord.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormUpdateRecord.tsx index b1992d8c6bb5..5ef1f57654cb 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormUpdateRecord.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowEditActionFormUpdateRecord.tsx @@ -177,6 +177,7 @@ export const WorkflowEditActionFormUpdateRecord = ({ iconColor={theme.font.color.tertiary} initialTitle={headerTitle} headerType="Action" + disabled={isFormDisabled} /> @@ -205,15 +206,18 @@ export const WorkflowEditActionFormUpdateRecord = ({ handleFieldChange('objectRecordId', objectRecordId) } objectNameSingular={formData.objectName} defaultValue={formData.objectRecordId} + disabled={isFormDisabled} /> ({ @@ -226,6 +230,7 @@ export const WorkflowEditActionFormUpdateRecord = ({ handleFieldChange('fieldsToUpdate', fieldsToUpdate) } placeholder="Select fields to update" + readonly={isFormDisabled} /> diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx index f5c8f9f5ded8..5282a0315d81 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordFieldChip.tsx @@ -32,6 +32,7 @@ type WorkflowSingleRecordFieldChipProps = { selectedRecord?: ObjectRecord; objectNameSingular: string; onRemove: () => void; + disabled?: boolean; }; export const WorkflowSingleRecordFieldChip = ({ @@ -39,6 +40,7 @@ export const WorkflowSingleRecordFieldChip = ({ selectedRecord, objectNameSingular, onRemove, + disabled, }: WorkflowSingleRecordFieldChipProps) => { const { objectMetadataItem } = useObjectMetadataItem({ objectNameSingular }); @@ -50,7 +52,7 @@ export const WorkflowSingleRecordFieldChip = ({ return ( ); } diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx index bc9d2d5c3e60..57c7bec9e968 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSingleRecordPicker.tsx @@ -7,6 +7,7 @@ import { import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord'; import { FormFieldInputContainer } from '@/object-record/record-field/form-types/components/FormFieldInputContainer'; +import { FormFieldInputInputContainer } from '@/object-record/record-field/form-types/components/FormFieldInputInputContainer'; import { FormFieldInputRowContainer } from '@/object-record/record-field/form-types/components/FormFieldInputRowContainer'; import { SingleRecordSelect } from '@/object-record/relation-picker/components/SingleRecordSelect'; import { useRecordPicker } from '@/object-record/relation-picker/hooks/useRecordPicker'; @@ -24,18 +25,7 @@ import styled from '@emotion/styled'; import { useCallback } from 'react'; import { isValidUuid } from '~/utils/isValidUuid'; -const StyledFormSelectContainer = styled.div` - background-color: ${({ theme }) => theme.background.transparent.lighter}; - border: 1px solid ${({ theme }) => theme.border.color.medium}; - border-top-left-radius: ${({ theme }) => theme.border.radius.sm}; - border-bottom-left-radius: ${({ theme }) => theme.border.radius.sm}; - border-right: none; - border-bottom-right-radius: none; - border-top-right-radius: none; - box-sizing: border-box; - display: flex; - overflow: 'hidden'; - width: 100%; +const StyledFormSelectContainer = styled(FormFieldInputInputContainer)` justify-content: space-between; align-items: center; padding-right: ${({ theme }) => theme.spacing(1)}; @@ -76,6 +66,8 @@ export type WorkflowSingleRecordPickerProps = { defaultValue: RecordId | Variable; onChange: (value: RecordId | Variable) => void; objectNameSingular: string; + disabled?: boolean; + testId?: string; }; export const WorkflowSingleRecordPicker = ({ @@ -83,6 +75,8 @@ export const WorkflowSingleRecordPicker = ({ defaultValue, objectNameSingular, onChange, + disabled, + testId, }: WorkflowSingleRecordPickerProps) => { const draftValue: WorkflowSingleRecordPickerValue = isStandaloneVariableString(defaultValue) @@ -137,60 +131,65 @@ export const WorkflowSingleRecordPicker = ({ }; return ( - + {label ? {label} : null} - + - - - } - dropdownComponents={ - - closeDropdown()} - onRecordSelected={handleRecordSelected} - objectNameSingular={objectNameSingular} - recordPickerInstanceId={dropdownId} - selectedRecordIds={ - draftValue?.value && - !isStandaloneVariableString(draftValue.value) - ? [draftValue.value] - : [] - } + {!disabled && ( + + - - } - dropdownHotkeyScope={{ scope: dropdownId }} - /> - + } + dropdownComponents={ + + closeDropdown()} + onRecordSelected={handleRecordSelected} + objectNameSingular={objectNameSingular} + recordPickerInstanceId={dropdownId} + selectedRecordIds={ + draftValue?.value && + !isStandaloneVariableString(draftValue.value) + ? [draftValue.value] + : [] + } + /> + + } + dropdownHotkeyScope={{ scope: dropdownId }} + /> + + )} - - - + + {!disabled && ( + + + + )} ); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormCreateRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormCreateRecord.stories.tsx new file mode 100644 index 000000000000..ba512c0b9d9c --- /dev/null +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormCreateRecord.stories.tsx @@ -0,0 +1,84 @@ +import { expect } from '@storybook/jest'; +import { Meta, StoryObj } from '@storybook/react'; +import { fn, userEvent, within } from '@storybook/test'; +import { ComponentDecorator } from 'twenty-ui'; +import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; +import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; +import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator'; +import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator'; +import { graphqlMocks } from '~/testing/graphqlMocks'; +import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow'; +import { WorkflowEditActionFormCreateRecord } from '../WorkflowEditActionFormCreateRecord'; + +const meta: Meta = { + title: 'Modules/Workflow/WorkflowEditActionFormCreateRecord', + component: WorkflowEditActionFormCreateRecord, + parameters: { + msw: graphqlMocks, + }, + args: { + action: { + id: getWorkflowNodeIdMock(), + name: 'Create Record', + type: 'CREATE_RECORD', + valid: false, + settings: { + input: { + objectName: 'person', + objectRecord: {}, + }, + outputSchema: {}, + errorHandlingOptions: { + retryOnFailure: { + value: false, + }, + continueOnFailure: { + value: false, + }, + }, + }, + }, + }, + decorators: [ + WorkflowStepActionDrawerDecorator, + WorkflowStepDecorator, + ComponentDecorator, + ObjectMetadataItemsDecorator, + SnackBarDecorator, + ], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + actionOptions: { + onActionUpdate: fn(), + }, + }, +}; + +export const Disabled: Story = { + args: { + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Create Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + const searchInputInSelectDropdown = canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + }, +}; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx new file mode 100644 index 000000000000..74f435a6d9ee --- /dev/null +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormDeleteRecord.stories.tsx @@ -0,0 +1,201 @@ +import { WorkflowDeleteRecordAction } from '@/workflow/types/Workflow'; +import { Meta, StoryObj } from '@storybook/react'; +import { expect, fn, userEvent, within } from '@storybook/test'; +import { ComponentDecorator, RouterDecorator } from 'twenty-ui'; +import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; +import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; +import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator'; +import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator'; +import { graphqlMocks } from '~/testing/graphqlMocks'; +import { getPeopleMock } from '~/testing/mock-data/people'; +import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow'; +import { WorkflowEditActionFormDeleteRecord } from '../WorkflowEditActionFormDeleteRecord'; + +const DEFAULT_ACTION = { + id: getWorkflowNodeIdMock(), + name: 'Delete Record', + type: 'DELETE_RECORD', + valid: false, + settings: { + input: { + objectName: 'person', + objectRecordId: '', + }, + outputSchema: {}, + errorHandlingOptions: { + retryOnFailure: { + value: false, + }, + continueOnFailure: { + value: false, + }, + }, + }, +} satisfies WorkflowDeleteRecordAction; + +const meta: Meta = { + title: 'Modules/Workflow/WorkflowEditActionFormDeleteRecord', + component: WorkflowEditActionFormDeleteRecord, + parameters: { + msw: graphqlMocks, + }, + args: { + action: DEFAULT_ACTION, + }, + decorators: [ + WorkflowStepActionDrawerDecorator, + WorkflowStepDecorator, + ComponentDecorator, + ObjectMetadataItemsDecorator, + SnackBarDecorator, + RouterDecorator, + ], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + actionOptions: { + onActionUpdate: fn(), + }, + }, +}; + +export const DisabledWithEmptyValues: Story = { + args: { + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Delete Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-delete-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + }, +}; + +const peopleMock = getPeopleMock()[0]; + +export const DisabledWithDefaultStaticValues: Story = { + args: { + action: { + ...DEFAULT_ACTION, + settings: { + ...DEFAULT_ACTION.settings, + input: { + ...DEFAULT_ACTION.settings.input, + objectRecordId: peopleMock.id, + }, + }, + }, + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Delete Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-delete-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + + const selectedRecordToDelete = await canvas.findByText( + `${peopleMock.name.firstName} ${peopleMock.name.lastName}`, + ); + + expect(selectedRecordToDelete).toBeVisible(); + }, +}; + +export const DisabledWithDefaultVariableValues: Story = { + args: { + action: { + ...DEFAULT_ACTION, + settings: { + ...DEFAULT_ACTION.settings, + input: { + ...DEFAULT_ACTION.settings.input, + objectRecordId: '{{trigger.recordId}}', + }, + }, + }, + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Delete Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-delete-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + + const recordVariableToDelete = await within( + canvas.getByTestId('workflow-edit-action-record-delete-object-record-id'), + ).findByText('Person'); + + expect(recordVariableToDelete).toBeVisible(); + }, +}; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormUpdateRecord.stories.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormUpdateRecord.stories.tsx new file mode 100644 index 000000000000..7a0c9af2a13e --- /dev/null +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/__stories__/WorkflowEditActionFormUpdateRecord.stories.tsx @@ -0,0 +1,252 @@ +import { WorkflowUpdateRecordAction } from '@/workflow/types/Workflow'; +import { Meta, StoryObj } from '@storybook/react'; +import { expect, fn, userEvent, within } from '@storybook/test'; +import { ComponentDecorator, RouterDecorator } from 'twenty-ui'; +import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; +import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; +import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator'; +import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator'; +import { graphqlMocks } from '~/testing/graphqlMocks'; +import { getPeopleMock } from '~/testing/mock-data/people'; +import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow'; +import { WorkflowEditActionFormUpdateRecord } from '../WorkflowEditActionFormUpdateRecord'; + +const DEFAULT_ACTION = { + id: getWorkflowNodeIdMock(), + name: 'Update Record', + type: 'UPDATE_RECORD', + settings: { + input: { + objectName: 'person', + objectRecordId: '', + objectRecord: {}, + fieldsToUpdate: [ + 'updatedAt', + 'averageEstimatedNumberOfAtomsInTheUniverse', + 'comments', + 'createdAt', + 'deletedAt', + 'name', + 'participants', + 'percentageOfCompletion', + 'score', + 'shortNotes', + ], + }, + outputSchema: {}, + errorHandlingOptions: { + retryOnFailure: { + value: false, + }, + continueOnFailure: { + value: false, + }, + }, + }, + valid: false, +} satisfies WorkflowUpdateRecordAction; + +const meta: Meta = { + title: 'Modules/Workflow/WorkflowEditActionFormUpdateRecord', + component: WorkflowEditActionFormUpdateRecord, + parameters: { + msw: graphqlMocks, + }, + args: { + action: DEFAULT_ACTION, + }, + decorators: [ + WorkflowStepActionDrawerDecorator, + WorkflowStepDecorator, + ComponentDecorator, + ObjectMetadataItemsDecorator, + SnackBarDecorator, + RouterDecorator, + ], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + actionOptions: { + onActionUpdate: fn(), + }, + }, +}; + +export const DisabledWithEmptyValues: Story = { + args: { + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Update Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + + const firstSelectedUpdatableField = await within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-fields-to-update', + ), + ).findByText('Creation date'); + + await userEvent.click(firstSelectedUpdatableField); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + }, +}; + +const peopleMock = getPeopleMock()[0]; + +export const DisabledWithDefaultStaticValues: Story = { + args: { + action: { + ...DEFAULT_ACTION, + settings: { + ...DEFAULT_ACTION.settings, + input: { + ...DEFAULT_ACTION.settings.input, + objectRecordId: peopleMock.id, + }, + }, + }, + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Update Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const selectedRecord = await canvas.findByText( + `${peopleMock.name.firstName} ${peopleMock.name.lastName}`, + ); + expect(selectedRecord).toBeVisible(); + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + + const firstSelectedUpdatableField = await within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-fields-to-update', + ), + ).findByText('Creation date'); + + await userEvent.click(firstSelectedUpdatableField); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + }, +}; + +export const DisabledWithDefaultVariableValues: Story = { + args: { + action: { + ...DEFAULT_ACTION, + settings: { + ...DEFAULT_ACTION.settings, + input: { + ...DEFAULT_ACTION.settings.input, + objectRecordId: '{{trigger.recordId}}', + }, + }, + }, + actionOptions: { + readonly: true, + }, + }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + + const titleInput = await canvas.findByDisplayValue('Update Record'); + + expect(titleInput).toBeDisabled(); + + const objectSelectCurrentValue = await canvas.findByText('People'); + + await userEvent.click(objectSelectCurrentValue); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + + const openRecordSelectButton = within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-object-record-id', + ), + ).queryByRole('button'); + + expect(openRecordSelectButton).not.toBeInTheDocument(); + + const firstSelectedUpdatableField = await within( + await canvas.findByTestId( + 'workflow-edit-action-record-update-fields-to-update', + ), + ).findByText('Creation date'); + + await userEvent.click(firstSelectedUpdatableField); + + { + const searchInputInSelectDropdown = + canvas.queryByPlaceholderText('Search'); + + expect(searchInputInSelectDropdown).not.toBeInTheDocument(); + } + }, +}; diff --git a/packages/twenty-front/src/testing/decorators/WorkflowStepActionDrawerDecorator.tsx b/packages/twenty-front/src/testing/decorators/WorkflowStepActionDrawerDecorator.tsx new file mode 100644 index 000000000000..62cba505e63a --- /dev/null +++ b/packages/twenty-front/src/testing/decorators/WorkflowStepActionDrawerDecorator.tsx @@ -0,0 +1,13 @@ +import styled from '@emotion/styled'; +import { Decorator } from '@storybook/react'; + +const StyledWrapper = styled.div` + display: flex; + flex-direction: column; +`; + +export const WorkflowStepActionDrawerDecorator: Decorator = (Story) => ( + + + +); diff --git a/packages/twenty-front/src/testing/decorators/WorkflowStepDecorator.tsx b/packages/twenty-front/src/testing/decorators/WorkflowStepDecorator.tsx new file mode 100644 index 000000000000..f919be873294 --- /dev/null +++ b/packages/twenty-front/src/testing/decorators/WorkflowStepDecorator.tsx @@ -0,0 +1,21 @@ +import { workflowIdState } from '@/workflow/states/workflowIdState'; +import { workflowSelectedNodeState } from '@/workflow/workflow-diagram/states/workflowSelectedNodeState'; +import { Decorator } from '@storybook/react'; +import { useEffect } from 'react'; +import { useSetRecoilState } from 'recoil'; +import { + getWorkflowMock, + getWorkflowNodeIdMock, +} from '~/testing/mock-data/workflow'; + +export const WorkflowStepDecorator: Decorator = (Story) => { + const setWorkflowId = useSetRecoilState(workflowIdState); + const setWorkflowSelectedNode = useSetRecoilState(workflowSelectedNodeState); + + useEffect(() => { + setWorkflowId(getWorkflowMock().id); + setWorkflowSelectedNode(getWorkflowNodeIdMock()); + }, [setWorkflowId, setWorkflowSelectedNode]); + + return ; +}; diff --git a/packages/twenty-front/src/testing/graphqlMocks.ts b/packages/twenty-front/src/testing/graphqlMocks.ts index 9f16f663ad66..87575f91912f 100644 --- a/packages/twenty-front/src/testing/graphqlMocks.ts +++ b/packages/twenty-front/src/testing/graphqlMocks.ts @@ -1,5 +1,5 @@ import { getOperationName } from '@apollo/client/utilities'; -import { graphql, http, HttpResponse } from 'msw'; +import { graphql, GraphQLQuery, http, HttpResponse } from 'msw'; import { TRACK } from '@/analytics/graphql/queries/track'; import { GET_CLIENT_CONFIG } from '@/client-config/graphql/queries/getClientConfig'; @@ -23,6 +23,11 @@ import { mockWorkspaceMembers } from '~/testing/mock-data/workspace-members'; import { GET_PUBLIC_WORKSPACE_DATA_BY_SUBDOMAIN } from '@/auth/graphql/queries/getPublicWorkspaceDataBySubdomain'; import { mockedStandardObjectMetadataQueryResult } from '~/testing/mock-data/generated/mock-metadata-query-result'; import { mockedTasks } from '~/testing/mock-data/tasks'; +import { + getWorkflowMock, + getWorkflowVersionsMock, + workflowQueryResult, +} from '~/testing/mock-data/workflow'; import { mockedRemoteServers } from './mock-data/remote-servers'; import { mockedViewFieldsData } from './mock-data/view-fields'; @@ -638,135 +643,32 @@ export const graphqlMocks = { }, }); }), + graphql.query( + 'FindOnePerson', + ({ variables: { objectRecordId } }) => { + return HttpResponse.json({ + data: { + person: peopleMock.find((person) => person.id === objectRecordId), + }, + }); + }, + ), graphql.query('FindManyWorkflows', () => { return HttpResponse.json({ - data: { - workflows: { - __typename: 'WorkflowConnection', - totalCount: 1, - pageInfo: { - __typename: 'PageInfo', - hasNextPage: false, - hasPreviousPage: false, - startCursor: - 'eyJpZCI6IjIwMGMxNTA4LWYxMDItNGJiOS1hZjMyLWVkYTU1MjM5YWU2MSJ9', - endCursor: - 'eyJpZCI6IjIwMGMxNTA4LWYxMDItNGJiOS1hZjMyLWVkYTU1MjM5YWU2MSJ9', - }, - edges: [ - { - __typename: 'WorkflowEdge', - cursor: - 'eyJpZCI6IjIwMGMxNTA4LWYxMDItNGJiOS1hZjMyLWVkYTU1MjM5YWU2MSJ9', - node: { - __typename: 'Workflow', - id: '200c1508-f102-4bb9-af32-eda55239ae61', - }, - }, - ], - }, - }, + data: workflowQueryResult, }); }), graphql.query('FindOneWorkflow', () => { return HttpResponse.json({ data: { - workflow: { - __typename: 'Workflow', - id: '200c1508-f102-4bb9-af32-eda55239ae61', - name: '1231 qqerrt', - statuses: null, - lastPublishedVersionId: '', - deletedAt: null, - updatedAt: '2024-09-19T10:10:04.505Z', - position: 0, - createdAt: '2024-09-19T10:10:04.505Z', - favorites: { - __typename: 'FavoriteConnection', - edges: [], - }, - eventListeners: { - __typename: 'WorkflowEventListenerConnection', - edges: [], - }, - runs: { - __typename: 'WorkflowRunConnection', - edges: [], - }, - versions: { - __typename: 'WorkflowVersionConnection', - edges: [ - { - __typename: 'WorkflowVersionEdge', - node: { - __typename: 'WorkflowVersion', - updatedAt: '2024-09-19T10:13:12.075Z', - steps: null, - createdAt: '2024-09-19T10:10:04.725Z', - status: 'DRAFT', - name: 'v1', - id: 'f618843a-26be-4a54-a60f-f4ce88a594f0', - trigger: { - type: 'DATABASE_EVENT', - settings: { - eventName: 'note.created', - }, - }, - deletedAt: null, - workflowId: '200c1508-f102-4bb9-af32-eda55239ae61', - }, - }, - ], - }, - }, + workflow: getWorkflowMock(), }, }); }), graphql.query('FindManyWorkflowVersions', () => { return HttpResponse.json({ data: { - workflowVersions: { - __typename: 'WorkflowVersionConnection', - totalCount: 1, - pageInfo: { - __typename: 'PageInfo', - hasNextPage: false, - hasPreviousPage: false, - startCursor: - 'eyJjcmVhdGVkQXQiOiIyMDI0LTA5LTE5VDEwOjEwOjA0LjcyNVoiLCJpZCI6ImY2MTg4NDNhLTI2YmUtNGE1NC1hNjBmLWY0Y2U4OGE1OTRmMCJ9', - endCursor: - 'eyJjcmVhdGVkQXQiOiIyMDI0LTA5LTE5VDEwOjEwOjA0LjcyNVoiLCJpZCI6ImY2MTg4NDNhLTI2YmUtNGE1NC1hNjBmLWY0Y2U4OGE1OTRmMCJ9', - }, - edges: [ - { - __typename: 'WorkflowVersionEdge', - cursor: - 'eyJjcmVhdGVkQXQiOiIyMDI0LTA5LTE5VDEwOjEwOjA0LjcyNVoiLCJpZCI6ImY2MTg4NDNhLTI2YmUtNGE1NC1hNjBmLWY0Y2U4OGE1OTRmMCJ9', - node: { - __typename: 'WorkflowVersion', - updatedAt: '2024-09-19T10:13:12.075Z', - steps: null, - createdAt: '2024-09-19T10:10:04.725Z', - status: 'DRAFT', - name: 'v1', - id: 'f618843a-26be-4a54-a60f-f4ce88a594f0', - trigger: { - type: 'DATABASE_EVENT', - settings: { - eventName: 'note.created', - }, - }, - deletedAt: null, - workflowId: '200c1508-f102-4bb9-af32-eda55239ae61', - workflow: { - __typename: 'Workflow', - id: '200c1508-f102-4bb9-af32-eda55239ae61', - name: '1231 qqerrt', - }, - }, - }, - ], - }, + workflowVersions: getWorkflowVersionsMock(), }, }); }), diff --git a/packages/twenty-front/src/testing/mock-data/people.ts b/packages/twenty-front/src/testing/mock-data/people.ts index b3a6c38b370e..1dc9392069d5 100644 --- a/packages/twenty-front/src/testing/mock-data/people.ts +++ b/packages/twenty-front/src/testing/mock-data/people.ts @@ -26,7 +26,7 @@ export const mockedEmptyPersonData = { __typename: 'Person', }; -export const peopleQueryResult: { people: RecordGqlConnection } = { +export const peopleQueryResult = { people: { __typename: 'PersonConnection', totalCount: 16, @@ -58,8 +58,8 @@ export const peopleQueryResult: { people: RecordGqlConnection } = { email: 'asd.com', name: { __typename: 'FullName', - firstName: 'Test ', - lastName: 'tTest', + firstName: 'Test', + lastName: 'Test', }, noteTargets: { __typename: 'NoteTargetConnection', @@ -1719,4 +1719,4 @@ export const peopleQueryResult: { people: RecordGqlConnection } = { }, ], }, -}; +} satisfies { people: RecordGqlConnection }; diff --git a/packages/twenty-front/src/testing/mock-data/workflow.ts b/packages/twenty-front/src/testing/mock-data/workflow.ts new file mode 100644 index 000000000000..c72f85ef3dd2 --- /dev/null +++ b/packages/twenty-front/src/testing/mock-data/workflow.ts @@ -0,0 +1,1466 @@ +import { RecordGqlConnection } from '@/object-record/graphql/types/RecordGqlConnection'; + +export const getWorkflowMock = () => { + return workflowQueryResult.workflows.edges[0].node; +}; + +export const getWorkflowVersionsMock = () => { + return { + ...getWorkflowMock().versions, + __typename: 'WorkflowVersionConnection', + totalCount: 1, + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: + 'eyJjcmVhdGVkQXQiOiIyMDI0LTA5LTE5VDEwOjEwOjA0LjcyNVoiLCJpZCI6ImY2MTg4NDNhLTI2YmUtNGE1NC1hNjBmLWY0Y2U4OGE1OTRmMCJ9', + endCursor: + 'eyJjcmVhdGVkQXQiOiIyMDI0LTA5LTE5VDEwOjEwOjA0LjcyNVoiLCJpZCI6ImY2MTg4NDNhLTI2YmUtNGE1NC1hNjBmLWY0Y2U4OGE1OTRmMCJ9', + }, + }; +}; + +export const getWorkflowNodeIdMock = () => { + return getWorkflowMock().versions.edges[0].node.steps[0].id; +}; + +export const workflowQueryResult = { + workflows: { + __typename: 'WorkflowConnection', + totalCount: 1, + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: + 'eyJwb3NpdGlvbiI6MCwiaWQiOiIyMWQ0NzcyOC0wMmE3LTQzMjEtOWVhNC00NDk3N2MzOTU3OTMifQ==', + endCursor: + 'eyJwb3NpdGlvbiI6MCwiaWQiOiIyMWQ0NzcyOC0wMmE3LTQzMjEtOWVhNC00NDk3N2MzOTU3OTMifQ==', + }, + edges: [ + { + __typename: 'WorkflowEdge', + cursor: + 'eyJwb3NpdGlvbiI6MCwiaWQiOiIyMWQ0NzcyOC0wMmE3LTQzMjEtOWVhNC00NDk3N2MzOTU3OTMifQ==', + node: { + __typename: 'Workflow', + deletedAt: null, + id: '21d47728-02a7-4321-9ea4-44977c395793', + name: 'Test', + position: 0, + statuses: ['DRAFT'], + updatedAt: '2025-01-30T09:54:36.006Z', + createdBy: { + __typename: 'Actor', + source: 'MANUAL', + workspaceMemberId: '20202020-0687-4c41-b707-ed1bfca972a7', + name: 'Tim Apple', + }, + runs: { + __typename: 'WorkflowRunConnection', + edges: [], + }, + versions: { + __typename: 'WorkflowVersionConnection', + edges: [ + { + __typename: 'WorkflowVersionEdge', + node: { + __typename: 'WorkflowVersion', + createdAt: '2025-01-30T09:54:34.583Z', + deletedAt: null, + id: 'e7ee024c-ea25-4558-84b8-6c3533f0c9a5', + name: 'v1', + position: -1, + status: 'DRAFT', + steps: [ + { + id: '04d5f3bf-9714-400d-ba27-644006a5fb1b', + name: 'Create Record', + type: 'CREATE_RECORD', + valid: false, + settings: { + input: { + objectName: 'opportunity', + objectRecord: { + name: 'Opportunity – {{trigger.properties.after.name}}', + amount: { + amountMicros: 1000000000, + currencyCode: 'EUR', + }, + }, + }, + outputSchema: { + fields: { + id: { + icon: 'Icon123', + type: 'UUID', + label: 'Id', + value: '123e4567-e89b-12d3-a456-426614174000', + isLeaf: true, + }, + name: { + icon: 'IconTargetArrow', + type: 'TEXT', + label: 'Name', + value: 'My text', + isLeaf: true, + }, + stage: { + icon: 'IconProgressCheck', + type: 'SELECT', + label: 'Stage', + value: null, + isLeaf: true, + }, + amount: { + icon: 'IconCurrencyDollar', + label: 'Amount', + value: { + amountMicros: { + type: 'NUMERIC', + label: ' Amount Micros', + value: null, + isLeaf: true, + }, + currencyCode: { + type: 'TEXT', + label: ' Currency Code', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + closeDate: { + icon: 'IconCalendarEvent', + type: 'DATE_TIME', + label: 'Close date', + value: '01/23/2025 15:16', + isLeaf: true, + }, + createdAt: { + icon: 'IconCalendar', + type: 'DATE_TIME', + label: 'Creation date', + value: '01/23/2025 15:16', + isLeaf: true, + }, + createdBy: { + icon: 'IconCreativeCommonsSa', + label: 'Created by', + value: { + name: { + type: 'TEXT', + label: ' Name', + value: 'My text', + isLeaf: true, + }, + source: { + type: 'SELECT', + label: ' Source', + value: null, + isLeaf: true, + }, + workspaceMemberId: { + type: 'UUID', + label: ' Workspace Member Id', + value: '123e4567-e89b-12d3-a456-426614174000', + isLeaf: true, + }, + }, + isLeaf: false, + }, + deletedAt: { + icon: 'IconCalendarMinus', + type: 'DATE_TIME', + label: 'Deleted at', + value: '01/23/2025 15:16', + isLeaf: true, + }, + updatedAt: { + icon: 'IconCalendarClock', + type: 'DATE_TIME', + label: 'Last update', + value: '01/23/2025 15:16', + isLeaf: true, + }, + }, + object: { + icon: 'IconTargetArrow', + label: 'Opportunity', + value: 'An opportunity', + isLeaf: true, + fieldIdName: 'id', + nameSingular: 'opportunity', + }, + _outputSchemaType: 'RECORD', + }, + errorHandlingOptions: { + retryOnFailure: { + value: false, + }, + continueOnFailure: { + value: false, + }, + }, + }, + __typename: 'WorkflowAction', + }, + ], + trigger: { + type: 'DATABASE_EVENT', + settings: { + eventName: 'company.created', + outputSchema: { + userId: { + type: 'string', + label: 'User ID', + value: '372d0342-f9d2-4e7f-b497-0e6d0b720188', + isLeaf: true, + }, + recordId: { + type: 'string', + label: 'Record ID', + value: '03368795-6d12-402c-809d-7a1b2a5cd0e3', + isLeaf: true, + }, + properties: { + label: 'Record Fields', + value: { + after: { + label: 'After Creation', + value: { + fields: { + id: { + icon: 'Icon123', + type: 'UUID', + label: 'Id', + value: + '123e4567-e89b-12d3-a456-426614174000', + isLeaf: true, + }, + name: { + icon: 'IconBuildingSkyscraper', + type: 'TEXT', + label: 'Name', + value: 'My text', + isLeaf: true, + }, + xLink: { + icon: 'IconBrandX', + label: 'X', + value: { + primaryLinkUrl: { + type: 'TEXT', + label: ' Primary Link Url', + value: 'My text', + isLeaf: true, + }, + secondaryLinks: { + type: 'RAW_JSON', + label: ' Secondary Links', + value: null, + isLeaf: true, + }, + primaryLinkLabel: { + type: 'TEXT', + label: ' Primary Link Label', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + address: { + icon: 'IconMap', + label: 'Address', + value: { + addressLat: { + type: 'NUMERIC', + label: ' Address Lat', + value: null, + isLeaf: true, + }, + addressLng: { + type: 'NUMERIC', + label: ' Address Lng', + value: null, + isLeaf: true, + }, + addressCity: { + type: 'TEXT', + label: ' Address City', + value: 'My text', + isLeaf: true, + }, + addressState: { + type: 'TEXT', + label: ' Address State', + value: 'My text', + isLeaf: true, + }, + addressCountry: { + type: 'TEXT', + label: ' Address Country', + value: 'My text', + isLeaf: true, + }, + addressStreet1: { + type: 'TEXT', + label: ' Address Street1', + value: 'My text', + isLeaf: true, + }, + addressStreet2: { + type: 'TEXT', + label: ' Address Street2', + value: 'My text', + isLeaf: true, + }, + addressPostcode: { + type: 'TEXT', + label: ' Address Postcode', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + tagline: { + icon: 'IconAdCircle', + type: 'TEXT', + label: 'Tagline', + value: 'My text', + isLeaf: true, + }, + createdAt: { + icon: 'IconCalendar', + type: 'DATE_TIME', + label: 'Creation date', + value: '01/23/2025 15:16', + isLeaf: true, + }, + createdBy: { + icon: 'IconCreativeCommonsSa', + label: 'Created by', + value: { + name: { + type: 'TEXT', + label: ' Name', + value: 'My text', + isLeaf: true, + }, + source: { + type: 'SELECT', + label: ' Source', + value: null, + isLeaf: true, + }, + workspaceMemberId: { + type: 'UUID', + label: ' Workspace Member Id', + value: + '123e4567-e89b-12d3-a456-426614174000', + isLeaf: true, + }, + }, + isLeaf: false, + }, + deletedAt: { + icon: 'IconCalendarMinus', + type: 'DATE_TIME', + label: 'Deleted at', + value: '01/23/2025 15:16', + isLeaf: true, + }, + employees: { + icon: 'IconUsers', + type: 'NUMBER', + label: 'Employees', + value: 20, + isLeaf: true, + }, + updatedAt: { + icon: 'IconCalendarClock', + type: 'DATE_TIME', + label: 'Last update', + value: '01/23/2025 15:16', + isLeaf: true, + }, + domainName: { + icon: 'IconLink', + label: 'Domain Name', + value: { + primaryLinkUrl: { + type: 'TEXT', + label: ' Primary Link Url', + value: 'My text', + isLeaf: true, + }, + secondaryLinks: { + type: 'RAW_JSON', + label: ' Secondary Links', + value: null, + isLeaf: true, + }, + primaryLinkLabel: { + type: 'TEXT', + label: ' Primary Link Label', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + introVideo: { + icon: 'IconVideo', + label: 'Intro Video', + value: { + primaryLinkUrl: { + type: 'TEXT', + label: ' Primary Link Url', + value: 'My text', + isLeaf: true, + }, + secondaryLinks: { + type: 'RAW_JSON', + label: ' Secondary Links', + value: null, + isLeaf: true, + }, + primaryLinkLabel: { + type: 'TEXT', + label: ' Primary Link Label', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + workPolicy: { + icon: 'IconHome', + type: 'MULTI_SELECT', + label: 'Work Policy', + value: null, + isLeaf: true, + }, + linkedinLink: { + icon: 'IconBrandLinkedin', + label: 'Linkedin', + value: { + primaryLinkUrl: { + type: 'TEXT', + label: ' Primary Link Url', + value: 'My text', + isLeaf: true, + }, + secondaryLinks: { + type: 'RAW_JSON', + label: ' Secondary Links', + value: null, + isLeaf: true, + }, + primaryLinkLabel: { + type: 'TEXT', + label: ' Primary Link Label', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + visaSponsorship: { + icon: 'IconBrandVisa', + type: 'BOOLEAN', + label: 'Visa Sponsorship', + value: true, + isLeaf: true, + }, + idealCustomerProfile: { + icon: 'IconTarget', + type: 'BOOLEAN', + label: 'ICP', + value: true, + isLeaf: true, + }, + annualRecurringRevenue: { + icon: 'IconMoneybag', + label: 'ARR', + value: { + amountMicros: { + type: 'NUMERIC', + label: ' Amount Micros', + value: null, + isLeaf: true, + }, + currencyCode: { + type: 'TEXT', + label: ' Currency Code', + value: 'My text', + isLeaf: true, + }, + }, + isLeaf: false, + }, + }, + object: { + icon: 'IconBuildingSkyscraper', + label: 'Company', + value: 'A company', + isLeaf: true, + fieldIdName: 'id', + nameSingular: 'company', + }, + _outputSchemaType: 'RECORD', + }, + isLeaf: false, + }, + }, + isLeaf: false, + }, + objectMetadata: { + label: 'Object Metadata', + value: { + id: { + value: '54c2039b-217a-43de-937e-af801e553c52', + isLeaf: true, + }, + icon: { + value: 'IconBuildingSkyscraper', + isLeaf: true, + }, + fields: { + value: [ + { + id: 'bd5cab87-e880-453d-9064-be3c1524485c', + icon: 'IconBuildingSkyscraper', + name: 'name', + type: 'TEXT', + label: 'Name', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-4d99-4e2e-a84c-4a27837b1ece', + description: 'The company name', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: "''", + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'e142ecbd-b374-42a0-a5d0-48bb67b8ffd5', + icon: 'IconLink', + name: 'domainName', + type: 'LINKS', + label: 'Domain Name', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: true, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-0c28-43d8-8ba5-3659924d3489', + description: + 'The company website URL. We use this url to fetch the company icon', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + primaryLinkUrl: "''", + secondaryLinks: "'[]'", + primaryLinkLabel: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'fe4ff2ee-1f58-458f-b880-e2b8ad4a2b7b', + icon: 'IconUsers', + name: 'employees', + type: 'NUMBER', + label: 'Employees', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-8965-464a-8a75-74bafc152a0b', + description: + 'Number of employees in the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'd2088726-8c87-4a13-92f9-ad4e97f0a32c', + icon: 'IconBrandLinkedin', + name: 'linkedinLink', + type: 'LINKS', + label: 'Linkedin', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-ebeb-4beb-b9ad-6848036fb451', + description: 'The company Linkedin account', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + primaryLinkUrl: "''", + secondaryLinks: "'[]'", + primaryLinkLabel: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '02f4c961-cd08-4573-a1a0-f0188caf58c1', + icon: 'IconBrandX', + name: 'xLink', + type: 'LINKS', + label: 'X', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-6f64-4fd9-9580-9c1991c7d8c3', + description: 'The company Twitter/X account', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + primaryLinkUrl: "''", + secondaryLinks: "'[]'", + primaryLinkLabel: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '1d691f1b-a196-41c5-b8cb-8656f1966c44', + icon: 'IconMoneybag', + name: 'annualRecurringRevenue', + type: 'CURRENCY', + label: 'ARR', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-602a-495c-9776-f5d5b11d227b', + description: + 'Annual Recurring Revenue: The actual or estimated annual revenue of the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + amountMicros: null, + currencyCode: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '841895d3-b50f-47a0-903c-3b3c0f068359', + icon: 'IconMap', + name: 'address', + type: 'ADDRESS', + label: 'Address', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-c5ce-4adc-b7b6-9c0979fc55e7', + description: 'Address of the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + addressLat: null, + addressLng: null, + addressCity: "''", + addressState: "''", + addressCountry: "''", + addressStreet1: "''", + addressStreet2: "''", + addressPostcode: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '821426fa-c357-41b7-a484-2923a691a217', + icon: 'IconTarget', + name: 'idealCustomerProfile', + type: 'BOOLEAN', + label: 'ICP', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-ba6b-438a-8213-2c5ba28d76a2', + description: + 'Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: false, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'd125f27e-5f9a-49d0-bbb3-42875eaa13a4', + icon: 'IconHierarchy2', + name: 'position', + type: 'POSITION', + label: 'Position', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-9b4e-462b-991d-a0ee33326454', + description: 'Company record position', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: 0, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'bab1bdca-4ba4-41d6-a125-d9d77dd158a5', + icon: 'IconCreativeCommonsSa', + name: 'createdBy', + type: 'ACTOR', + label: 'Created by', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-fabc-451d-ab7d-412170916baa', + description: 'The creator of the record', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + name: "''", + source: "'MANUAL'", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '16862c9a-affa-4266-b3ac-898868976f07', + icon: 'IconUser', + name: 'searchVector', + type: 'TS_VECTOR', + label: 'Search vector', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '85c71601-72f9-4b7b-b343-d46100b2c74d', + description: + 'Field used for full-text search', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'a97456c7-d9b4-4ae5-9ce5-c9344f566bea', + icon: 'Icon123', + name: 'id', + type: 'UUID', + label: 'Id', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-eda0-4cee-9577-3eb357e3c22b', + description: 'Id', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: 'uuid', + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '3b2fa0b4-eba0-4d21-8e89-6e8718fef5ea', + icon: 'IconCalendar', + name: 'createdAt', + type: 'DATE_TIME', + label: 'Creation date', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: { + displayAsRelativeDate: true, + }, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-66ac-4502-9975-e4d959c50311', + description: 'Creation date', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: 'now', + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '49347ab4-7c53-4275-91ec-556522722845', + icon: 'IconCalendarClock', + name: 'updatedAt', + type: 'DATE_TIME', + label: 'Last update', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: { + displayAsRelativeDate: true, + }, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: false, + standardId: + '20202020-d767-4622-bdcf-d8a084834d86', + description: + 'Last time the record was changed', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: 'now', + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '4727d3c3-4c05-400a-92d0-f371c21887fe', + icon: 'IconCalendarMinus', + name: 'deletedAt', + type: 'DATE_TIME', + label: 'Deleted at', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: { + displayAsRelativeDate: true, + }, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-b9a7-48d8-8387-b9a3090a50ec', + description: + 'Date when the record was deleted', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'af45f003-5432-45bd-86cf-2aebf3a0489c', + icon: 'IconUsers', + name: 'people', + type: 'RELATION', + label: 'People', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-3213-4ddf-9494-6422bcff8d7c', + description: 'People linked to the company.', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'cba9e1df-1122-45d2-8932-17cc755c0e2f', + icon: 'IconUserCircle', + name: 'accountOwnerId', + type: 'UUID', + label: 'Account Owner id (foreign key)', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-cce0-424e-8028-91f50eb9c768', + description: + 'Your team member responsible for managing the company account id foreign key', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '929e94d6-5a22-4c35-bb63-b6db11182213', + icon: 'IconUserCircle', + name: 'accountOwner', + type: 'RELATION', + label: 'Account Owner', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-95b8-4e10-9881-edb5d4765f9d', + description: + 'Your team member responsible for managing the company account', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'afaa09a3-9c32-486b-80a6-e5513b31a92e', + icon: 'IconCheckbox', + name: 'taskTargets', + type: 'RELATION', + label: 'Tasks', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-cb17-4a61-8f8f-3be6730480de', + description: 'Tasks tied to the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '1143bd63-a522-4902-bfef-e097dc675ef9', + icon: 'IconNotes', + name: 'noteTargets', + type: 'RELATION', + label: 'Notes', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-bae0-4556-a74a-a9c686f77a88', + description: 'Notes tied to the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '9af1d970-34a0-482d-bb35-394911bfad6f', + icon: 'IconTargetArrow', + name: 'opportunities', + type: 'RELATION', + label: 'Opportunities', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-add3-4658-8e23-d70dccb6d0ec', + description: + 'Opportunities linked to the company.', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '045b6740-2a29-4b3a-a0a8-c722dec34d5f', + icon: 'IconHeart', + name: 'favorites', + type: 'RELATION', + label: 'Favorites', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-4d1d-41ac-b13b-621631298d55', + description: + 'Favorites linked to the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '2288f29b-4d6f-40bd-86af-586858147293', + icon: 'IconFileImport', + name: 'attachments', + type: 'RELATION', + label: 'Attachments', + options: null, + isActive: true, + isCustom: false, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-c1b5-4120-b0f0-987ca401ed53', + description: + 'Attachments linked to the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '701fc8d5-17cc-45d1-b445-b4903ea4ec45', + icon: 'IconIconTimelineEvent', + name: 'timelineActivities', + type: 'RELATION', + label: 'Timeline Activities', + options: null, + isActive: true, + isCustom: false, + isSystem: true, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:10.256Z', + updatedAt: '2025-01-30T09:40:10.256Z', + isNullable: true, + standardId: + '20202020-0414-4daf-9c0d-64fe7b27f89f', + description: + 'Timeline Activities linked to the company', + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: 'da73a2d3-45f5-4b5d-8271-fc90f9c01e95', + icon: 'IconAdCircle', + name: 'tagline', + type: 'TEXT', + label: 'Tagline', + options: null, + isActive: true, + isCustom: true, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:15.729Z', + updatedAt: '2025-01-30T09:40:15.729Z', + isNullable: false, + standardId: null, + description: "Company's Tagline", + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: "''", + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '99f04aff-43a8-4d53-969e-8dcbe3623cb1', + icon: 'IconVideo', + name: 'introVideo', + type: 'LINKS', + label: 'Intro Video', + options: null, + isActive: true, + isCustom: true, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:15.828Z', + updatedAt: '2025-01-30T09:40:15.828Z', + isNullable: true, + standardId: null, + description: "Company's Intro Video", + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: { + primaryLinkUrl: "''", + secondaryLinks: "'[]'", + primaryLinkLabel: "''", + }, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '145ad214-3e8a-4d9d-a458-a42d74767e80', + icon: 'IconHome', + name: 'workPolicy', + type: 'MULTI_SELECT', + label: 'Work Policy', + options: [ + { + id: '41f67468-d763-4d5d-9884-dac704d0338f', + color: 'green', + label: 'On-Site', + value: 'ON_SITE', + position: 0, + }, + { + id: '8946f5cb-4894-4247-82fb-86b641f19949', + color: 'turquoise', + label: 'Hybrid', + value: 'HYBRID', + position: 1, + }, + { + id: '450f8fc8-d91e-46fc-8d09-c9ee57d5ddde', + color: 'sky', + label: 'Remote Work', + value: 'REMOTE_WORK', + position: 2, + }, + ], + isActive: true, + isCustom: true, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:15.935Z', + updatedAt: '2025-01-30T09:40:15.935Z', + isNullable: true, + standardId: null, + description: "Company's Work Policy", + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: null, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + { + id: '7f60dc30-8797-474f-abd5-303b97ffdd68', + icon: 'IconBrandVisa', + name: 'visaSponsorship', + type: 'BOOLEAN', + label: 'Visa Sponsorship', + options: null, + isActive: true, + isCustom: true, + isSystem: false, + isUnique: false, + settings: null, + createdAt: '2025-01-30T09:40:16.034Z', + updatedAt: '2025-01-30T09:40:16.034Z', + isNullable: true, + standardId: null, + description: + "Company's Visa Sponsorship Policy", + workspaceId: + '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + defaultValue: false, + objectMetadataId: + '54c2039b-217a-43de-937e-af801e553c52', + isLabelSyncedWithName: false, + relationTargetFieldMetadataId: null, + relationTargetObjectMetadataId: null, + }, + ], + isLeaf: true, + }, + isActive: { + value: true, + isLeaf: true, + }, + isCustom: { + value: false, + isLeaf: true, + }, + isRemote: { + value: false, + isLeaf: true, + }, + isSystem: { + value: false, + isLeaf: true, + }, + shortcut: { + value: 'C', + isLeaf: true, + }, + createdAt: { + value: '2025-01-30T09:40:10.256Z', + isLeaf: true, + }, + updatedAt: { + value: '2025-01-30T09:40:10.256Z', + isLeaf: true, + }, + namePlural: { + value: 'companies', + isLeaf: true, + }, + standardId: { + value: '20202020-b374-4779-a561-80086cb2e17f', + isLeaf: true, + }, + description: { + value: 'A company', + isLeaf: true, + }, + labelPlural: { + value: 'Companies', + isLeaf: true, + }, + workspaceId: { + value: '3b8e6458-5fc1-4e63-8563-008ccddaa6db', + isLeaf: true, + }, + dataSourceId: { + value: '82de2d45-4c55-46d6-83ce-8c82ad5e2ecf', + isLeaf: true, + }, + nameSingular: { + value: 'company', + isLeaf: true, + }, + isAuditLogged: { + value: true, + isLeaf: true, + }, + labelSingular: { + value: 'Company', + isLeaf: true, + }, + targetTableName: { + value: 'DEPRECATED', + isLeaf: true, + }, + isLabelSyncedWithName: { + value: false, + isLeaf: true, + }, + imageIdentifierFieldMetadataId: { + value: null, + isLeaf: true, + }, + labelIdentifierFieldMetadataId: { + value: 'bd5cab87-e880-453d-9064-be3c1524485c', + isLeaf: true, + }, + }, + isLeaf: false, + }, + workspaceMemberId: { + type: 'string', + label: 'Workspace Member ID', + value: '1628e305-0b91-49f5-a1d5-39cffb5cdb6b', + isLeaf: true, + }, + }, + }, + }, + updatedAt: '2025-01-30T14:08:04.703Z', + workflowId: '21d47728-02a7-4321-9ea4-44977c395793', + }, + }, + ], + }, + }, + }, + ], + }, +} satisfies { workflows: RecordGqlConnection };