@deepintel-ltd/farmpro-contracts 1.22.4 → 1.23.0
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 +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/routes/commodity-deals.routes.d.ts +175 -0
- package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
- package/dist/routes/index.d.ts +9 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +6 -0
- package/dist/routes/invoices.routes.d.ts +189 -42
- package/dist/routes/invoices.routes.d.ts.map +1 -1
- package/dist/routes/organization-capabilities.routes.d.ts +1671 -0
- package/dist/routes/organization-capabilities.routes.d.ts.map +1 -0
- package/dist/routes/organization-capabilities.routes.js +74 -0
- package/dist/routes/purchase-orders.routes.d.ts +2061 -0
- package/dist/routes/purchase-orders.routes.d.ts.map +1 -0
- package/dist/routes/purchase-orders.routes.js +55 -0
- package/dist/routes/trade-cash-events.routes.d.ts +3837 -0
- package/dist/routes/trade-cash-events.routes.d.ts.map +1 -0
- package/dist/routes/trade-cash-events.routes.js +126 -0
- package/dist/routes/waybills.routes.d.ts +210 -0
- package/dist/routes/waybills.routes.d.ts.map +1 -1
- package/dist/schemas/commodity-deals.schemas.d.ts +98 -0
- package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
- package/dist/schemas/commodity-deals.schemas.js +7 -0
- package/dist/schemas/invoices.schemas.d.ts +144 -30
- package/dist/schemas/invoices.schemas.d.ts.map +1 -1
- package/dist/schemas/invoices.schemas.js +8 -2
- package/dist/schemas/organization-capabilities.schemas.d.ts +355 -0
- package/dist/schemas/organization-capabilities.schemas.d.ts.map +1 -0
- package/dist/schemas/organization-capabilities.schemas.js +19 -0
- package/dist/schemas/purchase-orders.schemas.d.ts +1031 -0
- package/dist/schemas/purchase-orders.schemas.d.ts.map +1 -0
- package/dist/schemas/purchase-orders.schemas.js +49 -0
- package/dist/schemas/trade-cash-events.schemas.d.ts +1524 -0
- package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -0
- package/dist/schemas/trade-cash-events.schemas.js +131 -0
- package/dist/schemas/waybills.schemas.d.ts +168 -0
- package/dist/schemas/waybills.schemas.d.ts.map +1 -1
- package/dist/schemas/waybills.schemas.js +9 -0
- 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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCV,CAAC;AAG3B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBxC,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,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({
|
|
@@ -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
|
+
});
|