@deepintel-ltd/farmpro-contracts 1.21.0 → 1.22.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.
- package/dist/routes/commodity-deals.routes.d.ts +63 -63
- package/dist/routes/fields.routes.d.ts +1413 -1
- package/dist/routes/fields.routes.d.ts.map +1 -1
- package/dist/routes/fields.routes.js +43 -3
- package/dist/schemas/commodity-deals.schemas.d.ts +39 -39
- package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
- package/dist/schemas/commodity-deals.schemas.js +5 -1
- package/dist/schemas/fields.schemas.d.ts +63 -0
- package/dist/schemas/fields.schemas.d.ts.map +1 -1
- package/dist/schemas/fields.schemas.js +11 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;YAWjB,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgNxE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { createFieldSchema, updateFieldSchema, recordPlantingSchema, endSeasonSchema, fieldResponseSchema, fieldDetailResponseSchema, fieldListResponseSchema, seasonTimelineListResponseSchema, } from '../schemas/fields.schemas';
|
|
3
|
+
import { createFieldSchema, updateFieldSchema, recordPlantingSchema, endSeasonSchema, fieldArchiveSchema, fieldRestoreSchema, fieldResponseSchema, fieldDetailResponseSchema, fieldListResponseSchema, seasonTimelineListResponseSchema, } from '../schemas/fields.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiIncludeQuerySchema, jsonApiFilterQuerySchema, simpleApiErrorSchema, } from '../schemas/common.schemas';
|
|
5
5
|
import { uploadFileBodySchema } from '../schemas/files.schemas';
|
|
6
6
|
const c = initContract();
|
|
@@ -13,7 +13,11 @@ export const fieldsRouter = c.router({
|
|
|
13
13
|
query: jsonApiPaginationQuerySchema
|
|
14
14
|
.merge(jsonApiSortQuerySchema)
|
|
15
15
|
.merge(jsonApiIncludeQuerySchema)
|
|
16
|
-
.merge(jsonApiFilterQuerySchema)
|
|
16
|
+
.merge(jsonApiFilterQuerySchema)
|
|
17
|
+
.extend({
|
|
18
|
+
/** Default omits archived. Pass `true` for archived-only list. */
|
|
19
|
+
'filter[archived]': z.enum(['true', 'false']).optional(),
|
|
20
|
+
}),
|
|
17
21
|
responses: {
|
|
18
22
|
200: fieldListResponseSchema,
|
|
19
23
|
400: jsonApiErrorResponseSchema,
|
|
@@ -21,7 +25,7 @@ export const fieldsRouter = c.router({
|
|
|
21
25
|
401: jsonApiErrorResponseSchema,
|
|
22
26
|
},
|
|
23
27
|
summary: 'List fields for a farm',
|
|
24
|
-
description: 'Get
|
|
28
|
+
description: 'Get fields for a farm. Active fields only by default; use filter[archived]=true for archived fields',
|
|
25
29
|
},
|
|
26
30
|
// Create a new field
|
|
27
31
|
createField: {
|
|
@@ -115,6 +119,42 @@ export const fieldsRouter = c.router({
|
|
|
115
119
|
summary: 'End season',
|
|
116
120
|
description: 'Archive the active crop into cropHistory, clear crop lifecycle fields, cancel in-season tasks, and pause fertigation schedules',
|
|
117
121
|
},
|
|
122
|
+
// Soft-archive field (hide from default lists)
|
|
123
|
+
archiveField: {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
path: '/farms/:farmId/fields/:id/archive',
|
|
126
|
+
pathParams: z.object({
|
|
127
|
+
farmId: z.string().uuid(),
|
|
128
|
+
id: z.string().uuid(),
|
|
129
|
+
}),
|
|
130
|
+
body: z.object({ data: fieldArchiveSchema }),
|
|
131
|
+
responses: {
|
|
132
|
+
200: fieldResponseSchema,
|
|
133
|
+
400: jsonApiErrorResponseSchema,
|
|
134
|
+
404: jsonApiErrorResponseSchema,
|
|
135
|
+
401: jsonApiErrorResponseSchema,
|
|
136
|
+
},
|
|
137
|
+
summary: 'Archive field',
|
|
138
|
+
description: 'Soft-archive a field so it is hidden from the default fields list',
|
|
139
|
+
},
|
|
140
|
+
// Restore archived field
|
|
141
|
+
restoreField: {
|
|
142
|
+
method: 'POST',
|
|
143
|
+
path: '/farms/:farmId/fields/:id/restore',
|
|
144
|
+
pathParams: z.object({
|
|
145
|
+
farmId: z.string().uuid(),
|
|
146
|
+
id: z.string().uuid(),
|
|
147
|
+
}),
|
|
148
|
+
body: z.object({ data: fieldRestoreSchema }),
|
|
149
|
+
responses: {
|
|
150
|
+
200: fieldResponseSchema,
|
|
151
|
+
400: jsonApiErrorResponseSchema,
|
|
152
|
+
404: jsonApiErrorResponseSchema,
|
|
153
|
+
401: jsonApiErrorResponseSchema,
|
|
154
|
+
},
|
|
155
|
+
summary: 'Restore field',
|
|
156
|
+
description: 'Restore a soft-archived field to the active fields list',
|
|
157
|
+
},
|
|
118
158
|
// Merged season timeline (harvests, soil tests, field activities, planting)
|
|
119
159
|
listSeasonTimeline: {
|
|
120
160
|
method: 'GET',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const commodityDealStatusSchema: z.ZodEnum<["draft", "in_transit", "invoiced", "paid", "cancelled"]>;
|
|
3
|
-
export declare const companyFeeModeSchema: z.ZodEnum<["percent_of_invoice", "per_kg"]>;
|
|
3
|
+
export declare const companyFeeModeSchema: z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>;
|
|
4
4
|
export declare const dealParticipantShareSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodOptional<z.ZodString>;
|
|
6
6
|
userId: z.ZodString;
|
|
@@ -94,7 +94,7 @@ export declare const commodityDealAttributesSchema: z.ZodObject<{
|
|
|
94
94
|
status: z.ZodEnum<["draft", "in_transit", "invoiced", "paid", "cancelled"]>;
|
|
95
95
|
notes: z.ZodNullable<z.ZodString>;
|
|
96
96
|
dealCapital: z.ZodNullable<z.ZodNumber>;
|
|
97
|
-
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
97
|
+
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
98
98
|
companyFeeValue: z.ZodNullable<z.ZodNumber>;
|
|
99
99
|
totalWeightKg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
100
100
|
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -197,7 +197,7 @@ export declare const commodityDealAttributesSchema: z.ZodObject<{
|
|
|
197
197
|
waybillId: string;
|
|
198
198
|
handlerUserId: string | null;
|
|
199
199
|
dealCapital: number | null;
|
|
200
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
200
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
201
201
|
companyFeeValue: number | null;
|
|
202
202
|
computed: {
|
|
203
203
|
totalCost: number;
|
|
@@ -244,7 +244,7 @@ export declare const commodityDealAttributesSchema: z.ZodObject<{
|
|
|
244
244
|
waybillId: string;
|
|
245
245
|
handlerUserId: string | null;
|
|
246
246
|
dealCapital: number | null;
|
|
247
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
247
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
248
248
|
companyFeeValue: number | null;
|
|
249
249
|
computed: {
|
|
250
250
|
totalCost: number;
|
|
@@ -287,7 +287,7 @@ export declare const createCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
287
287
|
notes: z.ZodOptional<z.ZodString>;
|
|
288
288
|
handlerUserId: z.ZodOptional<z.ZodString>;
|
|
289
289
|
dealCapital: z.ZodOptional<z.ZodNumber>;
|
|
290
|
-
companyFeeMode: z.ZodOptional<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
290
|
+
companyFeeMode: z.ZodOptional<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
291
291
|
companyFeeValue: z.ZodOptional<z.ZodNumber>;
|
|
292
292
|
}, "strip", z.ZodTypeAny, {
|
|
293
293
|
currency: string;
|
|
@@ -299,7 +299,7 @@ export declare const createCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
299
299
|
notes?: string | undefined;
|
|
300
300
|
handlerUserId?: string | undefined;
|
|
301
301
|
dealCapital?: number | undefined;
|
|
302
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
302
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
303
303
|
companyFeeValue?: number | undefined;
|
|
304
304
|
}, {
|
|
305
305
|
purchaseCost: number;
|
|
@@ -311,7 +311,7 @@ export declare const createCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
311
311
|
miscellaneousCost?: number | undefined;
|
|
312
312
|
handlerUserId?: string | undefined;
|
|
313
313
|
dealCapital?: number | undefined;
|
|
314
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
314
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
315
315
|
companyFeeValue?: number | undefined;
|
|
316
316
|
}>;
|
|
317
317
|
export declare const updateCommodityDealAttributesSchema: z.ZodObject<{
|
|
@@ -324,7 +324,7 @@ export declare const updateCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
324
324
|
invoiceId: z.ZodOptional<z.ZodString>;
|
|
325
325
|
handlerUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
326
|
dealCapital: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
327
|
-
companyFeeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>>;
|
|
327
|
+
companyFeeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>>;
|
|
328
328
|
companyFeeValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
329
329
|
/** Set ISO datetime to mark paid out; null to mark unpaid. */
|
|
330
330
|
staffCommissionPaidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -338,7 +338,7 @@ export declare const updateCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
338
338
|
miscellaneousCost?: number | undefined;
|
|
339
339
|
handlerUserId?: string | null | undefined;
|
|
340
340
|
dealCapital?: number | null | undefined;
|
|
341
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
341
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
342
342
|
companyFeeValue?: number | null | undefined;
|
|
343
343
|
staffCommissionPaidAt?: string | null | undefined;
|
|
344
344
|
}, {
|
|
@@ -351,7 +351,7 @@ export declare const updateCommodityDealAttributesSchema: z.ZodObject<{
|
|
|
351
351
|
miscellaneousCost?: number | undefined;
|
|
352
352
|
handlerUserId?: string | null | undefined;
|
|
353
353
|
dealCapital?: number | null | undefined;
|
|
354
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
354
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
355
355
|
companyFeeValue?: number | null | undefined;
|
|
356
356
|
staffCommissionPaidAt?: string | null | undefined;
|
|
357
357
|
}>;
|
|
@@ -367,7 +367,7 @@ export declare const createCommodityDealSchema: z.ZodObject<{
|
|
|
367
367
|
notes: z.ZodOptional<z.ZodString>;
|
|
368
368
|
handlerUserId: z.ZodOptional<z.ZodString>;
|
|
369
369
|
dealCapital: z.ZodOptional<z.ZodNumber>;
|
|
370
|
-
companyFeeMode: z.ZodOptional<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
370
|
+
companyFeeMode: z.ZodOptional<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
371
371
|
companyFeeValue: z.ZodOptional<z.ZodNumber>;
|
|
372
372
|
}, "strip", z.ZodTypeAny, {
|
|
373
373
|
currency: string;
|
|
@@ -379,7 +379,7 @@ export declare const createCommodityDealSchema: z.ZodObject<{
|
|
|
379
379
|
notes?: string | undefined;
|
|
380
380
|
handlerUserId?: string | undefined;
|
|
381
381
|
dealCapital?: number | undefined;
|
|
382
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
382
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
383
383
|
companyFeeValue?: number | undefined;
|
|
384
384
|
}, {
|
|
385
385
|
purchaseCost: number;
|
|
@@ -391,7 +391,7 @@ export declare const createCommodityDealSchema: z.ZodObject<{
|
|
|
391
391
|
miscellaneousCost?: number | undefined;
|
|
392
392
|
handlerUserId?: string | undefined;
|
|
393
393
|
dealCapital?: number | undefined;
|
|
394
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
394
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
395
395
|
companyFeeValue?: number | undefined;
|
|
396
396
|
}>;
|
|
397
397
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -406,7 +406,7 @@ export declare const createCommodityDealSchema: z.ZodObject<{
|
|
|
406
406
|
notes?: string | undefined;
|
|
407
407
|
handlerUserId?: string | undefined;
|
|
408
408
|
dealCapital?: number | undefined;
|
|
409
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
409
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
410
410
|
companyFeeValue?: number | undefined;
|
|
411
411
|
};
|
|
412
412
|
}, {
|
|
@@ -421,7 +421,7 @@ export declare const createCommodityDealSchema: z.ZodObject<{
|
|
|
421
421
|
miscellaneousCost?: number | undefined;
|
|
422
422
|
handlerUserId?: string | undefined;
|
|
423
423
|
dealCapital?: number | undefined;
|
|
424
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | undefined;
|
|
424
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | undefined;
|
|
425
425
|
companyFeeValue?: number | undefined;
|
|
426
426
|
};
|
|
427
427
|
}>;
|
|
@@ -438,7 +438,7 @@ export declare const updateCommodityDealSchema: z.ZodObject<{
|
|
|
438
438
|
invoiceId: z.ZodOptional<z.ZodString>;
|
|
439
439
|
handlerUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
440
440
|
dealCapital: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
441
|
-
companyFeeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>>;
|
|
441
|
+
companyFeeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>>;
|
|
442
442
|
companyFeeValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
443
443
|
/** Set ISO datetime to mark paid out; null to mark unpaid. */
|
|
444
444
|
staffCommissionPaidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -452,7 +452,7 @@ export declare const updateCommodityDealSchema: z.ZodObject<{
|
|
|
452
452
|
miscellaneousCost?: number | undefined;
|
|
453
453
|
handlerUserId?: string | null | undefined;
|
|
454
454
|
dealCapital?: number | null | undefined;
|
|
455
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
455
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
456
456
|
companyFeeValue?: number | null | undefined;
|
|
457
457
|
staffCommissionPaidAt?: string | null | undefined;
|
|
458
458
|
}, {
|
|
@@ -465,7 +465,7 @@ export declare const updateCommodityDealSchema: z.ZodObject<{
|
|
|
465
465
|
miscellaneousCost?: number | undefined;
|
|
466
466
|
handlerUserId?: string | null | undefined;
|
|
467
467
|
dealCapital?: number | null | undefined;
|
|
468
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
468
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
469
469
|
companyFeeValue?: number | null | undefined;
|
|
470
470
|
staffCommissionPaidAt?: string | null | undefined;
|
|
471
471
|
}>;
|
|
@@ -481,7 +481,7 @@ export declare const updateCommodityDealSchema: z.ZodObject<{
|
|
|
481
481
|
miscellaneousCost?: number | undefined;
|
|
482
482
|
handlerUserId?: string | null | undefined;
|
|
483
483
|
dealCapital?: number | null | undefined;
|
|
484
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
484
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
485
485
|
companyFeeValue?: number | null | undefined;
|
|
486
486
|
staffCommissionPaidAt?: string | null | undefined;
|
|
487
487
|
};
|
|
@@ -498,7 +498,7 @@ export declare const updateCommodityDealSchema: z.ZodObject<{
|
|
|
498
498
|
miscellaneousCost?: number | undefined;
|
|
499
499
|
handlerUserId?: string | null | undefined;
|
|
500
500
|
dealCapital?: number | null | undefined;
|
|
501
|
-
companyFeeMode?: "percent_of_invoice" | "per_kg" | null | undefined;
|
|
501
|
+
companyFeeMode?: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null | undefined;
|
|
502
502
|
companyFeeValue?: number | null | undefined;
|
|
503
503
|
staffCommissionPaidAt?: string | null | undefined;
|
|
504
504
|
};
|
|
@@ -587,7 +587,7 @@ export declare const commodityDealResourceSchema: z.ZodObject<{
|
|
|
587
587
|
status: z.ZodEnum<["draft", "in_transit", "invoiced", "paid", "cancelled"]>;
|
|
588
588
|
notes: z.ZodNullable<z.ZodString>;
|
|
589
589
|
dealCapital: z.ZodNullable<z.ZodNumber>;
|
|
590
|
-
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
590
|
+
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
591
591
|
companyFeeValue: z.ZodNullable<z.ZodNumber>;
|
|
592
592
|
totalWeightKg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
593
593
|
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -690,7 +690,7 @@ export declare const commodityDealResourceSchema: z.ZodObject<{
|
|
|
690
690
|
waybillId: string;
|
|
691
691
|
handlerUserId: string | null;
|
|
692
692
|
dealCapital: number | null;
|
|
693
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
693
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
694
694
|
companyFeeValue: number | null;
|
|
695
695
|
computed: {
|
|
696
696
|
totalCost: number;
|
|
@@ -737,7 +737,7 @@ export declare const commodityDealResourceSchema: z.ZodObject<{
|
|
|
737
737
|
waybillId: string;
|
|
738
738
|
handlerUserId: string | null;
|
|
739
739
|
dealCapital: number | null;
|
|
740
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
740
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
741
741
|
companyFeeValue: number | null;
|
|
742
742
|
computed: {
|
|
743
743
|
totalCost: number;
|
|
@@ -793,7 +793,7 @@ export declare const commodityDealResourceSchema: z.ZodObject<{
|
|
|
793
793
|
waybillId: string;
|
|
794
794
|
handlerUserId: string | null;
|
|
795
795
|
dealCapital: number | null;
|
|
796
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
796
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
797
797
|
companyFeeValue: number | null;
|
|
798
798
|
computed: {
|
|
799
799
|
totalCost: number;
|
|
@@ -847,7 +847,7 @@ export declare const commodityDealResourceSchema: z.ZodObject<{
|
|
|
847
847
|
waybillId: string;
|
|
848
848
|
handlerUserId: string | null;
|
|
849
849
|
dealCapital: number | null;
|
|
850
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
850
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
851
851
|
companyFeeValue: number | null;
|
|
852
852
|
computed: {
|
|
853
853
|
totalCost: number;
|
|
@@ -903,7 +903,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
903
903
|
status: z.ZodEnum<["draft", "in_transit", "invoiced", "paid", "cancelled"]>;
|
|
904
904
|
notes: z.ZodNullable<z.ZodString>;
|
|
905
905
|
dealCapital: z.ZodNullable<z.ZodNumber>;
|
|
906
|
-
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
906
|
+
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
907
907
|
companyFeeValue: z.ZodNullable<z.ZodNumber>;
|
|
908
908
|
totalWeightKg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
909
909
|
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1006,7 +1006,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1006
1006
|
waybillId: string;
|
|
1007
1007
|
handlerUserId: string | null;
|
|
1008
1008
|
dealCapital: number | null;
|
|
1009
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1009
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1010
1010
|
companyFeeValue: number | null;
|
|
1011
1011
|
computed: {
|
|
1012
1012
|
totalCost: number;
|
|
@@ -1053,7 +1053,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1053
1053
|
waybillId: string;
|
|
1054
1054
|
handlerUserId: string | null;
|
|
1055
1055
|
dealCapital: number | null;
|
|
1056
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1056
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1057
1057
|
companyFeeValue: number | null;
|
|
1058
1058
|
computed: {
|
|
1059
1059
|
totalCost: number;
|
|
@@ -1109,7 +1109,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1109
1109
|
waybillId: string;
|
|
1110
1110
|
handlerUserId: string | null;
|
|
1111
1111
|
dealCapital: number | null;
|
|
1112
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1112
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1113
1113
|
companyFeeValue: number | null;
|
|
1114
1114
|
computed: {
|
|
1115
1115
|
totalCost: number;
|
|
@@ -1163,7 +1163,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1163
1163
|
waybillId: string;
|
|
1164
1164
|
handlerUserId: string | null;
|
|
1165
1165
|
dealCapital: number | null;
|
|
1166
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1166
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1167
1167
|
companyFeeValue: number | null;
|
|
1168
1168
|
computed: {
|
|
1169
1169
|
totalCost: number;
|
|
@@ -1245,7 +1245,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1245
1245
|
waybillId: string;
|
|
1246
1246
|
handlerUserId: string | null;
|
|
1247
1247
|
dealCapital: number | null;
|
|
1248
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1248
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1249
1249
|
companyFeeValue: number | null;
|
|
1250
1250
|
computed: {
|
|
1251
1251
|
totalCost: number;
|
|
@@ -1311,7 +1311,7 @@ export declare const commodityDealResponseSchema: z.ZodObject<{
|
|
|
1311
1311
|
waybillId: string;
|
|
1312
1312
|
handlerUserId: string | null;
|
|
1313
1313
|
dealCapital: number | null;
|
|
1314
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1314
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1315
1315
|
companyFeeValue: number | null;
|
|
1316
1316
|
computed: {
|
|
1317
1317
|
totalCost: number;
|
|
@@ -1378,7 +1378,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1378
1378
|
status: z.ZodEnum<["draft", "in_transit", "invoiced", "paid", "cancelled"]>;
|
|
1379
1379
|
notes: z.ZodNullable<z.ZodString>;
|
|
1380
1380
|
dealCapital: z.ZodNullable<z.ZodNumber>;
|
|
1381
|
-
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "per_kg"]>>;
|
|
1381
|
+
companyFeeMode: z.ZodNullable<z.ZodEnum<["percent_of_invoice", "percent_of_returns", "per_kg"]>>;
|
|
1382
1382
|
companyFeeValue: z.ZodNullable<z.ZodNumber>;
|
|
1383
1383
|
totalWeightKg: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1384
1384
|
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1481,7 +1481,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1481
1481
|
waybillId: string;
|
|
1482
1482
|
handlerUserId: string | null;
|
|
1483
1483
|
dealCapital: number | null;
|
|
1484
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1484
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1485
1485
|
companyFeeValue: number | null;
|
|
1486
1486
|
computed: {
|
|
1487
1487
|
totalCost: number;
|
|
@@ -1528,7 +1528,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1528
1528
|
waybillId: string;
|
|
1529
1529
|
handlerUserId: string | null;
|
|
1530
1530
|
dealCapital: number | null;
|
|
1531
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1531
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1532
1532
|
companyFeeValue: number | null;
|
|
1533
1533
|
computed: {
|
|
1534
1534
|
totalCost: number;
|
|
@@ -1584,7 +1584,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1584
1584
|
waybillId: string;
|
|
1585
1585
|
handlerUserId: string | null;
|
|
1586
1586
|
dealCapital: number | null;
|
|
1587
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1587
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1588
1588
|
companyFeeValue: number | null;
|
|
1589
1589
|
computed: {
|
|
1590
1590
|
totalCost: number;
|
|
@@ -1638,7 +1638,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1638
1638
|
waybillId: string;
|
|
1639
1639
|
handlerUserId: string | null;
|
|
1640
1640
|
dealCapital: number | null;
|
|
1641
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1641
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1642
1642
|
companyFeeValue: number | null;
|
|
1643
1643
|
computed: {
|
|
1644
1644
|
totalCost: number;
|
|
@@ -1720,7 +1720,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1720
1720
|
waybillId: string;
|
|
1721
1721
|
handlerUserId: string | null;
|
|
1722
1722
|
dealCapital: number | null;
|
|
1723
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1723
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1724
1724
|
companyFeeValue: number | null;
|
|
1725
1725
|
computed: {
|
|
1726
1726
|
totalCost: number;
|
|
@@ -1786,7 +1786,7 @@ export declare const commodityDealListResponseSchema: z.ZodObject<{
|
|
|
1786
1786
|
waybillId: string;
|
|
1787
1787
|
handlerUserId: string | null;
|
|
1788
1788
|
dealCapital: number | null;
|
|
1789
|
-
companyFeeMode: "percent_of_invoice" | "per_kg" | null;
|
|
1789
|
+
companyFeeMode: "percent_of_invoice" | "percent_of_returns" | "per_kg" | null;
|
|
1790
1790
|
companyFeeValue: number | null;
|
|
1791
1791
|
computed: {
|
|
1792
1792
|
totalCost: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commodity-deals.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/commodity-deals.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,yBAAyB,qEAMpC,CAAC;AAEH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"commodity-deals.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/commodity-deals.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,yBAAyB,qEAMpC,CAAC;AAEH,eAAO,MAAM,oBAAoB,mEAI/B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;EAQrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;IAUtC,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQjD,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBtC,gFAAgF;;;;;;;;;;;;QA9BlF,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAC;AAE3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY9C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;IAY9C,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9D,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;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MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AACrF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AACrF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC"}
|
|
@@ -7,7 +7,11 @@ export const commodityDealStatusSchema = z.enum([
|
|
|
7
7
|
'paid',
|
|
8
8
|
'cancelled',
|
|
9
9
|
]);
|
|
10
|
-
export const companyFeeModeSchema = z.enum([
|
|
10
|
+
export const companyFeeModeSchema = z.enum([
|
|
11
|
+
'percent_of_invoice',
|
|
12
|
+
'percent_of_returns',
|
|
13
|
+
'per_kg',
|
|
14
|
+
]);
|
|
11
15
|
export const dealParticipantShareSchema = z.object({
|
|
12
16
|
id: z.string().uuid().optional(),
|
|
13
17
|
userId: z.string().uuid(),
|