@deepintel-ltd/farmpro-contracts 1.2.1 → 1.3.1
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/agents.routes.d.ts +483 -0
- package/dist/routes/agents.routes.d.ts.map +1 -1
- package/dist/routes/agents.routes.js +20 -0
- package/dist/routes/field-monitoring.routes.d.ts +20 -0
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.js +2 -0
- package/dist/routes/field-observations.routes.d.ts +3519 -0
- package/dist/routes/field-observations.routes.d.ts.map +1 -0
- package/dist/routes/field-observations.routes.js +116 -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/schemas/agents.schemas.d.ts +374 -0
- package/dist/schemas/agents.schemas.d.ts.map +1 -1
- package/dist/schemas/agents.schemas.js +21 -1
- package/dist/schemas/field-observations.schemas.d.ts +2760 -0
- package/dist/schemas/field-observations.schemas.d.ts.map +1 -0
- package/dist/schemas/field-observations.schemas.js +182 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-observations.routes.d.ts","sourceRoot":"","sources":["../../src/routes/field-observations.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,uBAAuB;;;;;;mBAMV,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAkBJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F5B,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fieldObservationsRouter = void 0;
|
|
4
|
+
const core_1 = require("@ts-rest/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const field_observations_schemas_1 = require("../schemas/field-observations.schemas");
|
|
7
|
+
const c = (0, core_1.initContract)();
|
|
8
|
+
exports.fieldObservationsRouter = c.router({
|
|
9
|
+
// Upload new observation photo (farm-level)
|
|
10
|
+
createFarmObservation: {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
path: '/farms/:farmId/observations',
|
|
13
|
+
contentType: 'multipart/form-data',
|
|
14
|
+
body: c.type(),
|
|
15
|
+
responses: {
|
|
16
|
+
202: zod_1.z.object({
|
|
17
|
+
message: zod_1.z.string(),
|
|
18
|
+
observationId: zod_1.z.string().uuid(),
|
|
19
|
+
status: zod_1.z.literal('accepted'),
|
|
20
|
+
}),
|
|
21
|
+
400: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
22
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
23
|
+
},
|
|
24
|
+
summary: 'Upload farm observation photo for AI analysis',
|
|
25
|
+
},
|
|
26
|
+
// Upload new observation photo (field-level)
|
|
27
|
+
createObservation: {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: '/fields/:fieldId/observations',
|
|
30
|
+
contentType: 'multipart/form-data',
|
|
31
|
+
body: c.type(),
|
|
32
|
+
responses: {
|
|
33
|
+
202: zod_1.z.object({
|
|
34
|
+
message: zod_1.z.string(),
|
|
35
|
+
observationId: zod_1.z.string().uuid(),
|
|
36
|
+
status: zod_1.z.literal('accepted'),
|
|
37
|
+
}),
|
|
38
|
+
400: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
39
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
40
|
+
},
|
|
41
|
+
summary: 'Upload field observation photo for AI analysis',
|
|
42
|
+
},
|
|
43
|
+
// Get specific observation
|
|
44
|
+
getObservation: {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
path: '/observations/:id',
|
|
47
|
+
responses: {
|
|
48
|
+
200: field_observations_schemas_1.observationResponseSchema,
|
|
49
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
50
|
+
},
|
|
51
|
+
summary: 'Get observation details and analysis results',
|
|
52
|
+
},
|
|
53
|
+
// List observations for a field
|
|
54
|
+
listFieldObservations: {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
path: '/fields/:fieldId/observations',
|
|
57
|
+
query: field_observations_schemas_1.observationListQuerySchema,
|
|
58
|
+
responses: {
|
|
59
|
+
200: field_observations_schemas_1.observationListResponseSchema,
|
|
60
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
61
|
+
},
|
|
62
|
+
summary: 'List all observations for a field',
|
|
63
|
+
},
|
|
64
|
+
// List observations for a farm
|
|
65
|
+
listFarmObservations: {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
path: '/farms/:farmId/observations',
|
|
68
|
+
query: field_observations_schemas_1.observationListQuerySchema,
|
|
69
|
+
responses: {
|
|
70
|
+
200: field_observations_schemas_1.observationListResponseSchema,
|
|
71
|
+
},
|
|
72
|
+
summary: 'List all observations across all farm fields',
|
|
73
|
+
},
|
|
74
|
+
// Update action status
|
|
75
|
+
updateObservationAction: {
|
|
76
|
+
method: 'PATCH',
|
|
77
|
+
path: '/observations/:id/action',
|
|
78
|
+
body: field_observations_schemas_1.updateObservationActionInputSchema,
|
|
79
|
+
responses: {
|
|
80
|
+
200: field_observations_schemas_1.observationResponseSchema,
|
|
81
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
82
|
+
},
|
|
83
|
+
summary: 'Update action status for observation',
|
|
84
|
+
},
|
|
85
|
+
// Delete observation
|
|
86
|
+
deleteObservation: {
|
|
87
|
+
method: 'DELETE',
|
|
88
|
+
path: '/observations/:id',
|
|
89
|
+
body: c.noBody(),
|
|
90
|
+
responses: {
|
|
91
|
+
204: c.noBody(),
|
|
92
|
+
404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
|
|
93
|
+
},
|
|
94
|
+
summary: 'Delete observation and associated photo',
|
|
95
|
+
},
|
|
96
|
+
// Get observation statistics
|
|
97
|
+
getObservationStats: {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
path: '/fields/:fieldId/observations/stats',
|
|
100
|
+
query: field_observations_schemas_1.observationStatsQuerySchema,
|
|
101
|
+
responses: {
|
|
102
|
+
200: zod_1.z.object({
|
|
103
|
+
total: zod_1.z.number(),
|
|
104
|
+
byType: zod_1.z.record(zod_1.z.number()),
|
|
105
|
+
bySeverity: zod_1.z.record(zod_1.z.number()),
|
|
106
|
+
avgConfidence: zod_1.z.number(),
|
|
107
|
+
mostCommonIssues: zod_1.z.array(zod_1.z.object({
|
|
108
|
+
name: zod_1.z.string(),
|
|
109
|
+
count: zod_1.z.number(),
|
|
110
|
+
avgSeverity: zod_1.z.string(),
|
|
111
|
+
})),
|
|
112
|
+
}),
|
|
113
|
+
},
|
|
114
|
+
summary: 'Get observation statistics for a field',
|
|
115
|
+
},
|
|
116
|
+
});
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { analyticsRouter } from './analytics.routes';
|
|
|
16
16
|
import { categoriesRouter } from './categories.routes';
|
|
17
17
|
import { agentsRouter } from './agents.routes';
|
|
18
18
|
import { fieldMonitoringRouter } from './field-monitoring.routes';
|
|
19
|
+
import { fieldObservationsRouter } from './field-observations.routes';
|
|
19
20
|
/**
|
|
20
21
|
* Explicit interface definition for the API contract.
|
|
21
22
|
* This avoids TypeScript's type serialization limit when combining many routers
|
|
@@ -40,6 +41,7 @@ export interface ApiContractDefinition {
|
|
|
40
41
|
categories: typeof categoriesRouter;
|
|
41
42
|
agents: typeof agentsRouter;
|
|
42
43
|
fieldMonitoring: typeof fieldMonitoringRouter;
|
|
44
|
+
fieldObservations: typeof fieldObservationsRouter;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Main API contract combining all routers
|
|
@@ -74,4 +76,5 @@ export type AnalyticsEndpoints = ApiContractType['analytics'];
|
|
|
74
76
|
export type CategoriesEndpoints = ApiContractType['categories'];
|
|
75
77
|
export type AgentsEndpoints = ApiContractType['agents'];
|
|
76
78
|
export type FieldMonitoringEndpoints = ApiContractType['fieldMonitoring'];
|
|
79
|
+
export type FieldObservationsEndpoints = ApiContractType['fieldObservations'];
|
|
77
80
|
//# 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,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@@ const analytics_routes_1 = require("./analytics.routes");
|
|
|
20
20
|
const categories_routes_1 = require("./categories.routes");
|
|
21
21
|
const agents_routes_1 = require("./agents.routes");
|
|
22
22
|
const field_monitoring_routes_1 = require("./field-monitoring.routes");
|
|
23
|
+
const field_observations_routes_1 = require("./field-observations.routes");
|
|
23
24
|
const c = (0, core_1.initContract)();
|
|
24
25
|
/**
|
|
25
26
|
* Main API contract combining all routers
|
|
@@ -46,4 +47,5 @@ exports.apiContract = c.router({
|
|
|
46
47
|
categories: categories_routes_1.categoriesRouter,
|
|
47
48
|
agents: agents_routes_1.agentsRouter,
|
|
48
49
|
fieldMonitoring: field_monitoring_routes_1.fieldMonitoringRouter,
|
|
50
|
+
fieldObservations: field_observations_routes_1.fieldObservationsRouter,
|
|
49
51
|
});
|
|
@@ -593,6 +593,377 @@ export declare const conversationHistoryResponseSchema: z.ZodObject<{
|
|
|
593
593
|
meta?: Record<string, unknown> | undefined;
|
|
594
594
|
}[] | undefined;
|
|
595
595
|
}>;
|
|
596
|
+
export declare const conversationListItemSchema: z.ZodObject<{
|
|
597
|
+
id: z.ZodString;
|
|
598
|
+
title: z.ZodNullable<z.ZodString>;
|
|
599
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
600
|
+
farmId: z.ZodNullable<z.ZodString>;
|
|
601
|
+
messageCount: z.ZodNumber;
|
|
602
|
+
lastMessageAt: z.ZodNullable<z.ZodString>;
|
|
603
|
+
createdAt: z.ZodString;
|
|
604
|
+
updatedAt: z.ZodString;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
id: string;
|
|
607
|
+
title: string | null;
|
|
608
|
+
createdAt: string;
|
|
609
|
+
updatedAt: string;
|
|
610
|
+
summary: string | null;
|
|
611
|
+
farmId: string | null;
|
|
612
|
+
messageCount: number;
|
|
613
|
+
lastMessageAt: string | null;
|
|
614
|
+
}, {
|
|
615
|
+
id: string;
|
|
616
|
+
title: string | null;
|
|
617
|
+
createdAt: string;
|
|
618
|
+
updatedAt: string;
|
|
619
|
+
summary: string | null;
|
|
620
|
+
farmId: string | null;
|
|
621
|
+
messageCount: number;
|
|
622
|
+
lastMessageAt: string | null;
|
|
623
|
+
}>;
|
|
624
|
+
export declare const conversationListAttributesSchema: z.ZodObject<{
|
|
625
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
626
|
+
id: z.ZodString;
|
|
627
|
+
title: z.ZodNullable<z.ZodString>;
|
|
628
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
629
|
+
farmId: z.ZodNullable<z.ZodString>;
|
|
630
|
+
messageCount: z.ZodNumber;
|
|
631
|
+
lastMessageAt: z.ZodNullable<z.ZodString>;
|
|
632
|
+
createdAt: z.ZodString;
|
|
633
|
+
updatedAt: z.ZodString;
|
|
634
|
+
}, "strip", z.ZodTypeAny, {
|
|
635
|
+
id: string;
|
|
636
|
+
title: string | null;
|
|
637
|
+
createdAt: string;
|
|
638
|
+
updatedAt: string;
|
|
639
|
+
summary: string | null;
|
|
640
|
+
farmId: string | null;
|
|
641
|
+
messageCount: number;
|
|
642
|
+
lastMessageAt: string | null;
|
|
643
|
+
}, {
|
|
644
|
+
id: string;
|
|
645
|
+
title: string | null;
|
|
646
|
+
createdAt: string;
|
|
647
|
+
updatedAt: string;
|
|
648
|
+
summary: string | null;
|
|
649
|
+
farmId: string | null;
|
|
650
|
+
messageCount: number;
|
|
651
|
+
lastMessageAt: string | null;
|
|
652
|
+
}>, "many">;
|
|
653
|
+
total: z.ZodNumber;
|
|
654
|
+
}, "strip", z.ZodTypeAny, {
|
|
655
|
+
conversations: {
|
|
656
|
+
id: string;
|
|
657
|
+
title: string | null;
|
|
658
|
+
createdAt: string;
|
|
659
|
+
updatedAt: string;
|
|
660
|
+
summary: string | null;
|
|
661
|
+
farmId: string | null;
|
|
662
|
+
messageCount: number;
|
|
663
|
+
lastMessageAt: string | null;
|
|
664
|
+
}[];
|
|
665
|
+
total: number;
|
|
666
|
+
}, {
|
|
667
|
+
conversations: {
|
|
668
|
+
id: string;
|
|
669
|
+
title: string | null;
|
|
670
|
+
createdAt: string;
|
|
671
|
+
updatedAt: string;
|
|
672
|
+
summary: string | null;
|
|
673
|
+
farmId: string | null;
|
|
674
|
+
messageCount: number;
|
|
675
|
+
lastMessageAt: string | null;
|
|
676
|
+
}[];
|
|
677
|
+
total: number;
|
|
678
|
+
}>;
|
|
679
|
+
export declare const conversationListResourceSchema: z.ZodObject<{
|
|
680
|
+
type: z.ZodLiteral<string>;
|
|
681
|
+
id: z.ZodString;
|
|
682
|
+
attributes: z.ZodObject<{
|
|
683
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
684
|
+
id: z.ZodString;
|
|
685
|
+
title: z.ZodNullable<z.ZodString>;
|
|
686
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
687
|
+
farmId: z.ZodNullable<z.ZodString>;
|
|
688
|
+
messageCount: z.ZodNumber;
|
|
689
|
+
lastMessageAt: z.ZodNullable<z.ZodString>;
|
|
690
|
+
createdAt: z.ZodString;
|
|
691
|
+
updatedAt: z.ZodString;
|
|
692
|
+
}, "strip", z.ZodTypeAny, {
|
|
693
|
+
id: string;
|
|
694
|
+
title: string | null;
|
|
695
|
+
createdAt: string;
|
|
696
|
+
updatedAt: string;
|
|
697
|
+
summary: string | null;
|
|
698
|
+
farmId: string | null;
|
|
699
|
+
messageCount: number;
|
|
700
|
+
lastMessageAt: string | null;
|
|
701
|
+
}, {
|
|
702
|
+
id: string;
|
|
703
|
+
title: string | null;
|
|
704
|
+
createdAt: string;
|
|
705
|
+
updatedAt: string;
|
|
706
|
+
summary: string | null;
|
|
707
|
+
farmId: string | null;
|
|
708
|
+
messageCount: number;
|
|
709
|
+
lastMessageAt: string | null;
|
|
710
|
+
}>, "many">;
|
|
711
|
+
total: z.ZodNumber;
|
|
712
|
+
}, "strip", z.ZodTypeAny, {
|
|
713
|
+
conversations: {
|
|
714
|
+
id: string;
|
|
715
|
+
title: string | null;
|
|
716
|
+
createdAt: string;
|
|
717
|
+
updatedAt: string;
|
|
718
|
+
summary: string | null;
|
|
719
|
+
farmId: string | null;
|
|
720
|
+
messageCount: number;
|
|
721
|
+
lastMessageAt: string | null;
|
|
722
|
+
}[];
|
|
723
|
+
total: number;
|
|
724
|
+
}, {
|
|
725
|
+
conversations: {
|
|
726
|
+
id: string;
|
|
727
|
+
title: string | null;
|
|
728
|
+
createdAt: string;
|
|
729
|
+
updatedAt: string;
|
|
730
|
+
summary: string | null;
|
|
731
|
+
farmId: string | null;
|
|
732
|
+
messageCount: number;
|
|
733
|
+
lastMessageAt: string | null;
|
|
734
|
+
}[];
|
|
735
|
+
total: number;
|
|
736
|
+
}>;
|
|
737
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
738
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
739
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
740
|
+
}, "strip", z.ZodTypeAny, {
|
|
741
|
+
type: string;
|
|
742
|
+
id: string;
|
|
743
|
+
attributes: {
|
|
744
|
+
conversations: {
|
|
745
|
+
id: string;
|
|
746
|
+
title: string | null;
|
|
747
|
+
createdAt: string;
|
|
748
|
+
updatedAt: string;
|
|
749
|
+
summary: string | null;
|
|
750
|
+
farmId: string | null;
|
|
751
|
+
messageCount: number;
|
|
752
|
+
lastMessageAt: string | null;
|
|
753
|
+
}[];
|
|
754
|
+
total: number;
|
|
755
|
+
};
|
|
756
|
+
relationships?: Record<string, unknown> | undefined;
|
|
757
|
+
links?: Record<string, string> | undefined;
|
|
758
|
+
meta?: Record<string, unknown> | undefined;
|
|
759
|
+
}, {
|
|
760
|
+
type: string;
|
|
761
|
+
id: string;
|
|
762
|
+
attributes: {
|
|
763
|
+
conversations: {
|
|
764
|
+
id: string;
|
|
765
|
+
title: string | null;
|
|
766
|
+
createdAt: string;
|
|
767
|
+
updatedAt: string;
|
|
768
|
+
summary: string | null;
|
|
769
|
+
farmId: string | null;
|
|
770
|
+
messageCount: number;
|
|
771
|
+
lastMessageAt: string | null;
|
|
772
|
+
}[];
|
|
773
|
+
total: number;
|
|
774
|
+
};
|
|
775
|
+
relationships?: Record<string, unknown> | undefined;
|
|
776
|
+
links?: Record<string, string> | undefined;
|
|
777
|
+
meta?: Record<string, unknown> | undefined;
|
|
778
|
+
}>;
|
|
779
|
+
export declare const conversationListResponseSchema: z.ZodObject<{
|
|
780
|
+
data: z.ZodObject<{
|
|
781
|
+
type: z.ZodLiteral<string>;
|
|
782
|
+
id: z.ZodString;
|
|
783
|
+
attributes: z.ZodObject<{
|
|
784
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
785
|
+
id: z.ZodString;
|
|
786
|
+
title: z.ZodNullable<z.ZodString>;
|
|
787
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
788
|
+
farmId: z.ZodNullable<z.ZodString>;
|
|
789
|
+
messageCount: z.ZodNumber;
|
|
790
|
+
lastMessageAt: z.ZodNullable<z.ZodString>;
|
|
791
|
+
createdAt: z.ZodString;
|
|
792
|
+
updatedAt: z.ZodString;
|
|
793
|
+
}, "strip", z.ZodTypeAny, {
|
|
794
|
+
id: string;
|
|
795
|
+
title: string | null;
|
|
796
|
+
createdAt: string;
|
|
797
|
+
updatedAt: string;
|
|
798
|
+
summary: string | null;
|
|
799
|
+
farmId: string | null;
|
|
800
|
+
messageCount: number;
|
|
801
|
+
lastMessageAt: string | null;
|
|
802
|
+
}, {
|
|
803
|
+
id: string;
|
|
804
|
+
title: string | null;
|
|
805
|
+
createdAt: string;
|
|
806
|
+
updatedAt: string;
|
|
807
|
+
summary: string | null;
|
|
808
|
+
farmId: string | null;
|
|
809
|
+
messageCount: number;
|
|
810
|
+
lastMessageAt: string | null;
|
|
811
|
+
}>, "many">;
|
|
812
|
+
total: z.ZodNumber;
|
|
813
|
+
}, "strip", z.ZodTypeAny, {
|
|
814
|
+
conversations: {
|
|
815
|
+
id: string;
|
|
816
|
+
title: string | null;
|
|
817
|
+
createdAt: string;
|
|
818
|
+
updatedAt: string;
|
|
819
|
+
summary: string | null;
|
|
820
|
+
farmId: string | null;
|
|
821
|
+
messageCount: number;
|
|
822
|
+
lastMessageAt: string | null;
|
|
823
|
+
}[];
|
|
824
|
+
total: number;
|
|
825
|
+
}, {
|
|
826
|
+
conversations: {
|
|
827
|
+
id: string;
|
|
828
|
+
title: string | null;
|
|
829
|
+
createdAt: string;
|
|
830
|
+
updatedAt: string;
|
|
831
|
+
summary: string | null;
|
|
832
|
+
farmId: string | null;
|
|
833
|
+
messageCount: number;
|
|
834
|
+
lastMessageAt: string | null;
|
|
835
|
+
}[];
|
|
836
|
+
total: number;
|
|
837
|
+
}>;
|
|
838
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
839
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
840
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
841
|
+
}, "strip", z.ZodTypeAny, {
|
|
842
|
+
type: string;
|
|
843
|
+
id: string;
|
|
844
|
+
attributes: {
|
|
845
|
+
conversations: {
|
|
846
|
+
id: string;
|
|
847
|
+
title: string | null;
|
|
848
|
+
createdAt: string;
|
|
849
|
+
updatedAt: string;
|
|
850
|
+
summary: string | null;
|
|
851
|
+
farmId: string | null;
|
|
852
|
+
messageCount: number;
|
|
853
|
+
lastMessageAt: string | null;
|
|
854
|
+
}[];
|
|
855
|
+
total: number;
|
|
856
|
+
};
|
|
857
|
+
relationships?: Record<string, unknown> | undefined;
|
|
858
|
+
links?: Record<string, string> | undefined;
|
|
859
|
+
meta?: Record<string, unknown> | undefined;
|
|
860
|
+
}, {
|
|
861
|
+
type: string;
|
|
862
|
+
id: string;
|
|
863
|
+
attributes: {
|
|
864
|
+
conversations: {
|
|
865
|
+
id: string;
|
|
866
|
+
title: string | null;
|
|
867
|
+
createdAt: string;
|
|
868
|
+
updatedAt: string;
|
|
869
|
+
summary: string | null;
|
|
870
|
+
farmId: string | null;
|
|
871
|
+
messageCount: number;
|
|
872
|
+
lastMessageAt: string | null;
|
|
873
|
+
}[];
|
|
874
|
+
total: number;
|
|
875
|
+
};
|
|
876
|
+
relationships?: Record<string, unknown> | undefined;
|
|
877
|
+
links?: Record<string, string> | undefined;
|
|
878
|
+
meta?: Record<string, unknown> | undefined;
|
|
879
|
+
}>;
|
|
880
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
881
|
+
type: z.ZodString;
|
|
882
|
+
id: z.ZodString;
|
|
883
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
884
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
885
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
886
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
887
|
+
}, "strip", z.ZodTypeAny, {
|
|
888
|
+
type: string;
|
|
889
|
+
id: string;
|
|
890
|
+
attributes?: Record<string, unknown> | undefined;
|
|
891
|
+
relationships?: Record<string, unknown> | undefined;
|
|
892
|
+
links?: Record<string, string> | undefined;
|
|
893
|
+
meta?: Record<string, unknown> | undefined;
|
|
894
|
+
}, {
|
|
895
|
+
type: string;
|
|
896
|
+
id: string;
|
|
897
|
+
attributes?: Record<string, unknown> | undefined;
|
|
898
|
+
relationships?: Record<string, unknown> | undefined;
|
|
899
|
+
links?: Record<string, string> | undefined;
|
|
900
|
+
meta?: Record<string, unknown> | undefined;
|
|
901
|
+
}>, "many">>;
|
|
902
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
903
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
904
|
+
}, "strip", z.ZodTypeAny, {
|
|
905
|
+
data: {
|
|
906
|
+
type: string;
|
|
907
|
+
id: string;
|
|
908
|
+
attributes: {
|
|
909
|
+
conversations: {
|
|
910
|
+
id: string;
|
|
911
|
+
title: string | null;
|
|
912
|
+
createdAt: string;
|
|
913
|
+
updatedAt: string;
|
|
914
|
+
summary: string | null;
|
|
915
|
+
farmId: string | null;
|
|
916
|
+
messageCount: number;
|
|
917
|
+
lastMessageAt: string | null;
|
|
918
|
+
}[];
|
|
919
|
+
total: number;
|
|
920
|
+
};
|
|
921
|
+
relationships?: Record<string, unknown> | undefined;
|
|
922
|
+
links?: Record<string, string> | undefined;
|
|
923
|
+
meta?: Record<string, unknown> | undefined;
|
|
924
|
+
};
|
|
925
|
+
links?: Record<string, string> | undefined;
|
|
926
|
+
meta?: Record<string, unknown> | undefined;
|
|
927
|
+
included?: {
|
|
928
|
+
type: string;
|
|
929
|
+
id: string;
|
|
930
|
+
attributes?: Record<string, unknown> | undefined;
|
|
931
|
+
relationships?: Record<string, unknown> | undefined;
|
|
932
|
+
links?: Record<string, string> | undefined;
|
|
933
|
+
meta?: Record<string, unknown> | undefined;
|
|
934
|
+
}[] | undefined;
|
|
935
|
+
}, {
|
|
936
|
+
data: {
|
|
937
|
+
type: string;
|
|
938
|
+
id: string;
|
|
939
|
+
attributes: {
|
|
940
|
+
conversations: {
|
|
941
|
+
id: string;
|
|
942
|
+
title: string | null;
|
|
943
|
+
createdAt: string;
|
|
944
|
+
updatedAt: string;
|
|
945
|
+
summary: string | null;
|
|
946
|
+
farmId: string | null;
|
|
947
|
+
messageCount: number;
|
|
948
|
+
lastMessageAt: string | null;
|
|
949
|
+
}[];
|
|
950
|
+
total: number;
|
|
951
|
+
};
|
|
952
|
+
relationships?: Record<string, unknown> | undefined;
|
|
953
|
+
links?: Record<string, string> | undefined;
|
|
954
|
+
meta?: Record<string, unknown> | undefined;
|
|
955
|
+
};
|
|
956
|
+
links?: Record<string, string> | undefined;
|
|
957
|
+
meta?: Record<string, unknown> | undefined;
|
|
958
|
+
included?: {
|
|
959
|
+
type: string;
|
|
960
|
+
id: string;
|
|
961
|
+
attributes?: Record<string, unknown> | undefined;
|
|
962
|
+
relationships?: Record<string, unknown> | undefined;
|
|
963
|
+
links?: Record<string, string> | undefined;
|
|
964
|
+
meta?: Record<string, unknown> | undefined;
|
|
965
|
+
}[] | undefined;
|
|
966
|
+
}>;
|
|
596
967
|
export type MessageRole = z.infer<typeof messageRoleSchema>;
|
|
597
968
|
export type ConversationMessage = z.infer<typeof conversationMessageSchema>;
|
|
598
969
|
export type ConversationHistoryMessage = z.infer<typeof conversationHistoryMessageSchema>;
|
|
@@ -603,4 +974,7 @@ export type AgentChatResponseAttributes = z.infer<typeof agentChatResponseAttrib
|
|
|
603
974
|
export type AgentChatResponse = z.infer<typeof agentChatResponseSchema>;
|
|
604
975
|
export type ConversationHistoryAttributes = z.infer<typeof conversationHistoryAttributesSchema>;
|
|
605
976
|
export type ConversationHistoryResponse = z.infer<typeof conversationHistoryResponseSchema>;
|
|
977
|
+
export type ConversationListItem = z.infer<typeof conversationListItemSchema>;
|
|
978
|
+
export type ConversationListAttributes = z.infer<typeof conversationListAttributesSchema>;
|
|
979
|
+
export type ConversationListResponse = z.infer<typeof conversationListResponseSchema>;
|
|
606
980
|
//# sourceMappingURL=agents.schemas.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC5F,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.conversationHistoryResponseSchema = exports.conversationHistoryResourceSchema = exports.conversationHistoryAttributesSchema = exports.conversationHistoryMessageSchema = exports.agentChatResponseSchema = exports.agentChatResponseResourceSchema = exports.agentChatResponseAttributesSchema = exports.chatRequestSchema = exports.chatRequestAttributesSchema = exports.toolCallResultSchema = exports.conversationMessageSchema = exports.messageRoleSchema = void 0;
|
|
3
|
+
exports.conversationListResponseSchema = exports.conversationListResourceSchema = exports.conversationListAttributesSchema = exports.conversationListItemSchema = exports.conversationHistoryResponseSchema = exports.conversationHistoryResourceSchema = exports.conversationHistoryAttributesSchema = exports.conversationHistoryMessageSchema = exports.agentChatResponseSchema = exports.agentChatResponseResourceSchema = exports.agentChatResponseAttributesSchema = exports.chatRequestSchema = exports.chatRequestAttributesSchema = exports.toolCallResultSchema = exports.conversationMessageSchema = exports.messageRoleSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_schemas_1 = require("./common.schemas");
|
|
6
6
|
/**
|
|
@@ -55,3 +55,23 @@ exports.conversationHistoryAttributesSchema = zod_1.z.object({
|
|
|
55
55
|
exports.conversationHistoryResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('conversation-histories', exports.conversationHistoryAttributesSchema);
|
|
56
56
|
// Conversation history response
|
|
57
57
|
exports.conversationHistoryResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.conversationHistoryResourceSchema);
|
|
58
|
+
// Conversation list item schema
|
|
59
|
+
exports.conversationListItemSchema = zod_1.z.object({
|
|
60
|
+
id: zod_1.z.string().uuid(),
|
|
61
|
+
title: zod_1.z.string().nullable(),
|
|
62
|
+
summary: zod_1.z.string().nullable(),
|
|
63
|
+
farmId: zod_1.z.string().uuid().nullable(),
|
|
64
|
+
messageCount: zod_1.z.number().int().min(0),
|
|
65
|
+
lastMessageAt: zod_1.z.string().datetime().nullable(),
|
|
66
|
+
createdAt: zod_1.z.string().datetime(),
|
|
67
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
68
|
+
});
|
|
69
|
+
// Conversation list response attributes
|
|
70
|
+
exports.conversationListAttributesSchema = zod_1.z.object({
|
|
71
|
+
conversations: zod_1.z.array(exports.conversationListItemSchema),
|
|
72
|
+
total: zod_1.z.number().int().min(0),
|
|
73
|
+
});
|
|
74
|
+
// Conversation list resource
|
|
75
|
+
exports.conversationListResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('conversation-lists', exports.conversationListAttributesSchema);
|
|
76
|
+
// Conversation list response
|
|
77
|
+
exports.conversationListResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.conversationListResourceSchema);
|