@deepintel-ltd/farmpro-contracts 1.22.4 → 1.23.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.
Files changed (80) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +6 -0
  4. package/dist/routes/categories.routes.d.ts +26 -26
  5. package/dist/routes/commodity-deals.routes.d.ts +217 -42
  6. package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
  7. package/dist/routes/crop-profile.routes.d.ts +8 -8
  8. package/dist/routes/farm-enterprises.routes.d.ts +395 -0
  9. package/dist/routes/farm-enterprises.routes.d.ts.map +1 -1
  10. package/dist/routes/farm-enterprises.routes.js +14 -1
  11. package/dist/routes/farms.routes.d.ts +73 -20
  12. package/dist/routes/farms.routes.d.ts.map +1 -1
  13. package/dist/routes/fertigation.routes.d.ts +96 -96
  14. package/dist/routes/field-monitoring.routes.d.ts +2 -2
  15. package/dist/routes/finance.routes.d.ts +8 -8
  16. package/dist/routes/index.d.ts +9 -0
  17. package/dist/routes/index.d.ts.map +1 -1
  18. package/dist/routes/index.js +6 -0
  19. package/dist/routes/invoices.routes.d.ts +210 -60
  20. package/dist/routes/invoices.routes.d.ts.map +1 -1
  21. package/dist/routes/invoices.routes.js +4 -1
  22. package/dist/routes/monitoring-visualization.routes.d.ts +2 -2
  23. package/dist/routes/notifications.routes.d.ts +12 -12
  24. package/dist/routes/organization-capabilities.routes.d.ts +1671 -0
  25. package/dist/routes/organization-capabilities.routes.d.ts.map +1 -0
  26. package/dist/routes/organization-capabilities.routes.js +74 -0
  27. package/dist/routes/organizations.routes.d.ts +90 -47
  28. package/dist/routes/organizations.routes.d.ts.map +1 -1
  29. package/dist/routes/purchase-orders.routes.d.ts +2061 -0
  30. package/dist/routes/purchase-orders.routes.d.ts.map +1 -0
  31. package/dist/routes/purchase-orders.routes.js +55 -0
  32. package/dist/routes/suppliers.routes.d.ts +96 -96
  33. package/dist/routes/team-payments.routes.d.ts +105 -105
  34. package/dist/routes/team.routes.d.ts +125 -25
  35. package/dist/routes/team.routes.d.ts.map +1 -1
  36. package/dist/routes/trade-cash-events.routes.d.ts +3837 -0
  37. package/dist/routes/trade-cash-events.routes.d.ts.map +1 -0
  38. package/dist/routes/trade-cash-events.routes.js +126 -0
  39. package/dist/routes/waybills.routes.d.ts +229 -15
  40. package/dist/routes/waybills.routes.d.ts.map +1 -1
  41. package/dist/routes/waybills.routes.js +4 -1
  42. package/dist/schemas/categories.schemas.d.ts +21 -21
  43. package/dist/schemas/commodity-deals.schemas.d.ts +116 -18
  44. package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
  45. package/dist/schemas/commodity-deals.schemas.js +7 -0
  46. package/dist/schemas/crop-profile.schemas.d.ts +12 -12
  47. package/dist/schemas/farm-enterprises.schemas.d.ts +185 -0
  48. package/dist/schemas/farm-enterprises.schemas.d.ts.map +1 -1
  49. package/dist/schemas/farm-enterprises.schemas.js +21 -0
  50. package/dist/schemas/farms.schemas.d.ts +121 -19
  51. package/dist/schemas/farms.schemas.d.ts.map +1 -1
  52. package/dist/schemas/farms.schemas.js +15 -1
  53. package/dist/schemas/fertigation.schemas.d.ts +36 -36
  54. package/dist/schemas/field-monitoring.schemas.d.ts +2 -2
  55. package/dist/schemas/finance.schemas.d.ts +8 -8
  56. package/dist/schemas/invoices.schemas.d.ts +153 -39
  57. package/dist/schemas/invoices.schemas.d.ts.map +1 -1
  58. package/dist/schemas/invoices.schemas.js +8 -2
  59. package/dist/schemas/notifications.schemas.d.ts +18 -18
  60. package/dist/schemas/organization-capabilities.schemas.d.ts +355 -0
  61. package/dist/schemas/organization-capabilities.schemas.d.ts.map +1 -0
  62. package/dist/schemas/organization-capabilities.schemas.js +19 -0
  63. package/dist/schemas/organizations.schemas.d.ts +105 -46
  64. package/dist/schemas/organizations.schemas.d.ts.map +1 -1
  65. package/dist/schemas/organizations.schemas.js +8 -1
  66. package/dist/schemas/purchase-orders.schemas.d.ts +1031 -0
  67. package/dist/schemas/purchase-orders.schemas.d.ts.map +1 -0
  68. package/dist/schemas/purchase-orders.schemas.js +49 -0
  69. package/dist/schemas/suppliers.schemas.d.ts +96 -96
  70. package/dist/schemas/team-payments.schemas.d.ts +87 -87
  71. package/dist/schemas/team.schemas.d.ts +137 -20
  72. package/dist/schemas/team.schemas.d.ts.map +1 -1
  73. package/dist/schemas/team.schemas.js +29 -1
  74. package/dist/schemas/trade-cash-events.schemas.d.ts +1524 -0
  75. package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -0
  76. package/dist/schemas/trade-cash-events.schemas.js +131 -0
  77. package/dist/schemas/waybills.schemas.d.ts +177 -9
  78. package/dist/schemas/waybills.schemas.d.ts.map +1 -1
  79. package/dist/schemas/waybills.schemas.js +9 -0
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"invoices.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/invoices.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAGH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCV,CAAC;AAG3B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBxC,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,CAAC"}
@@ -37,7 +37,7 @@ export const invoiceAttributesSchema = z.object({
37
37
  total: z.number().nonnegative(),
38
38
  currency: z.string().length(3).default('NGN'),
39
39
  paymentTerms: z.string().optional().nullable(),
40
- paymentStatus: z.enum(['pending', 'paid', 'overdue', 'cancelled']).default('pending'),
40
+ paymentStatus: z.enum(['pending', 'partial', 'paid', 'overdue', 'cancelled']).default('pending'),
41
41
  paidAt: z.string().datetime().optional().nullable(),
42
42
  notes: z.string().optional().nullable(),
43
43
  pdfUrl: z.string().url().optional().nullable(),
@@ -46,6 +46,9 @@ export const invoiceAttributesSchema = z.object({
46
46
  waybillNumber: z.string().optional().nullable(),
47
47
  waybillId: z.string().uuid().optional().nullable(),
48
48
  totalInWords: z.string().optional().nullable(),
49
+ farmId: z.string().uuid().optional().nullable(),
50
+ commercialIntent: z.enum(['farm_sale', 'trade']).optional().nullable(),
51
+ invoiceKind: z.enum(['provisional', 'final']).optional().default('final'),
49
52
  organizationId: z.string().uuid(),
50
53
  createdAt: z.string().datetime(),
51
54
  updatedAt: z.string().datetime(),
@@ -71,10 +74,13 @@ export const createInvoiceAttributesSchema = z.object({
71
74
  waybillNumber: z.string().optional(),
72
75
  waybillId: z.string().uuid().optional(),
73
76
  totalInWords: z.string().optional(),
77
+ farmId: z.string().uuid().optional(),
78
+ commercialIntent: z.enum(['farm_sale', 'trade']).optional(),
79
+ invoiceKind: z.enum(['provisional', 'final']).optional(),
74
80
  });
75
81
  // Invoice attributes for update (input)
76
82
  export const updateInvoiceAttributesSchema = createInvoiceAttributesSchema.partial().extend({
77
- paymentStatus: z.enum(['pending', 'paid', 'overdue', 'cancelled']).optional(),
83
+ paymentStatus: z.enum(['pending', 'partial', 'paid', 'overdue', 'cancelled']).optional(),
78
84
  });
79
85
  // Create invoice input (JSON:API format)
80
86
  export const createInvoiceSchema = z.object({
@@ -18,8 +18,8 @@ export declare const notificationAttributesSchema: z.ZodObject<{
18
18
  createdAt: string;
19
19
  metadata: Record<string, unknown> | null;
20
20
  body: string;
21
- farmId: string | null;
22
21
  userId: string;
22
+ farmId: string | null;
23
23
  readAt: string | null;
24
24
  }, {
25
25
  type: "team" | "weather" | "field_alert" | "task" | "payment" | "system" | "subscription" | "camera";
@@ -28,8 +28,8 @@ export declare const notificationAttributesSchema: z.ZodObject<{
28
28
  createdAt: string;
29
29
  metadata: Record<string, unknown> | null;
30
30
  body: string;
31
- farmId: string | null;
32
31
  userId: string;
32
+ farmId: string | null;
33
33
  readAt: string | null;
34
34
  }>;
35
35
  export declare const notificationResourceSchema: z.ZodObject<{
@@ -52,8 +52,8 @@ export declare const notificationResourceSchema: z.ZodObject<{
52
52
  createdAt: string;
53
53
  metadata: Record<string, unknown> | null;
54
54
  body: string;
55
- farmId: string | null;
56
55
  userId: string;
56
+ farmId: string | null;
57
57
  readAt: string | null;
58
58
  }, {
59
59
  type: "team" | "weather" | "field_alert" | "task" | "payment" | "system" | "subscription" | "camera";
@@ -62,8 +62,8 @@ export declare const notificationResourceSchema: z.ZodObject<{
62
62
  createdAt: string;
63
63
  metadata: Record<string, unknown> | null;
64
64
  body: string;
65
- farmId: string | null;
66
65
  userId: string;
66
+ farmId: string | null;
67
67
  readAt: string | null;
68
68
  }>;
69
69
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -79,8 +79,8 @@ export declare const notificationResourceSchema: z.ZodObject<{
79
79
  createdAt: string;
80
80
  metadata: Record<string, unknown> | null;
81
81
  body: string;
82
- farmId: string | null;
83
82
  userId: string;
83
+ farmId: string | null;
84
84
  readAt: string | null;
85
85
  };
86
86
  relationships?: Record<string, unknown> | undefined;
@@ -96,8 +96,8 @@ export declare const notificationResourceSchema: z.ZodObject<{
96
96
  createdAt: string;
97
97
  metadata: Record<string, unknown> | null;
98
98
  body: string;
99
- farmId: string | null;
100
99
  userId: string;
100
+ farmId: string | null;
101
101
  readAt: string | null;
102
102
  };
103
103
  relationships?: Record<string, unknown> | undefined;
@@ -125,8 +125,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
125
125
  createdAt: string;
126
126
  metadata: Record<string, unknown> | null;
127
127
  body: string;
128
- farmId: string | null;
129
128
  userId: string;
129
+ farmId: string | null;
130
130
  readAt: string | null;
131
131
  }, {
132
132
  type: "team" | "weather" | "field_alert" | "task" | "payment" | "system" | "subscription" | "camera";
@@ -135,8 +135,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
135
135
  createdAt: string;
136
136
  metadata: Record<string, unknown> | null;
137
137
  body: string;
138
- farmId: string | null;
139
138
  userId: string;
139
+ farmId: string | null;
140
140
  readAt: string | null;
141
141
  }>;
142
142
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -152,8 +152,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
152
152
  createdAt: string;
153
153
  metadata: Record<string, unknown> | null;
154
154
  body: string;
155
- farmId: string | null;
156
155
  userId: string;
156
+ farmId: string | null;
157
157
  readAt: string | null;
158
158
  };
159
159
  relationships?: Record<string, unknown> | undefined;
@@ -169,8 +169,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
169
169
  createdAt: string;
170
170
  metadata: Record<string, unknown> | null;
171
171
  body: string;
172
- farmId: string | null;
173
172
  userId: string;
173
+ farmId: string | null;
174
174
  readAt: string | null;
175
175
  };
176
176
  relationships?: Record<string, unknown> | undefined;
@@ -212,8 +212,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
212
212
  createdAt: string;
213
213
  metadata: Record<string, unknown> | null;
214
214
  body: string;
215
- farmId: string | null;
216
215
  userId: string;
216
+ farmId: string | null;
217
217
  readAt: string | null;
218
218
  };
219
219
  relationships?: Record<string, unknown> | undefined;
@@ -241,8 +241,8 @@ export declare const notificationResponseSchema: z.ZodObject<{
241
241
  createdAt: string;
242
242
  metadata: Record<string, unknown> | null;
243
243
  body: string;
244
- farmId: string | null;
245
244
  userId: string;
245
+ farmId: string | null;
246
246
  readAt: string | null;
247
247
  };
248
248
  relationships?: Record<string, unknown> | undefined;
@@ -281,8 +281,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
281
281
  createdAt: string;
282
282
  metadata: Record<string, unknown> | null;
283
283
  body: string;
284
- farmId: string | null;
285
284
  userId: string;
285
+ farmId: string | null;
286
286
  readAt: string | null;
287
287
  }, {
288
288
  type: "team" | "weather" | "field_alert" | "task" | "payment" | "system" | "subscription" | "camera";
@@ -291,8 +291,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
291
291
  createdAt: string;
292
292
  metadata: Record<string, unknown> | null;
293
293
  body: string;
294
- farmId: string | null;
295
294
  userId: string;
295
+ farmId: string | null;
296
296
  readAt: string | null;
297
297
  }>;
298
298
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -308,8 +308,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
308
308
  createdAt: string;
309
309
  metadata: Record<string, unknown> | null;
310
310
  body: string;
311
- farmId: string | null;
312
311
  userId: string;
312
+ farmId: string | null;
313
313
  readAt: string | null;
314
314
  };
315
315
  relationships?: Record<string, unknown> | undefined;
@@ -325,8 +325,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
325
325
  createdAt: string;
326
326
  metadata: Record<string, unknown> | null;
327
327
  body: string;
328
- farmId: string | null;
329
328
  userId: string;
329
+ farmId: string | null;
330
330
  readAt: string | null;
331
331
  };
332
332
  relationships?: Record<string, unknown> | undefined;
@@ -368,8 +368,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
368
368
  createdAt: string;
369
369
  metadata: Record<string, unknown> | null;
370
370
  body: string;
371
- farmId: string | null;
372
371
  userId: string;
372
+ farmId: string | null;
373
373
  readAt: string | null;
374
374
  };
375
375
  relationships?: Record<string, unknown> | undefined;
@@ -397,8 +397,8 @@ export declare const notificationListResponseSchema: z.ZodObject<{
397
397
  createdAt: string;
398
398
  metadata: Record<string, unknown> | null;
399
399
  body: string;
400
- farmId: string | null;
401
400
  userId: string;
401
+ farmId: string | null;
402
402
  readAt: string | null;
403
403
  };
404
404
  relationships?: Record<string, unknown> | undefined;
@@ -0,0 +1,355 @@
1
+ import { z } from 'zod';
2
+ export declare const organizationCapabilityTypeSchema: z.ZodEnum<["COMMODITY_TRADE"]>;
3
+ export declare const organizationCapabilityAttributesSchema: z.ZodObject<{
4
+ capability: z.ZodEnum<["COMMODITY_TRADE"]>;
5
+ enabledAt: z.ZodString;
6
+ enabledById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ } & {
8
+ createdAt: z.ZodString;
9
+ updatedAt: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ enabledAt: string;
14
+ capability: "COMMODITY_TRADE";
15
+ enabledById?: string | null | undefined;
16
+ }, {
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ enabledAt: string;
20
+ capability: "COMMODITY_TRADE";
21
+ enabledById?: string | null | undefined;
22
+ }>;
23
+ export declare const organizationCapabilityResourceSchema: z.ZodObject<{
24
+ type: z.ZodLiteral<string>;
25
+ id: z.ZodString;
26
+ attributes: z.ZodObject<{
27
+ capability: z.ZodEnum<["COMMODITY_TRADE"]>;
28
+ enabledAt: z.ZodString;
29
+ enabledById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ } & {
31
+ createdAt: z.ZodString;
32
+ updatedAt: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ enabledAt: string;
37
+ capability: "COMMODITY_TRADE";
38
+ enabledById?: string | null | undefined;
39
+ }, {
40
+ createdAt: string;
41
+ updatedAt: string;
42
+ enabledAt: string;
43
+ capability: "COMMODITY_TRADE";
44
+ enabledById?: string | null | undefined;
45
+ }>;
46
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
47
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: string;
51
+ id: string;
52
+ attributes: {
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ enabledAt: string;
56
+ capability: "COMMODITY_TRADE";
57
+ enabledById?: string | null | undefined;
58
+ };
59
+ relationships?: Record<string, unknown> | undefined;
60
+ links?: Record<string, string> | undefined;
61
+ meta?: Record<string, unknown> | undefined;
62
+ }, {
63
+ type: string;
64
+ id: string;
65
+ attributes: {
66
+ createdAt: string;
67
+ updatedAt: string;
68
+ enabledAt: string;
69
+ capability: "COMMODITY_TRADE";
70
+ enabledById?: string | null | undefined;
71
+ };
72
+ relationships?: Record<string, unknown> | undefined;
73
+ links?: Record<string, string> | undefined;
74
+ meta?: Record<string, unknown> | undefined;
75
+ }>;
76
+ export declare const organizationCapabilityResponseSchema: z.ZodObject<{
77
+ data: z.ZodObject<{
78
+ type: z.ZodLiteral<string>;
79
+ id: z.ZodString;
80
+ attributes: z.ZodObject<{
81
+ capability: z.ZodEnum<["COMMODITY_TRADE"]>;
82
+ enabledAt: z.ZodString;
83
+ enabledById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ } & {
85
+ createdAt: z.ZodString;
86
+ updatedAt: z.ZodString;
87
+ }, "strip", z.ZodTypeAny, {
88
+ createdAt: string;
89
+ updatedAt: string;
90
+ enabledAt: string;
91
+ capability: "COMMODITY_TRADE";
92
+ enabledById?: string | null | undefined;
93
+ }, {
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ enabledAt: string;
97
+ capability: "COMMODITY_TRADE";
98
+ enabledById?: string | null | undefined;
99
+ }>;
100
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
102
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ type: string;
105
+ id: string;
106
+ attributes: {
107
+ createdAt: string;
108
+ updatedAt: string;
109
+ enabledAt: string;
110
+ capability: "COMMODITY_TRADE";
111
+ enabledById?: string | null | undefined;
112
+ };
113
+ relationships?: Record<string, unknown> | undefined;
114
+ links?: Record<string, string> | undefined;
115
+ meta?: Record<string, unknown> | undefined;
116
+ }, {
117
+ type: string;
118
+ id: string;
119
+ attributes: {
120
+ createdAt: string;
121
+ updatedAt: string;
122
+ enabledAt: string;
123
+ capability: "COMMODITY_TRADE";
124
+ enabledById?: string | null | undefined;
125
+ };
126
+ relationships?: Record<string, unknown> | undefined;
127
+ links?: Record<string, string> | undefined;
128
+ meta?: Record<string, unknown> | undefined;
129
+ }>;
130
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
131
+ type: z.ZodString;
132
+ id: z.ZodString;
133
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
134
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
136
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ type: string;
139
+ id: string;
140
+ attributes?: Record<string, unknown> | undefined;
141
+ relationships?: Record<string, unknown> | undefined;
142
+ links?: Record<string, string> | undefined;
143
+ meta?: Record<string, unknown> | undefined;
144
+ }, {
145
+ type: string;
146
+ id: string;
147
+ attributes?: Record<string, unknown> | undefined;
148
+ relationships?: Record<string, unknown> | undefined;
149
+ links?: Record<string, string> | undefined;
150
+ meta?: Record<string, unknown> | undefined;
151
+ }>, "many">>;
152
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
153
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ data: {
156
+ type: string;
157
+ id: string;
158
+ attributes: {
159
+ createdAt: string;
160
+ updatedAt: string;
161
+ enabledAt: string;
162
+ capability: "COMMODITY_TRADE";
163
+ enabledById?: string | null | undefined;
164
+ };
165
+ relationships?: Record<string, unknown> | undefined;
166
+ links?: Record<string, string> | undefined;
167
+ meta?: Record<string, unknown> | undefined;
168
+ };
169
+ links?: Record<string, string> | undefined;
170
+ meta?: Record<string, unknown> | undefined;
171
+ included?: {
172
+ type: string;
173
+ id: string;
174
+ attributes?: Record<string, unknown> | undefined;
175
+ relationships?: Record<string, unknown> | undefined;
176
+ links?: Record<string, string> | undefined;
177
+ meta?: Record<string, unknown> | undefined;
178
+ }[] | undefined;
179
+ }, {
180
+ data: {
181
+ type: string;
182
+ id: string;
183
+ attributes: {
184
+ createdAt: string;
185
+ updatedAt: string;
186
+ enabledAt: string;
187
+ capability: "COMMODITY_TRADE";
188
+ enabledById?: string | null | undefined;
189
+ };
190
+ relationships?: Record<string, unknown> | undefined;
191
+ links?: Record<string, string> | undefined;
192
+ meta?: Record<string, unknown> | undefined;
193
+ };
194
+ links?: Record<string, string> | undefined;
195
+ meta?: Record<string, unknown> | undefined;
196
+ included?: {
197
+ type: string;
198
+ id: string;
199
+ attributes?: Record<string, unknown> | undefined;
200
+ relationships?: Record<string, unknown> | undefined;
201
+ links?: Record<string, string> | undefined;
202
+ meta?: Record<string, unknown> | undefined;
203
+ }[] | undefined;
204
+ }>;
205
+ export declare const organizationCapabilityListResponseSchema: z.ZodObject<{
206
+ data: z.ZodArray<z.ZodObject<{
207
+ type: z.ZodLiteral<string>;
208
+ id: z.ZodString;
209
+ attributes: z.ZodObject<{
210
+ capability: z.ZodEnum<["COMMODITY_TRADE"]>;
211
+ enabledAt: z.ZodString;
212
+ enabledById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ } & {
214
+ createdAt: z.ZodString;
215
+ updatedAt: z.ZodString;
216
+ }, "strip", z.ZodTypeAny, {
217
+ createdAt: string;
218
+ updatedAt: string;
219
+ enabledAt: string;
220
+ capability: "COMMODITY_TRADE";
221
+ enabledById?: string | null | undefined;
222
+ }, {
223
+ createdAt: string;
224
+ updatedAt: string;
225
+ enabledAt: string;
226
+ capability: "COMMODITY_TRADE";
227
+ enabledById?: string | null | undefined;
228
+ }>;
229
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
230
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
231
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ type: string;
234
+ id: string;
235
+ attributes: {
236
+ createdAt: string;
237
+ updatedAt: string;
238
+ enabledAt: string;
239
+ capability: "COMMODITY_TRADE";
240
+ enabledById?: string | null | undefined;
241
+ };
242
+ relationships?: Record<string, unknown> | undefined;
243
+ links?: Record<string, string> | undefined;
244
+ meta?: Record<string, unknown> | undefined;
245
+ }, {
246
+ type: string;
247
+ id: string;
248
+ attributes: {
249
+ createdAt: string;
250
+ updatedAt: string;
251
+ enabledAt: string;
252
+ capability: "COMMODITY_TRADE";
253
+ enabledById?: string | null | undefined;
254
+ };
255
+ relationships?: Record<string, unknown> | undefined;
256
+ links?: Record<string, string> | undefined;
257
+ meta?: Record<string, unknown> | undefined;
258
+ }>, "many">;
259
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
260
+ type: z.ZodString;
261
+ id: z.ZodString;
262
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
263
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
264
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
265
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ type: string;
268
+ id: string;
269
+ attributes?: Record<string, unknown> | undefined;
270
+ relationships?: Record<string, unknown> | undefined;
271
+ links?: Record<string, string> | undefined;
272
+ meta?: Record<string, unknown> | undefined;
273
+ }, {
274
+ type: string;
275
+ id: string;
276
+ attributes?: Record<string, unknown> | undefined;
277
+ relationships?: Record<string, unknown> | undefined;
278
+ links?: Record<string, string> | undefined;
279
+ meta?: Record<string, unknown> | undefined;
280
+ }>, "many">>;
281
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ data: {
285
+ type: string;
286
+ id: string;
287
+ attributes: {
288
+ createdAt: string;
289
+ updatedAt: string;
290
+ enabledAt: string;
291
+ capability: "COMMODITY_TRADE";
292
+ enabledById?: string | null | undefined;
293
+ };
294
+ relationships?: Record<string, unknown> | undefined;
295
+ links?: Record<string, string> | undefined;
296
+ meta?: Record<string, unknown> | undefined;
297
+ }[];
298
+ links?: Record<string, string> | undefined;
299
+ meta?: Record<string, unknown> | undefined;
300
+ included?: {
301
+ type: string;
302
+ id: string;
303
+ attributes?: Record<string, unknown> | undefined;
304
+ relationships?: Record<string, unknown> | undefined;
305
+ links?: Record<string, string> | undefined;
306
+ meta?: Record<string, unknown> | undefined;
307
+ }[] | undefined;
308
+ }, {
309
+ data: {
310
+ type: string;
311
+ id: string;
312
+ attributes: {
313
+ createdAt: string;
314
+ updatedAt: string;
315
+ enabledAt: string;
316
+ capability: "COMMODITY_TRADE";
317
+ enabledById?: string | null | undefined;
318
+ };
319
+ relationships?: Record<string, unknown> | undefined;
320
+ links?: Record<string, string> | undefined;
321
+ meta?: Record<string, unknown> | undefined;
322
+ }[];
323
+ links?: Record<string, string> | undefined;
324
+ meta?: Record<string, unknown> | undefined;
325
+ included?: {
326
+ type: string;
327
+ id: string;
328
+ attributes?: Record<string, unknown> | undefined;
329
+ relationships?: Record<string, unknown> | undefined;
330
+ links?: Record<string, string> | undefined;
331
+ meta?: Record<string, unknown> | undefined;
332
+ }[] | undefined;
333
+ }>;
334
+ export declare const enableOrganizationCapabilitySchema: z.ZodObject<{
335
+ type: z.ZodLiteral<"organization-capabilities">;
336
+ attributes: z.ZodObject<{
337
+ capability: z.ZodEnum<["COMMODITY_TRADE"]>;
338
+ }, "strip", z.ZodTypeAny, {
339
+ capability: "COMMODITY_TRADE";
340
+ }, {
341
+ capability: "COMMODITY_TRADE";
342
+ }>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ type: "organization-capabilities";
345
+ attributes: {
346
+ capability: "COMMODITY_TRADE";
347
+ };
348
+ }, {
349
+ type: "organization-capabilities";
350
+ attributes: {
351
+ capability: "COMMODITY_TRADE";
352
+ };
353
+ }>;
354
+ export type OrganizationCapabilityType = z.infer<typeof organizationCapabilityTypeSchema>;
355
+ //# sourceMappingURL=organization-capabilities.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-capabilities.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/organization-capabilities.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gCAAgC,gCAA8B,CAAC;AAE5E,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAE3B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhD,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhD,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EACkB,CAAC;AAExE,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;EAK7C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
3
+ export const organizationCapabilityTypeSchema = z.enum(['COMMODITY_TRADE']);
4
+ export const organizationCapabilityAttributesSchema = z
5
+ .object({
6
+ capability: organizationCapabilityTypeSchema,
7
+ enabledAt: z.string().datetime(),
8
+ enabledById: z.string().uuid().nullable().optional(),
9
+ })
10
+ .merge(timestampsSchema);
11
+ export const organizationCapabilityResourceSchema = createJsonApiResourceSchema('organization-capabilities', organizationCapabilityAttributesSchema);
12
+ export const organizationCapabilityResponseSchema = jsonApiSingleResponseSchema(organizationCapabilityResourceSchema);
13
+ export const organizationCapabilityListResponseSchema = jsonApiCollectionResponseSchema(organizationCapabilityResourceSchema);
14
+ export const enableOrganizationCapabilitySchema = z.object({
15
+ type: z.literal('organization-capabilities'),
16
+ attributes: z.object({
17
+ capability: organizationCapabilityTypeSchema,
18
+ }),
19
+ });