@blackcode_sa/metaestetics-api 1.12.66 → 1.12.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backoffice/index.d.mts +73 -0
- package/dist/backoffice/index.d.ts +73 -0
- package/dist/backoffice/index.js +181 -18
- package/dist/backoffice/index.mjs +181 -20
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +184 -21
- package/dist/index.mjs +184 -23
- package/package.json +1 -1
- package/src/backoffice/services/category.service.ts +72 -6
- package/src/backoffice/services/subcategory.service.ts +72 -6
- package/src/backoffice/services/technology.service.ts +74 -6
- package/src/backoffice/types/category.types.ts +5 -0
- package/src/backoffice/types/technology.types.ts +5 -0
- package/src/services/procedure/procedure.service.ts +3 -3
|
@@ -188,6 +188,11 @@ interface ICategoryService {
|
|
|
188
188
|
delete(id: string): Promise<void>;
|
|
189
189
|
reactivate(id: string): Promise<void>;
|
|
190
190
|
getById(id: string): Promise<Category | null>;
|
|
191
|
+
findByNameAndFamily(name: string, family: ProcedureFamily): Promise<Category | null>;
|
|
192
|
+
exportToCsv(options?: {
|
|
193
|
+
includeInactive?: boolean;
|
|
194
|
+
includeBom?: boolean;
|
|
195
|
+
}): Promise<string>;
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
/**
|
|
@@ -204,6 +209,12 @@ interface ICategoryService {
|
|
|
204
209
|
* });
|
|
205
210
|
*/
|
|
206
211
|
declare class CategoryService extends BaseService implements ICategoryService {
|
|
212
|
+
/**
|
|
213
|
+
* Filters out excluded categories from a list.
|
|
214
|
+
* @param categories - List of categories to filter
|
|
215
|
+
* @returns Filtered list without excluded categories
|
|
216
|
+
*/
|
|
217
|
+
private filterExcludedCategories;
|
|
207
218
|
/**
|
|
208
219
|
* Referenca na Firestore kolekciju kategorija
|
|
209
220
|
*/
|
|
@@ -289,6 +300,21 @@ declare class CategoryService extends BaseService implements ICategoryService {
|
|
|
289
300
|
* @returns Kategorija ili null ako ne postoji
|
|
290
301
|
*/
|
|
291
302
|
getById(id: string): Promise<Category | null>;
|
|
303
|
+
/**
|
|
304
|
+
* Internal method to get category by ID without filtering.
|
|
305
|
+
* Used internally for consultation procedures.
|
|
306
|
+
* @param id - ID of the category to get
|
|
307
|
+
* @returns Category or null if not found
|
|
308
|
+
*/
|
|
309
|
+
getByIdInternal(id: string): Promise<Category | null>;
|
|
310
|
+
/**
|
|
311
|
+
* Finds a category by exact name match within a specific family.
|
|
312
|
+
* Used for CSV import matching.
|
|
313
|
+
* @param name - Exact name of the category to find
|
|
314
|
+
* @param family - Procedure family to search within
|
|
315
|
+
* @returns Category if found, null otherwise
|
|
316
|
+
*/
|
|
317
|
+
findByNameAndFamily(name: string, family: ProcedureFamily): Promise<Category | null>;
|
|
292
318
|
/**
|
|
293
319
|
* Exports categories to CSV string, suitable for Excel/Sheets.
|
|
294
320
|
* Includes headers and optional UTF-8 BOM.
|
|
@@ -1077,6 +1103,11 @@ interface ITechnologyService {
|
|
|
1077
1103
|
getAllForFilterBySubcategory(subcategoryId: string): Promise<Technology[]>;
|
|
1078
1104
|
getAllForFilterBySubcategoryId(categoryId: string, subcategoryId: string): Promise<Technology[]>;
|
|
1079
1105
|
getAllForFilter(): Promise<Technology[]>;
|
|
1106
|
+
findByName(name: string): Promise<Technology | null>;
|
|
1107
|
+
exportToCsv(options?: {
|
|
1108
|
+
includeInactive?: boolean;
|
|
1109
|
+
includeBom?: boolean;
|
|
1110
|
+
}): Promise<string>;
|
|
1080
1111
|
}
|
|
1081
1112
|
|
|
1082
1113
|
/**
|
|
@@ -1882,6 +1913,12 @@ declare class RequirementService extends BaseService {
|
|
|
1882
1913
|
* });
|
|
1883
1914
|
*/
|
|
1884
1915
|
declare class SubcategoryService extends BaseService {
|
|
1916
|
+
/**
|
|
1917
|
+
* Filters out excluded subcategories from a list.
|
|
1918
|
+
* @param subcategories - List of subcategories to filter
|
|
1919
|
+
* @returns Filtered list without excluded subcategories
|
|
1920
|
+
*/
|
|
1921
|
+
private filterExcludedSubcategories;
|
|
1885
1922
|
/**
|
|
1886
1923
|
* Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
|
|
1887
1924
|
* @param categoryId - ID roditeljske kategorije
|
|
@@ -1976,6 +2013,22 @@ declare class SubcategoryService extends BaseService {
|
|
|
1976
2013
|
* @returns Podkategorija ili null ako ne postoji
|
|
1977
2014
|
*/
|
|
1978
2015
|
getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Internal method to get subcategory by ID without filtering.
|
|
2018
|
+
* Used internally for consultation procedures.
|
|
2019
|
+
* @param categoryId - ID of the category
|
|
2020
|
+
* @param subcategoryId - ID of the subcategory to get
|
|
2021
|
+
* @returns Subcategory or null if not found
|
|
2022
|
+
*/
|
|
2023
|
+
getByIdInternal(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
2024
|
+
/**
|
|
2025
|
+
* Finds a subcategory by exact name match within a specific category.
|
|
2026
|
+
* Used for CSV import matching.
|
|
2027
|
+
* @param name - Exact name of the subcategory to find
|
|
2028
|
+
* @param categoryId - ID of the category to search within
|
|
2029
|
+
* @returns Subcategory if found, null otherwise
|
|
2030
|
+
*/
|
|
2031
|
+
findByNameAndCategory(name: string, categoryId: string): Promise<Subcategory | null>;
|
|
1979
2032
|
/**
|
|
1980
2033
|
* Exports subcategories to CSV string, suitable for Excel/Sheets.
|
|
1981
2034
|
* Includes headers and optional UTF-8 BOM.
|
|
@@ -1994,6 +2047,12 @@ declare class SubcategoryService extends BaseService {
|
|
|
1994
2047
|
* Service for managing technologies.
|
|
1995
2048
|
*/
|
|
1996
2049
|
declare class TechnologyService extends BaseService implements ITechnologyService {
|
|
2050
|
+
/**
|
|
2051
|
+
* Filters out excluded technologies from a list.
|
|
2052
|
+
* @param technologies - List of technologies to filter
|
|
2053
|
+
* @returns Filtered list without excluded technologies
|
|
2054
|
+
*/
|
|
2055
|
+
private filterExcludedTechnologies;
|
|
1997
2056
|
/**
|
|
1998
2057
|
* Reference to the Firestore collection of technologies.
|
|
1999
2058
|
*/
|
|
@@ -2101,6 +2160,20 @@ declare class TechnologyService extends BaseService implements ITechnologyServic
|
|
|
2101
2160
|
* @returns The technology or null if it doesn't exist.
|
|
2102
2161
|
*/
|
|
2103
2162
|
getById(id: string): Promise<Technology | null>;
|
|
2163
|
+
/**
|
|
2164
|
+
* Internal method to get technology by ID without filtering.
|
|
2165
|
+
* Used internally for consultation procedures.
|
|
2166
|
+
* @param id - The ID of the requested technology
|
|
2167
|
+
* @returns The technology or null if it doesn't exist
|
|
2168
|
+
*/
|
|
2169
|
+
getByIdInternal(id: string): Promise<Technology | null>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Finds a technology by exact name match.
|
|
2172
|
+
* Used for CSV import duplicate detection.
|
|
2173
|
+
* @param name - Exact name of the technology to find
|
|
2174
|
+
* @returns Technology if found, null otherwise
|
|
2175
|
+
*/
|
|
2176
|
+
findByName(name: string): Promise<Technology | null>;
|
|
2104
2177
|
/**
|
|
2105
2178
|
* Dodaje novi zahtev tehnologiji
|
|
2106
2179
|
* @param technologyId - ID tehnologije
|
|
@@ -188,6 +188,11 @@ interface ICategoryService {
|
|
|
188
188
|
delete(id: string): Promise<void>;
|
|
189
189
|
reactivate(id: string): Promise<void>;
|
|
190
190
|
getById(id: string): Promise<Category | null>;
|
|
191
|
+
findByNameAndFamily(name: string, family: ProcedureFamily): Promise<Category | null>;
|
|
192
|
+
exportToCsv(options?: {
|
|
193
|
+
includeInactive?: boolean;
|
|
194
|
+
includeBom?: boolean;
|
|
195
|
+
}): Promise<string>;
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
/**
|
|
@@ -204,6 +209,12 @@ interface ICategoryService {
|
|
|
204
209
|
* });
|
|
205
210
|
*/
|
|
206
211
|
declare class CategoryService extends BaseService implements ICategoryService {
|
|
212
|
+
/**
|
|
213
|
+
* Filters out excluded categories from a list.
|
|
214
|
+
* @param categories - List of categories to filter
|
|
215
|
+
* @returns Filtered list without excluded categories
|
|
216
|
+
*/
|
|
217
|
+
private filterExcludedCategories;
|
|
207
218
|
/**
|
|
208
219
|
* Referenca na Firestore kolekciju kategorija
|
|
209
220
|
*/
|
|
@@ -289,6 +300,21 @@ declare class CategoryService extends BaseService implements ICategoryService {
|
|
|
289
300
|
* @returns Kategorija ili null ako ne postoji
|
|
290
301
|
*/
|
|
291
302
|
getById(id: string): Promise<Category | null>;
|
|
303
|
+
/**
|
|
304
|
+
* Internal method to get category by ID without filtering.
|
|
305
|
+
* Used internally for consultation procedures.
|
|
306
|
+
* @param id - ID of the category to get
|
|
307
|
+
* @returns Category or null if not found
|
|
308
|
+
*/
|
|
309
|
+
getByIdInternal(id: string): Promise<Category | null>;
|
|
310
|
+
/**
|
|
311
|
+
* Finds a category by exact name match within a specific family.
|
|
312
|
+
* Used for CSV import matching.
|
|
313
|
+
* @param name - Exact name of the category to find
|
|
314
|
+
* @param family - Procedure family to search within
|
|
315
|
+
* @returns Category if found, null otherwise
|
|
316
|
+
*/
|
|
317
|
+
findByNameAndFamily(name: string, family: ProcedureFamily): Promise<Category | null>;
|
|
292
318
|
/**
|
|
293
319
|
* Exports categories to CSV string, suitable for Excel/Sheets.
|
|
294
320
|
* Includes headers and optional UTF-8 BOM.
|
|
@@ -1077,6 +1103,11 @@ interface ITechnologyService {
|
|
|
1077
1103
|
getAllForFilterBySubcategory(subcategoryId: string): Promise<Technology[]>;
|
|
1078
1104
|
getAllForFilterBySubcategoryId(categoryId: string, subcategoryId: string): Promise<Technology[]>;
|
|
1079
1105
|
getAllForFilter(): Promise<Technology[]>;
|
|
1106
|
+
findByName(name: string): Promise<Technology | null>;
|
|
1107
|
+
exportToCsv(options?: {
|
|
1108
|
+
includeInactive?: boolean;
|
|
1109
|
+
includeBom?: boolean;
|
|
1110
|
+
}): Promise<string>;
|
|
1080
1111
|
}
|
|
1081
1112
|
|
|
1082
1113
|
/**
|
|
@@ -1882,6 +1913,12 @@ declare class RequirementService extends BaseService {
|
|
|
1882
1913
|
* });
|
|
1883
1914
|
*/
|
|
1884
1915
|
declare class SubcategoryService extends BaseService {
|
|
1916
|
+
/**
|
|
1917
|
+
* Filters out excluded subcategories from a list.
|
|
1918
|
+
* @param subcategories - List of subcategories to filter
|
|
1919
|
+
* @returns Filtered list without excluded subcategories
|
|
1920
|
+
*/
|
|
1921
|
+
private filterExcludedSubcategories;
|
|
1885
1922
|
/**
|
|
1886
1923
|
* Vraća referencu na Firestore kolekciju podkategorija za određenu kategoriju
|
|
1887
1924
|
* @param categoryId - ID roditeljske kategorije
|
|
@@ -1976,6 +2013,22 @@ declare class SubcategoryService extends BaseService {
|
|
|
1976
2013
|
* @returns Podkategorija ili null ako ne postoji
|
|
1977
2014
|
*/
|
|
1978
2015
|
getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
2016
|
+
/**
|
|
2017
|
+
* Internal method to get subcategory by ID without filtering.
|
|
2018
|
+
* Used internally for consultation procedures.
|
|
2019
|
+
* @param categoryId - ID of the category
|
|
2020
|
+
* @param subcategoryId - ID of the subcategory to get
|
|
2021
|
+
* @returns Subcategory or null if not found
|
|
2022
|
+
*/
|
|
2023
|
+
getByIdInternal(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
|
|
2024
|
+
/**
|
|
2025
|
+
* Finds a subcategory by exact name match within a specific category.
|
|
2026
|
+
* Used for CSV import matching.
|
|
2027
|
+
* @param name - Exact name of the subcategory to find
|
|
2028
|
+
* @param categoryId - ID of the category to search within
|
|
2029
|
+
* @returns Subcategory if found, null otherwise
|
|
2030
|
+
*/
|
|
2031
|
+
findByNameAndCategory(name: string, categoryId: string): Promise<Subcategory | null>;
|
|
1979
2032
|
/**
|
|
1980
2033
|
* Exports subcategories to CSV string, suitable for Excel/Sheets.
|
|
1981
2034
|
* Includes headers and optional UTF-8 BOM.
|
|
@@ -1994,6 +2047,12 @@ declare class SubcategoryService extends BaseService {
|
|
|
1994
2047
|
* Service for managing technologies.
|
|
1995
2048
|
*/
|
|
1996
2049
|
declare class TechnologyService extends BaseService implements ITechnologyService {
|
|
2050
|
+
/**
|
|
2051
|
+
* Filters out excluded technologies from a list.
|
|
2052
|
+
* @param technologies - List of technologies to filter
|
|
2053
|
+
* @returns Filtered list without excluded technologies
|
|
2054
|
+
*/
|
|
2055
|
+
private filterExcludedTechnologies;
|
|
1997
2056
|
/**
|
|
1998
2057
|
* Reference to the Firestore collection of technologies.
|
|
1999
2058
|
*/
|
|
@@ -2101,6 +2160,20 @@ declare class TechnologyService extends BaseService implements ITechnologyServic
|
|
|
2101
2160
|
* @returns The technology or null if it doesn't exist.
|
|
2102
2161
|
*/
|
|
2103
2162
|
getById(id: string): Promise<Technology | null>;
|
|
2163
|
+
/**
|
|
2164
|
+
* Internal method to get technology by ID without filtering.
|
|
2165
|
+
* Used internally for consultation procedures.
|
|
2166
|
+
* @param id - The ID of the requested technology
|
|
2167
|
+
* @returns The technology or null if it doesn't exist
|
|
2168
|
+
*/
|
|
2169
|
+
getByIdInternal(id: string): Promise<Technology | null>;
|
|
2170
|
+
/**
|
|
2171
|
+
* Finds a technology by exact name match.
|
|
2172
|
+
* Used for CSV import duplicate detection.
|
|
2173
|
+
* @param name - Exact name of the technology to find
|
|
2174
|
+
* @returns Technology if found, null otherwise
|
|
2175
|
+
*/
|
|
2176
|
+
findByName(name: string): Promise<Technology | null>;
|
|
2104
2177
|
/**
|
|
2105
2178
|
* Dodaje novi zahtev tehnologiji
|
|
2106
2179
|
* @param technologyId - ID tehnologije
|