@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.
- package/dist/routes/agents.routes.d.ts +104 -16
- package/dist/routes/agents.routes.d.ts.map +1 -1
- package/dist/routes/agents.routes.js +6 -14
- package/dist/routes/soil-tests.routes.d.ts +688 -0
- package/dist/routes/soil-tests.routes.d.ts.map +1 -1
- package/dist/routes/soil-tests.routes.js +20 -0
- package/dist/routes/team.routes.d.ts +398 -1
- package/dist/routes/team.routes.d.ts.map +1 -1
- package/dist/routes/team.routes.js +27 -1
- package/dist/schemas/agents.schemas.d.ts +8 -0
- package/dist/schemas/agents.schemas.d.ts.map +1 -1
- package/dist/schemas/agents.schemas.js +3 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"soil-tests.routes.d.ts","sourceRoot":"","sources":["../../src/routes/soil-tests.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"soil-tests.routes.d.ts","sourceRoot":"","sources":["../../src/routes/soil-tests.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkH1B,CAAC"}
|
|
@@ -92,4 +92,24 @@ export const soilTestsRouter = c.router({
|
|
|
92
92
|
summary: 'Delete soil test',
|
|
93
93
|
description: 'Delete a soil test record',
|
|
94
94
|
},
|
|
95
|
+
// Upload soil sample file and extract data
|
|
96
|
+
uploadSoilSampleFile: {
|
|
97
|
+
method: 'POST',
|
|
98
|
+
path: '/farms/:farmId/soil-tests/upload-sample',
|
|
99
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
100
|
+
contentType: 'multipart/form-data',
|
|
101
|
+
body: z.object({
|
|
102
|
+
file: z.any(), // File type handled at runtime
|
|
103
|
+
fieldId: z.string().uuid(),
|
|
104
|
+
}),
|
|
105
|
+
responses: {
|
|
106
|
+
201: soilTestResponseSchema,
|
|
107
|
+
400: jsonApiErrorResponseSchema,
|
|
108
|
+
404: jsonApiErrorResponseSchema,
|
|
109
|
+
401: jsonApiErrorResponseSchema,
|
|
110
|
+
422: jsonApiErrorResponseSchema,
|
|
111
|
+
},
|
|
112
|
+
summary: 'Upload soil sample file',
|
|
113
|
+
description: 'Upload a PDF or DOCX soil sample file and automatically extract test results using AI',
|
|
114
|
+
},
|
|
95
115
|
});
|
|
@@ -2213,38 +2213,362 @@ export declare const teamRouter: {
|
|
|
2213
2213
|
}>;
|
|
2214
2214
|
};
|
|
2215
2215
|
};
|
|
2216
|
+
checkInvitationStatus: {
|
|
2217
|
+
query: z.ZodObject<{
|
|
2218
|
+
token: z.ZodString;
|
|
2219
|
+
}, "strip", z.ZodTypeAny, {
|
|
2220
|
+
token: string;
|
|
2221
|
+
}, {
|
|
2222
|
+
token: string;
|
|
2223
|
+
}>;
|
|
2224
|
+
summary: "Check invitation status";
|
|
2225
|
+
description: "Check if invitation is valid and if user exists";
|
|
2226
|
+
method: "GET";
|
|
2227
|
+
path: "/team/invitations/check";
|
|
2228
|
+
responses: {
|
|
2229
|
+
200: z.ZodObject<{} & {
|
|
2230
|
+
meta: z.ZodObject<{
|
|
2231
|
+
email: z.ZodString;
|
|
2232
|
+
name: z.ZodString;
|
|
2233
|
+
userExists: z.ZodBoolean;
|
|
2234
|
+
farmName: z.ZodOptional<z.ZodString>;
|
|
2235
|
+
}, "strip", z.ZodTypeAny, {
|
|
2236
|
+
email: string;
|
|
2237
|
+
name: string;
|
|
2238
|
+
userExists: boolean;
|
|
2239
|
+
farmName?: string | undefined;
|
|
2240
|
+
}, {
|
|
2241
|
+
email: string;
|
|
2242
|
+
name: string;
|
|
2243
|
+
userExists: boolean;
|
|
2244
|
+
farmName?: string | undefined;
|
|
2245
|
+
}>;
|
|
2246
|
+
}, "strip", z.ZodTypeAny, {
|
|
2247
|
+
meta: {
|
|
2248
|
+
email: string;
|
|
2249
|
+
name: string;
|
|
2250
|
+
userExists: boolean;
|
|
2251
|
+
farmName?: string | undefined;
|
|
2252
|
+
};
|
|
2253
|
+
}, {
|
|
2254
|
+
meta: {
|
|
2255
|
+
email: string;
|
|
2256
|
+
name: string;
|
|
2257
|
+
userExists: boolean;
|
|
2258
|
+
farmName?: string | undefined;
|
|
2259
|
+
};
|
|
2260
|
+
}>;
|
|
2261
|
+
400: z.ZodObject<{
|
|
2262
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
2263
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2264
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
2265
|
+
about: z.ZodOptional<z.ZodString>;
|
|
2266
|
+
}, "strip", z.ZodTypeAny, {
|
|
2267
|
+
about?: string | undefined;
|
|
2268
|
+
}, {
|
|
2269
|
+
about?: string | undefined;
|
|
2270
|
+
}>>;
|
|
2271
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2272
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2273
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2274
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2275
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
2276
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
2277
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
2278
|
+
}, "strip", z.ZodTypeAny, {
|
|
2279
|
+
pointer?: string | undefined;
|
|
2280
|
+
parameter?: string | undefined;
|
|
2281
|
+
}, {
|
|
2282
|
+
pointer?: string | undefined;
|
|
2283
|
+
parameter?: string | undefined;
|
|
2284
|
+
}>>;
|
|
2285
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2286
|
+
}, "strip", z.ZodTypeAny, {
|
|
2287
|
+
status?: string | undefined;
|
|
2288
|
+
code?: string | undefined;
|
|
2289
|
+
id?: string | undefined;
|
|
2290
|
+
links?: {
|
|
2291
|
+
about?: string | undefined;
|
|
2292
|
+
} | undefined;
|
|
2293
|
+
meta?: Record<string, unknown> | undefined;
|
|
2294
|
+
title?: string | undefined;
|
|
2295
|
+
detail?: string | undefined;
|
|
2296
|
+
source?: {
|
|
2297
|
+
pointer?: string | undefined;
|
|
2298
|
+
parameter?: string | undefined;
|
|
2299
|
+
} | undefined;
|
|
2300
|
+
}, {
|
|
2301
|
+
status?: string | undefined;
|
|
2302
|
+
code?: string | undefined;
|
|
2303
|
+
id?: string | undefined;
|
|
2304
|
+
links?: {
|
|
2305
|
+
about?: string | undefined;
|
|
2306
|
+
} | undefined;
|
|
2307
|
+
meta?: Record<string, unknown> | undefined;
|
|
2308
|
+
title?: string | undefined;
|
|
2309
|
+
detail?: string | undefined;
|
|
2310
|
+
source?: {
|
|
2311
|
+
pointer?: string | undefined;
|
|
2312
|
+
parameter?: string | undefined;
|
|
2313
|
+
} | undefined;
|
|
2314
|
+
}>, "many">;
|
|
2315
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2316
|
+
}, "strip", z.ZodTypeAny, {
|
|
2317
|
+
errors: {
|
|
2318
|
+
status?: string | undefined;
|
|
2319
|
+
code?: string | undefined;
|
|
2320
|
+
id?: string | undefined;
|
|
2321
|
+
links?: {
|
|
2322
|
+
about?: string | undefined;
|
|
2323
|
+
} | undefined;
|
|
2324
|
+
meta?: Record<string, unknown> | undefined;
|
|
2325
|
+
title?: string | undefined;
|
|
2326
|
+
detail?: string | undefined;
|
|
2327
|
+
source?: {
|
|
2328
|
+
pointer?: string | undefined;
|
|
2329
|
+
parameter?: string | undefined;
|
|
2330
|
+
} | undefined;
|
|
2331
|
+
}[];
|
|
2332
|
+
meta?: Record<string, unknown> | undefined;
|
|
2333
|
+
}, {
|
|
2334
|
+
errors: {
|
|
2335
|
+
status?: string | undefined;
|
|
2336
|
+
code?: string | undefined;
|
|
2337
|
+
id?: string | undefined;
|
|
2338
|
+
links?: {
|
|
2339
|
+
about?: string | undefined;
|
|
2340
|
+
} | undefined;
|
|
2341
|
+
meta?: Record<string, unknown> | undefined;
|
|
2342
|
+
title?: string | undefined;
|
|
2343
|
+
detail?: string | undefined;
|
|
2344
|
+
source?: {
|
|
2345
|
+
pointer?: string | undefined;
|
|
2346
|
+
parameter?: string | undefined;
|
|
2347
|
+
} | undefined;
|
|
2348
|
+
}[];
|
|
2349
|
+
meta?: Record<string, unknown> | undefined;
|
|
2350
|
+
}>;
|
|
2351
|
+
401: z.ZodObject<{
|
|
2352
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
2353
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2354
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
2355
|
+
about: z.ZodOptional<z.ZodString>;
|
|
2356
|
+
}, "strip", z.ZodTypeAny, {
|
|
2357
|
+
about?: string | undefined;
|
|
2358
|
+
}, {
|
|
2359
|
+
about?: string | undefined;
|
|
2360
|
+
}>>;
|
|
2361
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2362
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2363
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2364
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2365
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
2366
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
2367
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
2368
|
+
}, "strip", z.ZodTypeAny, {
|
|
2369
|
+
pointer?: string | undefined;
|
|
2370
|
+
parameter?: string | undefined;
|
|
2371
|
+
}, {
|
|
2372
|
+
pointer?: string | undefined;
|
|
2373
|
+
parameter?: string | undefined;
|
|
2374
|
+
}>>;
|
|
2375
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2376
|
+
}, "strip", z.ZodTypeAny, {
|
|
2377
|
+
status?: string | undefined;
|
|
2378
|
+
code?: string | undefined;
|
|
2379
|
+
id?: string | undefined;
|
|
2380
|
+
links?: {
|
|
2381
|
+
about?: string | undefined;
|
|
2382
|
+
} | undefined;
|
|
2383
|
+
meta?: Record<string, unknown> | undefined;
|
|
2384
|
+
title?: string | undefined;
|
|
2385
|
+
detail?: string | undefined;
|
|
2386
|
+
source?: {
|
|
2387
|
+
pointer?: string | undefined;
|
|
2388
|
+
parameter?: string | undefined;
|
|
2389
|
+
} | undefined;
|
|
2390
|
+
}, {
|
|
2391
|
+
status?: string | undefined;
|
|
2392
|
+
code?: string | undefined;
|
|
2393
|
+
id?: string | undefined;
|
|
2394
|
+
links?: {
|
|
2395
|
+
about?: string | undefined;
|
|
2396
|
+
} | undefined;
|
|
2397
|
+
meta?: Record<string, unknown> | undefined;
|
|
2398
|
+
title?: string | undefined;
|
|
2399
|
+
detail?: string | undefined;
|
|
2400
|
+
source?: {
|
|
2401
|
+
pointer?: string | undefined;
|
|
2402
|
+
parameter?: string | undefined;
|
|
2403
|
+
} | undefined;
|
|
2404
|
+
}>, "many">;
|
|
2405
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2406
|
+
}, "strip", z.ZodTypeAny, {
|
|
2407
|
+
errors: {
|
|
2408
|
+
status?: string | undefined;
|
|
2409
|
+
code?: string | undefined;
|
|
2410
|
+
id?: string | undefined;
|
|
2411
|
+
links?: {
|
|
2412
|
+
about?: string | undefined;
|
|
2413
|
+
} | undefined;
|
|
2414
|
+
meta?: Record<string, unknown> | undefined;
|
|
2415
|
+
title?: string | undefined;
|
|
2416
|
+
detail?: string | undefined;
|
|
2417
|
+
source?: {
|
|
2418
|
+
pointer?: string | undefined;
|
|
2419
|
+
parameter?: string | undefined;
|
|
2420
|
+
} | undefined;
|
|
2421
|
+
}[];
|
|
2422
|
+
meta?: Record<string, unknown> | undefined;
|
|
2423
|
+
}, {
|
|
2424
|
+
errors: {
|
|
2425
|
+
status?: string | undefined;
|
|
2426
|
+
code?: string | undefined;
|
|
2427
|
+
id?: string | undefined;
|
|
2428
|
+
links?: {
|
|
2429
|
+
about?: string | undefined;
|
|
2430
|
+
} | undefined;
|
|
2431
|
+
meta?: Record<string, unknown> | undefined;
|
|
2432
|
+
title?: string | undefined;
|
|
2433
|
+
detail?: string | undefined;
|
|
2434
|
+
source?: {
|
|
2435
|
+
pointer?: string | undefined;
|
|
2436
|
+
parameter?: string | undefined;
|
|
2437
|
+
} | undefined;
|
|
2438
|
+
}[];
|
|
2439
|
+
meta?: Record<string, unknown> | undefined;
|
|
2440
|
+
}>;
|
|
2441
|
+
404: z.ZodObject<{
|
|
2442
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
2443
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2444
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
2445
|
+
about: z.ZodOptional<z.ZodString>;
|
|
2446
|
+
}, "strip", z.ZodTypeAny, {
|
|
2447
|
+
about?: string | undefined;
|
|
2448
|
+
}, {
|
|
2449
|
+
about?: string | undefined;
|
|
2450
|
+
}>>;
|
|
2451
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2452
|
+
code: z.ZodOptional<z.ZodString>;
|
|
2453
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2454
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2455
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
2456
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
2457
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
2458
|
+
}, "strip", z.ZodTypeAny, {
|
|
2459
|
+
pointer?: string | undefined;
|
|
2460
|
+
parameter?: string | undefined;
|
|
2461
|
+
}, {
|
|
2462
|
+
pointer?: string | undefined;
|
|
2463
|
+
parameter?: string | undefined;
|
|
2464
|
+
}>>;
|
|
2465
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2466
|
+
}, "strip", z.ZodTypeAny, {
|
|
2467
|
+
status?: string | undefined;
|
|
2468
|
+
code?: string | undefined;
|
|
2469
|
+
id?: string | undefined;
|
|
2470
|
+
links?: {
|
|
2471
|
+
about?: string | undefined;
|
|
2472
|
+
} | undefined;
|
|
2473
|
+
meta?: Record<string, unknown> | undefined;
|
|
2474
|
+
title?: string | undefined;
|
|
2475
|
+
detail?: string | undefined;
|
|
2476
|
+
source?: {
|
|
2477
|
+
pointer?: string | undefined;
|
|
2478
|
+
parameter?: string | undefined;
|
|
2479
|
+
} | undefined;
|
|
2480
|
+
}, {
|
|
2481
|
+
status?: string | undefined;
|
|
2482
|
+
code?: string | undefined;
|
|
2483
|
+
id?: string | undefined;
|
|
2484
|
+
links?: {
|
|
2485
|
+
about?: string | undefined;
|
|
2486
|
+
} | undefined;
|
|
2487
|
+
meta?: Record<string, unknown> | undefined;
|
|
2488
|
+
title?: string | undefined;
|
|
2489
|
+
detail?: string | undefined;
|
|
2490
|
+
source?: {
|
|
2491
|
+
pointer?: string | undefined;
|
|
2492
|
+
parameter?: string | undefined;
|
|
2493
|
+
} | undefined;
|
|
2494
|
+
}>, "many">;
|
|
2495
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2496
|
+
}, "strip", z.ZodTypeAny, {
|
|
2497
|
+
errors: {
|
|
2498
|
+
status?: string | undefined;
|
|
2499
|
+
code?: string | undefined;
|
|
2500
|
+
id?: string | undefined;
|
|
2501
|
+
links?: {
|
|
2502
|
+
about?: string | undefined;
|
|
2503
|
+
} | undefined;
|
|
2504
|
+
meta?: Record<string, unknown> | undefined;
|
|
2505
|
+
title?: string | undefined;
|
|
2506
|
+
detail?: string | undefined;
|
|
2507
|
+
source?: {
|
|
2508
|
+
pointer?: string | undefined;
|
|
2509
|
+
parameter?: string | undefined;
|
|
2510
|
+
} | undefined;
|
|
2511
|
+
}[];
|
|
2512
|
+
meta?: Record<string, unknown> | undefined;
|
|
2513
|
+
}, {
|
|
2514
|
+
errors: {
|
|
2515
|
+
status?: string | undefined;
|
|
2516
|
+
code?: string | undefined;
|
|
2517
|
+
id?: string | undefined;
|
|
2518
|
+
links?: {
|
|
2519
|
+
about?: string | undefined;
|
|
2520
|
+
} | undefined;
|
|
2521
|
+
meta?: Record<string, unknown> | undefined;
|
|
2522
|
+
title?: string | undefined;
|
|
2523
|
+
detail?: string | undefined;
|
|
2524
|
+
source?: {
|
|
2525
|
+
pointer?: string | undefined;
|
|
2526
|
+
parameter?: string | undefined;
|
|
2527
|
+
} | undefined;
|
|
2528
|
+
}[];
|
|
2529
|
+
meta?: Record<string, unknown> | undefined;
|
|
2530
|
+
}>;
|
|
2531
|
+
};
|
|
2532
|
+
};
|
|
2216
2533
|
acceptInvitation: {
|
|
2217
2534
|
summary: "Accept team invitation";
|
|
2218
|
-
description: "Accept a team invitation by token
|
|
2535
|
+
description: "Accept a team invitation by token. If user exists, password is required. If user does not exist, password will be used to create account.";
|
|
2219
2536
|
method: "POST";
|
|
2220
2537
|
body: z.ZodObject<{
|
|
2221
2538
|
data: z.ZodObject<{
|
|
2222
2539
|
attributes: z.ZodObject<{
|
|
2223
2540
|
token: z.ZodString;
|
|
2541
|
+
password: z.ZodOptional<z.ZodString>;
|
|
2224
2542
|
}, "strip", z.ZodTypeAny, {
|
|
2225
2543
|
token: string;
|
|
2544
|
+
password?: string | undefined;
|
|
2226
2545
|
}, {
|
|
2227
2546
|
token: string;
|
|
2547
|
+
password?: string | undefined;
|
|
2228
2548
|
}>;
|
|
2229
2549
|
}, "strip", z.ZodTypeAny, {
|
|
2230
2550
|
attributes: {
|
|
2231
2551
|
token: string;
|
|
2552
|
+
password?: string | undefined;
|
|
2232
2553
|
};
|
|
2233
2554
|
}, {
|
|
2234
2555
|
attributes: {
|
|
2235
2556
|
token: string;
|
|
2557
|
+
password?: string | undefined;
|
|
2236
2558
|
};
|
|
2237
2559
|
}>;
|
|
2238
2560
|
}, "strip", z.ZodTypeAny, {
|
|
2239
2561
|
data: {
|
|
2240
2562
|
attributes: {
|
|
2241
2563
|
token: string;
|
|
2564
|
+
password?: string | undefined;
|
|
2242
2565
|
};
|
|
2243
2566
|
};
|
|
2244
2567
|
}, {
|
|
2245
2568
|
data: {
|
|
2246
2569
|
attributes: {
|
|
2247
2570
|
token: string;
|
|
2571
|
+
password?: string | undefined;
|
|
2248
2572
|
};
|
|
2249
2573
|
};
|
|
2250
2574
|
}>;
|
|
@@ -2264,18 +2588,91 @@ export declare const teamRouter: {
|
|
|
2264
2588
|
farmId: string;
|
|
2265
2589
|
memberId: string;
|
|
2266
2590
|
}>;
|
|
2591
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2592
|
+
type: z.ZodLiteral<string>;
|
|
2593
|
+
id: z.ZodString;
|
|
2594
|
+
attributes: z.ZodObject<{
|
|
2595
|
+
accessToken: z.ZodString;
|
|
2596
|
+
refreshToken: z.ZodString;
|
|
2597
|
+
expiresIn: z.ZodNumber;
|
|
2598
|
+
tokenType: z.ZodDefault<z.ZodLiteral<"Bearer">>;
|
|
2599
|
+
}, "strip", z.ZodTypeAny, {
|
|
2600
|
+
refreshToken: string;
|
|
2601
|
+
accessToken: string;
|
|
2602
|
+
expiresIn: number;
|
|
2603
|
+
tokenType: "Bearer";
|
|
2604
|
+
}, {
|
|
2605
|
+
refreshToken: string;
|
|
2606
|
+
accessToken: string;
|
|
2607
|
+
expiresIn: number;
|
|
2608
|
+
tokenType?: "Bearer" | undefined;
|
|
2609
|
+
}>;
|
|
2610
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2611
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2612
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2613
|
+
}, "strip", z.ZodTypeAny, {
|
|
2614
|
+
type: string;
|
|
2615
|
+
id: string;
|
|
2616
|
+
attributes: {
|
|
2617
|
+
refreshToken: string;
|
|
2618
|
+
accessToken: string;
|
|
2619
|
+
expiresIn: number;
|
|
2620
|
+
tokenType: "Bearer";
|
|
2621
|
+
};
|
|
2622
|
+
relationships?: Record<string, unknown> | undefined;
|
|
2623
|
+
links?: Record<string, string> | undefined;
|
|
2624
|
+
meta?: Record<string, unknown> | undefined;
|
|
2625
|
+
}, {
|
|
2626
|
+
type: string;
|
|
2627
|
+
id: string;
|
|
2628
|
+
attributes: {
|
|
2629
|
+
refreshToken: string;
|
|
2630
|
+
accessToken: string;
|
|
2631
|
+
expiresIn: number;
|
|
2632
|
+
tokenType?: "Bearer" | undefined;
|
|
2633
|
+
};
|
|
2634
|
+
relationships?: Record<string, unknown> | undefined;
|
|
2635
|
+
links?: Record<string, string> | undefined;
|
|
2636
|
+
meta?: Record<string, unknown> | undefined;
|
|
2637
|
+
}>, "many">>;
|
|
2267
2638
|
}, "strip", z.ZodTypeAny, {
|
|
2268
2639
|
meta: {
|
|
2269
2640
|
message: string;
|
|
2270
2641
|
farmId: string;
|
|
2271
2642
|
memberId: string;
|
|
2272
2643
|
};
|
|
2644
|
+
data?: {
|
|
2645
|
+
type: string;
|
|
2646
|
+
id: string;
|
|
2647
|
+
attributes: {
|
|
2648
|
+
refreshToken: string;
|
|
2649
|
+
accessToken: string;
|
|
2650
|
+
expiresIn: number;
|
|
2651
|
+
tokenType: "Bearer";
|
|
2652
|
+
};
|
|
2653
|
+
relationships?: Record<string, unknown> | undefined;
|
|
2654
|
+
links?: Record<string, string> | undefined;
|
|
2655
|
+
meta?: Record<string, unknown> | undefined;
|
|
2656
|
+
}[] | undefined;
|
|
2273
2657
|
}, {
|
|
2274
2658
|
meta: {
|
|
2275
2659
|
message: string;
|
|
2276
2660
|
farmId: string;
|
|
2277
2661
|
memberId: string;
|
|
2278
2662
|
};
|
|
2663
|
+
data?: {
|
|
2664
|
+
type: string;
|
|
2665
|
+
id: string;
|
|
2666
|
+
attributes: {
|
|
2667
|
+
refreshToken: string;
|
|
2668
|
+
accessToken: string;
|
|
2669
|
+
expiresIn: number;
|
|
2670
|
+
tokenType?: "Bearer" | undefined;
|
|
2671
|
+
};
|
|
2672
|
+
relationships?: Record<string, unknown> | undefined;
|
|
2673
|
+
links?: Record<string, string> | undefined;
|
|
2674
|
+
meta?: Record<string, unknown> | undefined;
|
|
2675
|
+
}[] | undefined;
|
|
2279
2676
|
}>;
|
|
2280
2677
|
400: z.ZodObject<{
|
|
2281
2678
|
errors: z.ZodArray<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.routes.d.ts","sourceRoot":"","sources":["../../src/routes/team.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"team.routes.d.ts","sourceRoot":"","sources":["../../src/routes/team.routes.ts"],"names":[],"mappings":"AACA,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+KrB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { initContract } from '@ts-rest/core';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { createTeamMemberSchema, updateTeamMemberSchema, teamMemberResponseSchema, teamMemberListResponseSchema, teamMemberRoleSchema, } from '../schemas/team.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiIncludeQuerySchema, jsonApiFilterQuerySchema } from '../schemas/common.schemas';
|
|
5
|
+
import { authSessionResourceSchema } from '../schemas/auth.schemas';
|
|
5
6
|
const c = initContract();
|
|
6
7
|
export const teamRouter = c.router({
|
|
7
8
|
// List team members for a farm
|
|
@@ -92,6 +93,29 @@ export const teamRouter = c.router({
|
|
|
92
93
|
summary: 'Delete team member',
|
|
93
94
|
description: 'Remove a team member from the farm',
|
|
94
95
|
},
|
|
96
|
+
// Check invitation status
|
|
97
|
+
checkInvitationStatus: {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
path: '/team/invitations/check',
|
|
100
|
+
query: z.object({
|
|
101
|
+
token: z.string().min(1),
|
|
102
|
+
}),
|
|
103
|
+
responses: {
|
|
104
|
+
200: jsonApiSuccessResponseSchema.merge(z.object({
|
|
105
|
+
meta: z.object({
|
|
106
|
+
email: z.string().email(),
|
|
107
|
+
name: z.string(),
|
|
108
|
+
userExists: z.boolean(),
|
|
109
|
+
farmName: z.string().optional(),
|
|
110
|
+
}),
|
|
111
|
+
})),
|
|
112
|
+
400: jsonApiErrorResponseSchema,
|
|
113
|
+
401: jsonApiErrorResponseSchema,
|
|
114
|
+
404: jsonApiErrorResponseSchema,
|
|
115
|
+
},
|
|
116
|
+
summary: 'Check invitation status',
|
|
117
|
+
description: 'Check if invitation is valid and if user exists',
|
|
118
|
+
},
|
|
95
119
|
// Accept team invitation
|
|
96
120
|
acceptInvitation: {
|
|
97
121
|
method: 'POST',
|
|
@@ -100,6 +124,7 @@ export const teamRouter = c.router({
|
|
|
100
124
|
data: z.object({
|
|
101
125
|
attributes: z.object({
|
|
102
126
|
token: z.string().min(1),
|
|
127
|
+
password: z.string().min(1).optional(),
|
|
103
128
|
}),
|
|
104
129
|
}),
|
|
105
130
|
}),
|
|
@@ -110,13 +135,14 @@ export const teamRouter = c.router({
|
|
|
110
135
|
farmId: z.string().uuid(),
|
|
111
136
|
memberId: z.string().uuid(),
|
|
112
137
|
}),
|
|
138
|
+
data: z.array(authSessionResourceSchema).optional(),
|
|
113
139
|
})),
|
|
114
140
|
400: jsonApiErrorResponseSchema,
|
|
115
141
|
401: jsonApiErrorResponseSchema,
|
|
116
142
|
404: jsonApiErrorResponseSchema,
|
|
117
143
|
},
|
|
118
144
|
summary: 'Accept team invitation',
|
|
119
|
-
description: 'Accept a team invitation by token
|
|
145
|
+
description: 'Accept a team invitation by token. If user exists, password is required. If user does not exist, password will be used to create account.',
|
|
120
146
|
},
|
|
121
147
|
// Resend team invitation
|
|
122
148
|
resendInvitation: {
|
|
@@ -26,6 +26,7 @@ export declare const toolCallResultSchema: z.ZodObject<{
|
|
|
26
26
|
export declare const chatRequestAttributesSchema: z.ZodObject<{
|
|
27
27
|
message: z.ZodString;
|
|
28
28
|
farmId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
fieldId: z.ZodOptional<z.ZodString>;
|
|
29
30
|
conversationId: z.ZodOptional<z.ZodString>;
|
|
30
31
|
conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
32
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
@@ -40,6 +41,7 @@ export declare const chatRequestAttributesSchema: z.ZodObject<{
|
|
|
40
41
|
}, "strip", z.ZodTypeAny, {
|
|
41
42
|
message: string;
|
|
42
43
|
farmId?: string | undefined;
|
|
44
|
+
fieldId?: string | undefined;
|
|
43
45
|
conversationId?: string | undefined;
|
|
44
46
|
conversationHistory?: {
|
|
45
47
|
role: "user" | "assistant";
|
|
@@ -48,6 +50,7 @@ export declare const chatRequestAttributesSchema: z.ZodObject<{
|
|
|
48
50
|
}, {
|
|
49
51
|
message: string;
|
|
50
52
|
farmId?: string | undefined;
|
|
53
|
+
fieldId?: string | undefined;
|
|
51
54
|
conversationId?: string | undefined;
|
|
52
55
|
conversationHistory?: {
|
|
53
56
|
role: "user" | "assistant";
|
|
@@ -59,6 +62,7 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
59
62
|
attributes: z.ZodObject<{
|
|
60
63
|
message: z.ZodString;
|
|
61
64
|
farmId: z.ZodOptional<z.ZodString>;
|
|
65
|
+
fieldId: z.ZodOptional<z.ZodString>;
|
|
62
66
|
conversationId: z.ZodOptional<z.ZodString>;
|
|
63
67
|
conversationHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
64
68
|
role: z.ZodEnum<["user", "assistant"]>;
|
|
@@ -73,6 +77,7 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
73
77
|
}, "strip", z.ZodTypeAny, {
|
|
74
78
|
message: string;
|
|
75
79
|
farmId?: string | undefined;
|
|
80
|
+
fieldId?: string | undefined;
|
|
76
81
|
conversationId?: string | undefined;
|
|
77
82
|
conversationHistory?: {
|
|
78
83
|
role: "user" | "assistant";
|
|
@@ -81,6 +86,7 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
81
86
|
}, {
|
|
82
87
|
message: string;
|
|
83
88
|
farmId?: string | undefined;
|
|
89
|
+
fieldId?: string | undefined;
|
|
84
90
|
conversationId?: string | undefined;
|
|
85
91
|
conversationHistory?: {
|
|
86
92
|
role: "user" | "assistant";
|
|
@@ -92,6 +98,7 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
92
98
|
attributes: {
|
|
93
99
|
message: string;
|
|
94
100
|
farmId?: string | undefined;
|
|
101
|
+
fieldId?: string | undefined;
|
|
95
102
|
conversationId?: string | undefined;
|
|
96
103
|
conversationHistory?: {
|
|
97
104
|
role: "user" | "assistant";
|
|
@@ -103,6 +110,7 @@ export declare const chatRequestSchema: z.ZodObject<{
|
|
|
103
110
|
attributes: {
|
|
104
111
|
message: string;
|
|
105
112
|
farmId?: string | undefined;
|
|
113
|
+
fieldId?: string | undefined;
|
|
106
114
|
conversationId?: string | undefined;
|
|
107
115
|
conversationHistory?: {
|
|
108
116
|
role: "user" | "assistant";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/agents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB,kCAAgC,CAAC;AAG/D,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAGH,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"agents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/agents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB,kCAAgC,CAAC;AAG/D,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;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AAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -19,8 +19,11 @@ export const toolCallResultSchema = z.object({
|
|
|
19
19
|
export const chatRequestAttributesSchema = z.object({
|
|
20
20
|
message: z.string().min(1).max(5000),
|
|
21
21
|
farmId: z.string().uuid().optional(),
|
|
22
|
+
fieldId: z.string().uuid().optional(), // Optional field ID for context
|
|
22
23
|
conversationId: z.string().uuid().optional(), // Continue existing conversation
|
|
23
24
|
conversationHistory: z.array(conversationMessageSchema).optional(),
|
|
25
|
+
// File upload support (for soil tests, documents, etc.)
|
|
26
|
+
// Note: File is handled separately in multipart/form-data
|
|
24
27
|
});
|
|
25
28
|
// Chat request input (JSON:API format)
|
|
26
29
|
export const chatRequestSchema = z.object({
|