@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.160",
3
+ "version": "0.0.161",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -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';
@@ -0,0 +1,2 @@
1
+ import { ComposeLightCandlePageServerData } from './type.js';
2
+ export declare const composeLightCandlePageServerData: ComposeLightCandlePageServerData;
@@ -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
+ };
@@ -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
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './compose-light-candle-page-server-data/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ export * from './compose-light-candle-page-server-data/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,6 @@
1
+ import { Dictionary } from '../../../../dictionary/index.js';
2
+ import { LightCandlePageData } from '../../../page/index.js';
3
+ export interface LightCandlePageServerData {
4
+ dictionary: Dictionary;
5
+ pageData: LightCandlePageData;
6
+ }