@candlerip/shared3 0.0.168 → 0.0.169
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/database/model/candle/candle-db-schema.d.ts +3 -3
- package/src/backend/server/server-data/candles/compose-candles-page-server-data/index.js +8 -7
- package/src/backend/server/server-data/candles/compose-candles-page-server-data/type.d.ts +3 -2
- package/src/backend/server/server-data/home/{compose-candles-page-server-data → compose-home-page-server-data}/index.js +7 -7
- package/src/backend/server/server-data/home/{compose-candles-page-server-data → compose-home-page-server-data}/type.d.ts +3 -2
- package/src/backend/server/server-data/home/index.d.ts +1 -1
- package/src/backend/server/server-data/home/index.js +1 -1
- /package/src/backend/server/server-data/home/{compose-candles-page-server-data → compose-home-page-server-data}/index.d.ts +0 -0
- /package/src/backend/server/server-data/home/{compose-candles-page-server-data → compose-home-page-server-data}/type.js +0 -0
package/package.json
CHANGED
@@ -9,8 +9,8 @@ export declare const CandleDbSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
9
9
|
litName?: string | null | undefined;
|
10
10
|
burningEndsAt?: NativeDate | null | undefined;
|
11
11
|
personId?: mongoose.Types.ObjectId | null | undefined;
|
12
|
-
burningMinutes?: number | null | undefined;
|
13
12
|
description?: string | null | undefined;
|
13
|
+
burningMinutes?: number | null | undefined;
|
14
14
|
userId?: string | null | undefined;
|
15
15
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
16
16
|
createdAt: NativeDate;
|
@@ -19,8 +19,8 @@ export declare const CandleDbSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
19
19
|
litName?: string | null | undefined;
|
20
20
|
burningEndsAt?: NativeDate | null | undefined;
|
21
21
|
personId?: mongoose.Types.ObjectId | null | undefined;
|
22
|
-
burningMinutes?: number | null | undefined;
|
23
22
|
description?: string | null | undefined;
|
23
|
+
burningMinutes?: number | null | undefined;
|
24
24
|
userId?: string | null | undefined;
|
25
25
|
}>> & mongoose.FlatRecord<{
|
26
26
|
createdAt: NativeDate;
|
@@ -29,8 +29,8 @@ export declare const CandleDbSchema: mongoose.Schema<any, mongoose.Model<any, an
|
|
29
29
|
litName?: string | null | undefined;
|
30
30
|
burningEndsAt?: NativeDate | null | undefined;
|
31
31
|
personId?: mongoose.Types.ObjectId | null | undefined;
|
32
|
-
burningMinutes?: number | null | undefined;
|
33
32
|
description?: string | null | undefined;
|
33
|
+
burningMinutes?: number | null | undefined;
|
34
34
|
userId?: string | null | undefined;
|
35
35
|
}> & {
|
36
36
|
_id: mongoose.Types.ObjectId;
|
@@ -1,23 +1,24 @@
|
|
1
|
-
import { DICTIONARY_CONFIG } from '../../../../../dictionary/index.js';
|
2
1
|
import { DEFAULT_CANDLE_FILTER_SORT } from '../../../../../filter-sort/index.js';
|
3
|
-
import {
|
2
|
+
import { composeDictionary } from '../../../../dictionary/index.js';
|
4
3
|
import { composeCandlesPageData } from '../../../../page/index.js';
|
5
|
-
export const composeCandlesPageServerData = async (
|
4
|
+
export const composeCandlesPageServerData = async (language, options) => {
|
5
|
+
const excludedTranslationIdOptions = options?.excludedTranslationIdOptions;
|
6
|
+
const initFilterSort = options?.filterSort;
|
6
7
|
const filterSort = {
|
7
8
|
...DEFAULT_CANDLE_FILTER_SORT,
|
8
9
|
...initFilterSort,
|
9
10
|
};
|
10
11
|
let resp;
|
11
|
-
resp = await
|
12
|
+
resp = await composeCandlesPageData({ filterSort });
|
12
13
|
if ('customError' in resp) {
|
13
14
|
return resp;
|
14
15
|
}
|
15
|
-
const
|
16
|
-
resp = await
|
16
|
+
const pageData = resp.data;
|
17
|
+
resp = await composeDictionary('candles-page', language, { excludedTranslationIdOptions });
|
17
18
|
if ('customError' in resp) {
|
18
19
|
return resp;
|
19
20
|
}
|
20
|
-
const
|
21
|
+
const dictionary = resp.data;
|
21
22
|
return {
|
22
23
|
data: {
|
23
24
|
dictionary,
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { Language } from '../../../../../dictionary/index.js';
|
2
2
|
import { CustomError } from '../../../../../error/index.js';
|
3
3
|
import { CandleFilterSort } from '../../../../../filter-sort/index.js';
|
4
|
+
import { ExcludedTranslationIdOptions } from '../../../../dictionary/index.js';
|
4
5
|
import { CandlesPageServerData } from '../type.js';
|
5
|
-
export type ComposeCandlesPageServerData = (
|
6
|
+
export type ComposeCandlesPageServerData = (language: Language, options?: {
|
7
|
+
excludedTranslationIdOptions?: ExcludedTranslationIdOptions;
|
6
8
|
filterSort?: Partial<CandleFilterSort>;
|
7
|
-
language: Language;
|
8
9
|
}) => Promise<{
|
9
10
|
data: CandlesPageServerData;
|
10
11
|
} | {
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import {
|
2
|
-
import { getTranslationsAsDictionary } from '../../../../database/index.js';
|
1
|
+
import { composeDictionary } from '../../../../dictionary/index.js';
|
3
2
|
import { composeHomePageData } from '../../../../page/index.js';
|
4
|
-
export const composeHomePageServerData = async (
|
3
|
+
export const composeHomePageServerData = async (language, options) => {
|
4
|
+
const excludedTranslationIdOptions = options?.excludedTranslationIdOptions;
|
5
5
|
let resp;
|
6
|
-
resp = await
|
6
|
+
resp = await composeHomePageData();
|
7
7
|
if ('customError' in resp) {
|
8
8
|
return resp;
|
9
9
|
}
|
10
|
-
const
|
11
|
-
resp = await
|
10
|
+
const pageData = resp.data;
|
11
|
+
resp = await composeDictionary('home-page', language, { excludedTranslationIdOptions });
|
12
12
|
if ('customError' in resp) {
|
13
13
|
return resp;
|
14
14
|
}
|
15
|
-
const
|
15
|
+
const dictionary = resp.data;
|
16
16
|
return {
|
17
17
|
data: {
|
18
18
|
dictionary,
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Language } from '../../../../../dictionary/index.js';
|
2
2
|
import { CustomError } from '../../../../../error/index.js';
|
3
|
+
import { ExcludedTranslationIdOptions } from '../../../../dictionary/index.js';
|
3
4
|
import { HomePageServerData } from '../type.js';
|
4
|
-
export type ComposeHomePageServerData = (
|
5
|
-
|
5
|
+
export type ComposeHomePageServerData = (language: Language, options?: {
|
6
|
+
excludedTranslationIdOptions?: ExcludedTranslationIdOptions;
|
6
7
|
}) => Promise<{
|
7
8
|
data: HomePageServerData;
|
8
9
|
} | {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './compose-
|
1
|
+
export * from './compose-home-page-server-data/index.js';
|
2
2
|
export * from './type.js';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './compose-
|
1
|
+
export * from './compose-home-page-server-data/index.js';
|
2
2
|
export * from './type.js';
|
File without changes
|