@candlerip/shared 0.0.139 → 0.0.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/common/index.d.ts +0 -1
  2. package/common/index.js +0 -1
  3. package/common/person/person-image/index.d.ts +0 -2
  4. package/common/person/person-image/index.js +0 -2
  5. package/common/person/person-image/type.d.ts +1 -8
  6. package/database/model/person/configs/index.d.ts +39 -597
  7. package/database/model/person/configs/index.js +2 -29
  8. package/database/page-data/person-candles/utils/compose-person-candles-page-data-db/index.js +11 -4
  9. package/database/page-data/person-candles/utils/compose-person-candles-page-data-db/type.d.ts +3 -4
  10. package/package.json +1 -1
  11. package/common/image/image/domains/index.d.ts +0 -5
  12. package/common/image/image/domains/index.js +0 -1
  13. package/common/image/image/index.d.ts +0 -1
  14. package/common/image/image/index.js +0 -1
  15. package/common/image/image-dimension/domains/index.d.ts +0 -5
  16. package/common/image/image-dimension/domains/index.js +0 -1
  17. package/common/image/image-dimension/index.d.ts +0 -1
  18. package/common/image/image-dimension/index.js +0 -1
  19. package/common/image/index.d.ts +0 -2
  20. package/common/image/index.js +0 -2
  21. package/common/person/person-image/file-name/config.d.ts +0 -1
  22. package/common/person/person-image/file-name/config.js +0 -2
  23. package/common/person/person-image/file-name/index.d.ts +0 -2
  24. package/common/person/person-image/file-name/index.js +0 -2
  25. package/common/person/person-image/file-name/type.d.ts +0 -2
  26. package/common/person/person-image/file-name/type.js +0 -1
  27. package/common/person/person-image/width/config.d.ts +0 -1
  28. package/common/person/person-image/width/config.js +0 -1
  29. package/common/person/person-image/width/index.d.ts +0 -2
  30. package/common/person/person-image/width/index.js +0 -2
  31. package/common/person/person-image/width/type.d.ts +0 -2
  32. package/common/person/person-image/width/type.js +0 -1
package/common/index.d.ts CHANGED
@@ -6,7 +6,6 @@ export * from './filter-sort/index.js';
6
6
  export * from './geographical/index.js';
7
7
  export * from './header/index.js';
8
8
  export * from './helpers/index.js';
9
- export * from './image/index.js';
10
9
  export * from './page/index.js';
11
10
  export * from './page-data/index.js';
12
11
  export * from './page-menu/index.js';
package/common/index.js CHANGED
@@ -6,7 +6,6 @@ export * from './filter-sort/index.js';
6
6
  export * from './geographical/index.js';
7
7
  export * from './header/index.js';
8
8
  export * from './helpers/index.js';
9
- export * from './image/index.js';
10
9
  export * from './page/index.js';
11
10
  export * from './page-data/index.js';
12
11
  export * from './page-menu/index.js';
@@ -1,3 +1 @@
1
- export * from './file-name/index.js';
2
- export * from './width/index.js';
3
1
  export * from './type.js';
@@ -1,3 +1 @@
1
- export * from './file-name/index.js';
2
- export * from './width/index.js';
3
1
  export * from './type.js';
@@ -1,10 +1,3 @@
1
- import { ImageDimension } from '../../image/index.js';
2
- import { PersonImageWidth } from './width/index.js';
3
1
  export interface PersonImage {
4
- dimensions: {
5
- original: ImageDimension<number>;
6
- resized: ImageDimension<PersonImageWidth>[];
7
- };
8
- extension: string;
9
- name: string;
2
+ fileName: string;
10
3
  }
@@ -5,62 +5,14 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
5
5
  name?: string | null | undefined;
6
6
  createdAt?: NativeDate | null | undefined;
7
7
  images?: mongoose.Types.DocumentArray<{
8
- name?: string | null | undefined;
9
- dimensions?: {
10
- original?: {
11
- width?: number | null | undefined;
12
- height?: number | null | undefined;
13
- } | null | undefined;
14
- resized?: mongoose.Types.DocumentArray<{
15
- width?: number | null | undefined;
16
- height?: number | null | undefined;
17
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
18
- width?: number | null | undefined;
19
- height?: number | null | undefined;
20
- }> & {
21
- width?: number | null | undefined;
22
- height?: number | null | undefined;
23
- }> | null | undefined;
24
- } | null | undefined;
25
- extension?: string | null | undefined;
8
+ _id?: unknown;
9
+ fileName?: string | null | undefined;
26
10
  }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
27
- name?: string | null | undefined;
28
- dimensions?: {
29
- original?: {
30
- width?: number | null | undefined;
31
- height?: number | null | undefined;
32
- } | null | undefined;
33
- resized?: mongoose.Types.DocumentArray<{
34
- width?: number | null | undefined;
35
- height?: number | null | undefined;
36
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
37
- width?: number | null | undefined;
38
- height?: number | null | undefined;
39
- }> & {
40
- width?: number | null | undefined;
41
- height?: number | null | undefined;
42
- }> | null | undefined;
43
- } | null | undefined;
44
- extension?: string | null | undefined;
11
+ _id?: unknown;
12
+ fileName?: string | null | undefined;
45
13
  }> & {
46
- name?: string | null | undefined;
47
- dimensions?: {
48
- original?: {
49
- width?: number | null | undefined;
50
- height?: number | null | undefined;
51
- } | null | undefined;
52
- resized?: mongoose.Types.DocumentArray<{
53
- width?: number | null | undefined;
54
- height?: number | null | undefined;
55
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
56
- width?: number | null | undefined;
57
- height?: number | null | undefined;
58
- }> & {
59
- width?: number | null | undefined;
60
- height?: number | null | undefined;
61
- }> | null | undefined;
62
- } | null | undefined;
63
- extension?: string | null | undefined;
14
+ _id?: unknown;
15
+ fileName?: string | null | undefined;
64
16
  }> | null | undefined;
65
17
  description?: string | null | undefined;
66
18
  userId?: string | null | undefined;
@@ -78,62 +30,14 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
78
30
  name?: string | null | undefined;
79
31
  createdAt?: NativeDate | null | undefined;
80
32
  images?: mongoose.Types.DocumentArray<{
81
- name?: string | null | undefined;
82
- dimensions?: {
83
- original?: {
84
- width?: number | null | undefined;
85
- height?: number | null | undefined;
86
- } | null | undefined;
87
- resized?: mongoose.Types.DocumentArray<{
88
- width?: number | null | undefined;
89
- height?: number | null | undefined;
90
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
91
- width?: number | null | undefined;
92
- height?: number | null | undefined;
93
- }> & {
94
- width?: number | null | undefined;
95
- height?: number | null | undefined;
96
- }> | null | undefined;
97
- } | null | undefined;
98
- extension?: string | null | undefined;
33
+ _id?: unknown;
34
+ fileName?: string | null | undefined;
99
35
  }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
100
- name?: string | null | undefined;
101
- dimensions?: {
102
- original?: {
103
- width?: number | null | undefined;
104
- height?: number | null | undefined;
105
- } | null | undefined;
106
- resized?: mongoose.Types.DocumentArray<{
107
- width?: number | null | undefined;
108
- height?: number | null | undefined;
109
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
110
- width?: number | null | undefined;
111
- height?: number | null | undefined;
112
- }> & {
113
- width?: number | null | undefined;
114
- height?: number | null | undefined;
115
- }> | null | undefined;
116
- } | null | undefined;
117
- extension?: string | null | undefined;
36
+ _id?: unknown;
37
+ fileName?: string | null | undefined;
118
38
  }> & {
119
- name?: string | null | undefined;
120
- dimensions?: {
121
- original?: {
122
- width?: number | null | undefined;
123
- height?: number | null | undefined;
124
- } | null | undefined;
125
- resized?: mongoose.Types.DocumentArray<{
126
- width?: number | null | undefined;
127
- height?: number | null | undefined;
128
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
129
- width?: number | null | undefined;
130
- height?: number | null | undefined;
131
- }> & {
132
- width?: number | null | undefined;
133
- height?: number | null | undefined;
134
- }> | null | undefined;
135
- } | null | undefined;
136
- extension?: string | null | undefined;
39
+ _id?: unknown;
40
+ fileName?: string | null | undefined;
137
41
  }> | null | undefined;
138
42
  description?: string | null | undefined;
139
43
  userId?: string | null | undefined;
@@ -155,62 +59,14 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
155
59
  name?: string | null | undefined;
156
60
  createdAt?: NativeDate | null | undefined;
157
61
  images?: mongoose.Types.DocumentArray<{
158
- name?: string | null | undefined;
159
- dimensions?: {
160
- original?: {
161
- width?: number | null | undefined;
162
- height?: number | null | undefined;
163
- } | null | undefined;
164
- resized?: mongoose.Types.DocumentArray<{
165
- width?: number | null | undefined;
166
- height?: number | null | undefined;
167
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
168
- width?: number | null | undefined;
169
- height?: number | null | undefined;
170
- }> & {
171
- width?: number | null | undefined;
172
- height?: number | null | undefined;
173
- }> | null | undefined;
174
- } | null | undefined;
175
- extension?: string | null | undefined;
62
+ _id?: unknown;
63
+ fileName?: string | null | undefined;
176
64
  }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
177
- name?: string | null | undefined;
178
- dimensions?: {
179
- original?: {
180
- width?: number | null | undefined;
181
- height?: number | null | undefined;
182
- } | null | undefined;
183
- resized?: mongoose.Types.DocumentArray<{
184
- width?: number | null | undefined;
185
- height?: number | null | undefined;
186
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
187
- width?: number | null | undefined;
188
- height?: number | null | undefined;
189
- }> & {
190
- width?: number | null | undefined;
191
- height?: number | null | undefined;
192
- }> | null | undefined;
193
- } | null | undefined;
194
- extension?: string | null | undefined;
65
+ _id?: unknown;
66
+ fileName?: string | null | undefined;
195
67
  }> & {
196
- name?: string | null | undefined;
197
- dimensions?: {
198
- original?: {
199
- width?: number | null | undefined;
200
- height?: number | null | undefined;
201
- } | null | undefined;
202
- resized?: mongoose.Types.DocumentArray<{
203
- width?: number | null | undefined;
204
- height?: number | null | undefined;
205
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
206
- width?: number | null | undefined;
207
- height?: number | null | undefined;
208
- }> & {
209
- width?: number | null | undefined;
210
- height?: number | null | undefined;
211
- }> | null | undefined;
212
- } | null | undefined;
213
- extension?: string | null | undefined;
68
+ _id?: unknown;
69
+ fileName?: string | null | undefined;
214
70
  }> | null | undefined;
215
71
  description?: string | null | undefined;
216
72
  userId?: string | null | undefined;
@@ -235,62 +91,14 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
235
91
  name?: string | null | undefined;
236
92
  createdAt?: NativeDate | null | undefined;
237
93
  images?: mongoose.Types.DocumentArray<{
238
- name?: string | null | undefined;
239
- dimensions?: {
240
- original?: {
241
- width?: number | null | undefined;
242
- height?: number | null | undefined;
243
- } | null | undefined;
244
- resized?: mongoose.Types.DocumentArray<{
245
- width?: number | null | undefined;
246
- height?: number | null | undefined;
247
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
248
- width?: number | null | undefined;
249
- height?: number | null | undefined;
250
- }> & {
251
- width?: number | null | undefined;
252
- height?: number | null | undefined;
253
- }> | null | undefined;
254
- } | null | undefined;
255
- extension?: string | null | undefined;
94
+ _id?: unknown;
95
+ fileName?: string | null | undefined;
256
96
  }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
257
- name?: string | null | undefined;
258
- dimensions?: {
259
- original?: {
260
- width?: number | null | undefined;
261
- height?: number | null | undefined;
262
- } | null | undefined;
263
- resized?: mongoose.Types.DocumentArray<{
264
- width?: number | null | undefined;
265
- height?: number | null | undefined;
266
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
267
- width?: number | null | undefined;
268
- height?: number | null | undefined;
269
- }> & {
270
- width?: number | null | undefined;
271
- height?: number | null | undefined;
272
- }> | null | undefined;
273
- } | null | undefined;
274
- extension?: string | null | undefined;
97
+ _id?: unknown;
98
+ fileName?: string | null | undefined;
275
99
  }> & {
276
- name?: string | null | undefined;
277
- dimensions?: {
278
- original?: {
279
- width?: number | null | undefined;
280
- height?: number | null | undefined;
281
- } | null | undefined;
282
- resized?: mongoose.Types.DocumentArray<{
283
- width?: number | null | undefined;
284
- height?: number | null | undefined;
285
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
286
- width?: number | null | undefined;
287
- height?: number | null | undefined;
288
- }> & {
289
- width?: number | null | undefined;
290
- height?: number | null | undefined;
291
- }> | null | undefined;
292
- } | null | undefined;
293
- extension?: string | null | undefined;
100
+ _id?: unknown;
101
+ fileName?: string | null | undefined;
294
102
  }> | null | undefined;
295
103
  description?: string | null | undefined;
296
104
  userId?: string | null | undefined;
@@ -312,62 +120,14 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
312
120
  name?: string | null | undefined;
313
121
  createdAt?: NativeDate | null | undefined;
314
122
  images?: mongoose.Types.DocumentArray<{
315
- name?: string | null | undefined;
316
- dimensions?: {
317
- original?: {
318
- width?: number | null | undefined;
319
- height?: number | null | undefined;
320
- } | null | undefined;
321
- resized?: mongoose.Types.DocumentArray<{
322
- width?: number | null | undefined;
323
- height?: number | null | undefined;
324
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
325
- width?: number | null | undefined;
326
- height?: number | null | undefined;
327
- }> & {
328
- width?: number | null | undefined;
329
- height?: number | null | undefined;
330
- }> | null | undefined;
331
- } | null | undefined;
332
- extension?: string | null | undefined;
123
+ _id?: unknown;
124
+ fileName?: string | null | undefined;
333
125
  }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
334
- name?: string | null | undefined;
335
- dimensions?: {
336
- original?: {
337
- width?: number | null | undefined;
338
- height?: number | null | undefined;
339
- } | null | undefined;
340
- resized?: mongoose.Types.DocumentArray<{
341
- width?: number | null | undefined;
342
- height?: number | null | undefined;
343
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
344
- width?: number | null | undefined;
345
- height?: number | null | undefined;
346
- }> & {
347
- width?: number | null | undefined;
348
- height?: number | null | undefined;
349
- }> | null | undefined;
350
- } | null | undefined;
351
- extension?: string | null | undefined;
126
+ _id?: unknown;
127
+ fileName?: string | null | undefined;
352
128
  }> & {
353
- name?: string | null | undefined;
354
- dimensions?: {
355
- original?: {
356
- width?: number | null | undefined;
357
- height?: number | null | undefined;
358
- } | null | undefined;
359
- resized?: mongoose.Types.DocumentArray<{
360
- width?: number | null | undefined;
361
- height?: number | null | undefined;
362
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
363
- width?: number | null | undefined;
364
- height?: number | null | undefined;
365
- }> & {
366
- width?: number | null | undefined;
367
- height?: number | null | undefined;
368
- }> | null | undefined;
369
- } | null | undefined;
370
- extension?: string | null | undefined;
129
+ _id?: unknown;
130
+ fileName?: string | null | undefined;
371
131
  }> | null | undefined;
372
132
  description?: string | null | undefined;
373
133
  userId?: string | null | undefined;
@@ -390,333 +150,15 @@ export declare const PersonDbSchema: mongoose.Schema<any, mongoose.Model<any, an
390
150
  name?: string | null | undefined;
391
151
  createdAt?: NativeDate | null | undefined;
392
152
  images?: mongoose.Types.DocumentArray<{
393
- name?: string | null | undefined;
394
- dimensions?: {
395
- original?: {
396
- width?: number | null | undefined;
397
- height?: number | null | undefined;
398
- } | null | undefined;
399
- resized?: mongoose.Types.DocumentArray<{
400
- width?: number | null | undefined;
401
- height?: number | null | undefined;
402
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
403
- width?: number | null | undefined;
404
- height?: number | null | undefined;
405
- }> & {
406
- width?: number | null | undefined;
407
- height?: number | null | undefined;
408
- }> | null | undefined;
409
- } | null | undefined;
410
- extension?: string | null | undefined;
411
- } | {
412
- name?: string | null | undefined;
413
- dimensions?: {
414
- original?: {
415
- width?: number | null | undefined;
416
- height?: number | null | undefined;
417
- } | null | undefined;
418
- resized?: mongoose.Types.DocumentArray<string | {
419
- width?: number | null | undefined;
420
- height?: number | null | undefined;
421
- } | {
422
- _id: mongoose.Types.ObjectId;
423
- } | {
424
- _id: string;
425
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
426
- width?: number | null | undefined;
427
- height?: number | null | undefined;
428
- } | {
429
- _id: mongoose.Types.ObjectId;
430
- } | {
431
- _id: string;
432
- }> & (string | {
433
- width?: number | null | undefined;
434
- height?: number | null | undefined;
435
- } | {
436
- _id: mongoose.Types.ObjectId;
437
- } | {
438
- _id: string;
439
- })> | null | undefined;
440
- } | null | undefined;
441
- extension?: string | null | undefined;
442
- _id: string;
443
- } | {
444
- name?: string | null | undefined;
445
- dimensions?: {
446
- original?: {
447
- width?: number | null | undefined;
448
- height?: number | null | undefined;
449
- } | null | undefined;
450
- resized?: mongoose.Types.DocumentArray<string | {
451
- width?: number | null | undefined;
452
- height?: number | null | undefined;
453
- } | {
454
- _id: mongoose.Types.ObjectId;
455
- }, mongoose.Types.Subdocument<mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
456
- width?: number | null | undefined;
457
- height?: number | null | undefined;
458
- } | {
459
- _id: mongoose.Types.ObjectId;
460
- }> & (string | {
461
- width?: number | null | undefined;
462
- height?: number | null | undefined;
463
- } | {
464
- _id: mongoose.Types.ObjectId;
465
- })> | null | undefined;
466
- } | null | undefined;
467
- extension?: string | null | undefined;
468
- _id: string;
469
- } | {
470
- name?: string | null | undefined;
471
- dimensions?: {
472
- original?: {
473
- width?: number | null | undefined;
474
- height?: number | null | undefined;
475
- } | null | undefined;
476
- resized?: mongoose.Types.DocumentArray<string | {
477
- width?: number | null | undefined;
478
- height?: number | null | undefined;
479
- } | {
480
- _id: mongoose.Types.ObjectId;
481
- } | {
482
- _id: string;
483
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
484
- width?: number | null | undefined;
485
- height?: number | null | undefined;
486
- } | {
487
- _id: mongoose.Types.ObjectId;
488
- } | {
489
- _id: string;
490
- }> & (string | {
491
- width?: number | null | undefined;
492
- height?: number | null | undefined;
493
- } | {
494
- _id: mongoose.Types.ObjectId;
495
- } | {
496
- _id: string;
497
- })> | null | undefined;
498
- } | null | undefined;
499
- extension?: string | null | undefined;
500
- _id: string;
501
- }, mongoose.Types.Subdocument<string | mongoose.mongo.BSON.ObjectId, unknown, {
502
- name?: string | null | undefined;
503
- dimensions?: {
504
- original?: {
505
- width?: number | null | undefined;
506
- height?: number | null | undefined;
507
- } | null | undefined;
508
- resized?: mongoose.Types.DocumentArray<{
509
- width?: number | null | undefined;
510
- height?: number | null | undefined;
511
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
512
- width?: number | null | undefined;
513
- height?: number | null | undefined;
514
- }> & {
515
- width?: number | null | undefined;
516
- height?: number | null | undefined;
517
- }> | null | undefined;
518
- } | null | undefined;
519
- extension?: string | null | undefined;
520
- } | {
521
- name?: string | null | undefined;
522
- dimensions?: {
523
- original?: {
524
- width?: number | null | undefined;
525
- height?: number | null | undefined;
526
- } | null | undefined;
527
- resized?: mongoose.Types.DocumentArray<string | {
528
- width?: number | null | undefined;
529
- height?: number | null | undefined;
530
- } | {
531
- _id: mongoose.Types.ObjectId;
532
- } | {
533
- _id: string;
534
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
535
- width?: number | null | undefined;
536
- height?: number | null | undefined;
537
- } | {
538
- _id: mongoose.Types.ObjectId;
539
- } | {
540
- _id: string;
541
- }> & (string | {
542
- width?: number | null | undefined;
543
- height?: number | null | undefined;
544
- } | {
545
- _id: mongoose.Types.ObjectId;
546
- } | {
547
- _id: string;
548
- })> | null | undefined;
549
- } | null | undefined;
550
- extension?: string | null | undefined;
551
- _id: string;
552
- } | {
553
- name?: string | null | undefined;
554
- dimensions?: {
555
- original?: {
556
- width?: number | null | undefined;
557
- height?: number | null | undefined;
558
- } | null | undefined;
559
- resized?: mongoose.Types.DocumentArray<string | {
560
- width?: number | null | undefined;
561
- height?: number | null | undefined;
562
- } | {
563
- _id: mongoose.Types.ObjectId;
564
- }, mongoose.Types.Subdocument<mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
565
- width?: number | null | undefined;
566
- height?: number | null | undefined;
567
- } | {
568
- _id: mongoose.Types.ObjectId;
569
- }> & (string | {
570
- width?: number | null | undefined;
571
- height?: number | null | undefined;
572
- } | {
573
- _id: mongoose.Types.ObjectId;
574
- })> | null | undefined;
575
- } | null | undefined;
576
- extension?: string | null | undefined;
577
- _id: string;
578
- } | {
579
- name?: string | null | undefined;
580
- dimensions?: {
581
- original?: {
582
- width?: number | null | undefined;
583
- height?: number | null | undefined;
584
- } | null | undefined;
585
- resized?: mongoose.Types.DocumentArray<string | {
586
- width?: number | null | undefined;
587
- height?: number | null | undefined;
588
- } | {
589
- _id: mongoose.Types.ObjectId;
590
- } | {
591
- _id: string;
592
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
593
- width?: number | null | undefined;
594
- height?: number | null | undefined;
595
- } | {
596
- _id: mongoose.Types.ObjectId;
597
- } | {
598
- _id: string;
599
- }> & (string | {
600
- width?: number | null | undefined;
601
- height?: number | null | undefined;
602
- } | {
603
- _id: mongoose.Types.ObjectId;
604
- } | {
605
- _id: string;
606
- })> | null | undefined;
607
- } | null | undefined;
608
- extension?: string | null | undefined;
609
- _id: string;
610
- }> & ({
611
- name?: string | null | undefined;
612
- dimensions?: {
613
- original?: {
614
- width?: number | null | undefined;
615
- height?: number | null | undefined;
616
- } | null | undefined;
617
- resized?: mongoose.Types.DocumentArray<{
618
- width?: number | null | undefined;
619
- height?: number | null | undefined;
620
- }, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, unknown, {
621
- width?: number | null | undefined;
622
- height?: number | null | undefined;
623
- }> & {
624
- width?: number | null | undefined;
625
- height?: number | null | undefined;
626
- }> | null | undefined;
627
- } | null | undefined;
628
- extension?: string | null | undefined;
629
- } | {
630
- name?: string | null | undefined;
631
- dimensions?: {
632
- original?: {
633
- width?: number | null | undefined;
634
- height?: number | null | undefined;
635
- } | null | undefined;
636
- resized?: mongoose.Types.DocumentArray<string | {
637
- width?: number | null | undefined;
638
- height?: number | null | undefined;
639
- } | {
640
- _id: mongoose.Types.ObjectId;
641
- } | {
642
- _id: string;
643
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
644
- width?: number | null | undefined;
645
- height?: number | null | undefined;
646
- } | {
647
- _id: mongoose.Types.ObjectId;
648
- } | {
649
- _id: string;
650
- }> & (string | {
651
- width?: number | null | undefined;
652
- height?: number | null | undefined;
653
- } | {
654
- _id: mongoose.Types.ObjectId;
655
- } | {
656
- _id: string;
657
- })> | null | undefined;
658
- } | null | undefined;
659
- extension?: string | null | undefined;
660
- _id: string;
661
- } | {
662
- name?: string | null | undefined;
663
- dimensions?: {
664
- original?: {
665
- width?: number | null | undefined;
666
- height?: number | null | undefined;
667
- } | null | undefined;
668
- resized?: mongoose.Types.DocumentArray<string | {
669
- width?: number | null | undefined;
670
- height?: number | null | undefined;
671
- } | {
672
- _id: mongoose.Types.ObjectId;
673
- }, mongoose.Types.Subdocument<mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
674
- width?: number | null | undefined;
675
- height?: number | null | undefined;
676
- } | {
677
- _id: mongoose.Types.ObjectId;
678
- }> & (string | {
679
- width?: number | null | undefined;
680
- height?: number | null | undefined;
681
- } | {
682
- _id: mongoose.Types.ObjectId;
683
- })> | null | undefined;
684
- } | null | undefined;
685
- extension?: string | null | undefined;
686
- _id: string;
687
- } | {
688
- name?: string | null | undefined;
689
- dimensions?: {
690
- original?: {
691
- width?: number | null | undefined;
692
- height?: number | null | undefined;
693
- } | null | undefined;
694
- resized?: mongoose.Types.DocumentArray<string | {
695
- width?: number | null | undefined;
696
- height?: number | null | undefined;
697
- } | {
698
- _id: mongoose.Types.ObjectId;
699
- } | {
700
- _id: string;
701
- }, mongoose.Types.Subdocument<string | mongoose.Types.ObjectId | mongoose.mongo.BSON.ObjectId, unknown, string | {
702
- width?: number | null | undefined;
703
- height?: number | null | undefined;
704
- } | {
705
- _id: mongoose.Types.ObjectId;
706
- } | {
707
- _id: string;
708
- }> & (string | {
709
- width?: number | null | undefined;
710
- height?: number | null | undefined;
711
- } | {
712
- _id: mongoose.Types.ObjectId;
713
- } | {
714
- _id: string;
715
- })> | null | undefined;
716
- } | null | undefined;
717
- extension?: string | null | undefined;
718
- _id: string;
719
- })> | null | undefined;
153
+ _id?: {} | undefined;
154
+ fileName?: string | null | undefined;
155
+ }, mongoose.Types.Subdocument<{}, unknown, {
156
+ _id?: {} | undefined;
157
+ fileName?: string | null | undefined;
158
+ }> & {
159
+ _id?: {} | undefined;
160
+ fileName?: string | null | undefined;
161
+ }> | null | undefined;
720
162
  description?: string | null | undefined;
721
163
  userId?: string | null | undefined;
722
164
  birth?: {
@@ -22,38 +22,11 @@ export const PersonDbSchema = new mongoose.Schema({
22
22
  type: String,
23
23
  },
24
24
  images: {
25
- _id: false,
26
25
  default: undefined,
27
26
  type: [
28
27
  {
29
- dimensions: {
30
- original: {
31
- height: {
32
- type: Number,
33
- },
34
- width: {
35
- type: Number,
36
- },
37
- },
38
- resized: {
39
- _id: false,
40
- default: undefined,
41
- type: [
42
- {
43
- height: {
44
- type: Number,
45
- },
46
- width: {
47
- type: Number,
48
- },
49
- },
50
- ],
51
- },
52
- },
53
- extension: {
54
- type: String,
55
- },
56
- name: {
28
+ _id: false,
29
+ fileName: {
57
30
  type: String,
58
31
  },
59
32
  },
@@ -1,6 +1,10 @@
1
- import { CustomErrorWorker } from '../../../../../common/index.js';
1
+ import { CustomErrorWorker, DEFAULT_CANDLE_FILTER_SORT } from '../../../../../common/index.js';
2
2
  import { getCandlesDb, getPersonDb } from '../../../../mutation/index.js';
3
- export const composePersonCandlesPageDataDb = async (personId, { filterSort }) => {
3
+ export const composePersonCandlesPageDataDb = async (personId, initFilterSort) => {
4
+ const filterSort = {
5
+ ...DEFAULT_CANDLE_FILTER_SORT,
6
+ ...initFilterSort,
7
+ };
4
8
  const { composeCustomError } = CustomErrorWorker({ info: { filterSort } });
5
9
  let resp;
6
10
  resp = await getPersonDb(personId);
@@ -9,7 +13,11 @@ export const composePersonCandlesPageDataDb = async (personId, { filterSort }) =
9
13
  }
10
14
  const { data: person } = resp;
11
15
  if (!person) {
12
- return { personNotFoundError: true, customError: composeCustomError('Person not found') };
16
+ return {
17
+ personNotFoundError: composeCustomError('Person not found'),
18
+ // TODO
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ };
13
21
  }
14
22
  const { burningStates, count, skipCount, sortName, sortOrder, userId } = filterSort;
15
23
  resp = await getCandlesDb({
@@ -25,7 +33,6 @@ export const composePersonCandlesPageDataDb = async (personId, { filterSort }) =
25
33
  userId,
26
34
  });
27
35
  if ('customError' in resp) {
28
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
36
  return resp;
30
37
  }
31
38
  const { candles, candlesCount } = resp.data;
@@ -1,9 +1,8 @@
1
1
  import { CandleFilterSort, CustomError, PersonCandlesPageData } from '../../../../../common/index.js';
2
- export type ComposePersonCandlesPageDataDb = (personId: string, options: {
3
- filterSort: CandleFilterSort;
4
- }) => Promise<{
2
+ export type ComposePersonCandlesPageDataDb = (personId: string, filterSort?: Partial<CandleFilterSort>) => Promise<{
5
3
  data: PersonCandlesPageData;
6
4
  } | {
7
- personNotFoundError?: boolean;
5
+ personNotFoundError: CustomError;
6
+ } | {
8
7
  customError: CustomError;
9
8
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared",
3
- "version": "0.0.139",
3
+ "version": "0.0.141",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "=22.19.0"
@@ -1,5 +0,0 @@
1
- import { PersonImage } from '../../../person/index.js';
2
- export interface Image {
3
- personImage: PersonImage;
4
- base64Image: string;
5
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './domains/index.js';
@@ -1 +0,0 @@
1
- export * from './domains/index.js';
@@ -1,5 +0,0 @@
1
- import { PersonImageWidth } from '../../../person/index.js';
2
- export interface ImageDimension<T extends PersonImageWidth | number> {
3
- height: number;
4
- width: T;
5
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './domains/index.js';
@@ -1 +0,0 @@
1
- export * from './domains/index.js';
@@ -1,2 +0,0 @@
1
- export * from './image/index.js';
2
- export * from './image-dimension/index.js';
@@ -1,2 +0,0 @@
1
- export * from './image/index.js';
2
- export * from './image-dimension/index.js';
@@ -1 +0,0 @@
1
- export declare const PERSON_IMAGE_FILE_NAMES: readonly ["original", 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288];
@@ -1,2 +0,0 @@
1
- import { PERSON_IMAGE_WIDTHS } from '../width/config.js';
2
- export const PERSON_IMAGE_FILE_NAMES = ['original', ...PERSON_IMAGE_WIDTHS];
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './type.js';
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './type.js';
@@ -1,2 +0,0 @@
1
- import { PERSON_IMAGE_FILE_NAMES } from './config.js';
2
- export type PersonImageFileName = (typeof PERSON_IMAGE_FILE_NAMES)[number];
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const PERSON_IMAGE_WIDTHS: readonly [32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288];
@@ -1 +0,0 @@
1
- export const PERSON_IMAGE_WIDTHS = [32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288];
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './type.js';
@@ -1,2 +0,0 @@
1
- export * from './config.js';
2
- export * from './type.js';
@@ -1,2 +0,0 @@
1
- import { PERSON_IMAGE_WIDTHS } from './config.js';
2
- export type PersonImageWidth = (typeof PERSON_IMAGE_WIDTHS)[number];
@@ -1 +0,0 @@
1
- export {};