@deepintel-ltd/buildlink-api-contracts 0.2.25 → 0.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +1 -1
  2. package/contracts/auth.d.ts +32 -32
  3. package/contracts/boq.d.ts +117 -0
  4. package/contracts/boq.d.ts.map +1 -1
  5. package/contracts/boq.js +33 -5
  6. package/contracts/boq.js.map +1 -1
  7. package/contracts/client-progress.d.ts +493 -0
  8. package/contracts/client-progress.d.ts.map +1 -0
  9. package/contracts/client-progress.js +20 -0
  10. package/contracts/client-progress.js.map +1 -0
  11. package/contracts/commercial.d.ts +309 -310
  12. package/contracts/commercial.d.ts.map +1 -1
  13. package/contracts/commercial.js +44 -14
  14. package/contracts/commercial.js.map +1 -1
  15. package/contracts/communication.d.ts +64 -64
  16. package/contracts/contractor-ledger.d.ts +525 -8
  17. package/contracts/contractor-ledger.d.ts.map +1 -1
  18. package/contracts/contractor-ledger.js +61 -12
  19. package/contracts/contractor-ledger.js.map +1 -1
  20. package/contracts/daily-logs.d.ts +1288 -0
  21. package/contracts/daily-logs.d.ts.map +1 -1
  22. package/contracts/daily-logs.js.map +1 -1
  23. package/contracts/dashboard.d.ts +411 -0
  24. package/contracts/dashboard.d.ts.map +1 -0
  25. package/contracts/dashboard.js +16 -0
  26. package/contracts/dashboard.js.map +1 -0
  27. package/contracts/deficiencies.d.ts +110 -110
  28. package/contracts/documents.d.ts +600 -1
  29. package/contracts/documents.d.ts.map +1 -1
  30. package/contracts/documents.js +37 -2
  31. package/contracts/documents.js.map +1 -1
  32. package/contracts/drawings.d.ts +532 -532
  33. package/contracts/hub.d.ts.map +1 -1
  34. package/contracts/hub.js +37 -12
  35. package/contracts/hub.js.map +1 -1
  36. package/contracts/index.d.ts +25 -10
  37. package/contracts/index.d.ts.map +1 -1
  38. package/contracts/index.js +23 -8
  39. package/contracts/index.js.map +1 -1
  40. package/contracts/material-index.d.ts +560 -0
  41. package/contracts/material-index.d.ts.map +1 -0
  42. package/contracts/material-index.js +31 -0
  43. package/contracts/material-index.js.map +1 -0
  44. package/contracts/meetings.d.ts +136 -136
  45. package/contracts/projects.d.ts +141 -93
  46. package/contracts/projects.d.ts.map +1 -1
  47. package/contracts/proof.d.ts +24 -24
  48. package/contracts/proof.d.ts.map +1 -1
  49. package/contracts/proof.js +29 -10
  50. package/contracts/proof.js.map +1 -1
  51. package/contracts/qaqc.d.ts +18 -18
  52. package/contracts/qaqc.d.ts.map +1 -1
  53. package/contracts/qaqc.js +37 -11
  54. package/contracts/qaqc.js.map +1 -1
  55. package/contracts/rbac.d.ts +49 -49
  56. package/contracts/reports.d.ts +72 -624
  57. package/contracts/reports.d.ts.map +1 -1
  58. package/contracts/reports.js.map +1 -1
  59. package/contracts/resources.d.ts +10 -10
  60. package/contracts/safety.d.ts +164 -164
  61. package/contracts/schedule.d.ts +68 -68
  62. package/contracts/site-links.d.ts +641 -0
  63. package/contracts/site-links.d.ts.map +1 -0
  64. package/contracts/site-links.js +48 -0
  65. package/contracts/site-links.js.map +1 -0
  66. package/contracts/spec-equal.d.ts.map +1 -1
  67. package/contracts/spec-equal.js +23 -8
  68. package/contracts/spec-equal.js.map +1 -1
  69. package/contracts/specifications.d.ts +296 -296
  70. package/contracts/tasks.d.ts +110 -110
  71. package/contracts/tours.d.ts +503 -0
  72. package/contracts/tours.d.ts.map +1 -0
  73. package/contracts/tours.js +39 -0
  74. package/contracts/tours.js.map +1 -0
  75. package/contracts/transmittals.d.ts +64 -64
  76. package/contracts/valuations-extras.d.ts +758 -0
  77. package/contracts/valuations-extras.d.ts.map +1 -0
  78. package/contracts/valuations-extras.js +61 -0
  79. package/contracts/valuations-extras.js.map +1 -0
  80. package/contracts/valuations.d.ts +4425 -559
  81. package/contracts/valuations.d.ts.map +1 -1
  82. package/contracts/valuations.js +93 -2
  83. package/contracts/valuations.js.map +1 -1
  84. package/package.json +31 -1
  85. package/schemas/auth.d.ts +13 -13
  86. package/schemas/boq.d.ts +23 -0
  87. package/schemas/boq.d.ts.map +1 -1
  88. package/schemas/boq.js +2 -0
  89. package/schemas/boq.js.map +1 -1
  90. package/schemas/cash-flow.d.ts +99 -0
  91. package/schemas/cash-flow.d.ts.map +1 -0
  92. package/schemas/cash-flow.js +21 -0
  93. package/schemas/cash-flow.js.map +1 -0
  94. package/schemas/client-progress.d.ts +436 -0
  95. package/schemas/client-progress.d.ts.map +1 -0
  96. package/schemas/client-progress.js +45 -0
  97. package/schemas/client-progress.js.map +1 -0
  98. package/schemas/commercial.d.ts.map +1 -1
  99. package/schemas/commercial.js +56 -19
  100. package/schemas/commercial.js.map +1 -1
  101. package/schemas/common.d.ts +3 -3
  102. package/schemas/common.d.ts.map +1 -1
  103. package/schemas/common.js +8 -7
  104. package/schemas/common.js.map +1 -1
  105. package/schemas/communication.d.ts +10 -10
  106. package/schemas/contractor-ledger.d.ts +245 -8
  107. package/schemas/contractor-ledger.d.ts.map +1 -1
  108. package/schemas/contractor-ledger.js +108 -19
  109. package/schemas/contractor-ledger.js.map +1 -1
  110. package/schemas/cursor-pagination.d.ts +2 -2
  111. package/schemas/daily-logs.d.ts +420 -0
  112. package/schemas/daily-logs.d.ts.map +1 -1
  113. package/schemas/daily-logs.js +9 -0
  114. package/schemas/daily-logs.js.map +1 -1
  115. package/schemas/dashboard.d.ts +455 -0
  116. package/schemas/dashboard.d.ts.map +1 -0
  117. package/schemas/dashboard.js +47 -0
  118. package/schemas/dashboard.js.map +1 -0
  119. package/schemas/deficiencies.d.ts +22 -22
  120. package/schemas/documents.d.ts +86 -0
  121. package/schemas/documents.d.ts.map +1 -1
  122. package/schemas/documents.js +30 -0
  123. package/schemas/documents.js.map +1 -1
  124. package/schemas/drawings.d.ts +133 -133
  125. package/schemas/evidence.d.ts +75 -0
  126. package/schemas/evidence.d.ts.map +1 -0
  127. package/schemas/evidence.js +79 -0
  128. package/schemas/evidence.js.map +1 -0
  129. package/schemas/hub.d.ts.map +1 -1
  130. package/schemas/hub.js +52 -15
  131. package/schemas/hub.js.map +1 -1
  132. package/schemas/maps.d.ts.map +1 -1
  133. package/schemas/maps.js.map +1 -1
  134. package/schemas/material-index.d.ts +256 -0
  135. package/schemas/material-index.d.ts.map +1 -0
  136. package/schemas/material-index.js +47 -0
  137. package/schemas/material-index.js.map +1 -0
  138. package/schemas/meetings.d.ts +32 -32
  139. package/schemas/projects.d.ts +27 -16
  140. package/schemas/projects.d.ts.map +1 -1
  141. package/schemas/projects.js +4 -0
  142. package/schemas/projects.js.map +1 -1
  143. package/schemas/proof.d.ts +12 -12
  144. package/schemas/proof.d.ts.map +1 -1
  145. package/schemas/proof.js +30 -11
  146. package/schemas/proof.js.map +1 -1
  147. package/schemas/qaqc.d.ts +11 -6
  148. package/schemas/qaqc.d.ts.map +1 -1
  149. package/schemas/qaqc.js +5 -0
  150. package/schemas/qaqc.js.map +1 -1
  151. package/schemas/rbac.d.ts +28 -28
  152. package/schemas/rbac.d.ts.map +1 -1
  153. package/schemas/rbac.js +3 -0
  154. package/schemas/rbac.js.map +1 -1
  155. package/schemas/reports.d.ts +56 -236
  156. package/schemas/reports.d.ts.map +1 -1
  157. package/schemas/reports.js +0 -20
  158. package/schemas/reports.js.map +1 -1
  159. package/schemas/resources.d.ts +18 -18
  160. package/schemas/safety.d.ts +34 -34
  161. package/schemas/schedule.d.ts +48 -48
  162. package/schemas/site-links.d.ts +183 -0
  163. package/schemas/site-links.d.ts.map +1 -0
  164. package/schemas/site-links.js +40 -0
  165. package/schemas/site-links.js.map +1 -0
  166. package/schemas/spec-equal.d.ts.map +1 -1
  167. package/schemas/spec-equal.js +10 -4
  168. package/schemas/spec-equal.js.map +1 -1
  169. package/schemas/specifications.d.ts +108 -108
  170. package/schemas/tasks.d.ts +12 -12
  171. package/schemas/tours.d.ts +114 -0
  172. package/schemas/tours.d.ts.map +1 -0
  173. package/schemas/tours.js +29 -0
  174. package/schemas/tours.js.map +1 -0
  175. package/schemas/transmittals.d.ts +22 -22
  176. package/schemas/valuations.d.ts +556 -58
  177. package/schemas/valuations.d.ts.map +1 -1
  178. package/schemas/valuations.js +44 -3
  179. package/schemas/valuations.js.map +1 -1
@@ -46,6 +46,7 @@ export declare const boqContract: {
46
46
  quantity: z.ZodNumber;
47
47
  rateSupply: z.ZodNumber;
48
48
  rateInstall: z.ZodNumber;
49
+ materialKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
50
  sortOrder: z.ZodNumber;
50
51
  }, "strip", z.ZodTypeAny, {
51
52
  id: string;
@@ -60,6 +61,7 @@ export declare const boqContract: {
60
61
  rateInstall: number;
61
62
  sortOrder: number;
62
63
  workPackageId?: string | null | undefined;
64
+ materialKey?: string | null | undefined;
63
65
  }, {
64
66
  id: string;
65
67
  companyId: string;
@@ -73,6 +75,7 @@ export declare const boqContract: {
73
75
  rateInstall: number;
74
76
  sortOrder: number;
75
77
  workPackageId?: string | null | undefined;
78
+ materialKey?: string | null | undefined;
76
79
  }>, "many">>;
77
80
  createdAt: z.ZodString;
78
81
  updatedAt: z.ZodString;
@@ -98,6 +101,7 @@ export declare const boqContract: {
98
101
  rateInstall: number;
99
102
  sortOrder: number;
100
103
  workPackageId?: string | null | undefined;
104
+ materialKey?: string | null | undefined;
101
105
  }[] | undefined;
102
106
  }, {
103
107
  createdAt: string;
@@ -121,6 +125,7 @@ export declare const boqContract: {
121
125
  rateInstall: number;
122
126
  sortOrder: number;
123
127
  workPackageId?: string | null | undefined;
128
+ materialKey?: string | null | undefined;
124
129
  }[] | undefined;
125
130
  }>;
126
131
  }, "strip", z.ZodTypeAny, {
@@ -148,6 +153,7 @@ export declare const boqContract: {
148
153
  rateInstall: number;
149
154
  sortOrder: number;
150
155
  workPackageId?: string | null | undefined;
156
+ materialKey?: string | null | undefined;
151
157
  }[] | undefined;
152
158
  };
153
159
  }, {
@@ -175,6 +181,7 @@ export declare const boqContract: {
175
181
  rateInstall: number;
176
182
  sortOrder: number;
177
183
  workPackageId?: string | null | undefined;
184
+ materialKey?: string | null | undefined;
178
185
  }[] | undefined;
179
186
  };
180
187
  }>, "many">;
@@ -245,6 +252,7 @@ export declare const boqContract: {
245
252
  rateInstall: number;
246
253
  sortOrder: number;
247
254
  workPackageId?: string | null | undefined;
255
+ materialKey?: string | null | undefined;
248
256
  }[] | undefined;
249
257
  };
250
258
  }[];
@@ -289,6 +297,7 @@ export declare const boqContract: {
289
297
  rateInstall: number;
290
298
  sortOrder: number;
291
299
  workPackageId?: string | null | undefined;
300
+ materialKey?: string | null | undefined;
292
301
  }[] | undefined;
293
302
  };
294
303
  }[];
@@ -394,6 +403,7 @@ export declare const boqContract: {
394
403
  quantity: z.ZodNumber;
395
404
  rateSupply: z.ZodNumber;
396
405
  rateInstall: z.ZodNumber;
406
+ materialKey: z.ZodOptional<z.ZodString>;
397
407
  workPackageId: z.ZodOptional<z.ZodString>;
398
408
  sortOrder: z.ZodOptional<z.ZodNumber>;
399
409
  }, "strip", z.ZodTypeAny, {
@@ -404,6 +414,7 @@ export declare const boqContract: {
404
414
  rateSupply: number;
405
415
  rateInstall: number;
406
416
  workPackageId?: string | undefined;
417
+ materialKey?: string | undefined;
407
418
  sortOrder?: number | undefined;
408
419
  }, {
409
420
  description: string;
@@ -413,6 +424,7 @@ export declare const boqContract: {
413
424
  rateSupply: number;
414
425
  rateInstall: number;
415
426
  workPackageId?: string | undefined;
427
+ materialKey?: string | undefined;
416
428
  sortOrder?: number | undefined;
417
429
  }>, "many">;
418
430
  }, "strip", z.ZodTypeAny, {
@@ -426,6 +438,7 @@ export declare const boqContract: {
426
438
  rateSupply: number;
427
439
  rateInstall: number;
428
440
  workPackageId?: string | undefined;
441
+ materialKey?: string | undefined;
429
442
  sortOrder?: number | undefined;
430
443
  }[];
431
444
  }, {
@@ -438,6 +451,7 @@ export declare const boqContract: {
438
451
  rateSupply: number;
439
452
  rateInstall: number;
440
453
  workPackageId?: string | undefined;
454
+ materialKey?: string | undefined;
441
455
  sortOrder?: number | undefined;
442
456
  }[];
443
457
  currency?: string | undefined;
@@ -468,6 +482,7 @@ export declare const boqContract: {
468
482
  quantity: z.ZodNumber;
469
483
  rateSupply: z.ZodNumber;
470
484
  rateInstall: z.ZodNumber;
485
+ materialKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
471
486
  sortOrder: z.ZodNumber;
472
487
  }, "strip", z.ZodTypeAny, {
473
488
  id: string;
@@ -482,6 +497,7 @@ export declare const boqContract: {
482
497
  rateInstall: number;
483
498
  sortOrder: number;
484
499
  workPackageId?: string | null | undefined;
500
+ materialKey?: string | null | undefined;
485
501
  }, {
486
502
  id: string;
487
503
  companyId: string;
@@ -495,6 +511,7 @@ export declare const boqContract: {
495
511
  rateInstall: number;
496
512
  sortOrder: number;
497
513
  workPackageId?: string | null | undefined;
514
+ materialKey?: string | null | undefined;
498
515
  }>, "many">>;
499
516
  createdAt: z.ZodString;
500
517
  updatedAt: z.ZodString;
@@ -520,6 +537,7 @@ export declare const boqContract: {
520
537
  rateInstall: number;
521
538
  sortOrder: number;
522
539
  workPackageId?: string | null | undefined;
540
+ materialKey?: string | null | undefined;
523
541
  }[] | undefined;
524
542
  }, {
525
543
  createdAt: string;
@@ -543,6 +561,7 @@ export declare const boqContract: {
543
561
  rateInstall: number;
544
562
  sortOrder: number;
545
563
  workPackageId?: string | null | undefined;
564
+ materialKey?: string | null | undefined;
546
565
  }[] | undefined;
547
566
  }>;
548
567
  }, "strip", z.ZodTypeAny, {
@@ -570,6 +589,7 @@ export declare const boqContract: {
570
589
  rateInstall: number;
571
590
  sortOrder: number;
572
591
  workPackageId?: string | null | undefined;
592
+ materialKey?: string | null | undefined;
573
593
  }[] | undefined;
574
594
  };
575
595
  }, {
@@ -597,6 +617,7 @@ export declare const boqContract: {
597
617
  rateInstall: number;
598
618
  sortOrder: number;
599
619
  workPackageId?: string | null | undefined;
620
+ materialKey?: string | null | undefined;
600
621
  }[] | undefined;
601
622
  };
602
623
  }>;
@@ -662,6 +683,7 @@ export declare const boqContract: {
662
683
  rateInstall: number;
663
684
  sortOrder: number;
664
685
  workPackageId?: string | null | undefined;
686
+ materialKey?: string | null | undefined;
665
687
  }[] | undefined;
666
688
  };
667
689
  };
@@ -705,6 +727,7 @@ export declare const boqContract: {
705
727
  rateInstall: number;
706
728
  sortOrder: number;
707
729
  workPackageId?: string | null | undefined;
730
+ materialKey?: string | null | undefined;
708
731
  }[] | undefined;
709
732
  };
710
733
  };
@@ -857,6 +880,7 @@ export declare const boqContract: {
857
880
  quantity: z.ZodNumber;
858
881
  rateSupply: z.ZodNumber;
859
882
  rateInstall: z.ZodNumber;
883
+ materialKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
860
884
  sortOrder: z.ZodNumber;
861
885
  }, "strip", z.ZodTypeAny, {
862
886
  id: string;
@@ -871,6 +895,7 @@ export declare const boqContract: {
871
895
  rateInstall: number;
872
896
  sortOrder: number;
873
897
  workPackageId?: string | null | undefined;
898
+ materialKey?: string | null | undefined;
874
899
  }, {
875
900
  id: string;
876
901
  companyId: string;
@@ -884,6 +909,7 @@ export declare const boqContract: {
884
909
  rateInstall: number;
885
910
  sortOrder: number;
886
911
  workPackageId?: string | null | undefined;
912
+ materialKey?: string | null | undefined;
887
913
  }>, "many">>;
888
914
  createdAt: z.ZodString;
889
915
  updatedAt: z.ZodString;
@@ -909,6 +935,7 @@ export declare const boqContract: {
909
935
  rateInstall: number;
910
936
  sortOrder: number;
911
937
  workPackageId?: string | null | undefined;
938
+ materialKey?: string | null | undefined;
912
939
  }[] | undefined;
913
940
  }, {
914
941
  createdAt: string;
@@ -932,6 +959,7 @@ export declare const boqContract: {
932
959
  rateInstall: number;
933
960
  sortOrder: number;
934
961
  workPackageId?: string | null | undefined;
962
+ materialKey?: string | null | undefined;
935
963
  }[] | undefined;
936
964
  }>;
937
965
  }, "strip", z.ZodTypeAny, {
@@ -959,6 +987,7 @@ export declare const boqContract: {
959
987
  rateInstall: number;
960
988
  sortOrder: number;
961
989
  workPackageId?: string | null | undefined;
990
+ materialKey?: string | null | undefined;
962
991
  }[] | undefined;
963
992
  };
964
993
  }, {
@@ -986,6 +1015,7 @@ export declare const boqContract: {
986
1015
  rateInstall: number;
987
1016
  sortOrder: number;
988
1017
  workPackageId?: string | null | undefined;
1018
+ materialKey?: string | null | undefined;
989
1019
  }[] | undefined;
990
1020
  };
991
1021
  }>;
@@ -1051,6 +1081,7 @@ export declare const boqContract: {
1051
1081
  rateInstall: number;
1052
1082
  sortOrder: number;
1053
1083
  workPackageId?: string | null | undefined;
1084
+ materialKey?: string | null | undefined;
1054
1085
  }[] | undefined;
1055
1086
  };
1056
1087
  };
@@ -1094,6 +1125,7 @@ export declare const boqContract: {
1094
1125
  rateInstall: number;
1095
1126
  sortOrder: number;
1096
1127
  workPackageId?: string | null | undefined;
1128
+ materialKey?: string | null | undefined;
1097
1129
  }[] | undefined;
1098
1130
  };
1099
1131
  };
@@ -1210,5 +1242,90 @@ export declare const boqContract: {
1210
1242
  }>;
1211
1243
  };
1212
1244
  };
1245
+ exportCsv: {
1246
+ pathParams: z.ZodObject<{
1247
+ projectId: z.ZodString;
1248
+ }, "strip", z.ZodTypeAny, {
1249
+ projectId: string;
1250
+ }, {
1251
+ projectId: string;
1252
+ }>;
1253
+ summary: "Export project BOQ lines as CSV";
1254
+ method: "GET";
1255
+ path: "/projects/:projectId/boqs/export.csv";
1256
+ responses: {
1257
+ 200: z.ZodObject<{
1258
+ csv: z.ZodString;
1259
+ }, "strip", z.ZodTypeAny, {
1260
+ csv: string;
1261
+ }, {
1262
+ csv: string;
1263
+ }>;
1264
+ 401: z.ZodObject<{
1265
+ errors: z.ZodArray<z.ZodObject<{
1266
+ status: z.ZodString;
1267
+ title: z.ZodString;
1268
+ detail: z.ZodOptional<z.ZodString>;
1269
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1270
+ }, "strip", z.ZodTypeAny, {
1271
+ status: string;
1272
+ title: string;
1273
+ detail?: string | undefined;
1274
+ meta?: Record<string, unknown> | undefined;
1275
+ }, {
1276
+ status: string;
1277
+ title: string;
1278
+ detail?: string | undefined;
1279
+ meta?: Record<string, unknown> | undefined;
1280
+ }>, "many">;
1281
+ }, "strip", z.ZodTypeAny, {
1282
+ errors: {
1283
+ status: string;
1284
+ title: string;
1285
+ detail?: string | undefined;
1286
+ meta?: Record<string, unknown> | undefined;
1287
+ }[];
1288
+ }, {
1289
+ errors: {
1290
+ status: string;
1291
+ title: string;
1292
+ detail?: string | undefined;
1293
+ meta?: Record<string, unknown> | undefined;
1294
+ }[];
1295
+ }>;
1296
+ 403: z.ZodObject<{
1297
+ errors: z.ZodArray<z.ZodObject<{
1298
+ status: z.ZodString;
1299
+ title: z.ZodString;
1300
+ detail: z.ZodOptional<z.ZodString>;
1301
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1302
+ }, "strip", z.ZodTypeAny, {
1303
+ status: string;
1304
+ title: string;
1305
+ detail?: string | undefined;
1306
+ meta?: Record<string, unknown> | undefined;
1307
+ }, {
1308
+ status: string;
1309
+ title: string;
1310
+ detail?: string | undefined;
1311
+ meta?: Record<string, unknown> | undefined;
1312
+ }>, "many">;
1313
+ }, "strip", z.ZodTypeAny, {
1314
+ errors: {
1315
+ status: string;
1316
+ title: string;
1317
+ detail?: string | undefined;
1318
+ meta?: Record<string, unknown> | undefined;
1319
+ }[];
1320
+ }, {
1321
+ errors: {
1322
+ status: string;
1323
+ title: string;
1324
+ detail?: string | undefined;
1325
+ meta?: Record<string, unknown> | undefined;
1326
+ }[];
1327
+ }>;
1328
+ };
1329
+ };
1213
1330
  };
1214
1331
  //# sourceMappingURL=boq.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boq.d.ts","sourceRoot":"","sources":["../../../src/contracts/boq.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDtB,CAAC"}
package/contracts/boq.js CHANGED
@@ -1,15 +1,22 @@
1
1
  import { initContract } from '@ts-rest/core';
2
2
  import { z } from 'zod';
3
- import { CuidSchema, JsonApiCollectionResponseSchema, JsonApiErrorResponseSchema, JsonApiResponseSchema } from '../schemas/common';
4
3
  import { BoqResourceSchema, ImportBoqRequestSchema } from '../schemas/boq';
4
+ import { CuidSchema, JsonApiCollectionResponseSchema, JsonApiErrorResponseSchema, JsonApiResponseSchema, } from '../schemas/common';
5
5
  const c = initContract();
6
6
  export const boqContract = c.router({
7
7
  listBoqs: {
8
8
  method: 'GET',
9
9
  path: '/projects/:projectId/boqs',
10
10
  pathParams: z.object({ projectId: CuidSchema }),
11
- query: z.object({ page: z.coerce.number().min(1).default(1), limit: z.coerce.number().min(1).max(100).default(20) }),
12
- responses: { 200: JsonApiCollectionResponseSchema(BoqResourceSchema), 401: JsonApiErrorResponseSchema, 403: JsonApiErrorResponseSchema },
11
+ query: z.object({
12
+ page: z.coerce.number().min(1).default(1),
13
+ limit: z.coerce.number().min(1).max(100).default(20),
14
+ }),
15
+ responses: {
16
+ 200: JsonApiCollectionResponseSchema(BoqResourceSchema),
17
+ 401: JsonApiErrorResponseSchema,
18
+ 403: JsonApiErrorResponseSchema,
19
+ },
13
20
  summary: 'List BOQs for a project',
14
21
  },
15
22
  importBoq: {
@@ -17,15 +24,36 @@ export const boqContract = c.router({
17
24
  path: '/projects/:projectId/boqs/import',
18
25
  pathParams: z.object({ projectId: CuidSchema }),
19
26
  body: ImportBoqRequestSchema,
20
- responses: { 201: JsonApiResponseSchema(BoqResourceSchema), 400: JsonApiErrorResponseSchema, 401: JsonApiErrorResponseSchema, 403: JsonApiErrorResponseSchema },
27
+ responses: {
28
+ 201: JsonApiResponseSchema(BoqResourceSchema),
29
+ 400: JsonApiErrorResponseSchema,
30
+ 401: JsonApiErrorResponseSchema,
31
+ 403: JsonApiErrorResponseSchema,
32
+ },
21
33
  summary: 'Import BOQ lines with supply/install rates',
22
34
  },
23
35
  getBoq: {
24
36
  method: 'GET',
25
37
  path: '/boqs/:boqId',
26
38
  pathParams: z.object({ boqId: CuidSchema }),
27
- responses: { 200: JsonApiResponseSchema(BoqResourceSchema), 401: JsonApiErrorResponseSchema, 403: JsonApiErrorResponseSchema, 404: JsonApiErrorResponseSchema },
39
+ responses: {
40
+ 200: JsonApiResponseSchema(BoqResourceSchema),
41
+ 401: JsonApiErrorResponseSchema,
42
+ 403: JsonApiErrorResponseSchema,
43
+ 404: JsonApiErrorResponseSchema,
44
+ },
28
45
  summary: 'Get BOQ with lines',
29
46
  },
47
+ exportCsv: {
48
+ method: 'GET',
49
+ path: '/projects/:projectId/boqs/export.csv',
50
+ pathParams: z.object({ projectId: CuidSchema }),
51
+ responses: {
52
+ 200: z.object({ csv: z.string() }),
53
+ 401: JsonApiErrorResponseSchema,
54
+ 403: JsonApiErrorResponseSchema,
55
+ },
56
+ summary: 'Export project BOQ lines as CSV',
57
+ },
30
58
  });
31
59
  //# sourceMappingURL=boq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boq.js","sourceRoot":"","sources":["../../../src/contracts/boq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,+BAA+B,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACnI,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,MAAM,CAAC,GAAG,YAAY,EAAE,CAAC;AACzB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,QAAQ,EAAE;QACR,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,2BAA2B;QACjC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;QAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;QACpH,SAAS,EAAE,EAAE,GAAG,EAAE,+BAA+B,CAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,0BAA0B,EAAE,GAAG,EAAE,0BAA0B,EAAE;QACxI,OAAO,EAAE,yBAAyB;KACnC;IACD,SAAS,EAAE;QACT,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kCAAkC;QACxC,UAAU,EAAE,CA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