chore: extend root eslint config in twenty-server (#5101)

Reopening @thaisguigon work from
https://github.com/twentyhq/twenty/pull/4781

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
This commit is contained in:
Weiko 2024-04-22 17:34:24 +02:00 committed by GitHub
parent b9a7eb5a98
commit fa4670b14d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
66 changed files with 645 additions and 628 deletions

View File

@ -0,0 +1,91 @@
module.exports = {
plugins: ['@stylistic'],
extends: ['../../.eslintrc.cjs'],
ignorePatterns: ['src/engine/workspace-manager/demo-objects-prefill-data/**'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['packages/twenty-server/tsconfig.json'],
},
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['**../'],
message: 'Relative imports are not allowed.',
},
],
},
],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/lines-between-class-members': [
'error',
{
enforce: [{ blankLine: 'always', prev: 'method', next: 'method' }],
},
],
'@stylistic/padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'],
},
{ blankLine: 'always', prev: '*', next: ['interface', 'type'] },
],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: [
'builtin',
'external',
'internal',
'type',
'parent',
'sibling',
'object',
'index',
],
pathGroups: [
{
pattern: '@nestjs/**',
group: 'builtin',
position: 'before',
},
{
pattern: '**/interfaces/**',
group: 'type',
position: 'before',
},
{
pattern: 'src/**',
group: 'parent',
position: 'before',
},
{
pattern: './*',
group: 'sibling',
position: 'before',
},
],
distinctGroup: true,
warnOnUnassignedImports: true,
pathGroupsExcludedImportTypes: ['@nestjs/**'],
},
],
'simple-import-sort/imports': 'off',
'unicorn/filename-case': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
'@nx/workspace-max-consts-per-file': 'off',
},
},
],
};

View File

@ -1,92 +0,0 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'unused-imports', '@stylistic'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'src/core/@generated/**'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
'no-restricted-imports': [
'error',
{
'patterns': [
{
'group': ['**../'],
'message': 'Relative imports are not allowed.',
},
],
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: [
'builtin',
'external',
'internal',
'type',
'parent',
'sibling',
'object',
'index',
],
pathGroups: [
{
pattern: '@nestjs/**',
group: 'builtin',
position: 'before',
},
{
pattern: '**/interfaces/**',
group: 'type',
position: 'before',
},
{
pattern: 'src/**',
group: 'parent',
position: 'before',
},
{
pattern: './*',
group: 'sibling',
position: 'before',
},
],
distinctGroup: true,
warnOnUnassignedImports: true,
pathGroupsExcludedImportTypes: ['@nestjs/**'],
},
],
'import/no-duplicates': ["error", {"considerQueryString": true}],
'unused-imports/no-unused-imports': 'warn',
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "no-type-imports" }],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/lines-between-class-members": ["error", { "enforce": [
{ blankLine: "always", prev: "method", next: "method" }
]}],
"@stylistic/padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "*", next: "return" },
{ blankLine: "always", prev: ["const", "let", "var"], next: "*"},
{ blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"] },
{ blankLine: "always", prev: "*", next: ["interface", "type"] }
]
},
};

View File

@ -81,10 +81,15 @@
} }
}, },
"lint": { "lint": {
"executor": "nx:run-commands", "executor": "@nx/eslint:lint",
"options": { "options": {
"cwd": "packages/twenty-server", "eslintConfig": "{projectRoot}/.eslintrc.cjs",
"command": "eslint \"src/**/*.ts\" --fix" "ignorePath": "{workspaceRoot}/.gitignore",
"lintFilePatterns": ["{projectRoot}/src/**/*.{ts,json}"]
},
"configurations": {
"ci": { "lintFilePatterns": ["{projectRoot}/**/*.{ts,json}"] },
"fix": { "fix": true }
} }
}, },
"test:unit": { "test:unit": {

View File

@ -22,7 +22,7 @@ export class CommandLogger {
async writeLog( async writeLog(
fileName: string, fileName: string,
data: unknown, data: unknown,
append: boolean = false, append = false,
): Promise<void> { ): Promise<void> {
const path = `./logs/${kebabCase(this.className)}`; const path = `./logs/${kebabCase(this.className)}`;

View File

@ -175,11 +175,6 @@ export class DataSeedWorkspaceCommand extends CommandRunner {
console.error(error); console.error(error);
} }
try {
} catch (error) {
console.error(error);
}
await this.typeORMService.disconnectFromDataSource(dataSourceMetadata.id); await this.typeORMService.disconnectFromDataSource(dataSourceMetadata.id);
} }
} }

View File

@ -46,7 +46,6 @@ export const seedUsers = async (
'$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6', // Applecar2025 '$2b$10$66d.6DuQExxnrfI9rMqOg.U1XIYpagr6Lv05uoWLYbYmtK0HDIvS6', // Applecar2025
defaultWorkspaceId: workspaceId, defaultWorkspaceId: workspaceId,
}, },
,
{ {
id: DEMO_SEED_USER_IDS.JULIA, id: DEMO_SEED_USER_IDS.JULIA,
firstName: 'Julia', firstName: 'Julia',

View File

@ -84,7 +84,7 @@ describe('FindDuplicatesQueryFactory', () => {
}); });
expect(query.trim()).toEqual(`query { expect(query.trim()).toEqual(`query {
personCollection(filter: {or:[{nameFirstName:{eq:\"John\"},nameLastName:{eq:\"Doe\"}}]}) { personCollection(filter: {or:[{nameFirstName:{eq:"John"},nameLastName:{eq:"Doe"}}]}) {
fieldsString fieldsString
} }
}`); }`);
@ -171,7 +171,7 @@ describe('FindDuplicatesQueryFactory', () => {
); );
expect(query.trim()).toEqual(`query { expect(query.trim()).toEqual(`query {
personCollection(filter: {id:{neq:\"uuid\"},or:[{nameFirstName:{eq:\"Peter\"},nameLastName:{eq:\"Parker\"}}]}) { personCollection(filter: {id:{neq:"uuid"},or:[{nameFirstName:{eq:"Peter"},nameLastName:{eq:"Parker"}}]}) {
fieldsString fieldsString
} }
}`); }`);
@ -189,7 +189,7 @@ describe('FindDuplicatesQueryFactory', () => {
}); });
expect(query.trim()).toEqual(`query { expect(query.trim()).toEqual(`query {
personCollection(filter: { id: { eq: \"uuid\" }}){ personCollection(filter: { id: { eq: "uuid" }}){
edges { edges {
node { node {
__typename __typename

View File

@ -10,7 +10,7 @@ import { ObjectMetadataInterface } from 'src/engine/metadata-modules/field-metad
import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util'; import { computeObjectTargetTable } from 'src/engine/utils/compute-object-target-table.util';
import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util'; import { stringifyWithoutKeyQuote } from 'src/engine/api/graphql/workspace-query-builder/utils/stringify-without-key-quote.util';
import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory'; import { ArgsAliasFactory } from 'src/engine/api/graphql/workspace-query-builder/factories/args-alias.factory';
import { duplicateCriteriaCollection } from 'src/engine/api/graphql/workspace-resolver-builder/constants/duplicate-criteria.constants'; import { DUPLICATE_CRITERIA_COLLECTION } from 'src/engine/api/graphql/workspace-resolver-builder/constants/duplicate-criteria.constants';
import { settings } from 'src/engine/constants/settings'; import { settings } from 'src/engine/constants/settings';
import { FieldsStringFactory } from './fields-string.factory'; import { FieldsStringFactory } from './fields-string.factory';
@ -145,7 +145,7 @@ export class FindDuplicatesQueryFactory {
private getApplicableDuplicateCriteriaCollection( private getApplicableDuplicateCriteriaCollection(
objectMetadataItem: ObjectMetadataInterface, objectMetadataItem: ObjectMetadataInterface,
) { ) {
return duplicateCriteriaCollection.filter( return DUPLICATE_CRITERIA_COLLECTION.filter(
(duplicateCriteria) => (duplicateCriteria) =>
duplicateCriteria.objectName === objectMetadataItem.nameSingular, duplicateCriteria.objectName === objectMetadataItem.nameSingular,
); );

View File

@ -34,6 +34,7 @@ export const parseResult = (obj: any): any => {
const result: any = {}; const result: any = {};
for (const key in obj) { for (const key in obj) {
// eslint-disable-next-line no-prototype-builtins
if (obj.hasOwnProperty(key)) { if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object' && obj[key] !== null) { if (typeof obj[key] === 'object' && obj[key] !== null) {
result[key] = parseResult(obj[key]); result[key] = parseResult(obj[key]);

View File

@ -6,7 +6,7 @@ import { RecordDuplicateCriteria } from 'src/engine/api/graphql/workspace-query-
* So if we need to reference a custom field, we should directly add the column name like `_customColumn`. * So if we need to reference a custom field, we should directly add the column name like `_customColumn`.
* If we need to terence a composite field, we should add all children of the composite like `nameFirstName` and `nameLastName` * If we need to terence a composite field, we should add all children of the composite like `nameFirstName` and `nameLastName`
*/ */
export const duplicateCriteriaCollection: RecordDuplicateCriteria[] = [ export const DUPLICATE_CRITERIA_COLLECTION: RecordDuplicateCriteria[] = [
{ {
objectName: 'company', objectName: 'company',
columnNames: ['domainName'], columnNames: ['domainName'],

View File

@ -24,6 +24,7 @@ export class ArgsFactory {
const fieldConfigMap: GraphQLFieldConfigArgumentMap = {}; const fieldConfigMap: GraphQLFieldConfigArgumentMap = {};
for (const key in args) { for (const key in args) {
// eslint-disable-next-line no-prototype-builtins
if (!args.hasOwnProperty(key)) { if (!args.hasOwnProperty(key)) {
continue; continue;
} }

View File

@ -1,11 +1,11 @@
export * from './big-float-filter.input-type'; export * from './big-float-filter.input-type';
export * from './big-int-filter.input-type'; export * from './big-int-filter.input-type';
export * from './boolean-filter.input-type';
export * from './date-filter.input-type'; export * from './date-filter.input-type';
export * from './date-time-filter.input-type'; export * from './date-time-filter.input-type';
export * from './float-filter.input-type'; export * from './float-filter.input-type';
export * from './int-filter.input-type'; export * from './int-filter.input-type';
export * from './raw-json-filter.input-type';
export * from './string-filter.input-type'; export * from './string-filter.input-type';
export * from './time-filter.input-type'; export * from './time-filter.input-type';
export * from './uuid-filter.input-type'; export * from './uuid-filter.input-type';
export * from './boolean-filter.input-type';
export * from './raw-json-filter.input-type';

View File

@ -1,4 +1,4 @@
import { Injectable } from '@nestjs/common'; import { Injectable, Logger } from '@nestjs/common';
import { HttpService } from '@nestjs/axios'; import { HttpService } from '@nestjs/axios';
import { Request } from 'express'; import { Request } from 'express';
@ -12,6 +12,8 @@ import { CreateAnalyticsInput } from './dto/create-analytics.input';
@Injectable() @Injectable()
export class AnalyticsService { export class AnalyticsService {
private readonly logger = new Logger(AnalyticsService.name);
constructor( constructor(
private readonly environmentService: EnvironmentService, private readonly environmentService: EnvironmentService,
private readonly httpService: HttpService, private readonly httpService: HttpService,
@ -53,7 +55,11 @@ export class AnalyticsService {
try { try {
await this.httpService.axiosRef.post('/v1', data); await this.httpService.axiosRef.post('/v1', data);
} catch {} } catch {
this.logger.error('Failed to send analytics event');
return { success: false };
}
return { success: true }; return { success: true };
} }

View File

@ -10,7 +10,6 @@ export class GoogleAPIsOauthGuard extends AuthGuard('google-apis') {
} }
async canActivate(context: ExecutionContext) { async canActivate(context: ExecutionContext) {
try {
const request = context.switchToHttp().getRequest(); const request = context.switchToHttp().getRequest();
const transientToken = request.query.transientToken; const transientToken = request.query.transientToken;
@ -20,8 +19,5 @@ export class GoogleAPIsOauthGuard extends AuthGuard('google-apis') {
const activate = (await super.canActivate(context)) as boolean; const activate = (await super.canActivate(context)) as boolean;
return activate; return activate;
} catch (ex) {
throw ex;
}
} }
} }

View File

@ -10,7 +10,6 @@ export class GoogleOauthGuard extends AuthGuard('google') {
} }
async canActivate(context: ExecutionContext) { async canActivate(context: ExecutionContext) {
try {
const request = context.switchToHttp().getRequest(); const request = context.switchToHttp().getRequest();
const workspaceInviteHash = request.query.inviteHash; const workspaceInviteHash = request.query.inviteHash;
@ -20,8 +19,5 @@ export class GoogleOauthGuard extends AuthGuard('google') {
const activate = (await super.canActivate(context)) as boolean; const activate = (await super.canActivate(context)) as boolean;
return activate; return activate;
} catch (ex) {
throw ex;
}
} }
} }

View File

@ -202,7 +202,11 @@ export class BillingService {
quantity = await this.userWorkspaceService.getWorkspaceMemberCount( quantity = await this.userWorkspaceService.getWorkspaceMemberCount(
user.defaultWorkspaceId, user.defaultWorkspaceId,
); );
} catch (e) {} } catch (e) {
this.logger.error(
`Failed to get workspace member count for workspace ${user.defaultWorkspaceId}`,
);
}
const session = await this.stripeService.createCheckoutSession( const session = await this.stripeService.createCheckoutSession(
user, user,

View File

@ -32,7 +32,7 @@ export class TimelineCalendarEventService {
workspaceMemberId: string, workspaceMemberId: string,
workspaceId: string, workspaceId: string,
personIds: string[], personIds: string[],
page: number = 1, page = 1,
pageSize: number = TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE, pageSize: number = TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE,
): Promise<TimelineCalendarEventsWithTotal> { ): Promise<TimelineCalendarEventsWithTotal> {
const offset = (page - 1) * pageSize; const offset = (page - 1) * pageSize;
@ -234,7 +234,7 @@ export class TimelineCalendarEventService {
workspaceMemberId: string, workspaceMemberId: string,
workspaceId: string, workspaceId: string,
companyId: string, companyId: string,
page: number = 1, page = 1,
pageSize: number = TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE, pageSize: number = TIMELINE_CALENDAR_EVENTS_DEFAULT_PAGE_SIZE,
): Promise<TimelineCalendarEventsWithTotal> { ): Promise<TimelineCalendarEventsWithTotal> {
const dataSourceSchema = const dataSourceSchema =

View File

@ -24,7 +24,7 @@ export class TimelineMessagingService {
workspaceMemberId: string, workspaceMemberId: string,
workspaceId: string, workspaceId: string,
personIds: string[], personIds: string[],
page: number = 1, page = 1,
pageSize: number = TIMELINE_THREADS_DEFAULT_PAGE_SIZE, pageSize: number = TIMELINE_THREADS_DEFAULT_PAGE_SIZE,
): Promise<TimelineThreadsWithTotal> { ): Promise<TimelineThreadsWithTotal> {
const offset = (page - 1) * pageSize; const offset = (page - 1) * pageSize;
@ -478,7 +478,7 @@ export class TimelineMessagingService {
workspaceMemberId: string, workspaceMemberId: string,
workspaceId: string, workspaceId: string,
companyId: string, companyId: string,
page: number = 1, page = 1,
pageSize: number = TIMELINE_THREADS_DEFAULT_PAGE_SIZE, pageSize: number = TIMELINE_THREADS_DEFAULT_PAGE_SIZE,
): Promise<TimelineThreadsWithTotal> { ): Promise<TimelineThreadsWithTotal> {
const dataSourceSchema = const dataSourceSchema =

View File

@ -13,7 +13,7 @@ export function IsValidMetadataName(validationOptions?: ValidationOptions) {
options: validationOptions, options: validationOptions,
validator: { validator: {
validate(value: any) { validate(value: any) {
return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'\"\\;.=*/]+$/.test( return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'"\\;.=*/]+$/.test(
value, value,
); );
}, },

View File

@ -44,7 +44,7 @@ export class CacheStorageService {
}); });
} }
async setPop(key: string, size: number = 1) { async setPop(key: string, size = 1) {
if (this.isRedisCache()) { if (this.isRedisCache()) {
return (this.cache as RedisCache).store.client.sPop( return (this.cache as RedisCache).store.client.sPop(
`${this.namespace}:${key}`, `${this.namespace}:${key}`,

View File

@ -38,24 +38,24 @@ export class EnvironmentVariables {
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
DEBUG_MODE: boolean = false; DEBUG_MODE = false;
@CastToPositiveNumber() @CastToPositiveNumber()
@IsOptional() @IsOptional()
@IsNumber() @IsNumber()
@Min(0) @Min(0)
@Max(65535) @Max(65535)
DEBUG_PORT: number = 9000; DEBUG_PORT = 9000;
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
SIGN_IN_PREFILLED: boolean = false; SIGN_IN_PREFILLED = false;
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
IS_BILLING_ENABLED: boolean = false; IS_BILLING_ENABLED = false;
@IsString() @IsString()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true) @ValidateIf((env) => env.IS_BILLING_ENABLED === true)
@ -69,7 +69,7 @@ export class EnvironmentVariables {
@CastToPositiveNumber() @CastToPositiveNumber()
@IsOptional() @IsOptional()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true) @ValidateIf((env) => env.IS_BILLING_ENABLED === true)
BILLING_FREE_TRIAL_DURATION_IN_DAYS: number = 7; BILLING_FREE_TRIAL_DURATION_IN_DAYS = 7;
@IsString() @IsString()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true) @ValidateIf((env) => env.IS_BILLING_ENABLED === true)
@ -82,17 +82,17 @@ export class EnvironmentVariables {
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
TELEMETRY_ENABLED: boolean = true; TELEMETRY_ENABLED = true;
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
TELEMETRY_ANONYMIZATION_ENABLED: boolean = true; TELEMETRY_ANONYMIZATION_ENABLED = true;
@CastToPositiveNumber() @CastToPositiveNumber()
@IsNumber() @IsNumber()
@IsOptional() @IsOptional()
PORT: number = 3000; PORT = 3000;
// Database // Database
@IsDefined() @IsDefined()
@ -118,33 +118,33 @@ export class EnvironmentVariables {
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
ACCESS_TOKEN_EXPIRES_IN: string = '30m'; ACCESS_TOKEN_EXPIRES_IN = '30m';
@IsString() @IsString()
REFRESH_TOKEN_SECRET: string; REFRESH_TOKEN_SECRET: string;
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
REFRESH_TOKEN_EXPIRES_IN: string = '30m'; REFRESH_TOKEN_EXPIRES_IN = '30m';
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
REFRESH_TOKEN_COOL_DOWN: string = '1m'; REFRESH_TOKEN_COOL_DOWN = '1m';
@IsString() @IsString()
LOGIN_TOKEN_SECRET: string = '30m'; LOGIN_TOKEN_SECRET = '30m';
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
LOGIN_TOKEN_EXPIRES_IN: string = '15m'; LOGIN_TOKEN_EXPIRES_IN = '15m';
@IsString() @IsString()
@IsOptional() @IsOptional()
FILE_TOKEN_SECRET: string = 'random_string'; FILE_TOKEN_SECRET = 'random_string';
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
FILE_TOKEN_EXPIRES_IN: string = '1d'; FILE_TOKEN_EXPIRES_IN = '1d';
// Auth // Auth
@IsUrl({ require_tld: false }) @IsUrl({ require_tld: false })
@ -154,7 +154,7 @@ export class EnvironmentVariables {
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
AUTH_GOOGLE_ENABLED: boolean = false; AUTH_GOOGLE_ENABLED = false;
@IsString() @IsString()
@ValidateIf((env) => env.AUTH_GOOGLE_ENABLED === true) @ValidateIf((env) => env.AUTH_GOOGLE_ENABLED === true)
@ -188,7 +188,7 @@ export class EnvironmentVariables {
@IsString() @IsString()
@ValidateIf((env) => env.STORAGE_TYPE === StorageDriverType.Local) @ValidateIf((env) => env.STORAGE_TYPE === StorageDriverType.Local)
STORAGE_LOCAL_PATH: string = '.local-storage'; STORAGE_LOCAL_PATH = '.local-storage';
// Support // Support
@IsEnum(SupportDriver) @IsEnum(SupportDriver)
@ -210,7 +210,7 @@ export class EnvironmentVariables {
@CastToBoolean() @CastToBoolean()
@IsBoolean() @IsBoolean()
@IsOptional() @IsOptional()
LOGGER_IS_BUFFER_ENABLED: boolean = true; LOGGER_IS_BUFFER_ENABLED = true;
@IsEnum(ExceptionHandlerDriver) @IsEnum(ExceptionHandlerDriver)
@IsOptional() @IsOptional()
@ -253,7 +253,7 @@ export class EnvironmentVariables {
@IsDuration() @IsDuration()
@IsOptional() @IsOptional()
PASSWORD_RESET_TOKEN_EXPIRES_IN: string = '5m'; PASSWORD_RESET_TOKEN_EXPIRES_IN = '5m';
@CastToPositiveNumber() @CastToPositiveNumber()
@IsNumber() @IsNumber()
@ -263,49 +263,49 @@ export class EnvironmentVariables {
'"WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION" should be strictly lower that "WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION"', '"WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION" should be strictly lower that "WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION"',
}) })
@ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION > 0) @ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION > 0)
WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION: number = 30; WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION = 30;
@CastToPositiveNumber() @CastToPositiveNumber()
@IsNumber() @IsNumber()
@ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION > 0) @ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION > 0)
WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION: number = 60; WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION = 60;
@CastToBoolean() @CastToBoolean()
@IsOptional() @IsOptional()
@IsBoolean() @IsBoolean()
IS_SIGN_UP_DISABLED: boolean = false; IS_SIGN_UP_DISABLED = false;
@CastToPositiveNumber() @CastToPositiveNumber()
@IsOptional() @IsOptional()
@IsNumber() @IsNumber()
MUTATION_MAXIMUM_RECORD_AFFECTED: number = 100; MUTATION_MAXIMUM_RECORD_AFFECTED = 100;
REDIS_HOST: string = '127.0.0.1'; REDIS_HOST = '127.0.0.1';
@CastToPositiveNumber() @CastToPositiveNumber()
REDIS_PORT: number = 6379; REDIS_PORT = 6379;
API_TOKEN_EXPIRES_IN: string = '100y'; API_TOKEN_EXPIRES_IN = '100y';
SHORT_TERM_TOKEN_EXPIRES_IN: string = '5m'; SHORT_TERM_TOKEN_EXPIRES_IN = '5m';
@CastToBoolean() @CastToBoolean()
MESSAGING_PROVIDER_GMAIL_ENABLED: boolean = false; MESSAGING_PROVIDER_GMAIL_ENABLED = false;
MESSAGE_QUEUE_TYPE: string = MessageQueueDriverType.Sync; MESSAGE_QUEUE_TYPE: string = MessageQueueDriverType.Sync;
EMAIL_FROM_ADDRESS: string = 'noreply@yourdomain.com'; EMAIL_FROM_ADDRESS = 'noreply@yourdomain.com';
EMAIL_SYSTEM_ADDRESS: string = 'system@yourdomain.com'; EMAIL_SYSTEM_ADDRESS = 'system@yourdomain.com';
EMAIL_FROM_NAME: string = 'Felix from Twenty'; EMAIL_FROM_NAME = 'Felix from Twenty';
EMAIL_DRIVER: EmailDriver = EmailDriver.Logger; EMAIL_DRIVER: EmailDriver = EmailDriver.Logger;
EMAIL_SMTP_HOST: string; EMAIL_SMTP_HOST: string;
@CastToPositiveNumber() @CastToPositiveNumber()
EMAIL_SMTP_PORT: number = 587; EMAIL_SMTP_PORT = 587;
EMAIL_SMTP_USER: string; EMAIL_SMTP_USER: string;
@ -314,18 +314,18 @@ export class EnvironmentVariables {
OPENROUTER_API_KEY: string; OPENROUTER_API_KEY: string;
@CastToPositiveNumber() @CastToPositiveNumber()
API_RATE_LIMITING_TTL: number = 100; API_RATE_LIMITING_TTL = 100;
@CastToPositiveNumber() @CastToPositiveNumber()
API_RATE_LIMITING_LIMIT: number = 500; API_RATE_LIMITING_LIMIT = 500;
CACHE_STORAGE_TYPE: string = 'memory'; CACHE_STORAGE_TYPE = 'memory';
@CastToPositiveNumber() @CastToPositiveNumber()
CACHE_STORAGE_TTL: number = 3600 * 24 * 7; CACHE_STORAGE_TTL: number = 3600 * 24 * 7;
@CastToBoolean() @CastToBoolean()
CALENDAR_PROVIDER_GOOGLE_ENABLED: boolean = false; CALENDAR_PROVIDER_GOOGLE_ENABLED = false;
AUTH_GOOGLE_APIS_CALLBACK_URL: string; AUTH_GOOGLE_APIS_CALLBACK_URL: string;

View File

@ -33,19 +33,20 @@ export class MessageQueueModule {
const config = await options.useFactory(...args); const config = await options.useFactory(...args);
switch (config.type) { switch (config.type) {
case MessageQueueDriverType.PgBoss: case MessageQueueDriverType.PgBoss: {
const boss = new PgBossDriver(config.options); const boss = new PgBossDriver(config.options);
await boss.init(); await boss.init();
return boss; return boss;
}
case MessageQueueDriverType.BullMQ: case MessageQueueDriverType.BullMQ: {
return new BullMQDriver(config.options); return new BullMQDriver(config.options);
}
default: default: {
return new SyncDriver(JobsModule.moduleRef); return new SyncDriver(JobsModule.moduleRef);
} }
}
}, },
inject: options.inject || [], inject: options.inject || [],
}, },

View File

@ -52,6 +52,7 @@ export class BeforeUpdateOneObject<T extends UpdateObjectInput>
if (!objectMetadata.isCustom) { if (!objectMetadata.isCustom) {
if ( if (
Object.keys(instance.update).length === 1 && Object.keys(instance.update).length === 1 &&
// eslint-disable-next-line no-prototype-builtins
instance.update.hasOwnProperty('isActive') && instance.update.hasOwnProperty('isActive') &&
instance.update.isActive !== undefined instance.update.isActive !== undefined
) { ) {

View File

@ -40,12 +40,12 @@ import { DeleteOneObjectInput } from 'src/engine/metadata-modules/object-metadat
import { RelationToDelete } from 'src/engine/metadata-modules/relation-metadata/types/relation-to-delete'; import { RelationToDelete } from 'src/engine/metadata-modules/relation-metadata/types/relation-to-delete';
import { generateMigrationName } from 'src/engine/metadata-modules/workspace-migration/utils/generate-migration-name.util'; import { generateMigrationName } from 'src/engine/metadata-modules/workspace-migration/utils/generate-migration-name.util';
import { import {
activityTargetStandardFieldIds, ACTIVITY_TARGET_STANDARD_FIELD_IDS,
attachmentStandardFieldIds, ATTACHMENT_STANDARD_FIELD_IDS,
baseObjectStandardFieldIds, BASE_OBJECT_STANDARD_FIELD_IDS,
customObjectStandardFieldIds, CUSTOM_OBJECT_STANDARD_FIELD_IDS,
favoriteStandardFieldIds, FAVORITE_STANDARD_FIELD_IDS,
timelineActivityStandardFieldIds, TIMELINE_ACTIVITY_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { import {
createForeignKeyDeterministicUuid, createForeignKeyDeterministicUuid,
@ -262,7 +262,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
// created with default values which is not supported yet by workspace migrations. // created with default values which is not supported yet by workspace migrations.
[ [
{ {
standardId: baseObjectStandardFieldIds.id, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.id,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
name: 'id', name: 'id',
label: 'Id', label: 'Id',
@ -276,7 +276,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'uuid', defaultValue: 'uuid',
}, },
{ {
standardId: customObjectStandardFieldIds.name, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
name: 'name', name: 'name',
label: 'Name', label: 'Name',
@ -289,7 +289,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: "'Untitled'", defaultValue: "'Untitled'",
}, },
{ {
standardId: baseObjectStandardFieldIds.createdAt, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.createdAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
name: 'createdAt', name: 'createdAt',
label: 'Creation date', label: 'Creation date',
@ -302,7 +302,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'now', defaultValue: 'now',
}, },
{ {
standardId: baseObjectStandardFieldIds.updatedAt, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
name: 'updatedAt', name: 'updatedAt',
label: 'Update date', label: 'Update date',
@ -316,7 +316,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'now', defaultValue: 'now',
}, },
{ {
standardId: customObjectStandardFieldIds.position, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
name: 'position', name: 'position',
label: 'Position', label: 'Position',
@ -464,7 +464,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
createdObjectMetadata: ObjectMetadataEntity, createdObjectMetadata: ObjectMetadataEntity,
lastDataSourceMetadata: DataSourceEntity, lastDataSourceMetadata: DataSourceEntity,
workspaceDataSource: DataSource | undefined, workspaceDataSource: DataSource | undefined,
isRemoteObject: boolean = false, isRemoteObject = false,
) { ) {
const isRelationEnabledForRemoteObjects = const isRelationEnabledForRemoteObjects =
await this.isRelationEnabledForRemoteObjects( await this.isRelationEnabledForRemoteObjects(
@ -535,7 +535,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([ await this.fieldMetadataRepository.save([
// FROM // FROM
{ {
standardId: customObjectStandardFieldIds.activityTargets, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.activityTargets,
objectMetadataId: createdObjectMetadata.id, objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
isCustom: false, isCustom: false,
@ -551,7 +551,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createRelationDeterministicUuid({ standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: activityTargetStandardFieldIds.custom, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: activityTargetObjectMetadata.id, objectMetadataId: activityTargetObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -568,7 +568,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createForeignKeyDeterministicUuid({ standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: activityTargetStandardFieldIds.custom, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: activityTargetObjectMetadata.id, objectMetadataId: activityTargetObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -630,7 +630,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([ await this.fieldMetadataRepository.save([
// FROM // FROM
{ {
standardId: customObjectStandardFieldIds.attachments, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.attachments,
objectMetadataId: createdObjectMetadata.id, objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
isCustom: false, isCustom: false,
@ -646,7 +646,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createRelationDeterministicUuid({ standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: attachmentStandardFieldIds.custom, standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: attachmentObjectMetadata.id, objectMetadataId: attachmentObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -663,7 +663,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createForeignKeyDeterministicUuid({ standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: attachmentStandardFieldIds.custom, standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: attachmentObjectMetadata.id, objectMetadataId: attachmentObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -723,7 +723,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([ await this.fieldMetadataRepository.save([
// FROM // FROM
{ {
standardId: customObjectStandardFieldIds.timelineActivities, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.timelineActivities,
objectMetadataId: createdObjectMetadata.id, objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
isCustom: false, isCustom: false,
@ -739,7 +739,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createRelationDeterministicUuid({ standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: timelineActivityStandardFieldIds.custom, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: timelineActivityObjectMetadata.id, objectMetadataId: timelineActivityObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -756,7 +756,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createForeignKeyDeterministicUuid({ standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: timelineActivityStandardFieldIds.custom, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: timelineActivityObjectMetadata.id, objectMetadataId: timelineActivityObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -818,7 +818,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([ await this.fieldMetadataRepository.save([
// FROM // FROM
{ {
standardId: customObjectStandardFieldIds.favorites, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.favorites,
objectMetadataId: createdObjectMetadata.id, objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
isCustom: false, isCustom: false,
@ -835,7 +835,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createRelationDeterministicUuid({ standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: favoriteStandardFieldIds.custom, standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: favoriteObjectMetadata.id, objectMetadataId: favoriteObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,
@ -852,7 +852,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{ {
standardId: createForeignKeyDeterministicUuid({ standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id, objectId: createdObjectMetadata.id,
standardId: favoriteStandardFieldIds.custom, standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
}), }),
objectMetadataId: favoriteObjectMetadata.id, objectMetadataId: favoriteObjectMetadata.id,
workspaceId: workspaceId, workspaceId: workspaceId,

View File

@ -1,9 +1,9 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { import {
baseObjectStandardFieldIds, BASE_OBJECT_STANDARD_FIELD_IDS,
companyStandardFieldIds, COMPANY_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
export const viewCompanyFields = ( export const viewCompanyFields = (
viewId: string, viewId: string,
@ -12,8 +12,8 @@ export const viewCompanyFields = (
return [ return [
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.name COMPANY_STANDARD_FIELD_IDS.name
], ],
viewId: viewId, viewId: viewId,
position: 0, position: 0,
@ -22,8 +22,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.domainName COMPANY_STANDARD_FIELD_IDS.domainName
], ],
viewId: viewId, viewId: viewId,
position: 1, position: 1,
@ -32,8 +32,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.accountOwner COMPANY_STANDARD_FIELD_IDS.accountOwner
], ],
viewId: viewId, viewId: viewId,
position: 2, position: 2,
@ -42,8 +42,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
baseObjectStandardFieldIds.createdAt BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
], ],
viewId: viewId, viewId: viewId,
position: 3, position: 3,
@ -52,8 +52,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.employees COMPANY_STANDARD_FIELD_IDS.employees
], ],
viewId: viewId, viewId: viewId,
position: 4, position: 4,
@ -62,8 +62,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.linkedinLink COMPANY_STANDARD_FIELD_IDS.linkedinLink
], ],
viewId: viewId, viewId: viewId,
position: 5, position: 5,
@ -72,8 +72,8 @@ export const viewCompanyFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.company].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.company].fields[
companyStandardFieldIds.address COMPANY_STANDARD_FIELD_IDS.address
], ],
viewId: viewId, viewId: viewId,
position: 6, position: 6,

View File

@ -1,6 +1,6 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { opportunityStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { OPPORTUNITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
export const viewOpportunityFields = ( export const viewOpportunityFields = (
viewId: string, viewId: string,
@ -9,8 +9,8 @@ export const viewOpportunityFields = (
return [ return [
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.name OPPORTUNITY_STANDARD_FIELD_IDS.name
], ],
viewId: viewId, viewId: viewId,
position: 0, position: 0,
@ -19,8 +19,8 @@ export const viewOpportunityFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.amount OPPORTUNITY_STANDARD_FIELD_IDS.amount
], ],
viewId: viewId, viewId: viewId,
position: 1, position: 1,
@ -29,8 +29,8 @@ export const viewOpportunityFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.closeDate OPPORTUNITY_STANDARD_FIELD_IDS.closeDate
], ],
viewId: viewId, viewId: viewId,
position: 2, position: 2,
@ -39,8 +39,8 @@ export const viewOpportunityFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.probability OPPORTUNITY_STANDARD_FIELD_IDS.probability
], ],
viewId: viewId, viewId: viewId,
position: 3, position: 3,
@ -49,8 +49,8 @@ export const viewOpportunityFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.pointOfContact OPPORTUNITY_STANDARD_FIELD_IDS.pointOfContact
], ],
viewId: viewId, viewId: viewId,
position: 4, position: 4,

View File

@ -1,9 +1,9 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity'; import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import { import {
baseObjectStandardFieldIds, BASE_OBJECT_STANDARD_FIELD_IDS,
personStandardFieldIds, PERSON_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
export const viewPersonFields = ( export const viewPersonFields = (
viewId: string, viewId: string,
@ -12,8 +12,8 @@ export const viewPersonFields = (
return [ return [
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.name PERSON_STANDARD_FIELD_IDS.name
], ],
viewId: viewId, viewId: viewId,
position: 0, position: 0,
@ -22,8 +22,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.email PERSON_STANDARD_FIELD_IDS.email
], ],
viewId: viewId, viewId: viewId,
position: 1, position: 1,
@ -32,8 +32,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.company PERSON_STANDARD_FIELD_IDS.company
], ],
viewId: viewId, viewId: viewId,
position: 2, position: 2,
@ -42,8 +42,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.phone PERSON_STANDARD_FIELD_IDS.phone
], ],
viewId: viewId, viewId: viewId,
position: 3, position: 3,
@ -52,8 +52,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
baseObjectStandardFieldIds.createdAt BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
], ],
viewId: viewId, viewId: viewId,
position: 4, position: 4,
@ -62,8 +62,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.city PERSON_STANDARD_FIELD_IDS.city
], ],
viewId: viewId, viewId: viewId,
position: 5, position: 5,
@ -72,8 +72,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.jobTitle PERSON_STANDARD_FIELD_IDS.jobTitle
], ],
viewId: viewId, viewId: viewId,
position: 6, position: 6,
@ -82,8 +82,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.linkedinLink PERSON_STANDARD_FIELD_IDS.linkedinLink
], ],
viewId: viewId, viewId: viewId,
position: 7, position: 7,
@ -92,8 +92,8 @@ export const viewPersonFields = (
}, },
{ {
fieldMetadataId: fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
personStandardFieldIds.xLink PERSON_STANDARD_FIELD_IDS.xLink
], ],
viewId: viewId, viewId: viewId,
position: 8, position: 8,

View File

@ -4,8 +4,8 @@ import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadat
import { viewCompanyFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-company-fields'; import { viewCompanyFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-company-fields';
import { viewPersonFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-person-fields'; import { viewPersonFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-person-fields';
import { viewOpportunityFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-opportunity-fields'; import { viewOpportunityFields } from 'src/engine/workspace-manager/standard-objects-prefill-data/view-opportunity-fields';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { opportunityStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { OPPORTUNITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
export const viewPrefillData = async ( export const viewPrefillData = async (
entityManager: EntityManager, entityManager: EntityManager,
@ -27,7 +27,7 @@ export const viewPrefillData = async (
.values([ .values([
{ {
name: 'All Companies', name: 'All Companies',
objectMetadataId: objectMetadataMap[standardObjectIds.company].id, objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.company].id,
type: 'table', type: 'table',
key: 'INDEX', key: 'INDEX',
position: 0, position: 0,
@ -36,7 +36,7 @@ export const viewPrefillData = async (
}, },
{ {
name: 'All People', name: 'All People',
objectMetadataId: objectMetadataMap[standardObjectIds.person].id, objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.person].id,
type: 'table', type: 'table',
key: 'INDEX', key: 'INDEX',
position: 0, position: 0,
@ -45,7 +45,7 @@ export const viewPrefillData = async (
}, },
{ {
name: 'All Opportunities', name: 'All Opportunities',
objectMetadataId: objectMetadataMap[standardObjectIds.opportunity].id, objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].id,
type: 'table', type: 'table',
key: 'INDEX', key: 'INDEX',
position: 0, position: 0,
@ -54,14 +54,14 @@ export const viewPrefillData = async (
}, },
{ {
name: 'By Stage', name: 'By Stage',
objectMetadataId: objectMetadataMap[standardObjectIds.opportunity].id, objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].id,
type: 'kanban', type: 'kanban',
key: null, key: null,
position: 1, position: 1,
icon: 'IconLayoutKanban', icon: 'IconLayoutKanban',
kanbanFieldMetadataId: kanbanFieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[ objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
opportunityStandardFieldIds.stage OPPORTUNITY_STANDARD_FIELD_IDS.stage
], ],
}, },
]) ])

View File

@ -73,7 +73,7 @@ export class CleanInactiveWorkspaceJob
await workspaceDataSource?.query( await workspaceDataSource?.query(
`SELECT MAX("updatedAt") FROM ${dataSource.schema}."${tableName}"`, `SELECT MAX("updatedAt") FROM ${dataSource.schema}."${tableName}"`,
) )
)[0].max; )?.[0]?.max;
if (mostRecentTableUpdatedAt) { if (mostRecentTableUpdatedAt) {
const mostRecentTableUpdatedAtDate = new Date(mostRecentTableUpdatedAt); const mostRecentTableUpdatedAtDate = new Date(mostRecentTableUpdatedAt);

View File

@ -54,13 +54,14 @@ export class WorkspaceRelationComparator {
for (const difference of relationMetadataDifference) { for (const difference of relationMetadataDifference) {
switch (difference.type) { switch (difference.type) {
case 'CREATE': case 'CREATE': {
results.push({ results.push({
action: ComparatorAction.CREATE, action: ComparatorAction.CREATE,
object: difference.value, object: difference.value,
}); });
break; break;
case 'REMOVE': }
case 'REMOVE': {
if (difference.path[difference.path.length - 1] !== 'id') { if (difference.path[difference.path.length - 1] !== 'id') {
results.push({ results.push({
action: ComparatorAction.DELETE, action: ComparatorAction.DELETE,
@ -68,7 +69,8 @@ export class WorkspaceRelationComparator {
}); });
} }
break; break;
case 'CHANGE': }
case 'CHANGE': {
const fieldName = difference.path[0]; const fieldName = difference.path[0];
const property = difference.path[difference.path.length - 1]; const property = difference.path[difference.path.length - 1];
@ -103,6 +105,7 @@ export class WorkspaceRelationComparator {
break; break;
} }
} }
}
return results; return results;
} }

View File

@ -5,7 +5,7 @@
* For readability keys can be edited but the values should not be changed. * For readability keys can be edited but the values should not be changed.
*/ */
export const activityTargetStandardFieldIds = { export const ACTIVITY_TARGET_STANDARD_FIELD_IDS = {
activity: '20202020-ca58-478c-a4f5-ae825671c30e', activity: '20202020-ca58-478c-a4f5-ae825671c30e',
person: '20202020-4afd-4ae7-99c2-de57d795a93f', person: '20202020-4afd-4ae7-99c2-de57d795a93f',
company: '20202020-7cc0-44a1-8068-f11171fdd02e', company: '20202020-7cc0-44a1-8068-f11171fdd02e',
@ -13,7 +13,7 @@ export const activityTargetStandardFieldIds = {
custom: '20202020-7f21-442f-94be-32462281b1ca', custom: '20202020-7f21-442f-94be-32462281b1ca',
}; };
export const activityStandardFieldIds = { export const ACTIVITY_STANDARD_FIELD_IDS = {
title: '20202020-24a1-4d94-a071-617f3eeed7b0', title: '20202020-24a1-4d94-a071-617f3eeed7b0',
body: '20202020-209b-440a-b2a8-043fa36a7d37', body: '20202020-209b-440a-b2a8-043fa36a7d37',
type: '20202020-0f2b-4aab-8827-ee5d3f07d993', type: '20202020-0f2b-4aab-8827-ee5d3f07d993',
@ -27,13 +27,13 @@ export const activityStandardFieldIds = {
assignee: '20202020-4259-48e4-9e77-6b92991906d5', assignee: '20202020-4259-48e4-9e77-6b92991906d5',
}; };
export const apiKeyStandardFieldIds = { export const API_KEY_STANDARD_FIELD_IDS = {
name: '20202020-72e6-4079-815b-436ce8a62f23', name: '20202020-72e6-4079-815b-436ce8a62f23',
expiresAt: '20202020-659b-4241-af59-66515b8e7d40', expiresAt: '20202020-659b-4241-af59-66515b8e7d40',
revokedAt: '20202020-06ab-44b5-8faf-f6e407685001', revokedAt: '20202020-06ab-44b5-8faf-f6e407685001',
}; };
export const attachmentStandardFieldIds = { export const ATTACHMENT_STANDARD_FIELD_IDS = {
name: '20202020-87a5-48f8-bbf7-ade388825a57', name: '20202020-87a5-48f8-bbf7-ade388825a57',
fullPath: '20202020-0d19-453d-8e8d-fbcda8ca3747', fullPath: '20202020-0d19-453d-8e8d-fbcda8ca3747',
type: '20202020-a417-49b8-a40b-f6a7874caa0d', type: '20202020-a417-49b8-a40b-f6a7874caa0d',
@ -45,24 +45,24 @@ export const attachmentStandardFieldIds = {
custom: '20202020-302d-43b3-9aea-aa4f89282a9f', custom: '20202020-302d-43b3-9aea-aa4f89282a9f',
}; };
export const baseObjectStandardFieldIds = { export const BASE_OBJECT_STANDARD_FIELD_IDS = {
id: '20202020-eda0-4cee-9577-3eb357e3c22b', id: '20202020-eda0-4cee-9577-3eb357e3c22b',
createdAt: '20202020-66ac-4502-9975-e4d959c50311', createdAt: '20202020-66ac-4502-9975-e4d959c50311',
updatedAt: '20202020-d767-4622-bdcf-d8a084834d86', updatedAt: '20202020-d767-4622-bdcf-d8a084834d86',
}; };
export const blocklistStandardFieldIds = { export const BLOCKLIST_STANDARD_FIELD_IDS = {
handle: '20202020-eef3-44ed-aa32-4641d7fd4a3e', handle: '20202020-eef3-44ed-aa32-4641d7fd4a3e',
workspaceMember: '20202020-548d-4084-a947-fa20a39f7c06', workspaceMember: '20202020-548d-4084-a947-fa20a39f7c06',
}; };
export const calendarChannelEventAssociationStandardFieldIds = { export const CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS = {
calendarChannel: '20202020-93ee-4da4-8d58-0282c4a9cb7d', calendarChannel: '20202020-93ee-4da4-8d58-0282c4a9cb7d',
calendarEvent: '20202020-5aa5-437e-bb86-f42d457783e3', calendarEvent: '20202020-5aa5-437e-bb86-f42d457783e3',
eventExternalId: '20202020-9ec8-48bb-b279-21d0734a75a1', eventExternalId: '20202020-9ec8-48bb-b279-21d0734a75a1',
}; };
export const calendarChannelStandardFieldIds = { export const CALENDAR_CHANNEL_STANDARD_FIELD_IDS = {
connectedAccount: '20202020-95b1-4f44-82dc-61b042ae2414', connectedAccount: '20202020-95b1-4f44-82dc-61b042ae2414',
handle: '20202020-1d08-420a-9aa7-22e0f298232d', handle: '20202020-1d08-420a-9aa7-22e0f298232d',
visibility: '20202020-1b07-4796-9f01-d626bab7ca4d', visibility: '20202020-1b07-4796-9f01-d626bab7ca4d',
@ -72,7 +72,7 @@ export const calendarChannelStandardFieldIds = {
calendarChannelEventAssociations: '20202020-afb0-4a9f-979f-2d5087d71d09', calendarChannelEventAssociations: '20202020-afb0-4a9f-979f-2d5087d71d09',
}; };
export const calendarEventParticipantStandardFieldIds = { export const CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS = {
calendarEvent: '20202020-fe3a-401c-b889-af4f4657a861', calendarEvent: '20202020-fe3a-401c-b889-af4f4657a861',
handle: '20202020-8692-4580-8210-9e09cbd031a7', handle: '20202020-8692-4580-8210-9e09cbd031a7',
displayName: '20202020-ee1e-4f9f-8ac1-5c0b2f69691e', displayName: '20202020-ee1e-4f9f-8ac1-5c0b2f69691e',
@ -82,7 +82,7 @@ export const calendarEventParticipantStandardFieldIds = {
workspaceMember: '20202020-20e4-4591-93ed-aeb17a4dcbd2', workspaceMember: '20202020-20e4-4591-93ed-aeb17a4dcbd2',
}; };
export const calendarEventStandardFieldIds = { export const CALENDAR_EVENT_STANDARD_FIELD_IDS = {
title: '20202020-080e-49d1-b21d-9702a7e2525c', title: '20202020-080e-49d1-b21d-9702a7e2525c',
isCanceled: '20202020-335b-4e04-b470-43b84b64863c', isCanceled: '20202020-335b-4e04-b470-43b84b64863c',
isFullDay: '20202020-551c-402c-bb6d-dfe9efe86bcb', isFullDay: '20202020-551c-402c-bb6d-dfe9efe86bcb',
@ -100,13 +100,13 @@ export const calendarEventStandardFieldIds = {
calendarEventParticipants: '20202020-e07e-4ccb-88f5-6f3d00458eec', calendarEventParticipants: '20202020-e07e-4ccb-88f5-6f3d00458eec',
}; };
export const commentStandardFieldIds = { export const COMMENT_STANDARD_FIELD_IDS = {
body: '20202020-d5eb-49d2-b3e0-1ed04145ebb7', body: '20202020-d5eb-49d2-b3e0-1ed04145ebb7',
author: '20202020-2ab1-427e-a981-cf089de3a9bd', author: '20202020-2ab1-427e-a981-cf089de3a9bd',
activity: '20202020-c8d9-4c30-a35e-dc7f44388070', activity: '20202020-c8d9-4c30-a35e-dc7f44388070',
}; };
export const companyStandardFieldIds = { export const COMPANY_STANDARD_FIELD_IDS = {
name: '20202020-4d99-4e2e-a84c-4a27837b1ece', name: '20202020-4d99-4e2e-a84c-4a27837b1ece',
domainName: '20202020-0c28-43d8-8ba5-3659924d3489', domainName: '20202020-0c28-43d8-8ba5-3659924d3489',
address: '20202020-a82a-4ee2-96cc-a18a3259d953', address: '20202020-a82a-4ee2-96cc-a18a3259d953',
@ -125,7 +125,7 @@ export const companyStandardFieldIds = {
timelineActivities: '20202020-0414-4daf-9c0d-64fe7b27f89f', timelineActivities: '20202020-0414-4daf-9c0d-64fe7b27f89f',
}; };
export const connectedAccountStandardFieldIds = { export const CONNECTED_ACCOUNT_STANDARD_FIELD_IDS = {
handle: '20202020-c804-4a50-bb05-b3a9e24f1dec', handle: '20202020-c804-4a50-bb05-b3a9e24f1dec',
provider: '20202020-ebb0-4516-befc-a9e95935efd5', provider: '20202020-ebb0-4516-befc-a9e95935efd5',
accessToken: '20202020-707b-4a0a-8753-2ad42efe1e29', accessToken: '20202020-707b-4a0a-8753-2ad42efe1e29',
@ -137,7 +137,7 @@ export const connectedAccountStandardFieldIds = {
calendarChannels: '20202020-af4a-47bb-99ec-51911c1d3977', calendarChannels: '20202020-af4a-47bb-99ec-51911c1d3977',
}; };
export const eventStandardFieldIds = { export const EVENT_STANDARD_FIELD_IDS = {
properties: '20202020-f142-4b04-b91b-6a2b4af3bf10', properties: '20202020-f142-4b04-b91b-6a2b4af3bf10',
workspaceMember: '20202020-af23-4479-9a30-868edc474b35', workspaceMember: '20202020-af23-4479-9a30-868edc474b35',
person: '20202020-c414-45b9-a60a-ac27aa96229e', person: '20202020-c414-45b9-a60a-ac27aa96229e',
@ -146,7 +146,7 @@ export const eventStandardFieldIds = {
custom: '20202020-4a71-41b0-9f83-9cdcca3f8b14', custom: '20202020-4a71-41b0-9f83-9cdcca3f8b14',
}; };
export const auditLogStandardFieldIds = { export const AUDIT_LOGS_STANDARD_FIELD_IDS = {
name: '20202020-2462-4b9d-b5d9-745febb3b095', name: '20202020-2462-4b9d-b5d9-745febb3b095',
properties: '20202020-5d36-470e-8fad-d56ea3ab2fd0', properties: '20202020-5d36-470e-8fad-d56ea3ab2fd0',
context: '20202020-b9d1-4058-9a75-7469cab5ca8c', context: '20202020-b9d1-4058-9a75-7469cab5ca8c',
@ -155,7 +155,7 @@ export const auditLogStandardFieldIds = {
workspaceMember: '20202020-6e96-4300-b3f5-67a707147385', workspaceMember: '20202020-6e96-4300-b3f5-67a707147385',
}; };
export const behavioralEventStandardFieldIds = { export const BEHAVIORAL_EVENT_STANDARD_FIELD_IDS = {
name: '20202020-2462-4b9d-b5d9-745febb3b095', name: '20202020-2462-4b9d-b5d9-745febb3b095',
properties: '20202020-5d36-470e-8fad-d56ea3ab2fd0', properties: '20202020-5d36-470e-8fad-d56ea3ab2fd0',
context: '20202020-bd62-4b5b-8385-6caeed8f8078', context: '20202020-bd62-4b5b-8385-6caeed8f8078',
@ -163,7 +163,7 @@ export const behavioralEventStandardFieldIds = {
recordId: '20202020-6d8b-4ca5-9869-f882cb335673', recordId: '20202020-6d8b-4ca5-9869-f882cb335673',
}; };
export const timelineActivityStandardFieldIds = { export const TIMELINE_ACTIVITY_STANDARD_FIELD_IDS = {
happensAt: '20202020-9526-4993-b339-c4318c4d39f0', happensAt: '20202020-9526-4993-b339-c4318c4d39f0',
type: '20202020-5e7b-4ccd-8b8a-86b94b474134', type: '20202020-5e7b-4ccd-8b8a-86b94b474134',
name: '20202020-7207-46e8-9dab-849505ae8497', name: '20202020-7207-46e8-9dab-849505ae8497',
@ -178,7 +178,7 @@ export const timelineActivityStandardFieldIds = {
linkedObjectMetadataId: '20202020-c595-449d-9f89-562758c9ee69', linkedObjectMetadataId: '20202020-c595-449d-9f89-562758c9ee69',
}; };
export const favoriteStandardFieldIds = { export const FAVORITE_STANDARD_FIELD_IDS = {
position: '20202020-dd26-42c6-8c3c-2a7598c204f6', position: '20202020-dd26-42c6-8c3c-2a7598c204f6',
workspaceMember: '20202020-ce63-49cb-9676-fdc0c45892cd', workspaceMember: '20202020-ce63-49cb-9676-fdc0c45892cd',
person: '20202020-c428-4f40-b6f3-86091511c41c', person: '20202020-c428-4f40-b6f3-86091511c41c',
@ -187,7 +187,7 @@ export const favoriteStandardFieldIds = {
custom: '20202020-855a-4bc8-9861-79deef37011f', custom: '20202020-855a-4bc8-9861-79deef37011f',
}; };
export const messageChannelMessageAssociationStandardFieldIds = { export const MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS = {
messageChannel: '20202020-b658-408f-bd46-3bd2d15d7e52', messageChannel: '20202020-b658-408f-bd46-3bd2d15d7e52',
message: '20202020-da5d-4ac5-8743-342ab0a0336b', message: '20202020-da5d-4ac5-8743-342ab0a0336b',
messageExternalId: '20202020-37d6-438f-b6fd-6503596c8f34', messageExternalId: '20202020-37d6-438f-b6fd-6503596c8f34',
@ -195,7 +195,7 @@ export const messageChannelMessageAssociationStandardFieldIds = {
messageThreadExternalId: '20202020-35fb-421e-afa0-0b8e8f7f9018', messageThreadExternalId: '20202020-35fb-421e-afa0-0b8e8f7f9018',
}; };
export const messageChannelStandardFieldIds = { export const MESSAGE_CHANNEL_STANDARD_FIELD_IDS = {
visibility: '20202020-6a6b-4532-9767-cbc61b469453', visibility: '20202020-6a6b-4532-9767-cbc61b469453',
handle: '20202020-2c96-43c3-93e3-ed6b1acb69bc', handle: '20202020-2c96-43c3-93e3-ed6b1acb69bc',
connectedAccount: '20202020-49a2-44a4-b470-282c0440d15d', connectedAccount: '20202020-49a2-44a4-b470-282c0440d15d',
@ -209,7 +209,7 @@ export const messageChannelStandardFieldIds = {
ongoingSyncStartedAt: '20202020-8c61-4a42-ae63-73c1c3c52e06', ongoingSyncStartedAt: '20202020-8c61-4a42-ae63-73c1c3c52e06',
}; };
export const messageParticipantStandardFieldIds = { export const MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS = {
message: '20202020-985b-429a-9db9-9e55f4898a2a', message: '20202020-985b-429a-9db9-9e55f4898a2a',
role: '20202020-65d1-42f4-8729-c9ec1f52aecd', role: '20202020-65d1-42f4-8729-c9ec1f52aecd',
handle: '20202020-2456-464e-b422-b965a4db4a0b', handle: '20202020-2456-464e-b422-b965a4db4a0b',
@ -218,12 +218,12 @@ export const messageParticipantStandardFieldIds = {
workspaceMember: '20202020-77a7-4845-99ed-1bcbb478be6f', workspaceMember: '20202020-77a7-4845-99ed-1bcbb478be6f',
}; };
export const messageThreadStandardFieldIds = { export const MESSAGE_THREAD_STANDARD_FIELD_IDS = {
messages: '20202020-3115-404f-aade-e1154b28e35a', messages: '20202020-3115-404f-aade-e1154b28e35a',
messageChannelMessageAssociations: '20202020-314e-40a4-906d-a5d5d6c285f6', messageChannelMessageAssociations: '20202020-314e-40a4-906d-a5d5d6c285f6',
}; };
export const messageStandardFieldIds = { export const MESSAGE_STANDARD_FIELD_IDS = {
headerMessageId: '20202020-72b5-416d-aed8-b55609067d01', headerMessageId: '20202020-72b5-416d-aed8-b55609067d01',
messageThread: '20202020-30f2-4ccd-9f5c-e41bb9d26214', messageThread: '20202020-30f2-4ccd-9f5c-e41bb9d26214',
direction: '20202020-0203-4118-8e2a-05b9bdae6dab', direction: '20202020-0203-4118-8e2a-05b9bdae6dab',
@ -234,7 +234,7 @@ export const messageStandardFieldIds = {
messageChannelMessageAssociations: '20202020-3cef-43a3-82c6-50e7cfbc9ae4', messageChannelMessageAssociations: '20202020-3cef-43a3-82c6-50e7cfbc9ae4',
}; };
export const opportunityStandardFieldIds = { export const OPPORTUNITY_STANDARD_FIELD_IDS = {
name: '20202020-8609-4f65-a2d9-44009eb422b5', name: '20202020-8609-4f65-a2d9-44009eb422b5',
amount: '20202020-583e-4642-8533-db761d5fa82f', amount: '20202020-583e-4642-8533-db761d5fa82f',
closeDate: '20202020-527e-44d6-b1ac-c4158d307b97', closeDate: '20202020-527e-44d6-b1ac-c4158d307b97',
@ -249,7 +249,7 @@ export const opportunityStandardFieldIds = {
timelineActivities: '20202020-30e2-421f-96c7-19c69d1cf631', timelineActivities: '20202020-30e2-421f-96c7-19c69d1cf631',
}; };
export const personStandardFieldIds = { export const PERSON_STANDARD_FIELD_IDS = {
name: '20202020-3875-44d5-8c33-a6239011cab8', name: '20202020-3875-44d5-8c33-a6239011cab8',
email: '20202020-a740-42bb-8849-8980fb3f12e1', email: '20202020-a740-42bb-8849-8980fb3f12e1',
linkedinLink: '20202020-f1af-48f7-893b-2007a73dd508', linkedinLink: '20202020-f1af-48f7-893b-2007a73dd508',
@ -269,7 +269,7 @@ export const personStandardFieldIds = {
timelineActivities: '20202020-a43e-4873-9c23-e522de906ce5', timelineActivities: '20202020-a43e-4873-9c23-e522de906ce5',
}; };
export const viewFieldStandardFieldIds = { export const VIEW_FIELD_STANDARD_FIELD_IDS = {
fieldMetadataId: '20202020-135f-4c5b-b361-15f24870473c', fieldMetadataId: '20202020-135f-4c5b-b361-15f24870473c',
isVisible: '20202020-e966-473c-9c18-f00d3347e0ba', isVisible: '20202020-e966-473c-9c18-f00d3347e0ba',
size: '20202020-6fab-4bd0-ae72-20f3ee39d581', size: '20202020-6fab-4bd0-ae72-20f3ee39d581',
@ -277,7 +277,7 @@ export const viewFieldStandardFieldIds = {
view: '20202020-e8da-4521-afab-d6d231f9fa18', view: '20202020-e8da-4521-afab-d6d231f9fa18',
}; };
export const viewFilterStandardFieldIds = { export const VIEW_FILTER_STANDARD_FIELD_IDS = {
fieldMetadataId: '20202020-c9aa-4c94-8d0e-9592f5008fb0', fieldMetadataId: '20202020-c9aa-4c94-8d0e-9592f5008fb0',
operand: '20202020-bd23-48c4-9fab-29d1ffb80310', operand: '20202020-bd23-48c4-9fab-29d1ffb80310',
value: '20202020-1e55-4a1e-a1d2-fefb86a5fce5', value: '20202020-1e55-4a1e-a1d2-fefb86a5fce5',
@ -285,13 +285,13 @@ export const viewFilterStandardFieldIds = {
view: '20202020-4f5b-487e-829c-3d881c163611', view: '20202020-4f5b-487e-829c-3d881c163611',
}; };
export const viewSortStandardFieldIds = { export const VIEW_SORT_STANDARD_FIELD_IDS = {
fieldMetadataId: '20202020-8240-4657-aee4-7f0df8e94eca', fieldMetadataId: '20202020-8240-4657-aee4-7f0df8e94eca',
direction: '20202020-b06e-4eb3-9b58-0a62e5d79836', direction: '20202020-b06e-4eb3-9b58-0a62e5d79836',
view: '20202020-bd6c-422b-9167-5c105f2d02c8', view: '20202020-bd6c-422b-9167-5c105f2d02c8',
}; };
export const viewStandardFieldIds = { export const VIEW_STANDARD_FIELD_IDS = {
name: '20202020-12c6-4f37-b588-c9b9bf57328d', name: '20202020-12c6-4f37-b588-c9b9bf57328d',
objectMetadataId: '20202020-d6de-4fd5-84dd-47f9e730368b', objectMetadataId: '20202020-d6de-4fd5-84dd-47f9e730368b',
type: '20202020-dd11-4607-9ec7-c57217262a7f', type: '20202020-dd11-4607-9ec7-c57217262a7f',
@ -305,12 +305,12 @@ export const viewStandardFieldIds = {
viewSorts: '20202020-891b-45c3-9fe1-80a75b4aa043', viewSorts: '20202020-891b-45c3-9fe1-80a75b4aa043',
}; };
export const webhookStandardFieldIds = { export const WEBHOOK_STANDARD_FIELD_IDS = {
targetUrl: '20202020-1229-45a8-8cf4-85c9172aae12', targetUrl: '20202020-1229-45a8-8cf4-85c9172aae12',
operation: '20202020-15b7-458e-bf30-74770a54410c', operation: '20202020-15b7-458e-bf30-74770a54410c',
}; };
export const workspaceMemberStandardFieldIds = { export const WORKSPACE_MEMBER_STANDARD_FIELD_IDS = {
name: '20202020-e914-43a6-9c26-3603c59065f4', name: '20202020-e914-43a6-9c26-3603c59065f4',
colorScheme: '20202020-66bc-47f2-adac-f2ef7c598b63', colorScheme: '20202020-66bc-47f2-adac-f2ef7c598b63',
locale: '20202020-402e-4695-b169-794fa015afbe', locale: '20202020-402e-4695-b169-794fa015afbe',
@ -331,7 +331,7 @@ export const workspaceMemberStandardFieldIds = {
auditLogs: '20202020-2f54-4739-a5e2-99563385e83d', auditLogs: '20202020-2f54-4739-a5e2-99563385e83d',
}; };
export const customObjectStandardFieldIds = { export const CUSTOM_OBJECT_STANDARD_FIELD_IDS = {
name: '20202020-ba07-4ffd-ba63-009491f5749c', name: '20202020-ba07-4ffd-ba63-009491f5749c',
position: '20202020-c2bd-4e16-bb9a-c8b0411bf49d', position: '20202020-c2bd-4e16-bb9a-c8b0411bf49d',
activityTargets: '20202020-7f42-40ae-b96c-c8a61acc83bf', activityTargets: '20202020-7f42-40ae-b96c-c8a61acc83bf',

View File

@ -5,7 +5,7 @@
* For readability keys can be edited but the values should not be changed. * For readability keys can be edited but the values should not be changed.
*/ */
export const standardObjectIds = { export const STANDARD_OBJECT_IDS = {
activityTarget: '20202020-2945-440e-8d1a-f84672d33d5e', activityTarget: '20202020-2945-440e-8d1a-f84672d33d5e',
activity: '20202020-39aa-4a89-843b-eb5f2a8b677f', activity: '20202020-39aa-4a89-843b-eb5f2a8b677f',
apiKey: '20202020-4c00-401d-8cda-ec6a4c41cd7d', apiKey: '20202020-4c00-401d-8cda-ec6a4c41cd7d',

View File

@ -12,13 +12,13 @@ import { ActivityTargetObjectMetadata } from 'src/modules/activity/standard-obje
import { RelationMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/relation-metadata.decorator'; import { RelationMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/relation-metadata.decorator';
import { FavoriteObjectMetadata } from 'src/modules/favorite/standard-objects/favorite.object-metadata'; import { FavoriteObjectMetadata } from 'src/modules/favorite/standard-objects/favorite.object-metadata';
import { AttachmentObjectMetadata } from 'src/modules/attachment/standard-objects/attachment.object-metadata'; import { AttachmentObjectMetadata } from 'src/modules/attachment/standard-objects/attachment.object-metadata';
import { customObjectStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CUSTOM_OBJECT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata'; import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata';
@BaseCustomObjectMetadata() @BaseCustomObjectMetadata()
export class CustomObjectMetadata extends BaseObjectMetadata { export class CustomObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.name, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.name,
label: 'Name', label: 'Name',
description: 'Name', description: 'Name',
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
@ -28,7 +28,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.position, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.position,
label: 'Position', label: 'Position',
description: 'Position', description: 'Position',
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
@ -39,7 +39,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata {
position: number; position: number;
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.activityTargets, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activities', label: 'Activities',
description: (objectMetadata) => description: (objectMetadata) =>
@ -55,7 +55,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata {
activityTargets: ActivityTargetObjectMetadata[]; activityTargets: ActivityTargetObjectMetadata[];
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.favorites, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Favorites', label: 'Favorites',
description: (objectMetadata) => description: (objectMetadata) =>
@ -72,7 +72,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata {
favorites: FavoriteObjectMetadata[]; favorites: FavoriteObjectMetadata[];
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.attachments, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Attachments', label: 'Attachments',
description: (objectMetadata) => description: (objectMetadata) =>
@ -88,7 +88,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata {
attachments: AttachmentObjectMetadata[]; attachments: AttachmentObjectMetadata[];
@FieldMetadata({ @FieldMetadata({
standardId: customObjectStandardFieldIds.timelineActivities, standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Timeline Activities', label: 'Timeline Activities',
description: (objectMetadata) => description: (objectMetadata) =>

View File

@ -35,7 +35,7 @@ export class StandardObjectFactory {
if (!objectMetadata) { if (!objectMetadata) {
throw new Error( throw new Error(
`Object metadata decorator not found, can\'t parse ${metadata.name}`, `Object metadata decorator not found, can't parse ${metadata.name}`,
); );
} }

View File

@ -83,7 +83,7 @@ export class StandardRelationFactory {
if (!objectMetadata) { if (!objectMetadata) {
throw new Error( throw new Error(
`Object metadata decorator not found, can\'t parse ${standardObjectMetadata.name}`, `Object metadata decorator not found, can't parse ${standardObjectMetadata.name}`,
); );
} }

View File

@ -1,11 +1,11 @@
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { baseObjectStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { BASE_OBJECT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
export abstract class BaseObjectMetadata { export abstract class BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: baseObjectStandardFieldIds.id, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.id,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Id', label: 'Id',
description: 'Id', description: 'Id',
@ -16,7 +16,7 @@ export abstract class BaseObjectMetadata {
id: string; id: string;
@FieldMetadata({ @FieldMetadata({
standardId: baseObjectStandardFieldIds.createdAt, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.createdAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Creation date', label: 'Creation date',
description: 'Creation date', description: 'Creation date',
@ -26,7 +26,7 @@ export abstract class BaseObjectMetadata {
createdAt: Date; createdAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: baseObjectStandardFieldIds.updatedAt, standardId: BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Update date', label: 'Update date',
description: 'Update date', description: 'Update date',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { activityTargetStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { ACTIVITY_TARGET_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata'; import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata';
import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface'; import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
@ -17,7 +17,7 @@ import { PersonObjectMetadata } from 'src/modules/person/standard-objects/person
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.activityTarget, standardId: STANDARD_OBJECT_IDS.activityTarget,
namePlural: 'activityTargets', namePlural: 'activityTargets',
labelSingular: 'Activity Target', labelSingular: 'Activity Target',
labelPlural: 'Activity Targets', labelPlural: 'Activity Targets',
@ -28,7 +28,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class ActivityTargetObjectMetadata extends BaseObjectMetadata { export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: activityTargetStandardFieldIds.activity, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activity', label: 'Activity',
description: 'ActivityTarget activity', description: 'ActivityTarget activity',
@ -39,7 +39,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
activity: Relation<ActivityObjectMetadata>; activity: Relation<ActivityObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: activityTargetStandardFieldIds.person, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'ActivityTarget person', description: 'ActivityTarget person',
@ -50,7 +50,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: activityTargetStandardFieldIds.company, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'ActivityTarget company', description: 'ActivityTarget company',
@ -61,7 +61,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: activityTargetStandardFieldIds.opportunity, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Opportunity', label: 'Opportunity',
description: 'ActivityTarget opportunity', description: 'ActivityTarget opportunity',
@ -72,7 +72,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>; opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({ @DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: activityTargetStandardFieldIds.custom, standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular, name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular, label: oppositeObjectMetadata.labelSingular,
description: `ActivityTarget ${oppositeObjectMetadata.labelSingular}`, description: `ActivityTarget ${oppositeObjectMetadata.labelSingular}`,

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { activityStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { ACTIVITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -20,7 +20,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.activity, standardId: STANDARD_OBJECT_IDS.activity,
namePlural: 'activities', namePlural: 'activities',
labelSingular: 'Activity', labelSingular: 'Activity',
labelPlural: 'Activities', labelPlural: 'Activities',
@ -31,7 +31,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class ActivityObjectMetadata extends BaseObjectMetadata { export class ActivityObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.title, standardId: ACTIVITY_STANDARD_FIELD_IDS.title,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Title', label: 'Title',
description: 'Activity title', description: 'Activity title',
@ -40,7 +40,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
title: string; title: string;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.body, standardId: ACTIVITY_STANDARD_FIELD_IDS.body,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Body', label: 'Body',
description: 'Activity body', description: 'Activity body',
@ -49,7 +49,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
body: string; body: string;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.type, standardId: ACTIVITY_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Type', label: 'Type',
description: 'Activity type', description: 'Activity type',
@ -59,7 +59,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
type: string; type: string;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.reminderAt, standardId: ACTIVITY_STANDARD_FIELD_IDS.reminderAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Reminder Date', label: 'Reminder Date',
description: 'Activity reminder date', description: 'Activity reminder date',
@ -69,7 +69,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
reminderAt: Date; reminderAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.dueAt, standardId: ACTIVITY_STANDARD_FIELD_IDS.dueAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Due Date', label: 'Due Date',
description: 'Activity due date', description: 'Activity due date',
@ -79,7 +79,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
dueAt: Date; dueAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.completedAt, standardId: ACTIVITY_STANDARD_FIELD_IDS.completedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Completion Date', label: 'Completion Date',
description: 'Activity completion date', description: 'Activity completion date',
@ -89,7 +89,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
completedAt: Date; completedAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.activityTargets, standardId: ACTIVITY_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Targets', label: 'Targets',
description: 'Activity targets', description: 'Activity targets',
@ -104,7 +104,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
activityTargets: Relation<ActivityTargetObjectMetadata[]>; activityTargets: Relation<ActivityTargetObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.attachments, standardId: ACTIVITY_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Attachments', label: 'Attachments',
description: 'Activity attachments', description: 'Activity attachments',
@ -119,7 +119,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
attachments: Relation<AttachmentObjectMetadata[]>; attachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.comments, standardId: ACTIVITY_STANDARD_FIELD_IDS.comments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Comments', label: 'Comments',
description: 'Activity comments', description: 'Activity comments',
@ -134,7 +134,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
comments: Relation<CommentObjectMetadata[]>; comments: Relation<CommentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.author, standardId: ACTIVITY_STANDARD_FIELD_IDS.author,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Author', label: 'Author',
description: 'Activity author', description: 'Activity author',
@ -145,7 +145,7 @@ export class ActivityObjectMetadata extends BaseObjectMetadata {
author: Relation<WorkspaceMemberObjectMetadata>; author: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: activityStandardFieldIds.assignee, standardId: ACTIVITY_STANDARD_FIELD_IDS.assignee,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Assignee', label: 'Assignee',
description: 'Activity assignee', description: 'Activity assignee',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { commentStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { COMMENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator'; import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator';
@ -12,7 +12,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.comment, standardId: STANDARD_OBJECT_IDS.comment,
namePlural: 'comments', namePlural: 'comments',
labelSingular: 'Comment', labelSingular: 'Comment',
labelPlural: 'Comments', labelPlural: 'Comments',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class CommentObjectMetadata extends BaseObjectMetadata { export class CommentObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: commentStandardFieldIds.body, standardId: COMMENT_STANDARD_FIELD_IDS.body,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Body', label: 'Body',
description: 'Comment body', description: 'Comment body',
@ -32,7 +32,7 @@ export class CommentObjectMetadata extends BaseObjectMetadata {
body: string; body: string;
@FieldMetadata({ @FieldMetadata({
standardId: commentStandardFieldIds.author, standardId: COMMENT_STANDARD_FIELD_IDS.author,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Author', label: 'Author',
description: 'Comment author', description: 'Comment author',
@ -42,7 +42,7 @@ export class CommentObjectMetadata extends BaseObjectMetadata {
author: Relation<WorkspaceMemberObjectMetadata>; author: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: commentStandardFieldIds.activity, standardId: COMMENT_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activity', label: 'Activity',
description: 'Comment activity', description: 'Comment activity',

View File

@ -1,6 +1,6 @@
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { apiKeyStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { API_KEY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -9,7 +9,7 @@ import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-meta
import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata'; import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.apiKey, standardId: STANDARD_OBJECT_IDS.apiKey,
namePlural: 'apiKeys', namePlural: 'apiKeys',
labelSingular: 'Api Key', labelSingular: 'Api Key',
labelPlural: 'Api Keys', labelPlural: 'Api Keys',
@ -20,7 +20,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
@IsNotAuditLogged() @IsNotAuditLogged()
export class ApiKeyObjectMetadata extends BaseObjectMetadata { export class ApiKeyObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: apiKeyStandardFieldIds.name, standardId: API_KEY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Name', label: 'Name',
description: 'ApiKey name', description: 'ApiKey name',
@ -29,7 +29,7 @@ export class ApiKeyObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: apiKeyStandardFieldIds.expiresAt, standardId: API_KEY_STANDARD_FIELD_IDS.expiresAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Expiration date', label: 'Expiration date',
description: 'ApiKey expiration date', description: 'ApiKey expiration date',
@ -38,7 +38,7 @@ export class ApiKeyObjectMetadata extends BaseObjectMetadata {
expiresAt: Date; expiresAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: apiKeyStandardFieldIds.revokedAt, standardId: API_KEY_STANDARD_FIELD_IDS.revokedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Revocation date', label: 'Revocation date',
description: 'ApiKey revocation date', description: 'ApiKey revocation date',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { attachmentStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { ATTACHMENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata'; import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata';
import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface'; import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
@ -18,7 +18,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.attachment, standardId: STANDARD_OBJECT_IDS.attachment,
namePlural: 'attachments', namePlural: 'attachments',
labelSingular: 'Attachment', labelSingular: 'Attachment',
labelPlural: 'Attachments', labelPlural: 'Attachments',
@ -29,7 +29,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class AttachmentObjectMetadata extends BaseObjectMetadata { export class AttachmentObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.name, standardId: ATTACHMENT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Name', label: 'Name',
description: 'Attachment name', description: 'Attachment name',
@ -38,7 +38,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.fullPath, standardId: ATTACHMENT_STANDARD_FIELD_IDS.fullPath,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Full path', label: 'Full path',
description: 'Attachment full path', description: 'Attachment full path',
@ -47,7 +47,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
fullPath: string; fullPath: string;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.type, standardId: ATTACHMENT_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Type', label: 'Type',
description: 'Attachment type', description: 'Attachment type',
@ -56,7 +56,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
type: string; type: string;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.author, standardId: ATTACHMENT_STANDARD_FIELD_IDS.author,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Author', label: 'Author',
description: 'Attachment author', description: 'Attachment author',
@ -66,7 +66,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
author: Relation<WorkspaceMemberObjectMetadata>; author: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.activity, standardId: ATTACHMENT_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activity', label: 'Activity',
description: 'Attachment activity', description: 'Attachment activity',
@ -77,7 +77,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
activity: Relation<ActivityObjectMetadata>; activity: Relation<ActivityObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.person, standardId: ATTACHMENT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'Attachment person', description: 'Attachment person',
@ -88,7 +88,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.company, standardId: ATTACHMENT_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'Attachment company', description: 'Attachment company',
@ -99,7 +99,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: attachmentStandardFieldIds.opportunity, standardId: ATTACHMENT_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Opportunity', label: 'Opportunity',
description: 'Attachment opportunity', description: 'Attachment opportunity',
@ -110,7 +110,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>; opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({ @DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: attachmentStandardFieldIds.custom, standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular, name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular, label: oppositeObjectMetadata.labelSingular,
description: `Attachment ${oppositeObjectMetadata.labelSingular}`, description: `Attachment ${oppositeObjectMetadata.labelSingular}`,

View File

@ -124,7 +124,9 @@ export class GoogleCalendarSyncService {
let nextPageToken: string | undefined; let nextPageToken: string | undefined;
const events: calendarV3.Schema$Event[] = []; const events: calendarV3.Schema$Event[] = [];
while (true) { let hasMoreEvents = true;
while (hasMoreEvents) {
const googleCalendarEvents = await googleCalendarClient.events.list({ const googleCalendarEvents = await googleCalendarClient.events.list({
calendarId: 'primary', calendarId: 'primary',
maxResults: 500, maxResults: 500,
@ -146,7 +148,7 @@ export class GoogleCalendarSyncService {
events.push(...items); events.push(...items);
if (!nextPageToken) { if (!nextPageToken) {
break; hasMoreEvents = false;
} }
} }

View File

@ -2,8 +2,8 @@ import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/i
import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { calendarChannelEventAssociationStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -13,7 +13,7 @@ import { CalendarEventObjectMetadata } from 'src/modules/calendar/standard-objec
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.calendarChannelEventAssociation, standardId: STANDARD_OBJECT_IDS.calendarChannelEventAssociation,
namePlural: 'calendarChannelEventAssociations', namePlural: 'calendarChannelEventAssociations',
labelSingular: 'Calendar Channel Event Association', labelSingular: 'Calendar Channel Event Association',
labelPlural: 'Calendar Channel Event Associations', labelPlural: 'Calendar Channel Event Associations',
@ -27,7 +27,8 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
}) })
export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMetadata { export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.calendarChannel, standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.calendarChannel,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Channel ID', label: 'Channel ID',
description: 'Channel ID', description: 'Channel ID',
@ -37,7 +38,8 @@ export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMet
calendarChannel: Relation<CalendarEventObjectMetadata>; calendarChannel: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.calendarEvent, standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.calendarEvent,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Event ID', label: 'Event ID',
description: 'Event ID', description: 'Event ID',
@ -47,7 +49,8 @@ export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMet
calendarEvent: Relation<CalendarEventObjectMetadata>; calendarEvent: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.eventExternalId, standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.eventExternalId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Event external ID', label: 'Event external ID',
description: 'Event external ID', description: 'Event external ID',

View File

@ -6,8 +6,8 @@ import {
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { calendarChannelStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CALENDAR_CHANNEL_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -24,7 +24,7 @@ export enum CalendarChannelVisibility {
} }
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.calendarChannel, standardId: STANDARD_OBJECT_IDS.calendarChannel,
namePlural: 'calendarChannels', namePlural: 'calendarChannels',
labelSingular: 'Calendar Channel', labelSingular: 'Calendar Channel',
labelPlural: 'Calendar Channels', labelPlural: 'Calendar Channels',
@ -38,7 +38,7 @@ export enum CalendarChannelVisibility {
}) })
export class CalendarChannelObjectMetadata extends BaseObjectMetadata { export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.connectedAccount, standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Connected Account', label: 'Connected Account',
description: 'Connected Account', description: 'Connected Account',
@ -48,7 +48,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
connectedAccount: Relation<ConnectedAccountObjectMetadata>; connectedAccount: Relation<ConnectedAccountObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.handle, standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Handle', label: 'Handle',
description: 'Handle', description: 'Handle',
@ -57,7 +57,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.visibility, standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.visibility,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Visibility', label: 'Visibility',
description: 'Visibility', description: 'Visibility',
@ -81,7 +81,8 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
visibility: string; visibility: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.isContactAutoCreationEnabled, standardId:
CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isContactAutoCreationEnabled,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Contact Auto Creation Enabled', label: 'Is Contact Auto Creation Enabled',
description: 'Is Contact Auto Creation Enabled', description: 'Is Contact Auto Creation Enabled',
@ -91,7 +92,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
isContactAutoCreationEnabled: boolean; isContactAutoCreationEnabled: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.isSyncEnabled, standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Sync Enabled', label: 'Is Sync Enabled',
description: 'Is Sync Enabled', description: 'Is Sync Enabled',
@ -101,7 +102,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
isSyncEnabled: boolean; isSyncEnabled: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: calendarChannelStandardFieldIds.syncCursor, standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.syncCursor,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Sync Cursor', label: 'Sync Cursor',
description: description:
@ -112,7 +113,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: standardId:
calendarChannelStandardFieldIds.calendarChannelEventAssociations, CALENDAR_CHANNEL_STANDARD_FIELD_IDS.calendarChannelEventAssociations,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Calendar Channel Event Associations', label: 'Calendar Channel Event Associations',
description: 'Calendar Channel Event Associations', description: 'Calendar Channel Event Associations',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { calendarEventParticipantStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -22,7 +22,7 @@ export enum CalendarEventParticipantResponseStatus {
} }
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.calendarEventParticipant, standardId: STANDARD_OBJECT_IDS.calendarEventParticipant,
namePlural: 'calendarEventParticipants', namePlural: 'calendarEventParticipants',
labelSingular: 'Calendar event participant', labelSingular: 'Calendar event participant',
labelPlural: 'Calendar event participants', labelPlural: 'Calendar event participants',
@ -36,7 +36,7 @@ export enum CalendarEventParticipantResponseStatus {
}) })
export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata { export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.calendarEvent, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.calendarEvent,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Event ID', label: 'Event ID',
description: 'Event ID', description: 'Event ID',
@ -46,7 +46,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
calendarEvent: Relation<CalendarEventObjectMetadata>; calendarEvent: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.handle, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Handle', label: 'Handle',
description: 'Handle', description: 'Handle',
@ -55,7 +55,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.displayName, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.displayName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Display Name', label: 'Display Name',
description: 'Display Name', description: 'Display Name',
@ -64,7 +64,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
displayName: string; displayName: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.isOrganizer, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.isOrganizer,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Organizer', label: 'Is Organizer',
description: 'Is Organizer', description: 'Is Organizer',
@ -74,7 +74,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
isOrganizer: boolean; isOrganizer: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.responseStatus, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.responseStatus,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Response Status', label: 'Response Status',
description: 'Response Status', description: 'Response Status',
@ -110,7 +110,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
responseStatus: string; responseStatus: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.person, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'Person', description: 'Person',
@ -121,7 +121,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.workspaceMember, standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Workspace Member', label: 'Workspace Member',
description: 'Workspace Member', description: 'Workspace Member',

View File

@ -15,13 +15,13 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
import { CalendarChannelEventAssociationObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-channel-event-association.object-metadata'; import { CalendarChannelEventAssociationObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-channel-event-association.object-metadata';
import { CalendarEventParticipantObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-event-participant.object-metadata'; import { CalendarEventParticipantObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-event-participant.object-metadata';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { calendarEventStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CALENDAR_EVENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type'; import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type';
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.calendarEvent, standardId: STANDARD_OBJECT_IDS.calendarEvent,
namePlural: 'calendarEvents', namePlural: 'calendarEvents',
labelSingular: 'Calendar event', labelSingular: 'Calendar event',
labelPlural: 'Calendar events', labelPlural: 'Calendar events',
@ -35,7 +35,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
}) })
export class CalendarEventObjectMetadata extends BaseObjectMetadata { export class CalendarEventObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.title, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.title,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Title', label: 'Title',
description: 'Title', description: 'Title',
@ -44,7 +44,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
title: string; title: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.isCanceled, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.isCanceled,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is canceled', label: 'Is canceled',
description: 'Is canceled', description: 'Is canceled',
@ -53,7 +53,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
isCanceled: boolean; isCanceled: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.isFullDay, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.isFullDay,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Full Day', label: 'Is Full Day',
description: 'Is Full Day', description: 'Is Full Day',
@ -62,7 +62,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
isFullDay: boolean; isFullDay: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.startsAt, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.startsAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Start Date', label: 'Start Date',
description: 'Start Date', description: 'Start Date',
@ -72,7 +72,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
startsAt: string | null; startsAt: string | null;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.endsAt, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.endsAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'End Date', label: 'End Date',
description: 'End Date', description: 'End Date',
@ -82,7 +82,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
endsAt: string | null; endsAt: string | null;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.externalCreatedAt, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.externalCreatedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Creation DateTime', label: 'Creation DateTime',
description: 'Creation DateTime', description: 'Creation DateTime',
@ -92,7 +92,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
externalCreatedAt: string | null; externalCreatedAt: string | null;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.externalUpdatedAt, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.externalUpdatedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Update DateTime', label: 'Update DateTime',
description: 'Update DateTime', description: 'Update DateTime',
@ -102,7 +102,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
externalUpdatedAt: string | null; externalUpdatedAt: string | null;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.description, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.description,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Description', label: 'Description',
description: 'Description', description: 'Description',
@ -111,7 +111,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
description: string; description: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.location, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.location,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Location', label: 'Location',
description: 'Location', description: 'Location',
@ -120,7 +120,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
location: string; location: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.iCalUID, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.iCalUID,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'iCal UID', label: 'iCal UID',
description: 'iCal UID', description: 'iCal UID',
@ -129,7 +129,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
iCalUID: string; iCalUID: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.conferenceSolution, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.conferenceSolution,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Conference Solution', label: 'Conference Solution',
description: 'Conference Solution', description: 'Conference Solution',
@ -138,7 +138,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
conferenceSolution: string; conferenceSolution: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.conferenceLink, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.conferenceLink,
type: FieldMetadataType.LINK, type: FieldMetadataType.LINK,
label: 'Meet Link', label: 'Meet Link',
description: 'Meet Link', description: 'Meet Link',
@ -148,7 +148,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
conferenceLink: LinkMetadata; conferenceLink: LinkMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.recurringEventExternalId, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.recurringEventExternalId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Recurring Event ID', label: 'Recurring Event ID',
description: 'Recurring Event ID', description: 'Recurring Event ID',
@ -157,7 +157,8 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
recurringEventExternalId: string; recurringEventExternalId: string;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.calendarChannelEventAssociations, standardId:
CALENDAR_EVENT_STANDARD_FIELD_IDS.calendarChannelEventAssociations,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Calendar Channel Event Associations', label: 'Calendar Channel Event Associations',
description: 'Calendar Channel Event Associations', description: 'Calendar Channel Event Associations',
@ -177,7 +178,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
>; >;
@FieldMetadata({ @FieldMetadata({
standardId: calendarEventStandardFieldIds.calendarEventParticipants, standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.calendarEventParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Event Participants', label: 'Event Participants',
description: 'Event Participants', description: 'Event Participants',

View File

@ -7,8 +7,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { companyStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { COMPANY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -24,7 +24,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata'; import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.company, standardId: STANDARD_OBJECT_IDS.company,
namePlural: 'companies', namePlural: 'companies',
labelSingular: 'Company', labelSingular: 'Company',
labelPlural: 'Companies', labelPlural: 'Companies',
@ -33,7 +33,7 @@ import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-ob
}) })
export class CompanyObjectMetadata extends BaseObjectMetadata { export class CompanyObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.name, standardId: COMPANY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Name', label: 'Name',
description: 'The company name', description: 'The company name',
@ -42,7 +42,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.domainName, standardId: COMPANY_STANDARD_FIELD_IDS.domainName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Domain Name', label: 'Domain Name',
description: description:
@ -52,7 +52,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
domainName?: string; domainName?: string;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.address, standardId: COMPANY_STANDARD_FIELD_IDS.address,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Address', label: 'Address',
description: 'The company address', description: 'The company address',
@ -61,7 +61,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
address: string; address: string;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.employees, standardId: COMPANY_STANDARD_FIELD_IDS.employees,
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
label: 'Employees', label: 'Employees',
description: 'Number of employees in the company', description: 'Number of employees in the company',
@ -71,7 +71,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
employees: number; employees: number;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.linkedinLink, standardId: COMPANY_STANDARD_FIELD_IDS.linkedinLink,
type: FieldMetadataType.LINK, type: FieldMetadataType.LINK,
label: 'Linkedin', label: 'Linkedin',
description: 'The company Linkedin account', description: 'The company Linkedin account',
@ -81,7 +81,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
linkedinLink: LinkMetadata; linkedinLink: LinkMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.xLink, standardId: COMPANY_STANDARD_FIELD_IDS.xLink,
type: FieldMetadataType.LINK, type: FieldMetadataType.LINK,
label: 'X', label: 'X',
description: 'The company Twitter/X account', description: 'The company Twitter/X account',
@ -91,7 +91,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
xLink: LinkMetadata; xLink: LinkMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.annualRecurringRevenue, standardId: COMPANY_STANDARD_FIELD_IDS.annualRecurringRevenue,
type: FieldMetadataType.CURRENCY, type: FieldMetadataType.CURRENCY,
label: 'ARR', label: 'ARR',
description: description:
@ -102,7 +102,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
annualRecurringRevenue: CurrencyMetadata; annualRecurringRevenue: CurrencyMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.idealCustomerProfile, standardId: COMPANY_STANDARD_FIELD_IDS.idealCustomerProfile,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'ICP', label: 'ICP',
description: description:
@ -113,7 +113,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
idealCustomerProfile: boolean; idealCustomerProfile: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.position, standardId: COMPANY_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
label: 'Position', label: 'Position',
description: 'Company record position', description: 'Company record position',
@ -125,7 +125,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
// Relations // Relations
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.people, standardId: COMPANY_STANDARD_FIELD_IDS.people,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'People', label: 'People',
description: 'People linked to the company.', description: 'People linked to the company.',
@ -140,7 +140,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
people: Relation<PersonObjectMetadata[]>; people: Relation<PersonObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.accountOwner, standardId: COMPANY_STANDARD_FIELD_IDS.accountOwner,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Account Owner', label: 'Account Owner',
description: description:
@ -152,7 +152,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
accountOwner: WorkspaceMemberObjectMetadata; accountOwner: WorkspaceMemberObjectMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.activityTargets, standardId: COMPANY_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activities', label: 'Activities',
description: 'Activities tied to the company', description: 'Activities tied to the company',
@ -167,7 +167,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
activityTargets: Relation<ActivityTargetObjectMetadata[]>; activityTargets: Relation<ActivityTargetObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.opportunities, standardId: COMPANY_STANDARD_FIELD_IDS.opportunities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Opportunities', label: 'Opportunities',
description: 'Opportunities linked to the company.', description: 'Opportunities linked to the company.',
@ -182,7 +182,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
opportunities: Relation<OpportunityObjectMetadata[]>; opportunities: Relation<OpportunityObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.favorites, standardId: COMPANY_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Favorites', label: 'Favorites',
description: 'Favorites linked to the company', description: 'Favorites linked to the company',
@ -198,7 +198,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
favorites: Relation<FavoriteObjectMetadata[]>; favorites: Relation<FavoriteObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.attachments, standardId: COMPANY_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Attachments', label: 'Attachments',
description: 'Attachments linked to the company.', description: 'Attachments linked to the company.',
@ -213,7 +213,7 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
attachments: Relation<AttachmentObjectMetadata[]>; attachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: companyStandardFieldIds.timelineActivities, standardId: COMPANY_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Timeline Activities', label: 'Timeline Activities',
description: 'Timeline Activities linked to the company', description: 'Timeline Activities linked to the company',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { blocklistStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { BLOCKLIST_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator'; import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator';
@ -11,7 +11,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.blocklist, standardId: STANDARD_OBJECT_IDS.blocklist,
namePlural: 'blocklists', namePlural: 'blocklists',
labelSingular: 'Blocklist', labelSingular: 'Blocklist',
labelPlural: 'Blocklists', labelPlural: 'Blocklists',
@ -22,7 +22,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class BlocklistObjectMetadata extends BaseObjectMetadata { export class BlocklistObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: blocklistStandardFieldIds.handle, standardId: BLOCKLIST_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Handle', label: 'Handle',
description: 'Handle', description: 'Handle',
@ -31,7 +31,7 @@ export class BlocklistObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: blocklistStandardFieldIds.workspaceMember, standardId: BLOCKLIST_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'WorkspaceMember', label: 'WorkspaceMember',
description: 'WorkspaceMember', description: 'WorkspaceMember',

View File

@ -6,8 +6,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { connectedAccountStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { CONNECTED_ACCOUNT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -25,7 +25,7 @@ export enum ConnectedAccountProvider {
} }
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.connectedAccount, standardId: STANDARD_OBJECT_IDS.connectedAccount,
namePlural: 'connectedAccounts', namePlural: 'connectedAccounts',
labelSingular: 'Connected Account', labelSingular: 'Connected Account',
labelPlural: 'Connected Accounts', labelPlural: 'Connected Accounts',
@ -36,7 +36,7 @@ export enum ConnectedAccountProvider {
@IsNotAuditLogged() @IsNotAuditLogged()
export class ConnectedAccountObjectMetadata extends BaseObjectMetadata { export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.handle, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'handle', label: 'handle',
description: 'The account handle (email, username, phone number, etc.)', description: 'The account handle (email, username, phone number, etc.)',
@ -45,7 +45,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.provider, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.provider,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'provider', label: 'provider',
description: 'The account provider', description: 'The account provider',
@ -54,7 +54,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
provider: ConnectedAccountProvider; // field metadata should be a SELECT provider: ConnectedAccountProvider; // field metadata should be a SELECT
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.accessToken, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.accessToken,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Access Token', label: 'Access Token',
description: 'Messaging provider access token', description: 'Messaging provider access token',
@ -63,7 +63,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
accessToken: string; accessToken: string;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.refreshToken, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.refreshToken,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Refresh Token', label: 'Refresh Token',
description: 'Messaging provider refresh token', description: 'Messaging provider refresh token',
@ -72,7 +72,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
refreshToken: string; refreshToken: string;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.accountOwner, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.accountOwner,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Account Owner', label: 'Account Owner',
description: 'Account Owner', description: 'Account Owner',
@ -82,7 +82,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
accountOwner: Relation<WorkspaceMemberObjectMetadata>; accountOwner: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.lastSyncHistoryId, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.lastSyncHistoryId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Last sync history ID', label: 'Last sync history ID',
description: 'Last sync history ID', description: 'Last sync history ID',
@ -91,7 +91,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
lastSyncHistoryId: string; lastSyncHistoryId: string;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.authFailedAt, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.authFailedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Auth failed at', label: 'Auth failed at',
description: 'Auth failed at', description: 'Auth failed at',
@ -101,7 +101,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
authFailedAt: Date; authFailedAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.messageChannels, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.messageChannels,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Channel', label: 'Message Channel',
description: 'Message Channel', description: 'Message Channel',
@ -115,7 +115,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
messageChannels: Relation<MessageChannelObjectMetadata[]>; messageChannels: Relation<MessageChannelObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: connectedAccountStandardFieldIds.calendarChannels, standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.calendarChannels,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Calendar Channel', label: 'Calendar Channel',
description: 'Calendar Channel', description: 'Calendar Channel',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { favoriteStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { FAVORITE_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata'; import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata';
import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface'; import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
@ -17,7 +17,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.favorite, standardId: STANDARD_OBJECT_IDS.favorite,
namePlural: 'favorites', namePlural: 'favorites',
labelSingular: 'Favorite', labelSingular: 'Favorite',
labelPlural: 'Favorites', labelPlural: 'Favorites',
@ -28,7 +28,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class FavoriteObjectMetadata extends BaseObjectMetadata { export class FavoriteObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: favoriteStandardFieldIds.position, standardId: FAVORITE_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
label: 'Position', label: 'Position',
description: 'Favorite position', description: 'Favorite position',
@ -39,7 +39,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
// Relations // Relations
@FieldMetadata({ @FieldMetadata({
standardId: favoriteStandardFieldIds.workspaceMember, standardId: FAVORITE_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Workspace Member', label: 'Workspace Member',
description: 'Favorite workspace member', description: 'Favorite workspace member',
@ -49,7 +49,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
workspaceMember: Relation<WorkspaceMemberObjectMetadata>; workspaceMember: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: favoriteStandardFieldIds.person, standardId: FAVORITE_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'Favorite person', description: 'Favorite person',
@ -60,7 +60,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: favoriteStandardFieldIds.company, standardId: FAVORITE_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'Favorite company', description: 'Favorite company',
@ -71,7 +71,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: favoriteStandardFieldIds.opportunity, standardId: FAVORITE_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Opportunity', label: 'Opportunity',
description: 'Favorite opportunity', description: 'Favorite opportunity',
@ -82,7 +82,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>; opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({ @DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: favoriteStandardFieldIds.custom, standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular, name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular, label: oppositeObjectMetadata.labelSingular,
description: `Favorite ${oppositeObjectMetadata.labelSingular}`, description: `Favorite ${oppositeObjectMetadata.labelSingular}`,

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { messageChannelMessageAssociationStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -14,7 +14,7 @@ import { MessageObjectMetadata } from 'src/modules/messaging/standard-objects/me
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.messageChannelMessageAssociation, standardId: STANDARD_OBJECT_IDS.messageChannelMessageAssociation,
namePlural: 'messageChannelMessageAssociations', namePlural: 'messageChannelMessageAssociations',
labelSingular: 'Message Channel Message Association', labelSingular: 'Message Channel Message Association',
labelPlural: 'Message Channel Message Associations', labelPlural: 'Message Channel Message Associations',
@ -25,7 +25,8 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMetadata { export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.messageChannel, standardId:
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageChannel,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Channel Id', label: 'Message Channel Id',
description: 'Message Channel Id', description: 'Message Channel Id',
@ -36,7 +37,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
messageChannel: Relation<MessageChannelObjectMetadata>; messageChannel: Relation<MessageChannelObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.message, standardId: MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.message,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Id', label: 'Message Id',
description: 'Message Id', description: 'Message Id',
@ -48,7 +49,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
@FieldMetadata({ @FieldMetadata({
standardId: standardId:
messageChannelMessageAssociationStandardFieldIds.messageExternalId, MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageExternalId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Message External Id', label: 'Message External Id',
description: 'Message id from the messaging provider', description: 'Message id from the messaging provider',
@ -58,7 +59,8 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
messageExternalId: string; messageExternalId: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.messageThread, standardId:
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageThread,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Thread Id', label: 'Message Thread Id',
description: 'Message Thread Id', description: 'Message Thread Id',
@ -70,7 +72,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
@FieldMetadata({ @FieldMetadata({
standardId: standardId:
messageChannelMessageAssociationStandardFieldIds.messageThreadExternalId, MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageThreadExternalId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Thread External Id', label: 'Thread External Id',
description: 'Thread id from the messaging provider', description: 'Thread id from the messaging provider',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { messageChannelStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { MESSAGE_CHANNEL_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -36,7 +36,7 @@ export enum MessageChannelType {
} }
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.messageChannel, standardId: STANDARD_OBJECT_IDS.messageChannel,
namePlural: 'messageChannels', namePlural: 'messageChannels',
labelSingular: 'Message Channel', labelSingular: 'Message Channel',
labelPlural: 'Message Channels', labelPlural: 'Message Channels',
@ -47,7 +47,7 @@ export enum MessageChannelType {
@IsSystem() @IsSystem()
export class MessageChannelObjectMetadata extends BaseObjectMetadata { export class MessageChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.visibility, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.visibility,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Visibility', label: 'Visibility',
description: 'Visibility', description: 'Visibility',
@ -77,7 +77,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
visibility: string; visibility: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.handle, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Handle', label: 'Handle',
description: 'Handle', description: 'Handle',
@ -86,7 +86,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.connectedAccount, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Connected Account', label: 'Connected Account',
description: 'Connected Account', description: 'Connected Account',
@ -96,7 +96,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
connectedAccount: Relation<ConnectedAccountObjectMetadata>; connectedAccount: Relation<ConnectedAccountObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.type, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Type', label: 'Type',
description: 'Channel Type', description: 'Channel Type',
@ -120,7 +120,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
type: string; type: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.isContactAutoCreationEnabled, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isContactAutoCreationEnabled,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Contact Auto Creation Enabled', label: 'Is Contact Auto Creation Enabled',
description: 'Is Contact Auto Creation Enabled', description: 'Is Contact Auto Creation Enabled',
@ -130,7 +130,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
isContactAutoCreationEnabled: boolean; isContactAutoCreationEnabled: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.isSyncEnabled, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Is Sync Enabled', label: 'Is Sync Enabled',
description: 'Is Sync Enabled', description: 'Is Sync Enabled',
@ -141,7 +141,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: standardId:
messageChannelStandardFieldIds.messageChannelMessageAssociations, MESSAGE_CHANNEL_STANDARD_FIELD_IDS.messageChannelMessageAssociations,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Channel Association', label: 'Message Channel Association',
description: 'Messages from the channel.', description: 'Messages from the channel.',
@ -158,7 +158,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
>; >;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.syncCursor, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncCursor,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Last sync cursor', label: 'Last sync cursor',
description: 'Last sync cursor', description: 'Last sync cursor',
@ -167,7 +167,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncCursor: string; syncCursor: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.syncedAt, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Last sync date', label: 'Last sync date',
description: 'Last sync date', description: 'Last sync date',
@ -177,7 +177,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncedAt: string; syncedAt: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.syncStatus, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncStatus,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Last sync status', label: 'Last sync status',
description: 'Last sync status', description: 'Last sync status',
@ -213,7 +213,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncStatus: MessageChannelSyncStatus; syncStatus: MessageChannelSyncStatus;
@FieldMetadata({ @FieldMetadata({
standardId: messageChannelStandardFieldIds.ongoingSyncStartedAt, standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.ongoingSyncStartedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Ongoing sync started at', label: 'Ongoing sync started at',
description: 'Ongoing sync started at', description: 'Ongoing sync started at',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { messageParticipantStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -14,7 +14,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.messageParticipant, standardId: STANDARD_OBJECT_IDS.messageParticipant,
namePlural: 'messageParticipants', namePlural: 'messageParticipants',
labelSingular: 'Message Participant', labelSingular: 'Message Participant',
labelPlural: 'Message Participants', labelPlural: 'Message Participants',
@ -25,7 +25,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class MessageParticipantObjectMetadata extends BaseObjectMetadata { export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.message, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.message,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message', label: 'Message',
description: 'Message', description: 'Message',
@ -35,7 +35,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
message: Relation<MessageObjectMetadata>; message: Relation<MessageObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.role, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.role,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Role', label: 'Role',
description: 'Role', description: 'Role',
@ -51,7 +51,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
role: string; role: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.handle, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Handle', label: 'Handle',
description: 'Handle', description: 'Handle',
@ -60,7 +60,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
handle: string; handle: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.displayName, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.displayName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Display Name', label: 'Display Name',
description: 'Display Name', description: 'Display Name',
@ -69,7 +69,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
displayName: string; displayName: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.person, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'Person', description: 'Person',
@ -80,7 +80,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: messageParticipantStandardFieldIds.workspaceMember, standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Workspace Member', label: 'Workspace Member',
description: 'Workspace member', description: 'Workspace member',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { messageThreadStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { MESSAGE_THREAD_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -18,7 +18,7 @@ import { MessageObjectMetadata } from 'src/modules/messaging/standard-objects/me
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.messageThread, standardId: STANDARD_OBJECT_IDS.messageThread,
namePlural: 'messageThreads', namePlural: 'messageThreads',
labelSingular: 'Message Thread', labelSingular: 'Message Thread',
labelPlural: 'Message Threads', labelPlural: 'Message Threads',
@ -29,7 +29,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class MessageThreadObjectMetadata extends BaseObjectMetadata { export class MessageThreadObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: messageThreadStandardFieldIds.messages, standardId: MESSAGE_THREAD_STANDARD_FIELD_IDS.messages,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Messages', label: 'Messages',
description: 'Messages from the thread.', description: 'Messages from the thread.',
@ -44,7 +44,8 @@ export class MessageThreadObjectMetadata extends BaseObjectMetadata {
messages: Relation<MessageObjectMetadata[]>; messages: Relation<MessageObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: messageThreadStandardFieldIds.messageChannelMessageAssociations, standardId:
MESSAGE_THREAD_STANDARD_FIELD_IDS.messageChannelMessageAssociations,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Channel Association', label: 'Message Channel Association',
description: 'Messages from the channel.', description: 'Messages from the channel.',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { messageStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { MESSAGE_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -19,7 +19,7 @@ import { MessageThreadObjectMetadata } from 'src/modules/messaging/standard-obje
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.message, standardId: STANDARD_OBJECT_IDS.message,
namePlural: 'messages', namePlural: 'messages',
labelSingular: 'Message', labelSingular: 'Message',
labelPlural: 'Messages', labelPlural: 'Messages',
@ -30,7 +30,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class MessageObjectMetadata extends BaseObjectMetadata { export class MessageObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.headerMessageId, standardId: MESSAGE_STANDARD_FIELD_IDS.headerMessageId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Header message Id', label: 'Header message Id',
description: 'Message id from the message header', description: 'Message id from the message header',
@ -39,7 +39,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
headerMessageId: string; headerMessageId: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.messageThread, standardId: MESSAGE_STANDARD_FIELD_IDS.messageThread,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Thread Id', label: 'Message Thread Id',
description: 'Message Thread Id', description: 'Message Thread Id',
@ -50,7 +50,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
messageThread: Relation<MessageThreadObjectMetadata>; messageThread: Relation<MessageThreadObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.direction, standardId: MESSAGE_STANDARD_FIELD_IDS.direction,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Direction', label: 'Direction',
description: 'Message Direction', description: 'Message Direction',
@ -64,7 +64,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
direction: string; direction: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.subject, standardId: MESSAGE_STANDARD_FIELD_IDS.subject,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Subject', label: 'Subject',
description: 'Subject', description: 'Subject',
@ -73,7 +73,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
subject: string; subject: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.text, standardId: MESSAGE_STANDARD_FIELD_IDS.text,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Text', label: 'Text',
description: 'Text', description: 'Text',
@ -82,7 +82,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
text: string; text: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.receivedAt, standardId: MESSAGE_STANDARD_FIELD_IDS.receivedAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Received At', label: 'Received At',
description: 'The date the message was received', description: 'The date the message was received',
@ -92,7 +92,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
receivedAt: string; receivedAt: string;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.messageParticipants, standardId: MESSAGE_STANDARD_FIELD_IDS.messageParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Participants', label: 'Message Participants',
description: 'Message Participants', description: 'Message Participants',
@ -108,7 +108,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
messageParticipants: Relation<MessageParticipantObjectMetadata[]>; messageParticipants: Relation<MessageParticipantObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: messageStandardFieldIds.messageChannelMessageAssociations, standardId: MESSAGE_STANDARD_FIELD_IDS.messageChannelMessageAssociations,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Channel Association', label: 'Message Channel Association',
description: 'Messages from the channel.', description: 'Messages from the channel.',

View File

@ -6,8 +6,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { opportunityStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { OPPORTUNITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -23,7 +23,7 @@ import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-ob
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.opportunity, standardId: STANDARD_OBJECT_IDS.opportunity,
namePlural: 'opportunities', namePlural: 'opportunities',
labelSingular: 'Opportunity', labelSingular: 'Opportunity',
labelPlural: 'Opportunities', labelPlural: 'Opportunities',
@ -33,7 +33,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class OpportunityObjectMetadata extends BaseObjectMetadata { export class OpportunityObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.name, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Name', label: 'Name',
description: 'The opportunity name', description: 'The opportunity name',
@ -42,7 +42,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.amount, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.amount,
type: FieldMetadataType.CURRENCY, type: FieldMetadataType.CURRENCY,
label: 'Amount', label: 'Amount',
description: 'Opportunity amount', description: 'Opportunity amount',
@ -52,7 +52,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
amount: CurrencyMetadata; amount: CurrencyMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.closeDate, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.closeDate,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Close date', label: 'Close date',
description: 'Opportunity close date', description: 'Opportunity close date',
@ -62,7 +62,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
closeDate: Date; closeDate: Date;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.probability, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.probability,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Probability', label: 'Probability',
description: 'Opportunity probability', description: 'Opportunity probability',
@ -72,7 +72,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
probability: string; probability: string;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.stage, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.stage,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Stage', label: 'Stage',
description: 'Opportunity stage', description: 'Opportunity stage',
@ -94,7 +94,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
stage: string; stage: string;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.position, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
label: 'Position', label: 'Position',
description: 'Opportunity record position', description: 'Opportunity record position',
@ -105,7 +105,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
position: number; position: number;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.pointOfContact, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.pointOfContact,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Point of Contact', label: 'Point of Contact',
description: 'Opportunity point of contact', description: 'Opportunity point of contact',
@ -116,7 +116,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
pointOfContact: Relation<PersonObjectMetadata>; pointOfContact: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.company, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'Opportunity company', description: 'Opportunity company',
@ -127,7 +127,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.favorites, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Favorites', label: 'Favorites',
description: 'Favorites linked to the opportunity', description: 'Favorites linked to the opportunity',
@ -143,7 +143,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
favorites: Relation<FavoriteObjectMetadata[]>; favorites: Relation<FavoriteObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.activityTargets, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activities', label: 'Activities',
description: 'Activities tied to the opportunity', description: 'Activities tied to the opportunity',
@ -158,7 +158,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
activityTargets: Relation<ActivityTargetObjectMetadata[]>; activityTargets: Relation<ActivityTargetObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.attachments, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Attachments', label: 'Attachments',
description: 'Attachments linked to the opportunity.', description: 'Attachments linked to the opportunity.',
@ -173,7 +173,7 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
attachments: Relation<AttachmentObjectMetadata[]>; attachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: opportunityStandardFieldIds.timelineActivities, standardId: OPPORTUNITY_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Timeline Activities', label: 'Timeline Activities',
description: 'Timeline Activities linked to the opportunity.', description: 'Timeline Activities linked to the opportunity.',

View File

@ -7,8 +7,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { personStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { PERSON_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -26,7 +26,7 @@ import { OpportunityObjectMetadata } from 'src/modules/opportunity/standard-obje
import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata'; import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.person, standardId: STANDARD_OBJECT_IDS.person,
namePlural: 'people', namePlural: 'people',
labelSingular: 'Person', labelSingular: 'Person',
labelPlural: 'People', labelPlural: 'People',
@ -35,7 +35,7 @@ import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-ob
}) })
export class PersonObjectMetadata extends BaseObjectMetadata { export class PersonObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.name, standardId: PERSON_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.FULL_NAME, type: FieldMetadataType.FULL_NAME,
label: 'Name', label: 'Name',
description: 'Contacts name', description: 'Contacts name',
@ -45,7 +45,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
name: FullNameMetadata; name: FullNameMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.email, standardId: PERSON_STANDARD_FIELD_IDS.email,
type: FieldMetadataType.EMAIL, type: FieldMetadataType.EMAIL,
label: 'Email', label: 'Email',
description: 'Contacts Email', description: 'Contacts Email',
@ -54,7 +54,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
email: string; email: string;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.linkedinLink, standardId: PERSON_STANDARD_FIELD_IDS.linkedinLink,
type: FieldMetadataType.LINK, type: FieldMetadataType.LINK,
label: 'Linkedin', label: 'Linkedin',
description: 'Contacts Linkedin account', description: 'Contacts Linkedin account',
@ -64,7 +64,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
linkedinLink: LinkMetadata; linkedinLink: LinkMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.xLink, standardId: PERSON_STANDARD_FIELD_IDS.xLink,
type: FieldMetadataType.LINK, type: FieldMetadataType.LINK,
label: 'X', label: 'X',
description: 'Contacts X/Twitter account', description: 'Contacts X/Twitter account',
@ -74,7 +74,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
xLink: LinkMetadata; xLink: LinkMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.jobTitle, standardId: PERSON_STANDARD_FIELD_IDS.jobTitle,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Job Title', label: 'Job Title',
description: 'Contacts job title', description: 'Contacts job title',
@ -83,7 +83,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
jobTitle: string; jobTitle: string;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.phone, standardId: PERSON_STANDARD_FIELD_IDS.phone,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Phone', label: 'Phone',
description: 'Contacts phone number', description: 'Contacts phone number',
@ -92,7 +92,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
phone: string; phone: string;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.city, standardId: PERSON_STANDARD_FIELD_IDS.city,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'City', label: 'City',
description: 'Contacts city', description: 'Contacts city',
@ -101,7 +101,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
city: string; city: string;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.avatarUrl, standardId: PERSON_STANDARD_FIELD_IDS.avatarUrl,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Avatar', label: 'Avatar',
description: 'Contacts avatar', description: 'Contacts avatar',
@ -111,7 +111,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
avatarUrl: string; avatarUrl: string;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.position, standardId: PERSON_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
label: 'Position', label: 'Position',
description: 'Person record Position', description: 'Person record Position',
@ -123,7 +123,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
// Relations // Relations
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.company, standardId: PERSON_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'Contacts company', description: 'Contacts company',
@ -134,7 +134,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.pointOfContactForOpportunities, standardId: PERSON_STANDARD_FIELD_IDS.pointOfContactForOpportunities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'POC for Opportunities', label: 'POC for Opportunities',
description: 'Point of Contact for Opportunities', description: 'Point of Contact for Opportunities',
@ -149,7 +149,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
pointOfContactForOpportunities: Relation<OpportunityObjectMetadata[]>; pointOfContactForOpportunities: Relation<OpportunityObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.activityTargets, standardId: PERSON_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Activities', label: 'Activities',
description: 'Activities tied to the contact', description: 'Activities tied to the contact',
@ -163,7 +163,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
activityTargets: Relation<ActivityTargetObjectMetadata[]>; activityTargets: Relation<ActivityTargetObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.favorites, standardId: PERSON_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Favorites', label: 'Favorites',
description: 'Favorites linked to the contact', description: 'Favorites linked to the contact',
@ -178,7 +178,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
favorites: Relation<FavoriteObjectMetadata[]>; favorites: Relation<FavoriteObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.attachments, standardId: PERSON_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Attachments', label: 'Attachments',
description: 'Attachments linked to the contact.', description: 'Attachments linked to the contact.',
@ -192,7 +192,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
attachments: Relation<AttachmentObjectMetadata[]>; attachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.messageParticipants, standardId: PERSON_STANDARD_FIELD_IDS.messageParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Participants', label: 'Message Participants',
description: 'Message Participants', description: 'Message Participants',
@ -208,7 +208,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
messageParticipants: Relation<MessageParticipantObjectMetadata[]>; messageParticipants: Relation<MessageParticipantObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.calendarEventParticipants, standardId: PERSON_STANDARD_FIELD_IDS.calendarEventParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Calendar Event Participants', label: 'Calendar Event Participants',
description: 'Calendar Event Participants', description: 'Calendar Event Participants',
@ -226,7 +226,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
calendarEventParticipants: Relation<CalendarEventParticipantObjectMetadata[]>; calendarEventParticipants: Relation<CalendarEventParticipantObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: personStandardFieldIds.timelineActivities, standardId: PERSON_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Events', label: 'Events',
description: 'Events linked to the company', description: 'Events linked to the company',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { auditLogStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { AUDIT_LOGS_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -11,7 +11,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata'; import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.auditLog, standardId: STANDARD_OBJECT_IDS.auditLog,
namePlural: 'auditLogs', namePlural: 'auditLogs',
labelSingular: 'Audit Log', labelSingular: 'Audit Log',
labelPlural: 'Audit Logs', labelPlural: 'Audit Logs',
@ -21,7 +21,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
@IsSystem() @IsSystem()
export class AuditLogObjectMetadata extends BaseObjectMetadata { export class AuditLogObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.name, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Event name', label: 'Event name',
description: 'Event name/type', description: 'Event name/type',
@ -30,7 +30,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.properties, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
label: 'Event details', label: 'Event details',
description: 'Json value for event details', description: 'Json value for event details',
@ -40,7 +40,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
properties: JSON; properties: JSON;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.context, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.context,
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
label: 'Event context', label: 'Event context',
description: description:
@ -51,7 +51,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
context: JSON; context: JSON;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.objectName, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Object name', label: 'Object name',
description: 'If the event is related to a particular object', description: 'If the event is related to a particular object',
@ -60,7 +60,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
objectName: string; objectName: string;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.objectName, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Object name', label: 'Object name',
description: 'If the event is related to a particular object', description: 'If the event is related to a particular object',
@ -69,7 +69,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
objectMetadataId: string; objectMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.recordId, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.recordId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Object id', label: 'Object id',
description: 'Event name/type', description: 'Event name/type',
@ -79,7 +79,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
recordId: string; recordId: string;
@FieldMetadata({ @FieldMetadata({
standardId: auditLogStandardFieldIds.workspaceMember, standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Workspace Member', label: 'Workspace Member',
description: 'Event workspace member', description: 'Event workspace member',

View File

@ -1,7 +1,7 @@
import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity'; import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { behavioralEventStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { BEHAVIORAL_EVENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -10,7 +10,7 @@ import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-meta
import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata'; import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.behavioralEvent, standardId: STANDARD_OBJECT_IDS.behavioralEvent,
namePlural: 'behavioralEvents', namePlural: 'behavioralEvents',
labelSingular: 'Behavioral Event', labelSingular: 'Behavioral Event',
labelPlural: 'Behavioral Events', labelPlural: 'Behavioral Events',
@ -40,7 +40,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
*/ */
@FieldMetadata({ @FieldMetadata({
standardId: behavioralEventStandardFieldIds.name, standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Event name', label: 'Event name',
description: 'Event name', description: 'Event name',
@ -49,7 +49,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: behavioralEventStandardFieldIds.properties, standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
label: 'Event details', label: 'Event details',
description: 'Json value for event details', description: 'Json value for event details',
@ -59,7 +59,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
properties: JSON; properties: JSON;
@FieldMetadata({ @FieldMetadata({
standardId: behavioralEventStandardFieldIds.context, standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.context,
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
label: 'Event context', label: 'Event context',
description: description:
@ -70,7 +70,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
context: JSON; context: JSON;
@FieldMetadata({ @FieldMetadata({
standardId: behavioralEventStandardFieldIds.objectName, standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Object name', label: 'Object name',
description: 'If the event is related to a particular object', description: 'If the event is related to a particular object',
@ -79,7 +79,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
objectName: string; objectName: string;
@FieldMetadata({ @FieldMetadata({
standardId: behavioralEventStandardFieldIds.recordId, standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.recordId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Object id', label: 'Object id',
description: 'Event name/type', description: 'Event name/type',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { timelineActivityStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { TIMELINE_ACTIVITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface'; import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ -17,7 +17,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata'; import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.timelineActivity, standardId: STANDARD_OBJECT_IDS.timelineActivity,
namePlural: 'timelineActivities', namePlural: 'timelineActivities',
labelSingular: 'Timeline Activity', labelSingular: 'Timeline Activity',
labelPlural: 'Timeline Activities', labelPlural: 'Timeline Activities',
@ -28,7 +28,7 @@ import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-syn
@IsNotAuditLogged() @IsNotAuditLogged()
export class TimelineActivityObjectMetadata extends BaseObjectMetadata { export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.happensAt, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.happensAt,
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Creation date', label: 'Creation date',
description: 'Creation date', description: 'Creation date',
@ -38,7 +38,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
happensAt: Date; happensAt: Date;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.name, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Event name', label: 'Event name',
description: 'Event name', description: 'Event name',
@ -47,7 +47,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.properties, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
label: 'Event details', label: 'Event details',
description: 'Json value for event details', description: 'Json value for event details',
@ -58,7 +58,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
// Who made the action // Who made the action
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.workspaceMember, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Workspace Member', label: 'Workspace Member',
description: 'Event workspace member', description: 'Event workspace member',
@ -69,7 +69,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
workspaceMember: Relation<WorkspaceMemberObjectMetadata>; workspaceMember: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.person, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Person', label: 'Person',
description: 'Event person', description: 'Event person',
@ -80,7 +80,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>; person: Relation<PersonObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.company, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Company', label: 'Company',
description: 'Event company', description: 'Event company',
@ -91,7 +91,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>; company: Relation<CompanyObjectMetadata>;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.opportunity, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Opportunity', label: 'Opportunity',
description: 'Events opportunity', description: 'Events opportunity',
@ -102,7 +102,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>; opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({ @DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: timelineActivityStandardFieldIds.custom, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular, name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular, label: oppositeObjectMetadata.labelSingular,
description: `Event ${oppositeObjectMetadata.labelSingular}`, description: `Event ${oppositeObjectMetadata.labelSingular}`,
@ -113,7 +113,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
// Special objects that don't have their own timeline and are 'link' to the main object // Special objects that don't have their own timeline and are 'link' to the main object
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedRecordCachedName, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedRecordCachedName,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Linked Record cached name', label: 'Linked Record cached name',
description: 'Cached record name', description: 'Cached record name',
@ -122,7 +122,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
linkedRecordCachedName: string; linkedRecordCachedName: string;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedRecordId, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedRecordId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Linked Record id', label: 'Linked Record id',
description: 'Linked Record id', description: 'Linked Record id',
@ -132,7 +132,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
linkedRecordId: string; linkedRecordId: string;
@FieldMetadata({ @FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedObjectMetadataId, standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedObjectMetadataId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Linked Object Metadata Id', label: 'Linked Object Metadata Id',
description: 'inked Object Metadata Id', description: 'inked Object Metadata Id',

View File

@ -1,6 +1,6 @@
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { viewFieldStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { VIEW_FIELD_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
@ -10,7 +10,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.object-metadata'; import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.viewField, standardId: STANDARD_OBJECT_IDS.viewField,
namePlural: 'viewFields', namePlural: 'viewFields',
labelSingular: 'View Field', labelSingular: 'View Field',
labelPlural: 'View Fields', labelPlural: 'View Fields',
@ -21,7 +21,7 @@ import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.objec
@IsSystem() @IsSystem()
export class ViewFieldObjectMetadata extends BaseObjectMetadata { export class ViewFieldObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: viewFieldStandardFieldIds.fieldMetadataId, standardId: VIEW_FIELD_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Field Metadata Id', label: 'Field Metadata Id',
description: 'View Field target field', description: 'View Field target field',
@ -30,7 +30,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string; fieldMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewFieldStandardFieldIds.isVisible, standardId: VIEW_FIELD_STANDARD_FIELD_IDS.isVisible,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Visible', label: 'Visible',
description: 'View Field visibility', description: 'View Field visibility',
@ -40,7 +40,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
isVisible: boolean; isVisible: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: viewFieldStandardFieldIds.size, standardId: VIEW_FIELD_STANDARD_FIELD_IDS.size,
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
label: 'Size', label: 'Size',
description: 'View Field size', description: 'View Field size',
@ -50,7 +50,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
size: number; size: number;
@FieldMetadata({ @FieldMetadata({
standardId: viewFieldStandardFieldIds.position, standardId: VIEW_FIELD_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
label: 'Position', label: 'Position',
description: 'View Field position', description: 'View Field position',
@ -60,7 +60,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
position: number; position: number;
@FieldMetadata({ @FieldMetadata({
standardId: viewFieldStandardFieldIds.view, standardId: VIEW_FIELD_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View', label: 'View',
description: 'View Field related view', description: 'View Field related view',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { viewFilterStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { VIEW_FILTER_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -12,7 +12,7 @@ import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.objec
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.viewFilter, standardId: STANDARD_OBJECT_IDS.viewFilter,
namePlural: 'viewFilters', namePlural: 'viewFilters',
labelSingular: 'View Filter', labelSingular: 'View Filter',
labelPlural: 'View Filters', labelPlural: 'View Filters',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class ViewFilterObjectMetadata extends BaseObjectMetadata { export class ViewFilterObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: viewFilterStandardFieldIds.fieldMetadataId, standardId: VIEW_FILTER_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Field Metadata Id', label: 'Field Metadata Id',
description: 'View Filter target field', description: 'View Filter target field',
@ -31,7 +31,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string; fieldMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewFilterStandardFieldIds.operand, standardId: VIEW_FILTER_STANDARD_FIELD_IDS.operand,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Operand', label: 'Operand',
description: 'View Filter operand', description: 'View Filter operand',
@ -40,7 +40,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
operand: string; operand: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewFilterStandardFieldIds.value, standardId: VIEW_FILTER_STANDARD_FIELD_IDS.value,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Value', label: 'Value',
description: 'View Filter value', description: 'View Filter value',
@ -48,7 +48,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
value: string; value: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewFilterStandardFieldIds.displayValue, standardId: VIEW_FILTER_STANDARD_FIELD_IDS.displayValue,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Display Value', label: 'Display Value',
description: 'View Filter Display Value', description: 'View Filter Display Value',
@ -56,7 +56,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
displayValue: string; displayValue: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewFilterStandardFieldIds.view, standardId: VIEW_FILTER_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View', label: 'View',
description: 'View Filter related view', description: 'View Filter related view',

View File

@ -1,8 +1,8 @@
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { viewSortStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { VIEW_SORT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -12,7 +12,7 @@ import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.objec
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.viewSort, standardId: STANDARD_OBJECT_IDS.viewSort,
namePlural: 'viewSorts', namePlural: 'viewSorts',
labelSingular: 'View Sort', labelSingular: 'View Sort',
labelPlural: 'View Sorts', labelPlural: 'View Sorts',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class ViewSortObjectMetadata extends BaseObjectMetadata { export class ViewSortObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: viewSortStandardFieldIds.fieldMetadataId, standardId: VIEW_SORT_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Field Metadata Id', label: 'Field Metadata Id',
description: 'View Sort target field', description: 'View Sort target field',
@ -32,7 +32,7 @@ export class ViewSortObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string; fieldMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewSortStandardFieldIds.direction, standardId: VIEW_SORT_STANDARD_FIELD_IDS.direction,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Direction', label: 'Direction',
description: 'View Sort direction', description: 'View Sort direction',
@ -41,7 +41,7 @@ export class ViewSortObjectMetadata extends BaseObjectMetadata {
direction: string; direction: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewSortStandardFieldIds.view, standardId: VIEW_SORT_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View', label: 'View',
description: 'View Sort related view', description: 'View Sort related view',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { viewStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { VIEW_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator'; import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -19,7 +19,7 @@ import { ViewSortObjectMetadata } from 'src/modules/view/standard-objects/view-s
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.view, standardId: STANDARD_OBJECT_IDS.view,
namePlural: 'views', namePlural: 'views',
labelSingular: 'View', labelSingular: 'View',
labelPlural: 'Views', labelPlural: 'Views',
@ -30,7 +30,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem() @IsSystem()
export class ViewObjectMetadata extends BaseObjectMetadata { export class ViewObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.name, standardId: VIEW_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Name', label: 'Name',
description: 'View name', description: 'View name',
@ -38,7 +38,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
name: string; name: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.objectMetadataId, standardId: VIEW_STANDARD_FIELD_IDS.objectMetadataId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'Object Metadata Id', label: 'Object Metadata Id',
description: 'View target object', description: 'View target object',
@ -46,7 +46,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
objectMetadataId: string; objectMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.type, standardId: VIEW_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Type', label: 'Type',
description: 'View type', description: 'View type',
@ -55,7 +55,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
type: string; type: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.key, standardId: VIEW_STANDARD_FIELD_IDS.key,
type: FieldMetadataType.SELECT, type: FieldMetadataType.SELECT,
label: 'Key', label: 'Key',
description: 'View key', description: 'View key',
@ -66,7 +66,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
key: string; key: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.icon, standardId: VIEW_STANDARD_FIELD_IDS.icon,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Icon', label: 'Icon',
description: 'View icon', description: 'View icon',
@ -74,7 +74,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
icon: string; icon: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.kanbanFieldMetadataId, standardId: VIEW_STANDARD_FIELD_IDS.kanbanFieldMetadataId,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'kanbanfieldMetadataId', label: 'kanbanfieldMetadataId',
description: 'View Kanban column field', description: 'View Kanban column field',
@ -82,7 +82,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
kanbanFieldMetadataId: string; kanbanFieldMetadataId: string;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.position, standardId: VIEW_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
label: 'Position', label: 'Position',
description: 'View position', description: 'View position',
@ -91,7 +91,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
position: number; position: number;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.isCompact, standardId: VIEW_STANDARD_FIELD_IDS.isCompact,
type: FieldMetadataType.BOOLEAN, type: FieldMetadataType.BOOLEAN,
label: 'Compact View', label: 'Compact View',
description: 'Describes if the view is in compact mode', description: 'Describes if the view is in compact mode',
@ -100,7 +100,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
isCompact: boolean; isCompact: boolean;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.viewFields, standardId: VIEW_STANDARD_FIELD_IDS.viewFields,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View Fields', label: 'View Fields',
description: 'View Fields', description: 'View Fields',
@ -115,7 +115,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
viewFields: Relation<ViewFieldObjectMetadata[]>; viewFields: Relation<ViewFieldObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.viewFilters, standardId: VIEW_STANDARD_FIELD_IDS.viewFilters,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View Filters', label: 'View Filters',
description: 'View Filters', description: 'View Filters',
@ -130,7 +130,7 @@ export class ViewObjectMetadata extends BaseObjectMetadata {
viewFilters: Relation<ViewFilterObjectMetadata[]>; viewFilters: Relation<ViewFilterObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: viewStandardFieldIds.viewSorts, standardId: VIEW_STANDARD_FIELD_IDS.viewSorts,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'View Sorts', label: 'View Sorts',
description: 'View Sorts', description: 'View Sorts',

View File

@ -1,6 +1,6 @@
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
import { webhookStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { WEBHOOK_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -8,7 +8,7 @@ import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-meta
import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata'; import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-objects/base.object-metadata';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.webhook, standardId: STANDARD_OBJECT_IDS.webhook,
namePlural: 'webhooks', namePlural: 'webhooks',
labelSingular: 'Webhook', labelSingular: 'Webhook',
labelPlural: 'Webhooks', labelPlural: 'Webhooks',
@ -19,7 +19,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
@IsSystem() @IsSystem()
export class WebhookObjectMetadata extends BaseObjectMetadata { export class WebhookObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: webhookStandardFieldIds.targetUrl, standardId: WEBHOOK_STANDARD_FIELD_IDS.targetUrl,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Target Url', label: 'Target Url',
description: 'Webhook target url', description: 'Webhook target url',
@ -28,7 +28,7 @@ export class WebhookObjectMetadata extends BaseObjectMetadata {
targetUrl: string; targetUrl: string;
@FieldMetadata({ @FieldMetadata({
standardId: webhookStandardFieldIds.operation, standardId: WEBHOOK_STANDARD_FIELD_IDS.operation,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Operation', label: 'Operation',
description: 'Webhook operation', description: 'Webhook operation',

View File

@ -6,8 +6,8 @@ import {
RelationMetadataType, RelationMetadataType,
RelationOnDeleteAction, RelationOnDeleteAction,
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
import { workspaceMemberStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids'; import { WORKSPACE_MEMBER_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids'; import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator'; import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator'; import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator'; import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
@ -29,7 +29,7 @@ import { AuditLogObjectMetadata } from 'src/modules/timeline/standard-objects/au
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator'; import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({ @ObjectMetadata({
standardId: standardObjectIds.workspaceMember, standardId: STANDARD_OBJECT_IDS.workspaceMember,
namePlural: 'workspaceMembers', namePlural: 'workspaceMembers',
labelSingular: 'Workspace Member', labelSingular: 'Workspace Member',
labelPlural: 'Workspace Members', labelPlural: 'Workspace Members',
@ -40,7 +40,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged() @IsNotAuditLogged()
export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata { export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.name, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.FULL_NAME, type: FieldMetadataType.FULL_NAME,
label: 'Name', label: 'Name',
description: 'Workspace member name', description: 'Workspace member name',
@ -49,7 +49,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
name: FullNameMetadata; name: FullNameMetadata;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.colorScheme, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.colorScheme,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Color Scheme', label: 'Color Scheme',
description: 'Preferred color scheme', description: 'Preferred color scheme',
@ -59,7 +59,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
colorScheme: string; colorScheme: string;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.locale, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.locale,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Language', label: 'Language',
description: 'Preferred language', description: 'Preferred language',
@ -69,7 +69,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
locale: string; locale: string;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.avatarUrl, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.avatarUrl,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'Avatar Url', label: 'Avatar Url',
description: 'Workspace member avatar', description: 'Workspace member avatar',
@ -78,7 +78,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
avatarUrl: string; avatarUrl: string;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.userEmail, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.userEmail,
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
label: 'User Email', label: 'User Email',
description: 'Related user email address', description: 'Related user email address',
@ -87,7 +87,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
userEmail: string; userEmail: string;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.userId, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.userId,
type: FieldMetadataType.UUID, type: FieldMetadataType.UUID,
label: 'User Id', label: 'User Id',
description: 'Associated User Id', description: 'Associated User Id',
@ -97,7 +97,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
// Relations // Relations
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.authoredActivities, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.authoredActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Authored activities', label: 'Authored activities',
description: 'Activities created by the workspace member', description: 'Activities created by the workspace member',
@ -112,7 +112,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
authoredActivities: Relation<ActivityObjectMetadata[]>; authoredActivities: Relation<ActivityObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.assignedActivities, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.assignedActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Assigned activities', label: 'Assigned activities',
description: 'Activities assigned to the workspace member', description: 'Activities assigned to the workspace member',
@ -127,7 +127,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
assignedActivities: Relation<ActivityObjectMetadata[]>; assignedActivities: Relation<ActivityObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.favorites, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Favorites', label: 'Favorites',
description: 'Favorites linked to the workspace member', description: 'Favorites linked to the workspace member',
@ -141,7 +141,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
favorites: Relation<FavoriteObjectMetadata[]>; favorites: Relation<FavoriteObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.accountOwnerForCompanies, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.accountOwnerForCompanies,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Account Owner For Companies', label: 'Account Owner For Companies',
description: 'Account owner for companies', description: 'Account owner for companies',
@ -156,7 +156,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
accountOwnerForCompanies: Relation<CompanyObjectMetadata[]>; accountOwnerForCompanies: Relation<CompanyObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.authoredAttachments, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.authoredAttachments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Authored attachments', label: 'Authored attachments',
description: 'Attachments created by the workspace member', description: 'Attachments created by the workspace member',
@ -171,7 +171,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
authoredAttachments: Relation<AttachmentObjectMetadata[]>; authoredAttachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.authoredComments, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.authoredComments,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Authored comments', label: 'Authored comments',
description: 'Authored comments', description: 'Authored comments',
@ -186,7 +186,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
authoredComments: Relation<CommentObjectMetadata[]>; authoredComments: Relation<CommentObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.connectedAccounts, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.connectedAccounts,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Connected accounts', label: 'Connected accounts',
description: 'Connected accounts', description: 'Connected accounts',
@ -201,7 +201,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
connectedAccounts: Relation<ConnectedAccountObjectMetadata[]>; connectedAccounts: Relation<ConnectedAccountObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.messageParticipants, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.messageParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Message Participants', label: 'Message Participants',
description: 'Message Participants', description: 'Message Participants',
@ -216,7 +216,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
messageParticipants: Relation<MessageParticipantObjectMetadata[]>; messageParticipants: Relation<MessageParticipantObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.blocklist, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.blocklist,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Blocklist', label: 'Blocklist',
description: 'Blocklisted handles', description: 'Blocklisted handles',
@ -231,7 +231,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
blocklist: Relation<BlocklistObjectMetadata[]>; blocklist: Relation<BlocklistObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.calendarEventParticipants, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.calendarEventParticipants,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Calendar Event Participants', label: 'Calendar Event Participants',
description: 'Calendar Event Participants', description: 'Calendar Event Participants',
@ -249,7 +249,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
calendarEventParticipants: Relation<CalendarEventParticipantObjectMetadata[]>; calendarEventParticipants: Relation<CalendarEventParticipantObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.timelineActivities, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Events', label: 'Events',
description: 'Events linked to the workspace member', description: 'Events linked to the workspace member',
@ -265,7 +265,7 @@ export class WorkspaceMemberObjectMetadata extends BaseObjectMetadata {
timelineActivities: Relation<TimelineActivityObjectMetadata[]>; timelineActivities: Relation<TimelineActivityObjectMetadata[]>;
@FieldMetadata({ @FieldMetadata({
standardId: workspaceMemberStandardFieldIds.auditLogs, standardId: WORKSPACE_MEMBER_STANDARD_FIELD_IDS.auditLogs,
type: FieldMetadataType.RELATION, type: FieldMetadataType.RELATION,
label: 'Aud tLogs', label: 'Aud tLogs',
description: 'Audit Logs linked to the workspace member', description: 'Audit Logs linked to the workspace member',