@deepintel-ltd/farmpro-contracts 1.7.20 → 1.7.21

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.
@@ -0,0 +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,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBhB,CAAC;AAE3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9C,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9C,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC;AACjF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { z } from 'zod';
2
+ import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
3
+ export const commodityDealStatusSchema = z.enum([
4
+ 'draft',
5
+ 'in_transit',
6
+ 'invoiced',
7
+ 'paid',
8
+ 'cancelled',
9
+ ]);
10
+ export const commodityDealComputedSchema = z.object({
11
+ totalCost: z.number(),
12
+ saleAmount: z.number().nullable(),
13
+ grossProfit: z.number().nullable(),
14
+ commissionRate: z.number().nullable(),
15
+ commissionAmount: z.number().nullable(),
16
+ companyNet: z.number().nullable(),
17
+ isRealized: z.boolean(),
18
+ });
19
+ export const commodityDealAttributesSchema = z
20
+ .object({
21
+ organizationId: z.string().uuid(),
22
+ waybillId: z.string().uuid(),
23
+ invoiceId: z.string().uuid().nullable(),
24
+ handlerUserId: z.string().uuid().nullable(),
25
+ waybillNumber: z.string().nullable(),
26
+ invoiceNumber: z.string().nullable(),
27
+ buyerName: z.string().nullable(),
28
+ purchaseCost: z.number().nonnegative(),
29
+ transportCost: z.number().nonnegative(),
30
+ miscellaneousCost: z.number().nonnegative(),
31
+ currency: z.string().length(3).default('NGN'),
32
+ status: commodityDealStatusSchema,
33
+ notes: z.string().nullable(),
34
+ computed: commodityDealComputedSchema,
35
+ })
36
+ .merge(timestampsSchema);
37
+ export const createCommodityDealAttributesSchema = z.object({
38
+ waybillId: z.string().uuid(),
39
+ purchaseCost: z.number().nonnegative(),
40
+ transportCost: z.number().nonnegative().optional().default(0),
41
+ miscellaneousCost: z.number().nonnegative().optional().default(0),
42
+ currency: z.string().length(3).optional().default('NGN'),
43
+ status: commodityDealStatusSchema.optional(),
44
+ notes: z.string().optional(),
45
+ handlerUserId: z.string().uuid().optional(),
46
+ });
47
+ export const updateCommodityDealAttributesSchema = z.object({
48
+ purchaseCost: z.number().nonnegative().optional(),
49
+ transportCost: z.number().nonnegative().optional(),
50
+ miscellaneousCost: z.number().nonnegative().optional(),
51
+ currency: z.string().length(3).optional(),
52
+ status: commodityDealStatusSchema.optional(),
53
+ notes: z.string().nullable().optional(),
54
+ invoiceId: z.string().uuid().optional(),
55
+ handlerUserId: z.string().uuid().nullable().optional(),
56
+ });
57
+ export const createCommodityDealSchema = z.object({
58
+ type: z.literal('commodity-deals'),
59
+ attributes: createCommodityDealAttributesSchema,
60
+ });
61
+ export const updateCommodityDealSchema = z.object({
62
+ type: z.literal('commodity-deals'),
63
+ id: z.string().uuid().optional(),
64
+ attributes: updateCommodityDealAttributesSchema,
65
+ });
66
+ export const commodityDealResourceSchema = createJsonApiResourceSchema('commodity-deals', commodityDealAttributesSchema);
67
+ export const commodityDealResponseSchema = jsonApiSingleResponseSchema(commodityDealResourceSchema);
68
+ export const commodityDealListResponseSchema = jsonApiCollectionResponseSchema(commodityDealResourceSchema);
69
+ export const commodityDealSummarySchema = z.object({
70
+ paidDealCount: z.number().int().nonnegative(),
71
+ invoicedUnpaidCount: z.number().int().nonnegative(),
72
+ totalPaidRevenue: z.number(),
73
+ totalCostsOnPaidDeals: z.number(),
74
+ grossProfitOnPaidDeals: z.number(),
75
+ totalCommissionOnPaidDeals: z.number(),
76
+ companyNetOnPaidDeals: z.number(),
77
+ unrealizedGrossProfit: z.number(),
78
+ currency: z.string().length(3).default('NGN'),
79
+ });
80
+ export const commodityDealSummaryResponseSchema = z.object({
81
+ data: commodityDealSummarySchema,
82
+ });
@@ -85,6 +85,7 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
85
85
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
86
86
  bankAccountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
87
87
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
88
+ waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
88
89
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
89
90
  organizationId: z.ZodString;
90
91
  } & {
@@ -130,6 +131,7 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
130
131
  discount?: number | null | undefined;
131
132
  paymentTerms?: string | null | undefined;
132
133
  bankAccountId?: string | null | undefined;
134
+ waybillId?: string | null | undefined;
133
135
  totalInWords?: string | null | undefined;
134
136
  }, {
135
137
  createdAt: string;
@@ -171,6 +173,7 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
171
173
  paymentTerms?: string | null | undefined;
172
174
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
173
175
  bankAccountId?: string | null | undefined;
176
+ waybillId?: string | null | undefined;
174
177
  totalInWords?: string | null | undefined;
175
178
  }>;
176
179
  export declare const createInvoiceAttributesSchema: z.ZodObject<{
@@ -217,6 +220,7 @@ export declare const createInvoiceAttributesSchema: z.ZodObject<{
217
220
  notes: z.ZodOptional<z.ZodString>;
218
221
  bankAccountId: z.ZodOptional<z.ZodString>;
219
222
  waybillNumber: z.ZodOptional<z.ZodString>;
223
+ waybillId: z.ZodOptional<z.ZodString>;
220
224
  totalInWords: z.ZodOptional<z.ZodString>;
221
225
  }, "strip", z.ZodTypeAny, {
222
226
  currency: string;
@@ -244,6 +248,7 @@ export declare const createInvoiceAttributesSchema: z.ZodObject<{
244
248
  discount?: number | undefined;
245
249
  paymentTerms?: string | undefined;
246
250
  bankAccountId?: string | undefined;
251
+ waybillId?: string | undefined;
247
252
  totalInWords?: string | undefined;
248
253
  }, {
249
254
  items: {
@@ -271,6 +276,7 @@ export declare const createInvoiceAttributesSchema: z.ZodObject<{
271
276
  discount?: number | undefined;
272
277
  paymentTerms?: string | undefined;
273
278
  bankAccountId?: string | undefined;
279
+ waybillId?: string | undefined;
274
280
  totalInWords?: string | undefined;
275
281
  }>;
276
282
  export declare const updateInvoiceAttributesSchema: z.ZodObject<{
@@ -317,6 +323,7 @@ export declare const updateInvoiceAttributesSchema: z.ZodObject<{
317
323
  notes: z.ZodOptional<z.ZodOptional<z.ZodString>>;
318
324
  bankAccountId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
319
325
  waybillNumber: z.ZodOptional<z.ZodOptional<z.ZodString>>;
326
+ waybillId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
320
327
  totalInWords: z.ZodOptional<z.ZodOptional<z.ZodString>>;
321
328
  } & {
322
329
  paymentStatus: z.ZodOptional<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
@@ -347,6 +354,7 @@ export declare const updateInvoiceAttributesSchema: z.ZodObject<{
347
354
  paymentTerms?: string | undefined;
348
355
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
349
356
  bankAccountId?: string | undefined;
357
+ waybillId?: string | undefined;
350
358
  totalInWords?: string | undefined;
351
359
  }, {
352
360
  currency?: string | undefined;
@@ -375,6 +383,7 @@ export declare const updateInvoiceAttributesSchema: z.ZodObject<{
375
383
  paymentTerms?: string | undefined;
376
384
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
377
385
  bankAccountId?: string | undefined;
386
+ waybillId?: string | undefined;
378
387
  totalInWords?: string | undefined;
379
388
  }>;
380
389
  export declare const createInvoiceSchema: z.ZodObject<{
@@ -423,6 +432,7 @@ export declare const createInvoiceSchema: z.ZodObject<{
423
432
  notes: z.ZodOptional<z.ZodString>;
424
433
  bankAccountId: z.ZodOptional<z.ZodString>;
425
434
  waybillNumber: z.ZodOptional<z.ZodString>;
435
+ waybillId: z.ZodOptional<z.ZodString>;
426
436
  totalInWords: z.ZodOptional<z.ZodString>;
427
437
  }, "strip", z.ZodTypeAny, {
428
438
  currency: string;
@@ -450,6 +460,7 @@ export declare const createInvoiceSchema: z.ZodObject<{
450
460
  discount?: number | undefined;
451
461
  paymentTerms?: string | undefined;
452
462
  bankAccountId?: string | undefined;
463
+ waybillId?: string | undefined;
453
464
  totalInWords?: string | undefined;
454
465
  }, {
455
466
  items: {
@@ -477,6 +488,7 @@ export declare const createInvoiceSchema: z.ZodObject<{
477
488
  discount?: number | undefined;
478
489
  paymentTerms?: string | undefined;
479
490
  bankAccountId?: string | undefined;
491
+ waybillId?: string | undefined;
480
492
  totalInWords?: string | undefined;
481
493
  }>;
482
494
  }, "strip", z.ZodTypeAny, {
@@ -507,6 +519,7 @@ export declare const createInvoiceSchema: z.ZodObject<{
507
519
  discount?: number | undefined;
508
520
  paymentTerms?: string | undefined;
509
521
  bankAccountId?: string | undefined;
522
+ waybillId?: string | undefined;
510
523
  totalInWords?: string | undefined;
511
524
  };
512
525
  }, {
@@ -537,6 +550,7 @@ export declare const createInvoiceSchema: z.ZodObject<{
537
550
  discount?: number | undefined;
538
551
  paymentTerms?: string | undefined;
539
552
  bankAccountId?: string | undefined;
553
+ waybillId?: string | undefined;
540
554
  totalInWords?: string | undefined;
541
555
  };
542
556
  }>;
@@ -587,6 +601,7 @@ export declare const updateInvoiceSchema: z.ZodObject<{
587
601
  notes: z.ZodOptional<z.ZodOptional<z.ZodString>>;
588
602
  bankAccountId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
589
603
  waybillNumber: z.ZodOptional<z.ZodOptional<z.ZodString>>;
604
+ waybillId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
590
605
  totalInWords: z.ZodOptional<z.ZodOptional<z.ZodString>>;
591
606
  } & {
592
607
  paymentStatus: z.ZodOptional<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
@@ -617,6 +632,7 @@ export declare const updateInvoiceSchema: z.ZodObject<{
617
632
  paymentTerms?: string | undefined;
618
633
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
619
634
  bankAccountId?: string | undefined;
635
+ waybillId?: string | undefined;
620
636
  totalInWords?: string | undefined;
621
637
  }, {
622
638
  currency?: string | undefined;
@@ -645,6 +661,7 @@ export declare const updateInvoiceSchema: z.ZodObject<{
645
661
  paymentTerms?: string | undefined;
646
662
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
647
663
  bankAccountId?: string | undefined;
664
+ waybillId?: string | undefined;
648
665
  totalInWords?: string | undefined;
649
666
  }>;
650
667
  }, "strip", z.ZodTypeAny, {
@@ -677,6 +694,7 @@ export declare const updateInvoiceSchema: z.ZodObject<{
677
694
  paymentTerms?: string | undefined;
678
695
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
679
696
  bankAccountId?: string | undefined;
697
+ waybillId?: string | undefined;
680
698
  totalInWords?: string | undefined;
681
699
  };
682
700
  }, {
@@ -709,6 +727,7 @@ export declare const updateInvoiceSchema: z.ZodObject<{
709
727
  paymentTerms?: string | undefined;
710
728
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
711
729
  bankAccountId?: string | undefined;
730
+ waybillId?: string | undefined;
712
731
  totalInWords?: string | undefined;
713
732
  };
714
733
  }>;
@@ -770,6 +789,7 @@ export declare const invoiceResourceSchema: z.ZodObject<{
770
789
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
771
790
  bankAccountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
772
791
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
792
+ waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
773
793
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
774
794
  organizationId: z.ZodString;
775
795
  } & {
@@ -815,6 +835,7 @@ export declare const invoiceResourceSchema: z.ZodObject<{
815
835
  discount?: number | null | undefined;
816
836
  paymentTerms?: string | null | undefined;
817
837
  bankAccountId?: string | null | undefined;
838
+ waybillId?: string | null | undefined;
818
839
  totalInWords?: string | null | undefined;
819
840
  }, {
820
841
  createdAt: string;
@@ -856,6 +877,7 @@ export declare const invoiceResourceSchema: z.ZodObject<{
856
877
  paymentTerms?: string | null | undefined;
857
878
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
858
879
  bankAccountId?: string | null | undefined;
880
+ waybillId?: string | null | undefined;
859
881
  totalInWords?: string | null | undefined;
860
882
  }>;
861
883
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -904,6 +926,7 @@ export declare const invoiceResourceSchema: z.ZodObject<{
904
926
  discount?: number | null | undefined;
905
927
  paymentTerms?: string | null | undefined;
906
928
  bankAccountId?: string | null | undefined;
929
+ waybillId?: string | null | undefined;
907
930
  totalInWords?: string | null | undefined;
908
931
  };
909
932
  relationships?: Record<string, unknown> | undefined;
@@ -952,6 +975,7 @@ export declare const invoiceResourceSchema: z.ZodObject<{
952
975
  paymentTerms?: string | null | undefined;
953
976
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
954
977
  bankAccountId?: string | null | undefined;
978
+ waybillId?: string | null | undefined;
955
979
  totalInWords?: string | null | undefined;
956
980
  };
957
981
  relationships?: Record<string, unknown> | undefined;
@@ -1017,6 +1041,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1017
1041
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1018
1042
  bankAccountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1019
1043
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1044
+ waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1020
1045
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1021
1046
  organizationId: z.ZodString;
1022
1047
  } & {
@@ -1062,6 +1087,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1062
1087
  discount?: number | null | undefined;
1063
1088
  paymentTerms?: string | null | undefined;
1064
1089
  bankAccountId?: string | null | undefined;
1090
+ waybillId?: string | null | undefined;
1065
1091
  totalInWords?: string | null | undefined;
1066
1092
  }, {
1067
1093
  createdAt: string;
@@ -1103,6 +1129,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1103
1129
  paymentTerms?: string | null | undefined;
1104
1130
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1105
1131
  bankAccountId?: string | null | undefined;
1132
+ waybillId?: string | null | undefined;
1106
1133
  totalInWords?: string | null | undefined;
1107
1134
  }>;
1108
1135
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1151,6 +1178,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1151
1178
  discount?: number | null | undefined;
1152
1179
  paymentTerms?: string | null | undefined;
1153
1180
  bankAccountId?: string | null | undefined;
1181
+ waybillId?: string | null | undefined;
1154
1182
  totalInWords?: string | null | undefined;
1155
1183
  };
1156
1184
  relationships?: Record<string, unknown> | undefined;
@@ -1199,6 +1227,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1199
1227
  paymentTerms?: string | null | undefined;
1200
1228
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1201
1229
  bankAccountId?: string | null | undefined;
1230
+ waybillId?: string | null | undefined;
1202
1231
  totalInWords?: string | null | undefined;
1203
1232
  };
1204
1233
  relationships?: Record<string, unknown> | undefined;
@@ -1273,6 +1302,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1273
1302
  discount?: number | null | undefined;
1274
1303
  paymentTerms?: string | null | undefined;
1275
1304
  bankAccountId?: string | null | undefined;
1305
+ waybillId?: string | null | undefined;
1276
1306
  totalInWords?: string | null | undefined;
1277
1307
  };
1278
1308
  relationships?: Record<string, unknown> | undefined;
@@ -1333,6 +1363,7 @@ export declare const invoiceResponseSchema: z.ZodObject<{
1333
1363
  paymentTerms?: string | null | undefined;
1334
1364
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1335
1365
  bankAccountId?: string | null | undefined;
1366
+ waybillId?: string | null | undefined;
1336
1367
  totalInWords?: string | null | undefined;
1337
1368
  };
1338
1369
  relationships?: Record<string, unknown> | undefined;
@@ -1409,6 +1440,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1409
1440
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1410
1441
  bankAccountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1411
1442
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1443
+ waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1412
1444
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1413
1445
  organizationId: z.ZodString;
1414
1446
  } & {
@@ -1454,6 +1486,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1454
1486
  discount?: number | null | undefined;
1455
1487
  paymentTerms?: string | null | undefined;
1456
1488
  bankAccountId?: string | null | undefined;
1489
+ waybillId?: string | null | undefined;
1457
1490
  totalInWords?: string | null | undefined;
1458
1491
  }, {
1459
1492
  createdAt: string;
@@ -1495,6 +1528,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1495
1528
  paymentTerms?: string | null | undefined;
1496
1529
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1497
1530
  bankAccountId?: string | null | undefined;
1531
+ waybillId?: string | null | undefined;
1498
1532
  totalInWords?: string | null | undefined;
1499
1533
  }>;
1500
1534
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1543,6 +1577,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1543
1577
  discount?: number | null | undefined;
1544
1578
  paymentTerms?: string | null | undefined;
1545
1579
  bankAccountId?: string | null | undefined;
1580
+ waybillId?: string | null | undefined;
1546
1581
  totalInWords?: string | null | undefined;
1547
1582
  };
1548
1583
  relationships?: Record<string, unknown> | undefined;
@@ -1591,6 +1626,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1591
1626
  paymentTerms?: string | null | undefined;
1592
1627
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1593
1628
  bankAccountId?: string | null | undefined;
1629
+ waybillId?: string | null | undefined;
1594
1630
  totalInWords?: string | null | undefined;
1595
1631
  };
1596
1632
  relationships?: Record<string, unknown> | undefined;
@@ -1665,6 +1701,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1665
1701
  discount?: number | null | undefined;
1666
1702
  paymentTerms?: string | null | undefined;
1667
1703
  bankAccountId?: string | null | undefined;
1704
+ waybillId?: string | null | undefined;
1668
1705
  totalInWords?: string | null | undefined;
1669
1706
  };
1670
1707
  relationships?: Record<string, unknown> | undefined;
@@ -1725,6 +1762,7 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
1725
1762
  paymentTerms?: string | null | undefined;
1726
1763
  paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1727
1764
  bankAccountId?: string | null | undefined;
1765
+ waybillId?: string | null | undefined;
1728
1766
  totalInWords?: string | null | undefined;
1729
1767
  };
1730
1768
  relationships?: Record<string, unknown> | undefined;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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"}
@@ -44,6 +44,7 @@ export const invoiceAttributesSchema = z.object({
44
44
  // Additional fields
45
45
  bankAccountId: z.string().uuid().optional().nullable(),
46
46
  waybillNumber: z.string().optional().nullable(),
47
+ waybillId: z.string().uuid().optional().nullable(),
47
48
  totalInWords: z.string().optional().nullable(),
48
49
  organizationId: z.string().uuid(),
49
50
  createdAt: z.string().datetime(),
@@ -68,6 +69,7 @@ export const createInvoiceAttributesSchema = z.object({
68
69
  // Additional fields
69
70
  bankAccountId: z.string().uuid().optional(),
70
71
  waybillNumber: z.string().optional(),
72
+ waybillId: z.string().uuid().optional(),
71
73
  totalInWords: z.string().optional(),
72
74
  });
73
75
  // Invoice attributes for update (input)