Browse Source
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
pull/6418/head
Thomas Kaul
12 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
8 additions and
25 deletions
-
CHANGELOG.md
-
apps/api/src/app/export/export.service.ts
-
apps/client/src/app/services/import-activities.service.ts
-
libs/common/src/lib/dtos/create-asset-profile.dto.ts
-
libs/common/src/lib/interfaces/responses/export-response.interface.ts
-
test/import/ok/penthouse-apartment.json
-
test/import/ok/sample.json
|
|
|
@ -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`) |
|
|
|
|
|
|
|
|
|
|
|
@ -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 |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
@ -97,9 +97,7 @@ export class ImportActivitiesService { |
|
|
|
isin: null, |
|
|
|
marketData: [], |
|
|
|
name: symbol, |
|
|
|
scraperConfiguration: null, |
|
|
|
sectors: [], |
|
|
|
symbolMapping: {}, |
|
|
|
url: null |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -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'], |
|
|
|
|
|
|
|
@ -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[]; |
|
|
|
})[]; |
|
|
|
|
|
|
|
@ -21,10 +21,8 @@ |
|
|
|
"isin": null, |
|
|
|
"marketData": [], |
|
|
|
"name": "Penthouse Apartment", |
|
|
|
"scraperConfiguration": null, |
|
|
|
"sectors": [], |
|
|
|
"symbol": "7e91b7d4-1430-4212-8380-289a06c9bbc1", |
|
|
|
"symbolMapping": {}, |
|
|
|
"url": null |
|
|
|
} |
|
|
|
], |
|
|
|
|
|
|
|
@ -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 |
|
|
|
} |
|
|
|
], |
|
|
|
|