|
|
@ -104,7 +104,11 @@ export class DataGatheringService { |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
for (const assetProfile of Object.values(assetProfiles)) { |
|
|
for (const assetProfile of Object.values(assetProfiles)) { |
|
|
const { symbol } = assetProfile; |
|
|
const { dataSource, symbol } = assetProfile; |
|
|
|
|
|
|
|
|
|
|
|
if (!dataSource || !symbol) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const symbolProfile = symbolProfiles.find( |
|
|
const symbolProfile = symbolProfiles.find( |
|
|
({ symbol: symbolProfileSymbol }) => { |
|
|
({ symbol: symbolProfileSymbol }) => { |
|
|
@ -145,7 +149,6 @@ export class DataGatheringService { |
|
|
countries, |
|
|
countries, |
|
|
currency, |
|
|
currency, |
|
|
cusip, |
|
|
cusip, |
|
|
dataSource, |
|
|
|
|
|
figi, |
|
|
figi, |
|
|
figiComposite, |
|
|
figiComposite, |
|
|
figiShareClass, |
|
|
figiShareClass, |
|
|
@ -161,19 +164,19 @@ export class DataGatheringService { |
|
|
create: { |
|
|
create: { |
|
|
assetClass, |
|
|
assetClass, |
|
|
assetSubClass, |
|
|
assetSubClass, |
|
|
countries, |
|
|
|
|
|
currency, |
|
|
|
|
|
cusip, |
|
|
cusip, |
|
|
dataSource, |
|
|
dataSource, |
|
|
figi, |
|
|
figi, |
|
|
figiComposite, |
|
|
figiComposite, |
|
|
figiShareClass, |
|
|
figiShareClass, |
|
|
holdings, |
|
|
|
|
|
isin, |
|
|
isin, |
|
|
name, |
|
|
name, |
|
|
sectors, |
|
|
|
|
|
symbol, |
|
|
symbol, |
|
|
url |
|
|
url, |
|
|
|
|
|
countries: countries ?? undefined, |
|
|
|
|
|
currency: currency as string, |
|
|
|
|
|
holdings: holdings ?? undefined, |
|
|
|
|
|
sectors: sectors ?? undefined |
|
|
}, |
|
|
}, |
|
|
update: { |
|
|
update: { |
|
|
assetClass, |
|
|
assetClass, |
|
|
@ -187,9 +190,11 @@ export class DataGatheringService { |
|
|
name, |
|
|
name, |
|
|
url, |
|
|
url, |
|
|
// Keep the stored data if no list is available
|
|
|
// Keep the stored data if no list is available
|
|
|
countries: isEmpty(countries) ? undefined : countries, |
|
|
countries: isEmpty(countries) |
|
|
holdings: isEmpty(holdings) ? undefined : holdings, |
|
|
? undefined |
|
|
sectors: isEmpty(sectors) ? undefined : sectors |
|
|
: (countries ?? undefined), |
|
|
|
|
|
holdings: isEmpty(holdings) ? undefined : (holdings ?? undefined), |
|
|
|
|
|
sectors: isEmpty(sectors) ? undefined : (sectors ?? undefined) |
|
|
}, |
|
|
}, |
|
|
where: { |
|
|
where: { |
|
|
dataSource_symbol: { |
|
|
dataSource_symbol: { |
|
|
@ -408,7 +413,7 @@ export class DataGatheringService { |
|
|
jobId: `${getAssetProfileIdentifier({ |
|
|
jobId: `${getAssetProfileIdentifier({ |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol |
|
|
symbol |
|
|
})}-${format(date, DATE_FORMAT, { in: utc })}` |
|
|
})}-${format(date as Date, DATE_FORMAT, { in: utc })}` |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
}) |
|
|
}) |
|
|
|