@candlerip/shared3 0.0.160 → 0.0.161
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/backend/cache/cache/config.d.ts +2 -0
- package/src/backend/cache/cache/config.js +2 -0
- package/src/backend/cache/cache/type.d.ts +2 -1
- package/src/backend/server/server-data/index.d.ts +1 -0
- package/src/backend/server/server-data/index.js +1 -0
- package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/index.d.ts +2 -0
- package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/index.js +22 -0
- package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/type.d.ts +11 -0
- package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/type.js +1 -0
- package/src/backend/server/server-data/light-candle/index.d.ts +2 -0
- package/src/backend/server/server-data/light-candle/index.js +2 -0
- package/src/backend/server/server-data/light-candle/type.d.ts +6 -0
- package/src/backend/server/server-data/light-candle/type.js +1 -0
package/package.json
CHANGED
@@ -21,6 +21,8 @@ export declare const CACHE: {
|
|
21
21
|
readonly 'edit-person-page-dictionary-hu': "Dictionary";
|
22
22
|
readonly 'light-candle-page-dictionary-en': "Dictionary";
|
23
23
|
readonly 'light-candle-page-dictionary-hu': "Dictionary";
|
24
|
+
readonly 'light-candle-page-server-data-en': "LightCandlePageServerData";
|
25
|
+
readonly 'light-candle-page-server-data-hu': "LightCandlePageServerData";
|
24
26
|
readonly 'help-page-dictionary-en': "Dictionary";
|
25
27
|
readonly 'help-page-dictionary-hu': "Dictionary";
|
26
28
|
readonly 'help-page-server-data-en': "HelpPageServerData";
|
@@ -21,6 +21,8 @@ export const CACHE = {
|
|
21
21
|
'edit-person-page-dictionary-hu': 'Dictionary',
|
22
22
|
'light-candle-page-dictionary-en': 'Dictionary',
|
23
23
|
'light-candle-page-dictionary-hu': 'Dictionary',
|
24
|
+
'light-candle-page-server-data-en': 'LightCandlePageServerData',
|
25
|
+
'light-candle-page-server-data-hu': 'LightCandlePageServerData',
|
24
26
|
'help-page-dictionary-en': 'Dictionary',
|
25
27
|
'help-page-dictionary-hu': 'Dictionary',
|
26
28
|
'help-page-server-data-en': 'HelpPageServerData',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Dictionary } from '../../../dictionary/index.js';
|
2
|
-
import { CandlesPageApiResponse, ContactPageServerData, CookiePolicyPageServerData, HelpPageServerData, PersonsMapPageApiResponse, TermsAndConditionsPageServerData } from '../../server/index.js';
|
2
|
+
import { CandlesPageApiResponse, ContactPageServerData, CookiePolicyPageServerData, HelpPageServerData, LightCandlePageServerData, PersonsMapPageApiResponse, TermsAndConditionsPageServerData } from '../../server/index.js';
|
3
3
|
import { CACHE } from './config.js';
|
4
4
|
export type Cache = {
|
5
5
|
[key in keyof typeof CACHE]: TypeMap[(typeof CACHE)[key]];
|
@@ -10,6 +10,7 @@ interface TypeMap {
|
|
10
10
|
CookiePolicyPageServerData: CookiePolicyPageServerData;
|
11
11
|
Dictionary: Dictionary;
|
12
12
|
HelpPageServerData: HelpPageServerData;
|
13
|
+
LightCandlePageServerData: LightCandlePageServerData;
|
13
14
|
PersonsMapPageApiResponse: PersonsMapPageApiResponse;
|
14
15
|
TermsAndConditionsPageServerData: TermsAndConditionsPageServerData;
|
15
16
|
}
|
@@ -2,5 +2,6 @@ export * from './candles/index.js';
|
|
2
2
|
export * from './contact/index.js';
|
3
3
|
export * from './cookie-policy/index.js';
|
4
4
|
export * from './help/index.js';
|
5
|
+
export * from './light-candle/index.js';
|
5
6
|
export * from './persons-map/index.js';
|
6
7
|
export * from './terms-and-conditions/index.js';
|
@@ -2,5 +2,6 @@ export * from './candles/index.js';
|
|
2
2
|
export * from './contact/index.js';
|
3
3
|
export * from './cookie-policy/index.js';
|
4
4
|
export * from './help/index.js';
|
5
|
+
export * from './light-candle/index.js';
|
5
6
|
export * from './persons-map/index.js';
|
6
7
|
export * from './terms-and-conditions/index.js';
|
package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/index.js
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
import { composeDictionary } from '../../../../dictionary/index.js';
|
2
|
+
import { composeLightCandlePageData } from '../../../../page/index.js';
|
3
|
+
export const composeLightCandlePageServerData = async (language, personId, options) => {
|
4
|
+
const excludedTranslationIdOptions = options?.excludedTranslationIdOptions;
|
5
|
+
let resp;
|
6
|
+
resp = await composeLightCandlePageData(personId);
|
7
|
+
if ('customError' in resp) {
|
8
|
+
return resp;
|
9
|
+
}
|
10
|
+
const pageData = resp.data;
|
11
|
+
resp = await composeDictionary('contact-page', language, { excludedTranslationIdOptions });
|
12
|
+
if ('customError' in resp) {
|
13
|
+
return resp;
|
14
|
+
}
|
15
|
+
const dictionary = resp.data;
|
16
|
+
return {
|
17
|
+
data: {
|
18
|
+
dictionary,
|
19
|
+
pageData,
|
20
|
+
},
|
21
|
+
};
|
22
|
+
};
|
package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/type.d.ts
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Language } from '../../../../../dictionary/index.js';
|
2
|
+
import { CustomError } from '../../../../../error/index.js';
|
3
|
+
import { ExcludedTranslationIdOptions } from '../../../../dictionary/index.js';
|
4
|
+
import { LightCandlePageServerData } from '../type.js';
|
5
|
+
export type ComposeLightCandlePageServerData = (language: Language, personId: string, options?: {
|
6
|
+
excludedTranslationIdOptions?: ExcludedTranslationIdOptions;
|
7
|
+
}) => Promise<{
|
8
|
+
data: LightCandlePageServerData;
|
9
|
+
} | {
|
10
|
+
customError: CustomError;
|
11
|
+
}>;
|
package/src/backend/server/server-data/light-candle/compose-light-candle-page-server-data/type.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|