@chenchaolong/plugin-trade-compliance-workbench 1.0.53 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/remote-components/trade-compliance-workbench/app.js +4 -4
- package/dist/lib/remote-ui/purchase-review-adapter.d.ts +6 -2
- package/dist/lib/remote-ui/purchase-review-adapter.d.ts.map +1 -1
- package/dist/lib/remote-ui/purchase-review-adapter.js +5 -3
- package/dist/lib/remote-ui/purchase-review-adapter.js.map +1 -1
- package/dist/lib/workbench.middleware.d.ts +444 -15
- package/dist/lib/workbench.middleware.d.ts.map +1 -1
- package/dist/lib/workbench.middleware.js +32 -1
- package/dist/lib/workbench.middleware.js.map +1 -1
- package/dist/lib/workbench.service.d.ts.map +1 -1
- package/dist/lib/workbench.service.js +9 -2
- package/dist/lib/workbench.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { ContractImportTask } from './contract-import.js';
|
|
2
1
|
import type { PurchaseContractReviewDraft } from './procurement-contracts.js';
|
|
3
|
-
|
|
2
|
+
type PurchaseReviewSource = {
|
|
3
|
+
resultPayload?: Record<string, unknown> | null;
|
|
4
|
+
sourceFileName?: string | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function adaptPurchaseReview<T extends PurchaseReviewSource>(task: T): PurchaseContractReviewDraft;
|
|
7
|
+
export {};
|
|
4
8
|
//# sourceMappingURL=purchase-review-adapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purchase-review-adapter.d.ts","sourceRoot":"","sources":["../../../src/lib/remote-ui/purchase-review-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"purchase-review-adapter.d.ts","sourceRoot":"","sources":["../../../src/lib/remote-ui/purchase-review-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAE7E,KAAK,oBAAoB,GAAG;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAC9C,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B,CAAA;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,GAAG,2BAA2B,CAWxG"}
|
|
@@ -24,9 +24,9 @@ function normalizeOrder(order) {
|
|
|
24
24
|
return {
|
|
25
25
|
...order,
|
|
26
26
|
supplierId: textFrom(order, ['supplierId']),
|
|
27
|
-
contractNo: textFrom(order, ['contractNo']),
|
|
27
|
+
contractNo: textFrom(order, ['contractNo', 'number']),
|
|
28
28
|
orderDate: textFrom(order, ['orderDate', 'date', 'contractDate']),
|
|
29
|
-
contractAmountCny: decimalTextFrom(order, ['contractAmountCny', 'totalAmount'], '0'),
|
|
29
|
+
contractAmountCny: decimalTextFrom(order, ['contractAmountCny', 'totalAmount', 'amount'], '0'),
|
|
30
30
|
paidAmountCny: decimalTextFrom(order, ['paidAmountCny'], '0'),
|
|
31
31
|
refundedAmountCny: decimalTextFrom(order, ['refundedAmountCny'], '0')
|
|
32
32
|
};
|
|
@@ -35,7 +35,9 @@ function normalizeLine(line, index) {
|
|
|
35
35
|
return {
|
|
36
36
|
...line,
|
|
37
37
|
lineNumber: numericFrom(line, ['lineNumber'], index + 1),
|
|
38
|
-
productName: textFrom(line, ['productName']),
|
|
38
|
+
productName: textFrom(line, ['productName', 'name']),
|
|
39
|
+
productDescription: nullableTextFrom(line, ['productDescription', 'description']),
|
|
40
|
+
modelSpecification: nullableTextFrom(line, ['modelSpecification', 'model']),
|
|
39
41
|
quantity: decimalTextFrom(line, ['quantity'], '0'),
|
|
40
42
|
unitPriceTaxIncluded: decimalTextFrom(line, ['unitPriceTaxIncluded', 'taxInclusiveUnitPrice', 'unitPrice'], '0'),
|
|
41
43
|
lineAmountTaxIncluded: decimalTextFrom(line, ['lineAmountTaxIncluded', 'taxInclusiveTotalAmount', 'totalAmount'], '0'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purchase-review-adapter.js","sourceRoot":"","sources":["../../../src/lib/remote-ui/purchase-review-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"purchase-review-adapter.js","sourceRoot":"","sources":["../../../src/lib/remote-ui/purchase-review-adapter.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,mBAAmB,CAAiC,IAAO;IACzE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACzC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACnC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1H,OAAO;QACL,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,CAAC;QACrC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC;QAC5B,KAAK;QACL,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,IAAI;KAC5C,CAAA;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAiC;IAC1D,OAAO;QACL,GAAG,QAAQ;QACX,IAAI,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAClD,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;QAC5E,OAAO,EAAE,gBAAg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,EAAE;IACvF,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACrC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACjD,CAAC;AAED,SAAS,gBAAgB,CAAC,MAA+B,EAAE,IAAuB;IAChF,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;IAC1C,OAAO,IAAI,IAAI,IAAI,CAAA;AACrB,CAAC;AAED,SAAS,eAAe,CAAC,MAA+B,EAAE,IAAuB,EAAE,QAAgB;IACjG,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAA;IAClE,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,WAAW,CAAC,MAA+B,EAAE,IAAuB,EAAE,QAAgB;IAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;IAC7C,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAA;AAClD,CAAC"}
|
|
@@ -320,29 +320,458 @@ export declare class TradeComplianceWorkbenchMiddleware {
|
|
|
320
320
|
replaceBatchId?: string | undefined;
|
|
321
321
|
}, string> | import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
|
|
322
322
|
importTaskId: z.ZodString;
|
|
323
|
-
supplier: z.
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
supplier: z.ZodObject<{
|
|
324
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
+
supplierName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
shortName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
+
creditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
|
+
supplierCreditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
330
|
+
address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
|
+
supplierAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
|
+
countryOrRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
336
|
+
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
337
|
+
wechat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
338
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
taxNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
340
|
+
taxNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
341
|
+
paymentAccount: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
342
|
+
bankName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
343
|
+
taxpayerRating: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
344
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
|
+
businessProducts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
346
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
347
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
supplierName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
349
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
350
|
+
shortName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
351
|
+
creditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
supplierCreditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
354
|
+
supplierAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
355
|
+
countryOrRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
360
|
+
wechat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
361
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
362
|
+
taxNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
363
|
+
taxNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
364
|
+
paymentAccount: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
365
|
+
bankName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
366
|
+
taxpayerRating: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
367
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
368
|
+
businessProducts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
369
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
370
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
371
|
+
supplierName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
372
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
373
|
+
shortName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
+
creditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
375
|
+
supplierCreditCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
|
+
address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
377
|
+
supplierAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
countryOrRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
379
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
|
+
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
382
|
+
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
|
+
wechat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
384
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
taxNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
386
|
+
taxNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
|
+
paymentAccount: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
388
|
+
bankName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
389
|
+
taxpayerRating: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
390
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
391
|
+
businessProducts: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
393
|
+
order: z.ZodObject<{
|
|
394
|
+
contractNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
395
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
396
|
+
orderDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
397
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
398
|
+
contractDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
|
+
contractAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
400
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
401
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
402
|
+
paidAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
403
|
+
refundedAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
404
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
405
|
+
paymentTerm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
406
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
407
|
+
contractNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
408
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
409
|
+
orderDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
410
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
411
|
+
contractDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
412
|
+
contractAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
413
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
414
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
415
|
+
paidAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
416
|
+
refundedAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
417
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
418
|
+
paymentTerm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
419
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
420
|
+
contractNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
421
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
|
+
orderDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
+
contractDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
|
+
contractAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
426
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
427
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
428
|
+
paidAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
429
|
+
refundedAmountCny: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
430
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
|
+
paymentTerm: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
433
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
434
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
435
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
436
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
437
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
438
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
440
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
443
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
444
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
445
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
446
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
447
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
448
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
449
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
450
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
451
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
452
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
453
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
454
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
455
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
456
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
457
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
461
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
462
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
463
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
464
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
466
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
467
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
468
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
469
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
470
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
471
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
472
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
473
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
474
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
475
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
476
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
477
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
480
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
481
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
483
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
484
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
485
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
486
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
487
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
488
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
489
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
490
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
491
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
492
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
493
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
494
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
495
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
496
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
497
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
498
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
499
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
500
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
501
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
502
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
326
503
|
}, "strip", z.ZodTypeAny, {
|
|
327
504
|
importTaskId: string;
|
|
328
|
-
lines:
|
|
329
|
-
|
|
330
|
-
|
|
505
|
+
lines: z.objectOutputType<{
|
|
506
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
510
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
511
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
512
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
513
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
514
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
515
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
516
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
517
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
518
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
519
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
520
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
521
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
522
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
523
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
524
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
525
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
526
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
528
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
529
|
+
supplier: {
|
|
530
|
+
code?: string | null | undefined;
|
|
531
|
+
countryOrRegion?: string | null | undefined;
|
|
532
|
+
name?: string | null | undefined;
|
|
533
|
+
shortName?: string | null | undefined;
|
|
534
|
+
address?: string | null | undefined;
|
|
535
|
+
contactName?: string | null | undefined;
|
|
536
|
+
phone?: string | null | undefined;
|
|
537
|
+
wechat?: string | null | undefined;
|
|
538
|
+
email?: string | null | undefined;
|
|
539
|
+
taxNumber?: string | null | undefined;
|
|
540
|
+
paymentAccount?: string | null | undefined;
|
|
541
|
+
bankName?: string | null | undefined;
|
|
542
|
+
taxpayerRating?: string | null | undefined;
|
|
543
|
+
website?: string | null | undefined;
|
|
544
|
+
businessProducts?: string | null | undefined;
|
|
545
|
+
country?: string | null | undefined;
|
|
546
|
+
supplierName?: string | null | undefined;
|
|
547
|
+
creditCode?: string | null | undefined;
|
|
548
|
+
supplierCreditCode?: string | null | undefined;
|
|
549
|
+
supplierAddress?: string | null | undefined;
|
|
550
|
+
contactPhone?: string | null | undefined;
|
|
551
|
+
taxNo?: string | null | undefined;
|
|
552
|
+
} & {
|
|
553
|
+
[k: string]: unknown;
|
|
554
|
+
};
|
|
555
|
+
order: {
|
|
556
|
+
number?: string | null | undefined;
|
|
557
|
+
date?: string | null | undefined;
|
|
558
|
+
orderDate?: string | null | undefined;
|
|
559
|
+
contractNo?: string | null | undefined;
|
|
560
|
+
contractAmountCny?: string | number | null | undefined;
|
|
561
|
+
paidAmountCny?: string | number | null | undefined;
|
|
562
|
+
refundedAmountCny?: string | number | null | undefined;
|
|
563
|
+
amount?: string | number | null | undefined;
|
|
564
|
+
contractDate?: string | null | undefined;
|
|
565
|
+
totalAmount?: string | number | null | undefined;
|
|
566
|
+
currency?: string | null | undefined;
|
|
567
|
+
paymentTerm?: string | null | undefined;
|
|
568
|
+
} & {
|
|
569
|
+
[k: string]: unknown;
|
|
570
|
+
};
|
|
331
571
|
}, {
|
|
332
572
|
importTaskId: string;
|
|
333
|
-
lines:
|
|
334
|
-
|
|
335
|
-
|
|
573
|
+
lines: z.objectInputType<{
|
|
574
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
575
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
576
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
578
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
579
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
580
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
581
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
582
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
583
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
584
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
585
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
586
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
587
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
588
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
589
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
590
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
591
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
592
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
593
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
594
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
595
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
596
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
597
|
+
supplier: {
|
|
598
|
+
code?: string | null | undefined;
|
|
599
|
+
countryOrRegion?: string | null | undefined;
|
|
600
|
+
name?: string | null | undefined;
|
|
601
|
+
shortName?: string | null | undefined;
|
|
602
|
+
address?: string | null | undefined;
|
|
603
|
+
contactName?: string | null | undefined;
|
|
604
|
+
phone?: string | null | undefined;
|
|
605
|
+
wechat?: string | null | undefined;
|
|
606
|
+
email?: string | null | undefined;
|
|
607
|
+
taxNumber?: string | null | undefined;
|
|
608
|
+
paymentAccount?: string | null | undefined;
|
|
609
|
+
bankName?: string | null | undefined;
|
|
610
|
+
taxpayerRating?: string | null | undefined;
|
|
611
|
+
website?: string | null | undefined;
|
|
612
|
+
businessProducts?: string | null | undefined;
|
|
613
|
+
country?: string | null | undefined;
|
|
614
|
+
supplierName?: string | null | undefined;
|
|
615
|
+
creditCode?: string | null | undefined;
|
|
616
|
+
supplierCreditCode?: string | null | undefined;
|
|
617
|
+
supplierAddress?: string | null | undefined;
|
|
618
|
+
contactPhone?: string | null | undefined;
|
|
619
|
+
taxNo?: string | null | undefined;
|
|
620
|
+
} & {
|
|
621
|
+
[k: string]: unknown;
|
|
622
|
+
};
|
|
623
|
+
order: {
|
|
624
|
+
number?: string | null | undefined;
|
|
625
|
+
date?: string | null | undefined;
|
|
626
|
+
orderDate?: string | null | undefined;
|
|
627
|
+
contractNo?: string | null | undefined;
|
|
628
|
+
contractAmountCny?: string | number | null | undefined;
|
|
629
|
+
paidAmountCny?: string | number | null | undefined;
|
|
630
|
+
refundedAmountCny?: string | number | null | undefined;
|
|
631
|
+
amount?: string | number | null | undefined;
|
|
632
|
+
contractDate?: string | null | undefined;
|
|
633
|
+
totalAmount?: string | number | null | undefined;
|
|
634
|
+
currency?: string | null | undefined;
|
|
635
|
+
paymentTerm?: string | null | undefined;
|
|
636
|
+
} & {
|
|
637
|
+
[k: string]: unknown;
|
|
638
|
+
};
|
|
336
639
|
}>, {
|
|
337
640
|
importTaskId: string;
|
|
338
|
-
lines:
|
|
339
|
-
|
|
340
|
-
|
|
641
|
+
lines: z.objectOutputType<{
|
|
642
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
644
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
645
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
646
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
647
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
648
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
649
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
650
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
651
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
652
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
653
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
654
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
655
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
656
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
657
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
658
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
659
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
660
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
661
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
662
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
663
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
664
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
665
|
+
supplier: {
|
|
666
|
+
code?: string | null | undefined;
|
|
667
|
+
countryOrRegion?: string | null | undefined;
|
|
668
|
+
name?: string | null | undefined;
|
|
669
|
+
shortName?: string | null | undefined;
|
|
670
|
+
address?: string | null | undefined;
|
|
671
|
+
contactName?: string | null | undefined;
|
|
672
|
+
phone?: string | null | undefined;
|
|
673
|
+
wechat?: string | null | undefined;
|
|
674
|
+
email?: string | null | undefined;
|
|
675
|
+
taxNumber?: string | null | undefined;
|
|
676
|
+
paymentAccount?: string | null | undefined;
|
|
677
|
+
bankName?: string | null | undefined;
|
|
678
|
+
taxpayerRating?: string | null | undefined;
|
|
679
|
+
website?: string | null | undefined;
|
|
680
|
+
businessProducts?: string | null | undefined;
|
|
681
|
+
country?: string | null | undefined;
|
|
682
|
+
supplierName?: string | null | undefined;
|
|
683
|
+
creditCode?: string | null | undefined;
|
|
684
|
+
supplierCreditCode?: string | null | undefined;
|
|
685
|
+
supplierAddress?: string | null | undefined;
|
|
686
|
+
contactPhone?: string | null | undefined;
|
|
687
|
+
taxNo?: string | null | undefined;
|
|
688
|
+
} & {
|
|
689
|
+
[k: string]: unknown;
|
|
690
|
+
};
|
|
691
|
+
order: {
|
|
692
|
+
number?: string | null | undefined;
|
|
693
|
+
date?: string | null | undefined;
|
|
694
|
+
orderDate?: string | null | undefined;
|
|
695
|
+
contractNo?: string | null | undefined;
|
|
696
|
+
contractAmountCny?: string | number | null | undefined;
|
|
697
|
+
paidAmountCny?: string | number | null | undefined;
|
|
698
|
+
refundedAmountCny?: string | number | null | undefined;
|
|
699
|
+
amount?: string | number | null | undefined;
|
|
700
|
+
contractDate?: string | null | undefined;
|
|
701
|
+
totalAmount?: string | number | null | undefined;
|
|
702
|
+
currency?: string | null | undefined;
|
|
703
|
+
paymentTerm?: string | null | undefined;
|
|
704
|
+
} & {
|
|
705
|
+
[k: string]: unknown;
|
|
706
|
+
};
|
|
341
707
|
}, {
|
|
342
708
|
importTaskId: string;
|
|
343
|
-
lines:
|
|
344
|
-
|
|
345
|
-
|
|
709
|
+
lines: z.objectInputType<{
|
|
710
|
+
lineNumber: z.ZodOptional<z.ZodNumber>;
|
|
711
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
712
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
713
|
+
productDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
714
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
715
|
+
modelSpecification: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
716
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
717
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
718
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
719
|
+
unitPriceTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
720
|
+
taxInclusiveUnitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
721
|
+
unitPrice: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
722
|
+
lineAmountTaxIncluded: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
723
|
+
taxInclusiveTotalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
724
|
+
totalAmount: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
725
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
726
|
+
hsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
727
|
+
contractHsCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
728
|
+
englishName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
729
|
+
refundRate: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
730
|
+
sourceLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
731
|
+
sourceContent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
732
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
733
|
+
supplier: {
|
|
734
|
+
code?: string | null | undefined;
|
|
735
|
+
countryOrRegion?: string | null | undefined;
|
|
736
|
+
name?: string | null | undefined;
|
|
737
|
+
shortName?: string | null | undefined;
|
|
738
|
+
address?: string | null | undefined;
|
|
739
|
+
contactName?: string | null | undefined;
|
|
740
|
+
phone?: string | null | undefined;
|
|
741
|
+
wechat?: string | null | undefined;
|
|
742
|
+
email?: string | null | undefined;
|
|
743
|
+
taxNumber?: string | null | undefined;
|
|
744
|
+
paymentAccount?: string | null | undefined;
|
|
745
|
+
bankName?: string | null | undefined;
|
|
746
|
+
taxpayerRating?: string | null | undefined;
|
|
747
|
+
website?: string | null | undefined;
|
|
748
|
+
businessProducts?: string | null | undefined;
|
|
749
|
+
country?: string | null | undefined;
|
|
750
|
+
supplierName?: string | null | undefined;
|
|
751
|
+
creditCode?: string | null | undefined;
|
|
752
|
+
supplierCreditCode?: string | null | undefined;
|
|
753
|
+
supplierAddress?: string | null | undefined;
|
|
754
|
+
contactPhone?: string | null | undefined;
|
|
755
|
+
taxNo?: string | null | undefined;
|
|
756
|
+
} & {
|
|
757
|
+
[k: string]: unknown;
|
|
758
|
+
};
|
|
759
|
+
order: {
|
|
760
|
+
number?: string | null | undefined;
|
|
761
|
+
date?: string | null | undefined;
|
|
762
|
+
orderDate?: string | null | undefined;
|
|
763
|
+
contractNo?: string | null | undefined;
|
|
764
|
+
contractAmountCny?: string | number | null | undefined;
|
|
765
|
+
paidAmountCny?: string | number | null | undefined;
|
|
766
|
+
refundedAmountCny?: string | number | null | undefined;
|
|
767
|
+
amount?: string | number | null | undefined;
|
|
768
|
+
contractDate?: string | null | undefined;
|
|
769
|
+
totalAmount?: string | number | null | undefined;
|
|
770
|
+
currency?: string | null | undefined;
|
|
771
|
+
paymentTerm?: string | null | undefined;
|
|
772
|
+
} & {
|
|
773
|
+
[k: string]: unknown;
|
|
774
|
+
};
|
|
346
775
|
}, string> | import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
|
|
347
776
|
importTaskId: z.ZodString;
|
|
348
777
|
customer: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbench.middleware.d.ts","sourceRoot":"","sources":["../../src/lib/workbench.middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACxI,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"workbench.middleware.d.ts","sourceRoot":"","sources":["../../src/lib/workbench.middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACxI,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAA;AAgDxE,qBAEa,kCAAkC;IASjC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAqF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;IARzJ,QAAQ,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;MAMZ;gBAE4B,OAAO,EAAE,+BAA+B,EAAqE,cAAc,CAAC,EAAE,qBAAqB,YAAA;IAEhL,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GA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es, RiskLevels } from './types.js';
|
|
10
10
|
import { resolveTradeComplianceConfig } from './trade-compliance.config.js';
|
|
11
11
|
import { catalogLocalizationInputIssues } from './domain/catalog-localization.js';
|
|
12
|
+
import { adaptPurchaseReview } from './remote-ui/purchase-review-adapter.js';
|
|
12
13
|
const controlledCatalogFields = {
|
|
13
14
|
productName: z.string().optional(), controlDescription: z.string().optional(), originalProductName: z.string().optional(), originalControlDescription: z.string().optional(),
|
|
14
15
|
hsCode: z.string().optional(), sourceLocation: z.string().optional(), sourceContent: z.string().optional()
|
|
@@ -22,6 +23,32 @@ const controlledCatalogRow = z.discriminatedUnion('translationSource', [
|
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
const sanctionCatalogRow = z.object({ companyName: z.string().optional(), countryOrRegion: z.string().optional(), sanctionListSource: z.string().optional(), sanctionReason: z.string().optional(), effectiveDate: z.string().optional(), remarks: z.string().optional(), sourceLocation: z.string().optional(), sourceContent: z.string().optional() });
|
|
26
|
+
const optionalPurchaseText = z.string().nullable().optional();
|
|
27
|
+
const optionalPurchaseDecimal = z.union([z.string(), z.number()]).nullable().optional();
|
|
28
|
+
const purchaseSupplierDraft = z.object({
|
|
29
|
+
name: optionalPurchaseText, supplierName: optionalPurchaseText, code: optionalPurchaseText, shortName: optionalPurchaseText,
|
|
30
|
+
creditCode: optionalPurchaseText, supplierCreditCode: optionalPurchaseText, address: optionalPurchaseText, supplierAddress: optionalPurchaseText,
|
|
31
|
+
countryOrRegion: optionalPurchaseText, country: optionalPurchaseText, contactName: optionalPurchaseText, phone: optionalPurchaseText,
|
|
32
|
+
contactPhone: optionalPurchaseText, wechat: optionalPurchaseText, email: optionalPurchaseText, taxNumber: optionalPurchaseText,
|
|
33
|
+
taxNo: optionalPurchaseText, paymentAccount: optionalPurchaseText, bankName: optionalPurchaseText, taxpayerRating: optionalPurchaseText,
|
|
34
|
+
website: optionalPurchaseText, businessProducts: optionalPurchaseText
|
|
35
|
+
}).passthrough();
|
|
36
|
+
const purchaseOrderDraft = z.object({
|
|
37
|
+
contractNo: optionalPurchaseText, number: optionalPurchaseText, orderDate: optionalPurchaseText, date: optionalPurchaseText,
|
|
38
|
+
contractDate: optionalPurchaseText, contractAmountCny: optionalPurchaseDecimal, totalAmount: optionalPurchaseDecimal,
|
|
39
|
+
amount: optionalPurchaseDecimal, paidAmountCny: optionalPurchaseDecimal, refundedAmountCny: optionalPurchaseDecimal,
|
|
40
|
+
currency: optionalPurchaseText, paymentTerm: optionalPurchaseText
|
|
41
|
+
}).passthrough();
|
|
42
|
+
const purchaseLineDraft = z.object({
|
|
43
|
+
lineNumber: z.number().int().positive().optional(), productName: optionalPurchaseText, name: optionalPurchaseText,
|
|
44
|
+
productDescription: optionalPurchaseText, description: optionalPurchaseText, modelSpecification: optionalPurchaseText,
|
|
45
|
+
model: optionalPurchaseText, unit: optionalPurchaseText, quantity: optionalPurchaseDecimal,
|
|
46
|
+
unitPriceTaxIncluded: optionalPurchaseDecimal, taxInclusiveUnitPrice: optionalPurchaseDecimal, unitPrice: optionalPurchaseDecimal,
|
|
47
|
+
lineAmountTaxIncluded: optionalPurchaseDecimal, taxInclusiveTotalAmount: optionalPurchaseDecimal, totalAmount: optionalPurchaseDecimal,
|
|
48
|
+
vatRate: optionalPurchaseDecimal, hsCode: optionalPurchaseText, contractHsCode: optionalPurchaseText,
|
|
49
|
+
englishName: optionalPurchaseText, refundRate: optionalPurchaseDecimal, sourceLocation: optionalPurchaseText,
|
|
50
|
+
sourceContent: optionalPurchaseText
|
|
51
|
+
}).passthrough();
|
|
25
52
|
let TradeComplianceWorkbenchMiddleware = class TradeComplianceWorkbenchMiddleware {
|
|
26
53
|
constructor(service, configResolver) {
|
|
27
54
|
this.service = service;
|
|
@@ -42,7 +69,11 @@ let TradeComplianceWorkbenchMiddleware = class TradeComplianceWorkbenchMiddlewar
|
|
|
42
69
|
tools: [
|
|
43
70
|
tool(async (input) => stringify(await this.service.importControlledCatalog(scope, input)), { name: TOOL_NAMES.saveControlledCatalog, description: '保存从管控目录提取的商品。productName 和 controlDescription 是中文业务字段;translationSource 必须显式填写。SOURCE_CHINESE 行可省略原文字段;AGENT_TRANSLATED 行用 originalProductName 和 originalControlDescription 保留文件原文。不得根据字符推测来源语言,不得编造管控说明。', schema: z.object({ catalogType: z.enum(['DUAL_USE', 'OVERSEAS_SANCTION']), sourceFileId: z.string(), sourceFileName: z.string(), importTaskId: z.string().uuid(), replaceBatchId: z.string().optional(), rows: z.array(controlledCatalogRow) }) }),
|
|
44
71
|
tool(async (input) => stringify(await this.service.importSanctionCatalog(scope, input)), { name: TOOL_NAMES.saveSanctionCatalog, description: '保存从公司制裁目录完整提取的公司记录。', schema: z.object({ sourceFileId: z.string(), sourceFileName: z.string(), importTaskId: z.string().uuid(), replaceBatchId: z.string().optional(), rows: z.array(sanctionCatalogRow) }) }),
|
|
45
|
-
tool(async (input) =>
|
|
72
|
+
tool(async (input) => {
|
|
73
|
+
const task = await this.service.updateImportTaskDraft(scope, input.importTaskId, { supplier: input.supplier, order: input.order, lines: input.lines }, 'PURCHASE_DRAFT_V1');
|
|
74
|
+
const stored = adaptPurchaseReview(task);
|
|
75
|
+
return stringify({ task, storedDraft: { contractNo: stored.order.contractNo, lineCount: stored.lines.length } });
|
|
76
|
+
}, { name: TOOL_NAMES.savePurchaseDraft, description: '保存一份采购合同的完整待审核草稿。order 使用 contractNo、orderDate、contractAmountCny;lines 必须包含全部商品并使用 productName、productDescription、modelSpecification、quantity、unitPriceTaxIncluded 等标准字段。返回 storedDraft 表示数据库实际保存的合同编号和商品条数。', schema: z.object({ importTaskId: z.string().uuid(), supplier: purchaseSupplierDraft, order: purchaseOrderDraft, lines: z.array(purchaseLineDraft) }) }),
|
|
46
77
|
tool(async (input) => stringify(await this.service.updateImportTaskDraft(scope, input.importTaskId, { customer: input.customer, contract: input.contract, clauses: input.clauses, analyses: input.analyses }, 'CUSTOMER_CONTRACT_DRAFT_V1')), { name: TOOL_NAMES.saveCustomerContractDraft, description: '保存客户合同待审核草稿,必须包含客户、合同、七类关键条款及中文风险建议。', schema: z.object({ importTaskId: z.string().uuid(), customer: z.record(z.unknown()), contract: z.record(z.unknown()), clauses: z.array(z.record(z.unknown())), analyses: z.array(z.record(z.unknown())).optional() }) }),
|
|
47
78
|
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) }) }),
|
|
48
79
|
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) }) }),
|