fix: use canonical oxlint rule id in lint-disable directives (#21253)
## What Many `oxlint-disable` / `eslint-disable` directives across the repo carry a corrupted rule id — `@typescripttypescript/<rule>` — most likely a find-and-replace accident that mangled the eslint-era `@typescript-eslint/` prefix. oxlint matches disable directives **loosely by rule name**, so these still suppress in practice (not a silent no-op), but the id is malformed and misleading. ## Change Replace them with the **canonical oxlint id** `typescript/<rule>` — matching the plugin name and rule keys declared in `.oxlintrc.json` — **127 files, 262 directives**: | rule | count | | --- | ----- | | `typescript/no-explicit-any` | 250 | | `typescript/ban-ts-comment` | 6 | | `typescript/no-misused-promises` | 4 | | `typescript/no-empty-object-type` | 2 | - `twenty-server`: 122 files - `twenty-front`: 5 files Comment-only — no code or runtime changes. ## Verification `oxlint --type-aware -c .oxlintrc.json` reports **0 warnings / 0 errors** for both `twenty-server` and `twenty-front`. Every changed line is exactly the id correction inside a disable directive (262 insertions / 262 deletions, no collateral edits). > Addresses the cubic review, which flagged that the canonical oxlint id is `typescript/...` (no `@`). Worth noting the original `@typescripttypescript/` was not actually a silent no-op — oxlint matches these directives loosely by rule name — but `typescript/` is the correct, config-aligned id.
This commit is contained in:
@@ -30,7 +30,7 @@ export default meta;
|
||||
export type Story = StoryObj<typeof RecordIndexPage>;
|
||||
|
||||
export const Default: Story = {
|
||||
// oxlint-disable-next-line @typescripttypescript/ban-ts-comment
|
||||
// oxlint-disable-next-line typescript/ban-ts-comment
|
||||
// @ts-ignore
|
||||
decorators: [LoadingDecorator, PageDecorator],
|
||||
play: async ({ canvasElement }) => {
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ export type Story = StoryObj<typeof RecordIndexPage>;
|
||||
|
||||
export const Default: Story = {
|
||||
parameters: userMetadataLoaderMocks,
|
||||
// oxlint-disable-next-line @typescripttypescript/ban-ts-comment
|
||||
// oxlint-disable-next-line typescript/ban-ts-comment
|
||||
// @ts-ignore
|
||||
decorators: [PageDecorator],
|
||||
play: async ({ canvasElement }) => {
|
||||
|
||||
@@ -32,7 +32,7 @@ export const StepBar = ({ activeStep, children }: StepBarProps) => {
|
||||
}
|
||||
|
||||
// If the child is not a Step, return it as-is
|
||||
// oxlint-disable-next-line @typescripttypescript/ban-ts-comment
|
||||
// oxlint-disable-next-line typescript/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
if (child.type?.displayName !== Step.displayName) {
|
||||
return child;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ export type Story = StoryObj<typeof RecordShowPage>;
|
||||
|
||||
// TEMP_DISABLED_TEST: Temporarily commented out due to test failure
|
||||
// export const Default: Story = {
|
||||
// // oxlint-disable-next-line @typescripttypescript/ban-ts-comment
|
||||
// // oxlint-disable-next-line typescript/ban-ts-comment
|
||||
// // @ts-ignore
|
||||
// decorators: [PageDecorator, ContextStoreDecorator],
|
||||
// play: async ({ canvasElement }) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/ban-ts-comment
|
||||
// oxlint-disable-next-line typescript/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import { type WorkflowRun } from '@/workflow/types/Workflow';
|
||||
import { StepStatus } from 'twenty-shared/workflow';
|
||||
|
||||
@@ -139,7 +139,7 @@ export class ClickHouseService implements OnModuleInit, OnModuleDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public async insert<T extends Record<string, any>>(
|
||||
table: string,
|
||||
values: T[],
|
||||
@@ -170,7 +170,7 @@ export class ClickHouseService implements OnModuleInit, OnModuleDestroy {
|
||||
// Method to execute a select query
|
||||
public async select<T>(
|
||||
query: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
params?: Record<string, any>,
|
||||
clientId?: string,
|
||||
): Promise<T[]> {
|
||||
@@ -237,7 +237,7 @@ export class ClickHouseService implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
public async executeCommand(
|
||||
query: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
params?: Record<string, any>,
|
||||
clientId?: string,
|
||||
): Promise<boolean> {
|
||||
@@ -263,7 +263,7 @@ export class ClickHouseService implements OnModuleInit, OnModuleDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private async insertInChunks<T extends Record<string, any>>(
|
||||
client: ClickHouseClient,
|
||||
table: string,
|
||||
|
||||
@@ -21,7 +21,7 @@ export class CommandLogger {
|
||||
this.verboseFlag = options.verbose ?? false;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
log(message: string, ...optionalParams: [...any, string?]) {
|
||||
this.logger.log(message, ...optionalParams);
|
||||
}
|
||||
@@ -30,17 +30,17 @@ export class CommandLogger {
|
||||
this.logger.error(message, stack, context);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
warn(message: string, ...optionalParams: [...any, string?]) {
|
||||
this.logger.warn(message, ...optionalParams);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
debug(message: string, ...optionalParams: [...any, string?]) {
|
||||
this.logger.debug(message, ...optionalParams);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
verbose(message: string, ...optionalParams: [...any, string?]) {
|
||||
if (this.verboseFlag) {
|
||||
this.logger.log(message, ...optionalParams);
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ export class QueryRunnerArgsFactory {
|
||||
|
||||
async overrideValueByFieldMetadata(
|
||||
key: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
fieldIdByName: Record<string, string>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
|
||||
+12
-12
@@ -52,7 +52,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues?: Record<string, any>;
|
||||
relations: Record<string, FindOptionsRelations<ObjectLiteral>>;
|
||||
aggregate?: Record<string, AggregationField>;
|
||||
@@ -60,7 +60,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
authContext: WorkspaceAuthContext;
|
||||
workspaceDataSource: GlobalWorkspaceDataSource;
|
||||
rolePermissionConfig?: RolePermissionConfig;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedFields: Record<string, any>;
|
||||
}): Promise<void> {
|
||||
const processRelationTasks = Object.entries(relations).map(
|
||||
@@ -107,7 +107,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
nestedRelations: FindOptionsRelations<ObjectLiteral>;
|
||||
@@ -333,7 +333,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
}: {
|
||||
records: ObjectRecord[];
|
||||
idField: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): any[] {
|
||||
return [...new Set(records.map((item) => item[idField]))];
|
||||
}
|
||||
@@ -347,24 +347,24 @@ export class ProcessNestedRelationsV2Helper {
|
||||
sourceFieldName,
|
||||
targetObjectNameSingular,
|
||||
}: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
referenceQueryBuilder: WorkspaceSelectQueryBuilder<any>;
|
||||
column: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ids: any[];
|
||||
limit: number;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
aggregate: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
targetObjectNameSingular: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): Promise<{ relationResults: any[]; relationAggregatedFieldsResult: any }> {
|
||||
if (ids.length === 0) {
|
||||
return { relationResults: [], relationAggregatedFieldsResult: {} };
|
||||
}
|
||||
|
||||
const aggregateForRelation = aggregate[sourceFieldName];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let relationAggregatedFieldsResult: Record<string, any> = {};
|
||||
|
||||
if (aggregateForRelation) {
|
||||
@@ -427,11 +427,11 @@ export class ProcessNestedRelationsV2Helper {
|
||||
selectedFields,
|
||||
}: {
|
||||
parentRecords: ObjectRecord[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
relationResults: any[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
relationAggregatedFieldsResult: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
joinField: string;
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ export class ProcessNestedRelationsHelper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues?: Record<string, any>;
|
||||
relations: Record<string, FindOptionsRelations<ObjectLiteral>>;
|
||||
aggregate?: Record<string, AggregationField>;
|
||||
@@ -44,7 +44,7 @@ export class ProcessNestedRelationsHelper {
|
||||
authContext: WorkspaceAuthContext;
|
||||
workspaceDataSource: GlobalWorkspaceDataSource;
|
||||
rolePermissionConfig?: RolePermissionConfig;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedFields: Record<string, any>;
|
||||
}): Promise<void> {
|
||||
return this.processNestedRelationsV2Helper.processNestedRelations({
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { type FileUrlService } from 'src/engine/core-modules/file/file-url/file-
|
||||
import { extractFileIdFromUrl } from 'src/engine/core-modules/file/files-field/utils/extract-file-id-from-url.util';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
type RichTextBlock = Record<string, any>;
|
||||
|
||||
const parseBlocknoteJsonSafely = (
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import { isDefined } from 'twenty-shared/utils';
|
||||
import { InternalServerError } from 'src/engine/core-modules/graphql/utils/graphql-errors.util';
|
||||
|
||||
export type CacheMetadataPluginConfig = {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
cacheGetter: (key: string) => any;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
cacheSetter: (key: string, value: any) => void;
|
||||
operationsToCache: string[];
|
||||
};
|
||||
@@ -41,7 +41,7 @@ export function useCachedMetadata(config: CacheMetadataPluginConfig): Plugin {
|
||||
return `graphql:operations:${operationName}:${workspace.id}:${workspaceMetadataVersion}:${locale}:${queryHash}`;
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const getOperationName = (serverContext: any) =>
|
||||
serverContext?.req?.body?.operationName;
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export class GraphqlQueryFilterConditionParser {
|
||||
outerQueryBuilder: WorkspaceSelectQueryBuilder<ObjectLiteral>,
|
||||
objectNameSingular: string,
|
||||
key: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
isFirst = false,
|
||||
): void {
|
||||
|
||||
+3
-3
@@ -60,7 +60,7 @@ export class GraphqlQueryFilterFieldParser {
|
||||
outerQueryBuilder: WorkspaceSelectQueryBuilder<ObjectLiteral>,
|
||||
objectNameSingular: string,
|
||||
key: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
filterValue: any,
|
||||
isFirst = false,
|
||||
useDirectTableReference = false,
|
||||
@@ -214,7 +214,7 @@ export class GraphqlQueryFilterFieldParser {
|
||||
queryBuilder: WhereExpressionBuilder,
|
||||
fieldMetadata: FlatFieldMetadata,
|
||||
objectNameSingular: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
fieldValue: any,
|
||||
isFirst = false,
|
||||
useDirectTableReference = false,
|
||||
@@ -243,7 +243,7 @@ export class GraphqlQueryFilterFieldParser {
|
||||
const fullFieldName = `${fieldMetadata.name}${capitalize(subFieldKey)}`;
|
||||
|
||||
const [[operator, value]] = Object.entries(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
subFieldFilter as Record<string, any>,
|
||||
);
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object
|
||||
|
||||
export class GraphqlQuerySelectedFieldsAggregateParser {
|
||||
parse(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>,
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ export class GraphqlQuerySelectedFieldsRelationParser {
|
||||
| FlatFieldMetadata<FieldMetadataType.RELATION>
|
||||
| FlatFieldMetadata<FieldMetadataType.MORPH_RELATION>,
|
||||
fieldKey: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
fieldValue: any,
|
||||
accumulator: GraphqlQuerySelectedFieldsResult,
|
||||
isFromOneToManyRelation?: boolean,
|
||||
|
||||
+10
-10
@@ -17,11 +17,11 @@ import { isFlatFieldMetadataOfType } from 'src/engine/metadata-modules/flat-fiel
|
||||
import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
|
||||
|
||||
export type GraphqlQuerySelectedFieldsResult = {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
select: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
relations: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
aggregate: Record<string, any>;
|
||||
relationFieldsCount: number;
|
||||
hasAtLeastTwoNestedOneToManyRelations: boolean;
|
||||
@@ -48,7 +48,7 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
}
|
||||
|
||||
parse(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
isFromOneToManyRelation?: boolean,
|
||||
@@ -90,7 +90,7 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
}
|
||||
|
||||
private parseRecordFields(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
accumulator: GraphqlQuerySelectedFieldsResult,
|
||||
@@ -203,7 +203,7 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
}
|
||||
|
||||
private parseConnectionField(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
accumulator: GraphqlQuerySelectedFieldsResult,
|
||||
@@ -227,7 +227,7 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
}
|
||||
|
||||
private isRootConnection(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
): boolean {
|
||||
return Object.keys(graphqlSelectedFields).includes('edges');
|
||||
@@ -235,9 +235,9 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
|
||||
private parseCompositeField(
|
||||
fieldMetadata: FlatFieldMetadata,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
fieldValue: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Record<string, any> {
|
||||
const compositeType = compositeTypeDefinitions.get(
|
||||
fieldMetadata.type as CompositeFieldMetadataType,
|
||||
@@ -269,7 +269,7 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
|
||||
return acc;
|
||||
},
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
{} as Record<string, any>,
|
||||
);
|
||||
}
|
||||
|
||||
+9
-9
@@ -61,11 +61,11 @@ export class GraphqlQueryParser {
|
||||
}
|
||||
|
||||
public applyFilterToBuilder(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>,
|
||||
objectNameSingular: string,
|
||||
recordFilter: Partial<ObjectRecordFilter>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): WorkspaceSelectQueryBuilder<any> {
|
||||
return this.filterConditionParser.parse(
|
||||
queryBuilder,
|
||||
@@ -75,10 +75,10 @@ export class GraphqlQueryParser {
|
||||
}
|
||||
|
||||
public applyDeletedAtToBuilder(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>,
|
||||
recordFilter: Partial<ObjectRecordFilter>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): WorkspaceSelectQueryBuilder<any> {
|
||||
if (this.checkForDeletedAtFilter(recordFilter)) {
|
||||
queryBuilder.withDeleted();
|
||||
@@ -119,7 +119,7 @@ export class GraphqlQueryParser {
|
||||
};
|
||||
|
||||
public applyOrderToBuilder(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>,
|
||||
orderBy: ObjectRecordOrderBy | OrderByWithGroupBy,
|
||||
objectNameSingular: string,
|
||||
@@ -146,7 +146,7 @@ export class GraphqlQueryParser {
|
||||
}
|
||||
|
||||
public addRelationOrderColumnsToBuilder(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>,
|
||||
parsedOrderBy: Record<string, OrderByClause>,
|
||||
objectNameSingular: string,
|
||||
@@ -224,11 +224,11 @@ export class GraphqlQueryParser {
|
||||
}
|
||||
|
||||
public applyGroupByOrderToBuilder(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>,
|
||||
orderBy: ObjectRecordOrderBy | OrderByWithGroupBy,
|
||||
groupByFields: GroupByField[],
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): WorkspaceSelectQueryBuilder<any> {
|
||||
const parsedOrderBys = this.orderGroupByParser.parse({
|
||||
orderBy,
|
||||
@@ -249,7 +249,7 @@ export class GraphqlQueryParser {
|
||||
}
|
||||
|
||||
public parseSelectedFields(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
graphqlSelectedFields: Partial<Record<string, any>>,
|
||||
): GraphqlQuerySelectedFieldsResult {
|
||||
const selectedFieldsParser = new GraphqlQuerySelectedFieldsParser(
|
||||
|
||||
+11
-11
@@ -57,9 +57,9 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
}: {
|
||||
objectRecords: T[];
|
||||
parentObjectRecord?: T;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
objectRecordsAggregatedValues?: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedAggregatedFields?: Record<string, any>;
|
||||
objectName: string;
|
||||
take: number;
|
||||
@@ -119,7 +119,7 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
objectRecordsAggregatedValues,
|
||||
}: {
|
||||
selectedAggregatedFields: Record<string, AggregationField[]>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
objectRecordsAggregatedValues: Record<string, any>;
|
||||
}) => {
|
||||
if (!isDefined(objectRecordsAggregatedValues)) {
|
||||
@@ -145,7 +145,7 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
);
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public processRecord<T extends Record<string, any>>({
|
||||
objectRecord,
|
||||
objectName,
|
||||
@@ -158,9 +158,9 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
}: {
|
||||
objectRecord: T;
|
||||
objectName: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
objectRecordsAggregatedValues?: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedAggregatedFields?: Record<string, any>;
|
||||
take: number;
|
||||
totalCount: number;
|
||||
@@ -182,7 +182,7 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
flatEntityMaps: this.flatObjectMetadataMaps,
|
||||
});
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const processedObjectRecord: Record<string, any> = {};
|
||||
|
||||
for (const fieldId of flatObjectMetadata.fieldIds) {
|
||||
@@ -284,9 +284,9 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
|
||||
private processCompositeField(
|
||||
fieldMetadata: FlatFieldMetadata,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
fieldValue: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Record<string, any> {
|
||||
const compositeType = compositeTypeDefinitions.get(
|
||||
fieldMetadata.type as CompositeFieldMetadataType,
|
||||
@@ -319,12 +319,12 @@ export class ObjectRecordsToGraphqlConnectionHelper {
|
||||
|
||||
return acc;
|
||||
},
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
{} as Record<string, any>,
|
||||
);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private formatFieldValue(value: any, fieldType: FieldMetadataType) {
|
||||
switch (fieldType) {
|
||||
case FieldMetadataType.DATE:
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ export class ProcessAggregateHelper {
|
||||
objectMetadataNameSingular,
|
||||
}: {
|
||||
selectedAggregatedFields: Record<string, AggregationField>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
queryBuilder: WorkspaceSelectQueryBuilder<any>;
|
||||
objectMetadataNameSingular: string;
|
||||
}) => {
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ export const computeWhereConditionParts = ({
|
||||
objectNameSingular: string;
|
||||
key: string;
|
||||
subFieldKey?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any;
|
||||
fieldMetadataType: FieldMetadataType;
|
||||
useDirectTableReference?: boolean;
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@ import { buildFieldMapsFromFlatObjectMetadata } from 'src/engine/metadata-module
|
||||
import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
|
||||
|
||||
export interface CursorData {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const encodeCursor = <T extends ObjectRecord = ObjectRecord>({
|
||||
flatObjectMetadata,
|
||||
);
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const orderByValues: Record<string, any> = {};
|
||||
|
||||
for (const orderByEntry of order ?? []) {
|
||||
@@ -103,9 +103,9 @@ export const encodeCursorData = (cursorData: CursorData) => {
|
||||
};
|
||||
|
||||
export const getCursor = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
args: FindManyResolverArgs<any, any>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Record<string, any> | undefined => {
|
||||
if (args.after) return decodeCursor(args.after);
|
||||
if (args.before) return decodeCursor(args.before);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
export type ObjectRecordFilter = Partial<{
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[Property in keyof ObjectRecord]: any;
|
||||
}>;
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const stringifyWithoutKeyQuote = (obj: any) => {
|
||||
const jsonString = JSON.stringify(obj);
|
||||
const jsonWithoutQuotes = jsonString?.replace(/"(\w+)"\s*:/g, '$1:');
|
||||
|
||||
+4
-4
@@ -4,10 +4,10 @@ import {
|
||||
} from 'src/engine/api/graphql/workspace-query-builder/utils/composite-field-metadata.util';
|
||||
|
||||
export const handleCompositeKey = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
result: any,
|
||||
key: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
): void => {
|
||||
const parsedFieldKey = parseCompositeFieldKey(key);
|
||||
@@ -24,7 +24,7 @@ export const handleCompositeKey = (
|
||||
result[parsedFieldKey.parentFieldName][parsedFieldKey.childFieldName] = value;
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const parseResult = (obj: any): any => {
|
||||
if (obj === null || typeof obj !== 'object' || typeof obj === 'function') {
|
||||
return obj;
|
||||
@@ -34,7 +34,7 @@ export const parseResult = (obj: any): any => {
|
||||
return obj.map((item) => parseResult(item));
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const result: any = {};
|
||||
|
||||
for (const key in obj) {
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ import {
|
||||
import { RESOLVER_METHOD_NAMES } from 'src/engine/api/graphql/workspace-resolver-builder/constants/resolver-method-names';
|
||||
import { type workspaceResolverBuilderMethodNames } from 'src/engine/api/graphql/workspace-resolver-builder/factories/factories';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export type Resolver<Args = any> = GraphQLFieldResolver<any, any, Args>;
|
||||
|
||||
// Use RESOLVER_METHOD_NAMES as the single source of truth for operation names
|
||||
@@ -77,7 +77,7 @@ export interface UpdateOneResolverArgs<
|
||||
|
||||
export interface UpdateManyResolverArgs<
|
||||
Data extends Partial<ObjectRecord> = Partial<ObjectRecord>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
Filter = any,
|
||||
> {
|
||||
filter: Filter;
|
||||
@@ -88,7 +88,7 @@ export interface DeleteOneResolverArgs {
|
||||
id: string;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export interface DeleteManyResolverArgs<Filter = any> {
|
||||
filter: Filter;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export interface RestoreOneResolverArgs {
|
||||
id: string;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export interface RestoreManyResolverArgs<Filter = any> {
|
||||
filter: Filter;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export interface DestroyOneResolverArgs {
|
||||
id: string;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export interface DestroyManyResolverArgs<Filter = any> {
|
||||
filter: Filter;
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ const isValidStringPosition = (value: string): boolean =>
|
||||
const isValidNumberPosition = (value: number): boolean =>
|
||||
typeof value === 'number';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const checkPosition = (value: any): PositionType => {
|
||||
if (isValidNumberPosition(value) || isValidStringPosition(value)) {
|
||||
return value;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { validate as uuidValidate } from 'uuid';
|
||||
|
||||
import { ValidationError } from 'src/engine/core-modules/graphql/utils/graphql-errors.util';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const checkUUID = (value: any): string => {
|
||||
if (typeof value !== 'string') {
|
||||
throw new ValidationError('UUID must be a string');
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ export class AdminPanelHealthService {
|
||||
: AdminPanelHealthServiceStatus.OUTAGE;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private transformServiceDetails(details: any) {
|
||||
if (!details) return details;
|
||||
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
export class HealthStateManager {
|
||||
private lastKnownState: {
|
||||
timestamp: Date;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
details: Record<string, any>;
|
||||
} | null = null;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
updateState(details: Record<string, any>) {
|
||||
this.lastKnownState = {
|
||||
timestamp: new Date(),
|
||||
|
||||
+3
-3
@@ -9,13 +9,13 @@ import { CreateAppTokenInput } from 'src/engine/core-modules/app-token/dtos/crea
|
||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
|
||||
export const appTokenAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export class BeforeCreateOneAppToken<
|
||||
> implements BeforeCreateOneHook<T> {
|
||||
async run(
|
||||
instance: CreateOneInputType<T>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
context: any,
|
||||
): Promise<CreateOneInputType<T>> {
|
||||
const userId = context?.req?.user?.id;
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export class ApplicationLogsModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: APPLICATION_LOG_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (
|
||||
clickHouseService: ClickHouseService,
|
||||
...args: unknown[]
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ export const copyYarnEngineAndBuildDependencies = async (
|
||||
env: cleanEnv,
|
||||
},
|
||||
);
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
} catch (error: any) {
|
||||
const errorMessage =
|
||||
[error?.stdout, error?.stderr].filter(Boolean).join('\n') ||
|
||||
|
||||
+1
-1
@@ -32,6 +32,6 @@ export class CreateObjectEventInput {
|
||||
@Field(() => GraphQLJSON, { nullable: true })
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
properties?: Record<string, any>;
|
||||
}
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ export const genericTrackSchema = baseEventSchema.extend({
|
||||
export type GenericTrackEvent<E extends string = string> = {
|
||||
type: 'track';
|
||||
event: E;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
properties: any;
|
||||
timestamp: string;
|
||||
version: string;
|
||||
@@ -19,10 +19,10 @@ export type GenericTrackEvent<E extends string = string> = {
|
||||
workspaceId?: string;
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const eventsRegistry = new Map<string, z.ZodSchema<any>>();
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export function registerEvent<E extends string, S extends z.ZodObject<any>>(
|
||||
event: E,
|
||||
schema: S,
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export class SSOAuthController {
|
||||
PublicEndpointGuard,
|
||||
NoPermissionGuard,
|
||||
)
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
async generateMetadata(@Req() req: any): Promise<string | void> {
|
||||
return generateServiceProviderMetadata({
|
||||
wantAssertionsSigned: true,
|
||||
|
||||
@@ -26,7 +26,7 @@ export class OIDCAuthGuard extends AuthGuard('openidconnect') {
|
||||
super();
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private getStateByRequest(request: any): {
|
||||
identityProviderId: string;
|
||||
} {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ export class GoogleAPIsOauthRequestCodeStrategy extends GoogleAPIsOauthCommonStr
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export class MicrosoftAPIsOauthRequestCodeStrategy extends MicrosoftAPIsOauthCom
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ export class MicrosoftStrategy extends PassportStrategy(Strategy, 'microsoft') {
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+2
-2
@@ -46,7 +46,7 @@ export class OIDCAuthStrategy extends PassportStrategy(
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
return super.authenticate(req, {
|
||||
...options,
|
||||
@@ -86,7 +86,7 @@ export class OIDCAuthStrategy extends PassportStrategy(
|
||||
async validate(
|
||||
req: Request,
|
||||
tokenset: TokenSet,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
done: (err: any, user?: OIDCRequest['user']) => void,
|
||||
) {
|
||||
try {
|
||||
|
||||
@@ -16,7 +16,7 @@ export const WithLock = (
|
||||
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
descriptor.value = async function (...args: any[]) {
|
||||
const self = this as { cacheLockService: CacheLockService };
|
||||
|
||||
|
||||
+2
-2
@@ -34,9 +34,9 @@ export class CacheStorageModule implements OnModuleDestroy {
|
||||
constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {}
|
||||
|
||||
async onModuleDestroy() {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
if ((this.cacheManager.store as any)?.name === 'redis') {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
await (this.cacheManager.store as any).client.quit();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ end`;
|
||||
}
|
||||
|
||||
private isRedisCache() {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return (this.cache.store as any)?.name === 'redis';
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@ import * as Sentry from '@sentry/node';
|
||||
|
||||
export function SentryCronMonitor(monitorSlug: string, schedule: string) {
|
||||
return function (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
_target: any,
|
||||
_propertyKey: string,
|
||||
descriptor: PropertyDescriptor,
|
||||
) {
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
descriptor.value = async function (...args: any[]) {
|
||||
if (!Sentry.isInitialized()) {
|
||||
return await originalMethod.apply(this, args);
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ export const objectRecordChangedValues = (
|
||||
return diffAccumulator;
|
||||
},
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
{} as Record<string, { before: any; after: any }>,
|
||||
);
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
export function objectRecordDiffMerge(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
oldRecord: Record<string, any>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
newRecord: Record<string, any>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Record<string, any> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const result: Record<string, any> = { diff: {} };
|
||||
|
||||
// Iterate over the keys in the oldRecord diff
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { type ExceptionHandlerDriverInterface } from 'src/engine/core-modules/ex
|
||||
|
||||
export class ExceptionHandlerConsoleDriver implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
) {
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class ExceptionHandlerSentryDriver implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
) {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export class ExceptionHandlerModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: EXCEPTION_HANDLER_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
const config = await options?.useFactory?.(...args);
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ export class ExceptionHandlerService {
|
||||
) {}
|
||||
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
): string[] {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { type ExceptionHandlerOptions } from 'src/engine/core-modules/exception-
|
||||
|
||||
export interface ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
): string[];
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ export interface ExceptionHandlerOptions {
|
||||
name: string;
|
||||
};
|
||||
document?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
additionalData?: Record<string, any>;
|
||||
user?: ExceptionHandlerUser | null;
|
||||
workspace?: ExceptionHandlerWorkspace | null;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { type ExceptionHandlerDriverInterface } from 'src/engine/core-modules/ex
|
||||
@Injectable()
|
||||
export class ExceptionHandlerMockService implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: readonly any[],
|
||||
_?: ExceptionHandlerOptions | undefined,
|
||||
): string[] {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export class MockedUnhandledExceptionFilter
|
||||
extends BaseExceptionFilter
|
||||
implements ExceptionFilter
|
||||
{
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
catch(exception: any, _host: ArgumentsHost) {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export class FileController {
|
||||
@Param('fileFolder') fileFolder: SupportedFileFolder,
|
||||
@Param('id') fileId: string,
|
||||
) {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const workspaceId = (req as any)?.workspaceId;
|
||||
|
||||
const fileResponse = await this.fileService
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ export class ResolverValidationPipe implements PipeTransform {
|
||||
throw new UserInputError(errorMessage);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private toValidate(metatype: Type<any>): boolean {
|
||||
const types: unknown[] = [String, Boolean, Number, Array, Object];
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ type RestrictedGraphQLErrorExtensions = {
|
||||
};
|
||||
|
||||
export class BaseGraphQLError extends GraphQLError {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public extensions: Record<string, any>;
|
||||
override readonly name!: string;
|
||||
readonly locations: ReadonlyArray<SourceLocation> | undefined;
|
||||
@@ -51,12 +51,12 @@ export class BaseGraphQLError extends GraphQLError {
|
||||
readonly nodes: ReadonlyArray<ASTNode> | undefined;
|
||||
public originalError: Error | undefined;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[key: string]: any;
|
||||
constructor(
|
||||
exceptionOrMessage: string | CustomException,
|
||||
code?: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
extensions?: Record<string, any>,
|
||||
) {
|
||||
if (exceptionOrMessage instanceof CustomException) {
|
||||
|
||||
@@ -70,7 +70,7 @@ export class JwtWrapperService {
|
||||
return jwt.sign(payload as object, signingKey.privateKeyPem, signOptions);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
verify<T extends object = any>(
|
||||
token: string,
|
||||
options?: { secret: string },
|
||||
@@ -78,7 +78,7 @@ export class JwtWrapperService {
|
||||
return this.jwtService.verify(token, options);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
decode<T = any>(payload: string, options?: jwt.DecodeOptions): T {
|
||||
return this.jwtService.decode(payload, options);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export class JwtWrapperService {
|
||||
async verifyJwtToken(
|
||||
token: string,
|
||||
options?: JwtVerifyOptions,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Promise<any> {
|
||||
const header = decodeJwtHeader(token);
|
||||
const payload = this.decode<JwtPayload>(token, { json: true });
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import {
|
||||
} from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||
|
||||
export class KeyValuePairService<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
constructor(
|
||||
|
||||
@@ -39,7 +39,7 @@ export class LoggerModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: LOGGER_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
const config = await options?.useFactory?.(...args);
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ type LoggerDriverType = ConsoleLogger & {
|
||||
export class LoggerService implements LoggerServiceInterface {
|
||||
constructor(@Inject(LOGGER_DRIVER) private driver: LoggerDriverType) {}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
log(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.log.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
error(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.error.apply(this.driver, [
|
||||
message,
|
||||
@@ -32,12 +32,12 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
warn(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.warn.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
debug?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.debug?.apply(this.driver, [
|
||||
message,
|
||||
@@ -46,7 +46,7 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
verbose?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.verbose?.apply(this.driver, [
|
||||
message,
|
||||
|
||||
+3
-3
@@ -12,11 +12,11 @@ export class ConsoleListener {
|
||||
};
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(callback: (type: string, message: any[]) => void) {
|
||||
Object.keys(this.originalConsole).forEach((method) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
console[method] = (...args: any[]) => {
|
||||
callback(method, args);
|
||||
};
|
||||
@@ -26,7 +26,7 @@ export class ConsoleListener {
|
||||
release() {
|
||||
Object.keys(this.originalConsole).forEach((method) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
console[method] = (...args: any[]) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
this.originalConsole[method](...args);
|
||||
|
||||
@@ -39,7 +39,7 @@ export class SyncDriver implements MessageQueueDriver {
|
||||
id: '',
|
||||
name: jobName,
|
||||
// TODO: Fix this type issue
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
data: data as any,
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export interface MessageQueueJob<T = any> {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -12,6 +12,6 @@ export interface MessageQueueCronJobData<
|
||||
}
|
||||
|
||||
export interface MessageQueueJobData {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ export interface BullMQDriverFactoryOptions {
|
||||
|
||||
export interface SyncDriverFactoryOptions {
|
||||
type: MessageQueueDriverType.Sync;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
options: Record<string, any>;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export class MessageQueueCoreModule extends ConfigurableModuleClass {
|
||||
|
||||
const driverProvider: Provider = {
|
||||
provide: QUEUE_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
if (options.useFactory) {
|
||||
const config = await options.useFactory(...args);
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export type ObjectRecordProperties = Record<string, any>;
|
||||
|
||||
+3
-3
@@ -26,14 +26,14 @@ export type DeleteRecordInput = {
|
||||
export type FindRecordsInput = {
|
||||
objectName: string;
|
||||
filter?: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordFilterGroups?: any;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordFilters?: any;
|
||||
gqlOperationFilter?: Partial<ObjectRecordFilter>[];
|
||||
};
|
||||
orderBy?: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordSorts?: any;
|
||||
gqlOperationOrderBy?: Partial<ObjectRecordOrderBy>;
|
||||
};
|
||||
|
||||
+5
-5
@@ -65,9 +65,9 @@ export class RecordInputTransformerService {
|
||||
|
||||
private async transformFieldValue(
|
||||
fieldType: FieldMetadataType,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Promise<any> {
|
||||
if (!isDefined(value)) {
|
||||
return value;
|
||||
@@ -91,7 +91,7 @@ export class RecordInputTransformerService {
|
||||
}
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private stringifySubFields(fieldMetadataType: FieldMetadataType, value: any) {
|
||||
const compositeType = compositeTypeDefinitions.get(fieldMetadataType);
|
||||
|
||||
@@ -120,7 +120,7 @@ export class RecordInputTransformerService {
|
||||
);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private parseSubFields(fieldMetadataType: FieldMetadataType, value: any) {
|
||||
const compositeType = compositeTypeDefinitions.get(fieldMetadataType);
|
||||
|
||||
@@ -129,7 +129,7 @@ export class RecordInputTransformerService {
|
||||
}
|
||||
|
||||
return Object.entries(value).reduce(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
(acc, [subFieldName, subFieldValue]: [string, any]) => {
|
||||
const subFieldType = compositeType.properties.find(
|
||||
(property) => property.name === subFieldName,
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';
|
||||
import { isDefined } from 'class-validator';
|
||||
|
||||
export const transformEmailsValue = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): any => {
|
||||
if (!isDefined(value)) {
|
||||
return value;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ const getServerBlockNoteEditor = async (): Promise<ServerBlockNoteEditor> => {
|
||||
};
|
||||
|
||||
export const transformRichTextValue = async (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
richTextValue: any,
|
||||
): Promise<RichTextMetadata> => {
|
||||
const parsedValue = isNonEmptyString(richTextValue)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import {
|
||||
|
||||
@ValidatorConstraint({ async: false })
|
||||
export class IsX509CertificateConstraint implements ValidatorConstraintInterface {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any) {
|
||||
if (typeof value !== 'string') {
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ export class ConfigValueConverterService {
|
||||
return appValue;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return transformer.toStorage(appValue as any, options);
|
||||
} catch (error) {
|
||||
if (error instanceof ConfigVariableException) {
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ import {
|
||||
} from 'class-validator';
|
||||
|
||||
export const AssertOrWarn = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
condition: (object: any, value: any) => boolean,
|
||||
validationOptions?: ValidationOptions,
|
||||
) => {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return function (object: any, propertyName: string) {
|
||||
registerDecorator({
|
||||
name: 'AssertOrWarn',
|
||||
@@ -21,7 +21,7 @@ export const AssertOrWarn = (
|
||||
},
|
||||
constraints: [condition],
|
||||
validator: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any, args: ValidationArguments) {
|
||||
return condition(args.object, value);
|
||||
},
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ const VALID_LOG_LEVELS = ['log', 'error', 'warn', 'debug', 'verbose'];
|
||||
export const CastToLogLevelArray = () =>
|
||||
Transform(({ value }: { value: string }) => toLogLevelArray(value));
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const toLogLevelArray = (value: any) => {
|
||||
if (typeof value === 'string') {
|
||||
const rawLogLevels = value.split(',').map((level) => level.trim());
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';
|
||||
export const CastToTypeORMLogLevelArray = () =>
|
||||
Transform(({ value }: { value: string }) => toTypeORMLogLevelArray(value));
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const toTypeORMLogLevelArray = (value: any) => {
|
||||
if (isNonEmptyString(value)) {
|
||||
const rawLogLevels = value.split(',').map((level) => level.trim());
|
||||
|
||||
+2
-2
@@ -16,10 +16,10 @@ export const IsStrictlyLowerThan = (
|
||||
constraints: [property],
|
||||
options: validationOptions,
|
||||
validator: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any, args: ValidationArguments) {
|
||||
const [relatedPropertyName] = args.constraints;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const relatedValue = (args.object as any)[relatedPropertyName];
|
||||
|
||||
return (
|
||||
|
||||
+2
-2
@@ -246,10 +246,10 @@ export class TwentyConfigService {
|
||||
|
||||
private maskSensitiveValue<T extends keyof ConfigVariables>(
|
||||
key: T,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
metadata: ConfigVariablesMetadataOptions,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): any {
|
||||
if (key in CONFIG_VARIABLES_MASKING_CONFIG) {
|
||||
if (!isString(value)) {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export interface TypeTransformer<T> {
|
||||
|
||||
export const typeTransformers: Record<
|
||||
ConfigVariableType,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
TypeTransformer<any>
|
||||
> = {
|
||||
[ConfigVariableType.BOOLEAN]: {
|
||||
|
||||
+6
-6
@@ -8,7 +8,7 @@ import { mergeUserVars } from 'src/engine/core-modules/user/user-vars/utils/merg
|
||||
|
||||
@Injectable()
|
||||
export class UserVarsService<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
constructor(private readonly keyValuePairService: KeyValuePairService) {}
|
||||
@@ -22,7 +22,7 @@ export class UserVarsService<
|
||||
workspaceId?: string;
|
||||
key: Extract<K, string>;
|
||||
}): Promise<KeyValueTypesMap[K]> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarWorkspaceLevel: any[] = [];
|
||||
|
||||
if (workspaceId) {
|
||||
@@ -40,7 +40,7 @@ export class UserVarsService<
|
||||
);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarUserLevel: any[] = [];
|
||||
|
||||
if (userId) {
|
||||
@@ -56,7 +56,7 @@ export class UserVarsService<
|
||||
throw new Error(`Multiple values found for key ${key} at user level`);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarWorkspaceAndUserLevel: any[] = [];
|
||||
|
||||
if (userId && workspaceId) {
|
||||
@@ -87,9 +87,9 @@ export class UserVarsService<
|
||||
}: {
|
||||
userId?: string;
|
||||
workspaceId?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): Promise<Map<Extract<keyof KeyValueTypesMap, string>, any>> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let result: any[] = [];
|
||||
|
||||
if (userId) {
|
||||
|
||||
@@ -8,13 +8,13 @@ import { UserEntity } from 'src/engine/core-modules/user/user.entity';
|
||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
|
||||
export const userAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
+3
-3
@@ -9,13 +9,13 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
export const workspaceAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ export function IsValidMetadataName(validationOptions?: ValidationOptions) {
|
||||
propertyName: propertyName,
|
||||
options: validationOptions,
|
||||
validator: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any) {
|
||||
return /^(?!(?:not|or|and|Int|Float|Boolean|String|ID)$)[^'"\\;.=*/]+$/.test(
|
||||
value,
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ registerEnumType(FieldMetadataType, {
|
||||
|
||||
@ObjectType('Field')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { fieldMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-mod
|
||||
|
||||
@Injectable()
|
||||
export class FieldMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
.handle()
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ type MetadataSerializedRelationProperties = {
|
||||
[TSourceMetadataName in AllMetadataName]: [
|
||||
AllJsonbPropertiesWithSerializedPropertiesForMetadataName<TSourceMetadataName>,
|
||||
] extends [never]
|
||||
? // oxlint-disable-next-line @typescripttypescript/no-empty-object-type
|
||||
? // oxlint-disable-next-line typescript/no-empty-object-type
|
||||
{}
|
||||
: Partial<Record<AllMetadataName, true>>;
|
||||
};
|
||||
|
||||
+1
-1
@@ -26,5 +26,5 @@ export type FlatEntityFrom<
|
||||
? FromMetadataEntityToMetadataName<TEntity>
|
||||
: TMetadataName
|
||||
> & { universalIdentifier: string }
|
||||
: // oxlint-disable-next-line @typescripttypescript/no-empty-object-type
|
||||
: // oxlint-disable-next-line typescript/no-empty-object-type
|
||||
{});
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import { IndexMetadataDTO } from './index-metadata.dto';
|
||||
|
||||
@ObjectType('IndexField')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ registerEnumType(IndexType, {
|
||||
|
||||
@ObjectType('Index')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ registerEnumType(LogicFunctionExecutionMode, {
|
||||
|
||||
@ObjectType('LogicFunction')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
LogicFunctionExceptionCode,
|
||||
} from 'src/engine/metadata-modules/logic-function/logic-function.exception';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const logicFunctionGraphQLApiExceptionHandler = (error: any) => {
|
||||
if (error instanceof LogicFunctionException) {
|
||||
switch (error.code) {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import { ObjectStandardOverridesDTO } from 'src/engine/metadata-modules/object-m
|
||||
|
||||
@ObjectType('Object')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { objectMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-mo
|
||||
|
||||
@Injectable()
|
||||
export class ObjectMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
.handle()
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export type CallWebhookJobData = WebhookJobBase & {
|
||||
objectMetadata: { id: string; nameSingular: string };
|
||||
workspaceMemberId?: string;
|
||||
applicationId?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
record: any;
|
||||
updatedFields?: string[];
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ export class MiddlewareService {
|
||||
return !!token;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public writeRestResponseOnExceptionCaught(res: Response, error: any) {
|
||||
const statusCode = this.getStatus(error);
|
||||
|
||||
@@ -61,7 +61,7 @@ export class MiddlewareService {
|
||||
res.end();
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public writeGraphqlResponseOnExceptionCaught(res: Response, error: any) {
|
||||
let errors;
|
||||
|
||||
@@ -139,7 +139,7 @@ export class MiddlewareService {
|
||||
return isDefined((error as { status: number })?.status);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private getStatus(error: any): number {
|
||||
if (this.hasErrorStatus(error)) {
|
||||
return error.status;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { capitalize } from 'twenty-shared/utils';
|
||||
|
||||
import { convertClassNameToObjectMetadataName } from 'src/engine/workspace-manager/utils/convert-class-to-object-metadata-name.util';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const InjectObjectMetadataRepository = (objectMetadata: any) => {
|
||||
const token = `${capitalize(
|
||||
convertClassNameToObjectMetadataName(objectMetadata.name),
|
||||
|
||||
+9
-9
@@ -74,7 +74,7 @@ type PermissionOptions = {
|
||||
};
|
||||
|
||||
export class WorkspaceEntityManager extends EntityManager {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
readonly repositories: Map<string, Repository<any>>;
|
||||
declare connection: GlobalWorkspaceDataSource;
|
||||
|
||||
@@ -428,7 +428,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
if (isNaN(Number(value)))
|
||||
throw new TypeORMError(`Value "${value}" is not a number.`);
|
||||
// convert possible embeded path "social.likes" into object { social: { like: () => value } }
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const values = propertyPath.split('.').reduceRight<any>(
|
||||
(value, key) => ({ [key]: value }),
|
||||
() => this.connection.driver.escape(column.databaseName) + ' + ' + value,
|
||||
@@ -487,7 +487,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
return this.connection.getMetadata(target).name;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private extractTargetNameSingularFromEntity(entity: any): string {
|
||||
return this.connection.getMetadata(entity.constructor).name;
|
||||
}
|
||||
@@ -1040,7 +1040,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
);
|
||||
if (isNaN(Number(value)))
|
||||
throw new TypeORMError(`Value "${value}" is not a number.`);
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const values = propertyPath.split('.').reduceRight<any>(
|
||||
(value, key) => ({ [key]: value }),
|
||||
() => this.connection.driver.escape(column.databaseName) + ' - ' + value,
|
||||
@@ -1280,7 +1280,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
)
|
||||
.execute()
|
||||
.then(() => formattedEntityOrEntities as Entity[])
|
||||
// oxlint-disable-next-line @typescripttypescript/no-misused-promises
|
||||
// oxlint-disable-next-line typescript/no-misused-promises
|
||||
.finally(() => queryRunnerForEntityPersistExecutor.release());
|
||||
|
||||
if (isDefined(filesFieldFileIds)) {
|
||||
@@ -1501,7 +1501,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
)
|
||||
.execute()
|
||||
.then(() => formattedEntity as Entity | Entity[])
|
||||
// oxlint-disable-next-line @typescripttypescript/no-misused-promises
|
||||
// oxlint-disable-next-line typescript/no-misused-promises
|
||||
.finally(() => queryRunnerForEntityPersistExecutor.release());
|
||||
|
||||
const formattedResult = formatResult<Entity[]>(
|
||||
@@ -1650,7 +1650,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
)
|
||||
.execute()
|
||||
.then(() => formattedEntity as Entity)
|
||||
// oxlint-disable-next-line @typescripttypescript/no-misused-promises
|
||||
// oxlint-disable-next-line typescript/no-misused-promises
|
||||
.finally(() => queryRunnerForEntityPersistExecutor.release());
|
||||
|
||||
const formattedResult = formatResult<Entity[]>(
|
||||
@@ -1800,7 +1800,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
)
|
||||
.execute()
|
||||
.then(() => formattedEntity as Entity)
|
||||
// oxlint-disable-next-line @typescripttypescript/no-misused-promises
|
||||
// oxlint-disable-next-line typescript/no-misused-promises
|
||||
.finally(() => queryRunnerForEntityPersistExecutor.release());
|
||||
|
||||
const formattedResult = formatResult<Entity[]>(
|
||||
@@ -1834,7 +1834,7 @@ export class WorkspaceEntityManager extends EntityManager {
|
||||
|
||||
// Forbidden methods
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
override query<T = any>(_query: string, _parameters?: any[]): Promise<T> {
|
||||
throw new PermissionsException(
|
||||
'Method not allowed.',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user