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

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

View File

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

View File

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

View File

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

View File

@ -84,7 +84,7 @@ describe('FindDuplicatesQueryFactory', () => {
});
expect(query.trim()).toEqual(`query {
personCollection(filter: {or:[{nameFirstName:{eq:\"John\"},nameLastName:{eq:\"Doe\"}}]}) {
personCollection(filter: {or:[{nameFirstName:{eq:"John"},nameLastName:{eq:"Doe"}}]}) {
fieldsString
}
}`);
@ -171,7 +171,7 @@ describe('FindDuplicatesQueryFactory', () => {
);
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
}
}`);
@ -189,7 +189,7 @@ describe('FindDuplicatesQueryFactory', () => {
});
expect(query.trim()).toEqual(`query {
personCollection(filter: { id: { eq: \"uuid\" }}){
personCollection(filter: { id: { eq: "uuid" }}){
edges {
node {
__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 { 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 { 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 { FieldsStringFactory } from './fields-string.factory';
@ -145,7 +145,7 @@ export class FindDuplicatesQueryFactory {
private getApplicableDuplicateCriteriaCollection(
objectMetadataItem: ObjectMetadataInterface,
) {
return duplicateCriteriaCollection.filter(
return DUPLICATE_CRITERIA_COLLECTION.filter(
(duplicateCriteria) =>
duplicateCriteria.objectName === objectMetadataItem.nameSingular,
);

View File

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

View File

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

View File

@ -1,11 +1,11 @@
export * from './big-float-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-time-filter.input-type';
export * from './float-filter.input-type';
export * from './int-filter.input-type';
export * from './raw-json-filter.input-type';
export * from './string-filter.input-type';
export * from './time-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 { Request } from 'express';
@ -12,6 +12,8 @@ import { CreateAnalyticsInput } from './dto/create-analytics.input';
@Injectable()
export class AnalyticsService {
private readonly logger = new Logger(AnalyticsService.name);
constructor(
private readonly environmentService: EnvironmentService,
private readonly httpService: HttpService,
@ -53,7 +55,11 @@ export class AnalyticsService {
try {
await this.httpService.axiosRef.post('/v1', data);
} catch {}
} catch {
this.logger.error('Failed to send analytics event');
return { success: false };
}
return { success: true };
}

View File

@ -10,18 +10,14 @@ export class GoogleAPIsOauthGuard extends AuthGuard('google-apis') {
}
async canActivate(context: ExecutionContext) {
try {
const request = context.switchToHttp().getRequest();
const transientToken = request.query.transientToken;
const request = context.switchToHttp().getRequest();
const transientToken = request.query.transientToken;
if (transientToken && typeof transientToken === 'string') {
request.params.transientToken = transientToken;
}
const activate = (await super.canActivate(context)) as boolean;
return activate;
} catch (ex) {
throw ex;
if (transientToken && typeof transientToken === 'string') {
request.params.transientToken = transientToken;
}
const activate = (await super.canActivate(context)) as boolean;
return activate;
}
}

View File

@ -10,18 +10,14 @@ export class GoogleOauthGuard extends AuthGuard('google') {
}
async canActivate(context: ExecutionContext) {
try {
const request = context.switchToHttp().getRequest();
const workspaceInviteHash = request.query.inviteHash;
const request = context.switchToHttp().getRequest();
const workspaceInviteHash = request.query.inviteHash;
if (workspaceInviteHash && typeof workspaceInviteHash === 'string') {
request.params.workspaceInviteHash = workspaceInviteHash;
}
const activate = (await super.canActivate(context)) as boolean;
return activate;
} catch (ex) {
throw ex;
if (workspaceInviteHash && typeof workspaceInviteHash === 'string') {
request.params.workspaceInviteHash = workspaceInviteHash;
}
const activate = (await super.canActivate(context)) as boolean;
return activate;
}
}

View File

@ -202,7 +202,11 @@ export class BillingService {
quantity = await this.userWorkspaceService.getWorkspaceMemberCount(
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(
user,

View File

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

View File

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

View File

@ -13,7 +13,7 @@ export function IsValidMetadataName(validationOptions?: ValidationOptions) {
options: validationOptions,
validator: {
validate(value: any) {
return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'\"\\;.=*/]+$/.test(
return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'"\\;.=*/]+$/.test(
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()) {
return (this.cache as RedisCache).store.client.sPop(
`${this.namespace}:${key}`,

View File

@ -38,24 +38,24 @@ export class EnvironmentVariables {
@CastToBoolean()
@IsOptional()
@IsBoolean()
DEBUG_MODE: boolean = false;
DEBUG_MODE = false;
@CastToPositiveNumber()
@IsOptional()
@IsNumber()
@Min(0)
@Max(65535)
DEBUG_PORT: number = 9000;
DEBUG_PORT = 9000;
@CastToBoolean()
@IsOptional()
@IsBoolean()
SIGN_IN_PREFILLED: boolean = false;
SIGN_IN_PREFILLED = false;
@CastToBoolean()
@IsOptional()
@IsBoolean()
IS_BILLING_ENABLED: boolean = false;
IS_BILLING_ENABLED = false;
@IsString()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true)
@ -69,7 +69,7 @@ export class EnvironmentVariables {
@CastToPositiveNumber()
@IsOptional()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true)
BILLING_FREE_TRIAL_DURATION_IN_DAYS: number = 7;
BILLING_FREE_TRIAL_DURATION_IN_DAYS = 7;
@IsString()
@ValidateIf((env) => env.IS_BILLING_ENABLED === true)
@ -82,17 +82,17 @@ export class EnvironmentVariables {
@CastToBoolean()
@IsOptional()
@IsBoolean()
TELEMETRY_ENABLED: boolean = true;
TELEMETRY_ENABLED = true;
@CastToBoolean()
@IsOptional()
@IsBoolean()
TELEMETRY_ANONYMIZATION_ENABLED: boolean = true;
TELEMETRY_ANONYMIZATION_ENABLED = true;
@CastToPositiveNumber()
@IsNumber()
@IsOptional()
PORT: number = 3000;
PORT = 3000;
// Database
@IsDefined()
@ -118,33 +118,33 @@ export class EnvironmentVariables {
@IsDuration()
@IsOptional()
ACCESS_TOKEN_EXPIRES_IN: string = '30m';
ACCESS_TOKEN_EXPIRES_IN = '30m';
@IsString()
REFRESH_TOKEN_SECRET: string;
@IsDuration()
@IsOptional()
REFRESH_TOKEN_EXPIRES_IN: string = '30m';
REFRESH_TOKEN_EXPIRES_IN = '30m';
@IsDuration()
@IsOptional()
REFRESH_TOKEN_COOL_DOWN: string = '1m';
REFRESH_TOKEN_COOL_DOWN = '1m';
@IsString()
LOGIN_TOKEN_SECRET: string = '30m';
LOGIN_TOKEN_SECRET = '30m';
@IsDuration()
@IsOptional()
LOGIN_TOKEN_EXPIRES_IN: string = '15m';
LOGIN_TOKEN_EXPIRES_IN = '15m';
@IsString()
@IsOptional()
FILE_TOKEN_SECRET: string = 'random_string';
FILE_TOKEN_SECRET = 'random_string';
@IsDuration()
@IsOptional()
FILE_TOKEN_EXPIRES_IN: string = '1d';
FILE_TOKEN_EXPIRES_IN = '1d';
// Auth
@IsUrl({ require_tld: false })
@ -154,7 +154,7 @@ export class EnvironmentVariables {
@CastToBoolean()
@IsOptional()
@IsBoolean()
AUTH_GOOGLE_ENABLED: boolean = false;
AUTH_GOOGLE_ENABLED = false;
@IsString()
@ValidateIf((env) => env.AUTH_GOOGLE_ENABLED === true)
@ -188,7 +188,7 @@ export class EnvironmentVariables {
@IsString()
@ValidateIf((env) => env.STORAGE_TYPE === StorageDriverType.Local)
STORAGE_LOCAL_PATH: string = '.local-storage';
STORAGE_LOCAL_PATH = '.local-storage';
// Support
@IsEnum(SupportDriver)
@ -210,7 +210,7 @@ export class EnvironmentVariables {
@CastToBoolean()
@IsBoolean()
@IsOptional()
LOGGER_IS_BUFFER_ENABLED: boolean = true;
LOGGER_IS_BUFFER_ENABLED = true;
@IsEnum(ExceptionHandlerDriver)
@IsOptional()
@ -253,7 +253,7 @@ export class EnvironmentVariables {
@IsDuration()
@IsOptional()
PASSWORD_RESET_TOKEN_EXPIRES_IN: string = '5m';
PASSWORD_RESET_TOKEN_EXPIRES_IN = '5m';
@CastToPositiveNumber()
@IsNumber()
@ -263,49 +263,49 @@ export class EnvironmentVariables {
'"WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION" should be strictly lower that "WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION"',
})
@ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION > 0)
WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION: number = 30;
WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION = 30;
@CastToPositiveNumber()
@IsNumber()
@ValidateIf((env) => env.WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION > 0)
WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION: number = 60;
WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION = 60;
@CastToBoolean()
@IsOptional()
@IsBoolean()
IS_SIGN_UP_DISABLED: boolean = false;
IS_SIGN_UP_DISABLED = false;
@CastToPositiveNumber()
@IsOptional()
@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()
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()
MESSAGING_PROVIDER_GMAIL_ENABLED: boolean = false;
MESSAGING_PROVIDER_GMAIL_ENABLED = false;
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_SMTP_HOST: string;
@CastToPositiveNumber()
EMAIL_SMTP_PORT: number = 587;
EMAIL_SMTP_PORT = 587;
EMAIL_SMTP_USER: string;
@ -314,18 +314,18 @@ export class EnvironmentVariables {
OPENROUTER_API_KEY: string;
@CastToPositiveNumber()
API_RATE_LIMITING_TTL: number = 100;
API_RATE_LIMITING_TTL = 100;
@CastToPositiveNumber()
API_RATE_LIMITING_LIMIT: number = 500;
API_RATE_LIMITING_LIMIT = 500;
CACHE_STORAGE_TYPE: string = 'memory';
CACHE_STORAGE_TYPE = 'memory';
@CastToPositiveNumber()
CACHE_STORAGE_TTL: number = 3600 * 24 * 7;
@CastToBoolean()
CALENDAR_PROVIDER_GOOGLE_ENABLED: boolean = false;
CALENDAR_PROVIDER_GOOGLE_ENABLED = false;
AUTH_GOOGLE_APIS_CALLBACK_URL: string;

View File

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

View File

@ -52,6 +52,7 @@ export class BeforeUpdateOneObject<T extends UpdateObjectInput>
if (!objectMetadata.isCustom) {
if (
Object.keys(instance.update).length === 1 &&
// eslint-disable-next-line no-prototype-builtins
instance.update.hasOwnProperty('isActive') &&
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 { generateMigrationName } from 'src/engine/metadata-modules/workspace-migration/utils/generate-migration-name.util';
import {
activityTargetStandardFieldIds,
attachmentStandardFieldIds,
baseObjectStandardFieldIds,
customObjectStandardFieldIds,
favoriteStandardFieldIds,
timelineActivityStandardFieldIds,
ACTIVITY_TARGET_STANDARD_FIELD_IDS,
ATTACHMENT_STANDARD_FIELD_IDS,
BASE_OBJECT_STANDARD_FIELD_IDS,
CUSTOM_OBJECT_STANDARD_FIELD_IDS,
FAVORITE_STANDARD_FIELD_IDS,
TIMELINE_ACTIVITY_STANDARD_FIELD_IDS,
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
import {
createForeignKeyDeterministicUuid,
@ -262,7 +262,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
// 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,
name: 'id',
label: 'Id',
@ -276,7 +276,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'uuid',
},
{
standardId: customObjectStandardFieldIds.name,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
name: 'name',
label: 'Name',
@ -289,7 +289,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: "'Untitled'",
},
{
standardId: baseObjectStandardFieldIds.createdAt,
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.createdAt,
type: FieldMetadataType.DATE_TIME,
name: 'createdAt',
label: 'Creation date',
@ -302,7 +302,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'now',
},
{
standardId: baseObjectStandardFieldIds.updatedAt,
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt,
type: FieldMetadataType.DATE_TIME,
name: 'updatedAt',
label: 'Update date',
@ -316,7 +316,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
defaultValue: 'now',
},
{
standardId: customObjectStandardFieldIds.position,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION,
name: 'position',
label: 'Position',
@ -464,7 +464,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
createdObjectMetadata: ObjectMetadataEntity,
lastDataSourceMetadata: DataSourceEntity,
workspaceDataSource: DataSource | undefined,
isRemoteObject: boolean = false,
isRemoteObject = false,
) {
const isRelationEnabledForRemoteObjects =
await this.isRelationEnabledForRemoteObjects(
@ -535,7 +535,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([
// FROM
{
standardId: customObjectStandardFieldIds.activityTargets,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.activityTargets,
objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId,
isCustom: false,
@ -551,7 +551,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: activityTargetStandardFieldIds.custom,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: activityTargetObjectMetadata.id,
workspaceId: workspaceId,
@ -568,7 +568,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: activityTargetStandardFieldIds.custom,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: activityTargetObjectMetadata.id,
workspaceId: workspaceId,
@ -630,7 +630,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([
// FROM
{
standardId: customObjectStandardFieldIds.attachments,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.attachments,
objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId,
isCustom: false,
@ -646,7 +646,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: attachmentStandardFieldIds.custom,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: attachmentObjectMetadata.id,
workspaceId: workspaceId,
@ -663,7 +663,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: attachmentStandardFieldIds.custom,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: attachmentObjectMetadata.id,
workspaceId: workspaceId,
@ -723,7 +723,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([
// FROM
{
standardId: customObjectStandardFieldIds.timelineActivities,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.timelineActivities,
objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId,
isCustom: false,
@ -739,7 +739,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: timelineActivityStandardFieldIds.custom,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: timelineActivityObjectMetadata.id,
workspaceId: workspaceId,
@ -756,7 +756,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: timelineActivityStandardFieldIds.custom,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: timelineActivityObjectMetadata.id,
workspaceId: workspaceId,
@ -818,7 +818,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
await this.fieldMetadataRepository.save([
// FROM
{
standardId: customObjectStandardFieldIds.favorites,
standardId: CUSTOM_OBJECT_STANDARD_FIELD_IDS.favorites,
objectMetadataId: createdObjectMetadata.id,
workspaceId: workspaceId,
isCustom: false,
@ -835,7 +835,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createRelationDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: favoriteStandardFieldIds.custom,
standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: favoriteObjectMetadata.id,
workspaceId: workspaceId,
@ -852,7 +852,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
{
standardId: createForeignKeyDeterministicUuid({
objectId: createdObjectMetadata.id,
standardId: favoriteStandardFieldIds.custom,
standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
}),
objectMetadataId: favoriteObjectMetadata.id,
workspaceId: workspaceId,

View File

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

View File

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

View File

@ -1,9 +1,9 @@
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
import {
baseObjectStandardFieldIds,
personStandardFieldIds,
BASE_OBJECT_STANDARD_FIELD_IDS,
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';
export const viewPersonFields = (
viewId: string,
@ -12,8 +12,8 @@ export const viewPersonFields = (
return [
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.name
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.name
],
viewId: viewId,
position: 0,
@ -22,8 +22,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.email
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.email
],
viewId: viewId,
position: 1,
@ -32,8 +32,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.company
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.company
],
viewId: viewId,
position: 2,
@ -42,8 +42,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.phone
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.phone
],
viewId: viewId,
position: 3,
@ -52,8 +52,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
baseObjectStandardFieldIds.createdAt
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
],
viewId: viewId,
position: 4,
@ -62,8 +62,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.city
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.city
],
viewId: viewId,
position: 5,
@ -72,8 +72,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.jobTitle
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.jobTitle
],
viewId: viewId,
position: 6,
@ -82,8 +82,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.linkedinLink
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.linkedinLink
],
viewId: viewId,
position: 7,
@ -92,8 +92,8 @@ export const viewPersonFields = (
},
{
fieldMetadataId:
objectMetadataMap[standardObjectIds.person].fields[
personStandardFieldIds.xLink
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
PERSON_STANDARD_FIELD_IDS.xLink
],
viewId: viewId,
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 { 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 { standardObjectIds } 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 { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { OPPORTUNITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
export const viewPrefillData = async (
entityManager: EntityManager,
@ -27,7 +27,7 @@ export const viewPrefillData = async (
.values([
{
name: 'All Companies',
objectMetadataId: objectMetadataMap[standardObjectIds.company].id,
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.company].id,
type: 'table',
key: 'INDEX',
position: 0,
@ -36,7 +36,7 @@ export const viewPrefillData = async (
},
{
name: 'All People',
objectMetadataId: objectMetadataMap[standardObjectIds.person].id,
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.person].id,
type: 'table',
key: 'INDEX',
position: 0,
@ -45,7 +45,7 @@ export const viewPrefillData = async (
},
{
name: 'All Opportunities',
objectMetadataId: objectMetadataMap[standardObjectIds.opportunity].id,
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].id,
type: 'table',
key: 'INDEX',
position: 0,
@ -54,14 +54,14 @@ export const viewPrefillData = async (
},
{
name: 'By Stage',
objectMetadataId: objectMetadataMap[standardObjectIds.opportunity].id,
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].id,
type: 'kanban',
key: null,
position: 1,
icon: 'IconLayoutKanban',
kanbanFieldMetadataId:
objectMetadataMap[standardObjectIds.opportunity].fields[
opportunityStandardFieldIds.stage
objectMetadataMap[STANDARD_OBJECT_IDS.opportunity].fields[
OPPORTUNITY_STANDARD_FIELD_IDS.stage
],
},
])

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ export class StandardObjectFactory {
if (!objectMetadata) {
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) {
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 { 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 { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
export abstract class BaseObjectMetadata {
@FieldMetadata({
standardId: baseObjectStandardFieldIds.id,
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.id,
type: FieldMetadataType.UUID,
label: 'Id',
description: 'Id',
@ -16,7 +16,7 @@ export abstract class BaseObjectMetadata {
id: string;
@FieldMetadata({
standardId: baseObjectStandardFieldIds.createdAt,
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.createdAt,
type: FieldMetadataType.DATE_TIME,
label: 'Creation date',
description: 'Creation date',
@ -26,7 +26,7 @@ export abstract class BaseObjectMetadata {
createdAt: Date;
@FieldMetadata({
standardId: baseObjectStandardFieldIds.updatedAt,
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt,
type: FieldMetadataType.DATE_TIME,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { ACTIVITY_TARGET_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.activityTarget,
standardId: STANDARD_OBJECT_IDS.activityTarget,
namePlural: 'activityTargets',
labelSingular: 'Activity Target',
labelPlural: 'Activity Targets',
@ -28,7 +28,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged()
export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: activityTargetStandardFieldIds.activity,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION,
label: 'Activity',
description: 'ActivityTarget activity',
@ -39,7 +39,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
activity: Relation<ActivityObjectMetadata>;
@FieldMetadata({
standardId: activityTargetStandardFieldIds.person,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'ActivityTarget person',
@ -50,7 +50,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: activityTargetStandardFieldIds.company,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION,
label: 'Company',
description: 'ActivityTarget company',
@ -61,7 +61,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>;
@FieldMetadata({
standardId: activityTargetStandardFieldIds.opportunity,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION,
label: 'Opportunity',
description: 'ActivityTarget opportunity',
@ -72,7 +72,7 @@ export class ActivityTargetObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: activityTargetStandardFieldIds.custom,
standardId: ACTIVITY_TARGET_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular,
description: `ActivityTarget ${oppositeObjectMetadata.labelSingular}`,

View File

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

View File

@ -1,8 +1,8 @@
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 { commentStandardFieldIds } 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 { COMMENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.comment,
standardId: STANDARD_OBJECT_IDS.comment,
namePlural: 'comments',
labelSingular: 'Comment',
labelPlural: 'Comments',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged()
export class CommentObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: commentStandardFieldIds.body,
standardId: COMMENT_STANDARD_FIELD_IDS.body,
type: FieldMetadataType.TEXT,
label: 'Body',
description: 'Comment body',
@ -32,7 +32,7 @@ export class CommentObjectMetadata extends BaseObjectMetadata {
body: string;
@FieldMetadata({
standardId: commentStandardFieldIds.author,
standardId: COMMENT_STANDARD_FIELD_IDS.author,
type: FieldMetadataType.RELATION,
label: 'Author',
description: 'Comment author',
@ -42,7 +42,7 @@ export class CommentObjectMetadata extends BaseObjectMetadata {
author: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({
standardId: commentStandardFieldIds.activity,
standardId: COMMENT_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION,
label: 'Activity',
description: 'Comment activity',

View File

@ -1,6 +1,6 @@
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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { API_KEY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.apiKey,
standardId: STANDARD_OBJECT_IDS.apiKey,
namePlural: 'apiKeys',
labelSingular: 'Api Key',
labelPlural: 'Api Keys',
@ -20,7 +20,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
@IsNotAuditLogged()
export class ApiKeyObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: apiKeyStandardFieldIds.name,
standardId: API_KEY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Name',
description: 'ApiKey name',
@ -29,7 +29,7 @@ export class ApiKeyObjectMetadata extends BaseObjectMetadata {
name: string;
@FieldMetadata({
standardId: apiKeyStandardFieldIds.expiresAt,
standardId: API_KEY_STANDARD_FIELD_IDS.expiresAt,
type: FieldMetadataType.DATE_TIME,
label: 'Expiration date',
description: 'ApiKey expiration date',
@ -38,7 +38,7 @@ export class ApiKeyObjectMetadata extends BaseObjectMetadata {
expiresAt: Date;
@FieldMetadata({
standardId: apiKeyStandardFieldIds.revokedAt,
standardId: API_KEY_STANDARD_FIELD_IDS.revokedAt,
type: FieldMetadataType.DATE_TIME,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { ATTACHMENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.attachment,
standardId: STANDARD_OBJECT_IDS.attachment,
namePlural: 'attachments',
labelSingular: 'Attachment',
labelPlural: 'Attachments',
@ -29,7 +29,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsNotAuditLogged()
export class AttachmentObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: attachmentStandardFieldIds.name,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Name',
description: 'Attachment name',
@ -38,7 +38,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
name: string;
@FieldMetadata({
standardId: attachmentStandardFieldIds.fullPath,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.fullPath,
type: FieldMetadataType.TEXT,
label: 'Full path',
description: 'Attachment full path',
@ -47,7 +47,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
fullPath: string;
@FieldMetadata({
standardId: attachmentStandardFieldIds.type,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.TEXT,
label: 'Type',
description: 'Attachment type',
@ -56,7 +56,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
type: string;
@FieldMetadata({
standardId: attachmentStandardFieldIds.author,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.author,
type: FieldMetadataType.RELATION,
label: 'Author',
description: 'Attachment author',
@ -66,7 +66,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
author: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({
standardId: attachmentStandardFieldIds.activity,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.activity,
type: FieldMetadataType.RELATION,
label: 'Activity',
description: 'Attachment activity',
@ -77,7 +77,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
activity: Relation<ActivityObjectMetadata>;
@FieldMetadata({
standardId: attachmentStandardFieldIds.person,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Attachment person',
@ -88,7 +88,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: attachmentStandardFieldIds.company,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION,
label: 'Company',
description: 'Attachment company',
@ -99,7 +99,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>;
@FieldMetadata({
standardId: attachmentStandardFieldIds.opportunity,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION,
label: 'Opportunity',
description: 'Attachment opportunity',
@ -110,7 +110,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: attachmentStandardFieldIds.custom,
standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular,
label: oppositeObjectMetadata.labelSingular,
description: `Attachment ${oppositeObjectMetadata.labelSingular}`,

View File

@ -124,7 +124,9 @@ export class GoogleCalendarSyncService {
let nextPageToken: string | undefined;
const events: calendarV3.Schema$Event[] = [];
while (true) {
let hasMoreEvents = true;
while (hasMoreEvents) {
const googleCalendarEvents = await googleCalendarClient.events.list({
calendarId: 'primary',
maxResults: 500,
@ -146,7 +148,7 @@ export class GoogleCalendarSyncService {
events.push(...items);
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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.calendarChannelEventAssociation,
standardId: STANDARD_OBJECT_IDS.calendarChannelEventAssociation,
namePlural: 'calendarChannelEventAssociations',
labelSingular: 'Calendar Channel Event Association',
labelPlural: 'Calendar Channel Event Associations',
@ -27,7 +27,8 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
})
export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.calendarChannel,
standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.calendarChannel,
type: FieldMetadataType.RELATION,
label: 'Channel ID',
description: 'Channel ID',
@ -37,7 +38,8 @@ export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMet
calendarChannel: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.calendarEvent,
standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.calendarEvent,
type: FieldMetadataType.RELATION,
label: 'Event ID',
description: 'Event ID',
@ -47,7 +49,8 @@ export class CalendarChannelEventAssociationObjectMetadata extends BaseObjectMet
calendarEvent: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({
standardId: calendarChannelEventAssociationStandardFieldIds.eventExternalId,
standardId:
CALENDAR_CHANNEL_EVENT_ASSOCIATION_STANDARD_FIELD_IDS.eventExternalId,
type: FieldMetadataType.TEXT,
label: 'Event external ID',
description: 'Event external ID',

View File

@ -6,8 +6,8 @@ import {
} from 'src/engine/metadata-modules/relation-metadata/relation-metadata.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 { calendarChannelStandardFieldIds } 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 { CALENDAR_CHANNEL_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -24,7 +24,7 @@ export enum CalendarChannelVisibility {
}
@ObjectMetadata({
standardId: standardObjectIds.calendarChannel,
standardId: STANDARD_OBJECT_IDS.calendarChannel,
namePlural: 'calendarChannels',
labelSingular: 'Calendar Channel',
labelPlural: 'Calendar Channels',
@ -38,7 +38,7 @@ export enum CalendarChannelVisibility {
})
export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.connectedAccount,
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: FieldMetadataType.RELATION,
label: 'Connected Account',
description: 'Connected Account',
@ -48,7 +48,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
connectedAccount: Relation<ConnectedAccountObjectMetadata>;
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.handle,
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT,
label: 'Handle',
description: 'Handle',
@ -57,7 +57,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.visibility,
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.visibility,
type: FieldMetadataType.SELECT,
label: 'Visibility',
description: 'Visibility',
@ -81,7 +81,8 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
visibility: string;
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.isContactAutoCreationEnabled,
standardId:
CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isContactAutoCreationEnabled,
type: FieldMetadataType.BOOLEAN,
label: 'Is Contact Auto Creation Enabled',
description: 'Is Contact Auto Creation Enabled',
@ -91,7 +92,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
isContactAutoCreationEnabled: boolean;
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.isSyncEnabled,
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
type: FieldMetadataType.BOOLEAN,
label: 'Is Sync Enabled',
description: 'Is Sync Enabled',
@ -101,7 +102,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
isSyncEnabled: boolean;
@FieldMetadata({
standardId: calendarChannelStandardFieldIds.syncCursor,
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.syncCursor,
type: FieldMetadataType.TEXT,
label: 'Sync Cursor',
description:
@ -112,7 +113,7 @@ export class CalendarChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId:
calendarChannelStandardFieldIds.calendarChannelEventAssociations,
CALENDAR_CHANNEL_STANDARD_FIELD_IDS.calendarChannelEventAssociations,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -22,7 +22,7 @@ export enum CalendarEventParticipantResponseStatus {
}
@ObjectMetadata({
standardId: standardObjectIds.calendarEventParticipant,
standardId: STANDARD_OBJECT_IDS.calendarEventParticipant,
namePlural: 'calendarEventParticipants',
labelSingular: 'Calendar event participant',
labelPlural: 'Calendar event participants',
@ -36,7 +36,7 @@ export enum CalendarEventParticipantResponseStatus {
})
export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.calendarEvent,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.calendarEvent,
type: FieldMetadataType.RELATION,
label: 'Event ID',
description: 'Event ID',
@ -46,7 +46,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
calendarEvent: Relation<CalendarEventObjectMetadata>;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.handle,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT,
label: 'Handle',
description: 'Handle',
@ -55,7 +55,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.displayName,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.displayName,
type: FieldMetadataType.TEXT,
label: 'Display Name',
description: 'Display Name',
@ -64,7 +64,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
displayName: string;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.isOrganizer,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.isOrganizer,
type: FieldMetadataType.BOOLEAN,
label: 'Is Organizer',
description: 'Is Organizer',
@ -74,7 +74,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
isOrganizer: boolean;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.responseStatus,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.responseStatus,
type: FieldMetadataType.SELECT,
label: 'Response Status',
description: 'Response Status',
@ -110,7 +110,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
responseStatus: string;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.person,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Person',
@ -121,7 +121,7 @@ export class CalendarEventParticipantObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: calendarEventParticipantStandardFieldIds.workspaceMember,
standardId: CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } 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 { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-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 { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
@ObjectMetadata({
standardId: standardObjectIds.calendarEvent,
standardId: STANDARD_OBJECT_IDS.calendarEvent,
namePlural: 'calendarEvents',
labelSingular: 'Calendar event',
labelPlural: 'Calendar events',
@ -35,7 +35,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
})
export class CalendarEventObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: calendarEventStandardFieldIds.title,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.title,
type: FieldMetadataType.TEXT,
label: 'Title',
description: 'Title',
@ -44,7 +44,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
title: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.isCanceled,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.isCanceled,
type: FieldMetadataType.BOOLEAN,
label: 'Is canceled',
description: 'Is canceled',
@ -53,7 +53,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
isCanceled: boolean;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.isFullDay,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.isFullDay,
type: FieldMetadataType.BOOLEAN,
label: 'Is Full Day',
description: 'Is Full Day',
@ -62,7 +62,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
isFullDay: boolean;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.startsAt,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.startsAt,
type: FieldMetadataType.DATE_TIME,
label: 'Start Date',
description: 'Start Date',
@ -72,7 +72,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
startsAt: string | null;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.endsAt,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.endsAt,
type: FieldMetadataType.DATE_TIME,
label: 'End Date',
description: 'End Date',
@ -82,7 +82,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
endsAt: string | null;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.externalCreatedAt,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.externalCreatedAt,
type: FieldMetadataType.DATE_TIME,
label: 'Creation DateTime',
description: 'Creation DateTime',
@ -92,7 +92,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
externalCreatedAt: string | null;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.externalUpdatedAt,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.externalUpdatedAt,
type: FieldMetadataType.DATE_TIME,
label: 'Update DateTime',
description: 'Update DateTime',
@ -102,7 +102,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
externalUpdatedAt: string | null;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.description,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.description,
type: FieldMetadataType.TEXT,
label: 'Description',
description: 'Description',
@ -111,7 +111,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
description: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.location,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.location,
type: FieldMetadataType.TEXT,
label: 'Location',
description: 'Location',
@ -120,7 +120,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
location: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.iCalUID,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.iCalUID,
type: FieldMetadataType.TEXT,
label: 'iCal UID',
description: 'iCal UID',
@ -129,7 +129,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
iCalUID: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.conferenceSolution,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.conferenceSolution,
type: FieldMetadataType.TEXT,
label: 'Conference Solution',
description: 'Conference Solution',
@ -138,7 +138,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
conferenceSolution: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.conferenceLink,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.conferenceLink,
type: FieldMetadataType.LINK,
label: 'Meet Link',
description: 'Meet Link',
@ -148,7 +148,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
conferenceLink: LinkMetadata;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.recurringEventExternalId,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.recurringEventExternalId,
type: FieldMetadataType.TEXT,
label: 'Recurring Event ID',
description: 'Recurring Event ID',
@ -157,7 +157,8 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
recurringEventExternalId: string;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.calendarChannelEventAssociations,
standardId:
CALENDAR_EVENT_STANDARD_FIELD_IDS.calendarChannelEventAssociations,
type: FieldMetadataType.RELATION,
label: 'Calendar Channel Event Associations',
description: 'Calendar Channel Event Associations',
@ -177,7 +178,7 @@ export class CalendarEventObjectMetadata extends BaseObjectMetadata {
>;
@FieldMetadata({
standardId: calendarEventStandardFieldIds.calendarEventParticipants,
standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.calendarEventParticipants,
type: FieldMetadataType.RELATION,
label: 'Event Participants',
description: 'Event Participants',

View File

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

View File

@ -6,8 +6,8 @@ import {
RelationMetadataType,
RelationOnDeleteAction,
} 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { CONNECTED_ACCOUNT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -25,7 +25,7 @@ export enum ConnectedAccountProvider {
}
@ObjectMetadata({
standardId: standardObjectIds.connectedAccount,
standardId: STANDARD_OBJECT_IDS.connectedAccount,
namePlural: 'connectedAccounts',
labelSingular: 'Connected Account',
labelPlural: 'Connected Accounts',
@ -36,7 +36,7 @@ export enum ConnectedAccountProvider {
@IsNotAuditLogged()
export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.handle,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT,
label: 'handle',
description: 'The account handle (email, username, phone number, etc.)',
@ -45,7 +45,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.provider,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.provider,
type: FieldMetadataType.TEXT,
label: 'provider',
description: 'The account provider',
@ -54,7 +54,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
provider: ConnectedAccountProvider; // field metadata should be a SELECT
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.accessToken,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.accessToken,
type: FieldMetadataType.TEXT,
label: 'Access Token',
description: 'Messaging provider access token',
@ -63,7 +63,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
accessToken: string;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.refreshToken,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.refreshToken,
type: FieldMetadataType.TEXT,
label: 'Refresh Token',
description: 'Messaging provider refresh token',
@ -72,7 +72,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
refreshToken: string;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.accountOwner,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.accountOwner,
type: FieldMetadataType.RELATION,
label: 'Account Owner',
description: 'Account Owner',
@ -82,7 +82,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
accountOwner: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.lastSyncHistoryId,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.lastSyncHistoryId,
type: FieldMetadataType.TEXT,
label: 'Last sync history ID',
description: 'Last sync history ID',
@ -91,7 +91,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
lastSyncHistoryId: string;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.authFailedAt,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.authFailedAt,
type: FieldMetadataType.DATE_TIME,
label: 'Auth failed at',
description: 'Auth failed at',
@ -101,7 +101,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
authFailedAt: Date;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.messageChannels,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.messageChannels,
type: FieldMetadataType.RELATION,
label: 'Message Channel',
description: 'Message Channel',
@ -115,7 +115,7 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
messageChannels: Relation<MessageChannelObjectMetadata[]>;
@FieldMetadata({
standardId: connectedAccountStandardFieldIds.calendarChannels,
standardId: CONNECTED_ACCOUNT_STANDARD_FIELD_IDS.calendarChannels,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { FAVORITE_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.favorite,
standardId: STANDARD_OBJECT_IDS.favorite,
namePlural: 'favorites',
labelSingular: 'Favorite',
labelPlural: 'Favorites',
@ -28,7 +28,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class FavoriteObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: favoriteStandardFieldIds.position,
standardId: FAVORITE_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER,
label: 'Position',
description: 'Favorite position',
@ -39,7 +39,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
// Relations
@FieldMetadata({
standardId: favoriteStandardFieldIds.workspaceMember,
standardId: FAVORITE_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION,
label: 'Workspace Member',
description: 'Favorite workspace member',
@ -49,7 +49,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
workspaceMember: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({
standardId: favoriteStandardFieldIds.person,
standardId: FAVORITE_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Favorite person',
@ -60,7 +60,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: favoriteStandardFieldIds.company,
standardId: FAVORITE_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION,
label: 'Company',
description: 'Favorite company',
@ -71,7 +71,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>;
@FieldMetadata({
standardId: favoriteStandardFieldIds.opportunity,
standardId: FAVORITE_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION,
label: 'Opportunity',
description: 'Favorite opportunity',
@ -82,7 +82,7 @@ export class FavoriteObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: favoriteStandardFieldIds.custom,
standardId: FAVORITE_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular,
label: 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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.messageChannelMessageAssociation,
standardId: STANDARD_OBJECT_IDS.messageChannelMessageAssociation,
namePlural: 'messageChannelMessageAssociations',
labelSingular: 'Message Channel Message Association',
labelPlural: 'Message Channel Message Associations',
@ -25,7 +25,8 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.messageChannel,
standardId:
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageChannel,
type: FieldMetadataType.RELATION,
label: 'Message Channel Id',
description: 'Message Channel Id',
@ -36,7 +37,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
messageChannel: Relation<MessageChannelObjectMetadata>;
@FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.message,
standardId: MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.message,
type: FieldMetadataType.RELATION,
label: 'Message Id',
description: 'Message Id',
@ -48,7 +49,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
@FieldMetadata({
standardId:
messageChannelMessageAssociationStandardFieldIds.messageExternalId,
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageExternalId,
type: FieldMetadataType.TEXT,
label: 'Message External Id',
description: 'Message id from the messaging provider',
@ -58,7 +59,8 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
messageExternalId: string;
@FieldMetadata({
standardId: messageChannelMessageAssociationStandardFieldIds.messageThread,
standardId:
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageThread,
type: FieldMetadataType.RELATION,
label: 'Message Thread Id',
description: 'Message Thread Id',
@ -70,7 +72,7 @@ export class MessageChannelMessageAssociationObjectMetadata extends BaseObjectMe
@FieldMetadata({
standardId:
messageChannelMessageAssociationStandardFieldIds.messageThreadExternalId,
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_STANDARD_FIELD_IDS.messageThreadExternalId,
type: FieldMetadataType.TEXT,
label: 'Thread External Id',
description: 'Thread id from the messaging provider',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType,
RelationOnDeleteAction,
} 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { MESSAGE_CHANNEL_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -36,7 +36,7 @@ export enum MessageChannelType {
}
@ObjectMetadata({
standardId: standardObjectIds.messageChannel,
standardId: STANDARD_OBJECT_IDS.messageChannel,
namePlural: 'messageChannels',
labelSingular: 'Message Channel',
labelPlural: 'Message Channels',
@ -47,7 +47,7 @@ export enum MessageChannelType {
@IsSystem()
export class MessageChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: messageChannelStandardFieldIds.visibility,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.visibility,
type: FieldMetadataType.SELECT,
label: 'Visibility',
description: 'Visibility',
@ -77,7 +77,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
visibility: string;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.handle,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT,
label: 'Handle',
description: 'Handle',
@ -86,7 +86,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.connectedAccount,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: FieldMetadataType.RELATION,
label: 'Connected Account',
description: 'Connected Account',
@ -96,7 +96,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
connectedAccount: Relation<ConnectedAccountObjectMetadata>;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.type,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.type,
type: FieldMetadataType.SELECT,
label: 'Type',
description: 'Channel Type',
@ -120,7 +120,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
type: string;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.isContactAutoCreationEnabled,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isContactAutoCreationEnabled,
type: FieldMetadataType.BOOLEAN,
label: 'Is Contact Auto Creation Enabled',
description: 'Is Contact Auto Creation Enabled',
@ -130,7 +130,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
isContactAutoCreationEnabled: boolean;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.isSyncEnabled,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
type: FieldMetadataType.BOOLEAN,
label: 'Is Sync Enabled',
description: 'Is Sync Enabled',
@ -141,7 +141,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId:
messageChannelStandardFieldIds.messageChannelMessageAssociations,
MESSAGE_CHANNEL_STANDARD_FIELD_IDS.messageChannelMessageAssociations,
type: FieldMetadataType.RELATION,
label: 'Message Channel Association',
description: 'Messages from the channel.',
@ -158,7 +158,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
>;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.syncCursor,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncCursor,
type: FieldMetadataType.TEXT,
label: 'Last sync cursor',
description: 'Last sync cursor',
@ -167,7 +167,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncCursor: string;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.syncedAt,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncedAt,
type: FieldMetadataType.DATE_TIME,
label: 'Last sync date',
description: 'Last sync date',
@ -177,7 +177,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncedAt: string;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.syncStatus,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncStatus,
type: FieldMetadataType.SELECT,
label: 'Last sync status',
description: 'Last sync status',
@ -213,7 +213,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
syncStatus: MessageChannelSyncStatus;
@FieldMetadata({
standardId: messageChannelStandardFieldIds.ongoingSyncStartedAt,
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.ongoingSyncStartedAt,
type: FieldMetadataType.DATE_TIME,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.messageParticipant,
standardId: STANDARD_OBJECT_IDS.messageParticipant,
namePlural: 'messageParticipants',
labelSingular: 'Message Participant',
labelPlural: 'Message Participants',
@ -25,7 +25,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.message,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.message,
type: FieldMetadataType.RELATION,
label: 'Message',
description: 'Message',
@ -35,7 +35,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
message: Relation<MessageObjectMetadata>;
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.role,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.role,
type: FieldMetadataType.SELECT,
label: 'Role',
description: 'Role',
@ -51,7 +51,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
role: string;
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.handle,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.handle,
type: FieldMetadataType.TEXT,
label: 'Handle',
description: 'Handle',
@ -60,7 +60,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
handle: string;
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.displayName,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.displayName,
type: FieldMetadataType.TEXT,
label: 'Display Name',
description: 'Display Name',
@ -69,7 +69,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
displayName: string;
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.person,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Person',
@ -80,7 +80,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: messageParticipantStandardFieldIds.workspaceMember,
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION,
label: 'Workspace Member',
description: 'Workspace member',

View File

@ -5,8 +5,8 @@ import {
RelationMetadataType,
RelationOnDeleteAction,
} 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { MESSAGE_THREAD_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.messageThread,
standardId: STANDARD_OBJECT_IDS.messageThread,
namePlural: 'messageThreads',
labelSingular: 'Message Thread',
labelPlural: 'Message Threads',
@ -29,7 +29,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class MessageThreadObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: messageThreadStandardFieldIds.messages,
standardId: MESSAGE_THREAD_STANDARD_FIELD_IDS.messages,
type: FieldMetadataType.RELATION,
label: 'Messages',
description: 'Messages from the thread.',
@ -44,7 +44,8 @@ export class MessageThreadObjectMetadata extends BaseObjectMetadata {
messages: Relation<MessageObjectMetadata[]>;
@FieldMetadata({
standardId: messageThreadStandardFieldIds.messageChannelMessageAssociations,
standardId:
MESSAGE_THREAD_STANDARD_FIELD_IDS.messageChannelMessageAssociations,
type: FieldMetadataType.RELATION,
label: 'Message Channel Association',
description: 'Messages from the channel.',

View File

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

View File

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

View File

@ -7,8 +7,8 @@ import {
RelationMetadataType,
RelationOnDeleteAction,
} 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { PERSON_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -26,7 +26,7 @@ import { OpportunityObjectMetadata } from 'src/modules/opportunity/standard-obje
import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-objects/timeline-activity.object-metadata';
@ObjectMetadata({
standardId: standardObjectIds.person,
standardId: STANDARD_OBJECT_IDS.person,
namePlural: 'people',
labelSingular: 'Person',
labelPlural: 'People',
@ -35,7 +35,7 @@ import { TimelineActivityObjectMetadata } from 'src/modules/timeline/standard-ob
})
export class PersonObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: personStandardFieldIds.name,
standardId: PERSON_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.FULL_NAME,
label: 'Name',
description: 'Contacts name',
@ -45,7 +45,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
name: FullNameMetadata;
@FieldMetadata({
standardId: personStandardFieldIds.email,
standardId: PERSON_STANDARD_FIELD_IDS.email,
type: FieldMetadataType.EMAIL,
label: 'Email',
description: 'Contacts Email',
@ -54,7 +54,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
email: string;
@FieldMetadata({
standardId: personStandardFieldIds.linkedinLink,
standardId: PERSON_STANDARD_FIELD_IDS.linkedinLink,
type: FieldMetadataType.LINK,
label: 'Linkedin',
description: 'Contacts Linkedin account',
@ -64,7 +64,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
linkedinLink: LinkMetadata;
@FieldMetadata({
standardId: personStandardFieldIds.xLink,
standardId: PERSON_STANDARD_FIELD_IDS.xLink,
type: FieldMetadataType.LINK,
label: 'X',
description: 'Contacts X/Twitter account',
@ -74,7 +74,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
xLink: LinkMetadata;
@FieldMetadata({
standardId: personStandardFieldIds.jobTitle,
standardId: PERSON_STANDARD_FIELD_IDS.jobTitle,
type: FieldMetadataType.TEXT,
label: 'Job Title',
description: 'Contacts job title',
@ -83,7 +83,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
jobTitle: string;
@FieldMetadata({
standardId: personStandardFieldIds.phone,
standardId: PERSON_STANDARD_FIELD_IDS.phone,
type: FieldMetadataType.TEXT,
label: 'Phone',
description: 'Contacts phone number',
@ -92,7 +92,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
phone: string;
@FieldMetadata({
standardId: personStandardFieldIds.city,
standardId: PERSON_STANDARD_FIELD_IDS.city,
type: FieldMetadataType.TEXT,
label: 'City',
description: 'Contacts city',
@ -101,7 +101,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
city: string;
@FieldMetadata({
standardId: personStandardFieldIds.avatarUrl,
standardId: PERSON_STANDARD_FIELD_IDS.avatarUrl,
type: FieldMetadataType.TEXT,
label: 'Avatar',
description: 'Contacts avatar',
@ -111,7 +111,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
avatarUrl: string;
@FieldMetadata({
standardId: personStandardFieldIds.position,
standardId: PERSON_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.POSITION,
label: 'Position',
description: 'Person record Position',
@ -123,7 +123,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
// Relations
@FieldMetadata({
standardId: personStandardFieldIds.company,
standardId: PERSON_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION,
label: 'Company',
description: 'Contacts company',
@ -134,7 +134,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>;
@FieldMetadata({
standardId: personStandardFieldIds.pointOfContactForOpportunities,
standardId: PERSON_STANDARD_FIELD_IDS.pointOfContactForOpportunities,
type: FieldMetadataType.RELATION,
label: 'POC for Opportunities',
description: 'Point of Contact for Opportunities',
@ -149,7 +149,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
pointOfContactForOpportunities: Relation<OpportunityObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.activityTargets,
standardId: PERSON_STANDARD_FIELD_IDS.activityTargets,
type: FieldMetadataType.RELATION,
label: 'Activities',
description: 'Activities tied to the contact',
@ -163,7 +163,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
activityTargets: Relation<ActivityTargetObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.favorites,
standardId: PERSON_STANDARD_FIELD_IDS.favorites,
type: FieldMetadataType.RELATION,
label: 'Favorites',
description: 'Favorites linked to the contact',
@ -178,7 +178,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
favorites: Relation<FavoriteObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.attachments,
standardId: PERSON_STANDARD_FIELD_IDS.attachments,
type: FieldMetadataType.RELATION,
label: 'Attachments',
description: 'Attachments linked to the contact.',
@ -192,7 +192,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
attachments: Relation<AttachmentObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.messageParticipants,
standardId: PERSON_STANDARD_FIELD_IDS.messageParticipants,
type: FieldMetadataType.RELATION,
label: 'Message Participants',
description: 'Message Participants',
@ -208,7 +208,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
messageParticipants: Relation<MessageParticipantObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.calendarEventParticipants,
standardId: PERSON_STANDARD_FIELD_IDS.calendarEventParticipants,
type: FieldMetadataType.RELATION,
label: 'Calendar Event Participants',
description: 'Calendar Event Participants',
@ -226,7 +226,7 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
calendarEventParticipants: Relation<CalendarEventParticipantObjectMetadata[]>;
@FieldMetadata({
standardId: personStandardFieldIds.timelineActivities,
standardId: PERSON_STANDARD_FIELD_IDS.timelineActivities,
type: FieldMetadataType.RELATION,
label: 'Events',
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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { AUDIT_LOGS_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.auditLog,
standardId: STANDARD_OBJECT_IDS.auditLog,
namePlural: 'auditLogs',
labelSingular: 'Audit Log',
labelPlural: 'Audit Logs',
@ -21,7 +21,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
@IsSystem()
export class AuditLogObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: auditLogStandardFieldIds.name,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Event name',
description: 'Event name/type',
@ -30,7 +30,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
name: string;
@FieldMetadata({
standardId: auditLogStandardFieldIds.properties,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON,
label: 'Event details',
description: 'Json value for event details',
@ -40,7 +40,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
properties: JSON;
@FieldMetadata({
standardId: auditLogStandardFieldIds.context,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.context,
type: FieldMetadataType.RAW_JSON,
label: 'Event context',
description:
@ -51,7 +51,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
context: JSON;
@FieldMetadata({
standardId: auditLogStandardFieldIds.objectName,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT,
label: 'Object name',
description: 'If the event is related to a particular object',
@ -60,7 +60,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
objectName: string;
@FieldMetadata({
standardId: auditLogStandardFieldIds.objectName,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT,
label: 'Object name',
description: 'If the event is related to a particular object',
@ -69,7 +69,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
objectMetadataId: string;
@FieldMetadata({
standardId: auditLogStandardFieldIds.recordId,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.recordId,
type: FieldMetadataType.UUID,
label: 'Object id',
description: 'Event name/type',
@ -79,7 +79,7 @@ export class AuditLogObjectMetadata extends BaseObjectMetadata {
recordId: string;
@FieldMetadata({
standardId: auditLogStandardFieldIds.workspaceMember,
standardId: AUDIT_LOGS_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { BEHAVIORAL_EVENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.behavioralEvent,
standardId: STANDARD_OBJECT_IDS.behavioralEvent,
namePlural: 'behavioralEvents',
labelSingular: 'Behavioral Event',
labelPlural: 'Behavioral Events',
@ -40,7 +40,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
*/
@FieldMetadata({
standardId: behavioralEventStandardFieldIds.name,
standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Event name',
description: 'Event name',
@ -49,7 +49,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
name: string;
@FieldMetadata({
standardId: behavioralEventStandardFieldIds.properties,
standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON,
label: 'Event details',
description: 'Json value for event details',
@ -59,7 +59,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
properties: JSON;
@FieldMetadata({
standardId: behavioralEventStandardFieldIds.context,
standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.context,
type: FieldMetadataType.RAW_JSON,
label: 'Event context',
description:
@ -70,7 +70,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
context: JSON;
@FieldMetadata({
standardId: behavioralEventStandardFieldIds.objectName,
standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.objectName,
type: FieldMetadataType.TEXT,
label: 'Object name',
description: 'If the event is related to a particular object',
@ -79,7 +79,7 @@ export class BehavioralEventObjectMetadata extends BaseObjectMetadata {
objectName: string;
@FieldMetadata({
standardId: behavioralEventStandardFieldIds.recordId,
standardId: BEHAVIORAL_EVENT_STANDARD_FIELD_IDS.recordId,
type: FieldMetadataType.UUID,
label: 'Object id',
description: 'Event name/type',

View File

@ -1,8 +1,8 @@
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 { timelineActivityStandardFieldIds } 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 { TIMELINE_ACTIVITY_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.timelineActivity,
standardId: STANDARD_OBJECT_IDS.timelineActivity,
namePlural: 'timelineActivities',
labelSingular: 'Timeline Activity',
labelPlural: 'Timeline Activities',
@ -28,7 +28,7 @@ import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-syn
@IsNotAuditLogged()
export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.happensAt,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.happensAt,
type: FieldMetadataType.DATE_TIME,
label: 'Creation date',
description: 'Creation date',
@ -38,7 +38,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
happensAt: Date;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.name,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.name,
type: FieldMetadataType.TEXT,
label: 'Event name',
description: 'Event name',
@ -47,7 +47,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
name: string;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.properties,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.properties,
type: FieldMetadataType.RAW_JSON,
label: 'Event details',
description: 'Json value for event details',
@ -58,7 +58,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
// Who made the action
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.workspaceMember,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.workspaceMember,
type: FieldMetadataType.RELATION,
label: 'Workspace Member',
description: 'Event workspace member',
@ -69,7 +69,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
workspaceMember: Relation<WorkspaceMemberObjectMetadata>;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.person,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.person,
type: FieldMetadataType.RELATION,
label: 'Person',
description: 'Event person',
@ -80,7 +80,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
person: Relation<PersonObjectMetadata>;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.company,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.company,
type: FieldMetadataType.RELATION,
label: 'Company',
description: 'Event company',
@ -91,7 +91,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
company: Relation<CompanyObjectMetadata>;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.opportunity,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.opportunity,
type: FieldMetadataType.RELATION,
label: 'Opportunity',
description: 'Events opportunity',
@ -102,7 +102,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
opportunity: Relation<OpportunityObjectMetadata>;
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
standardId: timelineActivityStandardFieldIds.custom,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.custom,
name: oppositeObjectMetadata.nameSingular,
label: 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
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedRecordCachedName,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedRecordCachedName,
type: FieldMetadataType.TEXT,
label: 'Linked Record cached name',
description: 'Cached record name',
@ -122,7 +122,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
linkedRecordCachedName: string;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedRecordId,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedRecordId,
type: FieldMetadataType.UUID,
label: 'Linked Record id',
description: 'Linked Record id',
@ -132,7 +132,7 @@ export class TimelineActivityObjectMetadata extends BaseObjectMetadata {
linkedRecordId: string;
@FieldMetadata({
standardId: timelineActivityStandardFieldIds.linkedObjectMetadataId,
standardId: TIMELINE_ACTIVITY_STANDARD_FIELD_IDS.linkedObjectMetadataId,
type: FieldMetadataType.UUID,
label: 'Linked 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 { viewFieldStandardFieldIds } 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 { VIEW_FIELD_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -10,7 +10,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.object-metadata';
@ObjectMetadata({
standardId: standardObjectIds.viewField,
standardId: STANDARD_OBJECT_IDS.viewField,
namePlural: 'viewFields',
labelSingular: 'View Field',
labelPlural: 'View Fields',
@ -21,7 +21,7 @@ import { ViewObjectMetadata } from 'src/modules/view/standard-objects/view.objec
@IsSystem()
export class ViewFieldObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: viewFieldStandardFieldIds.fieldMetadataId,
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Field target field',
@ -30,7 +30,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string;
@FieldMetadata({
standardId: viewFieldStandardFieldIds.isVisible,
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.isVisible,
type: FieldMetadataType.BOOLEAN,
label: 'Visible',
description: 'View Field visibility',
@ -40,7 +40,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
isVisible: boolean;
@FieldMetadata({
standardId: viewFieldStandardFieldIds.size,
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.size,
type: FieldMetadataType.NUMBER,
label: 'Size',
description: 'View Field size',
@ -50,7 +50,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
size: number;
@FieldMetadata({
standardId: viewFieldStandardFieldIds.position,
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.position,
type: FieldMetadataType.NUMBER,
label: 'Position',
description: 'View Field position',
@ -60,7 +60,7 @@ export class ViewFieldObjectMetadata extends BaseObjectMetadata {
position: number;
@FieldMetadata({
standardId: viewFieldStandardFieldIds.view,
standardId: VIEW_FIELD_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { VIEW_FILTER_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.viewFilter,
standardId: STANDARD_OBJECT_IDS.viewFilter,
namePlural: 'viewFilters',
labelSingular: 'View Filter',
labelPlural: 'View Filters',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class ViewFilterObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: viewFilterStandardFieldIds.fieldMetadataId,
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Filter target field',
@ -31,7 +31,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string;
@FieldMetadata({
standardId: viewFilterStandardFieldIds.operand,
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.operand,
type: FieldMetadataType.TEXT,
label: 'Operand',
description: 'View Filter operand',
@ -40,7 +40,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
operand: string;
@FieldMetadata({
standardId: viewFilterStandardFieldIds.value,
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.value,
type: FieldMetadataType.TEXT,
label: 'Value',
description: 'View Filter value',
@ -48,7 +48,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
value: string;
@FieldMetadata({
standardId: viewFilterStandardFieldIds.displayValue,
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.displayValue,
type: FieldMetadataType.TEXT,
label: 'Display Value',
description: 'View Filter Display Value',
@ -56,7 +56,7 @@ export class ViewFilterObjectMetadata extends BaseObjectMetadata {
displayValue: string;
@FieldMetadata({
standardId: viewFilterStandardFieldIds.view,
standardId: VIEW_FILTER_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION,
label: '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 { 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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { VIEW_SORT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.viewSort,
standardId: STANDARD_OBJECT_IDS.viewSort,
namePlural: 'viewSorts',
labelSingular: 'View Sort',
labelPlural: 'View Sorts',
@ -23,7 +23,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
@IsSystem()
export class ViewSortObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: viewSortStandardFieldIds.fieldMetadataId,
standardId: VIEW_SORT_STANDARD_FIELD_IDS.fieldMetadataId,
type: FieldMetadataType.UUID,
label: 'Field Metadata Id',
description: 'View Sort target field',
@ -32,7 +32,7 @@ export class ViewSortObjectMetadata extends BaseObjectMetadata {
fieldMetadataId: string;
@FieldMetadata({
standardId: viewSortStandardFieldIds.direction,
standardId: VIEW_SORT_STANDARD_FIELD_IDS.direction,
type: FieldMetadataType.TEXT,
label: 'Direction',
description: 'View Sort direction',
@ -41,7 +41,7 @@ export class ViewSortObjectMetadata extends BaseObjectMetadata {
direction: string;
@FieldMetadata({
standardId: viewSortStandardFieldIds.view,
standardId: VIEW_SORT_STANDARD_FIELD_IDS.view,
type: FieldMetadataType.RELATION,
label: 'View',
description: 'View Sort related view',

View File

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

View File

@ -1,6 +1,6 @@
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 { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
import { WEBHOOK_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-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 { 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';
@ -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';
@ObjectMetadata({
standardId: standardObjectIds.webhook,
standardId: STANDARD_OBJECT_IDS.webhook,
namePlural: 'webhooks',
labelSingular: 'Webhook',
labelPlural: 'Webhooks',
@ -19,7 +19,7 @@ import { BaseObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-
@IsSystem()
export class WebhookObjectMetadata extends BaseObjectMetadata {
@FieldMetadata({
standardId: webhookStandardFieldIds.targetUrl,
standardId: WEBHOOK_STANDARD_FIELD_IDS.targetUrl,
type: FieldMetadataType.TEXT,
label: 'Target Url',
description: 'Webhook target url',
@ -28,7 +28,7 @@ export class WebhookObjectMetadata extends BaseObjectMetadata {
targetUrl: string;
@FieldMetadata({
standardId: webhookStandardFieldIds.operation,
standardId: WEBHOOK_STANDARD_FIELD_IDS.operation,
type: FieldMetadataType.TEXT,
label: 'Operation',
description: 'Webhook operation',

View File

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