@deepintel-ltd/farmpro-contracts 1.0.3 → 1.0.4
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/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/routes/categories.routes.d.ts +800 -0
- package/dist/routes/categories.routes.d.ts.map +1 -0
- package/dist/routes/categories.routes.js +120 -0
- package/dist/routes/fields.routes.d.ts +90 -0
- package/dist/routes/fields.routes.d.ts.map +1 -1
- package/dist/routes/fields.routes.js +1 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -0
- package/dist/routes/tasks.routes.d.ts +56 -0
- package/dist/routes/tasks.routes.d.ts.map +1 -1
- package/dist/schemas/categories.schemas.d.ts +471 -0
- package/dist/schemas/categories.schemas.d.ts.map +1 -0
- package/dist/schemas/categories.schemas.js +51 -0
- package/dist/schemas/tasks.schemas.d.ts +50 -0
- package/dist/schemas/tasks.schemas.d.ts.map +1 -1
- package/dist/schemas/tasks.schemas.js +3 -0
- package/dist/schemas/weather.schemas.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.routes.d.ts","sourceRoot":"","sources":["../../src/routes/categories.routes.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgH3B,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.categoriesRouter = void 0;
|
|
4
|
+
const core_1 = require("@ts-rest/core");
|
|
5
|
+
const categories_schemas_1 = require("../schemas/categories.schemas");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const c = (0, core_1.initContract)();
|
|
8
|
+
/**
|
|
9
|
+
* Categories API contract
|
|
10
|
+
* Provides endpoints for managing categories (task, budget, expense)
|
|
11
|
+
*/
|
|
12
|
+
exports.categoriesRouter = c.router({
|
|
13
|
+
/**
|
|
14
|
+
* Get categories
|
|
15
|
+
* Returns system defaults and optionally farm-specific categories
|
|
16
|
+
*/
|
|
17
|
+
getCategories: {
|
|
18
|
+
method: 'GET',
|
|
19
|
+
path: '/categories',
|
|
20
|
+
query: categories_schemas_1.getCategoriesQuerySchema,
|
|
21
|
+
responses: {
|
|
22
|
+
200: categories_schemas_1.categoryListResponseSchema,
|
|
23
|
+
},
|
|
24
|
+
summary: 'Get categories by type',
|
|
25
|
+
description: 'Returns system default categories and optionally farm-specific categories. Use type filter to get categories for tasks, budget, or expenses.',
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Get default category for a type
|
|
29
|
+
* Returns the default category that should be used when none is specified
|
|
30
|
+
*/
|
|
31
|
+
getDefaultCategory: {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
path: '/categories/default/:type',
|
|
34
|
+
pathParams: zod_1.z.object({
|
|
35
|
+
type: zod_1.z.enum(['task', 'budget', 'expense']),
|
|
36
|
+
}),
|
|
37
|
+
responses: {
|
|
38
|
+
200: categories_schemas_1.categoryResponseSchema,
|
|
39
|
+
404: zod_1.z.object({
|
|
40
|
+
error: zod_1.z.object({
|
|
41
|
+
message: zod_1.z.string(),
|
|
42
|
+
code: zod_1.z.string(),
|
|
43
|
+
}),
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
summary: 'Get default category for a type',
|
|
47
|
+
description: 'Returns the default category that should be used when creating a task, budget, or expense without specifying a category.',
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Create category
|
|
51
|
+
* Creates a farm-specific category (farmId required) or system default (admin only)
|
|
52
|
+
*/
|
|
53
|
+
createCategory: {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
path: '/categories',
|
|
56
|
+
body: categories_schemas_1.createCategorySchema,
|
|
57
|
+
responses: {
|
|
58
|
+
201: categories_schemas_1.categoryResponseSchema,
|
|
59
|
+
400: zod_1.z.object({
|
|
60
|
+
error: zod_1.z.object({
|
|
61
|
+
message: zod_1.z.string(),
|
|
62
|
+
code: zod_1.z.string(),
|
|
63
|
+
}),
|
|
64
|
+
}),
|
|
65
|
+
409: zod_1.z.object({
|
|
66
|
+
error: zod_1.z.object({
|
|
67
|
+
message: zod_1.z.string(),
|
|
68
|
+
code: zod_1.z.string(),
|
|
69
|
+
}),
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
summary: 'Create a new category',
|
|
73
|
+
description: 'Creates a farm-specific category or system default category. Farm-specific categories override system defaults for that farm.',
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Update category
|
|
77
|
+
* Updates a farm-specific category
|
|
78
|
+
*/
|
|
79
|
+
updateCategory: {
|
|
80
|
+
method: 'PATCH',
|
|
81
|
+
path: '/categories/:id',
|
|
82
|
+
pathParams: zod_1.z.object({
|
|
83
|
+
id: zod_1.z.string().uuid(),
|
|
84
|
+
}),
|
|
85
|
+
body: categories_schemas_1.updateCategorySchema,
|
|
86
|
+
responses: {
|
|
87
|
+
200: categories_schemas_1.categoryResponseSchema,
|
|
88
|
+
404: zod_1.z.object({
|
|
89
|
+
error: zod_1.z.object({
|
|
90
|
+
message: zod_1.z.string(),
|
|
91
|
+
code: zod_1.z.string(),
|
|
92
|
+
}),
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
summary: 'Update a category',
|
|
96
|
+
description: 'Updates a farm-specific category. System default categories cannot be updated through this endpoint.',
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Delete category
|
|
100
|
+
* Deletes a farm-specific category
|
|
101
|
+
*/
|
|
102
|
+
deleteCategory: {
|
|
103
|
+
method: 'DELETE',
|
|
104
|
+
path: '/categories/:id',
|
|
105
|
+
pathParams: zod_1.z.object({
|
|
106
|
+
id: zod_1.z.string().uuid(),
|
|
107
|
+
}),
|
|
108
|
+
responses: {
|
|
109
|
+
204: zod_1.z.object({}),
|
|
110
|
+
404: zod_1.z.object({
|
|
111
|
+
error: zod_1.z.object({
|
|
112
|
+
message: zod_1.z.string(),
|
|
113
|
+
code: zod_1.z.string(),
|
|
114
|
+
}),
|
|
115
|
+
}),
|
|
116
|
+
},
|
|
117
|
+
summary: 'Delete a category',
|
|
118
|
+
description: 'Deletes a farm-specific category. System default categories cannot be deleted.',
|
|
119
|
+
},
|
|
120
|
+
});
|
|
@@ -376,6 +376,96 @@ export declare const fieldsRouter: {
|
|
|
376
376
|
meta?: Record<string, unknown> | undefined;
|
|
377
377
|
}[] | undefined;
|
|
378
378
|
}>;
|
|
379
|
+
400: z.ZodObject<{
|
|
380
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
381
|
+
id: z.ZodOptional<z.ZodString>;
|
|
382
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
about: z.ZodOptional<z.ZodString>;
|
|
384
|
+
}, "strip", z.ZodTypeAny, {
|
|
385
|
+
about?: string | undefined;
|
|
386
|
+
}, {
|
|
387
|
+
about?: string | undefined;
|
|
388
|
+
}>>;
|
|
389
|
+
status: z.ZodOptional<z.ZodString>;
|
|
390
|
+
code: z.ZodOptional<z.ZodString>;
|
|
391
|
+
title: z.ZodOptional<z.ZodString>;
|
|
392
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
393
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
395
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, "strip", z.ZodTypeAny, {
|
|
397
|
+
pointer?: string | undefined;
|
|
398
|
+
parameter?: string | undefined;
|
|
399
|
+
}, {
|
|
400
|
+
pointer?: string | undefined;
|
|
401
|
+
parameter?: string | undefined;
|
|
402
|
+
}>>;
|
|
403
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
404
|
+
}, "strip", z.ZodTypeAny, {
|
|
405
|
+
status?: string | undefined;
|
|
406
|
+
code?: string | undefined;
|
|
407
|
+
id?: string | undefined;
|
|
408
|
+
links?: {
|
|
409
|
+
about?: string | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
meta?: Record<string, unknown> | undefined;
|
|
412
|
+
title?: string | undefined;
|
|
413
|
+
detail?: string | undefined;
|
|
414
|
+
source?: {
|
|
415
|
+
pointer?: string | undefined;
|
|
416
|
+
parameter?: string | undefined;
|
|
417
|
+
} | undefined;
|
|
418
|
+
}, {
|
|
419
|
+
status?: string | undefined;
|
|
420
|
+
code?: string | undefined;
|
|
421
|
+
id?: string | undefined;
|
|
422
|
+
links?: {
|
|
423
|
+
about?: string | undefined;
|
|
424
|
+
} | undefined;
|
|
425
|
+
meta?: Record<string, unknown> | undefined;
|
|
426
|
+
title?: string | undefined;
|
|
427
|
+
detail?: string | undefined;
|
|
428
|
+
source?: {
|
|
429
|
+
pointer?: string | undefined;
|
|
430
|
+
parameter?: string | undefined;
|
|
431
|
+
} | undefined;
|
|
432
|
+
}>, "many">;
|
|
433
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
errors: {
|
|
436
|
+
status?: string | undefined;
|
|
437
|
+
code?: string | undefined;
|
|
438
|
+
id?: string | undefined;
|
|
439
|
+
links?: {
|
|
440
|
+
about?: string | undefined;
|
|
441
|
+
} | undefined;
|
|
442
|
+
meta?: Record<string, unknown> | undefined;
|
|
443
|
+
title?: string | undefined;
|
|
444
|
+
detail?: string | undefined;
|
|
445
|
+
source?: {
|
|
446
|
+
pointer?: string | undefined;
|
|
447
|
+
parameter?: string | undefined;
|
|
448
|
+
} | undefined;
|
|
449
|
+
}[];
|
|
450
|
+
meta?: Record<string, unknown> | undefined;
|
|
451
|
+
}, {
|
|
452
|
+
errors: {
|
|
453
|
+
status?: string | undefined;
|
|
454
|
+
code?: string | undefined;
|
|
455
|
+
id?: string | undefined;
|
|
456
|
+
links?: {
|
|
457
|
+
about?: string | undefined;
|
|
458
|
+
} | undefined;
|
|
459
|
+
meta?: Record<string, unknown> | undefined;
|
|
460
|
+
title?: string | undefined;
|
|
461
|
+
detail?: string | undefined;
|
|
462
|
+
source?: {
|
|
463
|
+
pointer?: string | undefined;
|
|
464
|
+
parameter?: string | undefined;
|
|
465
|
+
} | undefined;
|
|
466
|
+
}[];
|
|
467
|
+
meta?: Record<string, unknown> | undefined;
|
|
468
|
+
}>;
|
|
379
469
|
404: z.ZodObject<{
|
|
380
470
|
errors: z.ZodArray<z.ZodObject<{
|
|
381
471
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FvB,CAAC"}
|
|
@@ -18,6 +18,7 @@ exports.fieldsRouter = c.router({
|
|
|
18
18
|
.merge(common_schemas_1.jsonApiFilterQuerySchema),
|
|
19
19
|
responses: {
|
|
20
20
|
200: fields_schemas_1.fieldListResponseSchema,
|
|
21
|
+
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
21
22
|
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
22
23
|
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
23
24
|
},
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { equipmentRouter } from './equipment.routes';
|
|
|
13
13
|
import { documentsRouter } from './documents.routes';
|
|
14
14
|
import { suppliersRouter } from './suppliers.routes';
|
|
15
15
|
import { analyticsRouter } from './analytics.routes';
|
|
16
|
+
import { categoriesRouter } from './categories.routes';
|
|
16
17
|
/**
|
|
17
18
|
* Explicit interface definition for the API contract.
|
|
18
19
|
* This avoids TypeScript's type serialization limit when combining many routers
|
|
@@ -34,6 +35,7 @@ export interface ApiContractDefinition {
|
|
|
34
35
|
documents: typeof documentsRouter;
|
|
35
36
|
suppliers: typeof suppliersRouter;
|
|
36
37
|
analytics: typeof analyticsRouter;
|
|
38
|
+
categories: typeof categoriesRouter;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Main API contract combining all routers
|
|
@@ -65,4 +67,5 @@ export type EquipmentEndpoints = ApiContractType['equipment'];
|
|
|
65
67
|
export type DocumentsEndpoints = ApiContractType['documents'];
|
|
66
68
|
export type SuppliersEndpoints = ApiContractType['suppliers'];
|
|
67
69
|
export type AnalyticsEndpoints = ApiContractType['analytics'];
|
|
70
|
+
export type CategoriesEndpoints = ApiContractType['categories'];
|
|
68
71
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM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,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC"}
|
package/dist/routes/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const equipment_routes_1 = require("./equipment.routes");
|
|
|
17
17
|
const documents_routes_1 = require("./documents.routes");
|
|
18
18
|
const suppliers_routes_1 = require("./suppliers.routes");
|
|
19
19
|
const analytics_routes_1 = require("./analytics.routes");
|
|
20
|
+
const categories_routes_1 = require("./categories.routes");
|
|
20
21
|
const c = (0, core_1.initContract)();
|
|
21
22
|
/**
|
|
22
23
|
* Main API contract combining all routers
|
|
@@ -40,4 +41,5 @@ exports.apiContract = c.router({
|
|
|
40
41
|
documents: documents_routes_1.documentsRouter,
|
|
41
42
|
suppliers: suppliers_routes_1.suppliersRouter,
|
|
42
43
|
analytics: analytics_routes_1.analyticsRouter,
|
|
44
|
+
categories: categories_routes_1.categoriesRouter,
|
|
43
45
|
});
|