@deepintel-ltd/farmpro-contracts 1.5.10 → 1.5.12

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.
@@ -1,28 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  export declare const agentsRouter: {
3
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
4
  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";
5
+ description: "Send a message to the agronomics agent and receive AI-powered farming advice. Supports file uploads for soil tests and documents. The agent can create soil tests and tasks based on your requests.";
19
6
  method: "POST";
20
- body: z.ZodObject<{
7
+ contentType: "multipart/form-data";
8
+ body: z.ZodUnion<[z.ZodObject<{
21
9
  data: z.ZodObject<{
22
10
  type: z.ZodLiteral<"agent-chat-requests">;
23
11
  attributes: z.ZodObject<{
24
12
  message: z.ZodString;
25
13
  farmId: z.ZodOptional<z.ZodString>;
14
+ fieldId: z.ZodOptional<z.ZodString>;
26
15
  conversationId: z.ZodOptional<z.ZodString>;
27
16
  conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
17
  role: z.ZodEnum<["user", "assistant"]>;
@@ -37,6 +26,7 @@ export declare const agentsRouter: {
37
26
  }, "strip", z.ZodTypeAny, {
38
27
  message: string;
39
28
  farmId?: string | undefined;
29
+ fieldId?: string | undefined;
40
30
  conversationId?: string | undefined;
41
31
  conversationHistory?: {
42
32
  role: "user" | "assistant";
@@ -45,6 +35,7 @@ export declare const agentsRouter: {
45
35
  }, {
46
36
  message: string;
47
37
  farmId?: string | undefined;
38
+ fieldId?: string | undefined;
48
39
  conversationId?: string | undefined;
49
40
  conversationHistory?: {
50
41
  role: "user" | "assistant";
@@ -56,6 +47,7 @@ export declare const agentsRouter: {
56
47
  attributes: {
57
48
  message: string;
58
49
  farmId?: string | undefined;
50
+ fieldId?: string | undefined;
59
51
  conversationId?: string | undefined;
60
52
  conversationHistory?: {
61
53
  role: "user" | "assistant";
@@ -67,6 +59,7 @@ export declare const agentsRouter: {
67
59
  attributes: {
68
60
  message: string;
69
61
  farmId?: string | undefined;
62
+ fieldId?: string | undefined;
70
63
  conversationId?: string | undefined;
71
64
  conversationHistory?: {
72
65
  role: "user" | "assistant";
@@ -80,6 +73,7 @@ export declare const agentsRouter: {
80
73
  attributes: {
81
74
  message: string;
82
75
  farmId?: string | undefined;
76
+ fieldId?: string | undefined;
83
77
  conversationId?: string | undefined;
84
78
  conversationHistory?: {
85
79
  role: "user" | "assistant";
@@ -93,6 +87,7 @@ export declare const agentsRouter: {
93
87
  attributes: {
94
88
  message: string;
95
89
  farmId?: string | undefined;
90
+ fieldId?: string | undefined;
96
91
  conversationId?: string | undefined;
97
92
  conversationHistory?: {
98
93
  role: "user" | "assistant";
@@ -100,7 +95,100 @@ export declare const agentsRouter: {
100
95
  }[] | undefined;
101
96
  };
102
97
  };
103
- }>;
98
+ }>, z.ZodObject<{
99
+ data: z.ZodObject<{
100
+ type: z.ZodLiteral<"agent-chat-requests">;
101
+ attributes: z.ZodObject<{
102
+ message: z.ZodString;
103
+ farmId: z.ZodOptional<z.ZodString>;
104
+ fieldId: z.ZodOptional<z.ZodString>;
105
+ conversationId: z.ZodOptional<z.ZodString>;
106
+ conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
+ role: z.ZodEnum<["user", "assistant"]>;
108
+ content: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ role: "user" | "assistant";
111
+ content: string;
112
+ }, {
113
+ role: "user" | "assistant";
114
+ content: string;
115
+ }>, "many">>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ message: string;
118
+ farmId?: string | undefined;
119
+ fieldId?: string | undefined;
120
+ conversationId?: string | undefined;
121
+ conversationHistory?: {
122
+ role: "user" | "assistant";
123
+ content: string;
124
+ }[] | undefined;
125
+ }, {
126
+ message: string;
127
+ farmId?: string | undefined;
128
+ fieldId?: string | undefined;
129
+ conversationId?: string | undefined;
130
+ conversationHistory?: {
131
+ role: "user" | "assistant";
132
+ content: string;
133
+ }[] | undefined;
134
+ }>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ type: "agent-chat-requests";
137
+ attributes: {
138
+ message: string;
139
+ farmId?: string | undefined;
140
+ fieldId?: string | undefined;
141
+ conversationId?: string | undefined;
142
+ conversationHistory?: {
143
+ role: "user" | "assistant";
144
+ content: string;
145
+ }[] | undefined;
146
+ };
147
+ }, {
148
+ type: "agent-chat-requests";
149
+ attributes: {
150
+ message: string;
151
+ farmId?: string | undefined;
152
+ fieldId?: string | undefined;
153
+ conversationId?: string | undefined;
154
+ conversationHistory?: {
155
+ role: "user" | "assistant";
156
+ content: string;
157
+ }[] | undefined;
158
+ };
159
+ }>;
160
+ file: z.ZodOptional<z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ data: {
163
+ type: "agent-chat-requests";
164
+ attributes: {
165
+ message: string;
166
+ farmId?: string | undefined;
167
+ fieldId?: string | undefined;
168
+ conversationId?: string | undefined;
169
+ conversationHistory?: {
170
+ role: "user" | "assistant";
171
+ content: string;
172
+ }[] | undefined;
173
+ };
174
+ };
175
+ file?: import("buffer").File | undefined;
176
+ }, {
177
+ data: {
178
+ type: "agent-chat-requests";
179
+ attributes: {
180
+ message: string;
181
+ farmId?: string | undefined;
182
+ fieldId?: string | undefined;
183
+ conversationId?: string | undefined;
184
+ conversationHistory?: {
185
+ role: "user" | "assistant";
186
+ content: string;
187
+ }[] | undefined;
188
+ };
189
+ };
190
+ file?: import("buffer").File | undefined;
191
+ }>]>;
104
192
  path: "/agents/agronomics/chat";
105
193
  responses: {
106
194
  200: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"agents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/agents.routes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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DvB,CAAC"}
@@ -8,7 +8,11 @@ export const agentsRouter = c.router({
8
8
  chatWithAgronomics: {
9
9
  method: 'POST',
10
10
  path: '/agents/agronomics/chat',
11
- body: z.object({ data: chatRequestSchema }),
11
+ contentType: 'multipart/form-data', // Support file uploads
12
+ body: z.union([
13
+ z.object({ data: chatRequestSchema }), // JSON body
14
+ z.object({ data: chatRequestSchema, file: z.instanceof(File).optional() }), // Multipart with optional file
15
+ ]),
12
16
  responses: {
13
17
  200: agentChatResponseSchema,
14
18
  400: jsonApiErrorResponseSchema,
@@ -16,19 +20,7 @@ export const agentsRouter = c.router({
16
20
  500: jsonApiErrorResponseSchema,
17
21
  },
18
22
  summary: 'Chat with the agronomics AI agent',
19
- description: 'Send a message to the agronomics agent and receive AI-powered farming advice based on your farm data',
20
- metadata: {
21
- openapi: {
22
- parameters: [
23
- {
24
- name: 'Content-Type',
25
- in: 'header',
26
- required: true,
27
- schema: { type: 'string', enum: ['application/vnd.api+json'] },
28
- },
29
- ],
30
- },
31
- },
23
+ description: 'Send a message to the agronomics agent and receive AI-powered farming advice. Supports file uploads for soil tests and documents. The agent can create soil tests and tasks based on your requests.',
32
24
  },
33
25
  // Get conversation history
34
26
  getConversationHistory: {