@deepintel-ltd/farmpro-contracts 1.1.0 → 1.2.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 +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/routes/agents.routes.d.ts +520 -0
- package/dist/routes/agents.routes.d.ts.map +1 -0
- package/dist/routes/agents.routes.js +36 -0
- package/dist/routes/field-monitoring.routes.d.ts +405 -0
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -0
- package/dist/routes/field-monitoring.routes.js +93 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/schemas/agents.schemas.d.ts +352 -0
- package/dist/schemas/agents.schemas.d.ts.map +1 -0
- package/dist/schemas/agents.schemas.js +42 -0
- package/dist/schemas/categories.schemas.js +1 -1
- package/dist/schemas/field-monitoring.schemas.d.ts +216 -0
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -0
- package/dist/schemas/field-monitoring.schemas.js +92 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module @farmpro/contracts
|
|
7
7
|
*/
|
|
8
8
|
export { apiContract } from './routes';
|
|
9
|
-
export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, } from './routes';
|
|
9
|
+
export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, AgentsEndpoints, FieldMonitoringEndpoints, } from './routes';
|
|
10
10
|
export { authRouter } from './routes/auth.routes';
|
|
11
11
|
export { usersRouter } from './routes/users.routes';
|
|
12
12
|
export { farmsRouter } from './routes/farms.routes';
|
|
@@ -23,6 +23,8 @@ export { documentsRouter } from './routes/documents.routes';
|
|
|
23
23
|
export { suppliersRouter } from './routes/suppliers.routes';
|
|
24
24
|
export { analyticsRouter } from './routes/analytics.routes';
|
|
25
25
|
export { categoriesRouter } from './routes/categories.routes';
|
|
26
|
+
export { agentsRouter } from './routes/agents.routes';
|
|
27
|
+
export { fieldMonitoringRouter } from './routes/field-monitoring.routes';
|
|
26
28
|
export * from './schemas/common.schemas';
|
|
27
29
|
export * from './schemas/auth.schemas';
|
|
28
30
|
export * from './schemas/users.schemas';
|
|
@@ -40,4 +42,6 @@ export * from './schemas/documents.schemas';
|
|
|
40
42
|
export * from './schemas/suppliers.schemas';
|
|
41
43
|
export * from './schemas/analytics.schemas';
|
|
42
44
|
export * from './schemas/categories.schemas';
|
|
45
|
+
export * from './schemas/agents.schemas';
|
|
46
|
+
export * from './schemas/field-monitoring.schemas';
|
|
43
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAMlB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAMzE,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.categoriesRouter = exports.analyticsRouter = exports.suppliersRouter = exports.documentsRouter = exports.equipmentRouter = exports.teamRouter = exports.weatherRouter = exports.soilTestsRouter = exports.harvestRouter = exports.financeRouter = exports.inventoryRouter = exports.tasksRouter = exports.fieldsRouter = exports.farmsRouter = exports.usersRouter = exports.authRouter = exports.apiContract = void 0;
|
|
24
|
+
exports.fieldMonitoringRouter = exports.agentsRouter = exports.categoriesRouter = exports.analyticsRouter = exports.suppliersRouter = exports.documentsRouter = exports.equipmentRouter = exports.teamRouter = exports.weatherRouter = exports.soilTestsRouter = exports.harvestRouter = exports.financeRouter = exports.inventoryRouter = exports.tasksRouter = exports.fieldsRouter = exports.farmsRouter = exports.usersRouter = exports.authRouter = exports.apiContract = void 0;
|
|
25
25
|
// =============================================================================
|
|
26
26
|
// Main API Contract
|
|
27
27
|
// =============================================================================
|
|
@@ -62,6 +62,10 @@ var analytics_routes_1 = require("./routes/analytics.routes");
|
|
|
62
62
|
Object.defineProperty(exports, "analyticsRouter", { enumerable: true, get: function () { return analytics_routes_1.analyticsRouter; } });
|
|
63
63
|
var categories_routes_1 = require("./routes/categories.routes");
|
|
64
64
|
Object.defineProperty(exports, "categoriesRouter", { enumerable: true, get: function () { return categories_routes_1.categoriesRouter; } });
|
|
65
|
+
var agents_routes_1 = require("./routes/agents.routes");
|
|
66
|
+
Object.defineProperty(exports, "agentsRouter", { enumerable: true, get: function () { return agents_routes_1.agentsRouter; } });
|
|
67
|
+
var field_monitoring_routes_1 = require("./routes/field-monitoring.routes");
|
|
68
|
+
Object.defineProperty(exports, "fieldMonitoringRouter", { enumerable: true, get: function () { return field_monitoring_routes_1.fieldMonitoringRouter; } });
|
|
65
69
|
// =============================================================================
|
|
66
70
|
// Schemas
|
|
67
71
|
// =============================================================================
|
|
@@ -82,3 +86,5 @@ __exportStar(require("./schemas/documents.schemas"), exports);
|
|
|
82
86
|
__exportStar(require("./schemas/suppliers.schemas"), exports);
|
|
83
87
|
__exportStar(require("./schemas/analytics.schemas"), exports);
|
|
84
88
|
__exportStar(require("./schemas/categories.schemas"), exports);
|
|
89
|
+
__exportStar(require("./schemas/agents.schemas"), exports);
|
|
90
|
+
__exportStar(require("./schemas/field-monitoring.schemas"), exports);
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const agentsRouter: {
|
|
3
|
+
chatWithAgronomics: {
|
|
4
|
+
metadata: {
|
|
5
|
+
openapi: {
|
|
6
|
+
parameters: {
|
|
7
|
+
name: string;
|
|
8
|
+
in: string;
|
|
9
|
+
required: boolean;
|
|
10
|
+
schema: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
};
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
summary: "Chat with the agronomics AI agent";
|
|
18
|
+
description: "Send a message to the agronomics agent and receive AI-powered farming advice based on your farm data";
|
|
19
|
+
method: "POST";
|
|
20
|
+
body: z.ZodObject<{
|
|
21
|
+
data: z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"agent-chat-requests">;
|
|
23
|
+
attributes: z.ZodObject<{
|
|
24
|
+
message: z.ZodString;
|
|
25
|
+
farmId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
29
|
+
content: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
role: "user" | "assistant";
|
|
32
|
+
content: string;
|
|
33
|
+
}, {
|
|
34
|
+
role: "user" | "assistant";
|
|
35
|
+
content: string;
|
|
36
|
+
}>, "many">>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
message: string;
|
|
39
|
+
farmId?: string | undefined;
|
|
40
|
+
conversationId?: string | undefined;
|
|
41
|
+
conversationHistory?: {
|
|
42
|
+
role: "user" | "assistant";
|
|
43
|
+
content: string;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
message: string;
|
|
47
|
+
farmId?: string | undefined;
|
|
48
|
+
conversationId?: string | undefined;
|
|
49
|
+
conversationHistory?: {
|
|
50
|
+
role: "user" | "assistant";
|
|
51
|
+
content: string;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
type: "agent-chat-requests";
|
|
56
|
+
attributes: {
|
|
57
|
+
message: string;
|
|
58
|
+
farmId?: string | undefined;
|
|
59
|
+
conversationId?: string | undefined;
|
|
60
|
+
conversationHistory?: {
|
|
61
|
+
role: "user" | "assistant";
|
|
62
|
+
content: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
type: "agent-chat-requests";
|
|
67
|
+
attributes: {
|
|
68
|
+
message: string;
|
|
69
|
+
farmId?: string | undefined;
|
|
70
|
+
conversationId?: string | undefined;
|
|
71
|
+
conversationHistory?: {
|
|
72
|
+
role: "user" | "assistant";
|
|
73
|
+
content: string;
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
data: {
|
|
79
|
+
type: "agent-chat-requests";
|
|
80
|
+
attributes: {
|
|
81
|
+
message: string;
|
|
82
|
+
farmId?: string | undefined;
|
|
83
|
+
conversationId?: string | undefined;
|
|
84
|
+
conversationHistory?: {
|
|
85
|
+
role: "user" | "assistant";
|
|
86
|
+
content: string;
|
|
87
|
+
}[] | undefined;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
data: {
|
|
92
|
+
type: "agent-chat-requests";
|
|
93
|
+
attributes: {
|
|
94
|
+
message: string;
|
|
95
|
+
farmId?: string | undefined;
|
|
96
|
+
conversationId?: string | undefined;
|
|
97
|
+
conversationHistory?: {
|
|
98
|
+
role: "user" | "assistant";
|
|
99
|
+
content: string;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
path: "/agents/agronomics/chat";
|
|
105
|
+
responses: {
|
|
106
|
+
200: z.ZodObject<{
|
|
107
|
+
data: z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<string>;
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
attributes: z.ZodObject<{
|
|
111
|
+
response: z.ZodString;
|
|
112
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
113
|
+
tool: z.ZodString;
|
|
114
|
+
result: z.ZodUnknown;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
tool: string;
|
|
117
|
+
result?: unknown;
|
|
118
|
+
}, {
|
|
119
|
+
tool: string;
|
|
120
|
+
result?: unknown;
|
|
121
|
+
}>, "many">>;
|
|
122
|
+
conversationId: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
conversationId: string;
|
|
125
|
+
response: string;
|
|
126
|
+
toolCalls?: {
|
|
127
|
+
tool: string;
|
|
128
|
+
result?: unknown;
|
|
129
|
+
}[] | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
conversationId: string;
|
|
132
|
+
response: string;
|
|
133
|
+
toolCalls?: {
|
|
134
|
+
tool: string;
|
|
135
|
+
result?: unknown;
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
139
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
140
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
type: string;
|
|
143
|
+
id: string;
|
|
144
|
+
attributes: {
|
|
145
|
+
conversationId: string;
|
|
146
|
+
response: string;
|
|
147
|
+
toolCalls?: {
|
|
148
|
+
tool: string;
|
|
149
|
+
result?: unknown;
|
|
150
|
+
}[] | undefined;
|
|
151
|
+
};
|
|
152
|
+
relationships?: Record<string, unknown> | undefined;
|
|
153
|
+
links?: Record<string, string> | undefined;
|
|
154
|
+
meta?: Record<string, unknown> | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
type: string;
|
|
157
|
+
id: string;
|
|
158
|
+
attributes: {
|
|
159
|
+
conversationId: string;
|
|
160
|
+
response: string;
|
|
161
|
+
toolCalls?: {
|
|
162
|
+
tool: string;
|
|
163
|
+
result?: unknown;
|
|
164
|
+
}[] | undefined;
|
|
165
|
+
};
|
|
166
|
+
relationships?: Record<string, unknown> | undefined;
|
|
167
|
+
links?: Record<string, string> | undefined;
|
|
168
|
+
meta?: Record<string, unknown> | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
type: z.ZodString;
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
174
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
176
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
type: string;
|
|
179
|
+
id: string;
|
|
180
|
+
attributes?: Record<string, unknown> | undefined;
|
|
181
|
+
relationships?: Record<string, unknown> | undefined;
|
|
182
|
+
links?: Record<string, string> | undefined;
|
|
183
|
+
meta?: Record<string, unknown> | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
type: string;
|
|
186
|
+
id: string;
|
|
187
|
+
attributes?: Record<string, unknown> | undefined;
|
|
188
|
+
relationships?: Record<string, unknown> | undefined;
|
|
189
|
+
links?: Record<string, string> | undefined;
|
|
190
|
+
meta?: Record<string, unknown> | undefined;
|
|
191
|
+
}>, "many">>;
|
|
192
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
193
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
data: {
|
|
196
|
+
type: string;
|
|
197
|
+
id: string;
|
|
198
|
+
attributes: {
|
|
199
|
+
conversationId: string;
|
|
200
|
+
response: string;
|
|
201
|
+
toolCalls?: {
|
|
202
|
+
tool: string;
|
|
203
|
+
result?: unknown;
|
|
204
|
+
}[] | undefined;
|
|
205
|
+
};
|
|
206
|
+
relationships?: Record<string, unknown> | undefined;
|
|
207
|
+
links?: Record<string, string> | undefined;
|
|
208
|
+
meta?: Record<string, unknown> | undefined;
|
|
209
|
+
};
|
|
210
|
+
links?: Record<string, string> | undefined;
|
|
211
|
+
meta?: Record<string, unknown> | undefined;
|
|
212
|
+
included?: {
|
|
213
|
+
type: string;
|
|
214
|
+
id: string;
|
|
215
|
+
attributes?: Record<string, unknown> | undefined;
|
|
216
|
+
relationships?: Record<string, unknown> | undefined;
|
|
217
|
+
links?: Record<string, string> | undefined;
|
|
218
|
+
meta?: Record<string, unknown> | undefined;
|
|
219
|
+
}[] | undefined;
|
|
220
|
+
}, {
|
|
221
|
+
data: {
|
|
222
|
+
type: string;
|
|
223
|
+
id: string;
|
|
224
|
+
attributes: {
|
|
225
|
+
conversationId: string;
|
|
226
|
+
response: string;
|
|
227
|
+
toolCalls?: {
|
|
228
|
+
tool: string;
|
|
229
|
+
result?: unknown;
|
|
230
|
+
}[] | undefined;
|
|
231
|
+
};
|
|
232
|
+
relationships?: Record<string, unknown> | undefined;
|
|
233
|
+
links?: Record<string, string> | undefined;
|
|
234
|
+
meta?: Record<string, unknown> | undefined;
|
|
235
|
+
};
|
|
236
|
+
links?: Record<string, string> | undefined;
|
|
237
|
+
meta?: Record<string, unknown> | undefined;
|
|
238
|
+
included?: {
|
|
239
|
+
type: string;
|
|
240
|
+
id: string;
|
|
241
|
+
attributes?: Record<string, unknown> | undefined;
|
|
242
|
+
relationships?: Record<string, unknown> | undefined;
|
|
243
|
+
links?: Record<string, string> | undefined;
|
|
244
|
+
meta?: Record<string, unknown> | undefined;
|
|
245
|
+
}[] | undefined;
|
|
246
|
+
}>;
|
|
247
|
+
400: z.ZodObject<{
|
|
248
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
249
|
+
id: z.ZodOptional<z.ZodString>;
|
|
250
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
about: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
about?: string | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
about?: string | undefined;
|
|
256
|
+
}>>;
|
|
257
|
+
status: z.ZodOptional<z.ZodString>;
|
|
258
|
+
code: z.ZodOptional<z.ZodString>;
|
|
259
|
+
title: z.ZodOptional<z.ZodString>;
|
|
260
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
261
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
262
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
263
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
pointer?: string | undefined;
|
|
266
|
+
parameter?: string | undefined;
|
|
267
|
+
}, {
|
|
268
|
+
pointer?: string | undefined;
|
|
269
|
+
parameter?: string | undefined;
|
|
270
|
+
}>>;
|
|
271
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
status?: string | undefined;
|
|
274
|
+
code?: string | undefined;
|
|
275
|
+
id?: string | undefined;
|
|
276
|
+
links?: {
|
|
277
|
+
about?: string | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
meta?: Record<string, unknown> | undefined;
|
|
280
|
+
title?: string | undefined;
|
|
281
|
+
detail?: string | undefined;
|
|
282
|
+
source?: {
|
|
283
|
+
pointer?: string | undefined;
|
|
284
|
+
parameter?: string | undefined;
|
|
285
|
+
} | undefined;
|
|
286
|
+
}, {
|
|
287
|
+
status?: string | undefined;
|
|
288
|
+
code?: string | undefined;
|
|
289
|
+
id?: string | undefined;
|
|
290
|
+
links?: {
|
|
291
|
+
about?: string | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
meta?: Record<string, unknown> | undefined;
|
|
294
|
+
title?: string | undefined;
|
|
295
|
+
detail?: string | undefined;
|
|
296
|
+
source?: {
|
|
297
|
+
pointer?: string | undefined;
|
|
298
|
+
parameter?: string | undefined;
|
|
299
|
+
} | undefined;
|
|
300
|
+
}>, "many">;
|
|
301
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
errors: {
|
|
304
|
+
status?: string | undefined;
|
|
305
|
+
code?: string | undefined;
|
|
306
|
+
id?: string | undefined;
|
|
307
|
+
links?: {
|
|
308
|
+
about?: string | undefined;
|
|
309
|
+
} | undefined;
|
|
310
|
+
meta?: Record<string, unknown> | undefined;
|
|
311
|
+
title?: string | undefined;
|
|
312
|
+
detail?: string | undefined;
|
|
313
|
+
source?: {
|
|
314
|
+
pointer?: string | undefined;
|
|
315
|
+
parameter?: string | undefined;
|
|
316
|
+
} | undefined;
|
|
317
|
+
}[];
|
|
318
|
+
meta?: Record<string, unknown> | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
errors: {
|
|
321
|
+
status?: string | undefined;
|
|
322
|
+
code?: string | undefined;
|
|
323
|
+
id?: string | undefined;
|
|
324
|
+
links?: {
|
|
325
|
+
about?: string | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
meta?: Record<string, unknown> | undefined;
|
|
328
|
+
title?: string | undefined;
|
|
329
|
+
detail?: string | undefined;
|
|
330
|
+
source?: {
|
|
331
|
+
pointer?: string | undefined;
|
|
332
|
+
parameter?: string | undefined;
|
|
333
|
+
} | undefined;
|
|
334
|
+
}[];
|
|
335
|
+
meta?: Record<string, unknown> | undefined;
|
|
336
|
+
}>;
|
|
337
|
+
401: z.ZodObject<{
|
|
338
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
339
|
+
id: z.ZodOptional<z.ZodString>;
|
|
340
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
about: z.ZodOptional<z.ZodString>;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
about?: string | undefined;
|
|
344
|
+
}, {
|
|
345
|
+
about?: string | undefined;
|
|
346
|
+
}>>;
|
|
347
|
+
status: z.ZodOptional<z.ZodString>;
|
|
348
|
+
code: z.ZodOptional<z.ZodString>;
|
|
349
|
+
title: z.ZodOptional<z.ZodString>;
|
|
350
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
351
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
352
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
353
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, "strip", z.ZodTypeAny, {
|
|
355
|
+
pointer?: string | undefined;
|
|
356
|
+
parameter?: string | undefined;
|
|
357
|
+
}, {
|
|
358
|
+
pointer?: string | undefined;
|
|
359
|
+
parameter?: string | undefined;
|
|
360
|
+
}>>;
|
|
361
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
status?: string | undefined;
|
|
364
|
+
code?: string | undefined;
|
|
365
|
+
id?: string | undefined;
|
|
366
|
+
links?: {
|
|
367
|
+
about?: string | undefined;
|
|
368
|
+
} | undefined;
|
|
369
|
+
meta?: Record<string, unknown> | undefined;
|
|
370
|
+
title?: string | undefined;
|
|
371
|
+
detail?: string | undefined;
|
|
372
|
+
source?: {
|
|
373
|
+
pointer?: string | undefined;
|
|
374
|
+
parameter?: string | undefined;
|
|
375
|
+
} | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
status?: string | undefined;
|
|
378
|
+
code?: string | undefined;
|
|
379
|
+
id?: string | undefined;
|
|
380
|
+
links?: {
|
|
381
|
+
about?: string | undefined;
|
|
382
|
+
} | undefined;
|
|
383
|
+
meta?: Record<string, unknown> | undefined;
|
|
384
|
+
title?: string | undefined;
|
|
385
|
+
detail?: string | undefined;
|
|
386
|
+
source?: {
|
|
387
|
+
pointer?: string | undefined;
|
|
388
|
+
parameter?: string | undefined;
|
|
389
|
+
} | undefined;
|
|
390
|
+
}>, "many">;
|
|
391
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
errors: {
|
|
394
|
+
status?: string | undefined;
|
|
395
|
+
code?: string | undefined;
|
|
396
|
+
id?: string | undefined;
|
|
397
|
+
links?: {
|
|
398
|
+
about?: string | undefined;
|
|
399
|
+
} | undefined;
|
|
400
|
+
meta?: Record<string, unknown> | undefined;
|
|
401
|
+
title?: string | undefined;
|
|
402
|
+
detail?: string | undefined;
|
|
403
|
+
source?: {
|
|
404
|
+
pointer?: string | undefined;
|
|
405
|
+
parameter?: string | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
}[];
|
|
408
|
+
meta?: Record<string, unknown> | undefined;
|
|
409
|
+
}, {
|
|
410
|
+
errors: {
|
|
411
|
+
status?: string | undefined;
|
|
412
|
+
code?: string | undefined;
|
|
413
|
+
id?: string | undefined;
|
|
414
|
+
links?: {
|
|
415
|
+
about?: string | undefined;
|
|
416
|
+
} | undefined;
|
|
417
|
+
meta?: Record<string, unknown> | undefined;
|
|
418
|
+
title?: string | undefined;
|
|
419
|
+
detail?: string | undefined;
|
|
420
|
+
source?: {
|
|
421
|
+
pointer?: string | undefined;
|
|
422
|
+
parameter?: string | undefined;
|
|
423
|
+
} | undefined;
|
|
424
|
+
}[];
|
|
425
|
+
meta?: Record<string, unknown> | undefined;
|
|
426
|
+
}>;
|
|
427
|
+
500: z.ZodObject<{
|
|
428
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
429
|
+
id: z.ZodOptional<z.ZodString>;
|
|
430
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
431
|
+
about: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, "strip", z.ZodTypeAny, {
|
|
433
|
+
about?: string | undefined;
|
|
434
|
+
}, {
|
|
435
|
+
about?: string | undefined;
|
|
436
|
+
}>>;
|
|
437
|
+
status: z.ZodOptional<z.ZodString>;
|
|
438
|
+
code: z.ZodOptional<z.ZodString>;
|
|
439
|
+
title: z.ZodOptional<z.ZodString>;
|
|
440
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
441
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
442
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
443
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
pointer?: string | undefined;
|
|
446
|
+
parameter?: string | undefined;
|
|
447
|
+
}, {
|
|
448
|
+
pointer?: string | undefined;
|
|
449
|
+
parameter?: string | undefined;
|
|
450
|
+
}>>;
|
|
451
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
452
|
+
}, "strip", z.ZodTypeAny, {
|
|
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
|
+
status?: string | undefined;
|
|
468
|
+
code?: string | undefined;
|
|
469
|
+
id?: string | undefined;
|
|
470
|
+
links?: {
|
|
471
|
+
about?: string | undefined;
|
|
472
|
+
} | undefined;
|
|
473
|
+
meta?: Record<string, unknown> | undefined;
|
|
474
|
+
title?: string | undefined;
|
|
475
|
+
detail?: string | undefined;
|
|
476
|
+
source?: {
|
|
477
|
+
pointer?: string | undefined;
|
|
478
|
+
parameter?: string | undefined;
|
|
479
|
+
} | undefined;
|
|
480
|
+
}>, "many">;
|
|
481
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
482
|
+
}, "strip", z.ZodTypeAny, {
|
|
483
|
+
errors: {
|
|
484
|
+
status?: string | undefined;
|
|
485
|
+
code?: string | undefined;
|
|
486
|
+
id?: string | undefined;
|
|
487
|
+
links?: {
|
|
488
|
+
about?: string | undefined;
|
|
489
|
+
} | undefined;
|
|
490
|
+
meta?: Record<string, unknown> | undefined;
|
|
491
|
+
title?: string | undefined;
|
|
492
|
+
detail?: string | undefined;
|
|
493
|
+
source?: {
|
|
494
|
+
pointer?: string | undefined;
|
|
495
|
+
parameter?: string | undefined;
|
|
496
|
+
} | undefined;
|
|
497
|
+
}[];
|
|
498
|
+
meta?: Record<string, unknown> | undefined;
|
|
499
|
+
}, {
|
|
500
|
+
errors: {
|
|
501
|
+
status?: string | undefined;
|
|
502
|
+
code?: string | undefined;
|
|
503
|
+
id?: string | undefined;
|
|
504
|
+
links?: {
|
|
505
|
+
about?: string | undefined;
|
|
506
|
+
} | undefined;
|
|
507
|
+
meta?: Record<string, unknown> | undefined;
|
|
508
|
+
title?: string | undefined;
|
|
509
|
+
detail?: string | undefined;
|
|
510
|
+
source?: {
|
|
511
|
+
pointer?: string | undefined;
|
|
512
|
+
parameter?: string | undefined;
|
|
513
|
+
} | undefined;
|
|
514
|
+
}[];
|
|
515
|
+
meta?: Record<string, unknown> | undefined;
|
|
516
|
+
}>;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
//# sourceMappingURL=agents.routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/agents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BvB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.agentsRouter = void 0;
|
|
4
|
+
const core_1 = require("@ts-rest/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const agents_schemas_1 = require("../schemas/agents.schemas");
|
|
7
|
+
const common_schemas_1 = require("../schemas/common.schemas");
|
|
8
|
+
const c = (0, core_1.initContract)();
|
|
9
|
+
exports.agentsRouter = c.router({
|
|
10
|
+
// Chat with agronomics agent
|
|
11
|
+
chatWithAgronomics: {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '/agents/agronomics/chat',
|
|
14
|
+
body: zod_1.z.object({ data: agents_schemas_1.chatRequestSchema }),
|
|
15
|
+
responses: {
|
|
16
|
+
200: agents_schemas_1.agentChatResponseSchema,
|
|
17
|
+
400: common_schemas_1.jsonApiErrorResponseSchema,
|
|
18
|
+
401: common_schemas_1.jsonApiErrorResponseSchema,
|
|
19
|
+
500: common_schemas_1.jsonApiErrorResponseSchema,
|
|
20
|
+
},
|
|
21
|
+
summary: 'Chat with the agronomics AI agent',
|
|
22
|
+
description: 'Send a message to the agronomics agent and receive AI-powered farming advice based on your farm data',
|
|
23
|
+
metadata: {
|
|
24
|
+
openapi: {
|
|
25
|
+
parameters: [
|
|
26
|
+
{
|
|
27
|
+
name: 'Content-Type',
|
|
28
|
+
in: 'header',
|
|
29
|
+
required: true,
|
|
30
|
+
schema: { type: 'string', enum: ['application/vnd.api+json'] },
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|