@candlerip/shared3 0.0.141 → 0.0.143

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/package.json +3 -2
  2. package/src/backend/cache/cache-key/config.d.ts +1 -1
  3. package/src/backend/cache/cache-key/config.js +2 -0
  4. package/src/backend/database/aggregate/candle-person/config.d.ts +2 -0
  5. package/src/backend/database/aggregate/candle-person/config.js +16 -0
  6. package/src/backend/database/aggregate/candle-person/index.d.ts +1 -0
  7. package/src/backend/database/aggregate/candle-person/index.js +1 -0
  8. package/src/backend/database/aggregate/index.d.ts +1 -0
  9. package/src/backend/database/aggregate/index.js +1 -0
  10. package/src/backend/database/index.d.ts +1 -0
  11. package/src/backend/database/index.js +1 -0
  12. package/src/backend/database/model/candle/candle-db-model.d.ts +2 -0
  13. package/src/backend/database/model/candle/candle-db-model.js +3 -0
  14. package/src/backend/database/model/candle/candle-db-schema.d.ts +39 -0
  15. package/src/backend/database/model/candle/candle-db-schema.js +9 -0
  16. package/src/backend/database/model/candle/index.d.ts +2 -0
  17. package/src/backend/database/model/candle/index.js +2 -0
  18. package/src/backend/database/model/index.d.ts +1 -0
  19. package/src/backend/database/model/index.js +1 -0
  20. package/src/backend/database/mutation/candle/get-candles/index.d.ts +2 -0
  21. package/src/backend/database/mutation/candle/get-candles/index.js +94 -0
  22. package/src/backend/database/mutation/candle/get-candles/type.d.ts +17 -0
  23. package/src/backend/database/mutation/candle/get-candles/type.js +1 -0
  24. package/src/backend/database/mutation/candle/index.d.ts +1 -0
  25. package/src/backend/database/mutation/candle/index.js +1 -0
  26. package/src/backend/database/mutation/index.d.ts +1 -0
  27. package/src/backend/database/mutation/index.js +1 -0
  28. package/src/backend/page/index.d.ts +1 -0
  29. package/src/backend/page/index.js +1 -0
  30. package/src/backend/page/page-data/candles/compose-candles-page-data/index.d.ts +2 -0
  31. package/src/backend/page/page-data/candles/compose-candles-page-data/index.js +30 -0
  32. package/src/backend/page/page-data/candles/compose-candles-page-data/type.d.ts +12 -0
  33. package/src/backend/page/page-data/candles/compose-candles-page-data/type.js +1 -0
  34. package/src/backend/page/page-data/candles/index.d.ts +2 -0
  35. package/src/backend/page/page-data/candles/index.js +2 -0
  36. package/src/backend/page/page-data/candles/type.d.ts +14 -0
  37. package/src/backend/page/page-data/candles/type.js +1 -0
  38. package/src/backend/page/page-data/index.d.ts +1 -0
  39. package/src/backend/page/page-data/index.js +1 -0
  40. package/src/candle/burning-candle-state/config.d.ts +1 -0
  41. package/src/candle/burning-candle-state/config.js +1 -0
  42. package/src/candle/burning-candle-state/index.d.ts +3 -0
  43. package/src/candle/burning-candle-state/index.js +3 -0
  44. package/src/candle/burning-candle-state/type-guard.d.ts +2 -0
  45. package/src/candle/burning-candle-state/type-guard.js +4 -0
  46. package/src/candle/burning-candle-state/type.d.ts +2 -0
  47. package/src/candle/burning-candle-state/type.js +1 -0
  48. package/src/candle/index.d.ts +2 -0
  49. package/src/candle/index.js +2 -0
  50. package/src/candle/type.d.ts +11 -0
  51. package/src/candle/type.js +1 -0
  52. package/src/dictionary/dictionary/config.d.ts +3 -3
  53. package/src/dictionary/dictionary/config.js +4 -0
  54. package/src/filter-sort/candle-filter-sort/default.d.ts +2 -0
  55. package/src/filter-sort/candle-filter-sort/default.js +5 -0
  56. package/src/filter-sort/candle-filter-sort/index.d.ts +2 -0
  57. package/src/filter-sort/candle-filter-sort/index.js +2 -0
  58. package/src/filter-sort/candle-filter-sort/type.d.ts +12 -0
  59. package/src/filter-sort/candle-filter-sort/type.js +1 -0
  60. package/src/filter-sort/index.d.ts +1 -0
  61. package/src/filter-sort/index.js +1 -0
  62. package/src/filter-sort/sort-name/candle-sort-name/config.d.ts +1 -0
  63. package/src/filter-sort/sort-name/candle-sort-name/config.js +1 -0
  64. package/src/filter-sort/sort-name/candle-sort-name/index.d.ts +3 -0
  65. package/src/filter-sort/sort-name/candle-sort-name/index.js +3 -0
  66. package/src/filter-sort/sort-name/candle-sort-name/type-guard.d.ts +2 -0
  67. package/src/filter-sort/sort-name/candle-sort-name/type-guard.js +4 -0
  68. package/src/filter-sort/sort-name/candle-sort-name/type.d.ts +2 -0
  69. package/src/filter-sort/sort-name/candle-sort-name/type.js +1 -0
  70. package/src/filter-sort/sort-name/index.d.ts +1 -0
  71. package/src/filter-sort/sort-name/index.js +1 -0
  72. package/src/filter-sort/sort-order/config.d.ts +1 -0
  73. package/src/filter-sort/sort-order/config.js +1 -0
  74. package/src/filter-sort/sort-order/index.d.ts +3 -0
  75. package/src/filter-sort/sort-order/index.js +3 -0
  76. package/src/filter-sort/sort-order/type-guard.d.ts +2 -0
  77. package/src/filter-sort/sort-order/type-guard.js +4 -0
  78. package/src/filter-sort/sort-order/type.d.ts +2 -0
  79. package/src/filter-sort/sort-order/type.js +1 -0
  80. package/src/geographical/county-code/config.d.ts +1 -0
  81. package/src/geographical/county-code/config.js +248 -0
  82. package/src/geographical/county-code/index.d.ts +3 -0
  83. package/src/geographical/county-code/index.js +3 -0
  84. package/src/geographical/county-code/type-guard.d.ts +2 -0
  85. package/src/geographical/county-code/type-guard.js +4 -0
  86. package/src/geographical/county-code/type.d.ts +2 -0
  87. package/src/geographical/county-code/type.js +1 -0
  88. package/src/geographical/index.d.ts +1 -0
  89. package/src/geographical/index.js +1 -0
  90. package/src/index.d.ts +3 -0
  91. package/src/index.js +3 -0
  92. package/src/person/index.d.ts +1 -0
  93. package/src/person/index.js +1 -0
  94. package/src/person/type.d.ts +21 -0
  95. package/src/person/type.js +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.141",
3
+ "version": "0.0.143",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -11,7 +11,8 @@
11
11
  "./backend/dictionary": "./src/backend/dictionary/index.js",
12
12
  "./backend/environment": "./src/backend/environment/index.js",
13
13
  "./backend/express": "./src/backend/express/index.js",
14
- "./backend/message-broker": "./src/backend/message-broker/index.js"
14
+ "./backend/message-broker": "./src/backend/message-broker/index.js",
15
+ "./backend/page": "./src/backend/page/index.js"
15
16
  },
16
17
  "bin": {
17
18
  "crs-cdk-deploy": "./_devops/cdk/cdk-deploy.sh",
@@ -1 +1 @@
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-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
+ 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"];
@@ -3,6 +3,8 @@ export const CACHE_KEYS = [
3
3
  'add-person-page-dictionary-hu',
4
4
  'candle-details-page-dictionary-en',
5
5
  'candle-details-page-dictionary-hu',
6
+ 'candles-page-data-en',
7
+ 'candles-page-data-hu',
6
8
  'candles-page-dictionary-en',
7
9
  'candles-page-dictionary-hu',
8
10
  'contact-page-dictionary-en',
@@ -0,0 +1,2 @@
1
+ import { PipelineStage } from 'mongoose';
2
+ export declare const CANDLE_PERSON_AGGREGATE: PipelineStage[];
@@ -0,0 +1,16 @@
1
+ export const CANDLE_PERSON_AGGREGATE = [
2
+ {
3
+ $lookup: {
4
+ from: 'persons',
5
+ localField: 'personId',
6
+ foreignField: '_id',
7
+ as: 'person',
8
+ },
9
+ },
10
+ {
11
+ $unwind: {
12
+ path: '$person',
13
+ preserveNullAndEmptyArrays: true,
14
+ },
15
+ },
16
+ ];
@@ -0,0 +1 @@
1
+ export * from './config.js';
@@ -0,0 +1 @@
1
+ export * from './config.js';
@@ -0,0 +1 @@
1
+ export * from './candle-person/index.js';
@@ -0,0 +1 @@
1
+ export * from './candle-person/index.js';
@@ -1,3 +1,4 @@
1
+ export * from './aggregate/index.js';
1
2
  export * from './connect-database/index.js';
2
3
  export * from './model/index.js';
3
4
  export * from './mutation/index.js';
@@ -1,3 +1,4 @@
1
+ export * from './aggregate/index.js';
1
2
  export * from './connect-database/index.js';
2
3
  export * from './model/index.js';
3
4
  export * from './mutation/index.js';
@@ -0,0 +1,2 @@
1
+ import * as mongoose from 'mongoose';
2
+ export declare const CandleDbModel: mongoose.Model<any, {}, {}, {}, any, any>;
@@ -0,0 +1,3 @@
1
+ import * as mongoose from 'mongoose';
2
+ import { CandleDbSchema } from './candle-db-schema.js';
3
+ export const CandleDbModel = mongoose.models?.candles || mongoose.model('candles', CandleDbSchema);
@@ -0,0 +1,39 @@
1
+ import * as mongoose from 'mongoose';
2
+ export declare const CandleDbSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
+ timestamps: true;
4
+ versionKey: false;
5
+ }, {
6
+ createdAt: NativeDate;
7
+ updatedAt: NativeDate;
8
+ } & {
9
+ litName?: string | null | undefined;
10
+ burningEndsAt?: NativeDate | null | undefined;
11
+ personId?: mongoose.Types.ObjectId | null | undefined;
12
+ description?: string | null | undefined;
13
+ burningMinutes?: number | null | undefined;
14
+ userId?: string | null | undefined;
15
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
16
+ createdAt: NativeDate;
17
+ updatedAt: NativeDate;
18
+ } & {
19
+ litName?: string | null | undefined;
20
+ burningEndsAt?: NativeDate | null | undefined;
21
+ personId?: mongoose.Types.ObjectId | null | undefined;
22
+ description?: string | null | undefined;
23
+ burningMinutes?: number | null | undefined;
24
+ userId?: string | null | undefined;
25
+ }>> & mongoose.FlatRecord<{
26
+ createdAt: NativeDate;
27
+ updatedAt: NativeDate;
28
+ } & {
29
+ litName?: string | null | undefined;
30
+ burningEndsAt?: NativeDate | null | undefined;
31
+ personId?: mongoose.Types.ObjectId | null | undefined;
32
+ description?: string | null | undefined;
33
+ burningMinutes?: number | null | undefined;
34
+ userId?: string | null | undefined;
35
+ }> & {
36
+ _id: mongoose.Types.ObjectId;
37
+ } & {
38
+ __v: number;
39
+ }>;
@@ -0,0 +1,9 @@
1
+ import * as mongoose from 'mongoose';
2
+ export const CandleDbSchema = new mongoose.Schema({
3
+ burningEndsAt: { type: Date },
4
+ burningMinutes: { type: Number },
5
+ description: { type: String },
6
+ litName: { type: String },
7
+ personId: { type: mongoose.Schema.ObjectId },
8
+ userId: { type: String },
9
+ }, { timestamps: true, versionKey: false });
@@ -0,0 +1,2 @@
1
+ export * from './candle-db-schema.js';
2
+ export * from './candle-db-model.js';
@@ -0,0 +1,2 @@
1
+ export * from './candle-db-schema.js';
2
+ export * from './candle-db-model.js';
@@ -1,2 +1,3 @@
1
+ export * from './candle/index.js';
1
2
  export * from './error-log/index.js';
2
3
  export * from './translation/index.js';
@@ -1,2 +1,3 @@
1
+ export * from './candle/index.js';
1
2
  export * from './error-log/index.js';
2
3
  export * from './translation/index.js';
@@ -0,0 +1,2 @@
1
+ import { GetCandles } from './type.js';
2
+ export declare const getCandles: GetCandles;
@@ -0,0 +1,94 @@
1
+ import { Types } from 'mongoose';
2
+ import { customErrorWorker } from '@candlerip/shared3';
3
+ import { CANDLE_PERSON_AGGREGATE } from '../../../aggregate/index.js';
4
+ import { CandleDbModel } from '../../../model/index.js';
5
+ export const getCandles = async (props) => {
6
+ const { filterSort, withPerson } = props;
7
+ const { composeCustomError } = customErrorWorker(props);
8
+ const { burning_states: burningStates, count, person_id: personId, skip_count: skipCount, sort_name: sortName, sort_order: sortOrder, user_id: userId, } = filterSort;
9
+ const aggregates = [];
10
+ if (personId) {
11
+ aggregates.push({ $match: { personId: new Types.ObjectId(personId) } });
12
+ }
13
+ if (userId) {
14
+ aggregates.push({ $match: { userId } });
15
+ }
16
+ if (burningStates) {
17
+ aggregates.push({
18
+ $match: {
19
+ $or: burningStates.map((it) => ({
20
+ burningEndsAt: it === 'burning'
21
+ ? {
22
+ $gte: new Date(),
23
+ }
24
+ : { $lte: new Date() },
25
+ })),
26
+ },
27
+ });
28
+ }
29
+ if (withPerson) {
30
+ aggregates.push(...CANDLE_PERSON_AGGREGATE);
31
+ }
32
+ if (sortName === 'litAt') {
33
+ aggregates.push({
34
+ $addFields: {
35
+ sortField: {
36
+ $dateSubtract: {
37
+ startDate: '$burningEndsAt',
38
+ unit: 'minute',
39
+ amount: '$burningMinutes',
40
+ },
41
+ },
42
+ },
43
+ });
44
+ aggregates.push({
45
+ $sort: {
46
+ sortField: sortOrder === 'asc' ? 1 : -1,
47
+ },
48
+ });
49
+ aggregates.push({
50
+ $unset: 'sortField',
51
+ });
52
+ }
53
+ else {
54
+ aggregates.push({
55
+ $sort: {
56
+ [sortName]: sortOrder === 'asc' ? 1 : -1,
57
+ },
58
+ });
59
+ }
60
+ const dataAggregates = [...aggregates];
61
+ if (skipCount) {
62
+ dataAggregates.push({
63
+ $skip: skipCount,
64
+ });
65
+ }
66
+ const facetAggregates = [
67
+ {
68
+ $facet: {
69
+ data: [
70
+ ...dataAggregates,
71
+ {
72
+ $limit: count,
73
+ },
74
+ ],
75
+ total: [...aggregates, { $count: 'totalCount' }],
76
+ },
77
+ },
78
+ ];
79
+ let data;
80
+ try {
81
+ data = await CandleDbModel.aggregate(facetAggregates);
82
+ }
83
+ catch (err) {
84
+ return {
85
+ customError: composeCustomError('Get candles failed', { err }),
86
+ };
87
+ }
88
+ return {
89
+ data: {
90
+ candles: data[0].data,
91
+ candlesCount: data[0].total.length > 0 ? data[0].total[0].totalCount : 0,
92
+ },
93
+ };
94
+ };
@@ -0,0 +1,17 @@
1
+ import { Candle } from '../../../../../candle/index.js';
2
+ import { CustomError } from '../../../../../error/index.js';
3
+ import { CandleFilterSort } from '../../../../../filter-sort/index.js';
4
+ import { Person } from '../../../../../person/index.js';
5
+ export type GetCandles = <T extends Candle | (Candle & {
6
+ person?: Person;
7
+ }) = never>(props: {
8
+ filterSort: CandleFilterSort;
9
+ withPerson?: boolean;
10
+ }) => Promise<{
11
+ data: {
12
+ candles: T[];
13
+ candlesCount: number;
14
+ };
15
+ } | {
16
+ customError: CustomError;
17
+ }>;
@@ -0,0 +1 @@
1
+ export * from './get-candles/index.js';
@@ -0,0 +1 @@
1
+ export * from './get-candles/index.js';
@@ -1,2 +1,3 @@
1
+ export * from './candle/index.js';
1
2
  export * from './error-log/index.js';
2
3
  export * from './translation/index.js';
@@ -1,2 +1,3 @@
1
+ export * from './candle/index.js';
1
2
  export * from './error-log/index.js';
2
3
  export * from './translation/index.js';
@@ -0,0 +1 @@
1
+ export * from './page-data/index.js';
@@ -0,0 +1 @@
1
+ export * from './page-data/index.js';
@@ -0,0 +1,2 @@
1
+ import { ComposeCandlesPageData } from './type.js';
2
+ export declare const composeCandlesPageData: ComposeCandlesPageData;
@@ -0,0 +1,30 @@
1
+ import { DICTIONARY_CONFIG } from '../../../../../dictionary/index.js';
2
+ import { DEFAULT_CANDLE_FILTER_SORT } from '../../../../../filter-sort/index.js';
3
+ import { getCandles, getTranslationsAsDictionary } from '../../../../database/index.js';
4
+ export const composeCandlesPageData = async ({ filterSort: initFilterSort, language }) => {
5
+ const filterSort = {
6
+ ...DEFAULT_CANDLE_FILTER_SORT,
7
+ ...initFilterSort,
8
+ };
9
+ let resp;
10
+ resp = await getTranslationsAsDictionary(language, DICTIONARY_CONFIG['candles-page'].translationIds);
11
+ if ('customError' in resp) {
12
+ return resp;
13
+ }
14
+ const dictionary = resp.data;
15
+ resp = await getCandles({ filterSort, withPerson: true });
16
+ if ('customError' in resp) {
17
+ return resp;
18
+ }
19
+ const { candles, candlesCount } = resp.data;
20
+ return {
21
+ data: {
22
+ candlesList: {
23
+ candles,
24
+ candlesCount,
25
+ },
26
+ dictionary,
27
+ filterSort,
28
+ },
29
+ };
30
+ };
@@ -0,0 +1,12 @@
1
+ import { Language } from '../../../../../dictionary/index.js';
2
+ import { CustomError } from '../../../../../error/index.js';
3
+ import { CandleFilterSort } from '../../../../../filter-sort/index.js';
4
+ import { CandlesPageData } from '../type.js';
5
+ export type ComposeCandlesPageData = (props: {
6
+ filterSort?: CandleFilterSort;
7
+ language: Language;
8
+ }) => Promise<{
9
+ data: CandlesPageData;
10
+ } | {
11
+ customError: CustomError;
12
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './compose-candles-page-data/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ export * from './compose-candles-page-data/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,14 @@
1
+ import { Candle } from '../../../../candle/index.js';
2
+ import { Dictionary } from '../../../../dictionary/index.js';
3
+ import { CandleFilterSort } from '../../../../filter-sort/index.js';
4
+ import { Person } from '../../../../person/index.js';
5
+ export interface CandlesPageData {
6
+ candlesList: {
7
+ candles: Array<Candle & {
8
+ person?: Person;
9
+ }>;
10
+ candlesCount: number;
11
+ };
12
+ dictionary: Dictionary;
13
+ filterSort: CandleFilterSort;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './candles/index.js';
@@ -0,0 +1 @@
1
+ export * from './candles/index.js';
@@ -0,0 +1 @@
1
+ export declare const BURNING_CANDLE_STATES: readonly ["burning", "burned"];
@@ -0,0 +1 @@
1
+ export const BURNING_CANDLE_STATES = ['burning', 'burned'];
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,2 @@
1
+ import { BurningCandleState } from './type.js';
2
+ export declare const isBurningCandleState: (data?: unknown) => data is BurningCandleState;
@@ -0,0 +1,4 @@
1
+ import { BURNING_CANDLE_STATES } from './config.js';
2
+ export const isBurningCandleState = (data) => {
3
+ return BURNING_CANDLE_STATES.some((it) => data === it);
4
+ };
@@ -0,0 +1,2 @@
1
+ import { BURNING_CANDLE_STATES } from './config.js';
2
+ export type BurningCandleState = (typeof BURNING_CANDLE_STATES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './burning-candle-state/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ export * from './burning-candle-state/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,11 @@
1
+ export interface Candle {
2
+ _id: string;
3
+ burningEndsAt: Date;
4
+ burningMinutes: number;
5
+ description?: string;
6
+ litName: string;
7
+ personId: string;
8
+ userId?: string;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  export declare const DICTIONARY_CONFIG: {
2
2
  readonly 'add-person-page': {
3
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "persons", "auth.cannotBeChangedLaterWarning", "auth.loginRequired", "add-person-page", "modify", "reset", "count", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "invalidImage", "tooBigImage", "image", "noMoreImages", "form.error.date", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "select", "form.error.maxLength", "proposable", "form.error.required", "name", "add-person-page", "person-details-page", "add-person-page.maintenance.submitError", "add-person-page.maintenance.submitSuccess", "errorLoadingData", "loading"];
3
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "persons", "auth.cannotBeChangedLaterWarning", "auth.loginRequired", "add-person-page", "modify", "reset", "count", "dropZone.acceptedFormats", "dropZone.drapActive", "dropZone.dropZone", "dropZone.sizeLimit", "invalidImage", "tooBigImage", "image", "noMoreImages", "form.error.date", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "select", "form.error.maxLength", "proposable", "form.error.required", "name", "add-person-page", "person-details-page", "add-person-page.maintenance.submitError", "add-person-page.maintenance.submitSuccess", "errorLoadingData", "loading", "persons-page"];
4
4
  };
5
5
  readonly 'candle-details-page': {
6
6
  readonly translationIds: readonly ["auth.loginRequired", "acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "person-candles-page", "imageCannotBeLoaded", "burnsSoFar", "burnedOutCandle", "candle.description", "litName", "candle-details-page.deleteCandle.submitError", "candle-details-page.deleteCandle.submitSuccess", "candle-details-page.deleteCandle.question", "candle-details-page.deleteCandle", "candle-details-page.myCandle.submitError", "candle-details-page.myCandle.submitSuccess", "candle-details-page.myCandle.loginRequired", "candle-details-page.myCandle.question", "candle-details-page.myCandle", "candle-details-page.relightCandle.submitError", "candle-details-page.relightCandle.submitSuccess", "candle-details-page.relightCandle.question", "candle-details-page.relightCandle", "cancel", "ok", "edit-candle-page", "candle-details-page", "person-details-page"];
@@ -33,10 +33,10 @@ export declare const DICTIONARY_CONFIG: {
33
33
  readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "auth.candleLitWarning", "light-candle-page", "person-candles-page.addCandle.description", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "imageCannotBeLoaded", "burnedOutCandle", "burnsSoFar", "timeAbbreviationDay", "timeAbbreviationHour", "timeAbbreviationMinute", "select", "burnedCandles", "burningCandles", "myCandles", "createdAt", "litName", "candles", "candle", "candlesInCount", "reset", "sort", "person-candles-page", "person-details-page"];
34
34
  };
35
35
  readonly 'person-details-page': {
36
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "person-candles-page", "persons", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "proposable", "burnedCandles", "burningCandles", "person-details-page.deletePerson.submitError", "cancel", "ok", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "edit-person-page", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "person-details-page"];
36
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "person-candles-page", "persons", "person.birthDate", "person.birthPlaceCountry", "person.deathDate", "person.description", "proposable", "burnedCandles", "burningCandles", "person-details-page.deletePerson.submitError", "cancel", "ok", "person-details-page.deletePerson.submitSuccess", "person-details-page.deletePerson.question", "person-details-page.deletePerson", "person-details-page.myPerson.submitError", "person-details-page.myPerson.submitSuccess", "person-details-page.myPerson.loginRequired", "person-details-page.myPerson.question", "person-details-page.myPerson", "edit-person-page", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "person-details-page", "persons-page", "auth.loginRequired"];
37
37
  };
38
38
  readonly 'persons-page': {
39
- readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "persons-page.addPerson.description", "login", "add-person-page", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "personsInCount", "person", "reset", "sort", "name", "caseSensitive", "myPersons", "select", "persons-map-page", "person.birthPlaceCountry", "persons", "persons-page.personsList.hasImage", "createdAt", "caseSensitive", "myPersons", "persons-page.personsList.hasImage", "name", "person.birthPlaceCountry", "person", "personsInCount", "reset", "sort", "createdAt", "name", "persons-page.personsList", "persons", "persons-map-page"];
39
+ readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "auth.cannotBeChangedLaterWarning", "persons-page.addPerson.description", "login", "add-person-page", "burnedCandles", "burningCandles", "imageCannotBeLoaded", "imageClickToSeeOriginal", "imageNotSet", "lightACandle", "personsInCount", "person", "reset", "sort", "name", "caseSensitive", "myPersons", "select", "persons-map-page", "person.birthPlaceCountry", "persons", "persons-page.personsList.hasImage", "createdAt", "caseSensitive", "myPersons", "persons-page.personsList.hasImage", "name", "person.birthPlaceCountry", "person", "personsInCount", "reset", "sort", "createdAt", "name", "persons-page.personsList", "persons", "persons-map-page", "persons-page"];
40
40
  };
41
41
  readonly 'persons-map-page': {
42
42
  readonly translationIds: readonly ["acceptAll", "cookie-policy-page", "customize", "rejectAll", "save", "cookieConsentForm.description", "cookieConsentForm.languageFormDescription", "cookieConsentForm.title", "author", "motto1", "motto2", "motto3", "login", "logout", "english", "hungarian", "add-person-page", "candles-page", "pageMenu.add-person-page", "pageMenu.candles-page", "pageMenu.contact-page", "pageMenu.cookie-policy-page", "pageMenu.help-page", "pageMenu.persons-page", "pageMenu.persons-map-page", "pageMenu.terms-and-conditions-page", "shareOnFacebook", "persons-map-page.map.description", "persons-map-page", "map"];
@@ -11,6 +11,7 @@ export const DICTIONARY_CONFIG = {
11
11
  'add-person-page.maintenance.submitSuccess',
12
12
  'errorLoadingData',
13
13
  'loading',
14
+ 'persons-page',
14
15
  ],
15
16
  },
16
17
  'candle-details-page': {
@@ -205,6 +206,8 @@ export const DICTIONARY_CONFIG = {
205
206
  'edit-person-page',
206
207
  ...PERSON_IMAGE_TRANSLATION_IDS,
207
208
  'person-details-page',
209
+ 'persons-page',
210
+ 'auth.loginRequired',
208
211
  ],
209
212
  },
210
213
  'persons-page': {
@@ -229,6 +232,7 @@ export const DICTIONARY_CONFIG = {
229
232
  'persons-page.personsList',
230
233
  'persons',
231
234
  'persons-map-page',
235
+ 'persons-page',
232
236
  ],
233
237
  },
234
238
  'persons-map-page': {
@@ -0,0 +1,2 @@
1
+ import { CandleFilterSort } from './type.js';
2
+ export declare const DEFAULT_CANDLE_FILTER_SORT: CandleFilterSort;
@@ -0,0 +1,5 @@
1
+ export const DEFAULT_CANDLE_FILTER_SORT = {
2
+ count: 50,
3
+ sort_name: 'createdAt',
4
+ sort_order: 'desc',
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './default.js';
2
+ export * from './type.js';
@@ -0,0 +1,2 @@
1
+ export * from './default.js';
2
+ export * from './type.js';
@@ -0,0 +1,12 @@
1
+ import { BurningCandleState } from '../../candle/index.js';
2
+ import { CandleSortName } from '../sort-name/index.js';
3
+ import { SortOrder } from '../sort-order/index.js';
4
+ export interface CandleFilterSort {
5
+ burning_states?: BurningCandleState[];
6
+ count: number;
7
+ person_id?: string;
8
+ skip_count?: number;
9
+ sort_name: CandleSortName;
10
+ sort_order: SortOrder;
11
+ user_id?: string;
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './candle-filter-sort/index.js';
@@ -0,0 +1 @@
1
+ export * from './candle-filter-sort/index.js';
@@ -0,0 +1 @@
1
+ export declare const CANDLE_SORT_NAMES: readonly ["burningEndsAt", "createdAt", "litAt", "litName"];
@@ -0,0 +1 @@
1
+ export const CANDLE_SORT_NAMES = ['burningEndsAt', 'createdAt', 'litAt', 'litName'];
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,2 @@
1
+ import { CandleSortName } from './type.js';
2
+ export declare const isCandleSortName: (data?: unknown) => data is CandleSortName;
@@ -0,0 +1,4 @@
1
+ import { CANDLE_SORT_NAMES } from './config.js';
2
+ export const isCandleSortName = (data) => {
3
+ return CANDLE_SORT_NAMES.some((it) => data === it);
4
+ };
@@ -0,0 +1,2 @@
1
+ import { CANDLE_SORT_NAMES } from './config.js';
2
+ export type CandleSortName = (typeof CANDLE_SORT_NAMES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './candle-sort-name/index.js';
@@ -0,0 +1 @@
1
+ export * from './candle-sort-name/index.js';
@@ -0,0 +1 @@
1
+ export declare const SORT_ORDERS: readonly ["asc", "desc"];
@@ -0,0 +1 @@
1
+ export const SORT_ORDERS = ['asc', 'desc'];
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,2 @@
1
+ import { SortOrder } from './type.js';
2
+ export declare const isSortOrder: (data?: unknown) => data is SortOrder;
@@ -0,0 +1,4 @@
1
+ import { SORT_ORDERS } from './config.js';
2
+ export const isSortOrder = (data) => {
3
+ return SORT_ORDERS.some((it) => data === it);
4
+ };
@@ -0,0 +1,2 @@
1
+ import { SORT_ORDERS } from './config.js';
2
+ export type SortOrder = (typeof SORT_ORDERS)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const COUNTRY_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BQ", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "GZ", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW"];
@@ -0,0 +1,248 @@
1
+ export const COUNTRY_CODES = [
2
+ 'AD',
3
+ 'AE',
4
+ 'AF',
5
+ 'AG',
6
+ 'AI',
7
+ 'AL',
8
+ 'AM',
9
+ 'AN',
10
+ 'AO',
11
+ 'AQ',
12
+ 'AR',
13
+ 'AS',
14
+ 'AT',
15
+ 'AU',
16
+ 'AW',
17
+ 'AX',
18
+ 'AZ',
19
+ 'BA',
20
+ 'BB',
21
+ 'BD',
22
+ 'BE',
23
+ 'BF',
24
+ 'BG',
25
+ 'BH',
26
+ 'BI',
27
+ 'BJ',
28
+ 'BM',
29
+ 'BN',
30
+ 'BO',
31
+ 'BR',
32
+ 'BQ',
33
+ 'BS',
34
+ 'BT',
35
+ 'BV',
36
+ 'BW',
37
+ 'BY',
38
+ 'BZ',
39
+ 'CA',
40
+ 'CC',
41
+ 'CD',
42
+ 'CF',
43
+ 'CG',
44
+ 'CH',
45
+ 'CI',
46
+ 'CK',
47
+ 'CL',
48
+ 'CM',
49
+ 'CN',
50
+ 'CO',
51
+ 'CR',
52
+ 'CU',
53
+ 'CV',
54
+ 'CX',
55
+ 'CY',
56
+ 'CZ',
57
+ 'DE',
58
+ 'DJ',
59
+ 'DK',
60
+ 'DM',
61
+ 'DO',
62
+ 'DZ',
63
+ 'EC',
64
+ 'EE',
65
+ 'EG',
66
+ 'EH',
67
+ 'ER',
68
+ 'ES',
69
+ 'ET',
70
+ 'FI',
71
+ 'FJ',
72
+ 'FK',
73
+ 'FM',
74
+ 'FO',
75
+ 'FR',
76
+ 'GA',
77
+ 'GB',
78
+ 'GD',
79
+ 'GE',
80
+ 'GF',
81
+ 'GG',
82
+ 'GH',
83
+ 'GI',
84
+ 'GL',
85
+ 'GM',
86
+ 'GN',
87
+ 'GP',
88
+ 'GQ',
89
+ 'GR',
90
+ 'GS',
91
+ 'GT',
92
+ 'GU',
93
+ 'GW',
94
+ 'GY',
95
+ 'GZ',
96
+ 'HK',
97
+ 'HM',
98
+ 'HN',
99
+ 'HR',
100
+ 'HT',
101
+ 'HU',
102
+ 'ID',
103
+ 'IE',
104
+ 'IL',
105
+ 'IM',
106
+ 'IN',
107
+ 'IO',
108
+ 'IQ',
109
+ 'IR',
110
+ 'IS',
111
+ 'IT',
112
+ 'JE',
113
+ 'JM',
114
+ 'JO',
115
+ 'JP',
116
+ 'KE',
117
+ 'KG',
118
+ 'KH',
119
+ 'KI',
120
+ 'KM',
121
+ 'KN',
122
+ 'KP',
123
+ 'KR',
124
+ 'KW',
125
+ 'KY',
126
+ 'KZ',
127
+ 'LA',
128
+ 'LB',
129
+ 'LC',
130
+ 'LI',
131
+ 'LK',
132
+ 'LR',
133
+ 'LS',
134
+ 'LT',
135
+ 'LU',
136
+ 'LV',
137
+ 'LY',
138
+ 'MA',
139
+ 'MC',
140
+ 'MD',
141
+ 'ME',
142
+ 'MG',
143
+ 'MH',
144
+ 'MK',
145
+ 'ML',
146
+ 'MM',
147
+ 'MN',
148
+ 'MO',
149
+ 'MP',
150
+ 'MQ',
151
+ 'MR',
152
+ 'MS',
153
+ 'MT',
154
+ 'MU',
155
+ 'MV',
156
+ 'MW',
157
+ 'MX',
158
+ 'MY',
159
+ 'MZ',
160
+ 'NA',
161
+ 'NC',
162
+ 'NE',
163
+ 'NF',
164
+ 'NG',
165
+ 'NI',
166
+ 'NL',
167
+ 'NO',
168
+ 'NP',
169
+ 'NR',
170
+ 'NU',
171
+ 'NZ',
172
+ 'OM',
173
+ 'PA',
174
+ 'PE',
175
+ 'PF',
176
+ 'PG',
177
+ 'PH',
178
+ 'PK',
179
+ 'PL',
180
+ 'PM',
181
+ 'PN',
182
+ 'PR',
183
+ 'PS',
184
+ 'PT',
185
+ 'PW',
186
+ 'PY',
187
+ 'QA',
188
+ 'RE',
189
+ 'RO',
190
+ 'RS',
191
+ 'RU',
192
+ 'RW',
193
+ 'SA',
194
+ 'SB',
195
+ 'SC',
196
+ 'SD',
197
+ 'SE',
198
+ 'SG',
199
+ 'SH',
200
+ 'SI',
201
+ 'SJ',
202
+ 'SK',
203
+ 'SL',
204
+ 'SM',
205
+ 'SN',
206
+ 'SO',
207
+ 'SR',
208
+ 'ST',
209
+ 'SV',
210
+ 'SY',
211
+ 'SZ',
212
+ 'TC',
213
+ 'TD',
214
+ 'TF',
215
+ 'TG',
216
+ 'TH',
217
+ 'TJ',
218
+ 'TK',
219
+ 'TL',
220
+ 'TM',
221
+ 'TN',
222
+ 'TO',
223
+ 'TR',
224
+ 'TT',
225
+ 'TV',
226
+ 'TW',
227
+ 'TZ',
228
+ 'UA',
229
+ 'UG',
230
+ 'US',
231
+ 'UY',
232
+ 'UZ',
233
+ 'VA',
234
+ 'VC',
235
+ 'VE',
236
+ 'VG',
237
+ 'VI',
238
+ 'VN',
239
+ 'VU',
240
+ 'WF',
241
+ 'WS',
242
+ 'XK',
243
+ 'YE',
244
+ 'YT',
245
+ 'ZA',
246
+ 'ZM',
247
+ 'ZW',
248
+ ];
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,3 @@
1
+ export * from './config.js';
2
+ export * from './type.js';
3
+ export * from './type-guard.js';
@@ -0,0 +1,2 @@
1
+ import { CountryCode } from './type.js';
2
+ export declare const isCountryCode: (data?: unknown) => data is CountryCode;
@@ -0,0 +1,4 @@
1
+ import { COUNTRY_CODES } from './config.js';
2
+ export const isCountryCode = (data) => {
3
+ return COUNTRY_CODES.some((it) => data === it);
4
+ };
@@ -0,0 +1,2 @@
1
+ import { COUNTRY_CODES } from './config.js';
2
+ export type CountryCode = (typeof COUNTRY_CODES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './county-code/index.js';
@@ -0,0 +1 @@
1
+ export * from './county-code/index.js';
package/src/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
+ export * from './candle/index.js';
1
2
  export * from './dictionary/index.js';
2
3
  export * from './environment/index.js';
3
4
  export * from './error/index.js';
5
+ export * from './filter-sort/index.js';
6
+ export * from './geographical/index.js';
4
7
  export * from './helper/index.js';
5
8
  export * from './page/index.js';
6
9
  export * from './person/index.js';
package/src/index.js CHANGED
@@ -1,6 +1,9 @@
1
+ export * from './candle/index.js';
1
2
  export * from './dictionary/index.js';
2
3
  export * from './environment/index.js';
3
4
  export * from './error/index.js';
5
+ export * from './filter-sort/index.js';
6
+ export * from './geographical/index.js';
4
7
  export * from './helper/index.js';
5
8
  export * from './page/index.js';
6
9
  export * from './person/index.js';
@@ -1 +1,2 @@
1
1
  export * from './person-image/index.js';
2
+ export * from './type.js';
@@ -1 +1,2 @@
1
1
  export * from './person-image/index.js';
2
+ export * from './type.js';
@@ -0,0 +1,21 @@
1
+ import { CountryCode } from '../geographical/index.js';
2
+ import { PersonImage } from './person-image/index.js';
3
+ export interface Person {
4
+ _id: string;
5
+ birth?: {
6
+ date?: string | null;
7
+ place?: {
8
+ countryCode?: CountryCode | null;
9
+ };
10
+ };
11
+ death?: {
12
+ date?: string | null;
13
+ };
14
+ description?: string | null;
15
+ images?: PersonImage[] | null;
16
+ isProposable?: boolean;
17
+ name: string;
18
+ userId?: string;
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ }
@@ -0,0 +1 @@
1
+ export {};