@deepintel-ltd/farmpro-contracts 1.5.24 → 1.5.25

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.
@@ -7,8 +7,8 @@ export const suppliersRouter = c.router({
7
7
  // Supplier routes
8
8
  listSuppliers: {
9
9
  method: 'GET',
10
- path: '/farms/:farmId/suppliers',
11
- pathParams: z.object({ farmId: z.string().uuid() }),
10
+ path: '/organizations/:organizationId/suppliers',
11
+ pathParams: z.object({ organizationId: z.string().uuid() }),
12
12
  query: jsonApiPaginationQuerySchema
13
13
  .merge(jsonApiSortQuerySchema)
14
14
  .merge(jsonApiIncludeQuerySchema)
@@ -22,12 +22,12 @@ export const suppliersRouter = c.router({
22
22
  401: jsonApiErrorResponseSchema,
23
23
  },
24
24
  summary: 'List suppliers',
25
- description: 'Get all suppliers for a farm with optional filtering',
25
+ description: 'Get all suppliers for an organization with optional filtering',
26
26
  },
27
27
  createSupplier: {
28
28
  method: 'POST',
29
- path: '/farms/:farmId/suppliers',
30
- pathParams: z.object({ farmId: z.string().uuid() }),
29
+ path: '/organizations/:organizationId/suppliers',
30
+ pathParams: z.object({ organizationId: z.string().uuid() }),
31
31
  body: z.object({ data: createSupplierSchema }),
32
32
  responses: {
33
33
  201: supplierResponseSchema,
@@ -41,9 +41,9 @@ export const suppliersRouter = c.router({
41
41
  },
42
42
  updateSupplier: {
43
43
  method: 'PATCH',
44
- path: '/farms/:farmId/suppliers/:id',
44
+ path: '/organizations/:organizationId/suppliers/:id',
45
45
  pathParams: z.object({
46
- farmId: z.string().uuid(),
46
+ organizationId: z.string().uuid(),
47
47
  id: z.string().uuid(),
48
48
  }),
49
49
  body: z.object({ data: updateSupplierSchema }),
@@ -59,9 +59,9 @@ export const suppliersRouter = c.router({
59
59
  },
60
60
  deleteSupplier: {
61
61
  method: 'DELETE',
62
- path: '/farms/:farmId/suppliers/:id',
62
+ path: '/organizations/:organizationId/suppliers/:id',
63
63
  pathParams: z.object({
64
- farmId: z.string().uuid(),
64
+ organizationId: z.string().uuid(),
65
65
  id: z.string().uuid(),
66
66
  }),
67
67
  responses: {
@@ -75,8 +75,8 @@ export const suppliersRouter = c.router({
75
75
  // Buyer routes
76
76
  listBuyers: {
77
77
  method: 'GET',
78
- path: '/farms/:farmId/buyers',
79
- pathParams: z.object({ farmId: z.string().uuid() }),
78
+ path: '/organizations/:organizationId/buyers',
79
+ pathParams: z.object({ organizationId: z.string().uuid() }),
80
80
  query: jsonApiPaginationQuerySchema
81
81
  .merge(jsonApiSortQuerySchema)
82
82
  .merge(jsonApiIncludeQuerySchema)
@@ -90,12 +90,12 @@ export const suppliersRouter = c.router({
90
90
  401: jsonApiErrorResponseSchema,
91
91
  },
92
92
  summary: 'List buyers',
93
- description: 'Get all buyers for a farm with optional filtering',
93
+ description: 'Get all buyers for an organization with optional filtering',
94
94
  },
95
95
  createBuyer: {
96
96
  method: 'POST',
97
- path: '/farms/:farmId/buyers',
98
- pathParams: z.object({ farmId: z.string().uuid() }),
97
+ path: '/organizations/:organizationId/buyers',
98
+ pathParams: z.object({ organizationId: z.string().uuid() }),
99
99
  body: z.object({ data: createBuyerSchema }),
100
100
  responses: {
101
101
  201: buyerResponseSchema,
@@ -109,9 +109,9 @@ export const suppliersRouter = c.router({
109
109
  },
110
110
  updateBuyer: {
111
111
  method: 'PATCH',
112
- path: '/farms/:farmId/buyers/:id',
112
+ path: '/organizations/:organizationId/buyers/:id',
113
113
  pathParams: z.object({
114
- farmId: z.string().uuid(),
114
+ organizationId: z.string().uuid(),
115
115
  id: z.string().uuid(),
116
116
  }),
117
117
  body: z.object({ data: updateBuyerSchema }),
@@ -127,9 +127,9 @@ export const suppliersRouter = c.router({
127
127
  },
128
128
  deleteBuyer: {
129
129
  method: 'DELETE',
130
- path: '/farms/:farmId/buyers/:id',
130
+ path: '/organizations/:organizationId/buyers/:id',
131
131
  pathParams: z.object({
132
- farmId: z.string().uuid(),
132
+ organizationId: z.string().uuid(),
133
133
  id: z.string().uuid(),
134
134
  }),
135
135
  responses: {