[WIP] Whole FE migrated (#2517)
* Wip * WIP * Removed concole log * Add relations to workspace init (#2511) * Add relations to workspace init * remove logs * update prefill * add missing isSystem * comment relation fields * Migrate v2 core models to graphql schema (#2509) * migrate v2 core models to graphql schema * Migrate to new workspace member schema * Continue work * migrated-main * Finished accountOwner nested field integration on companies * Introduce bug * Fix --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com> Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -0,0 +1,55 @@
|
||||
const activityTargetMetadata = {
|
||||
nameSingular: 'activityTargetV2',
|
||||
namePlural: 'activityTargetsV2',
|
||||
labelSingular: 'Activity Target',
|
||||
labelPlural: 'Activity Targets',
|
||||
targetTableName: 'activityTarget',
|
||||
description: 'An activity target',
|
||||
icon: 'IconCheckbox',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
// Relations
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activity',
|
||||
label: 'Activity',
|
||||
targetColumnMap: {
|
||||
value: 'activityId',
|
||||
},
|
||||
description: 'ActivityTarget activity',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
targetColumnMap: {
|
||||
value: 'personId',
|
||||
},
|
||||
description: 'ActivityTarget person',
|
||||
icon: 'IconUser',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
description: 'ActivityTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default activityTargetMetadata;
|
||||
155
server/src/tenant-manager/standard-objects/activity.ts
Normal file
155
server/src/tenant-manager/standard-objects/activity.ts
Normal file
@ -0,0 +1,155 @@
|
||||
const activityMetadata = {
|
||||
nameSingular: 'activityV2',
|
||||
namePlural: 'activitiesV2',
|
||||
labelSingular: 'Activity',
|
||||
labelPlural: 'Activities',
|
||||
targetTableName: 'activity',
|
||||
description: 'An activity',
|
||||
icon: 'IconCheckbox',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'title',
|
||||
label: 'Title',
|
||||
targetColumnMap: {
|
||||
value: 'title',
|
||||
},
|
||||
description: 'Activity title',
|
||||
icon: 'IconNotes',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'body',
|
||||
label: 'Body',
|
||||
targetColumnMap: {
|
||||
value: 'body',
|
||||
},
|
||||
description: 'Activity body',
|
||||
icon: 'IconList',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'type',
|
||||
label: 'Type',
|
||||
targetColumnMap: {
|
||||
value: 'type',
|
||||
},
|
||||
description: 'Activity type',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'reminderAt',
|
||||
label: 'Reminder Date',
|
||||
targetColumnMap: {
|
||||
value: 'reminderAt',
|
||||
},
|
||||
description: 'Activity reminder date',
|
||||
icon: 'IconCalendarEvent',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'dueAt',
|
||||
label: 'Due Date',
|
||||
targetColumnMap: {
|
||||
value: 'dueAt',
|
||||
},
|
||||
description: 'Activity due date',
|
||||
icon: 'IconCalendarEvent',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'completedAt',
|
||||
label: 'Completion Date',
|
||||
targetColumnMap: {
|
||||
value: 'completedAt',
|
||||
},
|
||||
description: 'Activity completion date',
|
||||
icon: 'IconCheck',
|
||||
isNullable: true,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activityTargets',
|
||||
label: 'Targets',
|
||||
targetColumnMap: {},
|
||||
description: 'Activity targets',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
targetColumnMap: {},
|
||||
description: 'Activity attachments',
|
||||
icon: 'IconFileImport',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'comments',
|
||||
label: 'Comments',
|
||||
targetColumnMap: {},
|
||||
description: 'Activity comments',
|
||||
icon: 'IconComment',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'author',
|
||||
label: 'Author',
|
||||
targetColumnMap: {
|
||||
value: 'authorId',
|
||||
},
|
||||
description:
|
||||
'Activity author. This is the person who created the activity',
|
||||
icon: 'IconUserCircle',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'assignee',
|
||||
label: 'Assignee',
|
||||
targetColumnMap: {
|
||||
value: 'assigneeId',
|
||||
},
|
||||
description:
|
||||
'Acitivity assignee. This is the workspace member assigned to the activity ',
|
||||
icon: 'IconUserCircle',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default activityMetadata;
|
||||
54
server/src/tenant-manager/standard-objects/api-key.ts
Normal file
54
server/src/tenant-manager/standard-objects/api-key.ts
Normal file
@ -0,0 +1,54 @@
|
||||
const apiKeyMetadata = {
|
||||
nameSingular: 'apiKeyV2',
|
||||
namePlural: 'apiKeysV2',
|
||||
labelSingular: 'Api Key',
|
||||
labelPlural: 'Api Keys',
|
||||
targetTableName: 'apiKey',
|
||||
description: 'An api key',
|
||||
icon: 'IconRobot',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
targetColumnMap: {
|
||||
value: 'name',
|
||||
},
|
||||
description: 'ApiKey name',
|
||||
icon: 'IconLink',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'expiresAt',
|
||||
label: 'Expiration date',
|
||||
targetColumnMap: {
|
||||
value: 'expiresAt',
|
||||
},
|
||||
description: 'ApiKey expiration date',
|
||||
icon: 'IconCalendar',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'revokedAt',
|
||||
label: 'Revocation date',
|
||||
targetColumnMap: {
|
||||
value: 'revokedAt',
|
||||
},
|
||||
description: 'ApiKey revocation date',
|
||||
icon: 'IconCalendar',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default apiKeyMetadata;
|
||||
107
server/src/tenant-manager/standard-objects/attachment.ts
Normal file
107
server/src/tenant-manager/standard-objects/attachment.ts
Normal file
@ -0,0 +1,107 @@
|
||||
const attachmentMetadata = {
|
||||
nameSingular: 'attachmentV2',
|
||||
namePlural: 'attachmentsV2',
|
||||
labelSingular: 'Attachment',
|
||||
labelPlural: 'Attachments',
|
||||
targetTableName: 'attachment',
|
||||
description: 'An attachment',
|
||||
icon: 'IconFileImport',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
targetColumnMap: {
|
||||
value: 'name',
|
||||
},
|
||||
description: 'Attachment name',
|
||||
icon: 'IconFileUpload',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'fullPath',
|
||||
label: 'Full path',
|
||||
targetColumnMap: {
|
||||
value: 'fullPath',
|
||||
},
|
||||
description: 'Attachment full path',
|
||||
icon: 'IconLink',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'type',
|
||||
label: 'Type',
|
||||
targetColumnMap: {
|
||||
value: 'type',
|
||||
},
|
||||
description: 'Attachment type',
|
||||
icon: 'IconList',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'author',
|
||||
label: 'Author',
|
||||
targetColumnMap: {
|
||||
value: 'authorId',
|
||||
},
|
||||
description: 'Attachment author',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activity',
|
||||
label: 'Activity',
|
||||
targetColumnMap: {
|
||||
value: 'activityId',
|
||||
},
|
||||
description: 'Attachment activity',
|
||||
icon: 'IconNotes',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
targetColumnMap: {
|
||||
value: 'personId',
|
||||
},
|
||||
description: 'Attachment person',
|
||||
icon: 'IconUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
description: 'Attachment company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default attachmentMetadata;
|
||||
55
server/src/tenant-manager/standard-objects/comment.ts
Normal file
55
server/src/tenant-manager/standard-objects/comment.ts
Normal file
@ -0,0 +1,55 @@
|
||||
const commentMetadata = {
|
||||
nameSingular: 'commentV2',
|
||||
namePlural: 'commentsV2',
|
||||
labelSingular: 'Comment',
|
||||
labelPlural: 'Comments',
|
||||
targetTableName: 'comment',
|
||||
description: 'A comment',
|
||||
icon: 'IconMessageCircle',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'body',
|
||||
label: 'Body',
|
||||
targetColumnMap: {
|
||||
value: 'body',
|
||||
},
|
||||
description: 'Comment body',
|
||||
icon: 'IconLink',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'author',
|
||||
label: 'Author',
|
||||
targetColumnMap: {
|
||||
value: 'authorId',
|
||||
},
|
||||
description: 'Comment author',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activity',
|
||||
label: 'Activity',
|
||||
targetColumnMap: {
|
||||
value: 'activityId',
|
||||
},
|
||||
description: 'Comment activity',
|
||||
icon: 'IconNotes',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default commentMetadata;
|
||||
@ -1,57 +0,0 @@
|
||||
const companiesMetadata = {
|
||||
nameSingular: 'companyV2',
|
||||
namePlural: 'companiesV2',
|
||||
labelSingular: 'Company',
|
||||
labelPlural: 'Companies',
|
||||
targetTableName: 'company',
|
||||
description: 'A company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
fields: [
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
targetColumnMap: {
|
||||
value: 'name',
|
||||
},
|
||||
description: 'Name of the company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'domainName',
|
||||
label: 'Domain Name',
|
||||
targetColumnMap: {
|
||||
value: 'domainName',
|
||||
},
|
||||
description: 'Domain name of the company',
|
||||
icon: 'IconLink',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'address',
|
||||
label: 'Address',
|
||||
targetColumnMap: {
|
||||
value: 'address',
|
||||
},
|
||||
description: 'Address of the company',
|
||||
icon: 'IconMap',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
type: 'NUMBER',
|
||||
name: 'employees',
|
||||
label: 'Employees',
|
||||
targetColumnMap: {
|
||||
value: 'employees',
|
||||
},
|
||||
description: 'Number of employees',
|
||||
icon: 'IconUsers',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default companiesMetadata;
|
||||
192
server/src/tenant-manager/standard-objects/company.ts
Normal file
192
server/src/tenant-manager/standard-objects/company.ts
Normal file
@ -0,0 +1,192 @@
|
||||
const companyMetadata = {
|
||||
nameSingular: 'companyV2',
|
||||
namePlural: 'companiesV2',
|
||||
labelSingular: 'Company',
|
||||
labelPlural: 'Companies',
|
||||
targetTableName: 'company',
|
||||
description: 'A company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
targetColumnMap: {
|
||||
value: 'name',
|
||||
},
|
||||
description: 'The company name',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'domainName',
|
||||
label: 'Domain Name',
|
||||
targetColumnMap: {
|
||||
value: 'domainName',
|
||||
},
|
||||
description:
|
||||
'The company website URL. We use this url to fetch the company icon',
|
||||
icon: 'IconLink',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'address',
|
||||
label: 'Address',
|
||||
targetColumnMap: {
|
||||
value: 'address',
|
||||
},
|
||||
description: 'The company address',
|
||||
icon: 'IconMap',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'employees',
|
||||
label: 'Employees',
|
||||
targetColumnMap: {
|
||||
value: 'employees',
|
||||
},
|
||||
description: 'Number of employees in the company',
|
||||
icon: 'IconUsers',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'linkedinUrl',
|
||||
label: 'Linkedin',
|
||||
targetColumnMap: {
|
||||
value: 'linkedinUrl',
|
||||
},
|
||||
description: 'The company Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'xUrl',
|
||||
label: 'X',
|
||||
targetColumnMap: {
|
||||
value: 'xUrl',
|
||||
},
|
||||
description: 'The company Twitter/X account',
|
||||
icon: 'IconBrandX',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'annualRecurringRevenue',
|
||||
label: 'ARR',
|
||||
targetColumnMap: {
|
||||
value: 'annualRecurringRevenue',
|
||||
},
|
||||
description:
|
||||
'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
|
||||
icon: 'IconMoneybag',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'BOOLEAN',
|
||||
name: 'idealCustomerProfile',
|
||||
label: 'ICP',
|
||||
targetColumnMap: {
|
||||
value: 'idealCustomerProfile',
|
||||
},
|
||||
description:
|
||||
'Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you',
|
||||
icon: 'IconTarget',
|
||||
isNullable: true,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'people',
|
||||
label: 'People',
|
||||
targetColumnMap: {},
|
||||
description: 'People linked to the company.',
|
||||
icon: 'IconUsers',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'accountOwner',
|
||||
label: 'Account Owner',
|
||||
targetColumnMap: {
|
||||
value: 'accountOwnerId',
|
||||
},
|
||||
description:
|
||||
'Your team member responsible for managing the company account',
|
||||
icon: 'IconUserCircle',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activityTargets',
|
||||
label: 'Activities',
|
||||
targetColumnMap: {},
|
||||
description: 'Activities tied to the company',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
targetColumnMap: {},
|
||||
description: 'Opportunities linked to the company.',
|
||||
icon: 'IconTargetArrow',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
targetColumnMap: {},
|
||||
description: 'Favorites linked to the company',
|
||||
icon: 'IconHeart',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
targetColumnMap: {},
|
||||
description: 'Attachments linked to the company.',
|
||||
icon: 'IconFileImport',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default companyMetadata;
|
||||
68
server/src/tenant-manager/standard-objects/favorite.ts
Normal file
68
server/src/tenant-manager/standard-objects/favorite.ts
Normal file
@ -0,0 +1,68 @@
|
||||
const favoriteMetadata = {
|
||||
nameSingular: 'favoriteV2',
|
||||
namePlural: 'favoritesV2',
|
||||
labelSingular: 'Favorite',
|
||||
labelPlural: 'Favorites',
|
||||
targetTableName: 'favorite',
|
||||
description: 'A favorite',
|
||||
icon: 'IconHeart',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
targetColumnMap: {
|
||||
value: 'position',
|
||||
},
|
||||
description: 'Favorite position',
|
||||
icon: 'IconList',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'workspaceMember',
|
||||
label: 'Workspace Member',
|
||||
targetColumnMap: {
|
||||
value: 'workspaceMemberId',
|
||||
},
|
||||
description: 'Favorite workspace member',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
targetColumnMap: {
|
||||
value: 'personId',
|
||||
},
|
||||
description: 'Favorite person',
|
||||
icon: 'IconUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
description: 'Favorite company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default favoriteMetadata;
|
||||
107
server/src/tenant-manager/standard-objects/opportunity.ts
Normal file
107
server/src/tenant-manager/standard-objects/opportunity.ts
Normal file
@ -0,0 +1,107 @@
|
||||
const opportunityMetadata = {
|
||||
nameSingular: 'opportunityV2',
|
||||
namePlural: 'opportunitiesV2',
|
||||
labelSingular: 'Opportunity',
|
||||
labelPlural: 'Opportunities',
|
||||
targetTableName: 'opportunity',
|
||||
description: 'An opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'amount',
|
||||
label: 'Amount',
|
||||
targetColumnMap: {
|
||||
value: 'amount',
|
||||
},
|
||||
description: 'Opportunity amount',
|
||||
icon: 'IconCurrencyDollar',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'DATE',
|
||||
name: 'closeDate',
|
||||
label: 'Close date',
|
||||
targetColumnMap: {
|
||||
value: 'closeDate',
|
||||
},
|
||||
description: 'Opportunity close date',
|
||||
icon: 'IconCalendarEvent',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'probability',
|
||||
label: 'Probability',
|
||||
targetColumnMap: {
|
||||
value: 'probability',
|
||||
},
|
||||
description: 'Opportunity amount',
|
||||
icon: 'IconProgressCheck',
|
||||
isNullable: true,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'pipelineStep',
|
||||
label: 'Pipeline Step',
|
||||
targetColumnMap: {
|
||||
value: 'pipelineStepId',
|
||||
},
|
||||
description: 'Opportunity pipeline step',
|
||||
icon: 'IconKanban',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'pointOfContact',
|
||||
label: 'Point of Contact',
|
||||
targetColumnMap: {
|
||||
value: 'pointOfContactId',
|
||||
},
|
||||
description: 'Opportunity point of contact',
|
||||
icon: 'IconUser',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
targetColumnMap: {
|
||||
value: 'personId',
|
||||
},
|
||||
description: 'Opportunity person',
|
||||
icon: 'IconUser',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
description: 'Opportunity company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default opportunityMetadata;
|
||||
201
server/src/tenant-manager/standard-objects/person.ts
Normal file
201
server/src/tenant-manager/standard-objects/person.ts
Normal file
@ -0,0 +1,201 @@
|
||||
const personMetadata = {
|
||||
nameSingular: 'personV2',
|
||||
namePlural: 'peopleV2',
|
||||
labelSingular: 'Person',
|
||||
labelPlural: 'People',
|
||||
targetTableName: 'person',
|
||||
description: 'A person',
|
||||
icon: 'IconUser',
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'firstName',
|
||||
label: 'First name',
|
||||
targetColumnMap: {
|
||||
value: 'firstName',
|
||||
},
|
||||
description: 'Contact’s first name',
|
||||
icon: 'IconUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'lastName',
|
||||
label: 'Last name',
|
||||
targetColumnMap: {
|
||||
value: 'lastName',
|
||||
},
|
||||
description: 'Contact’s last name',
|
||||
icon: 'IconUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'EMAIL',
|
||||
name: 'email',
|
||||
label: 'Email',
|
||||
targetColumnMap: {
|
||||
value: 'email',
|
||||
},
|
||||
description: 'Contact’s Email',
|
||||
icon: 'IconMail',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'URL',
|
||||
name: 'linkedinUrl',
|
||||
label: 'Linkedin',
|
||||
targetColumnMap: {
|
||||
value: 'linkedinUrl',
|
||||
},
|
||||
description: 'Contact’s Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'URL',
|
||||
name: 'xUrl',
|
||||
label: 'X',
|
||||
targetColumnMap: {
|
||||
value: 'xUrl',
|
||||
},
|
||||
description: 'Contact’s X/Twitter account',
|
||||
icon: 'IconUser',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'jobTitle',
|
||||
label: 'Job Title',
|
||||
targetColumnMap: {
|
||||
value: 'jobTitle',
|
||||
},
|
||||
description: 'Contact’s job title',
|
||||
icon: 'IconBriefcase',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'phone',
|
||||
label: 'Phone',
|
||||
targetColumnMap: {
|
||||
value: 'phone',
|
||||
},
|
||||
description: 'Contact’s phone number',
|
||||
icon: 'IconPhone',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'city',
|
||||
label: 'City',
|
||||
targetColumnMap: {
|
||||
value: 'city',
|
||||
},
|
||||
description: 'Contact’s city',
|
||||
icon: 'IconMap',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'avatarUrl',
|
||||
label: 'Avatar',
|
||||
targetColumnMap: {
|
||||
value: 'avatarUrl',
|
||||
},
|
||||
description: 'Contact’s avatar',
|
||||
icon: 'IconFileUpload',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
targetColumnMap: {
|
||||
value: 'companyId',
|
||||
},
|
||||
description: 'Contact’s company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'pointOfContactForOpportunities',
|
||||
label: 'POC for Opportunities',
|
||||
targetColumnMap: {},
|
||||
description: 'Point of Contact for Opportunities',
|
||||
icon: 'IconArrowTarget',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'activityTargets',
|
||||
label: 'Activities',
|
||||
targetColumnMap: {},
|
||||
description: 'Activities tied to the contact',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
targetColumnMap: {},
|
||||
description: 'Opportunities linked to the contact.',
|
||||
icon: 'IconTargetArrow',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
targetColumnMap: {},
|
||||
description: 'Favorites linked to the contact',
|
||||
icon: 'IconHeart',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
targetColumnMap: {},
|
||||
description: 'Attachments linked to the contact.',
|
||||
icon: 'IconFileImport',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default personMetadata;
|
||||
66
server/src/tenant-manager/standard-objects/pipeline-step.ts
Normal file
66
server/src/tenant-manager/standard-objects/pipeline-step.ts
Normal file
@ -0,0 +1,66 @@
|
||||
const pipelineStepMetadata = {
|
||||
nameSingular: 'pipelineStepV2',
|
||||
namePlural: 'pipelineStepsV2',
|
||||
labelSingular: 'Pipeline Step',
|
||||
labelPlural: 'Pipeline Steps',
|
||||
targetTableName: 'pipelineStep',
|
||||
description: 'A pipeline step',
|
||||
icon: 'IconLayoutKanban',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
targetColumnMap: {
|
||||
value: 'name',
|
||||
},
|
||||
description: 'Pipeline Step name',
|
||||
icon: 'IconCurrencyDollar',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'color',
|
||||
label: 'Color',
|
||||
targetColumnMap: {
|
||||
value: 'color',
|
||||
},
|
||||
description: 'Pipeline Step color',
|
||||
icon: 'IconColorSwatch',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
targetColumnMap: {
|
||||
value: 'position',
|
||||
},
|
||||
description: 'Pipeline Step position',
|
||||
icon: 'IconHierarchy2',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
targetColumnMap: {},
|
||||
description: 'Opportunities linked to the step.',
|
||||
icon: 'IconTargetArrow',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default pipelineStepMetadata;
|
||||
@ -0,0 +1,27 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const activityRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'activityV2',
|
||||
toObjectNameSingular: 'activityTargetV2',
|
||||
fromFieldMetadataName: 'activityTargets',
|
||||
toFieldMetadataName: 'activity',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'activityV2',
|
||||
toObjectNameSingular: 'attachmentV2',
|
||||
fromFieldMetadataName: 'attachments',
|
||||
toFieldMetadataName: 'activity',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'activityV2',
|
||||
toObjectNameSingular: 'commentV2',
|
||||
fromFieldMetadataName: 'comments',
|
||||
toFieldMetadataName: 'activity',
|
||||
},
|
||||
];
|
||||
|
||||
export default activityRelationMetadata;
|
||||
@ -0,0 +1,41 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const companyRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'companyV2',
|
||||
toObjectNameSingular: 'personV2',
|
||||
fromFieldMetadataName: 'people',
|
||||
toFieldMetadataName: 'company',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'companyV2',
|
||||
toObjectNameSingular: 'favoriteV2',
|
||||
fromFieldMetadataName: 'favorites',
|
||||
toFieldMetadataName: 'company',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'companyV2',
|
||||
toObjectNameSingular: 'attachmentV2',
|
||||
fromFieldMetadataName: 'attachments',
|
||||
toFieldMetadataName: 'company',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'companyV2',
|
||||
toObjectNameSingular: 'opportunityV2',
|
||||
fromFieldMetadataName: 'opportunities',
|
||||
toFieldMetadataName: 'company',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'companyV2',
|
||||
toObjectNameSingular: 'activityTargetV2',
|
||||
fromFieldMetadataName: 'activityTargets',
|
||||
toFieldMetadataName: 'company',
|
||||
},
|
||||
];
|
||||
|
||||
export default companyRelationMetadata;
|
||||
@ -0,0 +1,41 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const personRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'personV2',
|
||||
toObjectNameSingular: 'favoriteV2',
|
||||
fromFieldMetadataName: 'favorites',
|
||||
toFieldMetadataName: 'person',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'personV2',
|
||||
toObjectNameSingular: 'attachmentV2',
|
||||
fromFieldMetadataName: 'attachments',
|
||||
toFieldMetadataName: 'person',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'personV2',
|
||||
toObjectNameSingular: 'opportunityV2',
|
||||
fromFieldMetadataName: 'opportunities',
|
||||
toFieldMetadataName: 'person',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'personV2',
|
||||
toObjectNameSingular: 'opportunityV2',
|
||||
fromFieldMetadataName: 'pointOfContactForOpportunities',
|
||||
toFieldMetadataName: 'pointOfContact',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'personV2',
|
||||
toObjectNameSingular: 'activityTargetV2',
|
||||
fromFieldMetadataName: 'activityTargets',
|
||||
toFieldMetadataName: 'person',
|
||||
},
|
||||
];
|
||||
|
||||
export default personRelationMetadata;
|
||||
@ -0,0 +1,13 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const pipelineStepRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'pipelineStepV2',
|
||||
toObjectNameSingular: 'opportunityV2',
|
||||
fromFieldMetadataName: 'opportunities',
|
||||
toFieldMetadataName: 'pipelineStep',
|
||||
},
|
||||
];
|
||||
|
||||
export default pipelineStepRelationMetadata;
|
||||
27
server/src/tenant-manager/standard-objects/relations/view.ts
Normal file
27
server/src/tenant-manager/standard-objects/relations/view.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const viewRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'viewV2',
|
||||
toObjectNameSingular: 'viewFieldV2',
|
||||
fromFieldMetadataName: 'viewFields',
|
||||
toFieldMetadataName: 'view',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'viewV2',
|
||||
toObjectNameSingular: 'viewFilterV2',
|
||||
fromFieldMetadataName: 'viewFilters',
|
||||
toFieldMetadataName: 'view',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'viewV2',
|
||||
toObjectNameSingular: 'viewSortV2',
|
||||
fromFieldMetadataName: 'viewSorts',
|
||||
toFieldMetadataName: 'view',
|
||||
},
|
||||
];
|
||||
|
||||
export default viewRelationMetadata;
|
||||
@ -0,0 +1,48 @@
|
||||
import { RelationMetadataType } from 'src/metadata/relation-metadata/relation-metadata.entity';
|
||||
|
||||
const workspaceMemberRelationMetadata = [
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'companyV2',
|
||||
fromFieldMetadataName: 'accountOwnerForCompanies',
|
||||
toFieldMetadataName: 'accountOwner',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'favoriteV2',
|
||||
fromFieldMetadataName: 'favorites',
|
||||
toFieldMetadataName: 'workspaceMember',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'activityV2',
|
||||
fromFieldMetadataName: 'authoredActivities',
|
||||
toFieldMetadataName: 'author',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'activityV2',
|
||||
fromFieldMetadataName: 'assignedActivities',
|
||||
toFieldMetadataName: 'assignee',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'commentV2',
|
||||
fromFieldMetadataName: 'authoredComments',
|
||||
toFieldMetadataName: 'author',
|
||||
},
|
||||
{
|
||||
type: RelationMetadataType.ONE_TO_MANY,
|
||||
fromObjectNameSingular: 'workspaceMemberV2',
|
||||
toObjectNameSingular: 'attachmentV2',
|
||||
fromFieldMetadataName: 'authoredAttachments',
|
||||
toFieldMetadataName: 'author',
|
||||
},
|
||||
];
|
||||
|
||||
export default workspaceMemberRelationMetadata;
|
||||
@ -1,13 +1,35 @@
|
||||
import companiesMetadata from './companies/companies.metadata';
|
||||
import viewFieldsMetadata from './view-fields/view-fields.metadata';
|
||||
import viewFiltersMetadata from './view-filters/view-filters.metadata';
|
||||
import viewSortsMetadata from './view-sorts/view-sorts.metadata';
|
||||
import viewsMetadata from './views/views.metadata';
|
||||
import activityTargetMetadata from 'src/tenant-manager/standard-objects/activity-target';
|
||||
import activityMetadata from 'src/tenant-manager/standard-objects/activity';
|
||||
import apiKeyMetadata from 'src/tenant-manager/standard-objects/api-key';
|
||||
import attachmentMetadata from 'src/tenant-manager/standard-objects/attachment';
|
||||
import commentMetadata from 'src/tenant-manager/standard-objects/comment';
|
||||
import favoriteMetadata from 'src/tenant-manager/standard-objects/favorite';
|
||||
import opportunityMetadata from 'src/tenant-manager/standard-objects/opportunity';
|
||||
import personMetadata from 'src/tenant-manager/standard-objects/person';
|
||||
import viewMetadata from 'src/tenant-manager/standard-objects/view';
|
||||
import viewFieldMetadata from 'src/tenant-manager/standard-objects/view-field';
|
||||
import viewFilterMetadata from 'src/tenant-manager/standard-objects/view-filter';
|
||||
import viewSortMetadata from 'src/tenant-manager/standard-objects/view-sort';
|
||||
import webhookMetadata from 'src/tenant-manager/standard-objects/webhook';
|
||||
import pipelineStepMetadata from 'src/tenant-manager/standard-objects/pipeline-step';
|
||||
import companyMetadata from 'src/tenant-manager/standard-objects/company';
|
||||
import workspaceMemberMetadata from 'src/tenant-manager/standard-objects/workspace-member';
|
||||
|
||||
export const standardObjectsMetadata = {
|
||||
companyV2: companiesMetadata,
|
||||
viewV2: viewsMetadata,
|
||||
viewFieldV2: viewFieldsMetadata,
|
||||
viewFilterV2: viewFiltersMetadata,
|
||||
viewSortV2: viewSortsMetadata,
|
||||
activityTargetV2: activityTargetMetadata,
|
||||
activityV2: activityMetadata,
|
||||
apiKeyV2: apiKeyMetadata,
|
||||
attachmentV2: attachmentMetadata,
|
||||
commentV2: commentMetadata,
|
||||
companyV2: companyMetadata,
|
||||
favoriteV2: favoriteMetadata,
|
||||
opportunityV2: opportunityMetadata,
|
||||
personV2: personMetadata,
|
||||
pipelineStepV2: pipelineStepMetadata,
|
||||
viewFieldV2: viewFieldMetadata,
|
||||
viewFilterV2: viewFilterMetadata,
|
||||
viewSortV2: viewSortMetadata,
|
||||
viewV2: viewMetadata,
|
||||
webhookV2: webhookMetadata,
|
||||
workspaceMemberV2: workspaceMemberMetadata,
|
||||
};
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
import activityRelationMetadata from 'src/tenant-manager/standard-objects/relations/activity';
|
||||
import companyRelationMetadata from 'src/tenant-manager/standard-objects/relations/company';
|
||||
import personRelationMetadata from 'src/tenant-manager/standard-objects/relations/person';
|
||||
import pipelineStepRelationMetadata from 'src/tenant-manager/standard-objects/relations/pipeline-step';
|
||||
import viewRelationMetadata from 'src/tenant-manager/standard-objects/relations/view';
|
||||
import workspaceMemberRelationMetadata from 'src/tenant-manager/standard-objects/relations/workspace-member';
|
||||
|
||||
export const standardObjectRelationMetadata = [
|
||||
...activityRelationMetadata,
|
||||
...companyRelationMetadata,
|
||||
...personRelationMetadata,
|
||||
...pipelineStepRelationMetadata,
|
||||
...viewRelationMetadata,
|
||||
...workspaceMemberRelationMetadata,
|
||||
];
|
||||
@ -1,13 +1,17 @@
|
||||
const viewFieldsMetadata = {
|
||||
const viewFieldMetadata = {
|
||||
nameSingular: 'viewFieldV2',
|
||||
namePlural: 'viewFieldsV2',
|
||||
labelSingular: 'View Field',
|
||||
labelPlural: 'View Fields',
|
||||
targetTableName: 'viewField',
|
||||
description: '(System) View Fields',
|
||||
icon: 'IconColumns3',
|
||||
icon: 'IconTag',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'fieldMetadataId',
|
||||
label: 'Field Metadata Id',
|
||||
@ -15,21 +19,12 @@ const viewFieldsMetadata = {
|
||||
value: 'fieldMetadataId',
|
||||
},
|
||||
description: 'View Field target field',
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Field related view',
|
||||
icon: null,
|
||||
icon: 'IconTag',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'BOOLEAN',
|
||||
name: 'isVisible',
|
||||
label: 'Visible',
|
||||
@ -37,10 +32,12 @@ const viewFieldsMetadata = {
|
||||
value: 'isVisible',
|
||||
},
|
||||
description: 'View Field visibility',
|
||||
icon: null,
|
||||
icon: 'IconEye',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'size',
|
||||
label: 'Size',
|
||||
@ -48,10 +45,12 @@ const viewFieldsMetadata = {
|
||||
value: 'size',
|
||||
},
|
||||
description: 'View Field size',
|
||||
icon: null,
|
||||
icon: 'IconEye',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'NUMBER',
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
@ -59,10 +58,35 @@ const viewFieldsMetadata = {
|
||||
value: 'position',
|
||||
},
|
||||
description: 'View Field position',
|
||||
icon: null,
|
||||
icon: 'IconList',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'view',
|
||||
label: 'View',
|
||||
targetColumnMap: { value: 'viewId' },
|
||||
description: 'View Field related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
// Temporary hack?
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View field related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default viewFieldsMetadata;
|
||||
export default viewFieldMetadata;
|
||||
@ -1,4 +1,4 @@
|
||||
const viewFiltersMetadata = {
|
||||
const viewFilterMetadata = {
|
||||
nameSingular: 'viewFilterV2',
|
||||
namePlural: 'viewFiltersV2',
|
||||
labelSingular: 'View Filter',
|
||||
@ -6,8 +6,12 @@ const viewFiltersMetadata = {
|
||||
targetTableName: 'viewFilter',
|
||||
description: '(System) View Filters',
|
||||
icon: 'IconFilterBolt',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'fieldMetadataId',
|
||||
label: 'Field Metadata Id',
|
||||
@ -16,20 +20,11 @@ const viewFiltersMetadata = {
|
||||
},
|
||||
description: 'View Filter target field',
|
||||
icon: null,
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Filter related view',
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'operand',
|
||||
label: 'Operand',
|
||||
@ -41,6 +36,8 @@ const viewFiltersMetadata = {
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'value',
|
||||
label: 'Value',
|
||||
@ -52,6 +49,8 @@ const viewFiltersMetadata = {
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'displayValue',
|
||||
label: 'Display Value',
|
||||
@ -62,7 +61,32 @@ const viewFiltersMetadata = {
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'view',
|
||||
label: 'View',
|
||||
targetColumnMap: { value: 'viewId' },
|
||||
description: 'View Filter related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
// Temporary hack?
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Filter related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default viewFiltersMetadata;
|
||||
export default viewFilterMetadata;
|
||||
@ -1,4 +1,4 @@
|
||||
const viewSortsMetadata = {
|
||||
const viewSortMetadata = {
|
||||
nameSingular: 'viewSortV2',
|
||||
namePlural: 'viewSortsV2',
|
||||
labelSingular: 'View Sort',
|
||||
@ -6,8 +6,12 @@ const viewSortsMetadata = {
|
||||
targetTableName: 'viewSort',
|
||||
description: '(System) View Sorts',
|
||||
icon: 'IconArrowsSort',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'fieldMetadataId',
|
||||
label: 'Field Metadata Id',
|
||||
@ -19,17 +23,8 @@ const viewSortsMetadata = {
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Sort related view',
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'direction',
|
||||
label: 'Direction',
|
||||
@ -40,7 +35,34 @@ const viewSortsMetadata = {
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'view',
|
||||
label: 'View',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Sort related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
// Temporary Hack?
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'viewId',
|
||||
label: 'View Id',
|
||||
targetColumnMap: {
|
||||
value: 'viewId',
|
||||
},
|
||||
description: 'View Sort related view',
|
||||
icon: 'IconLayoutCollage',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default viewSortsMetadata;
|
||||
export default viewSortMetadata;
|
||||
@ -1,4 +1,4 @@
|
||||
const viewsMetadata = {
|
||||
const viewMetadata = {
|
||||
nameSingular: 'viewV2',
|
||||
namePlural: 'viewsV2',
|
||||
labelSingular: 'View',
|
||||
@ -6,6 +6,8 @@ const viewsMetadata = {
|
||||
targetTableName: 'view',
|
||||
description: '(System) Views',
|
||||
icon: 'IconLayoutCollage',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
type: 'TEXT',
|
||||
@ -40,7 +42,40 @@ const viewsMetadata = {
|
||||
icon: null,
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'viewFields',
|
||||
label: 'View Fields',
|
||||
targetColumnMap: {},
|
||||
description: 'View Fields',
|
||||
icon: 'IconTag',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'viewSorts',
|
||||
label: 'View Sorts',
|
||||
targetColumnMap: {},
|
||||
description: 'View Sorts',
|
||||
icon: 'IconArrowsSort',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'viewFilters',
|
||||
label: 'View Filters',
|
||||
targetColumnMap: {},
|
||||
description: 'View Filters',
|
||||
icon: 'IconFilterBolt',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default viewsMetadata;
|
||||
export default viewMetadata;
|
||||
41
server/src/tenant-manager/standard-objects/webhook.ts
Normal file
41
server/src/tenant-manager/standard-objects/webhook.ts
Normal file
@ -0,0 +1,41 @@
|
||||
const webhookMetadata = {
|
||||
nameSingular: 'webhookV2',
|
||||
namePlural: 'webhooksV2',
|
||||
labelSingular: 'Webhook',
|
||||
labelPlural: 'Webhooks',
|
||||
targetTableName: 'webhook',
|
||||
description: 'A webhook',
|
||||
icon: 'IconRobot',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'targetUrl',
|
||||
label: 'Target Url',
|
||||
targetColumnMap: {
|
||||
value: 'targetUrl',
|
||||
},
|
||||
description: 'Webhook target url',
|
||||
icon: 'IconLink',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'operation',
|
||||
label: 'Operation',
|
||||
targetColumnMap: {
|
||||
value: 'operation',
|
||||
},
|
||||
description: 'Webhook operation',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default webhookMetadata;
|
||||
160
server/src/tenant-manager/standard-objects/workspace-member.ts
Normal file
160
server/src/tenant-manager/standard-objects/workspace-member.ts
Normal file
@ -0,0 +1,160 @@
|
||||
const workspaceMemberMetadata = {
|
||||
nameSingular: 'workspaceMemberV2',
|
||||
namePlural: 'workspaceMembersV2',
|
||||
labelSingular: 'Workspace Member',
|
||||
labelPlural: 'Workspace Members',
|
||||
targetTableName: 'workspaceMember',
|
||||
description: 'A workspace member',
|
||||
icon: 'IconUserCircle',
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
fields: [
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'firstName',
|
||||
label: 'First name',
|
||||
targetColumnMap: {
|
||||
value: 'firstName',
|
||||
},
|
||||
description: 'Workspace member first name',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'lastName',
|
||||
label: 'Last name',
|
||||
targetColumnMap: {
|
||||
value: 'lastName',
|
||||
},
|
||||
description: 'Workspace member last name',
|
||||
icon: 'IconCircleUser',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'UUID',
|
||||
name: 'userId',
|
||||
label: 'User Id',
|
||||
targetColumnMap: {
|
||||
value: 'userId',
|
||||
},
|
||||
description: 'Associated User Id',
|
||||
icon: 'IconCircleUsers',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'BOOLEAN',
|
||||
name: 'allowImpersonation',
|
||||
label: 'Admin Access',
|
||||
targetColumnMap: {
|
||||
value: 'allowImpersonation',
|
||||
},
|
||||
description: 'Allow Admin Access',
|
||||
icon: 'IconEye',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'colorScheme',
|
||||
label: 'Color Scheme',
|
||||
targetColumnMap: {
|
||||
value: 'colorScheme',
|
||||
},
|
||||
description: 'Preferred color scheme',
|
||||
icon: 'IconColorSwatch',
|
||||
isNullable: false,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'TEXT',
|
||||
name: 'locale',
|
||||
label: 'Language',
|
||||
targetColumnMap: {
|
||||
value: 'locale',
|
||||
},
|
||||
description: 'Preferred language',
|
||||
icon: 'IconLanguage',
|
||||
isNullable: false,
|
||||
},
|
||||
// Relations
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'authoredActivities',
|
||||
label: 'Authored activities',
|
||||
targetColumnMap: {},
|
||||
description: 'Activities created by the workspace member',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'assignedActivities',
|
||||
label: 'Assigned activities',
|
||||
targetColumnMap: {},
|
||||
description: 'Activities assigned to the workspace member',
|
||||
icon: 'IconCheckbox',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
targetColumnMap: {},
|
||||
description: 'Favorites linked to the workspace member',
|
||||
icon: 'IconHeart',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'accountOwnerForCompanies',
|
||||
label: 'Account Owner For Companies',
|
||||
targetColumnMap: {},
|
||||
description: 'Account owner for companies',
|
||||
icon: 'IconBriefcase',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'authoredAttachments',
|
||||
label: 'Authored attachments',
|
||||
targetColumnMap: {},
|
||||
description: 'Attachments created by the workspace member',
|
||||
icon: 'IconFileImport',
|
||||
isNullable: true,
|
||||
},
|
||||
{
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
type: 'RELATION',
|
||||
name: 'authoredComments',
|
||||
label: 'Authored comments',
|
||||
targetColumnMap: {},
|
||||
description: 'Authored comments',
|
||||
icon: 'IconComment',
|
||||
isNullable: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default workspaceMemberMetadata;
|
||||
Reference in New Issue
Block a user