@blackcode_sa/metaestetics-api 1.14.34 → 1.14.37
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.
- package/dist/admin/index.d.mts +9 -18
- package/dist/admin/index.d.ts +9 -18
- package/dist/backoffice/index.d.mts +41 -54
- package/dist/backoffice/index.d.ts +41 -54
- package/dist/backoffice/index.js +23 -38
- package/dist/backoffice/index.mjs +23 -38
- package/dist/index.d.mts +21 -34
- package/dist/index.d.ts +21 -34
- package/dist/index.js +23 -38
- package/dist/index.mjs +23 -38
- package/package.json +1 -1
- package/src/backoffice/services/brand.service.ts +4 -17
- package/src/backoffice/services/product.service.ts +12 -17
- package/src/backoffice/services/technology.service.ts +3 -1
- package/src/backoffice/types/brand.types.ts +0 -2
- package/src/backoffice/types/product.types.ts +18 -28
package/dist/admin/index.d.mts
CHANGED
|
@@ -450,20 +450,15 @@ interface FilledDocumentFileValue {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* Product used in procedures
|
|
453
|
-
*
|
|
453
|
+
* Simplified structure with only essential fields and flexible metadata
|
|
454
454
|
*
|
|
455
455
|
* @property id - Unique identifier of the product
|
|
456
456
|
* @property name - Name of the product
|
|
457
|
-
* @property brandId -
|
|
458
|
-
* @property brandName -
|
|
457
|
+
* @property brandId - Reference to the Brand document ID
|
|
458
|
+
* @property brandName - Display name of the brand (denormalized for performance)
|
|
459
|
+
* @property description - Detailed description of the product
|
|
459
460
|
* @property assignedTechnologyIds - Array of technology IDs this product is assigned to
|
|
460
|
-
* @property
|
|
461
|
-
* @property technicalDetails - Technical details and specifications
|
|
462
|
-
* @property warnings - List of warnings related to product use
|
|
463
|
-
* @property dosage - Dosage information (if applicable)
|
|
464
|
-
* @property composition - Product composition
|
|
465
|
-
* @property indications - List of indications for use
|
|
466
|
-
* @property contraindications - List of contraindications
|
|
461
|
+
* @property metadata - Flexible key-value pairs for additional product information
|
|
467
462
|
* @property isActive - Whether the product is active in the system
|
|
468
463
|
* @property createdAt - Creation date
|
|
469
464
|
* @property updatedAt - Last update date
|
|
@@ -473,17 +468,13 @@ interface Product {
|
|
|
473
468
|
name: string;
|
|
474
469
|
brandId: string;
|
|
475
470
|
brandName: string;
|
|
471
|
+
description: string;
|
|
472
|
+
category?: string;
|
|
476
473
|
assignedTechnologyIds?: string[];
|
|
474
|
+
metadata?: Record<string, string | number | boolean>;
|
|
475
|
+
isActive: boolean;
|
|
477
476
|
createdAt: Date;
|
|
478
477
|
updatedAt: Date;
|
|
479
|
-
isActive: boolean;
|
|
480
|
-
description?: string;
|
|
481
|
-
technicalDetails?: string;
|
|
482
|
-
warnings?: string[];
|
|
483
|
-
dosage?: string;
|
|
484
|
-
composition?: string;
|
|
485
|
-
indications?: string[];
|
|
486
|
-
contraindications?: ContraindicationDynamic[];
|
|
487
478
|
/** Present only in subcollections - synced from technology metadata */
|
|
488
479
|
technologyId?: string;
|
|
489
480
|
/** Present only in subcollections - synced from technology name */
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -450,20 +450,15 @@ interface FilledDocumentFileValue {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* Product used in procedures
|
|
453
|
-
*
|
|
453
|
+
* Simplified structure with only essential fields and flexible metadata
|
|
454
454
|
*
|
|
455
455
|
* @property id - Unique identifier of the product
|
|
456
456
|
* @property name - Name of the product
|
|
457
|
-
* @property brandId -
|
|
458
|
-
* @property brandName -
|
|
457
|
+
* @property brandId - Reference to the Brand document ID
|
|
458
|
+
* @property brandName - Display name of the brand (denormalized for performance)
|
|
459
|
+
* @property description - Detailed description of the product
|
|
459
460
|
* @property assignedTechnologyIds - Array of technology IDs this product is assigned to
|
|
460
|
-
* @property
|
|
461
|
-
* @property technicalDetails - Technical details and specifications
|
|
462
|
-
* @property warnings - List of warnings related to product use
|
|
463
|
-
* @property dosage - Dosage information (if applicable)
|
|
464
|
-
* @property composition - Product composition
|
|
465
|
-
* @property indications - List of indications for use
|
|
466
|
-
* @property contraindications - List of contraindications
|
|
461
|
+
* @property metadata - Flexible key-value pairs for additional product information
|
|
467
462
|
* @property isActive - Whether the product is active in the system
|
|
468
463
|
* @property createdAt - Creation date
|
|
469
464
|
* @property updatedAt - Last update date
|
|
@@ -473,17 +468,13 @@ interface Product {
|
|
|
473
468
|
name: string;
|
|
474
469
|
brandId: string;
|
|
475
470
|
brandName: string;
|
|
471
|
+
description: string;
|
|
472
|
+
category?: string;
|
|
476
473
|
assignedTechnologyIds?: string[];
|
|
474
|
+
metadata?: Record<string, string | number | boolean>;
|
|
475
|
+
isActive: boolean;
|
|
477
476
|
createdAt: Date;
|
|
478
477
|
updatedAt: Date;
|
|
479
|
-
isActive: boolean;
|
|
480
|
-
description?: string;
|
|
481
|
-
technicalDetails?: string;
|
|
482
|
-
warnings?: string[];
|
|
483
|
-
dosage?: string;
|
|
484
|
-
composition?: string;
|
|
485
|
-
indications?: string[];
|
|
486
|
-
contraindications?: ContraindicationDynamic[];
|
|
487
478
|
/** Present only in subcollections - synced from technology metadata */
|
|
488
479
|
technologyId?: string;
|
|
489
480
|
/** Present only in subcollections - synced from technology name */
|
|
@@ -14,7 +14,6 @@ import { z } from 'zod';
|
|
|
14
14
|
* @property manufacturer - Naziv proizvođača
|
|
15
15
|
* @property description - Detaljan opis brenda i njegovih proizvoda
|
|
16
16
|
* @property website - Web stranica brenda
|
|
17
|
-
* @property category - Kategorija brenda (npr. "laser", "peeling", "injectables") - za filtriranje
|
|
18
17
|
* @property isActive - Da li je brend aktivan u sistemu
|
|
19
18
|
* @property createdAt - Datum kreiranja
|
|
20
19
|
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
@@ -29,7 +28,6 @@ interface Brand {
|
|
|
29
28
|
isActive: boolean;
|
|
30
29
|
website?: string;
|
|
31
30
|
description?: string;
|
|
32
|
-
category?: string;
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Kolekcija u Firestore bazi gde se čuvaju brendovi
|
|
@@ -67,26 +65,23 @@ declare class BrandService extends BaseService {
|
|
|
67
65
|
isActive: boolean;
|
|
68
66
|
website?: string | undefined;
|
|
69
67
|
description?: string | undefined;
|
|
70
|
-
category?: string | undefined;
|
|
71
68
|
id: string;
|
|
72
69
|
}>;
|
|
73
70
|
/**
|
|
74
|
-
* Gets a paginated list of active brands, optionally filtered by name
|
|
71
|
+
* Gets a paginated list of active brands, optionally filtered by name.
|
|
75
72
|
* @param rowsPerPage - The number of brands to fetch.
|
|
76
73
|
* @param searchTerm - An optional string to filter brand names by (starts-with search).
|
|
77
74
|
* @param lastVisible - An optional document snapshot to use as a cursor for pagination.
|
|
78
|
-
* @param category - An optional category to filter brands by.
|
|
79
75
|
*/
|
|
80
|
-
getAll(rowsPerPage: number, searchTerm?: string, lastVisible?: any
|
|
76
|
+
getAll(rowsPerPage: number, searchTerm?: string, lastVisible?: any): Promise<{
|
|
81
77
|
brands: Brand[];
|
|
82
78
|
lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
|
|
83
79
|
}>;
|
|
84
80
|
/**
|
|
85
|
-
* Gets the total count of active brands, optionally filtered by name
|
|
81
|
+
* Gets the total count of active brands, optionally filtered by name.
|
|
86
82
|
* @param searchTerm - An optional string to filter brand names by (starts-with search).
|
|
87
|
-
* @param category - An optional category to filter brands by.
|
|
88
83
|
*/
|
|
89
|
-
getBrandsCount(searchTerm?: string
|
|
84
|
+
getBrandsCount(searchTerm?: string): Promise<number>;
|
|
90
85
|
/**
|
|
91
86
|
* Gets all active brands for filter dropdowns (not paginated).
|
|
92
87
|
*/
|
|
@@ -632,20 +627,15 @@ interface UpdateDocumentTemplateData {
|
|
|
632
627
|
|
|
633
628
|
/**
|
|
634
629
|
* Product used in procedures
|
|
635
|
-
*
|
|
630
|
+
* Simplified structure with only essential fields and flexible metadata
|
|
636
631
|
*
|
|
637
632
|
* @property id - Unique identifier of the product
|
|
638
633
|
* @property name - Name of the product
|
|
639
|
-
* @property brandId -
|
|
640
|
-
* @property brandName -
|
|
634
|
+
* @property brandId - Reference to the Brand document ID
|
|
635
|
+
* @property brandName - Display name of the brand (denormalized for performance)
|
|
636
|
+
* @property description - Detailed description of the product
|
|
641
637
|
* @property assignedTechnologyIds - Array of technology IDs this product is assigned to
|
|
642
|
-
* @property
|
|
643
|
-
* @property technicalDetails - Technical details and specifications
|
|
644
|
-
* @property warnings - List of warnings related to product use
|
|
645
|
-
* @property dosage - Dosage information (if applicable)
|
|
646
|
-
* @property composition - Product composition
|
|
647
|
-
* @property indications - List of indications for use
|
|
648
|
-
* @property contraindications - List of contraindications
|
|
638
|
+
* @property metadata - Flexible key-value pairs for additional product information
|
|
649
639
|
* @property isActive - Whether the product is active in the system
|
|
650
640
|
* @property createdAt - Creation date
|
|
651
641
|
* @property updatedAt - Last update date
|
|
@@ -655,17 +645,13 @@ interface Product {
|
|
|
655
645
|
name: string;
|
|
656
646
|
brandId: string;
|
|
657
647
|
brandName: string;
|
|
648
|
+
description: string;
|
|
649
|
+
category?: string;
|
|
658
650
|
assignedTechnologyIds?: string[];
|
|
651
|
+
metadata?: Record<string, string | number | boolean>;
|
|
652
|
+
isActive: boolean;
|
|
659
653
|
createdAt: Date;
|
|
660
654
|
updatedAt: Date;
|
|
661
|
-
isActive: boolean;
|
|
662
|
-
description?: string;
|
|
663
|
-
technicalDetails?: string;
|
|
664
|
-
warnings?: string[];
|
|
665
|
-
dosage?: string;
|
|
666
|
-
composition?: string;
|
|
667
|
-
indications?: string[];
|
|
668
|
-
contraindications?: ContraindicationDynamic[];
|
|
669
655
|
/** Present only in subcollections - synced from technology metadata */
|
|
670
656
|
technologyId?: string;
|
|
671
657
|
/** Present only in subcollections - synced from technology name */
|
|
@@ -688,11 +674,10 @@ declare const PRODUCTS_COLLECTION = "products";
|
|
|
688
674
|
interface IProductService {
|
|
689
675
|
/**
|
|
690
676
|
* Creates a new product in the top-level collection
|
|
691
|
-
* @param brandId - ID of the brand that manufactures this product
|
|
692
677
|
* @param product - Product data
|
|
693
678
|
* @param technologyIds - Optional array of technology IDs to assign this product to
|
|
694
679
|
*/
|
|
695
|
-
createTopLevel(
|
|
680
|
+
createTopLevel(product: Omit<Product, 'id' | 'createdAt' | 'updatedAt' | 'assignedTechnologyIds'>, technologyIds?: string[]): Promise<Product>;
|
|
696
681
|
/**
|
|
697
682
|
* Gets all products from the top-level collection
|
|
698
683
|
* @param options - Query options
|
|
@@ -701,6 +686,7 @@ interface IProductService {
|
|
|
701
686
|
rowsPerPage: number;
|
|
702
687
|
lastVisible?: any;
|
|
703
688
|
brandId?: string;
|
|
689
|
+
category?: string;
|
|
704
690
|
}): Promise<{
|
|
705
691
|
products: Product[];
|
|
706
692
|
lastVisible: any;
|
|
@@ -715,7 +701,7 @@ interface IProductService {
|
|
|
715
701
|
* @param productId - ID of the product to update
|
|
716
702
|
* @param product - Updated product data
|
|
717
703
|
*/
|
|
718
|
-
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'
|
|
704
|
+
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'>>): Promise<Product | null>;
|
|
719
705
|
/**
|
|
720
706
|
* Deletes a product from the top-level collection (soft delete)
|
|
721
707
|
* @param productId - ID of the product to delete
|
|
@@ -1754,7 +1740,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1754
1740
|
/**
|
|
1755
1741
|
* Creates a new product in the top-level collection
|
|
1756
1742
|
*/
|
|
1757
|
-
createTopLevel(
|
|
1743
|
+
createTopLevel(product: Omit<Product, 'id' | 'createdAt' | 'updatedAt' | 'assignedTechnologyIds'>, technologyIds?: string[]): Promise<Product>;
|
|
1758
1744
|
/**
|
|
1759
1745
|
* Gets all products from the top-level collection
|
|
1760
1746
|
*/
|
|
@@ -1762,6 +1748,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1762
1748
|
rowsPerPage: number;
|
|
1763
1749
|
lastVisible?: any;
|
|
1764
1750
|
brandId?: string;
|
|
1751
|
+
category?: string;
|
|
1765
1752
|
}): Promise<{
|
|
1766
1753
|
products: Product[];
|
|
1767
1754
|
lastVisible: any;
|
|
@@ -1773,7 +1760,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1773
1760
|
/**
|
|
1774
1761
|
* Updates a product in the top-level collection
|
|
1775
1762
|
*/
|
|
1776
|
-
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'
|
|
1763
|
+
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'>>): Promise<Product | null>;
|
|
1777
1764
|
/**
|
|
1778
1765
|
* Deletes a product from the top-level collection (soft delete)
|
|
1779
1766
|
*/
|
|
@@ -2074,15 +2061,15 @@ declare class TechnologyService extends BaseService implements ITechnologyServic
|
|
|
2074
2061
|
isActive: boolean;
|
|
2075
2062
|
description: string;
|
|
2076
2063
|
family: ProcedureFamily;
|
|
2077
|
-
technicalDetails?: string | undefined;
|
|
2078
|
-
contraindications: ContraindicationDynamic[];
|
|
2079
2064
|
categoryId: string;
|
|
2080
2065
|
subcategoryId: string;
|
|
2066
|
+
technicalDetails?: string | undefined;
|
|
2081
2067
|
requirements: {
|
|
2082
2068
|
pre: Requirement[];
|
|
2083
2069
|
post: Requirement[];
|
|
2084
2070
|
};
|
|
2085
2071
|
blockingConditions: BlockingCondition[];
|
|
2072
|
+
contraindications: ContraindicationDynamic[];
|
|
2086
2073
|
benefits: TreatmentBenefitDynamic[];
|
|
2087
2074
|
certificationRequirement: CertificationRequirement;
|
|
2088
2075
|
documentationTemplates?: TechnologyDocumentationTemplate[] | undefined;
|
|
@@ -5240,11 +5227,6 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5240
5227
|
name: string;
|
|
5241
5228
|
isActive: boolean;
|
|
5242
5229
|
family: ProcedureFamily;
|
|
5243
|
-
contraindications: {
|
|
5244
|
-
id: string;
|
|
5245
|
-
name: string;
|
|
5246
|
-
description?: string | undefined;
|
|
5247
|
-
}[];
|
|
5248
5230
|
categoryId: string;
|
|
5249
5231
|
subcategoryId: string;
|
|
5250
5232
|
requirements: {
|
|
@@ -5274,6 +5256,11 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5274
5256
|
}[];
|
|
5275
5257
|
};
|
|
5276
5258
|
blockingConditions: BlockingCondition[];
|
|
5259
|
+
contraindications: {
|
|
5260
|
+
id: string;
|
|
5261
|
+
name: string;
|
|
5262
|
+
description?: string | undefined;
|
|
5263
|
+
}[];
|
|
5277
5264
|
benefits: {
|
|
5278
5265
|
id: string;
|
|
5279
5266
|
name: string;
|
|
@@ -5386,14 +5373,14 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5386
5373
|
}, {
|
|
5387
5374
|
name: string;
|
|
5388
5375
|
family: ProcedureFamily;
|
|
5376
|
+
categoryId: string;
|
|
5377
|
+
subcategoryId: string;
|
|
5378
|
+
blockingConditions: BlockingCondition[];
|
|
5389
5379
|
contraindications: {
|
|
5390
5380
|
id: string;
|
|
5391
5381
|
name: string;
|
|
5392
5382
|
description?: string | undefined;
|
|
5393
5383
|
}[];
|
|
5394
|
-
categoryId: string;
|
|
5395
|
-
subcategoryId: string;
|
|
5396
|
-
blockingConditions: BlockingCondition[];
|
|
5397
5384
|
benefits: {
|
|
5398
5385
|
id: string;
|
|
5399
5386
|
name: string;
|
|
@@ -6257,14 +6244,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6257
6244
|
isActive?: boolean | undefined;
|
|
6258
6245
|
description?: string | undefined;
|
|
6259
6246
|
family?: ProcedureFamily | undefined;
|
|
6260
|
-
technicalDetails?: string | undefined;
|
|
6261
|
-
contraindications?: {
|
|
6262
|
-
id: string;
|
|
6263
|
-
name: string;
|
|
6264
|
-
description?: string | undefined;
|
|
6265
|
-
}[] | undefined;
|
|
6266
6247
|
categoryId?: string | undefined;
|
|
6267
6248
|
subcategoryId?: string | undefined;
|
|
6249
|
+
technicalDetails?: string | undefined;
|
|
6268
6250
|
requirements?: {
|
|
6269
6251
|
pre: {
|
|
6270
6252
|
name: string;
|
|
@@ -6292,6 +6274,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6292
6274
|
}[];
|
|
6293
6275
|
} | undefined;
|
|
6294
6276
|
blockingConditions?: BlockingCondition[] | undefined;
|
|
6277
|
+
contraindications?: {
|
|
6278
|
+
id: string;
|
|
6279
|
+
name: string;
|
|
6280
|
+
description?: string | undefined;
|
|
6281
|
+
}[] | undefined;
|
|
6295
6282
|
benefits?: {
|
|
6296
6283
|
id: string;
|
|
6297
6284
|
name: string;
|
|
@@ -6404,14 +6391,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6404
6391
|
isActive?: boolean | undefined;
|
|
6405
6392
|
description?: string | undefined;
|
|
6406
6393
|
family?: ProcedureFamily | undefined;
|
|
6407
|
-
technicalDetails?: string | undefined;
|
|
6408
|
-
contraindications?: {
|
|
6409
|
-
id: string;
|
|
6410
|
-
name: string;
|
|
6411
|
-
description?: string | undefined;
|
|
6412
|
-
}[] | undefined;
|
|
6413
6394
|
categoryId?: string | undefined;
|
|
6414
6395
|
subcategoryId?: string | undefined;
|
|
6396
|
+
technicalDetails?: string | undefined;
|
|
6415
6397
|
requirements?: {
|
|
6416
6398
|
pre: {
|
|
6417
6399
|
name: string;
|
|
@@ -6439,6 +6421,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6439
6421
|
}[];
|
|
6440
6422
|
} | undefined;
|
|
6441
6423
|
blockingConditions?: BlockingCondition[] | undefined;
|
|
6424
|
+
contraindications?: {
|
|
6425
|
+
id: string;
|
|
6426
|
+
name: string;
|
|
6427
|
+
description?: string | undefined;
|
|
6428
|
+
}[] | undefined;
|
|
6442
6429
|
benefits?: {
|
|
6443
6430
|
id: string;
|
|
6444
6431
|
name: string;
|
|
@@ -14,7 +14,6 @@ import { z } from 'zod';
|
|
|
14
14
|
* @property manufacturer - Naziv proizvođača
|
|
15
15
|
* @property description - Detaljan opis brenda i njegovih proizvoda
|
|
16
16
|
* @property website - Web stranica brenda
|
|
17
|
-
* @property category - Kategorija brenda (npr. "laser", "peeling", "injectables") - za filtriranje
|
|
18
17
|
* @property isActive - Da li je brend aktivan u sistemu
|
|
19
18
|
* @property createdAt - Datum kreiranja
|
|
20
19
|
* @property updatedAt - Datum poslednjeg ažuriranja
|
|
@@ -29,7 +28,6 @@ interface Brand {
|
|
|
29
28
|
isActive: boolean;
|
|
30
29
|
website?: string;
|
|
31
30
|
description?: string;
|
|
32
|
-
category?: string;
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Kolekcija u Firestore bazi gde se čuvaju brendovi
|
|
@@ -67,26 +65,23 @@ declare class BrandService extends BaseService {
|
|
|
67
65
|
isActive: boolean;
|
|
68
66
|
website?: string | undefined;
|
|
69
67
|
description?: string | undefined;
|
|
70
|
-
category?: string | undefined;
|
|
71
68
|
id: string;
|
|
72
69
|
}>;
|
|
73
70
|
/**
|
|
74
|
-
* Gets a paginated list of active brands, optionally filtered by name
|
|
71
|
+
* Gets a paginated list of active brands, optionally filtered by name.
|
|
75
72
|
* @param rowsPerPage - The number of brands to fetch.
|
|
76
73
|
* @param searchTerm - An optional string to filter brand names by (starts-with search).
|
|
77
74
|
* @param lastVisible - An optional document snapshot to use as a cursor for pagination.
|
|
78
|
-
* @param category - An optional category to filter brands by.
|
|
79
75
|
*/
|
|
80
|
-
getAll(rowsPerPage: number, searchTerm?: string, lastVisible?: any
|
|
76
|
+
getAll(rowsPerPage: number, searchTerm?: string, lastVisible?: any): Promise<{
|
|
81
77
|
brands: Brand[];
|
|
82
78
|
lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
|
|
83
79
|
}>;
|
|
84
80
|
/**
|
|
85
|
-
* Gets the total count of active brands, optionally filtered by name
|
|
81
|
+
* Gets the total count of active brands, optionally filtered by name.
|
|
86
82
|
* @param searchTerm - An optional string to filter brand names by (starts-with search).
|
|
87
|
-
* @param category - An optional category to filter brands by.
|
|
88
83
|
*/
|
|
89
|
-
getBrandsCount(searchTerm?: string
|
|
84
|
+
getBrandsCount(searchTerm?: string): Promise<number>;
|
|
90
85
|
/**
|
|
91
86
|
* Gets all active brands for filter dropdowns (not paginated).
|
|
92
87
|
*/
|
|
@@ -632,20 +627,15 @@ interface UpdateDocumentTemplateData {
|
|
|
632
627
|
|
|
633
628
|
/**
|
|
634
629
|
* Product used in procedures
|
|
635
|
-
*
|
|
630
|
+
* Simplified structure with only essential fields and flexible metadata
|
|
636
631
|
*
|
|
637
632
|
* @property id - Unique identifier of the product
|
|
638
633
|
* @property name - Name of the product
|
|
639
|
-
* @property brandId -
|
|
640
|
-
* @property brandName -
|
|
634
|
+
* @property brandId - Reference to the Brand document ID
|
|
635
|
+
* @property brandName - Display name of the brand (denormalized for performance)
|
|
636
|
+
* @property description - Detailed description of the product
|
|
641
637
|
* @property assignedTechnologyIds - Array of technology IDs this product is assigned to
|
|
642
|
-
* @property
|
|
643
|
-
* @property technicalDetails - Technical details and specifications
|
|
644
|
-
* @property warnings - List of warnings related to product use
|
|
645
|
-
* @property dosage - Dosage information (if applicable)
|
|
646
|
-
* @property composition - Product composition
|
|
647
|
-
* @property indications - List of indications for use
|
|
648
|
-
* @property contraindications - List of contraindications
|
|
638
|
+
* @property metadata - Flexible key-value pairs for additional product information
|
|
649
639
|
* @property isActive - Whether the product is active in the system
|
|
650
640
|
* @property createdAt - Creation date
|
|
651
641
|
* @property updatedAt - Last update date
|
|
@@ -655,17 +645,13 @@ interface Product {
|
|
|
655
645
|
name: string;
|
|
656
646
|
brandId: string;
|
|
657
647
|
brandName: string;
|
|
648
|
+
description: string;
|
|
649
|
+
category?: string;
|
|
658
650
|
assignedTechnologyIds?: string[];
|
|
651
|
+
metadata?: Record<string, string | number | boolean>;
|
|
652
|
+
isActive: boolean;
|
|
659
653
|
createdAt: Date;
|
|
660
654
|
updatedAt: Date;
|
|
661
|
-
isActive: boolean;
|
|
662
|
-
description?: string;
|
|
663
|
-
technicalDetails?: string;
|
|
664
|
-
warnings?: string[];
|
|
665
|
-
dosage?: string;
|
|
666
|
-
composition?: string;
|
|
667
|
-
indications?: string[];
|
|
668
|
-
contraindications?: ContraindicationDynamic[];
|
|
669
655
|
/** Present only in subcollections - synced from technology metadata */
|
|
670
656
|
technologyId?: string;
|
|
671
657
|
/** Present only in subcollections - synced from technology name */
|
|
@@ -688,11 +674,10 @@ declare const PRODUCTS_COLLECTION = "products";
|
|
|
688
674
|
interface IProductService {
|
|
689
675
|
/**
|
|
690
676
|
* Creates a new product in the top-level collection
|
|
691
|
-
* @param brandId - ID of the brand that manufactures this product
|
|
692
677
|
* @param product - Product data
|
|
693
678
|
* @param technologyIds - Optional array of technology IDs to assign this product to
|
|
694
679
|
*/
|
|
695
|
-
createTopLevel(
|
|
680
|
+
createTopLevel(product: Omit<Product, 'id' | 'createdAt' | 'updatedAt' | 'assignedTechnologyIds'>, technologyIds?: string[]): Promise<Product>;
|
|
696
681
|
/**
|
|
697
682
|
* Gets all products from the top-level collection
|
|
698
683
|
* @param options - Query options
|
|
@@ -701,6 +686,7 @@ interface IProductService {
|
|
|
701
686
|
rowsPerPage: number;
|
|
702
687
|
lastVisible?: any;
|
|
703
688
|
brandId?: string;
|
|
689
|
+
category?: string;
|
|
704
690
|
}): Promise<{
|
|
705
691
|
products: Product[];
|
|
706
692
|
lastVisible: any;
|
|
@@ -715,7 +701,7 @@ interface IProductService {
|
|
|
715
701
|
* @param productId - ID of the product to update
|
|
716
702
|
* @param product - Updated product data
|
|
717
703
|
*/
|
|
718
|
-
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'
|
|
704
|
+
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'>>): Promise<Product | null>;
|
|
719
705
|
/**
|
|
720
706
|
* Deletes a product from the top-level collection (soft delete)
|
|
721
707
|
* @param productId - ID of the product to delete
|
|
@@ -1754,7 +1740,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1754
1740
|
/**
|
|
1755
1741
|
* Creates a new product in the top-level collection
|
|
1756
1742
|
*/
|
|
1757
|
-
createTopLevel(
|
|
1743
|
+
createTopLevel(product: Omit<Product, 'id' | 'createdAt' | 'updatedAt' | 'assignedTechnologyIds'>, technologyIds?: string[]): Promise<Product>;
|
|
1758
1744
|
/**
|
|
1759
1745
|
* Gets all products from the top-level collection
|
|
1760
1746
|
*/
|
|
@@ -1762,6 +1748,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1762
1748
|
rowsPerPage: number;
|
|
1763
1749
|
lastVisible?: any;
|
|
1764
1750
|
brandId?: string;
|
|
1751
|
+
category?: string;
|
|
1765
1752
|
}): Promise<{
|
|
1766
1753
|
products: Product[];
|
|
1767
1754
|
lastVisible: any;
|
|
@@ -1773,7 +1760,7 @@ declare class ProductService extends BaseService implements IProductService {
|
|
|
1773
1760
|
/**
|
|
1774
1761
|
* Updates a product in the top-level collection
|
|
1775
1762
|
*/
|
|
1776
|
-
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'
|
|
1763
|
+
updateTopLevel(productId: string, product: Partial<Omit<Product, 'id' | 'createdAt'>>): Promise<Product | null>;
|
|
1777
1764
|
/**
|
|
1778
1765
|
* Deletes a product from the top-level collection (soft delete)
|
|
1779
1766
|
*/
|
|
@@ -2074,15 +2061,15 @@ declare class TechnologyService extends BaseService implements ITechnologyServic
|
|
|
2074
2061
|
isActive: boolean;
|
|
2075
2062
|
description: string;
|
|
2076
2063
|
family: ProcedureFamily;
|
|
2077
|
-
technicalDetails?: string | undefined;
|
|
2078
|
-
contraindications: ContraindicationDynamic[];
|
|
2079
2064
|
categoryId: string;
|
|
2080
2065
|
subcategoryId: string;
|
|
2066
|
+
technicalDetails?: string | undefined;
|
|
2081
2067
|
requirements: {
|
|
2082
2068
|
pre: Requirement[];
|
|
2083
2069
|
post: Requirement[];
|
|
2084
2070
|
};
|
|
2085
2071
|
blockingConditions: BlockingCondition[];
|
|
2072
|
+
contraindications: ContraindicationDynamic[];
|
|
2086
2073
|
benefits: TreatmentBenefitDynamic[];
|
|
2087
2074
|
certificationRequirement: CertificationRequirement;
|
|
2088
2075
|
documentationTemplates?: TechnologyDocumentationTemplate[] | undefined;
|
|
@@ -5240,11 +5227,6 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5240
5227
|
name: string;
|
|
5241
5228
|
isActive: boolean;
|
|
5242
5229
|
family: ProcedureFamily;
|
|
5243
|
-
contraindications: {
|
|
5244
|
-
id: string;
|
|
5245
|
-
name: string;
|
|
5246
|
-
description?: string | undefined;
|
|
5247
|
-
}[];
|
|
5248
5230
|
categoryId: string;
|
|
5249
5231
|
subcategoryId: string;
|
|
5250
5232
|
requirements: {
|
|
@@ -5274,6 +5256,11 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5274
5256
|
}[];
|
|
5275
5257
|
};
|
|
5276
5258
|
blockingConditions: BlockingCondition[];
|
|
5259
|
+
contraindications: {
|
|
5260
|
+
id: string;
|
|
5261
|
+
name: string;
|
|
5262
|
+
description?: string | undefined;
|
|
5263
|
+
}[];
|
|
5277
5264
|
benefits: {
|
|
5278
5265
|
id: string;
|
|
5279
5266
|
name: string;
|
|
@@ -5386,14 +5373,14 @@ declare const technologySchema: z.ZodObject<{
|
|
|
5386
5373
|
}, {
|
|
5387
5374
|
name: string;
|
|
5388
5375
|
family: ProcedureFamily;
|
|
5376
|
+
categoryId: string;
|
|
5377
|
+
subcategoryId: string;
|
|
5378
|
+
blockingConditions: BlockingCondition[];
|
|
5389
5379
|
contraindications: {
|
|
5390
5380
|
id: string;
|
|
5391
5381
|
name: string;
|
|
5392
5382
|
description?: string | undefined;
|
|
5393
5383
|
}[];
|
|
5394
|
-
categoryId: string;
|
|
5395
|
-
subcategoryId: string;
|
|
5396
|
-
blockingConditions: BlockingCondition[];
|
|
5397
5384
|
benefits: {
|
|
5398
5385
|
id: string;
|
|
5399
5386
|
name: string;
|
|
@@ -6257,14 +6244,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6257
6244
|
isActive?: boolean | undefined;
|
|
6258
6245
|
description?: string | undefined;
|
|
6259
6246
|
family?: ProcedureFamily | undefined;
|
|
6260
|
-
technicalDetails?: string | undefined;
|
|
6261
|
-
contraindications?: {
|
|
6262
|
-
id: string;
|
|
6263
|
-
name: string;
|
|
6264
|
-
description?: string | undefined;
|
|
6265
|
-
}[] | undefined;
|
|
6266
6247
|
categoryId?: string | undefined;
|
|
6267
6248
|
subcategoryId?: string | undefined;
|
|
6249
|
+
technicalDetails?: string | undefined;
|
|
6268
6250
|
requirements?: {
|
|
6269
6251
|
pre: {
|
|
6270
6252
|
name: string;
|
|
@@ -6292,6 +6274,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6292
6274
|
}[];
|
|
6293
6275
|
} | undefined;
|
|
6294
6276
|
blockingConditions?: BlockingCondition[] | undefined;
|
|
6277
|
+
contraindications?: {
|
|
6278
|
+
id: string;
|
|
6279
|
+
name: string;
|
|
6280
|
+
description?: string | undefined;
|
|
6281
|
+
}[] | undefined;
|
|
6295
6282
|
benefits?: {
|
|
6296
6283
|
id: string;
|
|
6297
6284
|
name: string;
|
|
@@ -6404,14 +6391,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6404
6391
|
isActive?: boolean | undefined;
|
|
6405
6392
|
description?: string | undefined;
|
|
6406
6393
|
family?: ProcedureFamily | undefined;
|
|
6407
|
-
technicalDetails?: string | undefined;
|
|
6408
|
-
contraindications?: {
|
|
6409
|
-
id: string;
|
|
6410
|
-
name: string;
|
|
6411
|
-
description?: string | undefined;
|
|
6412
|
-
}[] | undefined;
|
|
6413
6394
|
categoryId?: string | undefined;
|
|
6414
6395
|
subcategoryId?: string | undefined;
|
|
6396
|
+
technicalDetails?: string | undefined;
|
|
6415
6397
|
requirements?: {
|
|
6416
6398
|
pre: {
|
|
6417
6399
|
name: string;
|
|
@@ -6439,6 +6421,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
|
|
|
6439
6421
|
}[];
|
|
6440
6422
|
} | undefined;
|
|
6441
6423
|
blockingConditions?: BlockingCondition[] | undefined;
|
|
6424
|
+
contraindications?: {
|
|
6425
|
+
id: string;
|
|
6426
|
+
name: string;
|
|
6427
|
+
description?: string | undefined;
|
|
6428
|
+
}[] | undefined;
|
|
6442
6429
|
benefits?: {
|
|
6443
6430
|
id: string;
|
|
6444
6431
|
name: string;
|