@blackcode_sa/metaestetics-api 1.5.12 → 1.5.14

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.
@@ -74,23 +74,23 @@ interface Category {
74
74
  }
75
75
 
76
76
  /**
77
- * Proizvod koji se koristi u procedurama
78
- * Može biti potrošni materijal, oprema ili bilo koji drugi proizvod potreban za izvođenje procedure
77
+ * Product used in procedures
78
+ * Can be consumables, equipment, or any other product needed for performing procedures
79
79
  *
80
- * @property id - Jedinstveni identifikator proizvoda
81
- * @property name - Naziv proizvoda
82
- * @property description - Detaljan opis proizvoda i njegove namene
83
- * @property brandId - ID brenda koji proizvodi ovaj proizvod
84
- * @property technologyId - ID tehnologije sa kojom se proizvod koristi
85
- * @property technicalDetails - Tehnički detalji i specifikacije proizvoda
86
- * @property warnings - Lista upozorenja vezanih za korišćenje proizvoda
87
- * @property dosage - Informacije o doziranju (ako je primenljivo)
88
- * @property composition - Sastav proizvoda
89
- * @property indications - Lista indikacija za korišćenje
90
- * @property contraindications - Lista kontraindikacija
91
- * @property isActive - Da li je proizvod aktivan u sistemu
92
- * @property createdAt - Datum kreiranja
93
- * @property updatedAt - Datum poslednjeg ažuriranja
80
+ * @property id - Unique identifier of the product
81
+ * @property name - Name of the product
82
+ * @property description - Detailed description of the product and its purpose
83
+ * @property brandId - ID of the brand that manufactures this product
84
+ * @property technologyId - ID of the technology this product is used with
85
+ * @property technicalDetails - Technical details and specifications
86
+ * @property warnings - List of warnings related to product use
87
+ * @property dosage - Dosage information (if applicable)
88
+ * @property composition - Product composition
89
+ * @property indications - List of indications for use
90
+ * @property contraindications - List of contraindications
91
+ * @property isActive - Whether the product is active in the system
92
+ * @property createdAt - Creation date
93
+ * @property updatedAt - Last update date
94
94
  */
95
95
  interface Product {
96
96
  id?: string;
@@ -108,6 +108,47 @@ interface Product {
108
108
  indications?: string[];
109
109
  contraindications?: string[];
110
110
  }
111
+ /**
112
+ * Interface for the ProductService class
113
+ */
114
+ interface IProductService {
115
+ /**
116
+ * Creates a new product
117
+ * @param technologyId - ID of the technology this product is used with
118
+ * @param brandId - ID of the brand that manufactures this product
119
+ * @param product - Product data
120
+ */
121
+ create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
122
+ /**
123
+ * Gets all products for a technology
124
+ * @param technologyId - ID of the technology
125
+ */
126
+ getAllByTechnology(technologyId: string): Promise<Product[]>;
127
+ /**
128
+ * Gets all products for a brand
129
+ * @param brandId - ID of the brand
130
+ */
131
+ getAllByBrand(brandId: string): Promise<Product[]>;
132
+ /**
133
+ * Updates a product
134
+ * @param technologyId - ID of the technology
135
+ * @param productId - ID of the product to update
136
+ * @param product - Updated product data
137
+ */
138
+ update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
139
+ /**
140
+ * Deletes a product (soft delete)
141
+ * @param technologyId - ID of the technology
142
+ * @param productId - ID of the product to delete
143
+ */
144
+ delete(technologyId: string, productId: string): Promise<void>;
145
+ /**
146
+ * Gets a product by ID
147
+ * @param technologyId - ID of the technology
148
+ * @param productId - ID of the product
149
+ */
150
+ getById(technologyId: string, productId: string): Promise<Product | null>;
151
+ }
111
152
 
112
153
  /**
113
154
  * Jedinica mere za vremenski period
@@ -521,40 +562,24 @@ interface TechnologyRequirements {
521
562
  * @property updatedAt - Last update date
522
563
  */
523
564
  interface Technology {
524
- /** Jedinstveni identifikator tehnologije (automatski generisan od strane Firestore) */
525
565
  id?: string;
526
- /** Naziv tehnologije */
527
566
  name: string;
528
- /** Detaljan opis tehnologije */
529
567
  description: string;
530
- /** Familija procedura kojoj tehnologija pripada */
531
568
  family: ProcedureFamily;
532
- /** ID kategorije kojoj tehnologija pripada */
533
569
  categoryId: string;
534
- /** ID potkategorije kojoj tehnologija pripada */
535
570
  subcategoryId: string;
536
- /** Tehnički detalji i specifikacije */
537
571
  technicalDetails?: string;
538
- /** Zahtevi pre i posle tretmana */
539
572
  requirements: {
540
573
  pre: Requirement[];
541
574
  post: Requirement[];
542
575
  };
543
- /** Apsolutne kontraindikacije koje sprečavaju tretman */
544
576
  blockingConditions: BlockingCondition[];
545
- /** Relativne kontraindikacije koje zahtevaju posebnu pažnju */
546
577
  contraindications: Contraindication[];
547
- /** Očekivane dobrobiti tretmana */
548
578
  benefits: TreatmentBenefit[];
549
- /** Potrebna sertifikacija za korišćenje tehnologije */
550
579
  certificationRequirement: CertificationRequirement;
551
- /** Dokumentacioni šabloni potrebni za ovu tehnologiju */
552
580
  documentationTemplates?: DocumentTemplate[];
553
- /** Da li je tehnologija trenutno aktivna */
554
581
  isActive: boolean;
555
- /** Datum kreiranja */
556
582
  createdAt: Date;
557
- /** Datum poslednjeg ažuriranja */
558
583
  updatedAt: Date;
559
584
  }
560
585
 
@@ -1755,8 +1780,9 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
1755
1780
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1756
1781
  isActive: z.ZodOptional<z.ZodBoolean>;
1757
1782
  }, "strip", z.ZodTypeAny, {
1758
- title?: string | undefined;
1783
+ isActive?: boolean | undefined;
1759
1784
  description?: string | undefined;
1785
+ title?: string | undefined;
1760
1786
  elements?: ({
1761
1787
  type: DocumentElementType.HEADING;
1762
1788
  text: string;
@@ -1824,10 +1850,10 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
1824
1850
  maxFileSizeMB?: number | undefined;
1825
1851
  })[] | undefined;
1826
1852
  tags?: string[] | undefined;
1827
- isActive?: boolean | undefined;
1828
1853
  }, {
1829
- title?: string | undefined;
1854
+ isActive?: boolean | undefined;
1830
1855
  description?: string | undefined;
1856
+ title?: string | undefined;
1831
1857
  elements?: ({
1832
1858
  type: DocumentElementType.HEADING;
1833
1859
  text: string;
@@ -1895,7 +1921,6 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
1895
1921
  maxFileSizeMB?: number | undefined;
1896
1922
  })[] | undefined;
1897
1923
  tags?: string[] | undefined;
1898
- isActive?: boolean | undefined;
1899
1924
  }>;
1900
1925
  declare const documentTemplateSchema: z.ZodObject<{
1901
1926
  id: z.ZodString;
@@ -2165,6 +2190,9 @@ declare const documentTemplateSchema: z.ZodObject<{
2165
2190
  isActive: z.ZodBoolean;
2166
2191
  }, "strip", z.ZodTypeAny, {
2167
2192
  id: string;
2193
+ createdAt: number;
2194
+ updatedAt: number;
2195
+ isActive: boolean;
2168
2196
  title: string;
2169
2197
  elements: ({
2170
2198
  type: DocumentElementType.HEADING;
@@ -2244,15 +2272,15 @@ declare const documentTemplateSchema: z.ZodObject<{
2244
2272
  allowedFileTypes?: string[] | undefined;
2245
2273
  maxFileSizeMB?: number | undefined;
2246
2274
  })[];
2247
- isActive: boolean;
2248
- createdAt: number;
2249
- updatedAt: number;
2250
2275
  createdBy: string;
2251
2276
  version: number;
2252
2277
  description?: string | undefined;
2253
2278
  tags?: string[] | undefined;
2254
2279
  }, {
2255
2280
  id: string;
2281
+ createdAt: number;
2282
+ updatedAt: number;
2283
+ isActive: boolean;
2256
2284
  title: string;
2257
2285
  elements: ({
2258
2286
  type: DocumentElementType.HEADING;
@@ -2332,9 +2360,6 @@ declare const documentTemplateSchema: z.ZodObject<{
2332
2360
  allowedFileTypes?: string[] | undefined;
2333
2361
  maxFileSizeMB?: number | undefined;
2334
2362
  })[];
2335
- isActive: boolean;
2336
- createdAt: number;
2337
- updatedAt: number;
2338
2363
  createdBy: string;
2339
2364
  version: number;
2340
2365
  description?: string | undefined;
@@ -2404,10 +2429,10 @@ declare const requirementSchema: z.ZodObject<{
2404
2429
  importance: z.ZodEnum<["low", "medium", "high"]>;
2405
2430
  isActive: z.ZodDefault<z.ZodBoolean>;
2406
2431
  }, "strip", z.ZodTypeAny, {
2407
- type: RequirementType;
2408
- description: string;
2409
- isActive: boolean;
2410
2432
  name: string;
2433
+ isActive: boolean;
2434
+ description: string;
2435
+ type: RequirementType;
2411
2436
  timeframe: {
2412
2437
  duration: number;
2413
2438
  unit: TimeUnit;
@@ -2415,9 +2440,9 @@ declare const requirementSchema: z.ZodObject<{
2415
2440
  };
2416
2441
  importance: "low" | "medium" | "high";
2417
2442
  }, {
2418
- type: RequirementType;
2419
- description: string;
2420
2443
  name: string;
2444
+ description: string;
2445
+ type: RequirementType;
2421
2446
  timeframe: {
2422
2447
  duration: number;
2423
2448
  unit: TimeUnit;
@@ -2450,10 +2475,10 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2450
2475
  importance: z.ZodEnum<["low", "medium", "high"]>;
2451
2476
  isActive: z.ZodDefault<z.ZodBoolean>;
2452
2477
  }, "strip", z.ZodTypeAny, {
2453
- type: RequirementType;
2454
- description: string;
2455
- isActive: boolean;
2456
2478
  name: string;
2479
+ isActive: boolean;
2480
+ description: string;
2481
+ type: RequirementType;
2457
2482
  timeframe: {
2458
2483
  duration: number;
2459
2484
  unit: TimeUnit;
@@ -2461,9 +2486,9 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2461
2486
  };
2462
2487
  importance: "low" | "medium" | "high";
2463
2488
  }, {
2464
- type: RequirementType;
2465
- description: string;
2466
2489
  name: string;
2490
+ description: string;
2491
+ type: RequirementType;
2467
2492
  timeframe: {
2468
2493
  duration: number;
2469
2494
  unit: TimeUnit;
@@ -2492,10 +2517,10 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2492
2517
  importance: z.ZodEnum<["low", "medium", "high"]>;
2493
2518
  isActive: z.ZodDefault<z.ZodBoolean>;
2494
2519
  }, "strip", z.ZodTypeAny, {
2495
- type: RequirementType;
2496
- description: string;
2497
- isActive: boolean;
2498
2520
  name: string;
2521
+ isActive: boolean;
2522
+ description: string;
2523
+ type: RequirementType;
2499
2524
  timeframe: {
2500
2525
  duration: number;
2501
2526
  unit: TimeUnit;
@@ -2503,9 +2528,9 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2503
2528
  };
2504
2529
  importance: "low" | "medium" | "high";
2505
2530
  }, {
2506
- type: RequirementType;
2507
- description: string;
2508
2531
  name: string;
2532
+ description: string;
2533
+ type: RequirementType;
2509
2534
  timeframe: {
2510
2535
  duration: number;
2511
2536
  unit: TimeUnit;
@@ -2516,10 +2541,10 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2516
2541
  }>, "many">;
2517
2542
  }, "strip", z.ZodTypeAny, {
2518
2543
  pre: {
2519
- type: RequirementType;
2520
- description: string;
2521
- isActive: boolean;
2522
2544
  name: string;
2545
+ isActive: boolean;
2546
+ description: string;
2547
+ type: RequirementType;
2523
2548
  timeframe: {
2524
2549
  duration: number;
2525
2550
  unit: TimeUnit;
@@ -2528,10 +2553,10 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2528
2553
  importance: "low" | "medium" | "high";
2529
2554
  }[];
2530
2555
  post: {
2531
- type: RequirementType;
2532
- description: string;
2533
- isActive: boolean;
2534
2556
  name: string;
2557
+ isActive: boolean;
2558
+ description: string;
2559
+ type: RequirementType;
2535
2560
  timeframe: {
2536
2561
  duration: number;
2537
2562
  unit: TimeUnit;
@@ -2541,9 +2566,9 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2541
2566
  }[];
2542
2567
  }, {
2543
2568
  pre: {
2544
- type: RequirementType;
2545
- description: string;
2546
2569
  name: string;
2570
+ description: string;
2571
+ type: RequirementType;
2547
2572
  timeframe: {
2548
2573
  duration: number;
2549
2574
  unit: TimeUnit;
@@ -2553,9 +2578,9 @@ declare const technologyRequirementsSchema: z.ZodObject<{
2553
2578
  isActive?: boolean | undefined;
2554
2579
  }[];
2555
2580
  post: {
2556
- type: RequirementType;
2557
- description: string;
2558
2581
  name: string;
2582
+ description: string;
2583
+ type: RequirementType;
2559
2584
  timeframe: {
2560
2585
  duration: number;
2561
2586
  unit: TimeUnit;
@@ -2596,10 +2621,10 @@ declare const technologySchema: z.ZodObject<{
2596
2621
  importance: z.ZodEnum<["low", "medium", "high"]>;
2597
2622
  isActive: z.ZodDefault<z.ZodBoolean>;
2598
2623
  }, "strip", z.ZodTypeAny, {
2599
- type: RequirementType;
2600
- description: string;
2601
- isActive: boolean;
2602
2624
  name: string;
2625
+ isActive: boolean;
2626
+ description: string;
2627
+ type: RequirementType;
2603
2628
  timeframe: {
2604
2629
  duration: number;
2605
2630
  unit: TimeUnit;
@@ -2607,9 +2632,9 @@ declare const technologySchema: z.ZodObject<{
2607
2632
  };
2608
2633
  importance: "low" | "medium" | "high";
2609
2634
  }, {
2610
- type: RequirementType;
2611
- description: string;
2612
2635
  name: string;
2636
+ description: string;
2637
+ type: RequirementType;
2613
2638
  timeframe: {
2614
2639
  duration: number;
2615
2640
  unit: TimeUnit;
@@ -2638,10 +2663,10 @@ declare const technologySchema: z.ZodObject<{
2638
2663
  importance: z.ZodEnum<["low", "medium", "high"]>;
2639
2664
  isActive: z.ZodDefault<z.ZodBoolean>;
2640
2665
  }, "strip", z.ZodTypeAny, {
2641
- type: RequirementType;
2642
- description: string;
2643
- isActive: boolean;
2644
2666
  name: string;
2667
+ isActive: boolean;
2668
+ description: string;
2669
+ type: RequirementType;
2645
2670
  timeframe: {
2646
2671
  duration: number;
2647
2672
  unit: TimeUnit;
@@ -2649,9 +2674,9 @@ declare const technologySchema: z.ZodObject<{
2649
2674
  };
2650
2675
  importance: "low" | "medium" | "high";
2651
2676
  }, {
2652
- type: RequirementType;
2653
- description: string;
2654
2677
  name: string;
2678
+ description: string;
2679
+ type: RequirementType;
2655
2680
  timeframe: {
2656
2681
  duration: number;
2657
2682
  unit: TimeUnit;
@@ -2662,10 +2687,10 @@ declare const technologySchema: z.ZodObject<{
2662
2687
  }>, "many">;
2663
2688
  }, "strip", z.ZodTypeAny, {
2664
2689
  pre: {
2665
- type: RequirementType;
2666
- description: string;
2667
- isActive: boolean;
2668
2690
  name: string;
2691
+ isActive: boolean;
2692
+ description: string;
2693
+ type: RequirementType;
2669
2694
  timeframe: {
2670
2695
  duration: number;
2671
2696
  unit: TimeUnit;
@@ -2674,10 +2699,10 @@ declare const technologySchema: z.ZodObject<{
2674
2699
  importance: "low" | "medium" | "high";
2675
2700
  }[];
2676
2701
  post: {
2677
- type: RequirementType;
2678
- description: string;
2679
- isActive: boolean;
2680
2702
  name: string;
2703
+ isActive: boolean;
2704
+ description: string;
2705
+ type: RequirementType;
2681
2706
  timeframe: {
2682
2707
  duration: number;
2683
2708
  unit: TimeUnit;
@@ -2687,9 +2712,9 @@ declare const technologySchema: z.ZodObject<{
2687
2712
  }[];
2688
2713
  }, {
2689
2714
  pre: {
2690
- type: RequirementType;
2691
- description: string;
2692
2715
  name: string;
2716
+ description: string;
2717
+ type: RequirementType;
2693
2718
  timeframe: {
2694
2719
  duration: number;
2695
2720
  unit: TimeUnit;
@@ -2699,9 +2724,9 @@ declare const technologySchema: z.ZodObject<{
2699
2724
  isActive?: boolean | undefined;
2700
2725
  }[];
2701
2726
  post: {
2702
- type: RequirementType;
2703
- description: string;
2704
2727
  name: string;
2728
+ description: string;
2729
+ type: RequirementType;
2705
2730
  timeframe: {
2706
2731
  duration: number;
2707
2732
  unit: TimeUnit;
@@ -2981,6 +3006,9 @@ declare const technologySchema: z.ZodObject<{
2981
3006
  isActive: z.ZodBoolean;
2982
3007
  }, "strip", z.ZodTypeAny, {
2983
3008
  id: string;
3009
+ createdAt: number;
3010
+ updatedAt: number;
3011
+ isActive: boolean;
2984
3012
  title: string;
2985
3013
  elements: ({
2986
3014
  type: DocumentElementType.HEADING;
@@ -3060,15 +3088,15 @@ declare const technologySchema: z.ZodObject<{
3060
3088
  allowedFileTypes?: string[] | undefined;
3061
3089
  maxFileSizeMB?: number | undefined;
3062
3090
  })[];
3063
- isActive: boolean;
3064
- createdAt: number;
3065
- updatedAt: number;
3066
3091
  createdBy: string;
3067
3092
  version: number;
3068
3093
  description?: string | undefined;
3069
3094
  tags?: string[] | undefined;
3070
3095
  }, {
3071
3096
  id: string;
3097
+ createdAt: number;
3098
+ updatedAt: number;
3099
+ isActive: boolean;
3072
3100
  title: string;
3073
3101
  elements: ({
3074
3102
  type: DocumentElementType.HEADING;
@@ -3148,9 +3176,6 @@ declare const technologySchema: z.ZodObject<{
3148
3176
  allowedFileTypes?: string[] | undefined;
3149
3177
  maxFileSizeMB?: number | undefined;
3150
3178
  })[];
3151
- isActive: boolean;
3152
- createdAt: number;
3153
- updatedAt: number;
3154
3179
  createdBy: string;
3155
3180
  version: number;
3156
3181
  description?: string | undefined;
@@ -3169,17 +3194,18 @@ declare const technologySchema: z.ZodObject<{
3169
3194
  }>;
3170
3195
  isActive: z.ZodDefault<z.ZodBoolean>;
3171
3196
  }, "strip", z.ZodTypeAny, {
3172
- isActive: boolean;
3173
3197
  name: string;
3198
+ isActive: boolean;
3199
+ contraindications: Contraindication[];
3174
3200
  family: ProcedureFamily;
3175
3201
  categoryId: string;
3176
3202
  subcategoryId: string;
3177
3203
  requirements: {
3178
3204
  pre: {
3179
- type: RequirementType;
3180
- description: string;
3181
- isActive: boolean;
3182
3205
  name: string;
3206
+ isActive: boolean;
3207
+ description: string;
3208
+ type: RequirementType;
3183
3209
  timeframe: {
3184
3210
  duration: number;
3185
3211
  unit: TimeUnit;
@@ -3188,10 +3214,10 @@ declare const technologySchema: z.ZodObject<{
3188
3214
  importance: "low" | "medium" | "high";
3189
3215
  }[];
3190
3216
  post: {
3191
- type: RequirementType;
3192
- description: string;
3193
- isActive: boolean;
3194
3217
  name: string;
3218
+ isActive: boolean;
3219
+ description: string;
3220
+ type: RequirementType;
3195
3221
  timeframe: {
3196
3222
  duration: number;
3197
3223
  unit: TimeUnit;
@@ -3201,9 +3227,11 @@ declare const technologySchema: z.ZodObject<{
3201
3227
  }[];
3202
3228
  };
3203
3229
  blockingConditions: BlockingCondition[];
3204
- contraindications: Contraindication[];
3205
3230
  documentationTemplates: {
3206
3231
  id: string;
3232
+ createdAt: number;
3233
+ updatedAt: number;
3234
+ isActive: boolean;
3207
3235
  title: string;
3208
3236
  elements: ({
3209
3237
  type: DocumentElementType.HEADING;
@@ -3283,9 +3311,6 @@ declare const technologySchema: z.ZodObject<{
3283
3311
  allowedFileTypes?: string[] | undefined;
3284
3312
  maxFileSizeMB?: number | undefined;
3285
3313
  })[];
3286
- isActive: boolean;
3287
- createdAt: number;
3288
- updatedAt: number;
3289
3314
  createdBy: string;
3290
3315
  version: number;
3291
3316
  description?: string | undefined;
@@ -3300,13 +3325,16 @@ declare const technologySchema: z.ZodObject<{
3300
3325
  technicalDetails?: string | undefined;
3301
3326
  }, {
3302
3327
  name: string;
3328
+ contraindications: Contraindication[];
3303
3329
  family: ProcedureFamily;
3304
3330
  categoryId: string;
3305
3331
  subcategoryId: string;
3306
3332
  blockingConditions: BlockingCondition[];
3307
- contraindications: Contraindication[];
3308
3333
  documentationTemplates: {
3309
3334
  id: string;
3335
+ createdAt: number;
3336
+ updatedAt: number;
3337
+ isActive: boolean;
3310
3338
  title: string;
3311
3339
  elements: ({
3312
3340
  type: DocumentElementType.HEADING;
@@ -3386,9 +3414,6 @@ declare const technologySchema: z.ZodObject<{
3386
3414
  allowedFileTypes?: string[] | undefined;
3387
3415
  maxFileSizeMB?: number | undefined;
3388
3416
  })[];
3389
- isActive: boolean;
3390
- createdAt: number;
3391
- updatedAt: number;
3392
3417
  createdBy: string;
3393
3418
  version: number;
3394
3419
  description?: string | undefined;
@@ -3399,14 +3424,14 @@ declare const technologySchema: z.ZodObject<{
3399
3424
  minimumLevel: CertificationLevel;
3400
3425
  requiredSpecialties?: CertificationSpecialty[] | undefined;
3401
3426
  };
3402
- description?: string | undefined;
3403
3427
  isActive?: boolean | undefined;
3428
+ description?: string | undefined;
3404
3429
  technicalDetails?: string | undefined;
3405
3430
  requirements?: {
3406
3431
  pre: {
3407
- type: RequirementType;
3408
- description: string;
3409
3432
  name: string;
3433
+ description: string;
3434
+ type: RequirementType;
3410
3435
  timeframe: {
3411
3436
  duration: number;
3412
3437
  unit: TimeUnit;
@@ -3416,9 +3441,9 @@ declare const technologySchema: z.ZodObject<{
3416
3441
  isActive?: boolean | undefined;
3417
3442
  }[];
3418
3443
  post: {
3419
- type: RequirementType;
3420
- description: string;
3421
3444
  name: string;
3445
+ description: string;
3446
+ type: RequirementType;
3422
3447
  timeframe: {
3423
3448
  duration: number;
3424
3449
  unit: TimeUnit;
@@ -3438,15 +3463,15 @@ declare const categorySchema: z.ZodObject<{
3438
3463
  family: z.ZodNativeEnum<typeof ProcedureFamily>;
3439
3464
  isActive: z.ZodDefault<z.ZodBoolean>;
3440
3465
  }, "strip", z.ZodTypeAny, {
3441
- isActive: boolean;
3442
3466
  name: string;
3467
+ isActive: boolean;
3443
3468
  family: ProcedureFamily;
3444
3469
  description?: string | undefined;
3445
3470
  }, {
3446
3471
  name: string;
3447
3472
  family: ProcedureFamily;
3448
- description?: string | undefined;
3449
3473
  isActive?: boolean | undefined;
3474
+ description?: string | undefined;
3450
3475
  }>;
3451
3476
  /**
3452
3477
  * Subcategory validation schema
@@ -3457,15 +3482,15 @@ declare const subcategorySchema: z.ZodObject<{
3457
3482
  categoryId: z.ZodString;
3458
3483
  isActive: z.ZodDefault<z.ZodBoolean>;
3459
3484
  }, "strip", z.ZodTypeAny, {
3460
- isActive: boolean;
3461
3485
  name: string;
3486
+ isActive: boolean;
3462
3487
  categoryId: string;
3463
3488
  description?: string | undefined;
3464
3489
  }, {
3465
3490
  name: string;
3466
3491
  categoryId: string;
3467
- description?: string | undefined;
3468
3492
  isActive?: boolean | undefined;
3493
+ description?: string | undefined;
3469
3494
  }>;
3470
3495
  /**
3471
3496
  * Partial schemas for updates
@@ -3476,14 +3501,14 @@ declare const categoryUpdateSchema: z.ZodObject<{
3476
3501
  family: z.ZodOptional<z.ZodNativeEnum<typeof ProcedureFamily>>;
3477
3502
  isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3478
3503
  }, "strip", z.ZodTypeAny, {
3479
- description?: string | undefined;
3480
- isActive?: boolean | undefined;
3481
3504
  name?: string | undefined;
3505
+ isActive?: boolean | undefined;
3506
+ description?: string | undefined;
3482
3507
  family?: ProcedureFamily | undefined;
3483
3508
  }, {
3484
- description?: string | undefined;
3485
- isActive?: boolean | undefined;
3486
3509
  name?: string | undefined;
3510
+ isActive?: boolean | undefined;
3511
+ description?: string | undefined;
3487
3512
  family?: ProcedureFamily | undefined;
3488
3513
  }>;
3489
3514
  declare const subcategoryUpdateSchema: z.ZodObject<{
@@ -3492,14 +3517,14 @@ declare const subcategoryUpdateSchema: z.ZodObject<{
3492
3517
  categoryId: z.ZodOptional<z.ZodString>;
3493
3518
  isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3494
3519
  }, "strip", z.ZodTypeAny, {
3495
- description?: string | undefined;
3496
- isActive?: boolean | undefined;
3497
3520
  name?: string | undefined;
3521
+ isActive?: boolean | undefined;
3522
+ description?: string | undefined;
3498
3523
  categoryId?: string | undefined;
3499
3524
  }, {
3500
- description?: string | undefined;
3501
- isActive?: boolean | undefined;
3502
3525
  name?: string | undefined;
3526
+ isActive?: boolean | undefined;
3527
+ description?: string | undefined;
3503
3528
  categoryId?: string | undefined;
3504
3529
  }>;
3505
3530
  declare const technologyUpdateSchema: z.ZodObject<{
@@ -3530,10 +3555,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
3530
3555
  importance: z.ZodEnum<["low", "medium", "high"]>;
3531
3556
  isActive: z.ZodDefault<z.ZodBoolean>;
3532
3557
  }, "strip", z.ZodTypeAny, {
3533
- type: RequirementType;
3534
- description: string;
3535
- isActive: boolean;
3536
3558
  name: string;
3559
+ isActive: boolean;
3560
+ description: string;
3561
+ type: RequirementType;
3537
3562
  timeframe: {
3538
3563
  duration: number;
3539
3564
  unit: TimeUnit;
@@ -3541,9 +3566,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
3541
3566
  };
3542
3567
  importance: "low" | "medium" | "high";
3543
3568
  }, {
3544
- type: RequirementType;
3545
- description: string;
3546
3569
  name: string;
3570
+ description: string;
3571
+ type: RequirementType;
3547
3572
  timeframe: {
3548
3573
  duration: number;
3549
3574
  unit: TimeUnit;
@@ -3572,10 +3597,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
3572
3597
  importance: z.ZodEnum<["low", "medium", "high"]>;
3573
3598
  isActive: z.ZodDefault<z.ZodBoolean>;
3574
3599
  }, "strip", z.ZodTypeAny, {
3575
- type: RequirementType;
3576
- description: string;
3577
- isActive: boolean;
3578
3600
  name: string;
3601
+ isActive: boolean;
3602
+ description: string;
3603
+ type: RequirementType;
3579
3604
  timeframe: {
3580
3605
  duration: number;
3581
3606
  unit: TimeUnit;
@@ -3583,9 +3608,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
3583
3608
  };
3584
3609
  importance: "low" | "medium" | "high";
3585
3610
  }, {
3586
- type: RequirementType;
3587
- description: string;
3588
3611
  name: string;
3612
+ description: string;
3613
+ type: RequirementType;
3589
3614
  timeframe: {
3590
3615
  duration: number;
3591
3616
  unit: TimeUnit;
@@ -3596,10 +3621,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
3596
3621
  }>, "many">;
3597
3622
  }, "strip", z.ZodTypeAny, {
3598
3623
  pre: {
3599
- type: RequirementType;
3600
- description: string;
3601
- isActive: boolean;
3602
3624
  name: string;
3625
+ isActive: boolean;
3626
+ description: string;
3627
+ type: RequirementType;
3603
3628
  timeframe: {
3604
3629
  duration: number;
3605
3630
  unit: TimeUnit;
@@ -3608,10 +3633,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
3608
3633
  importance: "low" | "medium" | "high";
3609
3634
  }[];
3610
3635
  post: {
3611
- type: RequirementType;
3612
- description: string;
3613
- isActive: boolean;
3614
3636
  name: string;
3637
+ isActive: boolean;
3638
+ description: string;
3639
+ type: RequirementType;
3615
3640
  timeframe: {
3616
3641
  duration: number;
3617
3642
  unit: TimeUnit;
@@ -3621,9 +3646,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
3621
3646
  }[];
3622
3647
  }, {
3623
3648
  pre: {
3624
- type: RequirementType;
3625
- description: string;
3626
3649
  name: string;
3650
+ description: string;
3651
+ type: RequirementType;
3627
3652
  timeframe: {
3628
3653
  duration: number;
3629
3654
  unit: TimeUnit;
@@ -3633,9 +3658,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
3633
3658
  isActive?: boolean | undefined;
3634
3659
  }[];
3635
3660
  post: {
3636
- type: RequirementType;
3637
- description: string;
3638
3661
  name: string;
3662
+ description: string;
3663
+ type: RequirementType;
3639
3664
  timeframe: {
3640
3665
  duration: number;
3641
3666
  unit: TimeUnit;
@@ -3915,6 +3940,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
3915
3940
  isActive: z.ZodBoolean;
3916
3941
  }, "strip", z.ZodTypeAny, {
3917
3942
  id: string;
3943
+ createdAt: number;
3944
+ updatedAt: number;
3945
+ isActive: boolean;
3918
3946
  title: string;
3919
3947
  elements: ({
3920
3948
  type: DocumentElementType.HEADING;
@@ -3994,15 +4022,15 @@ declare const technologyUpdateSchema: z.ZodObject<{
3994
4022
  allowedFileTypes?: string[] | undefined;
3995
4023
  maxFileSizeMB?: number | undefined;
3996
4024
  })[];
3997
- isActive: boolean;
3998
- createdAt: number;
3999
- updatedAt: number;
4000
4025
  createdBy: string;
4001
4026
  version: number;
4002
4027
  description?: string | undefined;
4003
4028
  tags?: string[] | undefined;
4004
4029
  }, {
4005
4030
  id: string;
4031
+ createdAt: number;
4032
+ updatedAt: number;
4033
+ isActive: boolean;
4006
4034
  title: string;
4007
4035
  elements: ({
4008
4036
  type: DocumentElementType.HEADING;
@@ -4082,9 +4110,6 @@ declare const technologyUpdateSchema: z.ZodObject<{
4082
4110
  allowedFileTypes?: string[] | undefined;
4083
4111
  maxFileSizeMB?: number | undefined;
4084
4112
  })[];
4085
- isActive: boolean;
4086
- createdAt: number;
4087
- updatedAt: number;
4088
4113
  createdBy: string;
4089
4114
  version: number;
4090
4115
  description?: string | undefined;
@@ -4103,19 +4128,20 @@ declare const technologyUpdateSchema: z.ZodObject<{
4103
4128
  }>>;
4104
4129
  isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4105
4130
  }, "strip", z.ZodTypeAny, {
4106
- description?: string | undefined;
4107
- isActive?: boolean | undefined;
4108
4131
  name?: string | undefined;
4132
+ isActive?: boolean | undefined;
4133
+ description?: string | undefined;
4109
4134
  technicalDetails?: string | undefined;
4135
+ contraindications?: Contraindication[] | undefined;
4110
4136
  family?: ProcedureFamily | undefined;
4111
4137
  categoryId?: string | undefined;
4112
4138
  subcategoryId?: string | undefined;
4113
4139
  requirements?: {
4114
4140
  pre: {
4115
- type: RequirementType;
4116
- description: string;
4117
- isActive: boolean;
4118
4141
  name: string;
4142
+ isActive: boolean;
4143
+ description: string;
4144
+ type: RequirementType;
4119
4145
  timeframe: {
4120
4146
  duration: number;
4121
4147
  unit: TimeUnit;
@@ -4124,10 +4150,10 @@ declare const technologyUpdateSchema: z.ZodObject<{
4124
4150
  importance: "low" | "medium" | "high";
4125
4151
  }[];
4126
4152
  post: {
4127
- type: RequirementType;
4128
- description: string;
4129
- isActive: boolean;
4130
4153
  name: string;
4154
+ isActive: boolean;
4155
+ description: string;
4156
+ type: RequirementType;
4131
4157
  timeframe: {
4132
4158
  duration: number;
4133
4159
  unit: TimeUnit;
@@ -4137,9 +4163,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
4137
4163
  }[];
4138
4164
  } | undefined;
4139
4165
  blockingConditions?: BlockingCondition[] | undefined;
4140
- contraindications?: Contraindication[] | undefined;
4141
4166
  documentationTemplates?: {
4142
4167
  id: string;
4168
+ createdAt: number;
4169
+ updatedAt: number;
4170
+ isActive: boolean;
4143
4171
  title: string;
4144
4172
  elements: ({
4145
4173
  type: DocumentElementType.HEADING;
@@ -4219,9 +4247,6 @@ declare const technologyUpdateSchema: z.ZodObject<{
4219
4247
  allowedFileTypes?: string[] | undefined;
4220
4248
  maxFileSizeMB?: number | undefined;
4221
4249
  })[];
4222
- isActive: boolean;
4223
- createdAt: number;
4224
- updatedAt: number;
4225
4250
  createdBy: string;
4226
4251
  version: number;
4227
4252
  description?: string | undefined;
@@ -4233,18 +4258,19 @@ declare const technologyUpdateSchema: z.ZodObject<{
4233
4258
  requiredSpecialties?: CertificationSpecialty[] | undefined;
4234
4259
  } | undefined;
4235
4260
  }, {
4236
- description?: string | undefined;
4237
- isActive?: boolean | undefined;
4238
4261
  name?: string | undefined;
4262
+ isActive?: boolean | undefined;
4263
+ description?: string | undefined;
4239
4264
  technicalDetails?: string | undefined;
4265
+ contraindications?: Contraindication[] | undefined;
4240
4266
  family?: ProcedureFamily | undefined;
4241
4267
  categoryId?: string | undefined;
4242
4268
  subcategoryId?: string | undefined;
4243
4269
  requirements?: {
4244
4270
  pre: {
4245
- type: RequirementType;
4246
- description: string;
4247
4271
  name: string;
4272
+ description: string;
4273
+ type: RequirementType;
4248
4274
  timeframe: {
4249
4275
  duration: number;
4250
4276
  unit: TimeUnit;
@@ -4254,9 +4280,9 @@ declare const technologyUpdateSchema: z.ZodObject<{
4254
4280
  isActive?: boolean | undefined;
4255
4281
  }[];
4256
4282
  post: {
4257
- type: RequirementType;
4258
- description: string;
4259
4283
  name: string;
4284
+ description: string;
4285
+ type: RequirementType;
4260
4286
  timeframe: {
4261
4287
  duration: number;
4262
4288
  unit: TimeUnit;
@@ -4267,9 +4293,11 @@ declare const technologyUpdateSchema: z.ZodObject<{
4267
4293
  }[];
4268
4294
  } | undefined;
4269
4295
  blockingConditions?: BlockingCondition[] | undefined;
4270
- contraindications?: Contraindication[] | undefined;
4271
4296
  documentationTemplates?: {
4272
4297
  id: string;
4298
+ createdAt: number;
4299
+ updatedAt: number;
4300
+ isActive: boolean;
4273
4301
  title: string;
4274
4302
  elements: ({
4275
4303
  type: DocumentElementType.HEADING;
@@ -4349,9 +4377,6 @@ declare const technologyUpdateSchema: z.ZodObject<{
4349
4377
  allowedFileTypes?: string[] | undefined;
4350
4378
  maxFileSizeMB?: number | undefined;
4351
4379
  })[];
4352
- isActive: boolean;
4353
- createdAt: number;
4354
- updatedAt: number;
4355
4380
  createdBy: string;
4356
4381
  version: number;
4357
4382
  description?: string | undefined;
@@ -4383,10 +4408,10 @@ declare const requirementUpdateSchema: z.ZodObject<{
4383
4408
  importance: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4384
4409
  isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4385
4410
  }, "strip", z.ZodTypeAny, {
4386
- type?: RequirementType | undefined;
4387
- description?: string | undefined;
4388
- isActive?: boolean | undefined;
4389
4411
  name?: string | undefined;
4412
+ isActive?: boolean | undefined;
4413
+ description?: string | undefined;
4414
+ type?: RequirementType | undefined;
4390
4415
  timeframe?: {
4391
4416
  duration: number;
4392
4417
  unit: TimeUnit;
@@ -4394,10 +4419,10 @@ declare const requirementUpdateSchema: z.ZodObject<{
4394
4419
  } | undefined;
4395
4420
  importance?: "low" | "medium" | "high" | undefined;
4396
4421
  }, {
4397
- type?: RequirementType | undefined;
4398
- description?: string | undefined;
4399
- isActive?: boolean | undefined;
4400
4422
  name?: string | undefined;
4423
+ isActive?: boolean | undefined;
4424
+ description?: string | undefined;
4425
+ type?: RequirementType | undefined;
4401
4426
  timeframe?: {
4402
4427
  duration: number;
4403
4428
  unit: TimeUnit;
@@ -4444,11 +4469,11 @@ declare class CategoryService extends BaseService {
4444
4469
  * @returns Kreirana kategorija sa generisanim ID-em
4445
4470
  */
4446
4471
  create(category: Omit<Category, "id" | "createdAt" | "updatedAt">): Promise<{
4447
- description: string;
4448
- isActive: boolean;
4449
4472
  createdAt: Date;
4450
4473
  updatedAt: Date;
4451
4474
  name: string;
4475
+ isActive: boolean;
4476
+ description: string;
4452
4477
  family: ProcedureFamily;
4453
4478
  id: string;
4454
4479
  }>;
@@ -4509,11 +4534,11 @@ declare class SubcategoryService extends BaseService {
4509
4534
  * @returns Kreirana podkategorija sa generisanim ID-em
4510
4535
  */
4511
4536
  create(categoryId: string, subcategory: Omit<Subcategory, "id" | "createdAt" | "updatedAt">): Promise<{
4512
- description?: string | undefined;
4513
- isActive: boolean;
4514
4537
  createdAt: Date;
4515
4538
  updatedAt: Date;
4516
4539
  name: string;
4540
+ isActive: boolean;
4541
+ description?: string | undefined;
4517
4542
  categoryId: string;
4518
4543
  id: string;
4519
4544
  }>;
@@ -4671,12 +4696,13 @@ declare class TechnologyService extends BaseService {
4671
4696
  * @returns Kreirana tehnologija sa generisanim ID-em
4672
4697
  */
4673
4698
  create(technology: Omit<Technology, "id" | "createdAt" | "updatedAt">): Promise<{
4674
- description: string;
4675
- isActive: boolean;
4676
4699
  createdAt: Date;
4677
4700
  updatedAt: Date;
4678
4701
  name: string;
4702
+ isActive: boolean;
4703
+ description: string;
4679
4704
  technicalDetails?: string | undefined;
4705
+ contraindications: Contraindication[];
4680
4706
  family: ProcedureFamily;
4681
4707
  categoryId: string;
4682
4708
  subcategoryId: string;
@@ -4685,7 +4711,6 @@ declare class TechnologyService extends BaseService {
4685
4711
  post: Requirement[];
4686
4712
  };
4687
4713
  blockingConditions: BlockingCondition[];
4688
- contraindications: Contraindication[];
4689
4714
  documentationTemplates?: DocumentTemplate[] | undefined;
4690
4715
  benefits: TreatmentBenefit[];
4691
4716
  certificationRequirement: CertificationRequirement;
@@ -4917,12 +4942,12 @@ declare class RequirementService extends BaseService {
4917
4942
  * @returns Kreirani zahtev sa generisanim ID-em
4918
4943
  */
4919
4944
  create(requirement: Omit<Requirement, "id" | "createdAt" | "updatedAt">): Promise<{
4920
- type: RequirementType;
4921
- description: string;
4922
- isActive: boolean;
4923
4945
  createdAt: Date;
4924
4946
  updatedAt: Date;
4925
4947
  name: string;
4948
+ isActive: boolean;
4949
+ description: string;
4950
+ type: RequirementType;
4926
4951
  timeframe: TimeFrame;
4927
4952
  importance: RequirementImportance;
4928
4953
  id: string;
@@ -4959,47 +4984,72 @@ declare class RequirementService extends BaseService {
4959
4984
  }
4960
4985
 
4961
4986
  declare class BrandService extends BaseService {
4962
- private get brandsRef();
4987
+ /**
4988
+ * Gets reference to brands collection
4989
+ */
4990
+ private getBrandsRef;
4991
+ /**
4992
+ * Creates a new brand
4993
+ */
4963
4994
  create(brand: Omit<Brand, "id" | "createdAt" | "updatedAt">): Promise<{
4964
- description?: string | undefined;
4965
- isActive: boolean;
4966
4995
  createdAt: Date;
4967
4996
  updatedAt: Date;
4968
4997
  name: string;
4998
+ isActive: boolean;
4999
+ description?: string | undefined;
4969
5000
  manufacturer: string;
4970
5001
  website?: string | undefined;
4971
5002
  id: string;
4972
5003
  }>;
5004
+ /**
5005
+ * Gets all active brands
5006
+ */
4973
5007
  getAll(): Promise<Brand[]>;
4974
- update(id: string, brand: Partial<Omit<Brand, "id" | "createdAt">>): Promise<Brand | null>;
4975
- delete(id: string): Promise<void>;
4976
- getById(id: string): Promise<Brand | null>;
5008
+ /**
5009
+ * Updates a brand
5010
+ */
5011
+ update(brandId: string, brand: Partial<Omit<Brand, "id" | "createdAt">>): Promise<Brand | null>;
5012
+ /**
5013
+ * Soft deletes a brand
5014
+ */
5015
+ delete(brandId: string): Promise<void>;
5016
+ /**
5017
+ * Gets a brand by ID
5018
+ */
5019
+ getById(brandId: string): Promise<Brand | null>;
4977
5020
  }
4978
5021
 
4979
- declare class ProductService extends BaseService {
4980
- private getProductsRefByTechnology;
4981
- private getProductsRefByBrand;
4982
- create(categoryId: string, subcategoryId: string, technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<{
4983
- description?: string | undefined;
4984
- isActive: boolean;
4985
- createdAt: Date;
4986
- updatedAt: Date;
4987
- name: string;
4988
- technicalDetails?: string | undefined;
4989
- contraindications?: string[] | undefined;
4990
- brandId: string;
4991
- technologyId: string;
4992
- warnings?: string[] | undefined;
4993
- dosage?: string | undefined;
4994
- composition?: string | undefined;
4995
- indications?: string[] | undefined;
4996
- id: string;
4997
- }>;
4998
- getAllByTechnology(categoryId: string, subcategoryId: string, technologyId: string): Promise<Product[]>;
5022
+ declare class ProductService extends BaseService implements IProductService {
5023
+ /**
5024
+ * Gets reference to products collection under a technology
5025
+ * @param technologyId - ID of the technology
5026
+ * @returns Firestore collection reference
5027
+ */
5028
+ private getProductsRef;
5029
+ /**
5030
+ * Creates a new product under technology
5031
+ */
5032
+ create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
5033
+ /**
5034
+ * Gets all products for a technology
5035
+ */
5036
+ getAllByTechnology(technologyId: string): Promise<Product[]>;
5037
+ /**
5038
+ * Gets all products for a brand by filtering through all technologies
5039
+ */
4999
5040
  getAllByBrand(brandId: string): Promise<Product[]>;
5000
- update(categoryId: string, subcategoryId: string, technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
5001
- delete(categoryId: string, subcategoryId: string, technologyId: string, productId: string): Promise<void>;
5002
- getById(categoryId: string, subcategoryId: string, technologyId: string, productId: string): Promise<Product | null>;
5041
+ /**
5042
+ * Updates a product
5043
+ */
5044
+ update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
5045
+ /**
5046
+ * Soft deletes a product
5047
+ */
5048
+ delete(technologyId: string, productId: string): Promise<void>;
5049
+ /**
5050
+ * Gets a product by ID
5051
+ */
5052
+ getById(technologyId: string, productId: string): Promise<Product | null>;
5003
5053
  }
5004
5054
 
5005
5055
  /**