@candlerip/shared 0.0.84 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cache/redis/domains.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { CandlesPageServerData, CountryDictionary, Dictionary, HomePageServerData, Language, PersonsMapPageServerData, PersonsPageServerData } from '../../common/index.js';
|
|
2
2
|
import { CountryDictionaryCacheKey, PageDictionaryCacheKey } from '../common/index.js';
|
|
3
|
+
type PageServerDataMap = {
|
|
4
|
+
'candles-page': CandlesPageServerData;
|
|
5
|
+
'home-page': HomePageServerData;
|
|
6
|
+
'persons-page': PersonsPageServerData;
|
|
7
|
+
'persons-map-page': PersonsMapPageServerData;
|
|
8
|
+
};
|
|
3
9
|
export type Cache = {
|
|
4
10
|
[key in PageDictionaryCacheKey]: Dictionary;
|
|
5
11
|
} & {
|
|
6
12
|
[key in CountryDictionaryCacheKey]: CountryDictionary;
|
|
7
13
|
} & {
|
|
8
|
-
[key in
|
|
9
|
-
} & {
|
|
10
|
-
[key in `home-page-server-data-${Language}`]: HomePageServerData;
|
|
11
|
-
} & {
|
|
12
|
-
[key in `persons-page-server-data-${Language}`]: PersonsPageServerData;
|
|
13
|
-
} & {
|
|
14
|
-
[key in `persons-map-page-server-data-${Language}`]: PersonsMapPageServerData;
|
|
14
|
+
[key in keyof PageServerDataMap as `${key}-server-data-${Language}`]: PageServerDataMap[key];
|
|
15
15
|
};
|
|
16
|
+
export {};
|
|
@@ -13,7 +13,9 @@ export const composeGetTranslationsAsDictionaryAggregates = ({ codes, language }
|
|
|
13
13
|
{
|
|
14
14
|
$project: {
|
|
15
15
|
code: 1,
|
|
16
|
-
|
|
16
|
+
translation: {
|
|
17
|
+
[language]: 1,
|
|
18
|
+
},
|
|
17
19
|
},
|
|
18
20
|
},
|
|
19
21
|
{
|
|
@@ -22,7 +24,7 @@ export const composeGetTranslationsAsDictionaryAggregates = ({ codes, language }
|
|
|
22
24
|
root: {
|
|
23
25
|
$push: {
|
|
24
26
|
k: '$code',
|
|
25
|
-
v:
|
|
27
|
+
v: `$translation.${language}`,
|
|
26
28
|
},
|
|
27
29
|
},
|
|
28
30
|
},
|