@candlerip/shared3 0.0.143 → 0.0.144

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.143",
3
+ "version": "0.0.144",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -0,0 +1,34 @@
1
+ export declare const CACHE: {
2
+ readonly 'add-person-page-dictionary-en': "Dictionary";
3
+ readonly 'add-person-page-dictionary-hu': "Dictionary";
4
+ readonly 'candle-details-page-dictionary-en': "Dictionary";
5
+ readonly 'candle-details-page-dictionary-hu': "Dictionary";
6
+ readonly 'candles-page-data-en': "CandlesPageData";
7
+ readonly 'candles-page-data-hu': "CandlesPageData";
8
+ readonly 'candles-page-dictionary-en': "Dictionary";
9
+ readonly 'candles-page-dictionary-hu': "Dictionary";
10
+ readonly 'contact-page-dictionary-en': "Dictionary";
11
+ readonly 'contact-page-dictionary-hu': "Dictionary";
12
+ readonly 'cookie-policy-page-dictionary-en': "Dictionary";
13
+ readonly 'cookie-policy-page-dictionary-hu': "Dictionary";
14
+ readonly 'edit-candle-page-dictionary-en': "Dictionary";
15
+ readonly 'edit-candle-page-dictionary-hu': "Dictionary";
16
+ readonly 'edit-person-page-dictionary-en': "Dictionary";
17
+ readonly 'edit-person-page-dictionary-hu': "Dictionary";
18
+ readonly 'light-candle-page-dictionary-en': "Dictionary";
19
+ readonly 'light-candle-page-dictionary-hu': "Dictionary";
20
+ readonly 'help-page-dictionary-en': "Dictionary";
21
+ readonly 'help-page-dictionary-hu': "Dictionary";
22
+ readonly 'home-page-dictionary-en': "Dictionary";
23
+ readonly 'home-page-dictionary-hu': "Dictionary";
24
+ readonly 'person-candles-page-dictionary-en': "Dictionary";
25
+ readonly 'person-candles-page-dictionary-hu': "Dictionary";
26
+ readonly 'person-details-page-dictionary-en': "Dictionary";
27
+ readonly 'person-details-page-dictionary-hu': "Dictionary";
28
+ readonly 'persons-page-dictionary-en': "Dictionary";
29
+ readonly 'persons-page-dictionary-hu': "Dictionary";
30
+ readonly 'persons-map-page-dictionary-en': "Dictionary";
31
+ readonly 'persons-map-page-dictionary-hu': "Dictionary";
32
+ readonly 'terms-and-conditions-page-dictionary-en': "Dictionary";
33
+ readonly 'terms-and-conditions-page-dictionary-hu': "Dictionary";
34
+ };
@@ -0,0 +1,34 @@
1
+ export const CACHE = {
2
+ 'add-person-page-dictionary-en': 'Dictionary',
3
+ 'add-person-page-dictionary-hu': 'Dictionary',
4
+ 'candle-details-page-dictionary-en': 'Dictionary',
5
+ 'candle-details-page-dictionary-hu': 'Dictionary',
6
+ 'candles-page-data-en': 'CandlesPageData',
7
+ 'candles-page-data-hu': 'CandlesPageData',
8
+ 'candles-page-dictionary-en': 'Dictionary',
9
+ 'candles-page-dictionary-hu': 'Dictionary',
10
+ 'contact-page-dictionary-en': 'Dictionary',
11
+ 'contact-page-dictionary-hu': 'Dictionary',
12
+ 'cookie-policy-page-dictionary-en': 'Dictionary',
13
+ 'cookie-policy-page-dictionary-hu': 'Dictionary',
14
+ 'edit-candle-page-dictionary-en': 'Dictionary',
15
+ 'edit-candle-page-dictionary-hu': 'Dictionary',
16
+ 'edit-person-page-dictionary-en': 'Dictionary',
17
+ 'edit-person-page-dictionary-hu': 'Dictionary',
18
+ 'light-candle-page-dictionary-en': 'Dictionary',
19
+ 'light-candle-page-dictionary-hu': 'Dictionary',
20
+ 'help-page-dictionary-en': 'Dictionary',
21
+ 'help-page-dictionary-hu': 'Dictionary',
22
+ 'home-page-dictionary-en': 'Dictionary',
23
+ 'home-page-dictionary-hu': 'Dictionary',
24
+ 'person-candles-page-dictionary-en': 'Dictionary',
25
+ 'person-candles-page-dictionary-hu': 'Dictionary',
26
+ 'person-details-page-dictionary-en': 'Dictionary',
27
+ 'person-details-page-dictionary-hu': 'Dictionary',
28
+ 'persons-page-dictionary-en': 'Dictionary',
29
+ 'persons-page-dictionary-hu': 'Dictionary',
30
+ 'persons-map-page-dictionary-en': 'Dictionary',
31
+ 'persons-map-page-dictionary-hu': 'Dictionary',
32
+ 'terms-and-conditions-page-dictionary-en': 'Dictionary',
33
+ 'terms-and-conditions-page-dictionary-hu': 'Dictionary',
34
+ };
@@ -1,2 +1,3 @@
1
+ export * from './config.js';
1
2
  export * from './type.js';
2
3
  export * from './singleton.js';
@@ -1,2 +1,3 @@
1
+ export * from './config.js';
1
2
  export * from './type.js';
2
3
  export * from './singleton.js';
@@ -90,7 +90,7 @@ export const CacheSingleton = (() => {
90
90
  };
91
91
  }
92
92
  return {
93
- data,
93
+ data: data,
94
94
  };
95
95
  };
96
96
  const set = async (key, data) => {
@@ -1,5 +1,11 @@
1
1
  import { Dictionary } from '../../../dictionary/index.js';
2
- import { CacheKey } from '../cache-key/index.js';
2
+ import { CandlesPageData } from '../../page/index.js';
3
+ import { CACHE } from './config.js';
3
4
  export type Cache = {
4
- [key in CacheKey]: Dictionary;
5
+ [key in keyof typeof CACHE]: TypeMap[(typeof CACHE)[key]];
5
6
  };
7
+ interface TypeMap {
8
+ CandlesPageData: CandlesPageData;
9
+ Dictionary: Dictionary;
10
+ }
11
+ export {};
@@ -1 +1,2 @@
1
- export declare const CACHE_KEYS: readonly ["add-person-page-dictionary-en", "add-person-page-dictionary-hu", "candle-details-page-dictionary-en", "candle-details-page-dictionary-hu", "candles-page-data-en", "candles-page-data-hu", "candles-page-dictionary-en", "candles-page-dictionary-hu", "contact-page-dictionary-en", "contact-page-dictionary-hu", "cookie-policy-page-dictionary-en", "cookie-policy-page-dictionary-hu", "edit-candle-page-dictionary-en", "edit-candle-page-dictionary-hu", "edit-person-page-dictionary-en", "edit-person-page-dictionary-hu", "light-candle-page-dictionary-en", "light-candle-page-dictionary-hu", "help-page-dictionary-en", "help-page-dictionary-hu", "home-page-dictionary-en", "home-page-dictionary-hu", "person-candles-page-dictionary-en", "person-candles-page-dictionary-hu", "person-details-page-dictionary-en", "person-details-page-dictionary-hu", "persons-page-dictionary-en", "persons-page-dictionary-hu", "persons-map-page-dictionary-en", "persons-map-page-dictionary-hu", "terms-and-conditions-page-dictionary-en", "terms-and-conditions-page-dictionary-hu"];
1
+ import { CACHE } from '../cache/config.js';
2
+ export declare const CACHE_KEYS: Array<keyof typeof CACHE>;
@@ -1,34 +1,2 @@
1
- export const CACHE_KEYS = [
2
- 'add-person-page-dictionary-en',
3
- 'add-person-page-dictionary-hu',
4
- 'candle-details-page-dictionary-en',
5
- 'candle-details-page-dictionary-hu',
6
- 'candles-page-data-en',
7
- 'candles-page-data-hu',
8
- 'candles-page-dictionary-en',
9
- 'candles-page-dictionary-hu',
10
- 'contact-page-dictionary-en',
11
- 'contact-page-dictionary-hu',
12
- 'cookie-policy-page-dictionary-en',
13
- 'cookie-policy-page-dictionary-hu',
14
- 'edit-candle-page-dictionary-en',
15
- 'edit-candle-page-dictionary-hu',
16
- 'edit-person-page-dictionary-en',
17
- 'edit-person-page-dictionary-hu',
18
- 'light-candle-page-dictionary-en',
19
- 'light-candle-page-dictionary-hu',
20
- 'help-page-dictionary-en',
21
- 'help-page-dictionary-hu',
22
- 'home-page-dictionary-en',
23
- 'home-page-dictionary-hu',
24
- 'person-candles-page-dictionary-en',
25
- 'person-candles-page-dictionary-hu',
26
- 'person-details-page-dictionary-en',
27
- 'person-details-page-dictionary-hu',
28
- 'persons-page-dictionary-en',
29
- 'persons-page-dictionary-hu',
30
- 'persons-map-page-dictionary-en',
31
- 'persons-map-page-dictionary-hu',
32
- 'terms-and-conditions-page-dictionary-en',
33
- 'terms-and-conditions-page-dictionary-hu',
34
- ];
1
+ import { CACHE } from '../cache/config.js';
2
+ export const CACHE_KEYS = Object.keys(CACHE);
@@ -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
- description?: string | null | undefined;
13
12
  burningMinutes?: number | null | undefined;
13
+ description?: string | 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
- description?: string | null | undefined;
23
22
  burningMinutes?: number | null | undefined;
23
+ description?: string | 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
- description?: string | null | undefined;
33
32
  burningMinutes?: number | null | undefined;
33
+ description?: string | null | undefined;
34
34
  userId?: string | null | undefined;
35
35
  }> & {
36
36
  _id: mongoose.Types.ObjectId;
@@ -3,7 +3,7 @@ import { CustomError } from '../../../../../error/index.js';
3
3
  import { CandleFilterSort } from '../../../../../filter-sort/index.js';
4
4
  import { CandlesPageData } from '../type.js';
5
5
  export type ComposeCandlesPageData = (props: {
6
- filterSort?: CandleFilterSort;
6
+ filterSort: CandleFilterSort;
7
7
  language: Language;
8
8
  }) => Promise<{
9
9
  data: CandlesPageData;