@deepintel-ltd/farmpro-contracts 1.11.2 → 1.11.4
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/admin.routes.d.ts +3947 -187
- package/dist/routes/admin.routes.d.ts.map +1 -1
- package/dist/routes/admin.routes.js +106 -4
- package/dist/routes/agent-workflows.routes.d.ts +140 -140
- package/dist/routes/agents.routes.d.ts +6 -6
- package/dist/routes/analytics.routes.d.ts +6 -6
- package/dist/routes/auth.routes.d.ts +999 -0
- package/dist/routes/auth.routes.d.ts.map +1 -1
- package/dist/routes/auth.routes.js +30 -1
- package/dist/routes/crop-profile.routes.d.ts +18 -18
- package/dist/routes/documents.routes.d.ts +58 -58
- package/dist/routes/equipment.routes.d.ts +62 -62
- package/dist/routes/extension.routes.d.ts +6 -6
- package/dist/routes/farm-status.routes.d.ts +6 -6
- package/dist/routes/farms.routes.d.ts +35 -0
- package/dist/routes/farms.routes.d.ts.map +1 -1
- package/dist/routes/fertigation.routes.d.ts +76 -76
- package/dist/routes/field-monitoring.routes.d.ts +34 -34
- package/dist/routes/field-observations.routes.d.ts +170 -170
- package/dist/routes/finance.routes.d.ts +6 -6
- package/dist/routes/geofences.routes.d.ts +8 -8
- package/dist/routes/irrigation.routes.d.ts +22 -22
- package/dist/routes/live-monitor.routes.d.ts +2 -2
- package/dist/routes/livestock-groups.routes.d.ts +30 -30
- package/dist/routes/livestock.routes.d.ts +24 -24
- package/dist/routes/monitoring-visualization.routes.d.ts +4 -4
- package/dist/routes/pest-disease-risk.routes.d.ts +48 -48
- package/dist/routes/prescription-maps.routes.d.ts +2 -2
- package/dist/routes/seasonal-plans.routes.d.ts +6 -6
- package/dist/routes/soil-tests.routes.d.ts +30 -30
- package/dist/routes/subscriptions.routes.d.ts +2 -2
- package/dist/routes/team-payments.routes.d.ts +36 -36
- package/dist/routes/team.routes.d.ts +24 -24
- package/dist/routes/users.routes.d.ts +14 -0
- package/dist/routes/users.routes.d.ts.map +1 -1
- package/dist/routes/weather.routes.d.ts +14 -14
- package/dist/routes/yield-prediction.routes.d.ts +48 -48
- package/dist/schemas/admin.schemas.d.ts +843 -81
- package/dist/schemas/admin.schemas.d.ts.map +1 -1
- package/dist/schemas/admin.schemas.js +58 -1
- package/dist/schemas/agent-workflows.schemas.d.ts +111 -111
- package/dist/schemas/agents.schemas.d.ts +6 -6
- package/dist/schemas/analytics.schemas.d.ts +12 -12
- package/dist/schemas/auth.schemas.d.ts +28 -0
- package/dist/schemas/auth.schemas.d.ts.map +1 -1
- package/dist/schemas/auth.schemas.js +8 -0
- package/dist/schemas/crop-profile.schemas.d.ts +26 -26
- package/dist/schemas/documents.schemas.d.ts +48 -48
- package/dist/schemas/equipment.schemas.d.ts +48 -48
- package/dist/schemas/extension.schemas.d.ts +12 -12
- package/dist/schemas/farm-status.schemas.d.ts +8 -8
- package/dist/schemas/farms.schemas.d.ts +48 -0
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/farms.schemas.js +3 -0
- package/dist/schemas/fertigation.schemas.d.ts +20 -20
- package/dist/schemas/field-monitoring.schemas.d.ts +26 -26
- package/dist/schemas/field-observations.schemas.d.ts +126 -126
- package/dist/schemas/finance.schemas.d.ts +6 -6
- package/dist/schemas/geofences.schemas.d.ts +6 -6
- package/dist/schemas/irrigation.schemas.d.ts +12 -12
- package/dist/schemas/live-monitor.schemas.d.ts +2 -2
- package/dist/schemas/livestock-groups.schemas.d.ts +18 -18
- package/dist/schemas/livestock.schemas.d.ts +18 -18
- package/dist/schemas/monitoring-visualization.schemas.d.ts +4 -4
- package/dist/schemas/pest-disease-risk.schemas.d.ts +32 -32
- package/dist/schemas/prescription-maps.schemas.d.ts +2 -2
- package/dist/schemas/seasonal-plans.schemas.d.ts +12 -12
- package/dist/schemas/soil-tests.schemas.d.ts +28 -28
- package/dist/schemas/team-payments.schemas.d.ts +24 -24
- package/dist/schemas/team.schemas.d.ts +18 -18
- package/dist/schemas/users.schemas.d.ts +15 -0
- package/dist/schemas/users.schemas.d.ts.map +1 -1
- package/dist/schemas/users.schemas.js +1 -0
- package/dist/schemas/weather.schemas.d.ts +28 -28
- package/dist/schemas/yield-prediction.schemas.d.ts +8 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.routes.d.ts","sourceRoot":"","sources":["../../src/routes/admin.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"admin.routes.d.ts","sourceRoot":"","sources":["../../src/routes/admin.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { adminCreateUserSchema, autonomousMonitoringStatsResponseSchema, } from '../schemas/admin.schemas';
|
|
3
|
+
import { adminCreateUserSchema, adminLoginLinkResponseSchema, adminUserListResponseSchema, autonomousMonitoringStatsResponseSchema, inviteSuperAdminSchema, impersonationResponseSchema, } from '../schemas/admin.schemas';
|
|
4
4
|
import { userResponseSchema } from '../schemas/users.schemas';
|
|
5
|
-
import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
|
|
5
|
+
import { idParamSchema, jsonApiErrorResponseSchema, jsonApiPaginationQuerySchema, jsonApiSuccessResponseSchema, } from '../schemas/common.schemas';
|
|
6
6
|
const c = initContract();
|
|
7
7
|
export const adminRouter = c.router({
|
|
8
8
|
getAutonomousMonitoringStats: {
|
|
@@ -21,6 +21,21 @@ export const adminRouter = c.router({
|
|
|
21
21
|
summary: 'Get autonomous monitoring analytics',
|
|
22
22
|
description: 'Get comprehensive analytics for the autonomous multi-agent monitoring system',
|
|
23
23
|
},
|
|
24
|
+
listUsers: {
|
|
25
|
+
method: 'GET',
|
|
26
|
+
path: '/admin/users',
|
|
27
|
+
query: jsonApiPaginationQuerySchema.extend({
|
|
28
|
+
q: z.string().optional(),
|
|
29
|
+
}),
|
|
30
|
+
responses: {
|
|
31
|
+
200: adminUserListResponseSchema,
|
|
32
|
+
401: jsonApiErrorResponseSchema,
|
|
33
|
+
403: jsonApiErrorResponseSchema,
|
|
34
|
+
500: jsonApiErrorResponseSchema,
|
|
35
|
+
},
|
|
36
|
+
summary: 'List users (platform admin)',
|
|
37
|
+
description: 'Search and paginate platform users. Restricted to super admins.',
|
|
38
|
+
},
|
|
24
39
|
createUser: {
|
|
25
40
|
method: 'POST',
|
|
26
41
|
path: '/admin/users',
|
|
@@ -35,7 +50,94 @@ export const adminRouter = c.router({
|
|
|
35
50
|
500: jsonApiErrorResponseSchema,
|
|
36
51
|
},
|
|
37
52
|
summary: 'Create user (platform admin)',
|
|
38
|
-
description: 'Provision a platform user with email and password. Restricted to
|
|
53
|
+
description: 'Provision a platform user with email and password. Restricted to super admins.',
|
|
54
|
+
},
|
|
55
|
+
createLoginLink: {
|
|
56
|
+
method: 'POST',
|
|
57
|
+
path: '/admin/users/:id/login-link',
|
|
58
|
+
pathParams: idParamSchema,
|
|
59
|
+
body: z.object({}),
|
|
60
|
+
responses: {
|
|
61
|
+
201: adminLoginLinkResponseSchema,
|
|
62
|
+
401: jsonApiErrorResponseSchema,
|
|
63
|
+
403: jsonApiErrorResponseSchema,
|
|
64
|
+
404: jsonApiErrorResponseSchema,
|
|
65
|
+
500: jsonApiErrorResponseSchema,
|
|
66
|
+
},
|
|
67
|
+
summary: 'Create one-time login link (platform admin)',
|
|
68
|
+
description: 'Mint a short-lived, single-use login URL for a user. Restricted to super admins.',
|
|
69
|
+
},
|
|
70
|
+
inviteSuperAdmin: {
|
|
71
|
+
method: 'POST',
|
|
72
|
+
path: '/admin/super-admins',
|
|
73
|
+
body: z.object({ data: inviteSuperAdminSchema }),
|
|
74
|
+
responses: {
|
|
75
|
+
201: userResponseSchema,
|
|
76
|
+
400: jsonApiErrorResponseSchema,
|
|
77
|
+
401: jsonApiErrorResponseSchema,
|
|
78
|
+
403: jsonApiErrorResponseSchema,
|
|
79
|
+
409: jsonApiErrorResponseSchema,
|
|
80
|
+
422: jsonApiErrorResponseSchema,
|
|
81
|
+
500: jsonApiErrorResponseSchema,
|
|
82
|
+
},
|
|
83
|
+
summary: 'Invite a super admin',
|
|
84
|
+
description: 'Invite by name+email. New users set their own password via email link. Restricted to super admins.',
|
|
85
|
+
},
|
|
86
|
+
resendSuperAdminInvite: {
|
|
87
|
+
method: 'POST',
|
|
88
|
+
path: '/admin/super-admins/:id/resend-invite',
|
|
89
|
+
pathParams: idParamSchema,
|
|
90
|
+
body: z.object({}),
|
|
91
|
+
responses: {
|
|
92
|
+
200: jsonApiSuccessResponseSchema,
|
|
93
|
+
400: jsonApiErrorResponseSchema,
|
|
94
|
+
401: jsonApiErrorResponseSchema,
|
|
95
|
+
403: jsonApiErrorResponseSchema,
|
|
96
|
+
404: jsonApiErrorResponseSchema,
|
|
97
|
+
500: jsonApiErrorResponseSchema,
|
|
98
|
+
},
|
|
99
|
+
summary: 'Resend super admin invite email',
|
|
100
|
+
},
|
|
101
|
+
revokeSuperAdmin: {
|
|
102
|
+
method: 'DELETE',
|
|
103
|
+
path: '/admin/super-admins/:id',
|
|
104
|
+
pathParams: idParamSchema,
|
|
105
|
+
responses: {
|
|
106
|
+
200: jsonApiSuccessResponseSchema,
|
|
107
|
+
400: jsonApiErrorResponseSchema,
|
|
108
|
+
401: jsonApiErrorResponseSchema,
|
|
109
|
+
403: jsonApiErrorResponseSchema,
|
|
110
|
+
404: jsonApiErrorResponseSchema,
|
|
111
|
+
500: jsonApiErrorResponseSchema,
|
|
112
|
+
},
|
|
113
|
+
summary: 'Revoke super admin role',
|
|
114
|
+
},
|
|
115
|
+
listSuperAdmins: {
|
|
116
|
+
method: 'GET',
|
|
117
|
+
path: '/admin/super-admins',
|
|
118
|
+
query: jsonApiPaginationQuerySchema,
|
|
119
|
+
responses: {
|
|
120
|
+
200: adminUserListResponseSchema,
|
|
121
|
+
401: jsonApiErrorResponseSchema,
|
|
122
|
+
403: jsonApiErrorResponseSchema,
|
|
123
|
+
500: jsonApiErrorResponseSchema,
|
|
124
|
+
},
|
|
125
|
+
summary: 'List super admins',
|
|
126
|
+
},
|
|
127
|
+
impersonateUser: {
|
|
128
|
+
method: 'POST',
|
|
129
|
+
path: '/admin/users/:id/impersonate',
|
|
130
|
+
pathParams: idParamSchema,
|
|
131
|
+
body: z.object({}),
|
|
132
|
+
responses: {
|
|
133
|
+
201: impersonationResponseSchema,
|
|
134
|
+
400: jsonApiErrorResponseSchema,
|
|
135
|
+
401: jsonApiErrorResponseSchema,
|
|
136
|
+
403: jsonApiErrorResponseSchema,
|
|
137
|
+
404: jsonApiErrorResponseSchema,
|
|
138
|
+
500: jsonApiErrorResponseSchema,
|
|
139
|
+
},
|
|
140
|
+
summary: 'Start impersonation session as target user',
|
|
39
141
|
},
|
|
40
142
|
sendPlatformDigest: {
|
|
41
143
|
method: 'POST',
|
|
@@ -61,6 +163,6 @@ export const adminRouter = c.router({
|
|
|
61
163
|
500: jsonApiErrorResponseSchema,
|
|
62
164
|
},
|
|
63
165
|
summary: 'Send platform digest now',
|
|
64
|
-
description: 'Send the previous-month platform digest email. Restricted to
|
|
166
|
+
description: 'Send the previous-month platform digest email. Restricted to super admins.',
|
|
65
167
|
},
|
|
66
168
|
});
|