Update enums to be all caps (#12372)
- Make custom domain public (remove from lab) - Use ALL_CAPS definition for enums
This commit is contained in:
@ -11,7 +11,7 @@ import { CalendarEventWorkspaceEntity } from 'src/modules/calendar/common/standa
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `calendarEvent.findMany`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class CalendarEventFindManyPostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -11,7 +11,7 @@ import { CalendarEventWorkspaceEntity } from 'src/modules/calendar/common/standa
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `calendarEvent.findOne`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class CalendarEventFindOnePostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -11,7 +11,7 @@ import { MessageWorkspaceEntity } from 'src/modules/messaging/common/standard-ob
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `message.findMany`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class MessageFindManyPostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -11,7 +11,7 @@ import { MessageWorkspaceEntity } from 'src/modules/messaging/common/standard-ob
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `message.findOne`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class MessageFindOnePostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -3,7 +3,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
||||
import { isDefined } from 'class-validator';
|
||||
import isEmpty from 'lodash.isempty';
|
||||
|
||||
import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { AggregateOperations } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager';
|
||||
|
||||
@Injectable()
|
||||
@ -140,7 +140,7 @@ export class ViewService {
|
||||
{ kanbanAggregateOperationFieldMetadataId: fieldMetadataId },
|
||||
{
|
||||
kanbanAggregateOperationFieldMetadataId: null,
|
||||
kanbanAggregateOperation: AGGREGATE_OPERATIONS.count,
|
||||
kanbanAggregateOperation: AggregateOperations.COUNT,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import { Relation } from 'typeorm';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { AggregateOperations } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity';
|
||||
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
|
||||
import { WorkspaceEntity } from 'src/engine/twenty-orm/decorators/workspace-entity.decorator';
|
||||
@ -21,7 +21,7 @@ import { STANDARD_OBJECT_ICONS } from 'src/engine/workspace-manager/workspace-sy
|
||||
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
||||
import { ViewWorkspaceEntity } from 'src/modules/view/standard-objects/view.workspace-entity';
|
||||
|
||||
registerEnumType(AGGREGATE_OPERATIONS, {
|
||||
registerEnumType(AggregateOperations, {
|
||||
name: 'AggregateOperations',
|
||||
});
|
||||
|
||||
@ -99,73 +99,73 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
icon: 'IconCalculator',
|
||||
options: [
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.avg,
|
||||
value: AggregateOperations.AVG,
|
||||
label: 'Average',
|
||||
position: 0,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.count,
|
||||
value: AggregateOperations.COUNT,
|
||||
label: 'Count',
|
||||
position: 1,
|
||||
color: 'purple',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.max,
|
||||
value: AggregateOperations.MAX,
|
||||
label: 'Maximum',
|
||||
position: 2,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.min,
|
||||
value: AggregateOperations.MIN,
|
||||
label: 'Minimum',
|
||||
position: 3,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.sum,
|
||||
value: AggregateOperations.SUM,
|
||||
label: 'Sum',
|
||||
position: 4,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countEmpty,
|
||||
value: AggregateOperations.COUNT_EMPTY,
|
||||
label: 'Count empty',
|
||||
position: 5,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countNotEmpty,
|
||||
value: AggregateOperations.COUNT_NOT_EMPTY,
|
||||
label: 'Count not empty',
|
||||
position: 6,
|
||||
color: 'purple',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countUniqueValues,
|
||||
value: AggregateOperations.COUNT_UNIQUE_VALUES,
|
||||
label: 'Count unique values',
|
||||
position: 7,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.percentageEmpty,
|
||||
value: AggregateOperations.PERCENTAGE_EMPTY,
|
||||
label: 'Percent empty',
|
||||
position: 8,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.percentageNotEmpty,
|
||||
value: AggregateOperations.PERCENTAGE_NOT_EMPTY,
|
||||
label: 'Percent not empty',
|
||||
position: 9,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countTrue,
|
||||
value: AggregateOperations.COUNT_TRUE,
|
||||
label: 'Count true',
|
||||
position: 10,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countFalse,
|
||||
value: AggregateOperations.COUNT_FALSE,
|
||||
label: 'Count false',
|
||||
position: 11,
|
||||
color: 'purple',
|
||||
@ -174,7 +174,7 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
defaultValue: null,
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
aggregateOperation?: AGGREGATE_OPERATIONS | null;
|
||||
aggregateOperation?: AggregateOperations | null;
|
||||
|
||||
@WorkspaceJoinColumn('view')
|
||||
viewId: string;
|
||||
|
||||
@ -7,7 +7,7 @@ import { RelationOnDeleteAction } from 'src/engine/metadata-modules/field-metada
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
|
||||
import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { AggregateOperations } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
|
||||
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
|
||||
import { WorkspaceEntity } from 'src/engine/twenty-orm/decorators/workspace-entity.decorator';
|
||||
import { WorkspaceField } from 'src/engine/twenty-orm/decorators/workspace-field.decorator';
|
||||
@ -221,82 +221,82 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
icon: 'IconCalculator',
|
||||
options: [
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.avg,
|
||||
value: AggregateOperations.AVG,
|
||||
label: 'Average',
|
||||
position: 0,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.count,
|
||||
value: AggregateOperations.COUNT,
|
||||
label: 'Count',
|
||||
position: 1,
|
||||
color: 'purple',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.max,
|
||||
value: AggregateOperations.MAX,
|
||||
label: 'Maximum',
|
||||
position: 2,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.min,
|
||||
value: AggregateOperations.MIN,
|
||||
label: 'Minimum',
|
||||
position: 3,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.sum,
|
||||
value: AggregateOperations.SUM,
|
||||
label: 'Sum',
|
||||
position: 4,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countEmpty,
|
||||
value: AggregateOperations.COUNT_EMPTY,
|
||||
label: 'Count empty',
|
||||
position: 5,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countNotEmpty,
|
||||
value: AggregateOperations.COUNT_NOT_EMPTY,
|
||||
label: 'Count not empty',
|
||||
position: 6,
|
||||
color: 'purple',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countUniqueValues,
|
||||
value: AggregateOperations.COUNT_UNIQUE_VALUES,
|
||||
label: 'Count unique values',
|
||||
position: 7,
|
||||
color: 'sky',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.percentageEmpty,
|
||||
value: AggregateOperations.PERCENTAGE_EMPTY,
|
||||
label: 'Percent empty',
|
||||
position: 8,
|
||||
color: 'turquoise',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.percentageNotEmpty,
|
||||
value: AggregateOperations.PERCENTAGE_NOT_EMPTY,
|
||||
label: 'Percent not empty',
|
||||
position: 9,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countTrue,
|
||||
value: AggregateOperations.COUNT_TRUE,
|
||||
label: 'Count true',
|
||||
position: 10,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: AGGREGATE_OPERATIONS.countFalse,
|
||||
value: AggregateOperations.COUNT_FALSE,
|
||||
label: 'Count false',
|
||||
position: 11,
|
||||
color: 'purple',
|
||||
},
|
||||
],
|
||||
defaultValue: `'${AGGREGATE_OPERATIONS.count}'`,
|
||||
defaultValue: `'${AggregateOperations.COUNT}'`,
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
kanbanAggregateOperation?: AGGREGATE_OPERATIONS | null;
|
||||
kanbanAggregateOperation?: AggregateOperations | null;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: VIEW_STANDARD_FIELD_IDS.kanbanAggregateOperationFieldMetadataId,
|
||||
|
||||
@ -20,7 +20,7 @@ import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-ob
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.createMany`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class WorkflowCreateManyPostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -20,7 +20,7 @@ import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-ob
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.createOne`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class WorkflowCreateOnePostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -8,7 +8,7 @@ import { WorkflowCommonWorkspaceService } from 'src/modules/workflow/common/work
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.deleteMany`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class WorkflowDeleteManyPostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -8,7 +8,7 @@ import { WorkflowCommonWorkspaceService } from 'src/modules/workflow/common/work
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.deleteOne`,
|
||||
type: WorkspaceQueryHookType.PostHook,
|
||||
type: WorkspaceQueryHookType.POST_HOOK,
|
||||
})
|
||||
export class WorkflowDeleteOnePostQueryHook
|
||||
implements WorkspacePostQueryHookInstance
|
||||
|
||||
@ -232,7 +232,7 @@ export class DatabaseEventTriggerListener {
|
||||
|
||||
const isWorkflowEnabled =
|
||||
await this.isFeatureFlagEnabledService.isFeatureEnabled(
|
||||
FeatureFlagKey.IsWorkflowEnabled,
|
||||
FeatureFlagKey.IS_WORKFLOW_ENABLED,
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user