+1
-1
@@ -307,7 +307,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
aggregate: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
}): Promise<{ relationResults: any[]; relationAggregatedFieldsResult: any }> {
|
||||
if (ids.length === 0) {
|
||||
|
||||
-1
@@ -53,7 +53,6 @@ export const encodeCursorData = (cursorData: CursorData) => {
|
||||
};
|
||||
|
||||
export const getCursor = (
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
args: FindManyResolverArgs<any, any>,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ export const handleCompositeKey = (
|
||||
result[parsedFieldKey.parentFieldName][parsedFieldKey.childFieldName] = value;
|
||||
};
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export const parseResult = (obj: any): any => {
|
||||
if (obj === null || typeof obj !== 'object' || typeof obj === 'function') {
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ export function WorkspaceQueryHook(
|
||||
options.type = WorkspaceQueryHookType.PRE_HOOK;
|
||||
}
|
||||
|
||||
|
||||
return (target: Function) => {
|
||||
SetMetadata(SCOPE_OPTIONS_METADATA, options)(target);
|
||||
SetMetadata(WORKSPACE_QUERY_HOOK_METADATA, options)(target);
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Injectable, type Type } from '@nestjs/common';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
|
||||
|
||||
-2
@@ -8,8 +8,6 @@ import {
|
||||
|
||||
import { type workspaceResolverBuilderMethodNames } from 'src/engine/api/graphql/workspace-resolver-builder/factories/factories';
|
||||
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type Resolver<Args = any> = GraphQLFieldResolver<any, any, Args>;
|
||||
|
||||
|
||||
+1
-2
@@ -44,10 +44,9 @@ export class CompositeObjectTypeDefinitionFactory {
|
||||
compositeType: CompositeType,
|
||||
kind: ObjectTypeDefinitionKind,
|
||||
options: WorkspaceBuildSchemaOptions,
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
): GraphQLFieldConfigMap<any, any> {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const fields: GraphQLFieldConfigMap<any, any> = {};
|
||||
|
||||
|
||||
+1
-2
@@ -42,10 +42,9 @@ export class EdgeTypeDefinitionFactory {
|
||||
private generateFields(
|
||||
objectMetadata: ObjectMetadataEntity,
|
||||
options: WorkspaceBuildSchemaOptions,
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
): GraphQLFieldConfigMap<any, any> {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const fields: GraphQLFieldConfigMap<any, any> = {};
|
||||
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-membe
|
||||
import { isWorkDomain } from 'src/utils/is-work-email';
|
||||
|
||||
@Injectable()
|
||||
|
||||
export class ApprovedAccessDomainService {
|
||||
constructor(
|
||||
@InjectRepository(ApprovedAccessDomainEntity, 'core')
|
||||
|
||||
@@ -8,7 +8,6 @@ import { AuthProviderEnum } from 'src/engine/core-modules/workspace/types/worksp
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
export class AuthSsoService {
|
||||
constructor(
|
||||
@InjectRepository(Workspace, 'core')
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ export class GoogleAPIsOauthRequestCodeStrategy extends GoogleAPIsOauthCommonStr
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ export class MicrosoftAPIsOauthRequestCodeStrategy extends MicrosoftAPIsOauthCom
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twent
|
||||
import { UserService } from 'src/engine/core-modules/user/services/user.service';
|
||||
|
||||
@Injectable()
|
||||
|
||||
export class EmailVerificationService {
|
||||
constructor(
|
||||
@InjectRepository(AppToken, 'core')
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export const objectRecordChangedValues = (
|
||||
|
||||
return acc;
|
||||
},
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
{} as Record<string, { before: any; after: any }>,
|
||||
);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { JwtModule as NestJwtModule } from '@nestjs/jwt';
|
||||
|
||||
|
||||
-1
@@ -8,7 +8,6 @@ import {
|
||||
} from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||
|
||||
export class KeyValuePairService<
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
|
||||
@@ -11,13 +11,11 @@ import { LOGGER_DRIVER } from 'src/engine/core-modules/logger/logger.constants';
|
||||
export class LoggerService implements LoggerServiceInterface {
|
||||
constructor(@Inject(LOGGER_DRIVER) private driver: LoggerServiceInterface) {}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
log(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.log.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
error(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.error.apply(this.driver, [
|
||||
@@ -27,13 +25,11 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
warn(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.warn.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
debug?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.debug?.apply(this.driver, [
|
||||
@@ -43,7 +39,6 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
verbose?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.verbose?.apply(this.driver, [
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ export function Processor(
|
||||
? queueNameOrOptions
|
||||
: { queueName: queueNameOrOptions };
|
||||
|
||||
|
||||
return (target: Function) => {
|
||||
SetMetadata(SCOPE_OPTIONS_METADATA, options)(target);
|
||||
SetMetadata(PROCESSOR_METADATA, options)(target);
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Injectable, type Type } from '@nestjs/common';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ export const main = async (params: {
|
||||
const message = `Hello, input: ${a} and ${b}`;
|
||||
|
||||
return { message };
|
||||
};
|
||||
};
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ import {
|
||||
} from 'class-validator';
|
||||
|
||||
export const AssertOrWarn = (
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
condition: (object: any, value: any) => boolean,
|
||||
validationOptions?: ValidationOptions,
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
import { TypeOrmQueryService } from '@ptc-org/nestjs-query-typeorm';
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ import { mergeUserVars } from 'src/engine/core-modules/user/user-vars/utils/merg
|
||||
|
||||
@Injectable()
|
||||
export class UserVarsService<
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { KeyValuePairModule } from 'src/engine/core-modules/key-value-pair/key-value-pair.module';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ import { type Workspace } from 'src/engine/core-modules/workspace/workspace.enti
|
||||
import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
export class WorkspaceInvitationService {
|
||||
constructor(
|
||||
@InjectRepository(AppToken, 'core')
|
||||
|
||||
-1
@@ -78,7 +78,6 @@ describe('validateDefaultValueForType', () => {
|
||||
it('should return false for invalid CURRENCY default value', () => {
|
||||
expect(
|
||||
validateDefaultValueForType(
|
||||
|
||||
// @ts-expect-error Just for testing purposes
|
||||
{ amountMicros: 100, currencyCode: "'USD'" },
|
||||
FieldMetadataType.CURRENCY,
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
import { Logger } from '@nestjs/common';
|
||||
|
||||
import { type FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ export interface WorkspaceDynamicRelationMetadataArgs {
|
||||
/**
|
||||
* Class to which relation is applied.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ export interface WorkspaceEntityMetadataArgs {
|
||||
* Function target is a table defined in the class.
|
||||
* String target is a table defined in a json schema.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export interface WorkspaceExtendedEntityMetadataArgs {
|
||||
* Function target is a table defined in the class.
|
||||
* String target is a table defined in a json schema.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ export interface WorkspaceFieldMetadataArgs {
|
||||
/**
|
||||
* Class to which field is applied.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ export interface WorkspaceIndexMetadataArgs {
|
||||
/**
|
||||
* Class to which index is applied.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ export interface WorkspaceJoinColumnsMetadataArgs {
|
||||
/**
|
||||
* Class to which relation is applied.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export interface WorkspaceRelationMetadataArgs {
|
||||
/**
|
||||
* Class to which relation is applied.
|
||||
*/
|
||||
|
||||
|
||||
readonly target: Function;
|
||||
|
||||
/**
|
||||
|
||||
@@ -347,7 +347,6 @@ export class PgPoolSharedService {
|
||||
function SharedPool(this: Pool, config?: PoolConfig): Pool {
|
||||
// When called as a function (without new), make sure to return a new instance
|
||||
if (!(this instanceof SharedPool)) {
|
||||
|
||||
// @ts-expect-error We know this works at runtime
|
||||
return new SharedPool(config);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { type WorkspaceDynamicRelationMetadataArgs } from 'src/engine/twenty-orm/interfaces/workspace-dynamic-relation-metadata-args.interface';
|
||||
import { type WorkspaceEntityMetadataArgs } from 'src/engine/twenty-orm/interfaces/workspace-entity-metadata-args.interface';
|
||||
import { type WorkspaceExtendedEntityMetadataArgs } from 'src/engine/twenty-orm/interfaces/workspace-extended-entity-metadata-args.interface';
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ type NoteDataSeed = {
|
||||
id: string;
|
||||
position: number;
|
||||
title: string;
|
||||
bodyV2Blocknote: string
|
||||
bodyV2Blocknote: string;
|
||||
bodyV2Markdown: string;
|
||||
createdBySource: string;
|
||||
createdByWorkspaceMemberId: string;
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export class WorkspaceFixService {
|
||||
manager: EntityManager,
|
||||
objectMetadataCollection: ObjectMetadataEntity[],
|
||||
type: WorkspaceHealthFixKind,
|
||||
|
||||
|
||||
issues: WorkspaceHealthIssue[],
|
||||
): Promise<CompareEntity<unknown>[]> {
|
||||
switch (type) {
|
||||
|
||||
+4
-1
@@ -40,7 +40,10 @@ describe('transformMetadataForComparison', () => {
|
||||
});
|
||||
|
||||
expect(result).toHaveProperty('key-123');
|
||||
expect((result as Record<string, any>)['key-123']).toEqual({ id: 123, name: 'Test' });
|
||||
expect((result as Record<string, any>)['key-123']).toEqual({
|
||||
id: 123,
|
||||
name: 'Test',
|
||||
});
|
||||
});
|
||||
|
||||
// Test with an empty array
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
|
||||
export function createDeterministicUuid(
|
||||
uuidOrUuids: string[] | string,
|
||||
): string {
|
||||
|
||||
Reference in New Issue
Block a user