@deepintel-ltd/farmpro-contracts 1.7.14 → 1.7.20
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 +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/routes/agent-workflows.routes.d.ts +88 -88
- package/dist/routes/agents.routes.d.ts +3266 -6
- package/dist/routes/agents.routes.d.ts.map +1 -1
- package/dist/routes/agents.routes.js +130 -1
- package/dist/routes/analytics.routes.d.ts +20 -20
- package/dist/routes/cooperative.routes.d.ts +1327 -0
- package/dist/routes/cooperative.routes.d.ts.map +1 -0
- package/dist/routes/cooperative.routes.js +47 -0
- package/dist/routes/documents.routes.d.ts +855 -58
- package/dist/routes/documents.routes.d.ts.map +1 -1
- package/dist/routes/documents.routes.js +43 -1
- package/dist/routes/equipment.routes.d.ts +38 -38
- package/dist/routes/extension.routes.d.ts +2431 -0
- package/dist/routes/extension.routes.d.ts.map +1 -0
- package/dist/routes/extension.routes.js +75 -0
- package/dist/routes/farm-status.routes.d.ts +315 -0
- package/dist/routes/farm-status.routes.d.ts.map +1 -0
- package/dist/routes/farm-status.routes.js +26 -0
- package/dist/routes/farms.routes.d.ts +775 -0
- package/dist/routes/farms.routes.d.ts.map +1 -1
- package/dist/routes/farms.routes.js +15 -1
- package/dist/routes/fertigation.routes.d.ts +148 -148
- package/dist/routes/field-monitoring.routes.d.ts +557 -52
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.js +23 -1
- package/dist/routes/field-observations.routes.d.ts +56 -56
- package/dist/routes/fields.routes.d.ts +156 -155
- package/dist/routes/fields.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.d.ts +3493 -0
- package/dist/routes/finance.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.js +158 -1
- package/dist/routes/geofences.routes.d.ts.map +1 -1
- package/dist/routes/index.d.ts +18 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +12 -0
- package/dist/routes/irrigation.routes.d.ts +6 -6
- package/dist/routes/live-monitor.routes.d.ts +513 -0
- package/dist/routes/live-monitor.routes.d.ts.map +1 -0
- package/dist/routes/live-monitor.routes.js +81 -0
- package/dist/routes/livestock-map.routes.d.ts +4 -4
- package/dist/routes/measurements.routes.d.ts +13 -4
- package/dist/routes/measurements.routes.d.ts.map +1 -1
- package/dist/routes/monitoring-visualization.routes.d.ts +40 -33
- package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
- package/dist/routes/monitoring-visualization.routes.js +7 -4
- package/dist/routes/notifications.routes.d.ts +1350 -0
- package/dist/routes/notifications.routes.d.ts.map +1 -0
- package/dist/routes/notifications.routes.js +66 -0
- package/dist/routes/pest-disease-risk.routes.d.ts +20 -20
- package/dist/routes/prescription-maps.routes.d.ts +567 -20
- package/dist/routes/prescription-maps.routes.d.ts.map +1 -1
- package/dist/routes/prescription-maps.routes.js +18 -1
- package/dist/routes/soil-tests.routes.d.ts +30 -30
- package/dist/routes/subscriptions.routes.d.ts +14 -14
- package/dist/routes/team-payments.routes.d.ts +9571 -0
- package/dist/routes/team-payments.routes.d.ts.map +1 -0
- package/dist/routes/team-payments.routes.js +262 -0
- package/dist/routes/weather.routes.d.ts +545 -52
- package/dist/routes/weather.routes.d.ts.map +1 -1
- package/dist/routes/weather.routes.js +13 -1
- package/dist/routes/yield-prediction.routes.d.ts +30 -30
- package/dist/schemas/agent-workflows.schemas.d.ts +92 -92
- package/dist/schemas/agents.schemas.d.ts +1121 -0
- package/dist/schemas/agents.schemas.d.ts.map +1 -1
- package/dist/schemas/agents.schemas.js +181 -0
- package/dist/schemas/analytics.schemas.d.ts +56 -56
- package/dist/schemas/cooperative.schemas.d.ts +560 -0
- package/dist/schemas/cooperative.schemas.d.ts.map +1 -0
- package/dist/schemas/cooperative.schemas.js +71 -0
- package/dist/schemas/documents.schemas.d.ts +248 -48
- package/dist/schemas/documents.schemas.d.ts.map +1 -1
- package/dist/schemas/documents.schemas.js +38 -0
- package/dist/schemas/equipment.schemas.d.ts +30 -30
- package/dist/schemas/extension.schemas.d.ts +1204 -0
- package/dist/schemas/extension.schemas.d.ts.map +1 -0
- package/dist/schemas/extension.schemas.js +68 -0
- package/dist/schemas/farm-status.schemas.d.ts +451 -0
- package/dist/schemas/farm-status.schemas.d.ts.map +1 -0
- package/dist/schemas/farm-status.schemas.js +44 -0
- package/dist/schemas/farms.schemas.d.ts +591 -0
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/farms.schemas.js +44 -0
- package/dist/schemas/fertigation.schemas.d.ts +50 -50
- package/dist/schemas/field-monitoring.schemas.d.ts +318 -42
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -1
- package/dist/schemas/field-monitoring.schemas.js +9 -0
- package/dist/schemas/field-observations.schemas.d.ts +45 -44
- package/dist/schemas/field-observations.schemas.d.ts.map +1 -1
- package/dist/schemas/fields.schemas.d.ts +188 -186
- package/dist/schemas/fields.schemas.d.ts.map +1 -1
- package/dist/schemas/fields.schemas.js +10 -2
- package/dist/schemas/finance.schemas.d.ts +1057 -0
- package/dist/schemas/finance.schemas.d.ts.map +1 -1
- package/dist/schemas/finance.schemas.js +170 -0
- package/dist/schemas/irrigation.schemas.d.ts +8 -8
- package/dist/schemas/live-monitor.schemas.d.ts +596 -0
- package/dist/schemas/live-monitor.schemas.d.ts.map +1 -0
- package/dist/schemas/live-monitor.schemas.js +107 -0
- package/dist/schemas/livestock-map.schemas.d.ts +10 -10
- package/dist/schemas/measurements.schemas.d.ts +21 -8
- package/dist/schemas/measurements.schemas.d.ts.map +1 -1
- package/dist/schemas/measurements.schemas.js +13 -6
- package/dist/schemas/monitoring-visualization.schemas.d.ts +47 -40
- package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
- package/dist/schemas/monitoring-visualization.schemas.js +24 -16
- package/dist/schemas/notifications.schemas.d.ts +464 -0
- package/dist/schemas/notifications.schemas.d.ts.map +1 -0
- package/dist/schemas/notifications.schemas.js +40 -0
- package/dist/schemas/pest-disease-risk.schemas.d.ts +18 -18
- package/dist/schemas/prescription-maps.schemas.d.ts +41 -18
- package/dist/schemas/prescription-maps.schemas.d.ts.map +1 -1
- package/dist/schemas/prescription-maps.schemas.js +8 -0
- package/dist/schemas/recommendations.schemas.d.ts +2 -2
- package/dist/schemas/soil-tests.schemas.d.ts +28 -28
- package/dist/schemas/subscriptions.schemas.d.ts +22 -22
- package/dist/schemas/team-payments.schemas.d.ts +2604 -0
- package/dist/schemas/team-payments.schemas.d.ts.map +1 -0
- package/dist/schemas/team-payments.schemas.js +151 -0
- package/dist/schemas/weather.schemas.d.ts +789 -112
- package/dist/schemas/weather.schemas.d.ts.map +1 -1
- package/dist/schemas/weather.schemas.js +37 -0
- package/dist/schemas/yield-prediction.schemas.d.ts +12 -12
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-payments.routes.d.ts","sourceRoot":"","sources":["../../src/routes/team-payments.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-rest/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { createCompanyPaymentAccountSchema, updateCompanyPaymentAccountSchema, companyPaymentAccountResponseSchema, companyPaymentAccountListResponseSchema, createTeamSpendLimitSchema, updateTeamSpendLimitSchema, teamSpendLimitResponseSchema, teamSpendLimitListResponseSchema, initiateVendorPaymentSchema, vendorPaymentResponseSchema, vendorPaymentListResponseSchema, paymentApprovalListResponseSchema, paymentApprovalActionInputSchema, } from '../schemas/team-payments.schemas';
|
|
4
|
+
import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiFilterQuerySchema, } from '../schemas/common.schemas';
|
|
5
|
+
const c = initContract();
|
|
6
|
+
export const teamPaymentsRouter = c.router({
|
|
7
|
+
listPaymentAccounts: {
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/farms/:farmId/payment-accounts',
|
|
10
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
11
|
+
query: jsonApiPaginationQuerySchema.merge(jsonApiSortQuerySchema),
|
|
12
|
+
responses: {
|
|
13
|
+
200: companyPaymentAccountListResponseSchema,
|
|
14
|
+
401: jsonApiErrorResponseSchema,
|
|
15
|
+
403: jsonApiErrorResponseSchema,
|
|
16
|
+
404: jsonApiErrorResponseSchema,
|
|
17
|
+
},
|
|
18
|
+
summary: 'List company payment accounts',
|
|
19
|
+
description: 'List linked payment accounts for the farm organization',
|
|
20
|
+
},
|
|
21
|
+
createPaymentAccount: {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/farms/:farmId/payment-accounts',
|
|
24
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
25
|
+
body: z.object({ data: createCompanyPaymentAccountSchema }),
|
|
26
|
+
responses: {
|
|
27
|
+
201: companyPaymentAccountResponseSchema,
|
|
28
|
+
400: jsonApiErrorResponseSchema,
|
|
29
|
+
401: jsonApiErrorResponseSchema,
|
|
30
|
+
403: jsonApiErrorResponseSchema,
|
|
31
|
+
404: jsonApiErrorResponseSchema,
|
|
32
|
+
422: jsonApiErrorResponseSchema,
|
|
33
|
+
},
|
|
34
|
+
summary: 'Create company payment account',
|
|
35
|
+
description: 'Link a company payment account (Flutterwave, Paystack, OPay, etc.)',
|
|
36
|
+
},
|
|
37
|
+
getPaymentAccount: {
|
|
38
|
+
method: 'GET',
|
|
39
|
+
path: '/farms/:farmId/payment-accounts/:id',
|
|
40
|
+
pathParams: z.object({
|
|
41
|
+
farmId: z.string().uuid(),
|
|
42
|
+
id: z.string().uuid(),
|
|
43
|
+
}),
|
|
44
|
+
responses: {
|
|
45
|
+
200: companyPaymentAccountResponseSchema,
|
|
46
|
+
401: jsonApiErrorResponseSchema,
|
|
47
|
+
403: jsonApiErrorResponseSchema,
|
|
48
|
+
404: jsonApiErrorResponseSchema,
|
|
49
|
+
},
|
|
50
|
+
summary: 'Get company payment account',
|
|
51
|
+
},
|
|
52
|
+
updatePaymentAccount: {
|
|
53
|
+
method: 'PATCH',
|
|
54
|
+
path: '/farms/:farmId/payment-accounts/:id',
|
|
55
|
+
pathParams: z.object({
|
|
56
|
+
farmId: z.string().uuid(),
|
|
57
|
+
id: z.string().uuid(),
|
|
58
|
+
}),
|
|
59
|
+
body: z.object({ data: updateCompanyPaymentAccountSchema }),
|
|
60
|
+
responses: {
|
|
61
|
+
200: companyPaymentAccountResponseSchema,
|
|
62
|
+
400: jsonApiErrorResponseSchema,
|
|
63
|
+
401: jsonApiErrorResponseSchema,
|
|
64
|
+
403: jsonApiErrorResponseSchema,
|
|
65
|
+
404: jsonApiErrorResponseSchema,
|
|
66
|
+
422: jsonApiErrorResponseSchema,
|
|
67
|
+
},
|
|
68
|
+
summary: 'Update company payment account',
|
|
69
|
+
},
|
|
70
|
+
deletePaymentAccount: {
|
|
71
|
+
method: 'DELETE',
|
|
72
|
+
path: '/farms/:farmId/payment-accounts/:id',
|
|
73
|
+
pathParams: z.object({
|
|
74
|
+
farmId: z.string().uuid(),
|
|
75
|
+
id: z.string().uuid(),
|
|
76
|
+
}),
|
|
77
|
+
responses: {
|
|
78
|
+
204: jsonApiSuccessResponseSchema,
|
|
79
|
+
401: jsonApiErrorResponseSchema,
|
|
80
|
+
403: jsonApiErrorResponseSchema,
|
|
81
|
+
404: jsonApiErrorResponseSchema,
|
|
82
|
+
},
|
|
83
|
+
summary: 'Delete company payment account',
|
|
84
|
+
},
|
|
85
|
+
listSpendLimits: {
|
|
86
|
+
method: 'GET',
|
|
87
|
+
path: '/farms/:farmId/spend-limits',
|
|
88
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
89
|
+
query: jsonApiPaginationQuerySchema.merge(jsonApiSortQuerySchema),
|
|
90
|
+
responses: {
|
|
91
|
+
200: teamSpendLimitListResponseSchema,
|
|
92
|
+
401: jsonApiErrorResponseSchema,
|
|
93
|
+
403: jsonApiErrorResponseSchema,
|
|
94
|
+
404: jsonApiErrorResponseSchema,
|
|
95
|
+
},
|
|
96
|
+
summary: 'List team spend limits',
|
|
97
|
+
},
|
|
98
|
+
createSpendLimit: {
|
|
99
|
+
method: 'POST',
|
|
100
|
+
path: '/farms/:farmId/spend-limits',
|
|
101
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
102
|
+
body: z.object({ data: createTeamSpendLimitSchema }),
|
|
103
|
+
responses: {
|
|
104
|
+
201: teamSpendLimitResponseSchema,
|
|
105
|
+
400: jsonApiErrorResponseSchema,
|
|
106
|
+
401: jsonApiErrorResponseSchema,
|
|
107
|
+
403: jsonApiErrorResponseSchema,
|
|
108
|
+
404: jsonApiErrorResponseSchema,
|
|
109
|
+
422: jsonApiErrorResponseSchema,
|
|
110
|
+
},
|
|
111
|
+
summary: 'Create team spend limit',
|
|
112
|
+
},
|
|
113
|
+
getSpendLimit: {
|
|
114
|
+
method: 'GET',
|
|
115
|
+
path: '/farms/:farmId/spend-limits/:id',
|
|
116
|
+
pathParams: z.object({
|
|
117
|
+
farmId: z.string().uuid(),
|
|
118
|
+
id: z.string().uuid(),
|
|
119
|
+
}),
|
|
120
|
+
responses: {
|
|
121
|
+
200: teamSpendLimitResponseSchema,
|
|
122
|
+
401: jsonApiErrorResponseSchema,
|
|
123
|
+
403: jsonApiErrorResponseSchema,
|
|
124
|
+
404: jsonApiErrorResponseSchema,
|
|
125
|
+
},
|
|
126
|
+
summary: 'Get team spend limit',
|
|
127
|
+
},
|
|
128
|
+
updateSpendLimit: {
|
|
129
|
+
method: 'PATCH',
|
|
130
|
+
path: '/farms/:farmId/spend-limits/:id',
|
|
131
|
+
pathParams: z.object({
|
|
132
|
+
farmId: z.string().uuid(),
|
|
133
|
+
id: z.string().uuid(),
|
|
134
|
+
}),
|
|
135
|
+
body: z.object({ data: updateTeamSpendLimitSchema }),
|
|
136
|
+
responses: {
|
|
137
|
+
200: teamSpendLimitResponseSchema,
|
|
138
|
+
400: jsonApiErrorResponseSchema,
|
|
139
|
+
401: jsonApiErrorResponseSchema,
|
|
140
|
+
403: jsonApiErrorResponseSchema,
|
|
141
|
+
404: jsonApiErrorResponseSchema,
|
|
142
|
+
422: jsonApiErrorResponseSchema,
|
|
143
|
+
},
|
|
144
|
+
summary: 'Update team spend limit',
|
|
145
|
+
},
|
|
146
|
+
deleteSpendLimit: {
|
|
147
|
+
method: 'DELETE',
|
|
148
|
+
path: '/farms/:farmId/spend-limits/:id',
|
|
149
|
+
pathParams: z.object({
|
|
150
|
+
farmId: z.string().uuid(),
|
|
151
|
+
id: z.string().uuid(),
|
|
152
|
+
}),
|
|
153
|
+
responses: {
|
|
154
|
+
204: jsonApiSuccessResponseSchema,
|
|
155
|
+
401: jsonApiErrorResponseSchema,
|
|
156
|
+
403: jsonApiErrorResponseSchema,
|
|
157
|
+
404: jsonApiErrorResponseSchema,
|
|
158
|
+
},
|
|
159
|
+
summary: 'Delete team spend limit',
|
|
160
|
+
},
|
|
161
|
+
listPayments: {
|
|
162
|
+
method: 'GET',
|
|
163
|
+
path: '/farms/:farmId/vendor-payments',
|
|
164
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
165
|
+
query: jsonApiPaginationQuerySchema
|
|
166
|
+
.merge(jsonApiSortQuerySchema)
|
|
167
|
+
.merge(jsonApiFilterQuerySchema)
|
|
168
|
+
.merge(z.object({
|
|
169
|
+
'filter[status]': z.string().optional(),
|
|
170
|
+
'filter[initiatedById]': z.string().uuid().optional(),
|
|
171
|
+
})),
|
|
172
|
+
responses: {
|
|
173
|
+
200: vendorPaymentListResponseSchema,
|
|
174
|
+
401: jsonApiErrorResponseSchema,
|
|
175
|
+
403: jsonApiErrorResponseSchema,
|
|
176
|
+
404: jsonApiErrorResponseSchema,
|
|
177
|
+
},
|
|
178
|
+
summary: 'List vendor payments',
|
|
179
|
+
},
|
|
180
|
+
initiatePayment: {
|
|
181
|
+
method: 'POST',
|
|
182
|
+
path: '/farms/:farmId/vendor-payments',
|
|
183
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
184
|
+
body: z.object({ data: initiateVendorPaymentSchema }),
|
|
185
|
+
responses: {
|
|
186
|
+
201: vendorPaymentResponseSchema,
|
|
187
|
+
400: jsonApiErrorResponseSchema,
|
|
188
|
+
401: jsonApiErrorResponseSchema,
|
|
189
|
+
403: jsonApiErrorResponseSchema,
|
|
190
|
+
404: jsonApiErrorResponseSchema,
|
|
191
|
+
422: jsonApiErrorResponseSchema,
|
|
192
|
+
},
|
|
193
|
+
summary: 'Initiate vendor payment',
|
|
194
|
+
description: 'Create a vendor payment after spend-limit checks. May require approval.',
|
|
195
|
+
},
|
|
196
|
+
getPayment: {
|
|
197
|
+
method: 'GET',
|
|
198
|
+
path: '/farms/:farmId/vendor-payments/:id',
|
|
199
|
+
pathParams: z.object({
|
|
200
|
+
farmId: z.string().uuid(),
|
|
201
|
+
id: z.string().uuid(),
|
|
202
|
+
}),
|
|
203
|
+
responses: {
|
|
204
|
+
200: vendorPaymentResponseSchema,
|
|
205
|
+
401: jsonApiErrorResponseSchema,
|
|
206
|
+
403: jsonApiErrorResponseSchema,
|
|
207
|
+
404: jsonApiErrorResponseSchema,
|
|
208
|
+
},
|
|
209
|
+
summary: 'Get vendor payment',
|
|
210
|
+
},
|
|
211
|
+
getApprovalsInbox: {
|
|
212
|
+
method: 'GET',
|
|
213
|
+
path: '/farms/:farmId/vendor-payments/approvals/inbox',
|
|
214
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
215
|
+
query: jsonApiPaginationQuerySchema.merge(jsonApiSortQuerySchema),
|
|
216
|
+
responses: {
|
|
217
|
+
200: paymentApprovalListResponseSchema,
|
|
218
|
+
401: jsonApiErrorResponseSchema,
|
|
219
|
+
403: jsonApiErrorResponseSchema,
|
|
220
|
+
404: jsonApiErrorResponseSchema,
|
|
221
|
+
},
|
|
222
|
+
summary: 'List pending payment approvals',
|
|
223
|
+
description: 'Inbox of payments awaiting approval for owner, farm-manager, or accountant',
|
|
224
|
+
},
|
|
225
|
+
approvePayment: {
|
|
226
|
+
method: 'POST',
|
|
227
|
+
path: '/farms/:farmId/vendor-payments/:id/approve',
|
|
228
|
+
pathParams: z.object({
|
|
229
|
+
farmId: z.string().uuid(),
|
|
230
|
+
id: z.string().uuid(),
|
|
231
|
+
}),
|
|
232
|
+
body: z.object({ data: paymentApprovalActionInputSchema.optional() }),
|
|
233
|
+
responses: {
|
|
234
|
+
200: vendorPaymentResponseSchema,
|
|
235
|
+
400: jsonApiErrorResponseSchema,
|
|
236
|
+
401: jsonApiErrorResponseSchema,
|
|
237
|
+
403: jsonApiErrorResponseSchema,
|
|
238
|
+
404: jsonApiErrorResponseSchema,
|
|
239
|
+
422: jsonApiErrorResponseSchema,
|
|
240
|
+
},
|
|
241
|
+
summary: 'Approve vendor payment',
|
|
242
|
+
description: 'Approve and execute a pending vendor payment',
|
|
243
|
+
},
|
|
244
|
+
rejectPayment: {
|
|
245
|
+
method: 'POST',
|
|
246
|
+
path: '/farms/:farmId/vendor-payments/:id/reject',
|
|
247
|
+
pathParams: z.object({
|
|
248
|
+
farmId: z.string().uuid(),
|
|
249
|
+
id: z.string().uuid(),
|
|
250
|
+
}),
|
|
251
|
+
body: z.object({ data: paymentApprovalActionInputSchema.optional() }),
|
|
252
|
+
responses: {
|
|
253
|
+
200: vendorPaymentResponseSchema,
|
|
254
|
+
400: jsonApiErrorResponseSchema,
|
|
255
|
+
401: jsonApiErrorResponseSchema,
|
|
256
|
+
403: jsonApiErrorResponseSchema,
|
|
257
|
+
404: jsonApiErrorResponseSchema,
|
|
258
|
+
422: jsonApiErrorResponseSchema,
|
|
259
|
+
},
|
|
260
|
+
summary: 'Reject vendor payment',
|
|
261
|
+
},
|
|
262
|
+
});
|