@chenchaolong/plugin-trade-compliance-workbench 1.0.214 → 1.0.216

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 (85) hide show
  1. package/dist/lib/import-jobs/import-command.builder.js +3 -3
  2. package/dist/lib/import-jobs/import-command.builder.js.map +1 -1
  3. package/dist/lib/import-jobs/source-field-recovery.d.ts +2 -0
  4. package/dist/lib/import-jobs/source-field-recovery.d.ts.map +1 -1
  5. package/dist/lib/import-jobs/source-field-recovery.js +47 -5
  6. package/dist/lib/import-jobs/source-field-recovery.js.map +1 -1
  7. package/dist/lib/import-jobs/spreadsheet-contract-facts.d.ts +5 -0
  8. package/dist/lib/import-jobs/spreadsheet-contract-facts.d.ts.map +1 -1
  9. package/dist/lib/import-jobs/spreadsheet-contract-facts.js +42 -7
  10. package/dist/lib/import-jobs/spreadsheet-contract-facts.js.map +1 -1
  11. package/dist/lib/packing/packing-spreadsheet.d.ts.map +1 -1
  12. package/dist/lib/packing/packing-spreadsheet.js +52 -6
  13. package/dist/lib/packing/packing-spreadsheet.js.map +1 -1
  14. package/dist/lib/packing/supplier-packing.service.d.ts.map +1 -1
  15. package/dist/lib/packing/supplier-packing.service.js +19 -2
  16. package/dist/lib/packing/supplier-packing.service.js.map +1 -1
  17. package/dist/lib/remote-components/trade-compliance-workbench/app.css +1 -1
  18. package/dist/lib/remote-components/trade-compliance-workbench/app.js +5 -5
  19. package/dist/lib/remote-ui/app-source.d.ts.map +1 -1
  20. package/dist/lib/remote-ui/app-source.js +0 -5
  21. package/dist/lib/remote-ui/app-source.js.map +1 -1
  22. package/dist/lib/remote-ui/components/generation-progress.d.ts +29 -0
  23. package/dist/lib/remote-ui/components/generation-progress.d.ts.map +1 -0
  24. package/dist/lib/remote-ui/components/generation-progress.js +79 -0
  25. package/dist/lib/remote-ui/components/generation-progress.js.map +1 -0
  26. package/dist/lib/remote-ui/components/packing-batches.d.ts +1 -0
  27. package/dist/lib/remote-ui/components/packing-batches.d.ts.map +1 -1
  28. package/dist/lib/remote-ui/components/packing-batches.js +12 -5
  29. package/dist/lib/remote-ui/components/packing-batches.js.map +1 -1
  30. package/dist/lib/remote-ui/components/packing-generation-actions.d.ts +4 -1
  31. package/dist/lib/remote-ui/components/packing-generation-actions.d.ts.map +1 -1
  32. package/dist/lib/remote-ui/components/packing-generation-actions.js +5 -4
  33. package/dist/lib/remote-ui/components/packing-generation-actions.js.map +1 -1
  34. package/dist/lib/remote-ui/components/supplier-materials.d.ts +18 -1
  35. package/dist/lib/remote-ui/components/supplier-materials.d.ts.map +1 -1
  36. package/dist/lib/remote-ui/components/supplier-materials.js +30 -4
  37. package/dist/lib/remote-ui/components/supplier-materials.js.map +1 -1
  38. package/dist/lib/remote-ui/generation-tasks.js +1 -1
  39. package/dist/lib/remote-ui/generation-tasks.js.map +1 -1
  40. package/dist/lib/remote-ui/import-task-status.d.ts +2 -2
  41. package/dist/lib/remote-ui/pages/contracts.d.ts.map +1 -1
  42. package/dist/lib/remote-ui/pages/contracts.js +7 -1
  43. package/dist/lib/remote-ui/pages/contracts.js.map +1 -1
  44. package/dist/lib/remote-ui/pages/files.d.ts +1 -1
  45. package/dist/lib/remote-ui/pages/files.d.ts.map +1 -1
  46. package/dist/lib/remote-ui/pages/files.js +4 -3
  47. package/dist/lib/remote-ui/pages/files.js.map +1 -1
  48. package/dist/lib/remote-ui/pages/sales-files.css +10 -0
  49. package/dist/lib/remote-ui/pages/sales.d.ts +1 -0
  50. package/dist/lib/remote-ui/pages/sales.d.ts.map +1 -1
  51. package/dist/lib/remote-ui/pages/sales.js +18 -11
  52. package/dist/lib/remote-ui/pages/sales.js.map +1 -1
  53. package/dist/lib/remote-ui/use-sales-file-history-refresh.d.ts +2 -2
  54. package/dist/lib/remote-ui/use-sales-file-history-refresh.d.ts.map +1 -1
  55. package/dist/lib/remote-ui/use-sales-file-history-refresh.js +7 -24
  56. package/dist/lib/remote-ui/use-sales-file-history-refresh.js.map +1 -1
  57. package/dist/lib/sales-file.service.d.ts +1 -1
  58. package/dist/lib/sales-file.service.d.ts.map +1 -1
  59. package/dist/lib/sales-file.service.js +36 -10
  60. package/dist/lib/sales-file.service.js.map +1 -1
  61. package/dist/lib/supplier-materials/customs-coverage.d.ts +30 -0
  62. package/dist/lib/supplier-materials/customs-coverage.d.ts.map +1 -0
  63. package/dist/lib/supplier-materials/customs-coverage.js +30 -0
  64. package/dist/lib/supplier-materials/customs-coverage.js.map +1 -0
  65. package/dist/lib/supplier-materials/generation-materials.d.ts +2 -0
  66. package/dist/lib/supplier-materials/generation-materials.d.ts.map +1 -1
  67. package/dist/lib/supplier-materials/generation-materials.js +13 -1
  68. package/dist/lib/supplier-materials/generation-materials.js.map +1 -1
  69. package/dist/lib/supplier-materials/supplier-materials.d.ts +11 -4
  70. package/dist/lib/supplier-materials/supplier-materials.d.ts.map +1 -1
  71. package/dist/lib/supplier-materials/supplier-materials.js +43 -19
  72. package/dist/lib/supplier-materials/supplier-materials.js.map +1 -1
  73. package/dist/lib/types.d.ts +1 -0
  74. package/dist/lib/types.d.ts.map +1 -1
  75. package/dist/lib/types.js.map +1 -1
  76. package/dist/lib/workbench-view.provider.d.ts +30 -30
  77. package/dist/lib/workbench.middleware.d.ts +97 -90
  78. package/dist/lib/workbench.middleware.d.ts.map +1 -1
  79. package/dist/lib/workbench.middleware.js +1 -1
  80. package/dist/lib/workbench.middleware.js.map +1 -1
  81. package/dist/lib/workbench.service.d.ts +8 -7
  82. package/dist/lib/workbench.service.d.ts.map +1 -1
  83. package/dist/lib/workbench.service.js +6 -4
  84. package/dist/lib/workbench.service.js.map +1 -1
  85. package/package.json +1 -1
@@ -51,20 +51,20 @@ export declare class TradeComplianceWorkbenchMiddleware {
51
51
  translationSource: "SOURCE_CHINESE";
52
52
  productName?: string | undefined;
53
53
  hsCode?: string | undefined;
54
+ sourceLocation?: string | undefined;
55
+ sourceContent?: string | undefined;
54
56
  controlDescription?: string | undefined;
55
57
  originalProductName?: string | undefined;
56
58
  originalControlDescription?: string | undefined;
57
- sourceLocation?: string | undefined;
58
- sourceContent?: string | undefined;
59
59
  }, {
60
60
  translationSource: "SOURCE_CHINESE";
61
61
  productName?: string | undefined;
62
62
  hsCode?: string | undefined;
63
+ sourceLocation?: string | undefined;
64
+ sourceContent?: string | undefined;
63
65
  controlDescription?: string | undefined;
64
66
  originalProductName?: string | undefined;
65
67
  originalControlDescription?: string | undefined;
66
- sourceLocation?: string | undefined;
67
- sourceContent?: string | undefined;
68
68
  }>, z.ZodObject<{
69
69
  translationSource: z.ZodLiteral<"AGENT_TRANSLATED">;
70
70
  productName: z.ZodOptional<z.ZodString>;
@@ -78,156 +78,156 @@ export declare class TradeComplianceWorkbenchMiddleware {
78
78
  translationSource: "AGENT_TRANSLATED";
79
79
  productName?: string | undefined;
80
80
  hsCode?: string | undefined;
81
+ sourceLocation?: string | undefined;
82
+ sourceContent?: string | undefined;
81
83
  controlDescription?: string | undefined;
82
84
  originalProductName?: string | undefined;
83
85
  originalControlDescription?: string | undefined;
84
- sourceLocation?: string | undefined;
85
- sourceContent?: string | undefined;
86
86
  }, {
87
87
  translationSource: "AGENT_TRANSLATED";
88
88
  productName?: string | undefined;
89
89
  hsCode?: string | undefined;
90
+ sourceLocation?: string | undefined;
91
+ sourceContent?: string | undefined;
90
92
  controlDescription?: string | undefined;
91
93
  originalProductName?: string | undefined;
92
94
  originalControlDescription?: string | undefined;
93
- sourceLocation?: string | undefined;
94
- sourceContent?: string | undefined;
95
95
  }>]>, {
96
96
  translationSource: "SOURCE_CHINESE";
97
97
  productName?: string | undefined;
98
98
  hsCode?: string | undefined;
99
+ sourceLocation?: string | undefined;
100
+ sourceContent?: string | undefined;
99
101
  controlDescription?: string | undefined;
100
102
  originalProductName?: string | undefined;
101
103
  originalControlDescription?: string | undefined;
102
- sourceLocation?: string | undefined;
103
- sourceContent?: string | undefined;
104
104
  } | {
105
105
  translationSource: "AGENT_TRANSLATED";
106
106
  productName?: string | undefined;
107
107
  hsCode?: string | undefined;
108
+ sourceLocation?: string | undefined;
109
+ sourceContent?: string | undefined;
108
110
  controlDescription?: string | undefined;
109
111
  originalProductName?: string | undefined;
110
112
  originalControlDescription?: string | undefined;
111
- sourceLocation?: string | undefined;
112
- sourceContent?: string | undefined;
113
113
  }, {
114
114
  translationSource: "SOURCE_CHINESE";
115
115
  productName?: string | undefined;
116
116
  hsCode?: string | undefined;
117
+ sourceLocation?: string | undefined;
118
+ sourceContent?: string | undefined;
117
119
  controlDescription?: string | undefined;
118
120
  originalProductName?: string | undefined;
119
121
  originalControlDescription?: string | undefined;
120
- sourceLocation?: string | undefined;
121
- sourceContent?: string | undefined;
122
122
  } | {
123
123
  translationSource: "AGENT_TRANSLATED";
124
124
  productName?: string | undefined;
125
125
  hsCode?: string | undefined;
126
+ sourceLocation?: string | undefined;
127
+ sourceContent?: string | undefined;
126
128
  controlDescription?: string | undefined;
127
129
  originalProductName?: string | undefined;
128
130
  originalControlDescription?: string | undefined;
129
- sourceLocation?: string | undefined;
130
- sourceContent?: string | undefined;
131
131
  }>, "many">;
132
132
  }, "strip", z.ZodTypeAny, {
133
133
  sourceFileId: string;
134
134
  sourceFileName: string;
135
- catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
136
135
  importTaskId: string;
137
136
  rows: ({
138
137
  translationSource: "SOURCE_CHINESE";
139
138
  productName?: string | undefined;
140
139
  hsCode?: string | undefined;
140
+ sourceLocation?: string | undefined;
141
+ sourceContent?: string | undefined;
141
142
  controlDescription?: string | undefined;
142
143
  originalProductName?: string | undefined;
143
144
  originalControlDescription?: string | undefined;
144
- sourceLocation?: string | undefined;
145
- sourceContent?: string | undefined;
146
145
  } | {
147
146
  translationSource: "AGENT_TRANSLATED";
148
147
  productName?: string | undefined;
149
148
  hsCode?: string | undefined;
149
+ sourceLocation?: string | undefined;
150
+ sourceContent?: string | undefined;
150
151
  controlDescription?: string | undefined;
151
152
  originalProductName?: string | undefined;
152
153
  originalControlDescription?: string | undefined;
153
- sourceLocation?: string | undefined;
154
- sourceContent?: string | undefined;
155
154
  })[];
155
+ catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
156
156
  replaceBatchId?: string | undefined;
157
157
  }, {
158
158
  sourceFileId: string;
159
159
  sourceFileName: string;
160
- catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
161
160
  importTaskId: string;
162
161
  rows: ({
163
162
  translationSource: "SOURCE_CHINESE";
164
163
  productName?: string | undefined;
165
164
  hsCode?: string | undefined;
165
+ sourceLocation?: string | undefined;
166
+ sourceContent?: string | undefined;
166
167
  controlDescription?: string | undefined;
167
168
  originalProductName?: string | undefined;
168
169
  originalControlDescription?: string | undefined;
169
- sourceLocation?: string | undefined;
170
- sourceContent?: string | undefined;
171
170
  } | {
172
171
  translationSource: "AGENT_TRANSLATED";
173
172
  productName?: string | undefined;
174
173
  hsCode?: string | undefined;
174
+ sourceLocation?: string | undefined;
175
+ sourceContent?: string | undefined;
175
176
  controlDescription?: string | undefined;
176
177
  originalProductName?: string | undefined;
177
178
  originalControlDescription?: string | undefined;
178
- sourceLocation?: string | undefined;
179
- sourceContent?: string | undefined;
180
179
  })[];
180
+ catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
181
181
  replaceBatchId?: string | undefined;
182
182
  }>, {
183
183
  sourceFileId: string;
184
184
  sourceFileName: string;
185
- catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
186
185
  importTaskId: string;
187
186
  rows: ({
188
187
  translationSource: "SOURCE_CHINESE";
189
188
  productName?: string | undefined;
190
189
  hsCode?: string | undefined;
190
+ sourceLocation?: string | undefined;
191
+ sourceContent?: string | undefined;
191
192
  controlDescription?: string | undefined;
192
193
  originalProductName?: string | undefined;
193
194
  originalControlDescription?: string | undefined;
194
- sourceLocation?: string | undefined;
195
- sourceContent?: string | undefined;
196
195
  } | {
197
196
  translationSource: "AGENT_TRANSLATED";
198
197
  productName?: string | undefined;
199
198
  hsCode?: string | undefined;
199
+ sourceLocation?: string | undefined;
200
+ sourceContent?: string | undefined;
200
201
  controlDescription?: string | undefined;
201
202
  originalProductName?: string | undefined;
202
203
  originalControlDescription?: string | undefined;
203
- sourceLocation?: string | undefined;
204
- sourceContent?: string | undefined;
205
204
  })[];
205
+ catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
206
206
  replaceBatchId?: string | undefined;
207
207
  }, {
208
208
  sourceFileId: string;
209
209
  sourceFileName: string;
210
- catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
211
210
  importTaskId: string;
212
211
  rows: ({
213
212
  translationSource: "SOURCE_CHINESE";
214
213
  productName?: string | undefined;
215
214
  hsCode?: string | undefined;
215
+ sourceLocation?: string | undefined;
216
+ sourceContent?: string | undefined;
216
217
  controlDescription?: string | undefined;
217
218
  originalProductName?: string | undefined;
218
219
  originalControlDescription?: string | undefined;
219
- sourceLocation?: string | undefined;
220
- sourceContent?: string | undefined;
221
220
  } | {
222
221
  translationSource: "AGENT_TRANSLATED";
223
222
  productName?: string | undefined;
224
223
  hsCode?: string | undefined;
224
+ sourceLocation?: string | undefined;
225
+ sourceContent?: string | undefined;
225
226
  controlDescription?: string | undefined;
226
227
  originalProductName?: string | undefined;
227
228
  originalControlDescription?: string | undefined;
228
- sourceLocation?: string | undefined;
229
- sourceContent?: string | undefined;
230
229
  })[];
230
+ catalogType: "DUAL_USE" | "OVERSEAS_SANCTION";
231
231
  replaceBatchId?: string | undefined;
232
232
  }, string> | import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
233
233
  sourceFileId: z.ZodString;
@@ -547,12 +547,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
547
547
  }, z.ZodTypeAny, "passthrough">[];
548
548
  order: {
549
549
  number?: string | null | undefined;
550
- date?: string | null | undefined;
551
- orderDate?: string | null | undefined;
552
550
  contractNo?: string | null | undefined;
551
+ orderDate?: string | null | undefined;
553
552
  contractAmountCny?: string | number | null | undefined;
554
553
  paidAmountCny?: string | number | null | undefined;
555
554
  refundedAmountCny?: string | number | null | undefined;
555
+ date?: string | null | undefined;
556
556
  totalAmount?: string | number | null | undefined;
557
557
  amount?: string | number | null | undefined;
558
558
  contractDate?: string | null | undefined;
@@ -617,12 +617,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
617
617
  }, z.ZodTypeAny, "passthrough">[];
618
618
  order: {
619
619
  number?: string | null | undefined;
620
- date?: string | null | undefined;
621
- orderDate?: string | null | undefined;
622
620
  contractNo?: string | null | undefined;
621
+ orderDate?: string | null | undefined;
623
622
  contractAmountCny?: string | number | null | undefined;
624
623
  paidAmountCny?: string | number | null | undefined;
625
624
  refundedAmountCny?: string | number | null | undefined;
625
+ date?: string | null | undefined;
626
626
  totalAmount?: string | number | null | undefined;
627
627
  amount?: string | number | null | undefined;
628
628
  contractDate?: string | null | undefined;
@@ -687,12 +687,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
687
687
  }, z.ZodTypeAny, "passthrough">[];
688
688
  order: {
689
689
  number?: string | null | undefined;
690
- date?: string | null | undefined;
691
- orderDate?: string | null | undefined;
692
690
  contractNo?: string | null | undefined;
691
+ orderDate?: string | null | undefined;
693
692
  contractAmountCny?: string | number | null | undefined;
694
693
  paidAmountCny?: string | number | null | undefined;
695
694
  refundedAmountCny?: string | number | null | undefined;
695
+ date?: string | null | undefined;
696
696
  totalAmount?: string | number | null | undefined;
697
697
  amount?: string | number | null | undefined;
698
698
  contractDate?: string | null | undefined;
@@ -757,12 +757,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
757
757
  }, z.ZodTypeAny, "passthrough">[];
758
758
  order: {
759
759
  number?: string | null | undefined;
760
- date?: string | null | undefined;
761
- orderDate?: string | null | undefined;
762
760
  contractNo?: string | null | undefined;
761
+ orderDate?: string | null | undefined;
763
762
  contractAmountCny?: string | number | null | undefined;
764
763
  paidAmountCny?: string | number | null | undefined;
765
764
  refundedAmountCny?: string | number | null | undefined;
765
+ date?: string | null | undefined;
766
766
  totalAmount?: string | number | null | undefined;
767
767
  amount?: string | number | null | undefined;
768
768
  contractDate?: string | null | undefined;
@@ -914,14 +914,14 @@ export declare class TradeComplianceWorkbenchMiddleware {
914
914
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
915
915
  sourceLocation?: string | null | undefined;
916
916
  sourceContent?: string | null | undefined;
917
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
917
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
918
918
  sourceText?: string | null | undefined;
919
919
  reviewedText?: string | null | undefined;
920
920
  }, {
921
921
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
922
922
  sourceLocation?: string | null | undefined;
923
923
  sourceContent?: string | null | undefined;
924
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
924
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
925
925
  sourceText?: string | null | undefined;
926
926
  reviewedText?: string | null | undefined;
927
927
  }>, "many">;
@@ -959,11 +959,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
959
959
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
960
960
  sourceLocation?: string | null | undefined;
961
961
  sourceContent?: string | null | undefined;
962
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
962
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
963
963
  sourceText?: string | null | undefined;
964
964
  reviewedText?: string | null | undefined;
965
965
  }[];
966
966
  customer: {
967
+ englishName?: string | null | undefined;
967
968
  countryOrRegion?: string | null | undefined;
968
969
  name?: string | null | undefined;
969
970
  address?: string | null | undefined;
@@ -973,7 +974,6 @@ export declare class TradeComplianceWorkbenchMiddleware {
973
974
  taxNumber?: string | null | undefined;
974
975
  paymentAccount?: string | null | undefined;
975
976
  bankName?: string | null | undefined;
976
- englishName?: string | null | undefined;
977
977
  country?: string | null | undefined;
978
978
  customerName?: string | null | undefined;
979
979
  contactPhone?: string | null | undefined;
@@ -1007,11 +1007,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
1007
1007
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
1008
1008
  sourceLocation?: string | null | undefined;
1009
1009
  sourceContent?: string | null | undefined;
1010
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
1010
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
1011
1011
  sourceText?: string | null | undefined;
1012
1012
  reviewedText?: string | null | undefined;
1013
1013
  }[];
1014
1014
  customer: {
1015
+ englishName?: string | null | undefined;
1015
1016
  countryOrRegion?: string | null | undefined;
1016
1017
  name?: string | null | undefined;
1017
1018
  address?: string | null | undefined;
@@ -1021,7 +1022,6 @@ export declare class TradeComplianceWorkbenchMiddleware {
1021
1022
  taxNumber?: string | null | undefined;
1022
1023
  paymentAccount?: string | null | undefined;
1023
1024
  bankName?: string | null | undefined;
1024
- englishName?: string | null | undefined;
1025
1025
  country?: string | null | undefined;
1026
1026
  customerName?: string | null | undefined;
1027
1027
  contactPhone?: string | null | undefined;
@@ -1055,11 +1055,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
1055
1055
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
1056
1056
  sourceLocation?: string | null | undefined;
1057
1057
  sourceContent?: string | null | undefined;
1058
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
1058
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
1059
1059
  sourceText?: string | null | undefined;
1060
1060
  reviewedText?: string | null | undefined;
1061
1061
  }[];
1062
1062
  customer: {
1063
+ englishName?: string | null | undefined;
1063
1064
  countryOrRegion?: string | null | undefined;
1064
1065
  name?: string | null | undefined;
1065
1066
  address?: string | null | undefined;
@@ -1069,7 +1070,6 @@ export declare class TradeComplianceWorkbenchMiddleware {
1069
1070
  taxNumber?: string | null | undefined;
1070
1071
  paymentAccount?: string | null | undefined;
1071
1072
  bankName?: string | null | undefined;
1072
- englishName?: string | null | undefined;
1073
1073
  country?: string | null | undefined;
1074
1074
  customerName?: string | null | undefined;
1075
1075
  contactPhone?: string | null | undefined;
@@ -1103,11 +1103,12 @@ export declare class TradeComplianceWorkbenchMiddleware {
1103
1103
  clauseType: "CONTRACT_AMOUNT" | "TAX_RATE" | "PRICE_TERMS" | "TRANSPORT" | "WARRANTY" | "BREACH_LIABILITY" | "PAYMENT_TERMS";
1104
1104
  sourceLocation?: string | null | undefined;
1105
1105
  sourceContent?: string | null | undefined;
1106
- extractionStatus?: "FOUND" | "NOT_FOUND" | undefined;
1106
+ extractionStatus?: "NOT_FOUND" | "FOUND" | undefined;
1107
1107
  sourceText?: string | null | undefined;
1108
1108
  reviewedText?: string | null | undefined;
1109
1109
  }[];
1110
1110
  customer: {
1111
+ englishName?: string | null | undefined;
1111
1112
  countryOrRegion?: string | null | undefined;
1112
1113
  name?: string | null | undefined;
1113
1114
  address?: string | null | undefined;
@@ -1117,7 +1118,6 @@ export declare class TradeComplianceWorkbenchMiddleware {
1117
1118
  taxNumber?: string | null | undefined;
1118
1119
  paymentAccount?: string | null | undefined;
1119
1120
  bankName?: string | null | undefined;
1120
- englishName?: string | null | undefined;
1121
1121
  country?: string | null | undefined;
1122
1122
  customerName?: string | null | undefined;
1123
1123
  contactPhone?: string | null | undefined;
@@ -1280,54 +1280,58 @@ export declare class TradeComplianceWorkbenchMiddleware {
1280
1280
  usage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1281
1281
  declarationElements: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1282
1282
  quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
1283
+ netWeightKg: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
1283
1284
  sourceRow: z.ZodOptional<z.ZodNumber>;
1284
1285
  sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1285
1286
  sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1286
1287
  }, "strip", z.ZodTypeAny, {
1287
1288
  model?: string | null | undefined;
1288
1289
  productName?: string | null | undefined;
1289
- hsCode?: string | null | undefined;
1290
- sourceLocation?: string | null | undefined;
1291
- sourceContent?: string | null | undefined;
1292
- unit?: string | null | undefined;
1293
- quantity?: string | number | null | undefined;
1294
1290
  description?: string | null | undefined;
1295
- sourceRow?: number | undefined;
1291
+ unit?: string | null | undefined;
1292
+ hsCode?: string | null | undefined;
1296
1293
  brand?: string | null | undefined;
1297
1294
  material?: string | null | undefined;
1298
1295
  usage?: string | null | undefined;
1299
1296
  declarationElements?: string | null | undefined;
1297
+ quantity?: string | number | null | undefined;
1298
+ netWeightKg?: string | number | null | undefined;
1299
+ sourceLocation?: string | null | undefined;
1300
+ sourceContent?: string | null | undefined;
1301
+ sourceRow?: number | undefined;
1300
1302
  }, {
1301
1303
  model?: string | null | undefined;
1302
1304
  productName?: string | null | undefined;
1303
- hsCode?: string | null | undefined;
1304
- sourceLocation?: string | null | undefined;
1305
- sourceContent?: string | null | undefined;
1306
- unit?: string | null | undefined;
1307
- quantity?: string | number | null | undefined;
1308
1305
  description?: string | null | undefined;
1309
- sourceRow?: number | undefined;
1306
+ unit?: string | null | undefined;
1307
+ hsCode?: string | null | undefined;
1310
1308
  brand?: string | null | undefined;
1311
1309
  material?: string | null | undefined;
1312
1310
  usage?: string | null | undefined;
1313
1311
  declarationElements?: string | null | undefined;
1312
+ quantity?: string | number | null | undefined;
1313
+ netWeightKg?: string | number | null | undefined;
1314
+ sourceLocation?: string | null | undefined;
1315
+ sourceContent?: string | null | undefined;
1316
+ sourceRow?: number | undefined;
1314
1317
  }>, "many">;
1315
1318
  }, "strip", z.ZodTypeAny, {
1316
1319
  importTaskId: string;
1317
1320
  rows: {
1318
1321
  model?: string | null | undefined;
1319
1322
  productName?: string | null | undefined;
1320
- hsCode?: string | null | undefined;
1321
- sourceLocation?: string | null | undefined;
1322
- sourceContent?: string | null | undefined;
1323
- unit?: string | null | undefined;
1324
- quantity?: string | number | null | undefined;
1325
1323
  description?: string | null | undefined;
1326
- sourceRow?: number | undefined;
1324
+ unit?: string | null | undefined;
1325
+ hsCode?: string | null | undefined;
1327
1326
  brand?: string | null | undefined;
1328
1327
  material?: string | null | undefined;
1329
1328
  usage?: string | null | undefined;
1330
1329
  declarationElements?: string | null | undefined;
1330
+ quantity?: string | number | null | undefined;
1331
+ netWeightKg?: string | number | null | undefined;
1332
+ sourceLocation?: string | null | undefined;
1333
+ sourceContent?: string | null | undefined;
1334
+ sourceRow?: number | undefined;
1331
1335
  }[];
1332
1336
  claimAttemptToken?: string | undefined;
1333
1337
  }, {
@@ -1335,17 +1339,18 @@ export declare class TradeComplianceWorkbenchMiddleware {
1335
1339
  rows: {
1336
1340
  model?: string | null | undefined;
1337
1341
  productName?: string | null | undefined;
1338
- hsCode?: string | null | undefined;
1339
- sourceLocation?: string | null | undefined;
1340
- sourceContent?: string | null | undefined;
1341
- unit?: string | null | undefined;
1342
- quantity?: string | number | null | undefined;
1343
1342
  description?: string | null | undefined;
1344
- sourceRow?: number | undefined;
1343
+ unit?: string | null | undefined;
1344
+ hsCode?: string | null | undefined;
1345
1345
  brand?: string | null | undefined;
1346
1346
  material?: string | null | undefined;
1347
1347
  usage?: string | null | undefined;
1348
1348
  declarationElements?: string | null | undefined;
1349
+ quantity?: string | number | null | undefined;
1350
+ netWeightKg?: string | number | null | undefined;
1351
+ sourceLocation?: string | null | undefined;
1352
+ sourceContent?: string | null | undefined;
1353
+ sourceRow?: number | undefined;
1349
1354
  }[];
1350
1355
  claimAttemptToken?: string | undefined;
1351
1356
  }>, {
@@ -1353,17 +1358,18 @@ export declare class TradeComplianceWorkbenchMiddleware {
1353
1358
  rows: {
1354
1359
  model?: string | null | undefined;
1355
1360
  productName?: string | null | undefined;
1356
- hsCode?: string | null | undefined;
1357
- sourceLocation?: string | null | undefined;
1358
- sourceContent?: string | null | undefined;
1359
- unit?: string | null | undefined;
1360
- quantity?: string | number | null | undefined;
1361
1361
  description?: string | null | undefined;
1362
- sourceRow?: number | undefined;
1362
+ unit?: string | null | undefined;
1363
+ hsCode?: string | null | undefined;
1363
1364
  brand?: string | null | undefined;
1364
1365
  material?: string | null | undefined;
1365
1366
  usage?: string | null | undefined;
1366
1367
  declarationElements?: string | null | undefined;
1368
+ quantity?: string | number | null | undefined;
1369
+ netWeightKg?: string | number | null | undefined;
1370
+ sourceLocation?: string | null | undefined;
1371
+ sourceContent?: string | null | undefined;
1372
+ sourceRow?: number | undefined;
1367
1373
  }[];
1368
1374
  claimAttemptToken?: string | undefined;
1369
1375
  }, {
@@ -1371,17 +1377,18 @@ export declare class TradeComplianceWorkbenchMiddleware {
1371
1377
  rows: {
1372
1378
  model?: string | null | undefined;
1373
1379
  productName?: string | null | undefined;
1374
- hsCode?: string | null | undefined;
1375
- sourceLocation?: string | null | undefined;
1376
- sourceContent?: string | null | undefined;
1377
- unit?: string | null | undefined;
1378
- quantity?: string | number | null | undefined;
1379
1380
  description?: string | null | undefined;
1380
- sourceRow?: number | undefined;
1381
+ unit?: string | null | undefined;
1382
+ hsCode?: string | null | undefined;
1381
1383
  brand?: string | null | undefined;
1382
1384
  material?: string | null | undefined;
1383
1385
  usage?: string | null | undefined;
1384
1386
  declarationElements?: string | null | undefined;
1387
+ quantity?: string | number | null | undefined;
1388
+ netWeightKg?: string | number | null | undefined;
1389
+ sourceLocation?: string | null | undefined;
1390
+ sourceContent?: string | null | undefined;
1391
+ sourceRow?: number | undefined;
1385
1392
  }[];
1386
1393
  claimAttemptToken?: string | undefined;
1387
1394
  }, string> | import("@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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DjD"}
@@ -124,7 +124,7 @@ let TradeComplianceWorkbenchMiddleware = class TradeComplianceWorkbenchMiddlewar
124
124
  const result = await this.packing.importSupplierPackingDraft(scope, { importTaskId: input.importTaskId, purchaseOrderId: input.purchaseOrderId, purchaseOrderIds: input.purchaseOrderIds, packingId: input.packingId, sourceTotals: input.sourceTotals, rows: input.rows });
125
125
  return stringify({ storedRows: result.rows.length, revision: result.packing.revision, matchedCount: result.matchedCount, unmatchedCount: result.unmatchedCount, warnings: result.warnings, taskStatus: result.task.status });
126
126
  }, { name: TOOL_NAMES.saveSupplierPackingDraft, description: '保存从供应商装箱单(Estimate PL/箱单)提取的装箱数据。同一 importTaskId 只允许一次完整保存,不支持分段追加;rows 必须一次覆盖文件中的全部数据行,一行一条,同型号的整机、闸杆(boom)、配件行保持独立不要合并;role 按文件中的角色标记或描述填写,无法判断时留空。qty、cartons、grossWeightPerCtnKg 必须使用文件中的原始数值,禁止换算或估算;dimensionCm 保留原始写法(如 110*45*45)。单箱体积、总体积、总毛重不需要计算,由系统重算。返回 storedRows、matchedCount、unmatchedCount 和 warnings 表示数据库实际保存结果。', schema: z.object({ importTaskId: z.string().uuid(), purchaseOrderId: z.string().uuid().optional(), purchaseOrderIds: z.array(z.string().uuid()).min(1).optional(), packingId: z.string().uuid().optional(), sourceTotals: z.object({ cartons: z.number().nonnegative().nullable().optional(), grossKg: z.number().nonnegative().nullable().optional(), volumeCbm: z.number().nonnegative().nullable().optional() }).nullable().optional(), rows: z.array(z.object({ model: z.string().nullable(), description: z.string().nullable(), packageGroup: z.string().nullable().optional(), role: z.enum(['MAIN', 'BOOM', 'PART', 'SLAVE', 'CONFIG', 'EXTRA']).nullable(), qty: z.number().nullable(), cartons: z.number().nullable(), dimensionCm: z.string().nullable(), grossWeightPerCtnKg: z.number().nullable(), battery: z.string().nullable() })).min(1) }) }),
127
- tool(async (input) => stringify(await this.service.importSupplierMaterials(scope, input.importTaskId, input.rows, input.claimAttemptToken)), { name: TOOL_NAMES.saveSupplierMaterials, description: '一次保存完整供应商英文报价或报关资料。仅辅助商品字段,禁止价格或币种;采购人民币是唯一定价依据。完成后人工审核关联。', schema: z.object({ importTaskId: z.string().uuid(), claimAttemptToken: z.string().optional().describe('固定参数中的当前解析领取标识,必须原样传回;旧标识或缺失将被拒绝。'), rows: z.array(z.object({ productName: optionalPurchaseText, description: optionalPurchaseText, model: optionalPurchaseText, unit: optionalPurchaseText, hsCode: optionalPurchaseText, brand: optionalPurchaseText, material: optionalPurchaseText, usage: optionalPurchaseText, declarationElements: optionalPurchaseText, quantity: optionalPurchaseDecimal, sourceRow: z.number().int().positive().optional(), sourceLocation: optionalPurchaseText, sourceContent: optionalPurchaseText })).min(1) }) }),
127
+ tool(async (input) => stringify(await this.service.importSupplierMaterials(scope, input.importTaskId, input.rows, input.claimAttemptToken)), { name: TOOL_NAMES.saveSupplierMaterials, description: '一次保存完整供应商英文报价或报关资料。仅辅助商品字段,禁止价格或币种;采购人民币是唯一定价依据。完成后人工审核关联。', schema: z.object({ importTaskId: z.string().uuid(), claimAttemptToken: z.string().optional().describe('固定参数中的当前解析领取标识,必须原样传回;旧标识或缺失将被拒绝。'), rows: z.array(z.object({ productName: optionalPurchaseText, description: optionalPurchaseText, model: optionalPurchaseText, unit: optionalPurchaseText, hsCode: optionalPurchaseText, brand: optionalPurchaseText, material: optionalPurchaseText, usage: optionalPurchaseText, declarationElements: optionalPurchaseText, quantity: optionalPurchaseDecimal, netWeightKg: optionalPurchaseDecimal.describe('报关来源行净重,单位kg;只抄明确原值,缺失留空,不按毛重推算。'), sourceRow: z.number().int().positive().optional(), sourceLocation: optionalPurchaseText, sourceContent: optionalPurchaseText })).min(1) }) }),
128
128
  tool(async (input) => stringify(await this.service.saveCustomerContractReanalysis(scope, input.analysisRunId, input.analyses)), { name: TOOL_NAMES.saveCustomerContractReanalysis, description: '按显式条款类型保存客户合同 AI 重新分析结果。', schema: z.object({ analysisRunId: z.string(), analyses: z.array(z.object({ clauseType: z.enum(ClauseTypes), riskLevel: z.enum(RiskLevels), riskMessageZh: z.string(), suggestionZh: z.string() })).length(ClauseTypes.length) }) }),
129
129
  tool(async (input) => stringify(await this.service.waitImportProgress(scope, input.importTaskId, input.afterProgressVersion, Math.min(input.waitMs, 10_000))), { name: TOOL_NAMES.waitImportProgress, description: '等待目录导入进度发生变化并返回真实计数。每次等待最多 10 秒;根据 progressVersion 继续观察,直到成功、失败或进入复核。', schema: z.object({ importTaskId: z.string().uuid(), afterProgressVersion: z.number().int().nonnegative().default(0), waitMs: z.number().int().positive().default(10_000) }) }),
130
130
  tool(async (input) => stringify(await this.service.nextCatalogReviewBatch(scope, input.importTaskId, Math.min(input.limit, CATALOG_REVIEW_BATCH_LIMIT))), { name: TOOL_NAMES.nextReviewBatch, description: `领取一小批待复核来源块。每批最多 ${CATALOG_REVIEW_BATCH_LIMIT} 条,只依据块内原文和来源位置提出修正,不得扩展到整份文件。`, schema: z.object({ importTaskId: z.string().uuid(), limit: z.number().int().positive().default(CATALOG_REVIEW_BATCH_LIMIT) }) }),