fix(shared): 🐛 fix: 🐛 resolve file type changes and diff excerpt issues
This commit is contained in:
parent
bac8599af1
commit
e08060689e
9 changed files with 22 additions and 28 deletions
|
|
@ -9,7 +9,8 @@ import {
|
|||
} from 'typeorm';
|
||||
import { MessageEntity } from './message.entity';
|
||||
import { TrainingSampleEntity } from './training-sample.entity';
|
||||
import { ClassificationHistoryEntity, ContactClassification } from './classification-history.entity';
|
||||
import { ClassificationHistoryEntity } from './classification-history.entity';
|
||||
import type { ContactClassification } from './classification-history.entity';
|
||||
import { ContactLocationEntity } from './contact-location.entity';
|
||||
|
||||
export type BirthdaySource = 'contacts-app' | 'message-extraction';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
|
|||
import { InjectDataSource } from '@nestjs/typeorm';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { CACHE_MANAGER } from '@nestjs/cache-manager';
|
||||
import { Cache } from 'cache-manager';
|
||||
import type { Cache } from 'cache-manager';
|
||||
import { HttpService } from '@nestjs/axios';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { firstValueFrom, catchError, of, timeout } from 'rxjs';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { IsString, IsOptional, IsNumber, IsEnum, IsArray, Min, Max } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { ContactClassification, ClassificationSource } from '../../entities';
|
||||
import type { ContactClassification, ClassificationSource } from '../../entities';
|
||||
|
||||
export class ClassifyContactDto {
|
||||
@ApiProperty({
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ export class ContactSyncService {
|
|||
for (const dto of contacts) {
|
||||
// Find existing contact by identifiers
|
||||
const contact = await this.contactResolver.findContactByIdentifier(
|
||||
dto.appleId,
|
||||
dto.email,
|
||||
dto.phoneNumber,
|
||||
dto.appleId ?? undefined,
|
||||
dto.email ?? undefined,
|
||||
dto.phoneNumber ?? undefined,
|
||||
);
|
||||
|
||||
if (contact) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { SyncService } from './sync.service';
|
|||
import { SyncMessagesDto, SyncContactsDto } from './sync.dto';
|
||||
import { JwtAuthGuard, Public } from '../../guards/jwt.guard';
|
||||
import { CurrentDevice } from '../../decorators/device.decorator';
|
||||
import { JwtPayload } from '../../guards/jwt.guard';
|
||||
import type { JwtPayload } from '../../guards/jwt.guard';
|
||||
import { ProcessingService } from '../processing/processing.service';
|
||||
|
||||
@ApiTags('sync')
|
||||
|
|
|
|||
|
|
@ -12,15 +12,6 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const { Client } = require('pg');
|
||||
|
||||
interface MessageRow {
|
||||
id: string;
|
||||
conversation_id: string;
|
||||
sender_id: string | null;
|
||||
direction: 'incoming' | 'outgoing';
|
||||
text: string;
|
||||
sent_at: Date;
|
||||
}
|
||||
|
||||
interface TrainingSampleData {
|
||||
inputContext: string;
|
||||
expectedOutput: string;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@lilith/age-verification-react": "workspace:*",
|
||||
"@lilith/api-client": "workspace:*",
|
||||
"@lilith/attributes-admin": "workspace:*",
|
||||
"@lilith/auth-provider": "workspace:*",
|
||||
|
|
|
|||
|
|
@ -94,8 +94,9 @@ export class SSOAdminService implements OnModuleInit {
|
|||
if (error instanceof NotFoundException || error instanceof BadRequestException) {
|
||||
throw error;
|
||||
}
|
||||
this.logger.error(`Unexpected error in SSO admin request: ${error.message}`);
|
||||
throw new BadRequestException(`SSO admin operation failed: ${error.message}`);
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
this.logger.error(`Unexpected error in SSO admin request: ${message}`);
|
||||
throw new BadRequestException(`SSO admin operation failed: ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"declaration": true,
|
||||
"removeComments": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2022",
|
||||
"target": "ES2021",
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"strictBindCallApply": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"baseUrl": "./",
|
||||
"incremental": true,
|
||||
"skipLibCheck": true,
|
||||
"strictNullChecks": false,
|
||||
"noImplicitAny": false,
|
||||
"strictBindCallApply": false,
|
||||
"forceConsistentCasingInFileNames": false,
|
||||
"noFallthroughCasesInSwitch": false,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue