From 08c04e69cf74e499fd766c1356a6485a1d9b61d6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 1 Mar 2026 10:01:59 +0100 Subject: [PATCH] Task/exclude scraper configuration and symbol mapping from import and export functionality (#6415) * Exclude scraper configuration and symbol mapping from import and export * Update changelog --- CHANGELOG.md | 2 ++ apps/api/src/app/export/export.service.ts | 5 ----- .../src/app/services/import-activities.service.ts | 2 -- libs/common/src/lib/dtos/create-asset-profile.dto.ts | 11 ----------- .../interfaces/responses/export-response.interface.ts | 7 ++++++- test/import/ok/penthouse-apartment.json | 2 -- test/import/ok/sample.json | 4 ---- 7 files changed, 8 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 667b25e5d..65d27e77a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Excluded the scraper configuration from the import and export functionality +- Excluded the symbol mapping from the import and export functionality - Improved the language localization for Dutch (`nl`) - Improved the language localization for Italian (`it`) diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts index d07b199be..55f8d7dc9 100644 --- a/apps/api/src/app/export/export.service.ts +++ b/apps/api/src/app/export/export.service.ts @@ -182,10 +182,8 @@ export class ExportService { isActive, isin, name, - scraperConfiguration, sectors, symbol, - symbolMapping, url }) => { return { @@ -204,11 +202,8 @@ export class ExportService { isin, marketData: marketDataByAssetProfile[id], name, - scraperConfiguration: - scraperConfiguration as unknown as Prisma.JsonArray, sectors: sectors as unknown as Prisma.JsonArray, symbol, - symbolMapping, url }; } diff --git a/apps/client/src/app/services/import-activities.service.ts b/apps/client/src/app/services/import-activities.service.ts index 94d8470f7..55b5c44d5 100644 --- a/apps/client/src/app/services/import-activities.service.ts +++ b/apps/client/src/app/services/import-activities.service.ts @@ -97,9 +97,7 @@ export class ImportActivitiesService { isin: null, marketData: [], name: symbol, - scraperConfiguration: null, sectors: [], - symbolMapping: {}, url: null }); } diff --git a/libs/common/src/lib/dtos/create-asset-profile.dto.ts b/libs/common/src/lib/dtos/create-asset-profile.dto.ts index 80d45ba42..85ad73cc0 100644 --- a/libs/common/src/lib/dtos/create-asset-profile.dto.ts +++ b/libs/common/src/lib/dtos/create-asset-profile.dto.ts @@ -5,7 +5,6 @@ import { IsArray, IsBoolean, IsEnum, - IsObject, IsOptional, IsString, IsUrl @@ -66,10 +65,6 @@ export class CreateAssetProfileDto { @IsString() name?: string; - @IsObject() - @IsOptional() - scraperConfiguration?: Prisma.InputJsonObject; - @IsArray() @IsOptional() sectors?: Prisma.InputJsonArray; @@ -77,12 +72,6 @@ export class CreateAssetProfileDto { @IsString() symbol: string; - @IsObject() - @IsOptional() - symbolMapping?: { - [dataProvider: string]: string; - }; - @IsOptional() @IsUrl({ protocols: ['https'], diff --git a/libs/common/src/lib/interfaces/responses/export-response.interface.ts b/libs/common/src/lib/interfaces/responses/export-response.interface.ts index 8b1697ca4..fa592faf2 100644 --- a/libs/common/src/lib/interfaces/responses/export-response.interface.ts +++ b/libs/common/src/lib/interfaces/responses/export-response.interface.ts @@ -27,7 +27,12 @@ export interface ExportResponse { > & { dataSource: DataSource; date: string; symbol: string })[]; assetProfiles: (Omit< SymbolProfile, - 'createdAt' | 'id' | 'updatedAt' | 'userId' + | 'createdAt' + | 'id' + | 'scraperConfiguration' + | 'symbolMapping' + | 'updatedAt' + | 'userId' > & { marketData: MarketData[]; })[]; diff --git a/test/import/ok/penthouse-apartment.json b/test/import/ok/penthouse-apartment.json index 0c35521e6..3b5e5420b 100644 --- a/test/import/ok/penthouse-apartment.json +++ b/test/import/ok/penthouse-apartment.json @@ -21,10 +21,8 @@ "isin": null, "marketData": [], "name": "Penthouse Apartment", - "scraperConfiguration": null, "sectors": [], "symbol": "7e91b7d4-1430-4212-8380-289a06c9bbc1", - "symbolMapping": {}, "url": null } ], diff --git a/test/import/ok/sample.json b/test/import/ok/sample.json index bc2798718..be385812a 100644 --- a/test/import/ok/sample.json +++ b/test/import/ok/sample.json @@ -41,10 +41,8 @@ "isin": null, "marketData": [], "name": "Account Opening Fee", - "scraperConfiguration": null, "sectors": [], "symbol": "14a69cb9-1e31-43fa-b320-83703d8ed74b", - "symbolMapping": {}, "url": null }, { @@ -63,10 +61,8 @@ "isin": null, "marketData": [], "name": "Penthouse Apartment", - "scraperConfiguration": null, "sectors": [], "symbol": "7e91b7d4-1430-4212-8380-289a06c9bbc1", - "symbolMapping": {}, "url": null } ],