Fixed issue #13901 https://github.com/user-attachments/assets/4aa7d0f3-88b8-474f-85e5-b2989ed8afdd --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+41
-730
@@ -1,5 +1,10 @@
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
import { FieldActorSource } from 'src/engine/metadata-modules/field-metadata/composite-types/actor.composite-type';
|
||||
import { type ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
import { generateObjectMetadataMaps } from 'src/engine/metadata-modules/utils/generate-object-metadata-maps.util';
|
||||
import { type WorkspaceEntityManager } from 'src/engine/twenty-orm/entity-manager/workspace-entity-manager';
|
||||
import { generateObjectRecordFields } from 'src/modules/workflow/workflow-builder/workflow-schema/utils/generate-object-record-fields';
|
||||
|
||||
const QUICK_LEAD_WORKFLOW_ID = '8b213cac-a68b-4ffe-817a-3ec994e9932d';
|
||||
const QUICK_LEAD_WORKFLOW_VERSION_ID = 'ac67974f-c524-4288-9d88-af8515400b68';
|
||||
@@ -7,7 +12,30 @@ const QUICK_LEAD_WORKFLOW_VERSION_ID = 'ac67974f-c524-4288-9d88-af8515400b68';
|
||||
export const prefillWorkflows = async (
|
||||
entityManager: WorkspaceEntityManager,
|
||||
schemaName: string,
|
||||
objectMetadataItems: ObjectMetadataEntity[],
|
||||
) => {
|
||||
const objectMetadataMaps = generateObjectMetadataMaps(objectMetadataItems);
|
||||
const companyObjectMetadataId =
|
||||
objectMetadataMaps.idByNameSingular['company'];
|
||||
|
||||
const personObjectMetadataId = objectMetadataMaps.idByNameSingular['person'];
|
||||
|
||||
if (
|
||||
!isDefined(companyObjectMetadataId) ||
|
||||
!isDefined(personObjectMetadataId)
|
||||
) {
|
||||
throw new Error('Company or person object metadata not found');
|
||||
}
|
||||
|
||||
const companyObjectMetadata =
|
||||
objectMetadataMaps.byId[companyObjectMetadataId];
|
||||
|
||||
const personObjectMetadata = objectMetadataMaps.byId[personObjectMetadataId];
|
||||
|
||||
if (!isDefined(companyObjectMetadata) || !isDefined(personObjectMetadata)) {
|
||||
throw new Error('Company or person object metadata not found');
|
||||
}
|
||||
|
||||
await entityManager
|
||||
.createQueryBuilder(undefined, undefined, undefined, {
|
||||
shouldBypassPermissionChecks: true,
|
||||
@@ -181,298 +209,6 @@ export const prefillWorkflows = async (
|
||||
},
|
||||
},
|
||||
outputSchema: {
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
context: {
|
||||
type: 'RAW_JSON',
|
||||
label: ' Context',
|
||||
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,
|
||||
},
|
||||
accountOwner: {
|
||||
icon: 'IconUserCircle',
|
||||
label: 'Account Owner',
|
||||
value: {
|
||||
id: {
|
||||
icon: 'Icon123',
|
||||
type: 'UUID',
|
||||
label: 'Id',
|
||||
value: '123e4567-e89b-12d3-a456-426614174000',
|
||||
isLeaf: true,
|
||||
},
|
||||
name: {
|
||||
icon: 'IconCircleUser',
|
||||
label: 'Name',
|
||||
value: {
|
||||
lastName: {
|
||||
type: 'TEXT',
|
||||
label: ' Last Name',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
firstName: {
|
||||
type: 'TEXT',
|
||||
label: ' First Name',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
createdAt: {
|
||||
icon: 'IconCalendar',
|
||||
type: 'DATE_TIME',
|
||||
label: 'Creation date',
|
||||
value: '01/23/2025 15:16',
|
||||
isLeaf: true,
|
||||
},
|
||||
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,
|
||||
},
|
||||
userEmail: {
|
||||
icon: 'IconMail',
|
||||
type: 'TEXT',
|
||||
label: 'User Email',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
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,
|
||||
},
|
||||
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',
|
||||
@@ -482,6 +218,13 @@ export const prefillWorkflows = async (
|
||||
nameSingular: 'company',
|
||||
},
|
||||
_outputSchemaType: 'RECORD',
|
||||
fields: generateObjectRecordFields({
|
||||
objectMetadataInfo: {
|
||||
objectMetadataItemWithFieldsMaps: companyObjectMetadata,
|
||||
objectMetadataMaps,
|
||||
},
|
||||
depth: 0,
|
||||
}),
|
||||
},
|
||||
errorHandlingOptions: {
|
||||
retryOnFailure: { value: false },
|
||||
@@ -517,445 +260,13 @@ export const prefillWorkflows = async (
|
||||
},
|
||||
},
|
||||
outputSchema: {
|
||||
fields: {
|
||||
id: {
|
||||
icon: 'Icon123',
|
||||
type: 'UUID',
|
||||
label: 'Id',
|
||||
value: '123e4567-e89b-12d3-a456-426614174000',
|
||||
isLeaf: true,
|
||||
fields: generateObjectRecordFields({
|
||||
objectMetadataInfo: {
|
||||
objectMetadataItemWithFieldsMaps: personObjectMetadata,
|
||||
objectMetadataMaps,
|
||||
},
|
||||
city: {
|
||||
icon: 'IconMap',
|
||||
type: 'TEXT',
|
||||
label: 'City',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
name: {
|
||||
icon: 'IconUser',
|
||||
label: 'Name',
|
||||
value: {
|
||||
lastName: {
|
||||
type: 'TEXT',
|
||||
label: ' Last Name',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
firstName: {
|
||||
type: 'TEXT',
|
||||
label: ' First Name',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
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,
|
||||
},
|
||||
emails: {
|
||||
icon: 'IconMail',
|
||||
label: 'Emails',
|
||||
value: {
|
||||
primaryEmail: {
|
||||
type: 'TEXT',
|
||||
label: ' Primary Email',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
additionalEmails: {
|
||||
type: 'RAW_JSON',
|
||||
label: ' Additional Emails',
|
||||
value: null,
|
||||
isLeaf: true,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
phones: {
|
||||
icon: 'IconPhone',
|
||||
label: 'Phones',
|
||||
value: {
|
||||
additionalPhones: {
|
||||
type: 'RAW_JSON',
|
||||
label: ' Additional Phones',
|
||||
value: null,
|
||||
isLeaf: true,
|
||||
},
|
||||
primaryPhoneNumber: {
|
||||
type: 'TEXT',
|
||||
label: ' Primary Phone Number',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
primaryPhoneCallingCode: {
|
||||
type: 'TEXT',
|
||||
label: ' Primary Phone Calling Code',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
primaryPhoneCountryCode: {
|
||||
type: 'TEXT',
|
||||
label: ' Primary Phone Country Code',
|
||||
value: 'My text',
|
||||
isLeaf: true,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
company: {
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
label: 'Company',
|
||||
value: {
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
context: {
|
||||
type: 'RAW_JSON',
|
||||
label: ' Context',
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
},
|
||||
isLeaf: false,
|
||||
},
|
||||
jobTitle: {
|
||||
icon: 'IconBriefcase',
|
||||
type: 'TEXT',
|
||||
label: 'Job Title',
|
||||
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,
|
||||
},
|
||||
context: {
|
||||
type: 'RAW_JSON',
|
||||
label: ' Context',
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
},
|
||||
object: {
|
||||
icon: 'IconUser',
|
||||
label: 'Person',
|
||||
value: 'A person',
|
||||
isLeaf: true,
|
||||
fieldIdName: 'id',
|
||||
nameSingular: 'person',
|
||||
},
|
||||
_outputSchemaType: 'RECORD',
|
||||
depth: 0,
|
||||
}),
|
||||
},
|
||||
errorHandlingOptions: {
|
||||
retryOnFailure: { value: false },
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ import { shouldSeedWorkspaceFavorite } from 'src/engine/utils/should-seed-worksp
|
||||
import { prefillCompanies } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-companies';
|
||||
import { prefillPeople } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-people';
|
||||
import { prefillViews } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-views';
|
||||
import { prefillWorkspaceFavorites } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-workspace-favorites';
|
||||
import { prefillWorkflows } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-workflows';
|
||||
import { prefillWorkspaceFavorites } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-workspace-favorites';
|
||||
|
||||
export const standardObjectsPrefillData = async (
|
||||
mainDataSource: DataSource,
|
||||
@@ -19,7 +19,7 @@ export const standardObjectsPrefillData = async (
|
||||
|
||||
await prefillPeople(entityManager, schemaName);
|
||||
|
||||
await prefillWorkflows(entityManager, schemaName);
|
||||
await prefillWorkflows(entityManager, schemaName, objectMetadataItems);
|
||||
|
||||
const viewDefinitionsWithId = await prefillViews(
|
||||
entityManager,
|
||||
|
||||
Reference in New Issue
Block a user