Add default relation to standard object on custom object in manifest (#18033)
add default relation fields when creating an object from an application --------- Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
export const ALL_METADATA_NAME = {
|
||||
fieldMetadata: 'fieldMetadata',
|
||||
objectMetadata: 'objectMetadata',
|
||||
view: 'view',
|
||||
viewField: 'viewField',
|
||||
viewFieldGroup: 'viewFieldGroup',
|
||||
viewGroup: 'viewGroup',
|
||||
rowLevelPermissionPredicate: 'rowLevelPermissionPredicate',
|
||||
rowLevelPermissionPredicateGroup: 'rowLevelPermissionPredicateGroup',
|
||||
viewFilterGroup: 'viewFilterGroup',
|
||||
index: 'index',
|
||||
logicFunction: 'logicFunction',
|
||||
viewFilter: 'viewFilter',
|
||||
role: 'role',
|
||||
roleTarget: 'roleTarget',
|
||||
agent: 'agent',
|
||||
skill: 'skill',
|
||||
pageLayout: 'pageLayout',
|
||||
pageLayoutWidget: 'pageLayoutWidget',
|
||||
pageLayoutTab: 'pageLayoutTab',
|
||||
commandMenuItem: 'commandMenuItem',
|
||||
navigationMenuItem: 'navigationMenuItem',
|
||||
frontComponent: 'frontComponent',
|
||||
webhook: 'webhook',
|
||||
} as const;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { type STANDARD_OBJECTS } from '@/metadata/constants/standard-object.constant';
|
||||
|
||||
export const DEFAULT_RELATIONS_OBJECTS_STANDARD_IDS = [
|
||||
'timelineActivity',
|
||||
'favorite',
|
||||
'attachment',
|
||||
'noteTarget',
|
||||
'taskTarget',
|
||||
] as const satisfies (keyof typeof STANDARD_OBJECTS)[];
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
const CORE_OBJECT_NAMES = [
|
||||
'approvedAccessDomain',
|
||||
'approvedAccessDomains',
|
||||
'appToken',
|
||||
'appTokens',
|
||||
'billingCustomer',
|
||||
'billingCustomers',
|
||||
'billingEntitlement',
|
||||
'billingEntitlements',
|
||||
'billingMeter',
|
||||
'billingMeters',
|
||||
'billingProduct',
|
||||
'billingProducts',
|
||||
'billingSubscription',
|
||||
'billingSubscriptions',
|
||||
'billingSubscriptionItem',
|
||||
'billingSubscriptionItems',
|
||||
'featureFlag',
|
||||
'featureFlags',
|
||||
'job',
|
||||
'jobs',
|
||||
'keyValuePair',
|
||||
'keyValuePairs',
|
||||
'pageLayout',
|
||||
'pageLayouts',
|
||||
'pageLayoutTab',
|
||||
'pageLayoutTabs',
|
||||
'pageLayoutWidget',
|
||||
'pageLayoutWidgets',
|
||||
'postgresCredential',
|
||||
'postgresCredentials',
|
||||
'twoFactorMethod',
|
||||
'twoFactorMethods',
|
||||
'user',
|
||||
'users',
|
||||
'userWorkspace',
|
||||
'userWorkspaces',
|
||||
'workspace',
|
||||
'workspaces',
|
||||
'role',
|
||||
'roles',
|
||||
'userWorkspaceRole',
|
||||
'userWorkspaceRoles',
|
||||
];
|
||||
|
||||
export const RESERVED_METADATA_NAME_KEYWORDS = [
|
||||
...CORE_OBJECT_NAMES,
|
||||
'plan',
|
||||
'plans',
|
||||
'event',
|
||||
'events',
|
||||
'field',
|
||||
'fields',
|
||||
'link',
|
||||
'links',
|
||||
'currency',
|
||||
'currencies',
|
||||
'fullNames',
|
||||
'address',
|
||||
'addresses',
|
||||
'type',
|
||||
'types',
|
||||
'object',
|
||||
'objects',
|
||||
'index',
|
||||
'relation',
|
||||
'relations',
|
||||
'aggregate',
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user