@chenchaolong/plugin-trade-compliance-workbench 1.0.1 → 1.0.2

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 (194) hide show
  1. package/README.md +46 -1
  2. package/dist/assets/branding/yuneec-logo.png +0 -0
  3. package/dist/assets/templates/CI.xlsx +0 -0
  4. package/dist/assets/templates/CUSTOMS_DECLARATION.xlsx +0 -0
  5. package/dist/assets/templates/PI.xlsx +0 -0
  6. package/dist/assets/templates/PL.xlsx +0 -0
  7. package/dist/index.d.ts +14 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/lib/adapters/file-storage.d.ts +4 -2
  10. package/dist/lib/adapters/file-storage.d.ts.map +1 -1
  11. package/dist/lib/adapters/file-storage.js +25 -10
  12. package/dist/lib/adapters/file-storage.js.map +1 -1
  13. package/dist/lib/adapters/hsbianma.provider.d.ts +1 -0
  14. package/dist/lib/adapters/hsbianma.provider.d.ts.map +1 -1
  15. package/dist/lib/adapters/hsbianma.provider.js +32 -3
  16. package/dist/lib/adapters/hsbianma.provider.js.map +1 -1
  17. package/dist/lib/adapters/translation.provider.d.ts +3 -0
  18. package/dist/lib/adapters/translation.provider.d.ts.map +1 -1
  19. package/dist/lib/adapters/translation.provider.js +15 -6
  20. package/dist/lib/adapters/translation.provider.js.map +1 -1
  21. package/dist/lib/constants.d.ts +1 -0
  22. package/dist/lib/constants.d.ts.map +1 -1
  23. package/dist/lib/constants.js +1 -0
  24. package/dist/lib/constants.js.map +1 -1
  25. package/dist/lib/demo-data.definitions.d.ts +28 -0
  26. package/dist/lib/demo-data.definitions.d.ts.map +1 -0
  27. package/dist/lib/demo-data.definitions.js +236 -0
  28. package/dist/lib/demo-data.definitions.js.map +1 -0
  29. package/dist/lib/demo-data.entity.d.ts +9 -0
  30. package/dist/lib/demo-data.entity.d.ts.map +1 -0
  31. package/dist/lib/demo-data.entity.js +24 -0
  32. package/dist/lib/demo-data.entity.js.map +1 -0
  33. package/dist/lib/demo-data.ids.d.ts +4 -0
  34. package/dist/lib/demo-data.ids.d.ts.map +1 -0
  35. package/dist/lib/demo-data.ids.js +19 -0
  36. package/dist/lib/demo-data.ids.js.map +1 -0
  37. package/dist/lib/demo-data.service.d.ts +26 -0
  38. package/dist/lib/demo-data.service.d.ts.map +1 -0
  39. package/dist/lib/demo-data.service.js +124 -0
  40. package/dist/lib/demo-data.service.js.map +1 -0
  41. package/dist/lib/domain/default-settings.d.ts +1 -0
  42. package/dist/lib/domain/default-settings.d.ts.map +1 -1
  43. package/dist/lib/domain/default-settings.js +1 -0
  44. package/dist/lib/domain/default-settings.js.map +1 -1
  45. package/dist/lib/domain/risk-notice.d.ts +59 -0
  46. package/dist/lib/domain/risk-notice.d.ts.map +1 -0
  47. package/dist/lib/domain/risk-notice.js +30 -0
  48. package/dist/lib/domain/risk-notice.js.map +1 -0
  49. package/dist/lib/entities/catalog.entity.d.ts.map +1 -1
  50. package/dist/lib/entities/catalog.entity.js +4 -2
  51. package/dist/lib/entities/catalog.entity.js.map +1 -1
  52. package/dist/lib/entities/customer.entity.d.ts +9 -2
  53. package/dist/lib/entities/customer.entity.d.ts.map +1 -1
  54. package/dist/lib/entities/customer.entity.js +29 -1
  55. package/dist/lib/entities/customer.entity.js.map +1 -1
  56. package/dist/lib/entities/index.d.ts +2 -2
  57. package/dist/lib/entities/index.d.ts.map +1 -1
  58. package/dist/lib/entities/index.js +2 -2
  59. package/dist/lib/entities/index.js.map +1 -1
  60. package/dist/lib/entities/procurement.entity.d.ts +6 -4
  61. package/dist/lib/entities/procurement.entity.d.ts.map +1 -1
  62. package/dist/lib/entities/procurement.entity.js +9 -1
  63. package/dist/lib/entities/procurement.entity.js.map +1 -1
  64. package/dist/lib/entities/settings.entity.d.ts +12 -2
  65. package/dist/lib/entities/settings.entity.d.ts.map +1 -1
  66. package/dist/lib/entities/settings.entity.js +40 -0
  67. package/dist/lib/entities/settings.entity.js.map +1 -1
  68. package/dist/lib/entities/shared.entity.d.ts +10 -5
  69. package/dist/lib/entities/shared.entity.d.ts.map +1 -1
  70. package/dist/lib/entities/shared.entity.js +22 -1
  71. package/dist/lib/entities/shared.entity.js.map +1 -1
  72. package/dist/lib/remote-components/trade-compliance-workbench/app.css +1 -0
  73. package/dist/lib/remote-components/trade-compliance-workbench/app.js +63 -277
  74. package/dist/lib/remote-ui/analytics-contracts.d.ts +106 -0
  75. package/dist/lib/remote-ui/analytics-contracts.d.ts.map +1 -0
  76. package/dist/lib/remote-ui/analytics-contracts.js +4 -0
  77. package/dist/lib/remote-ui/analytics-contracts.js.map +1 -0
  78. package/dist/lib/remote-ui/app-source.d.ts +2 -0
  79. package/dist/lib/remote-ui/app-source.d.ts.map +1 -0
  80. package/dist/lib/remote-ui/app-source.js +753 -0
  81. package/dist/lib/remote-ui/app-source.js.map +1 -0
  82. package/dist/lib/remote-ui/bridge.d.ts +36 -0
  83. package/dist/lib/remote-ui/bridge.d.ts.map +1 -0
  84. package/dist/lib/remote-ui/bridge.js +159 -0
  85. package/dist/lib/remote-ui/bridge.js.map +1 -0
  86. package/dist/lib/remote-ui/components/data-grid.d.ts +34 -0
  87. package/dist/lib/remote-ui/components/data-grid.d.ts.map +1 -0
  88. package/dist/lib/remote-ui/components/data-grid.js +59 -0
  89. package/dist/lib/remote-ui/components/data-grid.js.map +1 -0
  90. package/dist/lib/remote-ui/components/forms.d.ts +63 -0
  91. package/dist/lib/remote-ui/components/forms.d.ts.map +1 -0
  92. package/dist/lib/remote-ui/components/forms.js +117 -0
  93. package/dist/lib/remote-ui/components/forms.js.map +1 -0
  94. package/dist/lib/remote-ui/components/layout.d.ts +34 -0
  95. package/dist/lib/remote-ui/components/layout.d.ts.map +1 -0
  96. package/dist/lib/remote-ui/components/layout.js +89 -0
  97. package/dist/lib/remote-ui/components/layout.js.map +1 -0
  98. package/dist/lib/remote-ui/contract-import.d.ts +82 -0
  99. package/dist/lib/remote-ui/contract-import.d.ts.map +1 -0
  100. package/dist/lib/remote-ui/contract-import.js +102 -0
  101. package/dist/lib/remote-ui/contract-import.js.map +1 -0
  102. package/dist/lib/remote-ui/contracts.d.ts +257 -0
  103. package/dist/lib/remote-ui/contracts.d.ts.map +1 -0
  104. package/dist/lib/remote-ui/contracts.js +12 -0
  105. package/dist/lib/remote-ui/contracts.js.map +1 -0
  106. package/dist/lib/remote-ui/customer-contract-contracts.d.ts +227 -0
  107. package/dist/lib/remote-ui/customer-contract-contracts.d.ts.map +1 -0
  108. package/dist/lib/remote-ui/customer-contract-contracts.js +10 -0
  109. package/dist/lib/remote-ui/customer-contract-contracts.js.map +1 -0
  110. package/dist/lib/remote-ui/model.d.ts +31 -0
  111. package/dist/lib/remote-ui/model.d.ts.map +1 -0
  112. package/dist/lib/remote-ui/model.js +248 -0
  113. package/dist/lib/remote-ui/model.js.map +1 -0
  114. package/dist/lib/remote-ui/pages/analytics.d.ts +12 -0
  115. package/dist/lib/remote-ui/pages/analytics.d.ts.map +1 -0
  116. package/dist/lib/remote-ui/pages/analytics.js +123 -0
  117. package/dist/lib/remote-ui/pages/analytics.js.map +1 -0
  118. package/dist/lib/remote-ui/pages/catalogs.d.ts +225 -0
  119. package/dist/lib/remote-ui/pages/catalogs.d.ts.map +1 -0
  120. package/dist/lib/remote-ui/pages/catalogs.js +572 -0
  121. package/dist/lib/remote-ui/pages/catalogs.js.map +1 -0
  122. package/dist/lib/remote-ui/pages/contracts.d.ts +80 -0
  123. package/dist/lib/remote-ui/pages/contracts.d.ts.map +1 -0
  124. package/dist/lib/remote-ui/pages/contracts.js +396 -0
  125. package/dist/lib/remote-ui/pages/contracts.js.map +1 -0
  126. package/dist/lib/remote-ui/pages/files.d.ts +31 -0
  127. package/dist/lib/remote-ui/pages/files.d.ts.map +1 -0
  128. package/dist/lib/remote-ui/pages/files.js +64 -0
  129. package/dist/lib/remote-ui/pages/files.js.map +1 -0
  130. package/dist/lib/remote-ui/pages/home.d.ts +71 -0
  131. package/dist/lib/remote-ui/pages/home.d.ts.map +1 -0
  132. package/dist/lib/remote-ui/pages/home.js +136 -0
  133. package/dist/lib/remote-ui/pages/home.js.map +1 -0
  134. package/dist/lib/remote-ui/pages/procurement.d.ts +36 -0
  135. package/dist/lib/remote-ui/pages/procurement.d.ts.map +1 -0
  136. package/dist/lib/remote-ui/pages/procurement.js +370 -0
  137. package/dist/lib/remote-ui/pages/procurement.js.map +1 -0
  138. package/dist/lib/remote-ui/pages/sales.d.ts +12 -0
  139. package/dist/lib/remote-ui/pages/sales.d.ts.map +1 -0
  140. package/dist/lib/remote-ui/pages/sales.js +106 -0
  141. package/dist/lib/remote-ui/pages/sales.js.map +1 -0
  142. package/dist/lib/remote-ui/pages/settings.d.ts +34 -0
  143. package/dist/lib/remote-ui/pages/settings.d.ts.map +1 -0
  144. package/dist/lib/remote-ui/pages/settings.js +259 -0
  145. package/dist/lib/remote-ui/pages/settings.js.map +1 -0
  146. package/dist/lib/remote-ui/procurement-contracts.d.ts +177 -0
  147. package/dist/lib/remote-ui/procurement-contracts.d.ts.map +1 -0
  148. package/dist/lib/remote-ui/procurement-contracts.js +2 -0
  149. package/dist/lib/remote-ui/procurement-contracts.js.map +1 -0
  150. package/dist/lib/remote-ui/sales-contracts.d.ts +133 -0
  151. package/dist/lib/remote-ui/sales-contracts.d.ts.map +1 -0
  152. package/dist/lib/remote-ui/sales-contracts.js +2 -0
  153. package/dist/lib/remote-ui/sales-contracts.js.map +1 -0
  154. package/dist/lib/remote-ui/settings-contracts.d.ts +114 -0
  155. package/dist/lib/remote-ui/settings-contracts.d.ts.map +1 -0
  156. package/dist/lib/remote-ui/settings-contracts.js +6 -0
  157. package/dist/lib/remote-ui/settings-contracts.js.map +1 -0
  158. package/dist/lib/remote-ui/upload-policy.d.ts +18 -0
  159. package/dist/lib/remote-ui/upload-policy.d.ts.map +1 -0
  160. package/dist/lib/remote-ui/upload-policy.js +56 -0
  161. package/dist/lib/remote-ui/upload-policy.js.map +1 -0
  162. package/dist/lib/runtime-validation.d.ts +61 -0
  163. package/dist/lib/runtime-validation.d.ts.map +1 -0
  164. package/dist/lib/runtime-validation.js +243 -0
  165. package/dist/lib/runtime-validation.js.map +1 -0
  166. package/dist/lib/sales-file.service.d.ts +54 -6
  167. package/dist/lib/sales-file.service.d.ts.map +1 -1
  168. package/dist/lib/sales-file.service.js +278 -33
  169. package/dist/lib/sales-file.service.js.map +1 -1
  170. package/dist/lib/trade-compliance.config.d.ts +32 -0
  171. package/dist/lib/trade-compliance.config.d.ts.map +1 -1
  172. package/dist/lib/trade-compliance.config.js +16 -4
  173. package/dist/lib/trade-compliance.config.js.map +1 -1
  174. package/dist/lib/types.d.ts +253 -1
  175. package/dist/lib/types.d.ts.map +1 -1
  176. package/dist/lib/types.js +24 -0
  177. package/dist/lib/types.js.map +1 -1
  178. package/dist/lib/workbench-view.provider.d.ts +675 -38
  179. package/dist/lib/workbench-view.provider.d.ts.map +1 -1
  180. package/dist/lib/workbench-view.provider.js +411 -40
  181. package/dist/lib/workbench-view.provider.js.map +1 -1
  182. package/dist/lib/workbench.middleware.d.ts +70 -19
  183. package/dist/lib/workbench.middleware.d.ts.map +1 -1
  184. package/dist/lib/workbench.middleware.js +5 -1
  185. package/dist/lib/workbench.middleware.js.map +1 -1
  186. package/dist/lib/workbench.plugin.d.ts.map +1 -1
  187. package/dist/lib/workbench.plugin.js +6 -4
  188. package/dist/lib/workbench.plugin.js.map +1 -1
  189. package/dist/lib/workbench.service.d.ts +629 -48
  190. package/dist/lib/workbench.service.d.ts.map +1 -1
  191. package/dist/lib/workbench.service.js +1818 -300
  192. package/dist/lib/workbench.service.js.map +1 -1
  193. package/package.json +15 -4
  194. package/scripts/seed-demo-data.mjs +138 -0
@@ -1,11 +1,17 @@
1
+ import { type IPluginConfigResolver } from '@xpert-ai/plugin-sdk';
2
+ import { PermissionsEnum } from '@xpert-ai/contracts';
1
3
  import { TradeComplianceWorkbenchService } from './workbench.service.js';
2
4
  import { SalesFileService } from './sales-file.service.js';
3
5
  import { TradeComplianceFileStorage } from './adapters/file-storage.js';
6
+ import { type SourceFileFormat } from './types.js';
7
+ import { TradeComplianceDemoDataService } from './demo-data.service.js';
4
8
  export declare class TradeComplianceWorkbenchViewProvider {
5
9
  private readonly service;
6
10
  private readonly salesFiles;
7
11
  private readonly storage;
8
- constructor(service: TradeComplianceWorkbenchService, salesFiles: SalesFileService, storage: TradeComplianceFileStorage);
12
+ private readonly demoData?;
13
+ private readonly configResolver?;
14
+ constructor(service: TradeComplianceWorkbenchService, salesFiles: SalesFileService, storage: TradeComplianceFileStorage, demoData?: TradeComplianceDemoDataService | undefined, configResolver?: IPluginConfigResolver | undefined);
9
15
  supports(context: any): boolean;
10
16
  getViewManifests(_context: any, slot: string): {
11
17
  key: string;
@@ -63,7 +69,7 @@ export declare class TradeComplianceWorkbenchViewProvider {
63
69
  zh_Hans: string;
64
70
  };
65
71
  }[];
66
- actions: {
72
+ actions: ({
67
73
  key: string;
68
74
  label: {
69
75
  en_US: string;
@@ -71,16 +77,619 @@ export declare class TradeComplianceWorkbenchViewProvider {
71
77
  };
72
78
  icon: string;
73
79
  actionType: string;
74
- }[];
80
+ } | {
81
+ permissions: PermissionsEnum[];
82
+ key: string;
83
+ label: {
84
+ en_US: string;
85
+ zh_Hans: string;
86
+ };
87
+ icon: string;
88
+ actionType: string;
89
+ })[];
75
90
  }[];
76
91
  getRemoteComponentEntry(_context: any, viewKey: string, component: any): Promise<{
77
92
  html: string;
78
93
  contentType: string;
79
94
  }>;
80
95
  getViewData(context: any, _viewKey: string, query: any): Promise<{
96
+ items: (import("./entities/catalog.entity.js").ControlledGoodsRecord & {
97
+ sourceFileName: string | undefined;
98
+ })[];
99
+ total: number;
100
+ page: number;
101
+ pageSize: number;
102
+ collection: string;
103
+ summary?: undefined;
104
+ } | {
105
+ items: (import("./entities/catalog.entity.js").SanctionedCompanyRecord & {
106
+ sourceFileName: string | undefined;
107
+ })[];
108
+ total: number;
109
+ page: number;
110
+ pageSize: number;
111
+ collection: string;
112
+ summary?: undefined;
113
+ } | {
114
+ items: {
115
+ sanctionMatchCount: number;
116
+ sanctionStatus: "UNCHECKED" | "CLEAR" | "HIT";
117
+ code: string | null;
118
+ name: string;
119
+ normalizedName: string;
120
+ shortName: string | null;
121
+ address: string | null;
122
+ contactName: string | null;
123
+ phone: string | null;
124
+ wechat: string | null;
125
+ email: string | null;
126
+ taxNumber: string | null;
127
+ paymentAccount: string | null;
128
+ bankName: string | null;
129
+ taxpayerRating: string | null;
130
+ website: string | null;
131
+ businessProducts: string | null;
132
+ complianceCheckedAt: Date | null;
133
+ deletedAt: Date | null;
134
+ deletedById: string | null;
135
+ deleteOperation: import("./types.js").DeleteOperation | null;
136
+ createdById: string | null;
137
+ updatedById: string | null;
138
+ updatedAt: Date;
139
+ createdAt: Date;
140
+ id: string;
141
+ tenantId: string;
142
+ organizationId: string;
143
+ }[];
144
+ total: number;
145
+ page: number;
146
+ pageSize: number;
147
+ collection: string;
148
+ summary?: undefined;
149
+ } | {
150
+ supplier: {
151
+ sanctionMatchCount: number;
152
+ sanctionStatus: "UNCHECKED" | "CLEAR" | "HIT";
153
+ code: string | null;
154
+ name: string;
155
+ normalizedName: string;
156
+ shortName: string | null;
157
+ address: string | null;
158
+ contactName: string | null;
159
+ phone: string | null;
160
+ wechat: string | null;
161
+ email: string | null;
162
+ taxNumber: string | null;
163
+ paymentAccount: string | null;
164
+ bankName: string | null;
165
+ taxpayerRating: string | null;
166
+ website: string | null;
167
+ businessProducts: string | null;
168
+ complianceCheckedAt: Date | null;
169
+ deletedAt: Date | null;
170
+ deletedById: string | null;
171
+ deleteOperation: import("./types.js").DeleteOperation | null;
172
+ createdById: string | null;
173
+ updatedById: string | null;
174
+ updatedAt: Date;
175
+ createdAt: Date;
176
+ id: string;
177
+ tenantId: string;
178
+ organizationId: string;
179
+ };
180
+ metrics: {
181
+ totalOrderCount: number;
182
+ totalPurchaseAmountCny: number;
183
+ currentYearOrderCount: number;
184
+ currentYearPurchaseAmountCny: number;
185
+ topProducts: {
186
+ productName: string;
187
+ amountCny: number;
188
+ }[];
189
+ orderBalances: Record<string, {
190
+ unpaidAmountCny: number;
191
+ unrefundedAmountCny: number;
192
+ }>;
193
+ };
194
+ items: {
195
+ lineCount: number;
196
+ estimatedRefundAmountCny: string;
197
+ customerContractId: string | null;
198
+ customerContractNo: string | null;
199
+ customerContractLinkStatus: "LINKED" | "UNLINKED";
200
+ supplierId: string;
201
+ contractNo: string;
202
+ normalizedContractNo: string;
203
+ orderDate: string | null;
204
+ contractAmountCny: string;
205
+ paidAmountCny: string;
206
+ refundedAmountCny: string;
207
+ sourceFileId: string;
208
+ sourceFileName: string;
209
+ importTaskId: string;
210
+ amountMismatchConfirmedAt: Date | null;
211
+ amountMismatchConfirmedById: string | null;
212
+ deletedAt: Date | null;
213
+ deletedById: string | null;
214
+ deleteOperation: import("./types.js").DeleteOperation | null;
215
+ createdById: string | null;
216
+ updatedById: string | null;
217
+ updatedAt: Date;
218
+ createdAt: Date;
219
+ id: string;
220
+ tenantId: string;
221
+ organizationId: string;
222
+ }[];
223
+ total: number;
224
+ page: number;
225
+ pageSize: number;
226
+ collection: string;
227
+ summary?: undefined;
228
+ } | {
229
+ order: {
230
+ lineCount: number;
231
+ estimatedRefundAmountCny: string;
232
+ customerContractId: string | null;
233
+ customerContractNo: string | null;
234
+ customerContractLinkStatus: "LINKED" | "UNLINKED";
235
+ supplierId: string;
236
+ contractNo: string;
237
+ normalizedContractNo: string;
238
+ orderDate: string | null;
239
+ contractAmountCny: string;
240
+ paidAmountCny: string;
241
+ refundedAmountCny: string;
242
+ sourceFileId: string;
243
+ sourceFileName: string;
244
+ importTaskId: string;
245
+ amountMismatchConfirmedAt: Date | null;
246
+ amountMismatchConfirmedById: string | null;
247
+ deletedAt: Date | null;
248
+ deletedById: string | null;
249
+ deleteOperation: import("./types.js").DeleteOperation | null;
250
+ createdById: string | null;
251
+ updatedById: string | null;
252
+ updatedAt: Date;
253
+ createdAt: Date;
254
+ id: string;
255
+ tenantId: string;
256
+ organizationId: string;
257
+ };
258
+ supplier: {
259
+ sanctionMatchCount: number;
260
+ sanctionStatus: "UNCHECKED" | "CLEAR" | "HIT";
261
+ code: string | null;
262
+ name: string;
263
+ normalizedName: string;
264
+ shortName: string | null;
265
+ address: string | null;
266
+ contactName: string | null;
267
+ phone: string | null;
268
+ wechat: string | null;
269
+ email: string | null;
270
+ taxNumber: string | null;
271
+ paymentAccount: string | null;
272
+ bankName: string | null;
273
+ taxpayerRating: string | null;
274
+ website: string | null;
275
+ businessProducts: string | null;
276
+ complianceCheckedAt: Date | null;
277
+ deletedAt: Date | null;
278
+ deletedById: string | null;
279
+ deleteOperation: import("./types.js").DeleteOperation | null;
280
+ createdById: string | null;
281
+ updatedById: string | null;
282
+ updatedAt: Date;
283
+ createdAt: Date;
284
+ id: string;
285
+ tenantId: string;
286
+ organizationId: string;
287
+ };
288
+ items: {
289
+ sourceType: "CONTRACT_EXTRACTED" | "MANUAL_ENTRY";
290
+ hsCodeStatus: "UNCONFIRMED" | "AI_CONFIRMED" | "MANUALLY_CONFIRMED";
291
+ complianceCategories: ("DUAL_USE" | "OVERSEAS_SANCTION")[];
292
+ purchaseOrderId: string;
293
+ lineNumber: number;
294
+ productName: string;
295
+ normalizedProductName: string;
296
+ englishName: string | null;
297
+ englishNameSource: import("./types.js").EnglishNameSource | null;
298
+ productDescription: string | null;
299
+ modelSpecification: string | null;
300
+ unit: string | null;
301
+ quantity: string;
302
+ unitPriceTaxIncluded: string;
303
+ lineAmountTaxIncluded: string;
304
+ vatRate: string | null;
305
+ vatRateSource: import("./types.js").VatRateSource | null;
306
+ hsCode: string | null;
307
+ hsCodeSource: import("./types.js").HsCodeSource | null;
308
+ hsCodeReferenceSnapshotId: string | null;
309
+ originCountry: string | null;
310
+ domesticSourceLocation: string | null;
311
+ refundRate: string | null;
312
+ refundRateSource: import("./types.js").RefundRateSource | null;
313
+ refundPolicyReference: string | null;
314
+ refundPolicyDate: string | null;
315
+ refundValidationMethod: import("./types.js").RefundValidationMethod | null;
316
+ refundConfirmedAt: Date | null;
317
+ refundConfirmedById: string | null;
318
+ amountMismatchConfirmedAt: Date | null;
319
+ amountMismatchConfirmedById: string | null;
320
+ sourceLocation: string | null;
321
+ sourceContent: string | null;
322
+ complianceCheckedAt: Date | null;
323
+ deletedAt: Date | null;
324
+ deletedById: string | null;
325
+ deleteOperation: import("./types.js").DeleteOperation | null;
326
+ createdById: string | null;
327
+ updatedById: string | null;
328
+ updatedAt: Date;
329
+ createdAt: Date;
330
+ id: string;
331
+ tenantId: string;
332
+ organizationId: string;
333
+ }[];
334
+ total: number;
335
+ page: number;
336
+ pageSize: number;
337
+ collection: string;
338
+ summary?: undefined;
339
+ } | {
340
+ items: {
341
+ contractAmountReviewCny: string | null;
342
+ customerName: string;
343
+ customerCode: string | null;
344
+ sanctionStatus: string;
345
+ latestAnalysisAt: Date | null;
346
+ customerId: string;
347
+ contractNo: string;
348
+ normalizedContractNo: string;
349
+ signedAt: string | null;
350
+ overallRiskLevel: import("./types.js").RiskLevel | null;
351
+ latestAnalysisRunId: string | null;
352
+ currentReanalysisRunId: string | null;
353
+ sourceFileId: string;
354
+ sourceFileName: string;
355
+ importTaskId: string;
356
+ deletedAt: Date | null;
357
+ deletedById: string | null;
358
+ deleteOperation: import("./types.js").DeleteOperation | null;
359
+ createdById: string | null;
360
+ updatedById: string | null;
361
+ updatedAt: Date;
362
+ createdAt: Date;
363
+ id: string;
364
+ tenantId: string;
365
+ organizationId: string;
366
+ }[];
367
+ total: number;
368
+ page: number;
369
+ pageSize: number;
370
+ collection: string;
371
+ summary?: undefined;
372
+ } | {
373
+ items: {
374
+ customerName: string;
375
+ supplierName: string;
376
+ pricingProfitRateStatus: "CONFIGURED";
377
+ paymentStatus: "UNPAID" | "PARTIAL" | "PAID";
378
+ lines: {
379
+ complianceCategories: ("DUAL_USE" | "OVERSEAS_SANCTION")[];
380
+ purchaseOrderLineId: string;
381
+ productName: string;
382
+ englishName?: string | null;
383
+ productDescription?: string | null;
384
+ modelSpecification?: string | null;
385
+ unit?: string | null;
386
+ quantity: string;
387
+ hsCode?: string | null;
388
+ hsCodeStatus: import("./types.js").HsCodeStatus;
389
+ vatRate?: string | null;
390
+ refundRate?: string | null;
391
+ originCountry?: string | null;
392
+ domesticSourceLocation?: string | null;
393
+ salesUnitPriceCny: string;
394
+ salesLineAmountCny: string;
395
+ complianceMatches: import("./types.js").DerivedSalesComplianceMatch[];
396
+ }[];
397
+ customerContractId: string;
398
+ purchaseOrderId: string;
399
+ customerId: string;
400
+ salesOrderNo: string;
401
+ customerContractNo: string;
402
+ purchaseContractNo: string;
403
+ orderDate?: string | null;
404
+ currencyCode: "CNY";
405
+ pricingProfitRateSource: import("./types.js").PricingProfitRateSource;
406
+ effectivePricingProfitRate: string;
407
+ orderAmountCny: string;
408
+ receivedAmountCny: string;
409
+ unreceivedAmountCny: string;
410
+ }[];
411
+ customer: {
412
+ profitRateStatus: "MISSING" | "CONFIGURED";
413
+ sanctionMatchCount: number;
414
+ sanctionStatus: "UNCHECKED" | "CLEAR" | "HIT";
415
+ code: string | null;
416
+ name: string;
417
+ normalizedName: string;
418
+ shortName: string | null;
419
+ country: string | null;
420
+ address: string | null;
421
+ contactName: string | null;
422
+ phone: string | null;
423
+ wechat: string | null;
424
+ email: string | null;
425
+ taxNumber: string | null;
426
+ paymentAccount: string | null;
427
+ bankName: string | null;
428
+ taxpayerRating: string | null;
429
+ website: string | null;
430
+ businessProducts: string | null;
431
+ defaultPricingProfitRate: string | null;
432
+ pricingProfitRateStatus: import("./types.js").CustomerProfitRateStatus;
433
+ complianceCheckStatus: import("./types.js").ComplianceCheckStatus;
434
+ complianceCheckedAt: Date | null;
435
+ deletedAt: Date | null;
436
+ deletedById: string | null;
437
+ deleteOperation: import("./types.js").DeleteOperation | null;
438
+ createdById: string | null;
439
+ updatedById: string | null;
440
+ updatedAt: Date;
441
+ createdAt: Date;
442
+ id: string;
443
+ tenantId: string;
444
+ organizationId: string;
445
+ };
446
+ metrics: {
447
+ orderCount: number;
448
+ salesAmountCny: any;
449
+ receivedAmountCny: any;
450
+ unreceivedAmountCny: any;
451
+ currentYearOrderCount: number;
452
+ currentYearSalesAmountCny: any;
453
+ topProducts: {
454
+ productName: string;
455
+ amountCny: string;
456
+ }[];
457
+ };
458
+ total: number;
459
+ page: number;
460
+ pageSize: number;
461
+ collection: string;
462
+ summary?: undefined;
463
+ } | {
464
+ order: {
465
+ customerName: string;
466
+ supplierName: string;
467
+ pricingProfitRateStatus: "CONFIGURED";
468
+ paymentStatus: "UNPAID" | "PARTIAL" | "PAID";
469
+ lines: {
470
+ complianceCategories: ("DUAL_USE" | "OVERSEAS_SANCTION")[];
471
+ purchaseOrderLineId: string;
472
+ productName: string;
473
+ englishName?: string | null;
474
+ productDescription?: string | null;
475
+ modelSpecification?: string | null;
476
+ unit?: string | null;
477
+ quantity: string;
478
+ hsCode?: string | null;
479
+ hsCodeStatus: import("./types.js").HsCodeStatus;
480
+ vatRate?: string | null;
481
+ refundRate?: string | null;
482
+ originCountry?: string | null;
483
+ domesticSourceLocation?: string | null;
484
+ salesUnitPriceCny: string;
485
+ salesLineAmountCny: string;
486
+ complianceMatches: import("./types.js").DerivedSalesComplianceMatch[];
487
+ }[];
488
+ customerContractId: string;
489
+ purchaseOrderId: string;
490
+ customerId: string;
491
+ salesOrderNo: string;
492
+ customerContractNo: string;
493
+ purchaseContractNo: string;
494
+ orderDate?: string | null;
495
+ currencyCode: "CNY";
496
+ pricingProfitRateSource: import("./types.js").PricingProfitRateSource;
497
+ effectivePricingProfitRate: string;
498
+ orderAmountCny: string;
499
+ receivedAmountCny: string;
500
+ unreceivedAmountCny: string;
501
+ };
502
+ items: {
503
+ complianceCategories: ("DUAL_USE" | "OVERSEAS_SANCTION")[];
504
+ purchaseOrderLineId: string;
505
+ productName: string;
506
+ englishName?: string | null;
507
+ productDescription?: string | null;
508
+ modelSpecification?: string | null;
509
+ unit?: string | null;
510
+ quantity: string;
511
+ hsCode?: string | null;
512
+ hsCodeStatus: import("./types.js").HsCodeStatus;
513
+ vatRate?: string | null;
514
+ refundRate?: string | null;
515
+ originCountry?: string | null;
516
+ domesticSourceLocation?: string | null;
517
+ salesUnitPriceCny: string;
518
+ salesLineAmountCny: string;
519
+ complianceMatches: import("./types.js").DerivedSalesComplianceMatch[];
520
+ }[];
521
+ total: number;
522
+ page: number;
523
+ pageSize: number;
524
+ collection: string;
525
+ summary?: undefined;
526
+ } | {
527
+ items: {
528
+ customerName: string;
529
+ supplierName: string;
530
+ pricingProfitRateStatus: "CONFIGURED";
531
+ paymentStatus: "UNPAID" | "PARTIAL" | "PAID";
532
+ lines: {
533
+ complianceCategories: ("DUAL_USE" | "OVERSEAS_SANCTION")[];
534
+ purchaseOrderLineId: string;
535
+ productName: string;
536
+ englishName?: string | null;
537
+ productDescription?: string | null;
538
+ modelSpecification?: string | null;
539
+ unit?: string | null;
540
+ quantity: string;
541
+ hsCode?: string | null;
542
+ hsCodeStatus: import("./types.js").HsCodeStatus;
543
+ vatRate?: string | null;
544
+ refundRate?: string | null;
545
+ originCountry?: string | null;
546
+ domesticSourceLocation?: string | null;
547
+ salesUnitPriceCny: string;
548
+ salesLineAmountCny: string;
549
+ complianceMatches: import("./types.js").DerivedSalesComplianceMatch[];
550
+ }[];
551
+ customerContractId: string;
552
+ purchaseOrderId: string;
553
+ customerId: string;
554
+ salesOrderNo: string;
555
+ customerContractNo: string;
556
+ purchaseContractNo: string;
557
+ orderDate?: string | null;
558
+ currencyCode: "CNY";
559
+ pricingProfitRateSource: import("./types.js").PricingProfitRateSource;
560
+ effectivePricingProfitRate: string;
561
+ orderAmountCny: string;
562
+ receivedAmountCny: string;
563
+ unreceivedAmountCny: string;
564
+ }[];
565
+ total: number;
566
+ page: number;
567
+ pageSize: number;
568
+ collection: string;
569
+ summary?: undefined;
570
+ } | {
571
+ items: import("./entities/settings.entity.js").GeneratedSalesFile[];
572
+ total: number;
573
+ page: number;
574
+ pageSize: number;
575
+ collection: string;
576
+ summary?: undefined;
577
+ } | {
578
+ mode: "PURCHASE" | "SALES";
579
+ currentYear: number;
580
+ dimension: "SUPPLIER" | "CUSTOMER" | "PRODUCT";
581
+ metrics: {
582
+ orderTotalCny: string;
583
+ paidCny: string;
584
+ unpaidCny: string;
585
+ refundedCny: string;
586
+ unrefundedCny: string;
587
+ receivedCny?: undefined;
588
+ unreceivedCny?: undefined;
589
+ } | {
590
+ orderTotalCny: string;
591
+ receivedCny: string;
592
+ unreceivedCny: string;
593
+ paidCny?: undefined;
594
+ unpaidCny?: undefined;
595
+ refundedCny?: undefined;
596
+ unrefundedCny?: undefined;
597
+ };
598
+ top5: {
599
+ key: string;
600
+ label: string;
601
+ amountCny: string;
602
+ }[];
603
+ details: {
604
+ items: import("./types.js").AnalyticsDetailRow[];
605
+ page: number;
606
+ pageSize: number;
607
+ total: number;
608
+ pageCount: number;
609
+ };
610
+ collection: string;
611
+ items?: undefined;
612
+ total?: undefined;
613
+ summary?: undefined;
614
+ } | {
615
+ risk: import("./entities/shared.entity.js").RiskNoticeSettings | null;
616
+ company: import("./entities/settings.entity.js").CompanySettings | null;
617
+ banks: import("./entities/settings.entity.js").BankAccountSettings[];
618
+ profit: import("./entities/settings.entity.js").ProfitRuleSettings | null;
619
+ rates: import("./entities/settings.entity.js").MonthlySafeExchangeRate[];
620
+ collection: string;
621
+ items?: undefined;
622
+ total?: undefined;
623
+ summary?: undefined;
624
+ } | {
625
+ run: import("./entities/customer.entity.js").CustomerContractAnalysisRun;
626
+ review?: undefined;
627
+ task?: undefined;
628
+ collection: string;
629
+ items?: undefined;
630
+ total?: undefined;
631
+ summary?: undefined;
632
+ } | {
633
+ run: import("./entities/customer.entity.js").CustomerContractAnalysisRun;
634
+ review: {
635
+ contract: import("./entities/customer.entity.js").CustomerContract;
636
+ customer: import("./entities/customer.entity.js").Customer | null;
637
+ clauses: import("./entities/customer.entity.js").CustomerContractClause[];
638
+ analyses: import("./entities/customer.entity.js").CustomerContractClauseAnalysis[];
639
+ latestRun: import("./entities/customer.entity.js").CustomerContractAnalysisRun | null;
640
+ analysisRuns: import("./entities/customer.entity.js").CustomerContractAnalysisRun[];
641
+ sanctionStatus: string;
642
+ };
643
+ task?: undefined;
644
+ collection: string;
645
+ items?: undefined;
646
+ total?: undefined;
647
+ summary?: undefined;
648
+ } | {
649
+ run: import("./entities/customer.entity.js").CustomerContractAnalysisRun;
650
+ task: import("./entities/shared.entity.js").ImportTask;
651
+ review?: undefined;
652
+ collection: string;
653
+ items?: undefined;
654
+ total?: undefined;
655
+ summary?: undefined;
656
+ } | {
657
+ commands: import("./types.js").ImportExecutionCommand[];
658
+ polling: {
659
+ intervalMs: number;
660
+ timeoutMs: number;
661
+ };
662
+ task: import("./entities/shared.entity.js").ImportTask;
663
+ collection: string;
664
+ items?: undefined;
665
+ total?: undefined;
666
+ summary?: undefined;
667
+ } | {
668
+ commands: import("./types.js").ImportExecutionCommand[];
669
+ polling: {
670
+ intervalMs: number;
671
+ timeoutMs: number;
672
+ };
673
+ task: import("./entities/shared.entity.js").ImportTask;
674
+ batch: import("./entities/catalog.entity.js").SanctionCatalogBatch | undefined;
675
+ collection: string;
676
+ items?: undefined;
677
+ total?: undefined;
678
+ summary?: undefined;
679
+ } | {
680
+ items: import("typeorm").ObjectLiteral[];
681
+ total: number;
682
+ page: number;
683
+ pageSize: number;
684
+ collection: string;
685
+ summary?: undefined;
686
+ } | {
81
687
  items: never[];
82
688
  total: number;
83
689
  summary: {
690
+ uploadPolicy: {
691
+ maxUploadMb: number;
692
+ };
84
693
  dashboard: {
85
694
  riskNotice: import("./entities/shared.entity.js").RiskNoticeSettings;
86
695
  controlledRiskCount: number;
@@ -89,7 +698,9 @@ export declare class TradeComplianceWorkbenchViewProvider {
89
698
  unlinkedCustomerCount: number;
90
699
  };
91
700
  controlledGoods: {
92
- items: import("./entities/catalog.entity.js").ControlledGoodsRecord[];
701
+ items: (import("./entities/catalog.entity.js").ControlledGoodsRecord & {
702
+ sourceFileName: string | undefined;
703
+ })[];
93
704
  total: number;
94
705
  page: number;
95
706
  pageSize: number;
@@ -101,7 +712,9 @@ export declare class TradeComplianceWorkbenchViewProvider {
101
712
  pageSize: number;
102
713
  };
103
714
  sanctionedCompanies: {
104
- items: import("./entities/catalog.entity.js").SanctionedCompanyRecord[];
715
+ items: (import("./entities/catalog.entity.js").SanctionedCompanyRecord & {
716
+ sourceFileName: string | undefined;
717
+ })[];
105
718
  total: number;
106
719
  page: number;
107
720
  pageSize: number;
@@ -113,19 +726,19 @@ export declare class TradeComplianceWorkbenchViewProvider {
113
726
  pageSize: number;
114
727
  };
115
728
  suppliers: {
116
- items: import("./entities/procurement.entity.js").Supplier[];
729
+ items: never[];
117
730
  total: number;
118
731
  page: number;
119
732
  pageSize: number;
120
733
  };
121
734
  purchaseOrders: {
122
- items: import("./entities/procurement.entity.js").PurchaseOrder[];
735
+ items: never[];
123
736
  total: number;
124
737
  page: number;
125
738
  pageSize: number;
126
739
  };
127
740
  purchaseLines: {
128
- items: import("./entities/procurement.entity.js").PurchaseOrderLine[];
741
+ items: never[];
129
742
  total: number;
130
743
  page: number;
131
744
  pageSize: number;
@@ -137,7 +750,7 @@ export declare class TradeComplianceWorkbenchViewProvider {
137
750
  pageSize: number;
138
751
  };
139
752
  customerContracts: {
140
- items: import("./entities/customer.entity.js").CustomerContract[];
753
+ items: never[];
141
754
  total: number;
142
755
  page: number;
143
756
  pageSize: number;
@@ -150,38 +763,45 @@ export declare class TradeComplianceWorkbenchViewProvider {
150
763
  pageSize: number;
151
764
  };
152
765
  settings: {
153
- risk: import("./entities/shared.entity.js").RiskNoticeSettings;
766
+ risk: import("./entities/shared.entity.js").RiskNoticeSettings | null;
154
767
  company: import("./entities/settings.entity.js").CompanySettings | null;
155
768
  banks: import("./entities/settings.entity.js").BankAccountSettings[];
156
- profit: import("./entities/settings.entity.js").ProfitRuleSettings;
769
+ profit: import("./entities/settings.entity.js").ProfitRuleSettings | null;
157
770
  rates: import("./entities/settings.entity.js").MonthlySafeExchangeRate[];
158
771
  };
159
772
  analytics: {
160
- purchase: {
161
- count: number;
162
- totalCny: any;
163
- paidCny: any;
164
- unpaidCny: any;
165
- rows: Record<string, any>[];
166
- };
167
- sales: {
168
- count: number;
169
- totalCny: any;
170
- paidCny: any;
171
- unpaidCny: any;
172
- rows: Record<string, any>[];
773
+ mode: "PURCHASE" | "SALES";
774
+ currentYear: number;
775
+ dimension: "SUPPLIER" | "CUSTOMER" | "PRODUCT";
776
+ metrics: {
777
+ orderTotalCny: string;
778
+ paidCny: string;
779
+ unpaidCny: string;
780
+ refundedCny: string;
781
+ unrefundedCny: string;
782
+ receivedCny?: undefined;
783
+ unreceivedCny?: undefined;
784
+ } | {
785
+ orderTotalCny: string;
786
+ receivedCny: string;
787
+ unreceivedCny: string;
788
+ paidCny?: undefined;
789
+ unpaidCny?: undefined;
790
+ refundedCny?: undefined;
791
+ unrefundedCny?: undefined;
173
792
  };
174
- annualPurchaseCount: number;
175
- annualSalesCount: number;
176
- purchaseTop5: {
177
- name: string;
793
+ top5: {
794
+ key: string;
795
+ label: string;
178
796
  amountCny: string;
179
797
  }[];
180
- salesTop5: {
181
- name: string;
182
- amountCny: string;
183
- }[];
184
- filters: Record<string, unknown>;
798
+ details: {
799
+ items: import("./types.js").AnalyticsDetailRow[];
800
+ page: number;
801
+ pageSize: number;
802
+ total: number;
803
+ pageCount: number;
804
+ };
185
805
  };
186
806
  importTasks: {
187
807
  items: import("./entities/shared.entity.js").ImportTask[];
@@ -231,6 +851,19 @@ export declare class TradeComplianceWorkbenchViewProvider {
231
851
  details: Record<string, unknown>;
232
852
  };
233
853
  refresh: boolean;
854
+ } | {
855
+ success: boolean;
856
+ refresh: boolean;
857
+ message: {
858
+ en_US: string;
859
+ zh_Hans: string;
860
+ };
861
+ data: {
862
+ logoFileId: string;
863
+ task?: undefined;
864
+ commands?: undefined;
865
+ polling?: undefined;
866
+ };
234
867
  } | {
235
868
  success: boolean;
236
869
  refresh: boolean;
@@ -246,16 +879,15 @@ export declare class TradeComplianceWorkbenchViewProvider {
246
879
  text: string;
247
880
  clientMessageId: string;
248
881
  files: {
249
- id: any;
250
- fileId: any;
251
- fileAssetId: any;
252
- workspacePath: any;
253
- filePath: any;
254
882
  name: string;
255
883
  originalName: string;
256
884
  mimeType: any;
257
885
  size: any;
258
886
  role: string;
887
+ storageFileId?: any;
888
+ id: any;
889
+ fileId: any;
890
+ fileAssetId: any;
259
891
  }[];
260
892
  followUpMode: string;
261
893
  state: {
@@ -270,7 +902,12 @@ export declare class TradeComplianceWorkbenchViewProvider {
270
902
  intervalMs: number;
271
903
  timeoutMs: number;
272
904
  };
905
+ logoFileId?: undefined;
273
906
  };
274
907
  }>;
908
+ private startCatalogRetry;
909
+ private hsConfig;
275
910
  }
911
+ export declare function validateSourceFile(fileName: string, mimeType: string, buffer: Buffer): SourceFileFormat;
912
+ export declare function sanitizeIframeCss(css: string): string;
276
913
  //# sourceMappingURL=workbench-view.provider.d.ts.map