@deepintel-ltd/farmpro-contracts 1.0.3 → 1.1.0
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 +1097 -0
- package/dist/routes/categories.routes.d.ts.map +1 -0
- package/dist/routes/categories.routes.js +93 -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 +437 -0
- package/dist/schemas/categories.schemas.d.ts.map +1 -0
- package/dist/schemas/categories.schemas.js +47 -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":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF3B,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 common_schemas_1 = require("../schemas/common.schemas");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const c = (0, core_1.initContract)();
|
|
9
|
+
/**
|
|
10
|
+
* Categories API contract
|
|
11
|
+
* Provides endpoints for managing universal categories (can be used for tasks, budgets, expenses)
|
|
12
|
+
*/
|
|
13
|
+
exports.categoriesRouter = c.router({
|
|
14
|
+
/**
|
|
15
|
+
* Get categories
|
|
16
|
+
* Returns system defaults and optionally farm-specific categories
|
|
17
|
+
*/
|
|
18
|
+
getCategories: {
|
|
19
|
+
method: 'GET',
|
|
20
|
+
path: '/categories',
|
|
21
|
+
query: categories_schemas_1.getCategoriesQuerySchema,
|
|
22
|
+
responses: {
|
|
23
|
+
200: categories_schemas_1.categoryListResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
summary: 'Get categories',
|
|
26
|
+
description: 'Returns system default categories and optionally farm-specific categories. Categories are universal and can be used for tasks, budgets, and expenses.',
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Get default category
|
|
30
|
+
* Returns the default category that should be used when none is specified
|
|
31
|
+
*/
|
|
32
|
+
getDefaultCategory: {
|
|
33
|
+
method: 'GET',
|
|
34
|
+
path: '/categories/default',
|
|
35
|
+
responses: {
|
|
36
|
+
200: categories_schemas_1.categoryResponseSchema,
|
|
37
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
38
|
+
},
|
|
39
|
+
summary: 'Get default category',
|
|
40
|
+
description: 'Returns the system-wide default category that should be used when creating a task, budget, or expense without specifying a category.',
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Create category
|
|
44
|
+
* Creates a farm-specific category (farmId required) or system default (admin only)
|
|
45
|
+
*/
|
|
46
|
+
createCategory: {
|
|
47
|
+
method: 'POST',
|
|
48
|
+
path: '/categories',
|
|
49
|
+
body: categories_schemas_1.createCategorySchema,
|
|
50
|
+
responses: {
|
|
51
|
+
201: categories_schemas_1.categoryResponseSchema,
|
|
52
|
+
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
53
|
+
409: common_schemas_1.jsonApiErrorResponseSchema,
|
|
54
|
+
},
|
|
55
|
+
summary: 'Create a new category',
|
|
56
|
+
description: 'Creates a farm-specific category or system default category. Farm-specific categories override system defaults for that farm.',
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Update category
|
|
60
|
+
* Updates a farm-specific category
|
|
61
|
+
*/
|
|
62
|
+
updateCategory: {
|
|
63
|
+
method: 'PATCH',
|
|
64
|
+
path: '/categories/:id',
|
|
65
|
+
pathParams: zod_1.z.object({
|
|
66
|
+
id: zod_1.z.string().uuid(),
|
|
67
|
+
}),
|
|
68
|
+
body: categories_schemas_1.updateCategorySchema,
|
|
69
|
+
responses: {
|
|
70
|
+
200: categories_schemas_1.categoryResponseSchema,
|
|
71
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
72
|
+
},
|
|
73
|
+
summary: 'Update a category',
|
|
74
|
+
description: 'Updates a farm-specific category. System default categories cannot be updated through this endpoint.',
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Delete category
|
|
78
|
+
* Deletes a farm-specific category
|
|
79
|
+
*/
|
|
80
|
+
deleteCategory: {
|
|
81
|
+
method: 'DELETE',
|
|
82
|
+
path: '/categories/:id',
|
|
83
|
+
pathParams: zod_1.z.object({
|
|
84
|
+
id: zod_1.z.string().uuid(),
|
|
85
|
+
}),
|
|
86
|
+
responses: {
|
|
87
|
+
204: zod_1.z.object({}),
|
|
88
|
+
404: common_schemas_1.jsonApiErrorResponseSchema,
|
|
89
|
+
},
|
|
90
|
+
summary: 'Delete a category',
|
|
91
|
+
description: 'Deletes a farm-specific category. System default categories cannot be deleted.',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
@@ -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,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;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AAM,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
|
});
|