@deepintel-ltd/farmpro-contracts 1.22.3 → 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/livestock-groups.routes.d.ts +308 -0
- package/dist/routes/livestock-groups.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/staff.routes.d.ts +84 -0
- package/dist/routes/staff.routes.d.ts.map +1 -1
- 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/livestock-groups.schemas.d.ts +302 -0
- package/dist/schemas/livestock-groups.schemas.d.ts.map +1 -1
- package/dist/schemas/livestock-groups.schemas.js +22 -0
- 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/staff.schemas.d.ts +76 -0
- package/dist/schemas/staff.schemas.d.ts.map +1 -1
- package/dist/schemas/staff.schemas.js +6 -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":"livestock-groups.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/livestock-groups.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;GAOG;AAGH,eAAO,MAAM,wBAAwB,4HAUnC,CAAC;AAGH,eAAO,MAAM,kBAAkB,8CAI7B,CAAC;AAGH,eAAO,MAAM,iBAAiB,sEAM5B,CAAC;AAGH,eAAO,MAAM,qBAAqB,gKAYhC,CAAC;AAGH,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"livestock-groups.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/livestock-groups.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;GAOG;AAGH,eAAO,MAAM,wBAAwB,4HAUnC,CAAC;AAGH,eAAO,MAAM,kBAAkB,8CAI7B,CAAC;AAGH,eAAO,MAAM,iBAAiB,sEAM5B,CAAC;AAGH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AAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -75,6 +75,10 @@ export const livestockGroupAttributesSchema = z
|
|
|
75
75
|
averageDailyGain: z.number().positive().nullable(),
|
|
76
76
|
// Poultry-specific
|
|
77
77
|
eggProductionRate: z.number().min(0).max(100).nullable(),
|
|
78
|
+
houseCode: z.string().nullable().optional(),
|
|
79
|
+
stockType: z.string().nullable().optional(),
|
|
80
|
+
placementDate: z.string().datetime().nullable().optional(),
|
|
81
|
+
breedStandard: z.string().nullable().optional(),
|
|
78
82
|
// Fish-specific
|
|
79
83
|
pondSize: z.number().positive().nullable(),
|
|
80
84
|
stockingDensity: z.number().positive().nullable(),
|
|
@@ -108,6 +112,10 @@ export const createLivestockGroupAttributesSchema = z.object({
|
|
|
108
112
|
mortalityRate: z.number().min(0).max(100).optional(),
|
|
109
113
|
averageDailyGain: z.number().positive().optional(),
|
|
110
114
|
eggProductionRate: z.number().min(0).max(100).optional(),
|
|
115
|
+
houseCode: z.string().max(50).optional(),
|
|
116
|
+
stockType: z.enum(['DOC', 'POL']).optional(),
|
|
117
|
+
placementDate: z.string().datetime().optional(),
|
|
118
|
+
breedStandard: z.string().max(50).optional(),
|
|
111
119
|
pondSize: z.number().positive().optional(),
|
|
112
120
|
stockingDensity: z.number().positive().optional(),
|
|
113
121
|
status: groupStatusSchema.default('ACTIVE'),
|
|
@@ -135,6 +143,10 @@ export const updateLivestockGroupAttributesSchema = z.object({
|
|
|
135
143
|
mortalityRate: z.number().min(0).max(100).nullable().optional(),
|
|
136
144
|
averageDailyGain: z.number().positive().nullable().optional(),
|
|
137
145
|
eggProductionRate: z.number().min(0).max(100).nullable().optional(),
|
|
146
|
+
houseCode: z.string().max(50).nullable().optional(),
|
|
147
|
+
stockType: z.enum(['DOC', 'POL']).nullable().optional(),
|
|
148
|
+
placementDate: z.string().datetime().nullable().optional(),
|
|
149
|
+
breedStandard: z.string().max(50).nullable().optional(),
|
|
138
150
|
pondSize: z.number().positive().nullable().optional(),
|
|
139
151
|
stockingDensity: z.number().positive().nullable().optional(),
|
|
140
152
|
status: groupStatusSchema.optional(),
|
|
@@ -153,9 +165,14 @@ export const batchRecordAttributesSchema = z
|
|
|
153
165
|
sampleCount: z.number().int().positive().nullable(),
|
|
154
166
|
eggCount: z.number().int().nonnegative().nullable(),
|
|
155
167
|
brokenEggs: z.number().int().nonnegative().nullable(),
|
|
168
|
+
crackedEggs: z.number().int().nonnegative().nullable().optional(),
|
|
169
|
+
wastedEggs: z.number().int().nonnegative().nullable().optional(),
|
|
170
|
+
mortalityReason: z.string().nullable().optional(),
|
|
156
171
|
feedType: z.string().nullable(),
|
|
157
172
|
feedQuantity: z.number().positive().nullable(),
|
|
158
173
|
feedUnit: z.string().nullable(),
|
|
174
|
+
waterQuantity: z.number().positive().nullable().optional(),
|
|
175
|
+
waterUnit: z.string().nullable().optional(),
|
|
159
176
|
medication: z.string().nullable(),
|
|
160
177
|
vaccineName: z.string().nullable(),
|
|
161
178
|
dosage: z.string().nullable(),
|
|
@@ -177,9 +194,14 @@ export const createBatchRecordAttributesSchema = z.object({
|
|
|
177
194
|
sampleCount: z.number().int().positive().optional(),
|
|
178
195
|
eggCount: z.number().int().nonnegative().optional(),
|
|
179
196
|
brokenEggs: z.number().int().nonnegative().optional(),
|
|
197
|
+
crackedEggs: z.number().int().nonnegative().optional(),
|
|
198
|
+
wastedEggs: z.number().int().nonnegative().optional(),
|
|
199
|
+
mortalityReason: z.enum(['natural', 'cull']).optional(),
|
|
180
200
|
feedType: z.string().max(100).optional(),
|
|
181
201
|
feedQuantity: z.number().positive().optional(),
|
|
182
202
|
feedUnit: z.string().max(10).default('kg'),
|
|
203
|
+
waterQuantity: z.number().positive().optional(),
|
|
204
|
+
waterUnit: z.string().max(10).optional(),
|
|
183
205
|
medication: z.string().max(200).optional(),
|
|
184
206
|
vaccineName: z.string().max(200).optional(),
|
|
185
207
|
dosage: z.string().max(100).optional(),
|
|
@@ -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
|
+
});
|