@deepintel-ltd/farmpro-contracts 1.11.3 → 1.11.5
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 +2591 -59
- package/dist/routes/admin.routes.d.ts.map +1 -1
- package/dist/routes/admin.routes.js +68 -6
- 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 +503 -0
- package/dist/routes/auth.routes.d.ts.map +1 -1
- package/dist/routes/auth.routes.js +15 -0
- 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 +470 -84
- package/dist/schemas/admin.schemas.d.ts.map +1 -1
- package/dist/schemas/admin.schemas.js +46 -0
- 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/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;AAoBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkKtB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { adminCreateUserSchema, adminLoginLinkResponseSchema, adminUserListResponseSchema, autonomousMonitoringStatsResponseSchema, } from '../schemas/admin.schemas';
|
|
3
|
+
import { adminCreateUserSchema, adminInviteUserSchema, adminLoginLinkResponseSchema, adminUserListResponseSchema, autonomousMonitoringStatsResponseSchema, impersonationResponseSchema, updatePlatformRoleSchema, } from '../schemas/admin.schemas';
|
|
4
4
|
import { userResponseSchema } from '../schemas/users.schemas';
|
|
5
|
-
import { idParamSchema, jsonApiErrorResponseSchema, jsonApiPaginationQuerySchema, } 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: {
|
|
@@ -26,6 +26,7 @@ export const adminRouter = c.router({
|
|
|
26
26
|
path: '/admin/users',
|
|
27
27
|
query: jsonApiPaginationQuerySchema.extend({
|
|
28
28
|
q: z.string().optional(),
|
|
29
|
+
'filter[platformRole]': z.enum(['super_admin']).optional(),
|
|
29
30
|
}),
|
|
30
31
|
responses: {
|
|
31
32
|
200: adminUserListResponseSchema,
|
|
@@ -34,7 +35,7 @@ export const adminRouter = c.router({
|
|
|
34
35
|
500: jsonApiErrorResponseSchema,
|
|
35
36
|
},
|
|
36
37
|
summary: 'List users (platform admin)',
|
|
37
|
-
description: 'Search and paginate platform users. Restricted to
|
|
38
|
+
description: 'Search and paginate platform users. Optional filter[platformRole]=super_admin. Restricted to super admins.',
|
|
38
39
|
},
|
|
39
40
|
createUser: {
|
|
40
41
|
method: 'POST',
|
|
@@ -50,7 +51,53 @@ export const adminRouter = c.router({
|
|
|
50
51
|
500: jsonApiErrorResponseSchema,
|
|
51
52
|
},
|
|
52
53
|
summary: 'Create user (platform admin)',
|
|
53
|
-
description: 'Provision a platform user with email and password. Restricted to
|
|
54
|
+
description: 'Provision a platform user with email and password. Restricted to super admins.',
|
|
55
|
+
},
|
|
56
|
+
inviteUser: {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
path: '/admin/users/invites',
|
|
59
|
+
body: z.object({ data: adminInviteUserSchema }),
|
|
60
|
+
responses: {
|
|
61
|
+
201: userResponseSchema,
|
|
62
|
+
400: jsonApiErrorResponseSchema,
|
|
63
|
+
401: jsonApiErrorResponseSchema,
|
|
64
|
+
403: jsonApiErrorResponseSchema,
|
|
65
|
+
409: jsonApiErrorResponseSchema,
|
|
66
|
+
422: jsonApiErrorResponseSchema,
|
|
67
|
+
500: jsonApiErrorResponseSchema,
|
|
68
|
+
},
|
|
69
|
+
summary: 'Invite a user (no password)',
|
|
70
|
+
description: 'Invite by name+email. Optionally grant platformRole (e.g. super_admin). Invitee sets password via email.',
|
|
71
|
+
},
|
|
72
|
+
resendInvite: {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
path: '/admin/users/:id/resend-invite',
|
|
75
|
+
pathParams: idParamSchema,
|
|
76
|
+
body: z.object({}),
|
|
77
|
+
responses: {
|
|
78
|
+
200: jsonApiSuccessResponseSchema,
|
|
79
|
+
400: jsonApiErrorResponseSchema,
|
|
80
|
+
401: jsonApiErrorResponseSchema,
|
|
81
|
+
403: jsonApiErrorResponseSchema,
|
|
82
|
+
404: jsonApiErrorResponseSchema,
|
|
83
|
+
500: jsonApiErrorResponseSchema,
|
|
84
|
+
},
|
|
85
|
+
summary: 'Resend pending invite email',
|
|
86
|
+
},
|
|
87
|
+
updatePlatformRole: {
|
|
88
|
+
method: 'PATCH',
|
|
89
|
+
path: '/admin/users/:id/platform-role',
|
|
90
|
+
pathParams: idParamSchema,
|
|
91
|
+
body: z.object({ data: updatePlatformRoleSchema }),
|
|
92
|
+
responses: {
|
|
93
|
+
200: userResponseSchema,
|
|
94
|
+
400: jsonApiErrorResponseSchema,
|
|
95
|
+
401: jsonApiErrorResponseSchema,
|
|
96
|
+
403: jsonApiErrorResponseSchema,
|
|
97
|
+
404: jsonApiErrorResponseSchema,
|
|
98
|
+
500: jsonApiErrorResponseSchema,
|
|
99
|
+
},
|
|
100
|
+
summary: 'Set or clear a user platform role',
|
|
54
101
|
},
|
|
55
102
|
createLoginLink: {
|
|
56
103
|
method: 'POST',
|
|
@@ -65,7 +112,22 @@ export const adminRouter = c.router({
|
|
|
65
112
|
500: jsonApiErrorResponseSchema,
|
|
66
113
|
},
|
|
67
114
|
summary: 'Create one-time login link (platform admin)',
|
|
68
|
-
description: 'Mint a short-lived, single-use login URL for a user. Restricted to
|
|
115
|
+
description: 'Mint a short-lived, single-use login URL for a user. Restricted to super admins.',
|
|
116
|
+
},
|
|
117
|
+
impersonateUser: {
|
|
118
|
+
method: 'POST',
|
|
119
|
+
path: '/admin/users/:id/impersonate',
|
|
120
|
+
pathParams: idParamSchema,
|
|
121
|
+
body: z.object({}),
|
|
122
|
+
responses: {
|
|
123
|
+
201: impersonationResponseSchema,
|
|
124
|
+
400: jsonApiErrorResponseSchema,
|
|
125
|
+
401: jsonApiErrorResponseSchema,
|
|
126
|
+
403: jsonApiErrorResponseSchema,
|
|
127
|
+
404: jsonApiErrorResponseSchema,
|
|
128
|
+
500: jsonApiErrorResponseSchema,
|
|
129
|
+
},
|
|
130
|
+
summary: 'Start impersonation session as target user',
|
|
69
131
|
},
|
|
70
132
|
sendPlatformDigest: {
|
|
71
133
|
method: 'POST',
|
|
@@ -91,6 +153,6 @@ export const adminRouter = c.router({
|
|
|
91
153
|
500: jsonApiErrorResponseSchema,
|
|
92
154
|
},
|
|
93
155
|
summary: 'Send platform digest now',
|
|
94
|
-
description: 'Send the previous-month platform digest email. Restricted to
|
|
156
|
+
description: 'Send the previous-month platform digest email. Restricted to super admins.',
|
|
95
157
|
},
|
|
96
158
|
});
|