@blackcode_sa/metaestetics-api 1.11.3 → 1.12.1

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 (53) hide show
  1. package/dist/admin/index.d.mts +378 -334
  2. package/dist/admin/index.d.ts +378 -334
  3. package/dist/backoffice/index.d.mts +1198 -430
  4. package/dist/backoffice/index.d.ts +1198 -430
  5. package/dist/backoffice/index.js +1128 -245
  6. package/dist/backoffice/index.mjs +1119 -209
  7. package/dist/index.d.mts +4478 -4031
  8. package/dist/index.d.ts +4478 -4031
  9. package/dist/index.js +1974 -757
  10. package/dist/index.mjs +1735 -490
  11. package/package.json +1 -1
  12. package/src/backoffice/expo-safe/index.ts +4 -0
  13. package/src/backoffice/services/README.md +40 -0
  14. package/src/backoffice/services/brand.service.ts +85 -6
  15. package/src/backoffice/services/category.service.ts +92 -10
  16. package/src/backoffice/services/constants.service.ts +308 -0
  17. package/src/backoffice/services/documentation-template.service.ts +56 -2
  18. package/src/backoffice/services/index.ts +1 -0
  19. package/src/backoffice/services/product.service.ts +126 -5
  20. package/src/backoffice/services/requirement.service.ts +13 -0
  21. package/src/backoffice/services/subcategory.service.ts +184 -13
  22. package/src/backoffice/services/technology.service.ts +344 -129
  23. package/src/backoffice/types/admin-constants.types.ts +69 -0
  24. package/src/backoffice/types/brand.types.ts +1 -0
  25. package/src/backoffice/types/index.ts +2 -0
  26. package/src/backoffice/types/procedure-product.types.ts +38 -0
  27. package/src/backoffice/types/product.types.ts +31 -4
  28. package/src/backoffice/types/static/contraindication.types.ts +1 -0
  29. package/src/backoffice/types/static/treatment-benefit.types.ts +1 -0
  30. package/src/backoffice/types/technology.types.ts +113 -4
  31. package/src/backoffice/validations/schemas.ts +35 -9
  32. package/src/services/appointment/appointment.service.ts +0 -5
  33. package/src/services/appointment/utils/appointment.utils.ts +124 -113
  34. package/src/services/base.service.ts +10 -3
  35. package/src/services/documentation-templates/documentation-template.service.ts +116 -0
  36. package/src/services/media/media.service.ts +2 -2
  37. package/src/services/practitioner/practitioner.service.ts +201 -83
  38. package/src/services/procedure/README.md +76 -1
  39. package/src/services/procedure/procedure.service.ts +538 -235
  40. package/src/types/appointment/index.ts +2 -3
  41. package/src/types/clinic/index.ts +1 -6
  42. package/src/types/patient/medical-info.types.ts +3 -3
  43. package/src/types/procedure/index.ts +39 -20
  44. package/src/validations/clinic.schema.ts +1 -6
  45. package/src/validations/patient/medical-info.schema.ts +7 -2
  46. package/src/validations/procedure-product.schema.ts +41 -0
  47. package/src/validations/procedure.schema.ts +59 -8
  48. package/src/backoffice/services/__tests__/brand.service.test.ts +0 -196
  49. package/src/backoffice/services/__tests__/category.service.test.ts +0 -201
  50. package/src/backoffice/services/__tests__/product.service.test.ts +0 -358
  51. package/src/backoffice/services/__tests__/requirement.service.test.ts +0 -226
  52. package/src/backoffice/services/__tests__/subcategory.service.test.ts +0 -181
  53. package/src/backoffice/services/__tests__/technology.service.test.ts +0 -1097
@@ -1,5 +1,6 @@
1
+ import * as _firebase_firestore from '@firebase/firestore';
2
+ import { Firestore, DocumentData, Timestamp, QueryDocumentSnapshot } from 'firebase/firestore';
1
3
  import { Auth } from 'firebase/auth';
2
- import { Firestore, QueryDocumentSnapshot, Timestamp } from 'firebase/firestore';
3
4
  import { FirebaseApp } from 'firebase/app';
4
5
  import { FirebaseStorage } from 'firebase/storage';
5
6
  import { z } from 'zod';
@@ -20,6 +21,7 @@ import { z } from 'zod';
20
21
  interface Brand {
21
22
  id?: string;
22
23
  name: string;
24
+ name_lowercase: string;
23
25
  manufacturer: string;
24
26
  createdAt: Date;
25
27
  updatedAt: Date;
@@ -37,7 +39,7 @@ declare class BaseService {
37
39
  protected auth: Auth;
38
40
  protected app: FirebaseApp;
39
41
  protected storage: FirebaseStorage;
40
- constructor(db: Firestore, auth: Auth, app: FirebaseApp);
42
+ constructor(db: Firestore, auth: Auth, app: FirebaseApp, storage?: FirebaseStorage);
41
43
  /**
42
44
  * Generiše jedinstveni ID za dokumente
43
45
  * Format: xxxxxxxxxxxx-timestamp
@@ -54,9 +56,10 @@ declare class BrandService extends BaseService {
54
56
  /**
55
57
  * Creates a new brand
56
58
  */
57
- create(brand: Omit<Brand, "id" | "createdAt" | "updatedAt">): Promise<{
59
+ create(brand: Omit<Brand, "id" | "createdAt" | "updatedAt" | "name_lowercase">): Promise<{
58
60
  createdAt: Date;
59
61
  updatedAt: Date;
62
+ name_lowercase: string;
60
63
  name: string;
61
64
  manufacturer: string;
62
65
  isActive: boolean;
@@ -65,13 +68,28 @@ declare class BrandService extends BaseService {
65
68
  id: string;
66
69
  }>;
67
70
  /**
68
- * Gets all active brands
71
+ * Gets a paginated list of active brands, optionally filtered by name.
72
+ * @param rowsPerPage - The number of brands to fetch.
73
+ * @param searchTerm - An optional string to filter brand names by (starts-with search).
74
+ * @param lastVisible - An optional document snapshot to use as a cursor for pagination.
69
75
  */
70
- getAll(): Promise<Brand[]>;
76
+ getAll(rowsPerPage: number, searchTerm?: string, lastVisible?: any): Promise<{
77
+ brands: Brand[];
78
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
79
+ }>;
80
+ /**
81
+ * Gets the total count of active brands, optionally filtered by name.
82
+ * @param searchTerm - An optional string to filter brand names by (starts-with search).
83
+ */
84
+ getBrandsCount(searchTerm?: string): Promise<number>;
85
+ /**
86
+ * Gets all active brands for filter dropdowns (not paginated).
87
+ */
88
+ getAllForFilter(): Promise<Brand[]>;
71
89
  /**
72
90
  * Updates a brand
73
91
  */
74
- update(brandId: string, brand: Partial<Omit<Brand, "id" | "createdAt">>): Promise<Brand | null>;
92
+ update(brandId: string, brand: Partial<Omit<Brand, "id" | "createdAt" | "name_lowercase">>): Promise<Brand | null>;
75
93
  /**
76
94
  * Soft deletes a brand
77
95
  */
@@ -164,16 +182,43 @@ declare class CategoryService extends BaseService {
164
182
  id: string;
165
183
  }>;
166
184
  /**
167
- * Vraća sve aktivne kategorije
168
- * @returns Lista aktivnih kategorija
185
+ * Returns counts of categories for each family.
186
+ * @param active - Whether to count active or inactive categories.
187
+ * @returns A record mapping family to category count.
188
+ */
189
+ getCategoryCounts(active?: boolean): Promise<Record<string, number>>;
190
+ /**
191
+ * Vraća sve kategorije za potrebe filtera (bez paginacije)
192
+ * @returns Lista svih aktivnih kategorija
193
+ */
194
+ getAllForFilter(): Promise<Category[]>;
195
+ /**
196
+ * Vraća sve kategorije sa paginacijom
197
+ * @param options - Pagination and filter options
198
+ * @returns Lista kategorija i poslednji vidljiv dokument
169
199
  */
170
- getAll(): Promise<Category[]>;
200
+ getAll(options?: {
201
+ active?: boolean;
202
+ limit?: number;
203
+ lastVisible?: DocumentData;
204
+ }): Promise<{
205
+ categories: Category[];
206
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
207
+ }>;
171
208
  /**
172
- * Vraća sve aktivne kategorije za određenu familiju procedura
209
+ * Vraća sve aktivne kategorije za određenu familiju procedura sa paginacijom
173
210
  * @param family - Familija procedura (aesthetics/surgery)
211
+ * @param options - Pagination options
174
212
  * @returns Lista kategorija koje pripadaju traženoj familiji
175
213
  */
176
- getAllByFamily(family: ProcedureFamily): Promise<Category[]>;
214
+ getAllByFamily(family: ProcedureFamily, options?: {
215
+ active?: boolean;
216
+ limit?: number;
217
+ lastVisible?: DocumentData;
218
+ }): Promise<{
219
+ categories: Category[];
220
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
221
+ }>;
177
222
  /**
178
223
  * Ažurira postojeću kategoriju
179
224
  * @param id - ID kategorije koja se ažurira
@@ -186,6 +231,11 @@ declare class CategoryService extends BaseService {
186
231
  * @param id - ID kategorije koja se briše
187
232
  */
188
233
  delete(id: string): Promise<void>;
234
+ /**
235
+ * Reactivates a category by setting its isActive flag to true.
236
+ * @param id - The ID of the category to reactivate.
237
+ */
238
+ reactivate(id: string): Promise<void>;
189
239
  /**
190
240
  * Vraća kategoriju po ID-u
191
241
  * @param id - ID tražene kategorije
@@ -194,6 +244,83 @@ declare class CategoryService extends BaseService {
194
244
  getById(id: string): Promise<Category | null>;
195
245
  }
196
246
 
247
+ /**
248
+ * Condensed practitioner review information
249
+ * @description Used for aggregated data attached to practitioner documents
250
+ */
251
+ interface PractitionerReviewInfo {
252
+ totalReviews: number;
253
+ averageRating: number;
254
+ knowledgeAndExpertise: number;
255
+ communicationSkills: number;
256
+ bedSideManner: number;
257
+ thoroughness: number;
258
+ trustworthiness: number;
259
+ recommendationPercentage: number;
260
+ }
261
+
262
+ /**
263
+ * @file Defines types for dynamically managed administrative constants,
264
+ * such as treatment benefits and contraindications. These are stored in
265
+ * the 'admin-constants' collection in Firestore.
266
+ */
267
+ /**
268
+ * Represents a single dynamic treatment benefit.
269
+ * These are positive effects or results a patient can expect from a treatment.
270
+ */
271
+ interface TreatmentBenefitDynamic {
272
+ /**
273
+ * A unique identifier for the benefit, typically in snake_case.
274
+ * @example "wrinkle_reduction"
275
+ */
276
+ id: string;
277
+ /**
278
+ * A human-readable name for the treatment benefit.
279
+ * @example "Wrinkle Reduction"
280
+ */
281
+ name: string;
282
+ /**
283
+ * A detailed description of the benefit.
284
+ */
285
+ description?: string;
286
+ }
287
+ /**
288
+ * Defines the structure of the document storing all treatment benefits
289
+ * in the 'admin-constants' collection.
290
+ * The document ID for this type should be 'treatment-benefits'.
291
+ */
292
+ interface TreatmentBenefitsDocument {
293
+ benefits: TreatmentBenefitDynamic[];
294
+ }
295
+ /**
296
+ * Represents a single dynamic contraindication.
297
+ * These are conditions or factors that can affect a procedure and require special attention.
298
+ */
299
+ interface ContraindicationDynamic {
300
+ /**
301
+ * A unique identifier for the contraindication, typically in snake_case.
302
+ * @example "sensitive_skin"
303
+ */
304
+ id: string;
305
+ /**
306
+ * A human-readable name for the contraindication.
307
+ * @example "Sensitive Skin"
308
+ */
309
+ name: string;
310
+ /**
311
+ * A detailed description of the contraindication.
312
+ */
313
+ description?: string;
314
+ }
315
+ /**
316
+ * Defines the structure of the document storing all contraindications
317
+ * in the 'admin-constants' collection.
318
+ * The document ID for this type should be 'contraindications'.
319
+ */
320
+ interface ContraindicationsDocument {
321
+ contraindications: ContraindicationDynamic[];
322
+ }
323
+
197
324
  /**
198
325
  * Types for the Medical Documentation Templating System
199
326
  */
@@ -413,91 +540,6 @@ interface UpdateDocumentTemplateData {
413
540
  sortingOrder?: number;
414
541
  }
415
542
 
416
- /**
417
- * Service for managing documentation templates in the backoffice
418
- */
419
- declare class DocumentationTemplateServiceBackoffice {
420
- private apiService;
421
- /**
422
- * Constructor for DocumentationTemplateService
423
- * @param db - Firestore instance
424
- * @param auth - Firebase Auth instance
425
- * @param app - Firebase App instance
426
- */
427
- constructor(db: Firestore, auth: Auth, app: FirebaseApp);
428
- /**
429
- * Create a new document template
430
- * @param data - Template data
431
- * @param userId - ID of the user creating the template
432
- * @returns The created template
433
- */
434
- createTemplate(data: CreateDocumentTemplateData, userId: string): Promise<DocumentTemplate>;
435
- /**
436
- * Get a document template by ID
437
- * @param templateId - ID of the template to retrieve
438
- * @param version - Optional version number to retrieve (defaults to latest version)
439
- * @returns The template or null if not found
440
- */
441
- getTemplateById(templateId: string, version?: number): Promise<DocumentTemplate | null>;
442
- /**
443
- * Update an existing document template
444
- * @param templateId - ID of the template to update
445
- * @param data - Updated template data
446
- * @returns The updated template
447
- */
448
- updateTemplate(templateId: string, data: UpdateDocumentTemplateData): Promise<DocumentTemplate>;
449
- /**
450
- * Delete a document template
451
- * @param templateId - ID of the template to delete
452
- */
453
- deleteTemplate(templateId: string): Promise<void>;
454
- /**
455
- * Get all active templates
456
- * @param pageSize - Number of templates to retrieve
457
- * @param lastDoc - Last document from previous page for pagination
458
- * @returns Array of templates and the last document for pagination
459
- */
460
- getActiveTemplates(pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
461
- templates: DocumentTemplate[];
462
- lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
463
- }>;
464
- /**
465
- * Get templates by tags
466
- * @param tags - Tags to filter by
467
- * @param pageSize - Number of templates to retrieve
468
- * @param lastDoc - Last document from previous page for pagination
469
- * @returns Array of templates and the last document for pagination
470
- */
471
- getTemplatesByTags(tags: string[], pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
472
- templates: DocumentTemplate[];
473
- lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
474
- }>;
475
- /**
476
- * Get templates created by a specific user
477
- * @param userId - ID of the user who created the templates
478
- * @param pageSize - Number of templates to retrieve
479
- * @param lastDoc - Last document from previous page for pagination
480
- * @returns Array of templates and the last document for pagination
481
- */
482
- getTemplatesByCreator(userId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
483
- templates: DocumentTemplate[];
484
- lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
485
- }>;
486
- /**
487
- * Get a specific version of a template
488
- * @param templateId - ID of the template
489
- * @param versionNumber - Version number to retrieve
490
- * @returns The template version or null if not found
491
- */
492
- getTemplateVersion(templateId: string, versionNumber: number): Promise<DocumentTemplate | null>;
493
- /**
494
- * Get all versions of a template
495
- * @param templateId - ID of the template
496
- * @returns Array of template versions
497
- */
498
- getTemplateVersions(templateId: string): Promise<DocumentTemplate[]>;
499
- }
500
-
501
543
  /**
502
544
  * Product used in procedures
503
545
  * Can be consumables, equipment, or any other product needed for performing procedures
@@ -524,6 +566,8 @@ interface Product {
524
566
  brandName: string;
525
567
  technologyId: string;
526
568
  technologyName: string;
569
+ categoryId: string;
570
+ subcategoryId: string;
527
571
  createdAt: Date;
528
572
  updatedAt: Date;
529
573
  isActive: boolean;
@@ -533,7 +577,7 @@ interface Product {
533
577
  dosage?: string;
534
578
  composition?: string;
535
579
  indications?: string[];
536
- contraindications?: string[];
580
+ contraindications?: ContraindicationDynamic[];
537
581
  }
538
582
  /**
539
583
  * Collection in Firestore database where products are stored
@@ -551,10 +595,34 @@ interface IProductService {
551
595
  */
552
596
  create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
553
597
  /**
554
- * Gets all products for a technology
555
- * @param technologyId - ID of the technology
598
+ * Gets a paginated list of all products, with optional filters.
599
+ */
600
+ getAll(options: {
601
+ rowsPerPage: number;
602
+ lastVisible?: any;
603
+ categoryId?: string;
604
+ subcategoryId?: string;
605
+ technologyId?: string;
606
+ }): Promise<{
607
+ products: Product[];
608
+ lastVisible: any;
609
+ }>;
610
+ /**
611
+ * Gets the total count of active products, with optional filters.
612
+ */
613
+ getProductsCount(options: {
614
+ categoryId?: string;
615
+ subcategoryId?: string;
616
+ technologyId?: string;
617
+ }): Promise<number>;
618
+ /**
619
+ * Gets counts of active products grouped by category, subcategory, and technology.
556
620
  */
557
- getAllByTechnology(technologyId: string): Promise<Product[]>;
621
+ getProductCounts(): Promise<{
622
+ byCategory: Record<string, number>;
623
+ bySubcategory: Record<string, number>;
624
+ byTechnology: Record<string, number>;
625
+ }>;
558
626
  /**
559
627
  * Gets all products for a brand
560
628
  * @param brandId - ID of the brand
@@ -581,39 +649,6 @@ interface IProductService {
581
649
  getById(technologyId: string, productId: string): Promise<Product | null>;
582
650
  }
583
651
 
584
- declare class ProductService extends BaseService implements IProductService {
585
- /**
586
- * Gets reference to products collection under a technology
587
- * @param technologyId - ID of the technology
588
- * @returns Firestore collection reference
589
- */
590
- private getProductsRef;
591
- /**
592
- * Creates a new product under technology
593
- */
594
- create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
595
- /**
596
- * Gets all products for a technology
597
- */
598
- getAllByTechnology(technologyId: string): Promise<Product[]>;
599
- /**
600
- * Gets all products for a brand by filtering through all technologies
601
- */
602
- getAllByBrand(brandId: string): Promise<Product[]>;
603
- /**
604
- * Updates a product
605
- */
606
- update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
607
- /**
608
- * Soft deletes a product
609
- */
610
- delete(technologyId: string, productId: string): Promise<void>;
611
- /**
612
- * Gets a product by ID
613
- */
614
- getById(technologyId: string, productId: string): Promise<Product | null>;
615
- }
616
-
617
652
  /**
618
653
  * Jedinica mere za vremenski period
619
654
  */
@@ -674,90 +709,17 @@ interface Requirement {
674
709
  declare const REQUIREMENTS_COLLECTION = "backoffice_requirements";
675
710
 
676
711
  /**
677
- * Servis za upravljanje globalnim zahtevima.
678
- * Zahtevi se mogu kreirati globalno i zatim povezati sa različitim tehnologijama.
679
- * Ovo omogućava ponovno korišćenje istih zahteva za različite tehnologije.
680
- *
681
- * @example
682
- * const requirementService = new RequirementService();
712
+ * Podkategorija procedura
713
+ * Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
714
+ * One grupišu slične tehnologije u okviru kategorije
683
715
  *
684
- * // Kreiranje globalnog zahteva
685
- * const requirement = await requirementService.create({
686
- * type: "pre",
687
- * name: "Stay Hydrated",
688
- * description: "Drink plenty of water",
689
- * timeframe: {
690
- * duration: 2,
691
- * unit: "hours",
692
- * notifyAt: [2, 1]
693
- * },
694
- * importance: "high"
695
- * });
696
- */
697
- declare class RequirementService extends BaseService {
698
- /**
699
- * Referenca na Firestore kolekciju zahteva
700
- */
701
- private get requirementsRef();
702
- /**
703
- * Kreira novi globalni zahtev
704
- * @param requirement - Podaci za novi zahtev
705
- * @returns Kreirani zahtev sa generisanim ID-em
706
- */
707
- create(requirement: Omit<Requirement, "id" | "createdAt" | "updatedAt">): Promise<{
708
- createdAt: Date;
709
- updatedAt: Date;
710
- name: string;
711
- isActive: boolean;
712
- description: string;
713
- type: RequirementType;
714
- timeframe: TimeFrame;
715
- importance: RequirementImportance;
716
- id: string;
717
- }>;
718
- /**
719
- * Vraća sve aktivne zahteve
720
- * @returns Lista aktivnih zahteva
721
- */
722
- getAll(): Promise<Requirement[]>;
723
- /**
724
- * Vraća sve aktivne zahteve određenog tipa
725
- * @param type - Tip zahteva (pre/post)
726
- * @returns Lista zahteva određenog tipa
727
- */
728
- getAllByType(type: RequirementType): Promise<Requirement[]>;
729
- /**
730
- * Ažurira postojeći zahtev
731
- * @param id - ID zahteva koji se ažurira
732
- * @param requirement - Novi podaci za zahtev
733
- * @returns Ažurirani zahtev
734
- */
735
- update(id: string, requirement: Partial<Omit<Requirement, "id" | "createdAt">>): Promise<Requirement | null>;
736
- /**
737
- * Soft delete zahteva (postavlja isActive na false)
738
- * @param id - ID zahteva koji se briše
739
- */
740
- delete(id: string): Promise<void>;
741
- /**
742
- * Vraća zahtev po ID-u
743
- * @param id - ID traženog zahteva
744
- * @returns Zahtev ili null ako ne postoji
745
- */
746
- getById(id: string): Promise<Requirement | null>;
747
- }
748
-
749
- /**
750
- * Podkategorija procedura
751
- * Podkategorije su drugi nivo hijerarhije i pripadaju određenoj kategoriji
752
- * One grupišu slične tehnologije u okviru kategorije
753
- *
754
- * @property id - Jedinstveni identifikator podkategorije
755
- * @property name - Naziv podkategorije
756
- * @property description - Detaljan opis podkategorije i njene namene
757
- * @property categoryId - ID kategorije kojoj podkategorija pripada
758
- * @property isActive - Da li je podkategorija aktivna u sistemu
759
- * @property createdAt - Datum kreiranja
760
- * @property updatedAt - Datum poslednjeg ažuriranja
716
+ * @property id - Jedinstveni identifikator podkategorije
717
+ * @property name - Naziv podkategorije
718
+ * @property description - Detaljan opis podkategorije i njene namene
719
+ * @property categoryId - ID kategorije kojoj podkategorija pripada
720
+ * @property isActive - Da li je podkategorija aktivna u sistemu
721
+ * @property createdAt - Datum kreiranja
722
+ * @property updatedAt - Datum poslednjeg ažuriranja
761
723
  */
762
724
  interface Subcategory {
763
725
  /** Jedinstveni identifikator podkategorije (automatski generisan od strane Firestore) */
@@ -780,69 +742,6 @@ interface Subcategory {
780
742
  */
781
743
  declare const SUBCATEGORIES_COLLECTION = "subcategories";
782
744
 
783
- /**
784
- * Servis za upravljanje podkategorijama procedura.
785
- * Podkategorije su drugi nivo organizacije i pripadaju određenoj kategoriji.
786
- *
787
- * @example
788
- * const subcategoryService = new SubcategoryService();
789
- *
790
- * // Kreiranje nove podkategorije
791
- * const subcategory = await subcategoryService.create(categoryId, {
792
- * name: "Anti-Wrinkle",
793
- * description: "Treatments targeting facial wrinkles"
794
- * });
795
- */
796
- declare class SubcategoryService extends BaseService {
797
- /**
798
- * Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
799
- * @param categoryId - ID roditeljske kategorije
800
- */
801
- private getSubcategoriesRef;
802
- /**
803
- * Kreira novu podkategoriju u okviru kategorije
804
- * @param categoryId - ID kategorije kojoj će pripadati nova podkategorija
805
- * @param subcategory - Podaci za novu podkategoriju
806
- * @returns Kreirana podkategorija sa generisanim ID-em
807
- */
808
- create(categoryId: string, subcategory: Omit<Subcategory, "id" | "createdAt" | "updatedAt">): Promise<{
809
- createdAt: Date;
810
- updatedAt: Date;
811
- name: string;
812
- isActive: boolean;
813
- description?: string | undefined;
814
- categoryId: string;
815
- id: string;
816
- }>;
817
- /**
818
- * Vraća sve aktivne podkategorije za određenu kategoriju
819
- * @param categoryId - ID kategorije čije podkategorije tražimo
820
- * @returns Lista aktivnih podkategorija
821
- */
822
- getAllByCategoryId(categoryId: string): Promise<Subcategory[]>;
823
- /**
824
- * Ažurira postojeću podkategoriju
825
- * @param categoryId - ID kategorije kojoj pripada podkategorija
826
- * @param subcategoryId - ID podkategorije koja se ažurira
827
- * @param subcategory - Novi podaci za podkategoriju
828
- * @returns Ažurirana podkategorija
829
- */
830
- update(categoryId: string, subcategoryId: string, subcategory: Partial<Omit<Subcategory, "id" | "createdAt" | "categoryId">>): Promise<Subcategory | null>;
831
- /**
832
- * Soft delete podkategorije (postavlja isActive na false)
833
- * @param categoryId - ID kategorije kojoj pripada podkategorija
834
- * @param subcategoryId - ID podkategorije koja se briše
835
- */
836
- delete(categoryId: string, subcategoryId: string): Promise<void>;
837
- /**
838
- * Vraća podkategoriju po ID-u
839
- * @param categoryId - ID kategorije kojoj pripada podkategorija
840
- * @param subcategoryId - ID tražene podkategorije
841
- * @returns Podkategorija ili null ako ne postoji
842
- */
843
- getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
844
- }
845
-
846
745
  /**
847
746
  * Blokirajući uslovi koji mogu sprečiti proceduru
848
747
  * Ovi uslovi predstavljaju apsolutne kontraindikacije koje onemogućavaju izvođenje procedure
@@ -865,47 +764,6 @@ declare enum BlockingCondition {
865
764
  EPILEPSY = "epilepsy"
866
765
  }
867
766
 
868
- /**
869
- * Kontraindikacije koje mogu uticati na proceduru
870
- * Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
871
- */
872
- declare enum Contraindication {
873
- SENSITIVE_SKIN = "sensitive_skin",
874
- RECENT_TANNING = "recent_tanning",
875
- RECENT_BOTOX = "recent_botox",
876
- RECENT_FILLERS = "recent_fillers",
877
- SKIN_ALLERGIES = "skin_allergies",
878
- MEDICATIONS = "medications",
879
- RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
880
- RECENT_LASER = "recent_laser",
881
- SKIN_INFLAMMATION = "skin_inflammation",
882
- OPEN_WOUNDS = "open_wounds",
883
- HERPES_SIMPLEX = "herpes_simplex",
884
- COLD_SORES = "cold_sores"
885
- }
886
-
887
- /**
888
- * Benefiti koji se mogu očekivati od procedure
889
- * Lista mogućih pozitivnih efekata i rezultata tretmana
890
- */
891
- declare enum TreatmentBenefit {
892
- WRINKLE_REDUCTION = "wrinkle_reduction",
893
- SKIN_TIGHTENING = "skin_tightening",
894
- COLLAGEN_PRODUCTION = "collagen_production",
895
- ACNE_REDUCTION = "acne_reduction",
896
- SCAR_REDUCTION = "scar_reduction",
897
- PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
898
- HAIR_REMOVAL = "hair_removal",
899
- MUSCLE_TONING = "muscle_toning",
900
- FAT_REDUCTION = "fat_reduction",
901
- CELLULITE_REDUCTION = "cellulite_reduction",
902
- SKIN_REJUVENATION = "skin_rejuvenation",
903
- PORE_REDUCTION = "pore_reduction",
904
- TEXTURE_IMPROVEMENT = "texture_improvement",
905
- HYDRATION_BOOST = "hydration_boost",
906
- CIRCULATION_IMPROVEMENT = "circulation_improvement"
907
- }
908
-
909
767
  /**
910
768
  * Nivoi sertifikacije medicinskog osoblja, poređani od najnižeg do najvišeg
911
769
  */
@@ -999,8 +857,8 @@ interface Technology {
999
857
  post: Requirement[];
1000
858
  };
1001
859
  blockingConditions: BlockingCondition[];
1002
- contraindications: Contraindication[];
1003
- benefits: TreatmentBenefit[];
860
+ contraindications: ContraindicationDynamic[];
861
+ benefits: TreatmentBenefitDynamic[];
1004
862
  certificationRequirement: CertificationRequirement;
1005
863
  documentationTemplates?: TechnologyDocumentationTemplate[];
1006
864
  isActive: boolean;
@@ -1011,20 +869,87 @@ interface Technology {
1011
869
  * Collection in Firestore database where technologies are stored
1012
870
  */
1013
871
  declare const TECHNOLOGIES_COLLECTION = "technologies";
872
+ /**
873
+ * Interface for the TechnologyService class
874
+ */
875
+ interface ITechnologyService {
876
+ create(technology: Omit<Technology, "id" | "createdAt" | "updatedAt">): Promise<Technology>;
877
+ getTechnologyCounts(active?: boolean): Promise<Record<string, number>>;
878
+ getTechnologyCountsByCategory(active?: boolean): Promise<Record<string, number>>;
879
+ getAll(options?: {
880
+ active?: boolean;
881
+ limit?: number;
882
+ lastVisible?: any;
883
+ }): Promise<{
884
+ technologies: Technology[];
885
+ lastVisible: any;
886
+ }>;
887
+ getAllByCategoryId(categoryId: string, options?: {
888
+ active?: boolean;
889
+ limit?: number;
890
+ lastVisible?: any;
891
+ }): Promise<{
892
+ technologies: Technology[];
893
+ lastVisible: any;
894
+ }>;
895
+ getAllBySubcategoryId(subcategoryId: string, options?: {
896
+ active?: boolean;
897
+ limit?: number;
898
+ lastVisible?: any;
899
+ }): Promise<{
900
+ technologies: Technology[];
901
+ lastVisible: any;
902
+ }>;
903
+ update(id: string, technology: Partial<Omit<Technology, "id" | "createdAt">>): Promise<Technology | null>;
904
+ delete(id: string): Promise<void>;
905
+ reactivate(id: string): Promise<void>;
906
+ getById(id: string): Promise<Technology | null>;
907
+ addRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
908
+ removeRequirement(technologyId: string, requirement: Requirement): Promise<Technology | null>;
909
+ getRequirements(technologyId: string, type?: "pre" | "post"): Promise<Requirement[]>;
910
+ updateRequirement(technologyId: string, oldRequirement: Requirement, newRequirement: Requirement): Promise<Technology | null>;
911
+ addBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
912
+ removeBlockingCondition(technologyId: string, condition: BlockingCondition): Promise<Technology | null>;
913
+ addContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
914
+ removeContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
915
+ updateContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
916
+ addBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
917
+ removeBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
918
+ updateBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
919
+ getBlockingConditions(technologyId: string): Promise<BlockingCondition[]>;
920
+ getContraindications(technologyId: string): Promise<ContraindicationDynamic[]>;
921
+ getBenefits(technologyId: string): Promise<TreatmentBenefitDynamic[]>;
922
+ updateCertificationRequirement(technologyId: string, certificationRequirement: CertificationRequirement): Promise<Technology | null>;
923
+ getCertificationRequirement(technologyId: string): Promise<CertificationRequirement | null>;
924
+ validateCertification(requiredCertification: CertificationRequirement, practitionerCertification: any): boolean;
925
+ getAllowedTechnologies(practitioner: any): Promise<{
926
+ technologies: Technology[];
927
+ families: ProcedureFamily[];
928
+ categories: string[];
929
+ subcategories: string[];
930
+ }>;
931
+ getAllForFilterBySubcategoryId(categoryId: string, subcategoryId: string): Promise<Technology[]>;
932
+ getAllForFilter(): Promise<Technology[]>;
933
+ }
1014
934
 
1015
935
  /**
1016
- * Condensed practitioner review information
1017
- * @description Used for aggregated data attached to practitioner documents
936
+ * @deprecated
937
+ * Kontraindikacije koje mogu uticati na proceduru
938
+ * Ovi uslovi predstavljaju relativne kontraindikacije koje zahtevaju posebnu pažnju
1018
939
  */
1019
- interface PractitionerReviewInfo {
1020
- totalReviews: number;
1021
- averageRating: number;
1022
- knowledgeAndExpertise: number;
1023
- communicationSkills: number;
1024
- bedSideManner: number;
1025
- thoroughness: number;
1026
- trustworthiness: number;
1027
- recommendationPercentage: number;
940
+ declare enum Contraindication {
941
+ SENSITIVE_SKIN = "sensitive_skin",
942
+ RECENT_TANNING = "recent_tanning",
943
+ RECENT_BOTOX = "recent_botox",
944
+ RECENT_FILLERS = "recent_fillers",
945
+ SKIN_ALLERGIES = "skin_allergies",
946
+ MEDICATIONS = "medications",
947
+ RECENT_CHEMICAL_PEEL = "recent_chemical_peel",
948
+ RECENT_LASER = "recent_laser",
949
+ SKIN_INFLAMMATION = "skin_inflammation",
950
+ OPEN_WOUNDS = "open_wounds",
951
+ HERPES_SIMPLEX = "herpes_simplex",
952
+ COLD_SORES = "cold_sores"
1028
953
  }
1029
954
 
1030
955
  declare enum PricingMeasure {
@@ -1043,6 +968,61 @@ declare enum Currency {
1043
968
  AUD = "AUD"
1044
969
  }
1045
970
 
971
+ /**
972
+ * @deprecated
973
+ * Benefiti koji se mogu očekivati od procedure
974
+ * Lista mogućih pozitivnih efekata i rezultata tretmana
975
+ */
976
+ declare enum TreatmentBenefit {
977
+ WRINKLE_REDUCTION = "wrinkle_reduction",
978
+ SKIN_TIGHTENING = "skin_tightening",
979
+ COLLAGEN_PRODUCTION = "collagen_production",
980
+ ACNE_REDUCTION = "acne_reduction",
981
+ SCAR_REDUCTION = "scar_reduction",
982
+ PIGMENTATION_IMPROVEMENT = "pigmentation_improvement",
983
+ HAIR_REMOVAL = "hair_removal",
984
+ MUSCLE_TONING = "muscle_toning",
985
+ FAT_REDUCTION = "fat_reduction",
986
+ CELLULITE_REDUCTION = "cellulite_reduction",
987
+ SKIN_REJUVENATION = "skin_rejuvenation",
988
+ PORE_REDUCTION = "pore_reduction",
989
+ TEXTURE_IMPROVEMENT = "texture_improvement",
990
+ HYDRATION_BOOST = "hydration_boost",
991
+ CIRCULATION_IMPROVEMENT = "circulation_improvement"
992
+ }
993
+
994
+ /**
995
+ * @fileoverview Defines the ProcedureProduct type, which represents a product associated with a procedure,
996
+ * including its pricing information. This is used to allow procedures to have multiple products with different prices.
997
+ * @packageDocumentation
998
+ */
999
+
1000
+ /**
1001
+ * Represents a product associated with a procedure, including its specific pricing information.
1002
+ */
1003
+ interface ProcedureProduct {
1004
+ /**
1005
+ * The product used in the procedure.
1006
+ * @see {@link Product}
1007
+ */
1008
+ product: Product;
1009
+ /**
1010
+ * The price of the procedure when using this specific product.
1011
+ */
1012
+ price: number;
1013
+ /**
1014
+ * The currency for the price of this product.
1015
+ * @see {@link Currency}
1016
+ */
1017
+ currency: Currency;
1018
+ /**
1019
+ * How the price is measured (e.g., per ml, per zone).
1020
+ * @see {@link PricingMeasure}
1021
+ */
1022
+ pricingMeasure: PricingMeasure;
1023
+ isDefault?: boolean;
1024
+ }
1025
+
1046
1026
  /**
1047
1027
  * Type that allows a field to be either a URL string or a File object
1048
1028
  */
@@ -1096,18 +1076,6 @@ interface ClinicLocation {
1096
1076
  tz?: string | null;
1097
1077
  }
1098
1078
 
1099
- /**
1100
- * Interface for clinic profile information
1101
- */
1102
- interface ClinicInfo {
1103
- id: string;
1104
- featuredPhoto: string;
1105
- name: string;
1106
- description?: string | null;
1107
- location: ClinicLocation;
1108
- contactInfo: ClinicContactInfo;
1109
- }
1110
-
1111
1079
  /**
1112
1080
  * Osnovne informacije o zdravstvenom radniku
1113
1081
  */
@@ -1205,38 +1173,520 @@ interface Practitioner {
1205
1173
  }
1206
1174
 
1207
1175
  /**
1208
- * Servis za upravljanje tehnologijama i njihovim zahtevima.
1209
- * Tehnologije su sada top-level kolekcija koja referencira svoju putanju u hijerarhiji
1210
- * kroz family, categoryId i subcategoryId.
1211
- *
1212
- * @example
1213
- * const technologyService = new TechnologyService();
1214
- *
1215
- * // Kreiranje nove tehnologije
1216
- * const technology = await technologyService.create({
1217
- * name: "Botulinum Toxin",
1218
- * description: "Neurotoxin injections for wrinkle reduction",
1219
- * family: ProcedureFamily.AESTHETICS,
1220
- * categoryId: "category123",
1221
- * subcategoryId: "subcategory456"
1222
- * });
1223
- *
1224
- * // Dodavanje zahteva
1225
- * await technologyService.addRequirement(technology.id, {
1226
- * type: "pre",
1227
- * name: "Stay Hydrated",
1228
- * description: "Drink plenty of water"
1229
- * });
1176
+ * Interface for clinic profile information
1177
+ */
1178
+ interface ClinicInfo {
1179
+ id: string;
1180
+ featuredPhoto: string;
1181
+ name: string;
1182
+ description?: string | null;
1183
+ location: ClinicLocation;
1184
+ contactInfo: ClinicContactInfo;
1185
+ }
1186
+
1187
+ /**
1188
+ * Service for managing documentation templates
1189
+ */
1190
+ declare class DocumentationTemplateService extends BaseService {
1191
+ private readonly collectionRef;
1192
+ constructor(...args: ConstructorParameters<typeof BaseService>);
1193
+ /**
1194
+ * Create a new document template
1195
+ * @param data - Template data
1196
+ * @param userId - ID of the user creating the template
1197
+ * @returns The created template
1198
+ */
1199
+ createTemplate(data: CreateDocumentTemplateData, userId: string): Promise<DocumentTemplate>;
1200
+ /**
1201
+ * Get a document template by ID
1202
+ * @param templateId - ID of the template to retrieve
1203
+ * @param version - Optional version number to retrieve (defaults to latest version)
1204
+ * @returns The template or null if not found
1205
+ */
1206
+ getTemplateById(templateId: string, version?: number): Promise<DocumentTemplate | null>;
1207
+ /**
1208
+ * Update an existing document template
1209
+ * @param templateId - ID of the template to update
1210
+ * @param data - Updated template data
1211
+ * @returns The updated template
1212
+ */
1213
+ updateTemplate(templateId: string, data: UpdateDocumentTemplateData): Promise<DocumentTemplate>;
1214
+ /**
1215
+ * Get a specific version of a template
1216
+ * @param templateId - ID of the template
1217
+ * @param versionNumber - Version number to retrieve
1218
+ * @returns The template version or null if not found
1219
+ */
1220
+ getTemplateVersion(templateId: string, versionNumber: number): Promise<DocumentTemplate | null>;
1221
+ /**
1222
+ * Get all versions of a template
1223
+ * @param templateId - ID of the template
1224
+ * @returns Array of template versions
1225
+ */
1226
+ getTemplateOldVersions(templateId: string): Promise<DocumentTemplate[]>;
1227
+ /**
1228
+ * Delete a document template
1229
+ * @param templateId - ID of the template to delete
1230
+ */
1231
+ deleteTemplate(templateId: string): Promise<void>;
1232
+ /**
1233
+ * Get all active templates
1234
+ * @param pageSize - Number of templates to retrieve
1235
+ * @param lastDoc - Last document from previous page for pagination
1236
+ * @returns Array of templates and the last document for pagination
1237
+ */
1238
+ getActiveTemplates(pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1239
+ templates: DocumentTemplate[];
1240
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1241
+ }>;
1242
+ /**
1243
+ * Get all active templates with optional filters and pagination.
1244
+ * @param options - Options for filtering and pagination.
1245
+ * @returns A promise that resolves to the templates and the last visible document.
1246
+ */
1247
+ getTemplates(options: {
1248
+ pageSize?: number;
1249
+ lastDoc?: QueryDocumentSnapshot<DocumentTemplate>;
1250
+ isUserForm?: boolean;
1251
+ isRequired?: boolean;
1252
+ sortingOrder?: number;
1253
+ }): Promise<{
1254
+ templates: DocumentTemplate[];
1255
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1256
+ }>;
1257
+ /**
1258
+ * Get the total count of active templates with optional filters.
1259
+ * @param options - Options for filtering.
1260
+ * @returns A promise that resolves to the total count of templates.
1261
+ */
1262
+ getTemplatesCount(options: {
1263
+ isUserForm?: boolean;
1264
+ isRequired?: boolean;
1265
+ sortingOrder?: number;
1266
+ search?: string;
1267
+ }): Promise<number>;
1268
+ /**
1269
+ * Get all active templates without pagination for filtering purposes.
1270
+ * @returns A promise that resolves to an array of all active templates.
1271
+ */
1272
+ getAllActiveTemplates(): Promise<DocumentTemplate[]>;
1273
+ /**
1274
+ * Get templates by tags
1275
+ * @param tags - Tags to filter by
1276
+ * @param pageSize - Number of templates to retrieve
1277
+ * @param lastDoc - Last document from previous page for pagination
1278
+ * @returns Array of templates and the last document for pagination
1279
+ */
1280
+ getTemplatesByTags(tags: string[], pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1281
+ templates: DocumentTemplate[];
1282
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1283
+ }>;
1284
+ /**
1285
+ * Get templates created by a specific user
1286
+ * @param userId - ID of the user who created the templates
1287
+ * @param pageSize - Number of templates to retrieve
1288
+ * @param lastDoc - Last document from previous page for pagination
1289
+ * @returns Array of templates and the last document for pagination
1290
+ */
1291
+ getTemplatesByCreator(userId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1292
+ templates: DocumentTemplate[];
1293
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1294
+ }>;
1295
+ /**
1296
+ * Get all templates for selection with optional filtering
1297
+ * @param options - Filtering options
1298
+ * @returns Array of templates
1299
+ */
1300
+ getAllTemplatesForSelection(options?: {
1301
+ isUserForm?: boolean;
1302
+ isRequired?: boolean;
1303
+ }): Promise<DocumentTemplate[]>;
1304
+ }
1305
+
1306
+ /**
1307
+ * Service for managing documentation templates in the backoffice
1308
+ */
1309
+ declare class DocumentationTemplateServiceBackoffice {
1310
+ private apiService;
1311
+ /**
1312
+ * Constructor for DocumentationTemplateService
1313
+ * @param db - Firestore instance
1314
+ * @param auth - Firebase Auth instance
1315
+ * @param app - Firebase App instance
1316
+ */
1317
+ constructor(...args: ConstructorParameters<typeof DocumentationTemplateService>);
1318
+ /**
1319
+ * Create a new document template
1320
+ * @param data - Template data
1321
+ * @param userId - ID of the user creating the template
1322
+ * @returns The created template
1323
+ */
1324
+ createTemplate(data: CreateDocumentTemplateData, userId: string): Promise<DocumentTemplate>;
1325
+ /**
1326
+ * Get a document template by ID
1327
+ * @param templateId - ID of the template to retrieve
1328
+ * @param version - Optional version number to retrieve (defaults to latest version)
1329
+ * @returns The template or null if not found
1330
+ */
1331
+ getTemplateById(templateId: string, version?: number): Promise<DocumentTemplate | null>;
1332
+ /**
1333
+ * Update an existing document template
1334
+ * @param templateId - ID of the template to update
1335
+ * @param data - Updated template data
1336
+ * @returns The updated template
1337
+ */
1338
+ updateTemplate(templateId: string, data: UpdateDocumentTemplateData): Promise<DocumentTemplate>;
1339
+ /**
1340
+ * Delete a document template
1341
+ * @param templateId - ID of the template to delete
1342
+ */
1343
+ deleteTemplate(templateId: string): Promise<void>;
1344
+ /**
1345
+ * Get all active templates
1346
+ * @param pageSize - Number of templates to retrieve
1347
+ * @param lastDoc - Last document from previous page for pagination
1348
+ * @returns Array of templates and the last document for pagination
1349
+ */
1350
+ getActiveTemplates(pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1351
+ templates: DocumentTemplate[];
1352
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1353
+ }>;
1354
+ /**
1355
+ * Get all active templates with optional filters and pagination.
1356
+ * @param options - Options for filtering and pagination.
1357
+ * @returns A promise that resolves to the templates and the last visible document.
1358
+ */
1359
+ getTemplates(options: {
1360
+ pageSize?: number;
1361
+ lastDoc?: QueryDocumentSnapshot<DocumentTemplate>;
1362
+ isUserForm?: boolean;
1363
+ isRequired?: boolean;
1364
+ sortingOrder?: number;
1365
+ }): Promise<{
1366
+ templates: DocumentTemplate[];
1367
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1368
+ }>;
1369
+ /**
1370
+ * Get the total count of active templates with optional filters.
1371
+ * @param options - Options for filtering.
1372
+ * @returns A promise that resolves to the total count of templates.
1373
+ */
1374
+ getTemplatesCount(options: {
1375
+ isUserForm?: boolean;
1376
+ isRequired?: boolean;
1377
+ sortingOrder?: number;
1378
+ search?: string;
1379
+ }): Promise<number>;
1380
+ /**
1381
+ * Get all active templates without pagination for filtering purposes.
1382
+ * @returns A promise that resolves to an array of all active templates.
1383
+ */
1384
+ getAllActiveTemplates(): Promise<DocumentTemplate[]>;
1385
+ /**
1386
+ * Searches for active templates by title.
1387
+ * @param title - The title to search for.
1388
+ * @returns A list of templates that match the search criteria.
1389
+ */
1390
+ search(title: string): Promise<DocumentTemplate[]>;
1391
+ /**
1392
+ * Get templates by tags
1393
+ * @param tags - Tags to filter by
1394
+ * @param pageSize - Number of templates to retrieve
1395
+ * @param lastDoc - Last document from previous page for pagination
1396
+ * @returns Array of templates and the last document for pagination
1397
+ */
1398
+ getTemplatesByTags(tags: string[], pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1399
+ templates: DocumentTemplate[];
1400
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1401
+ }>;
1402
+ /**
1403
+ * Get templates created by a specific user
1404
+ * @param userId - ID of the user who created the templates
1405
+ * @param pageSize - Number of templates to retrieve
1406
+ * @param lastDoc - Last document from previous page for pagination
1407
+ * @returns Array of templates and the last document for pagination
1408
+ */
1409
+ getTemplatesByCreator(userId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<DocumentTemplate>): Promise<{
1410
+ templates: DocumentTemplate[];
1411
+ lastDoc: QueryDocumentSnapshot<DocumentTemplate> | null;
1412
+ }>;
1413
+ /**
1414
+ * Get a specific version of a template
1415
+ * @param templateId - ID of the template
1416
+ * @param versionNumber - Version number to retrieve
1417
+ * @returns The template version or null if not found
1418
+ */
1419
+ getTemplateVersion(templateId: string, versionNumber: number): Promise<DocumentTemplate | null>;
1420
+ /**
1421
+ * Get all versions of a template
1422
+ * @param templateId - ID of the template
1423
+ * @returns Array of template versions
1424
+ */
1425
+ getTemplateVersions(templateId: string): Promise<DocumentTemplate[]>;
1426
+ }
1427
+
1428
+ declare class ProductService extends BaseService implements IProductService {
1429
+ /**
1430
+ * Gets reference to products collection under a technology
1431
+ * @param technologyId - ID of the technology
1432
+ * @returns Firestore collection reference
1433
+ */
1434
+ private getProductsRef;
1435
+ /**
1436
+ * Creates a new product under technology
1437
+ */
1438
+ create(technologyId: string, brandId: string, product: Omit<Product, "id" | "createdAt" | "updatedAt" | "brandId" | "technologyId">): Promise<Product>;
1439
+ /**
1440
+ * Gets a paginated list of all products, with optional filters.
1441
+ * This uses a collectionGroup query to search across all technologies.
1442
+ */
1443
+ getAll(options: {
1444
+ rowsPerPage: number;
1445
+ lastVisible?: any;
1446
+ categoryId?: string;
1447
+ subcategoryId?: string;
1448
+ technologyId?: string;
1449
+ }): Promise<{
1450
+ products: Product[];
1451
+ lastVisible: any;
1452
+ }>;
1453
+ /**
1454
+ * Gets the total count of active products, with optional filters.
1455
+ */
1456
+ getProductsCount(options: {
1457
+ categoryId?: string;
1458
+ subcategoryId?: string;
1459
+ technologyId?: string;
1460
+ }): Promise<number>;
1461
+ /**
1462
+ * Gets counts of active products grouped by category, subcategory, and technology.
1463
+ * This uses a single collectionGroup query for efficiency.
1464
+ */
1465
+ getProductCounts(): Promise<{
1466
+ byCategory: Record<string, number>;
1467
+ bySubcategory: Record<string, number>;
1468
+ byTechnology: Record<string, number>;
1469
+ }>;
1470
+ /**
1471
+ * Gets all products for a brand by filtering through all technologies
1472
+ */
1473
+ getAllByBrand(brandId: string): Promise<Product[]>;
1474
+ /**
1475
+ * Updates a product
1476
+ */
1477
+ update(technologyId: string, productId: string, product: Partial<Omit<Product, "id" | "createdAt" | "brandId" | "technologyId">>): Promise<Product | null>;
1478
+ /**
1479
+ * Soft deletes a product
1480
+ */
1481
+ delete(technologyId: string, productId: string): Promise<void>;
1482
+ /**
1483
+ * Gets a product by ID
1484
+ */
1485
+ getById(technologyId: string, productId: string): Promise<Product | null>;
1486
+ }
1487
+
1488
+ /**
1489
+ * Servis za upravljanje globalnim zahtevima.
1490
+ * Zahtevi se mogu kreirati globalno i zatim povezati sa različitim tehnologijama.
1491
+ * Ovo omogućava ponovno korišćenje istih zahteva za različite tehnologije.
1492
+ *
1493
+ * @example
1494
+ * const requirementService = new RequirementService();
1495
+ *
1496
+ * // Kreiranje globalnog zahteva
1497
+ * const requirement = await requirementService.create({
1498
+ * type: "pre",
1499
+ * name: "Stay Hydrated",
1500
+ * description: "Drink plenty of water",
1501
+ * timeframe: {
1502
+ * duration: 2,
1503
+ * unit: "hours",
1504
+ * notifyAt: [2, 1]
1505
+ * },
1506
+ * importance: "high"
1507
+ * });
1508
+ */
1509
+ declare class RequirementService extends BaseService {
1510
+ /**
1511
+ * Referenca na Firestore kolekciju zahteva
1512
+ */
1513
+ private get requirementsRef();
1514
+ /**
1515
+ * Kreira novi globalni zahtev
1516
+ * @param requirement - Podaci za novi zahtev
1517
+ * @returns Kreirani zahtev sa generisanim ID-em
1518
+ */
1519
+ create(requirement: Omit<Requirement, "id" | "createdAt" | "updatedAt">): Promise<{
1520
+ createdAt: Date;
1521
+ updatedAt: Date;
1522
+ name: string;
1523
+ isActive: boolean;
1524
+ description: string;
1525
+ type: RequirementType;
1526
+ timeframe: TimeFrame;
1527
+ importance: RequirementImportance;
1528
+ id: string;
1529
+ }>;
1530
+ /**
1531
+ * Vraća sve aktivne zahteve
1532
+ * @returns Lista aktivnih zahteva
1533
+ */
1534
+ getAll(): Promise<Requirement[]>;
1535
+ /**
1536
+ * Vraća sve aktivne zahteve određenog tipa
1537
+ * @param type - Tip zahteva (pre/post)
1538
+ * @returns Lista zahteva određenog tipa
1539
+ */
1540
+ getAllByType(type: RequirementType): Promise<Requirement[]>;
1541
+ /**
1542
+ * Searches for requirements by name.
1543
+ * @param name - The name to search for.
1544
+ * @param type - The type of requirement (pre/post).
1545
+ * @returns A list of requirements that match the search criteria.
1546
+ */
1547
+ search(name: string, type: RequirementType): Promise<Requirement[]>;
1548
+ /**
1549
+ * Ažurira postojeći zahtev
1550
+ * @param id - ID zahteva koji se ažurira
1551
+ * @param requirement - Novi podaci za zahtev
1552
+ * @returns Ažurirani zahtev
1553
+ */
1554
+ update(id: string, requirement: Partial<Omit<Requirement, "id" | "createdAt">>): Promise<Requirement | null>;
1555
+ /**
1556
+ * Soft delete zahteva (postavlja isActive na false)
1557
+ * @param id - ID zahteva koji se briše
1558
+ */
1559
+ delete(id: string): Promise<void>;
1560
+ /**
1561
+ * Vraća zahtev po ID-u
1562
+ * @param id - ID traženog zahteva
1563
+ * @returns Zahtev ili null ako ne postoji
1564
+ */
1565
+ getById(id: string): Promise<Requirement | null>;
1566
+ }
1567
+
1568
+ /**
1569
+ * Servis za upravljanje podkategorijama procedura.
1570
+ * Podkategorije su drugi nivo organizacije i pripadaju određenoj kategoriji.
1571
+ *
1572
+ * @example
1573
+ * const subcategoryService = new SubcategoryService();
1574
+ *
1575
+ * // Kreiranje nove podkategorije
1576
+ * const subcategory = await subcategoryService.create(categoryId, {
1577
+ * name: "Anti-Wrinkle",
1578
+ * description: "Treatments targeting facial wrinkles"
1579
+ * });
1580
+ */
1581
+ declare class SubcategoryService extends BaseService {
1582
+ /**
1583
+ * Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
1584
+ * @param categoryId - ID roditeljske kategorije
1585
+ */
1586
+ private getSubcategoriesRef;
1587
+ /**
1588
+ * Kreira novu podkategoriju u okviru kategorije
1589
+ * @param categoryId - ID kategorije kojoj će pripadati nova podkategorija
1590
+ * @param subcategory - Podaci za novu podkategoriju
1591
+ * @returns Kreirana podkategorija sa generisanim ID-em
1592
+ */
1593
+ create(categoryId: string, subcategory: Omit<Subcategory, "id" | "createdAt" | "updatedAt">): Promise<{
1594
+ createdAt: Date;
1595
+ updatedAt: Date;
1596
+ name: string;
1597
+ isActive: boolean;
1598
+ description?: string | undefined;
1599
+ categoryId: string;
1600
+ id: string;
1601
+ }>;
1602
+ /**
1603
+ * Returns counts of subcategories for all categories.
1604
+ * @param active - Whether to count active or inactive subcategories.
1605
+ * @returns A record mapping category ID to subcategory count.
1606
+ */
1607
+ getSubcategoryCounts(active?: boolean): Promise<Record<string, number>>;
1608
+ /**
1609
+ * Vraća sve aktivne podkategorije za određenu kategoriju sa paginacijom
1610
+ * @param categoryId - ID kategorije čije podkategorije tražimo
1611
+ * @param options - Pagination options
1612
+ * @returns Lista aktivnih podkategorija i poslednji vidljiv dokument
1613
+ */
1614
+ getAllByCategoryId(categoryId: string, options?: {
1615
+ active?: boolean;
1616
+ limit?: number;
1617
+ lastVisible?: DocumentData;
1618
+ }): Promise<{
1619
+ subcategories: Subcategory[];
1620
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
1621
+ }>;
1622
+ /**
1623
+ * Vraća sve podkategorije sa paginacijom koristeći collection group query.
1624
+ * NOTE: This query requires a composite index in Firestore on the 'subcategories' collection group.
1625
+ * The index should be on 'isActive' (ascending) and 'name' (ascending).
1626
+ * Firestore will provide a link to create this index in the console error if it's missing.
1627
+ * @param options - Pagination options
1628
+ * @returns Lista podkategorija i poslednji vidljiv dokument
1629
+ */
1630
+ getAll(options?: {
1631
+ active?: boolean;
1632
+ limit?: number;
1633
+ lastVisible?: DocumentData;
1634
+ }): Promise<{
1635
+ subcategories: Subcategory[];
1636
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
1637
+ }>;
1638
+ /**
1639
+ * Vraća sve subkategorije za određenu kategoriju za potrebe filtera (bez paginacije)
1640
+ * @param categoryId - ID kategorije čije subkategorije tražimo
1641
+ * @returns Lista svih aktivnih subkategorija
1642
+ */
1643
+ getAllForFilterByCategoryId(categoryId: string): Promise<Subcategory[]>;
1644
+ /**
1645
+ * Vraća sve subkategorije za potrebe filtera (bez paginacije)
1646
+ * @returns Lista svih aktivnih subkategorija
1647
+ */
1648
+ getAllForFilter(): Promise<Subcategory[]>;
1649
+ /**
1650
+ * Ažurira postojeću podkategoriju
1651
+ * @param categoryId - ID kategorije kojoj pripada podkategorija
1652
+ * @param subcategoryId - ID podkategorije koja se ažurira
1653
+ * @param subcategory - Novi podaci za podkategoriju
1654
+ * @returns Ažurirana podkategorija
1655
+ */
1656
+ update(categoryId: string, subcategoryId: string, subcategory: Partial<Omit<Subcategory, "id" | "createdAt">>): Promise<Subcategory | null>;
1657
+ /**
1658
+ * Soft delete podkategorije (postavlja isActive na false)
1659
+ * @param categoryId - ID kategorije kojoj pripada podkategorija
1660
+ * @param subcategoryId - ID podkategorije koja se briše
1661
+ */
1662
+ delete(categoryId: string, subcategoryId: string): Promise<void>;
1663
+ /**
1664
+ * Reactivates a subcategory by setting its isActive flag to true.
1665
+ * @param categoryId - The ID of the category to which the subcategory belongs.
1666
+ * @param subcategoryId - The ID of the subcategory to reactivate.
1667
+ */
1668
+ reactivate(categoryId: string, subcategoryId: string): Promise<void>;
1669
+ /**
1670
+ * Vraća podkategoriju po ID-u
1671
+ * @param categoryId - ID kategorije kojoj pripada podkategorija
1672
+ * @param subcategoryId - ID tražene podkategorije
1673
+ * @returns Podkategorija ili null ako ne postoji
1674
+ */
1675
+ getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
1676
+ }
1677
+
1678
+ /**
1679
+ * Service for managing technologies.
1230
1680
  */
1231
1681
  declare class TechnologyService extends BaseService {
1232
1682
  /**
1233
- * Vraća referencu na Firestore kolekciju tehnologija
1683
+ * Reference to the Firestore collection of technologies.
1234
1684
  */
1235
- private getTechnologiesRef;
1685
+ private get technologiesRef();
1236
1686
  /**
1237
- * Kreira novu tehnologiju
1238
- * @param technology - Podaci za novu tehnologiju
1239
- * @returns Kreirana tehnologija sa generisanim ID-em
1687
+ * Creates a new technology.
1688
+ * @param technology - Data for the new technology.
1689
+ * @returns The created technology with its generated ID.
1240
1690
  */
1241
1691
  create(technology: Omit<Technology, "id" | "createdAt" | "updatedAt">): Promise<{
1242
1692
  createdAt: Date;
@@ -1245,61 +1695,96 @@ declare class TechnologyService extends BaseService {
1245
1695
  isActive: boolean;
1246
1696
  description: string;
1247
1697
  family: ProcedureFamily;
1248
- technicalDetails?: string | undefined;
1249
- contraindications: Contraindication[];
1250
- blockingConditions: BlockingCondition[];
1251
1698
  categoryId: string;
1252
1699
  subcategoryId: string;
1700
+ technicalDetails?: string | undefined;
1701
+ contraindications: ContraindicationDynamic[];
1253
1702
  requirements: {
1254
1703
  pre: Requirement[];
1255
1704
  post: Requirement[];
1256
1705
  };
1257
- benefits: TreatmentBenefit[];
1706
+ blockingConditions: BlockingCondition[];
1707
+ benefits: TreatmentBenefitDynamic[];
1258
1708
  certificationRequirement: CertificationRequirement;
1259
1709
  documentationTemplates?: TechnologyDocumentationTemplate[] | undefined;
1260
1710
  id: string;
1261
1711
  }>;
1262
1712
  /**
1263
- * Vraća sve aktivne tehnologije
1264
- * @returns Lista aktivnih tehnologija
1713
+ * Returns counts of technologies for each subcategory.
1714
+ * @param active - Whether to count active or inactive technologies.
1715
+ * @returns A record mapping subcategory ID to technology count.
1265
1716
  */
1266
- getAll(): Promise<Technology[]>;
1717
+ getTechnologyCounts(active?: boolean): Promise<Record<string, number>>;
1267
1718
  /**
1268
- * Vraća sve aktivne tehnologije za određenu familiju
1269
- * @param family - Familija procedura
1270
- * @returns Lista aktivnih tehnologija
1719
+ * Returns counts of technologies for each category.
1720
+ * @param active - Whether to count active or inactive technologies.
1721
+ * @returns A record mapping category ID to technology count.
1271
1722
  */
1272
- getAllByFamily(family: ProcedureFamily): Promise<Technology[]>;
1723
+ getTechnologyCountsByCategory(active?: boolean): Promise<Record<string, number>>;
1273
1724
  /**
1274
- * Vraća sve aktivne tehnologije za određenu kategoriju
1275
- * @param categoryId - ID kategorije
1276
- * @returns Lista aktivnih tehnologija
1725
+ * Returns all technologies with pagination.
1726
+ * @param options - Pagination and filter options.
1727
+ * @returns A list of technologies and the last visible document.
1277
1728
  */
1278
- getAllByCategoryId(categoryId: string): Promise<Technology[]>;
1729
+ getAll(options?: {
1730
+ active?: boolean;
1731
+ limit?: number;
1732
+ lastVisible?: DocumentData;
1733
+ }): Promise<{
1734
+ technologies: Technology[];
1735
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
1736
+ }>;
1279
1737
  /**
1280
- * Vraća sve aktivne tehnologije za određenu podkategoriju
1281
- * @param subcategoryId - ID podkategorije
1282
- * @returns Lista aktivnih tehnologija
1738
+ * Returns all technologies for a specific category with pagination.
1739
+ * @param categoryId - The ID of the category.
1740
+ * @param options - Pagination options.
1741
+ * @returns A list of technologies for the specified category.
1283
1742
  */
1284
- getAllBySubcategoryId(subcategoryId: string): Promise<Technology[]>;
1743
+ getAllByCategoryId(categoryId: string, options?: {
1744
+ active?: boolean;
1745
+ limit?: number;
1746
+ lastVisible?: DocumentData;
1747
+ }): Promise<{
1748
+ technologies: Technology[];
1749
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
1750
+ }>;
1285
1751
  /**
1286
- * Ažurira postojeću tehnologiju
1287
- * @param technologyId - ID tehnologije
1288
- * @param technology - Novi podaci za tehnologiju
1289
- * @returns Ažurirana tehnologija
1752
+ * Returns all technologies for a specific subcategory with pagination.
1753
+ * @param subcategoryId - The ID of the subcategory.
1754
+ * @param options - Pagination options.
1755
+ * @returns A list of technologies for the specified subcategory.
1756
+ */
1757
+ getAllBySubcategoryId(subcategoryId: string, options?: {
1758
+ active?: boolean;
1759
+ limit?: number;
1760
+ lastVisible?: DocumentData;
1761
+ }): Promise<{
1762
+ technologies: Technology[];
1763
+ lastVisible: _firebase_firestore.QueryDocumentSnapshot<DocumentData, DocumentData>;
1764
+ }>;
1765
+ /**
1766
+ * Updates an existing technology.
1767
+ * @param id - The ID of the technology to update.
1768
+ * @param technology - New data for the technology.
1769
+ * @returns The updated technology.
1770
+ */
1771
+ update(id: string, technology: Partial<Omit<Technology, "id" | "createdAt">>): Promise<Technology | null>;
1772
+ /**
1773
+ * Soft deletes a technology.
1774
+ * @param id - The ID of the technology to delete.
1290
1775
  */
1291
- update(technologyId: string, technology: Partial<Omit<Technology, "id" | "createdAt" | "family" | "categoryId" | "subcategoryId">>): Promise<Technology | null>;
1776
+ delete(id: string): Promise<void>;
1292
1777
  /**
1293
- * Soft delete tehnologije (postavlja isActive na false)
1294
- * @param technologyId - ID tehnologije koja se briše
1778
+ * Reactivates a technology.
1779
+ * @param id - The ID of the technology to reactivate.
1295
1780
  */
1296
- delete(technologyId: string): Promise<void>;
1781
+ reactivate(id: string): Promise<void>;
1297
1782
  /**
1298
- * Vraća tehnologiju po ID-u
1299
- * @param technologyId - ID tražene tehnologije
1300
- * @returns Tehnologija ili null ako ne postoji
1783
+ * Returns a technology by its ID.
1784
+ * @param id - The ID of the requested technology.
1785
+ * @returns The technology or null if it doesn't exist.
1301
1786
  */
1302
- getById(technologyId: string): Promise<Technology | null>;
1787
+ getById(id: string): Promise<Technology | null>;
1303
1788
  /**
1304
1789
  * Dodaje novi zahtev tehnologiji
1305
1790
  * @param technologyId - ID tehnologije
@@ -1349,28 +1834,44 @@ declare class TechnologyService extends BaseService {
1349
1834
  * @param contraindication - Kontraindikacija koja se dodaje
1350
1835
  * @returns Ažurirana tehnologija
1351
1836
  */
1352
- addContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
1837
+ addContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
1353
1838
  /**
1354
1839
  * Uklanja kontraindikaciju iz tehnologije
1355
1840
  * @param technologyId - ID tehnologije
1356
1841
  * @param contraindication - Kontraindikacija koja se uklanja
1357
1842
  * @returns Ažurirana tehnologija
1358
1843
  */
1359
- removeContraindication(technologyId: string, contraindication: Contraindication): Promise<Technology | null>;
1844
+ removeContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
1845
+ /**
1846
+ * Updates an existing contraindication in a technology's list.
1847
+ * If the contraindication does not exist, it will not be added.
1848
+ * @param technologyId - ID of the technology
1849
+ * @param contraindication - The updated contraindication object
1850
+ * @returns The updated technology
1851
+ */
1852
+ updateContraindication(technologyId: string, contraindication: ContraindicationDynamic): Promise<Technology | null>;
1360
1853
  /**
1361
1854
  * Dodaje benefit tehnologiji
1362
1855
  * @param technologyId - ID tehnologije
1363
1856
  * @param benefit - Benefit koji se dodaje
1364
1857
  * @returns Ažurirana tehnologija
1365
1858
  */
1366
- addBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
1859
+ addBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
1367
1860
  /**
1368
1861
  * Uklanja benefit iz tehnologije
1369
1862
  * @param technologyId - ID tehnologije
1370
1863
  * @param benefit - Benefit koji se uklanja
1371
1864
  * @returns Ažurirana tehnologija
1372
1865
  */
1373
- removeBenefit(technologyId: string, benefit: TreatmentBenefit): Promise<Technology | null>;
1866
+ removeBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
1867
+ /**
1868
+ * Updates an existing benefit in a technology's list.
1869
+ * If the benefit does not exist, it will not be added.
1870
+ * @param technologyId - ID of the technology
1871
+ * @param benefit - The updated benefit object
1872
+ * @returns The updated technology
1873
+ */
1874
+ updateBenefit(technologyId: string, benefit: TreatmentBenefitDynamic): Promise<Technology | null>;
1374
1875
  /**
1375
1876
  * Vraća sve blokirajuće uslove za tehnologiju
1376
1877
  * @param technologyId - ID tehnologije
@@ -1382,13 +1883,13 @@ declare class TechnologyService extends BaseService {
1382
1883
  * @param technologyId - ID tehnologije
1383
1884
  * @returns Lista kontraindikacija
1384
1885
  */
1385
- getContraindications(technologyId: string): Promise<Contraindication[]>;
1886
+ getContraindications(technologyId: string): Promise<ContraindicationDynamic[]>;
1386
1887
  /**
1387
1888
  * Vraća sve benefite za tehnologiju
1388
1889
  * @param technologyId - ID tehnologije
1389
1890
  * @returns Lista benefita
1390
1891
  */
1391
- getBenefits(technologyId: string): Promise<TreatmentBenefit[]>;
1892
+ getBenefits(technologyId: string): Promise<TreatmentBenefitDynamic[]>;
1392
1893
  /**
1393
1894
  * Ažurira zahteve sertifikacije za tehnologiju
1394
1895
  * @param technologyId - ID tehnologije
@@ -1451,6 +1952,135 @@ declare class TechnologyService extends BaseService {
1451
1952
  categories: string[];
1452
1953
  subcategories: string[];
1453
1954
  }>;
1955
+ /**
1956
+ * Gets all active technologies for a subcategory for filter dropdowns.
1957
+ * @param categoryId - The ID of the parent category.
1958
+ * @param subcategoryId - The ID of the subcategory.
1959
+ */
1960
+ getAllForFilterBySubcategoryId(categoryId: string, subcategoryId: string): Promise<Technology[]>;
1961
+ /**
1962
+ * Gets all active technologies for filter dropdowns.
1963
+ */
1964
+ getAllForFilter(): Promise<Technology[]>;
1965
+ }
1966
+
1967
+ /**
1968
+ * @class ConstantsService
1969
+ * @description Service for managing administrative constants, such as treatment benefits and contraindications.
1970
+ * These constants are stored in a single Firestore collection 'admin-constants',
1971
+ * with each type of constant in its own document ('treatment-benefits', 'contraindications').
1972
+ * The constants themselves are stored in an array within these documents.
1973
+ * @extends {BaseService}
1974
+ */
1975
+ declare class ConstantsService extends BaseService {
1976
+ /**
1977
+ * @description Gets the reference to the document holding treatment benefits.
1978
+ * @private
1979
+ * @type {DocumentReference}
1980
+ */
1981
+ private get treatmentBenefitsDocRef();
1982
+ /**
1983
+ * @description Gets the reference to the document holding contraindications.
1984
+ * @private
1985
+ * @type {DocumentReference}
1986
+ */
1987
+ private get contraindicationsDocRef();
1988
+ /**
1989
+ * @description Retrieves all treatment benefits without pagination.
1990
+ * @returns {Promise<TreatmentBenefitDynamic[]>} An array of all treatment benefits.
1991
+ */
1992
+ getAllBenefitsForFilter(): Promise<TreatmentBenefitDynamic[]>;
1993
+ /**
1994
+ * @description Retrieves a paginated list of treatment benefits.
1995
+ * @param {{ page: number; limit: number }} options - Pagination options.
1996
+ * @returns {Promise<{ benefits: TreatmentBenefitDynamic[]; total: number }>} A paginated list of benefits and the total count.
1997
+ */
1998
+ getAllBenefits(options: {
1999
+ page: number;
2000
+ limit: number;
2001
+ }): Promise<{
2002
+ benefits: TreatmentBenefitDynamic[];
2003
+ total: number;
2004
+ }>;
2005
+ /**
2006
+ * @description Adds a new treatment benefit.
2007
+ * @param {Omit<TreatmentBenefitDynamic, "id">} benefit - The treatment benefit to add, without an ID.
2008
+ * @returns {Promise<TreatmentBenefitDynamic>} The newly created treatment benefit with its generated ID.
2009
+ */
2010
+ addTreatmentBenefit(benefit: Omit<TreatmentBenefitDynamic, "id">): Promise<TreatmentBenefitDynamic>;
2011
+ /**
2012
+ * @description Retrieves a single treatment benefit by its ID.
2013
+ * @param {string} benefitId - The ID of the treatment benefit to retrieve.
2014
+ * @returns {Promise<TreatmentBenefitDynamic | undefined>} The found treatment benefit or undefined.
2015
+ */
2016
+ getBenefitById(benefitId: string): Promise<TreatmentBenefitDynamic | undefined>;
2017
+ /**
2018
+ * @description Searches for treatment benefits by name (case-insensitive).
2019
+ * @param {string} searchTerm - The term to search for in the benefit names.
2020
+ * @returns {Promise<TreatmentBenefitDynamic[]>} An array of matching treatment benefits.
2021
+ */
2022
+ searchBenefitsByName(searchTerm: string): Promise<TreatmentBenefitDynamic[]>;
2023
+ /**
2024
+ * @description Updates an existing treatment benefit.
2025
+ * @param {TreatmentBenefitDynamic} benefit - The treatment benefit with updated data. Its ID must match an existing benefit.
2026
+ * @returns {Promise<TreatmentBenefitDynamic>} The updated treatment benefit.
2027
+ * @throws {Error} If the treatment benefit is not found.
2028
+ */
2029
+ updateTreatmentBenefit(benefit: TreatmentBenefitDynamic): Promise<TreatmentBenefitDynamic>;
2030
+ /**
2031
+ * @description Deletes a treatment benefit by its ID.
2032
+ * @param {string} benefitId - The ID of the treatment benefit to delete.
2033
+ * @returns {Promise<void>}
2034
+ */
2035
+ deleteTreatmentBenefit(benefitId: string): Promise<void>;
2036
+ /**
2037
+ * @description Retrieves all contraindications without pagination.
2038
+ * @returns {Promise<ContraindicationDynamic[]>} An array of all contraindications.
2039
+ */
2040
+ getAllContraindicationsForFilter(): Promise<ContraindicationDynamic[]>;
2041
+ /**
2042
+ * @description Retrieves a paginated list of contraindications.
2043
+ * @param {{ page: number; limit: number }} options - Pagination options.
2044
+ * @returns {Promise<{ contraindications: ContraindicationDynamic[]; total: number }>} A paginated list and the total count.
2045
+ */
2046
+ getAllContraindications(options: {
2047
+ page: number;
2048
+ limit: number;
2049
+ }): Promise<{
2050
+ contraindications: ContraindicationDynamic[];
2051
+ total: number;
2052
+ }>;
2053
+ /**
2054
+ * @description Adds a new contraindication.
2055
+ * @param {Omit<ContraindicationDynamic, "id">} contraindication - The contraindication to add, without an ID.
2056
+ * @returns {Promise<ContraindicationDynamic>} The newly created contraindication with its generated ID.
2057
+ */
2058
+ addContraindication(contraindication: Omit<ContraindicationDynamic, "id">): Promise<ContraindicationDynamic>;
2059
+ /**
2060
+ * @description Retrieves a single contraindication by its ID.
2061
+ * @param {string} contraindicationId - The ID of the contraindication to retrieve.
2062
+ * @returns {Promise<ContraindicationDynamic | undefined>} The found contraindication or undefined.
2063
+ */
2064
+ getContraindicationById(contraindicationId: string): Promise<ContraindicationDynamic | undefined>;
2065
+ /**
2066
+ * @description Searches for contraindications by name (case-insensitive).
2067
+ * @param {string} searchTerm - The term to search for in the contraindication names.
2068
+ * @returns {Promise<ContraindicationDynamic[]>} An array of matching contraindications.
2069
+ */
2070
+ searchContraindicationsByName(searchTerm: string): Promise<ContraindicationDynamic[]>;
2071
+ /**
2072
+ * @description Updates an existing contraindication.
2073
+ * @param {ContraindicationDynamic} contraindication - The contraindication with updated data. Its ID must match an existing one.
2074
+ * @returns {Promise<ContraindicationDynamic>} The updated contraindication.
2075
+ * @throws {Error} If the contraindication is not found.
2076
+ */
2077
+ updateContraindication(contraindication: ContraindicationDynamic): Promise<ContraindicationDynamic>;
2078
+ /**
2079
+ * @description Deletes a contraindication by its ID.
2080
+ * @param {string} contraindicationId - The ID of the contraindication to delete.
2081
+ * @returns {Promise<void>}
2082
+ */
2083
+ deleteContraindication(contraindicationId: string): Promise<void>;
1454
2084
  }
1455
2085
 
1456
2086
  declare const documentElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -3209,12 +3839,70 @@ declare const documentTemplateSchema: z.ZodObject<{
3209
3839
  sortingOrder?: number | undefined;
3210
3840
  }>;
3211
3841
 
3842
+ /**
3843
+ * Zod validation schema for a single dynamic contraindication.
3844
+ * @see ContraindicationDynamic in admin-constants.types.ts
3845
+ */
3846
+ declare const contraindicationDynamicSchema: z.ZodObject<{
3847
+ id: z.ZodString;
3848
+ name: z.ZodString;
3849
+ description: z.ZodOptional<z.ZodString>;
3850
+ }, "strip", z.ZodTypeAny, {
3851
+ id: string;
3852
+ name: string;
3853
+ description?: string | undefined;
3854
+ }, {
3855
+ id: string;
3856
+ name: string;
3857
+ description?: string | undefined;
3858
+ }>;
3859
+ /**
3860
+ * Zod validation schema for a single dynamic treatment benefit.
3861
+ * @see TreatmentBenefitDynamic in admin-constants.types.ts
3862
+ */
3863
+ declare const treatmentBenefitDynamicSchema: z.ZodObject<{
3864
+ id: z.ZodString;
3865
+ name: z.ZodString;
3866
+ description: z.ZodOptional<z.ZodString>;
3867
+ }, "strip", z.ZodTypeAny, {
3868
+ id: string;
3869
+ name: string;
3870
+ description?: string | undefined;
3871
+ }, {
3872
+ id: string;
3873
+ name: string;
3874
+ description?: string | undefined;
3875
+ }>;
3212
3876
  /**
3213
3877
  * Base validation schemas for enums
3214
3878
  */
3215
3879
  declare const blockingConditionSchemaBackoffice: z.ZodNativeEnum<typeof BlockingCondition>;
3216
- declare const contraindicationSchemaBackoffice: z.ZodNativeEnum<typeof Contraindication>;
3217
- declare const treatmentBenefitSchemaBackoffice: z.ZodNativeEnum<typeof TreatmentBenefit>;
3880
+ declare const contraindicationSchemaBackoffice: z.ZodObject<{
3881
+ id: z.ZodString;
3882
+ name: z.ZodString;
3883
+ description: z.ZodOptional<z.ZodString>;
3884
+ }, "strip", z.ZodTypeAny, {
3885
+ id: string;
3886
+ name: string;
3887
+ description?: string | undefined;
3888
+ }, {
3889
+ id: string;
3890
+ name: string;
3891
+ description?: string | undefined;
3892
+ }>;
3893
+ declare const treatmentBenefitSchemaBackoffice: z.ZodObject<{
3894
+ id: z.ZodString;
3895
+ name: z.ZodString;
3896
+ description: z.ZodOptional<z.ZodString>;
3897
+ }, "strip", z.ZodTypeAny, {
3898
+ id: string;
3899
+ name: string;
3900
+ description?: string | undefined;
3901
+ }, {
3902
+ id: string;
3903
+ name: string;
3904
+ description?: string | undefined;
3905
+ }>;
3218
3906
  declare const procedureFamilySchemaBackoffice: z.ZodNativeEnum<typeof ProcedureFamily>;
3219
3907
  declare const timeUnitSchemaBackoffice: z.ZodNativeEnum<typeof TimeUnit>;
3220
3908
  declare const requirementTypeSchema: z.ZodNativeEnum<typeof RequirementType>;
@@ -3580,7 +4268,19 @@ declare const technologySchema: z.ZodObject<{
3580
4268
  }[];
3581
4269
  }>>;
3582
4270
  blockingConditions: z.ZodArray<z.ZodNativeEnum<typeof BlockingCondition>, "many">;
3583
- contraindications: z.ZodArray<z.ZodNativeEnum<typeof Contraindication>, "many">;
4271
+ contraindications: z.ZodArray<z.ZodObject<{
4272
+ id: z.ZodString;
4273
+ name: z.ZodString;
4274
+ description: z.ZodOptional<z.ZodString>;
4275
+ }, "strip", z.ZodTypeAny, {
4276
+ id: string;
4277
+ name: string;
4278
+ description?: string | undefined;
4279
+ }, {
4280
+ id: string;
4281
+ name: string;
4282
+ description?: string | undefined;
4283
+ }>, "many">;
3584
4284
  documentationTemplates: z.ZodArray<z.ZodObject<{
3585
4285
  id: z.ZodString;
3586
4286
  title: z.ZodString;
@@ -4047,7 +4747,19 @@ declare const technologySchema: z.ZodObject<{
4047
4747
  isRequired?: boolean | undefined;
4048
4748
  sortingOrder?: number | undefined;
4049
4749
  }>, "many">;
4050
- benefits: z.ZodArray<z.ZodNativeEnum<typeof TreatmentBenefit>, "many">;
4750
+ benefits: z.ZodArray<z.ZodObject<{
4751
+ id: z.ZodString;
4752
+ name: z.ZodString;
4753
+ description: z.ZodOptional<z.ZodString>;
4754
+ }, "strip", z.ZodTypeAny, {
4755
+ id: string;
4756
+ name: string;
4757
+ description?: string | undefined;
4758
+ }, {
4759
+ id: string;
4760
+ name: string;
4761
+ description?: string | undefined;
4762
+ }>, "many">;
4051
4763
  certificationRequirement: z.ZodObject<{
4052
4764
  minimumLevel: z.ZodNativeEnum<typeof CertificationLevel>;
4053
4765
  requiredSpecialties: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof CertificationSpecialty>, "many">>;
@@ -4063,10 +4775,13 @@ declare const technologySchema: z.ZodObject<{
4063
4775
  name: string;
4064
4776
  isActive: boolean;
4065
4777
  family: ProcedureFamily;
4066
- contraindications: Contraindication[];
4067
- blockingConditions: BlockingCondition[];
4068
4778
  categoryId: string;
4069
4779
  subcategoryId: string;
4780
+ contraindications: {
4781
+ id: string;
4782
+ name: string;
4783
+ description?: string | undefined;
4784
+ }[];
4070
4785
  requirements: {
4071
4786
  pre: {
4072
4787
  name: string;
@@ -4093,7 +4808,12 @@ declare const technologySchema: z.ZodObject<{
4093
4808
  importance: "low" | "medium" | "high";
4094
4809
  }[];
4095
4810
  };
4096
- benefits: TreatmentBenefit[];
4811
+ blockingConditions: BlockingCondition[];
4812
+ benefits: {
4813
+ id: string;
4814
+ name: string;
4815
+ description?: string | undefined;
4816
+ }[];
4097
4817
  certificationRequirement: {
4098
4818
  minimumLevel: CertificationLevel;
4099
4819
  requiredSpecialties?: CertificationSpecialty[] | undefined;
@@ -4200,11 +4920,19 @@ declare const technologySchema: z.ZodObject<{
4200
4920
  }, {
4201
4921
  name: string;
4202
4922
  family: ProcedureFamily;
4203
- contraindications: Contraindication[];
4204
- blockingConditions: BlockingCondition[];
4205
4923
  categoryId: string;
4206
4924
  subcategoryId: string;
4207
- benefits: TreatmentBenefit[];
4925
+ contraindications: {
4926
+ id: string;
4927
+ name: string;
4928
+ description?: string | undefined;
4929
+ }[];
4930
+ blockingConditions: BlockingCondition[];
4931
+ benefits: {
4932
+ id: string;
4933
+ name: string;
4934
+ description?: string | undefined;
4935
+ }[];
4208
4936
  certificationRequirement: {
4209
4937
  minimumLevel: CertificationLevel;
4210
4938
  requiredSpecialties?: CertificationSpecialty[] | undefined;
@@ -4553,7 +5281,19 @@ declare const technologyUpdateSchema: z.ZodObject<{
4553
5281
  }[];
4554
5282
  }>>>;
4555
5283
  blockingConditions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof BlockingCondition>, "many">>;
4556
- contraindications: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof Contraindication>, "many">>;
5284
+ contraindications: z.ZodOptional<z.ZodArray<z.ZodObject<{
5285
+ id: z.ZodString;
5286
+ name: z.ZodString;
5287
+ description: z.ZodOptional<z.ZodString>;
5288
+ }, "strip", z.ZodTypeAny, {
5289
+ id: string;
5290
+ name: string;
5291
+ description?: string | undefined;
5292
+ }, {
5293
+ id: string;
5294
+ name: string;
5295
+ description?: string | undefined;
5296
+ }>, "many">>;
4557
5297
  documentationTemplates: z.ZodOptional<z.ZodArray<z.ZodObject<{
4558
5298
  id: z.ZodString;
4559
5299
  title: z.ZodString;
@@ -5020,7 +5760,19 @@ declare const technologyUpdateSchema: z.ZodObject<{
5020
5760
  isRequired?: boolean | undefined;
5021
5761
  sortingOrder?: number | undefined;
5022
5762
  }>, "many">>;
5023
- benefits: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof TreatmentBenefit>, "many">>;
5763
+ benefits: z.ZodOptional<z.ZodArray<z.ZodObject<{
5764
+ id: z.ZodString;
5765
+ name: z.ZodString;
5766
+ description: z.ZodOptional<z.ZodString>;
5767
+ }, "strip", z.ZodTypeAny, {
5768
+ id: string;
5769
+ name: string;
5770
+ description?: string | undefined;
5771
+ }, {
5772
+ id: string;
5773
+ name: string;
5774
+ description?: string | undefined;
5775
+ }>, "many">>;
5024
5776
  certificationRequirement: z.ZodOptional<z.ZodObject<{
5025
5777
  minimumLevel: z.ZodNativeEnum<typeof CertificationLevel>;
5026
5778
  requiredSpecialties: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof CertificationSpecialty>, "many">>;
@@ -5037,11 +5789,14 @@ declare const technologyUpdateSchema: z.ZodObject<{
5037
5789
  isActive?: boolean | undefined;
5038
5790
  description?: string | undefined;
5039
5791
  family?: ProcedureFamily | undefined;
5040
- technicalDetails?: string | undefined;
5041
- contraindications?: Contraindication[] | undefined;
5042
- blockingConditions?: BlockingCondition[] | undefined;
5043
5792
  categoryId?: string | undefined;
5044
5793
  subcategoryId?: string | undefined;
5794
+ technicalDetails?: string | undefined;
5795
+ contraindications?: {
5796
+ id: string;
5797
+ name: string;
5798
+ description?: string | undefined;
5799
+ }[] | undefined;
5045
5800
  requirements?: {
5046
5801
  pre: {
5047
5802
  name: string;
@@ -5068,7 +5823,12 @@ declare const technologyUpdateSchema: z.ZodObject<{
5068
5823
  importance: "low" | "medium" | "high";
5069
5824
  }[];
5070
5825
  } | undefined;
5071
- benefits?: TreatmentBenefit[] | undefined;
5826
+ blockingConditions?: BlockingCondition[] | undefined;
5827
+ benefits?: {
5828
+ id: string;
5829
+ name: string;
5830
+ description?: string | undefined;
5831
+ }[] | undefined;
5072
5832
  certificationRequirement?: {
5073
5833
  minimumLevel: CertificationLevel;
5074
5834
  requiredSpecialties?: CertificationSpecialty[] | undefined;
@@ -5175,11 +5935,14 @@ declare const technologyUpdateSchema: z.ZodObject<{
5175
5935
  isActive?: boolean | undefined;
5176
5936
  description?: string | undefined;
5177
5937
  family?: ProcedureFamily | undefined;
5178
- technicalDetails?: string | undefined;
5179
- contraindications?: Contraindication[] | undefined;
5180
- blockingConditions?: BlockingCondition[] | undefined;
5181
5938
  categoryId?: string | undefined;
5182
5939
  subcategoryId?: string | undefined;
5940
+ technicalDetails?: string | undefined;
5941
+ contraindications?: {
5942
+ id: string;
5943
+ name: string;
5944
+ description?: string | undefined;
5945
+ }[] | undefined;
5183
5946
  requirements?: {
5184
5947
  pre: {
5185
5948
  name: string;
@@ -5206,7 +5969,12 @@ declare const technologyUpdateSchema: z.ZodObject<{
5206
5969
  isActive?: boolean | undefined;
5207
5970
  }[];
5208
5971
  } | undefined;
5209
- benefits?: TreatmentBenefit[] | undefined;
5972
+ blockingConditions?: BlockingCondition[] | undefined;
5973
+ benefits?: {
5974
+ id: string;
5975
+ name: string;
5976
+ description?: string | undefined;
5977
+ }[] | undefined;
5210
5978
  certificationRequirement?: {
5211
5979
  minimumLevel: CertificationLevel;
5212
5980
  requiredSpecialties?: CertificationSpecialty[] | undefined;
@@ -5446,4 +6214,4 @@ declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
5446
6214
  constructor(benefit: string);
5447
6215
  }
5448
6216
 
5449
- export { BRANDS_COLLECTION, BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, CATEGORIES_COLLECTION, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, Currency, DEFAULT_CERTIFICATION_REQUIREMENT, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateServiceBackoffice, DynamicVariable, FILLED_DOCUMENTS_COLLECTION, HeadingLevel, type IProductService, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, PRODUCTS_COLLECTION, PricingMeasure, ProcedureFamily, type Product, ProductService, REQUIREMENTS_COLLECTION, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, SUBCATEGORIES_COLLECTION, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, TECHNOLOGIES_COLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchemaBackoffice, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchemaBackoffice, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchemaBackoffice, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchemaBackoffice, timeframeSchema, treatmentBenefitSchemaBackoffice, updateDocumentTemplateSchema };
6217
+ export { BRANDS_COLLECTION, BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, CATEGORIES_COLLECTION, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, ConstantsService, Contraindication, type ContraindicationDynamic, ContraindicationError, type ContraindicationsDocument, type CreateDocumentTemplateData, Currency, DEFAULT_CERTIFICATION_REQUIREMENT, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateServiceBackoffice, DynamicVariable, FILLED_DOCUMENTS_COLLECTION, HeadingLevel, type IProductService, type ITechnologyService, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, PRODUCTS_COLLECTION, PricingMeasure, ProcedureFamily, type ProcedureProduct, type Product, ProductService, REQUIREMENTS_COLLECTION, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, SUBCATEGORIES_COLLECTION, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, TECHNOLOGIES_COLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, TreatmentBenefitError, type TreatmentBenefitsDocument, type UpdateDocumentTemplateData, blockingConditionSchemaBackoffice, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationDynamicSchema, contraindicationSchemaBackoffice, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchemaBackoffice, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchemaBackoffice, timeframeSchema, treatmentBenefitDynamicSchema, treatmentBenefitSchemaBackoffice, updateDocumentTemplateSchema };