@axiom-lattice/examples-deep_research 1.0.95 → 1.0.96
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +11 -0
- package/dist/index.js +60 -60
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/agents/sap_b1/XSM_ZSK_metadata_interfaces.md +827 -827
- package/src/agents/sap_b1/__tests__/tools.test.ts +36 -36
- package/src/agents/sap_b1/index.ts +4 -4
- package/src/agents/sap_b1/tools.ts +64 -64
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/examples-deep_research@1.0.
|
|
2
|
+
> @axiom-lattice/examples-deep_research@1.0.96 build /home/runner/work/agentic/agentic/examples/deep_research
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.js [22m[32m78.
|
|
13
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m97.
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m78.45 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m97.48 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 106ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 15148ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m13.00 B[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @axiom-lattice/examples-deep_research
|
|
2
2
|
|
|
3
|
+
## 1.0.96
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4db8e10: lint issue
|
|
8
|
+
- Updated dependencies [4db8e10]
|
|
9
|
+
- @axiom-lattice/pg-stores@1.0.77
|
|
10
|
+
- @axiom-lattice/protocols@2.1.44
|
|
11
|
+
- @axiom-lattice/gateway@2.1.98
|
|
12
|
+
- @axiom-lattice/core@2.1.86
|
|
13
|
+
|
|
3
14
|
## 1.0.95
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
|
9
9
|
"package.json"(exports, module) {
|
|
10
10
|
module.exports = {
|
|
11
11
|
name: "@axiom-lattice/examples-deep_research",
|
|
12
|
-
version: "1.0.
|
|
12
|
+
version: "1.0.96",
|
|
13
13
|
type: "module",
|
|
14
14
|
main: "dist/index.js",
|
|
15
15
|
bin: {
|
|
@@ -744,7 +744,7 @@ registerAgentLattices4(tenantId4, [sandboxAgent]);
|
|
|
744
744
|
// src/agents/sap_b1/tools.ts
|
|
745
745
|
import z4 from "zod";
|
|
746
746
|
import { registerToolLattice } from "@axiom-lattice/core";
|
|
747
|
-
var BASE_URL = process.env.
|
|
747
|
+
var BASE_URL = process.env.ERP_SERVICE_LAYER_URL || "https://b1s.alphafina.cn/b1s/v1";
|
|
748
748
|
var EXPAND_FIELDS = {
|
|
749
749
|
"DocumentLines": [
|
|
750
750
|
"LineNum",
|
|
@@ -790,7 +790,7 @@ var API_LIST = [
|
|
|
790
790
|
{
|
|
791
791
|
name: "BusinessPartners",
|
|
792
792
|
kind: "EntitySet",
|
|
793
|
-
entityType: "
|
|
793
|
+
entityType: "ERP.BusinessPartner",
|
|
794
794
|
primaryKey: "CardCode",
|
|
795
795
|
domain: "BusinessPartner",
|
|
796
796
|
description: "\u5BA2\u6237/\u4F9B\u5E94\u5546\u4E3B\u6570\u636E",
|
|
@@ -830,7 +830,7 @@ var API_LIST = [
|
|
|
830
830
|
{
|
|
831
831
|
name: "BusinessPartnerGroups",
|
|
832
832
|
kind: "EntitySet",
|
|
833
|
-
entityType: "
|
|
833
|
+
entityType: "ERP.BusinessPartnerGroup",
|
|
834
834
|
primaryKey: "Code",
|
|
835
835
|
domain: "BusinessPartner",
|
|
836
836
|
description: "BP \u5206\u7EC4",
|
|
@@ -839,7 +839,7 @@ var API_LIST = [
|
|
|
839
839
|
{
|
|
840
840
|
name: "SalesPersons",
|
|
841
841
|
kind: "EntitySet",
|
|
842
|
-
entityType: "
|
|
842
|
+
entityType: "ERP.SalesPerson",
|
|
843
843
|
primaryKey: "SalesEmployeeCode",
|
|
844
844
|
domain: "BusinessPartner",
|
|
845
845
|
description: "\u9500\u552E\u96C7\u5458",
|
|
@@ -849,7 +849,7 @@ var API_LIST = [
|
|
|
849
849
|
{
|
|
850
850
|
name: "Items",
|
|
851
851
|
kind: "EntitySet",
|
|
852
|
-
entityType: "
|
|
852
|
+
entityType: "ERP.Item",
|
|
853
853
|
primaryKey: "ItemCode",
|
|
854
854
|
domain: "Item / Product",
|
|
855
855
|
description: "\u7269\u6599\u4E3B\u6570\u636E",
|
|
@@ -883,7 +883,7 @@ var API_LIST = [
|
|
|
883
883
|
{
|
|
884
884
|
name: "ItemGroups",
|
|
885
885
|
kind: "EntitySet",
|
|
886
|
-
entityType: "
|
|
886
|
+
entityType: "ERP.ItemGroups",
|
|
887
887
|
primaryKey: "Number",
|
|
888
888
|
domain: "Item / Product",
|
|
889
889
|
description: "\u7269\u6599\u7EC4",
|
|
@@ -892,7 +892,7 @@ var API_LIST = [
|
|
|
892
892
|
{
|
|
893
893
|
name: "PriceLists",
|
|
894
894
|
kind: "EntitySet",
|
|
895
|
-
entityType: "
|
|
895
|
+
entityType: "ERP.PriceList",
|
|
896
896
|
primaryKey: "PriceListNo",
|
|
897
897
|
domain: "Item / Product",
|
|
898
898
|
description: "\u4EF7\u683C\u6E05\u5355",
|
|
@@ -913,7 +913,7 @@ var API_LIST = [
|
|
|
913
913
|
{
|
|
914
914
|
name: "BarCodes",
|
|
915
915
|
kind: "EntitySet",
|
|
916
|
-
entityType: "
|
|
916
|
+
entityType: "ERP.BarCode",
|
|
917
917
|
primaryKey: "AbsEntry",
|
|
918
918
|
domain: "Item / Product",
|
|
919
919
|
description: "\u6761\u7801",
|
|
@@ -923,7 +923,7 @@ var API_LIST = [
|
|
|
923
923
|
{
|
|
924
924
|
name: "Orders",
|
|
925
925
|
kind: "EntitySet",
|
|
926
|
-
entityType: "
|
|
926
|
+
entityType: "ERP.Document",
|
|
927
927
|
primaryKey: "DocEntry",
|
|
928
928
|
domain: "Document",
|
|
929
929
|
description: "\u9500\u552E\u8BA2\u5355",
|
|
@@ -958,7 +958,7 @@ var API_LIST = [
|
|
|
958
958
|
{
|
|
959
959
|
name: "DeliveryNotes",
|
|
960
960
|
kind: "EntitySet",
|
|
961
|
-
entityType: "
|
|
961
|
+
entityType: "ERP.Document",
|
|
962
962
|
primaryKey: "DocEntry",
|
|
963
963
|
domain: "Document",
|
|
964
964
|
description: "\u4EA4\u8D27\u5355",
|
|
@@ -985,7 +985,7 @@ var API_LIST = [
|
|
|
985
985
|
{
|
|
986
986
|
name: "Invoices",
|
|
987
987
|
kind: "EntitySet",
|
|
988
|
-
entityType: "
|
|
988
|
+
entityType: "ERP.Document",
|
|
989
989
|
primaryKey: "DocEntry",
|
|
990
990
|
domain: "Document",
|
|
991
991
|
description: "\u9500\u552E\u53D1\u7968 (\u5E94\u6536)",
|
|
@@ -1013,7 +1013,7 @@ var API_LIST = [
|
|
|
1013
1013
|
{
|
|
1014
1014
|
name: "Quotations",
|
|
1015
1015
|
kind: "EntitySet",
|
|
1016
|
-
entityType: "
|
|
1016
|
+
entityType: "ERP.Document",
|
|
1017
1017
|
primaryKey: "DocEntry",
|
|
1018
1018
|
domain: "Document",
|
|
1019
1019
|
description: "\u9500\u552E\u62A5\u4EF7\u5355",
|
|
@@ -1036,7 +1036,7 @@ var API_LIST = [
|
|
|
1036
1036
|
{
|
|
1037
1037
|
name: "CreditNotes",
|
|
1038
1038
|
kind: "EntitySet",
|
|
1039
|
-
entityType: "
|
|
1039
|
+
entityType: "ERP.Document",
|
|
1040
1040
|
primaryKey: "DocEntry",
|
|
1041
1041
|
domain: "Document",
|
|
1042
1042
|
description: "\u9500\u552E\u8D37\u9879\u51ED\u8BC1",
|
|
@@ -1056,7 +1056,7 @@ var API_LIST = [
|
|
|
1056
1056
|
{
|
|
1057
1057
|
name: "Returns",
|
|
1058
1058
|
kind: "EntitySet",
|
|
1059
|
-
entityType: "
|
|
1059
|
+
entityType: "ERP.Document",
|
|
1060
1060
|
primaryKey: "DocEntry",
|
|
1061
1061
|
domain: "Document",
|
|
1062
1062
|
description: "\u9500\u552E\u9000\u8D27",
|
|
@@ -1076,7 +1076,7 @@ var API_LIST = [
|
|
|
1076
1076
|
{
|
|
1077
1077
|
name: "DownPayments",
|
|
1078
1078
|
kind: "EntitySet",
|
|
1079
|
-
entityType: "
|
|
1079
|
+
entityType: "ERP.Document",
|
|
1080
1080
|
primaryKey: "DocEntry",
|
|
1081
1081
|
domain: "Document",
|
|
1082
1082
|
description: "\u9884\u6536\u6B3E",
|
|
@@ -1097,7 +1097,7 @@ var API_LIST = [
|
|
|
1097
1097
|
{
|
|
1098
1098
|
name: "Drafts",
|
|
1099
1099
|
kind: "EntitySet",
|
|
1100
|
-
entityType: "
|
|
1100
|
+
entityType: "ERP.Document",
|
|
1101
1101
|
primaryKey: "DocEntry",
|
|
1102
1102
|
domain: "Document",
|
|
1103
1103
|
description: "\u9500\u552E\u8349\u7A3F/\u91C7\u8D2D\u8349\u7A3F\uFF08\u652F\u6301\u521B\u5EFA\u3001\u67E5\u8BE2\u3001\u66F4\u65B0\u3001\u5220\u9664\uFF09",
|
|
@@ -1127,7 +1127,7 @@ var API_LIST = [
|
|
|
1127
1127
|
{
|
|
1128
1128
|
name: "PurchaseOrders",
|
|
1129
1129
|
kind: "EntitySet",
|
|
1130
|
-
entityType: "
|
|
1130
|
+
entityType: "ERP.Document",
|
|
1131
1131
|
primaryKey: "DocEntry",
|
|
1132
1132
|
domain: "Document",
|
|
1133
1133
|
description: "\u91C7\u8D2D\u8BA2\u5355",
|
|
@@ -1154,7 +1154,7 @@ var API_LIST = [
|
|
|
1154
1154
|
{
|
|
1155
1155
|
name: "PurchaseDeliveryNotes",
|
|
1156
1156
|
kind: "EntitySet",
|
|
1157
|
-
entityType: "
|
|
1157
|
+
entityType: "ERP.Document",
|
|
1158
1158
|
primaryKey: "DocEntry",
|
|
1159
1159
|
domain: "Document",
|
|
1160
1160
|
description: "\u91C7\u8D2D\u6536\u8D27\u5355",
|
|
@@ -1173,7 +1173,7 @@ var API_LIST = [
|
|
|
1173
1173
|
{
|
|
1174
1174
|
name: "PurchaseInvoices",
|
|
1175
1175
|
kind: "EntitySet",
|
|
1176
|
-
entityType: "
|
|
1176
|
+
entityType: "ERP.Document",
|
|
1177
1177
|
primaryKey: "DocEntry",
|
|
1178
1178
|
domain: "Document",
|
|
1179
1179
|
description: "\u91C7\u8D2D\u53D1\u7968 (\u5E94\u4ED8)",
|
|
@@ -1194,7 +1194,7 @@ var API_LIST = [
|
|
|
1194
1194
|
{
|
|
1195
1195
|
name: "PurchaseReturns",
|
|
1196
1196
|
kind: "EntitySet",
|
|
1197
|
-
entityType: "
|
|
1197
|
+
entityType: "ERP.Document",
|
|
1198
1198
|
primaryKey: "DocEntry",
|
|
1199
1199
|
domain: "Document",
|
|
1200
1200
|
description: "\u91C7\u8D2D\u9000\u8D27",
|
|
@@ -1213,7 +1213,7 @@ var API_LIST = [
|
|
|
1213
1213
|
{
|
|
1214
1214
|
name: "PurchaseQuotations",
|
|
1215
1215
|
kind: "EntitySet",
|
|
1216
|
-
entityType: "
|
|
1216
|
+
entityType: "ERP.Document",
|
|
1217
1217
|
primaryKey: "DocEntry",
|
|
1218
1218
|
domain: "Document",
|
|
1219
1219
|
description: "\u91C7\u8D2D\u62A5\u4EF7",
|
|
@@ -1233,7 +1233,7 @@ var API_LIST = [
|
|
|
1233
1233
|
{
|
|
1234
1234
|
name: "InventoryGenEntries",
|
|
1235
1235
|
kind: "EntitySet",
|
|
1236
|
-
entityType: "
|
|
1236
|
+
entityType: "ERP.Document",
|
|
1237
1237
|
primaryKey: "DocEntry",
|
|
1238
1238
|
domain: "Inventory / Warehouse",
|
|
1239
1239
|
description: "\u5E93\u5B58\u6536\u8D27",
|
|
@@ -1253,7 +1253,7 @@ var API_LIST = [
|
|
|
1253
1253
|
{
|
|
1254
1254
|
name: "InventoryGenExits",
|
|
1255
1255
|
kind: "EntitySet",
|
|
1256
|
-
entityType: "
|
|
1256
|
+
entityType: "ERP.Document",
|
|
1257
1257
|
primaryKey: "DocEntry",
|
|
1258
1258
|
domain: "Inventory / Warehouse",
|
|
1259
1259
|
description: "\u5E93\u5B58\u53D1\u8D27",
|
|
@@ -1272,7 +1272,7 @@ var API_LIST = [
|
|
|
1272
1272
|
{
|
|
1273
1273
|
name: "StockTransfers",
|
|
1274
1274
|
kind: "EntitySet",
|
|
1275
|
-
entityType: "
|
|
1275
|
+
entityType: "ERP.StockTransfer",
|
|
1276
1276
|
primaryKey: "DocEntry",
|
|
1277
1277
|
domain: "Inventory / Warehouse",
|
|
1278
1278
|
description: "\u5E93\u5B58\u8F6C\u50A8",
|
|
@@ -1291,7 +1291,7 @@ var API_LIST = [
|
|
|
1291
1291
|
{
|
|
1292
1292
|
name: "InventoryPostings",
|
|
1293
1293
|
kind: "EntitySet",
|
|
1294
|
-
entityType: "
|
|
1294
|
+
entityType: "ERP.InventoryPosting",
|
|
1295
1295
|
primaryKey: "DocumentEntry",
|
|
1296
1296
|
domain: "Inventory / Warehouse",
|
|
1297
1297
|
description: "\u5E93\u5B58\u8FC7\u8D26",
|
|
@@ -1308,7 +1308,7 @@ var API_LIST = [
|
|
|
1308
1308
|
{
|
|
1309
1309
|
name: "InventoryCountings",
|
|
1310
1310
|
kind: "EntitySet",
|
|
1311
|
-
entityType: "
|
|
1311
|
+
entityType: "ERP.InventoryCounting",
|
|
1312
1312
|
primaryKey: "DocumentEntry",
|
|
1313
1313
|
domain: "Inventory / Warehouse",
|
|
1314
1314
|
description: "\u5E93\u5B58\u76D8\u70B9",
|
|
@@ -1324,7 +1324,7 @@ var API_LIST = [
|
|
|
1324
1324
|
{
|
|
1325
1325
|
name: "Warehouses",
|
|
1326
1326
|
kind: "EntitySet",
|
|
1327
|
-
entityType: "
|
|
1327
|
+
entityType: "ERP.Warehouse",
|
|
1328
1328
|
primaryKey: "WarehouseCode",
|
|
1329
1329
|
domain: "Inventory / Warehouse",
|
|
1330
1330
|
description: "\u4ED3\u5E93\u5B9A\u4E49",
|
|
@@ -1345,7 +1345,7 @@ var API_LIST = [
|
|
|
1345
1345
|
{
|
|
1346
1346
|
name: "BinLocations",
|
|
1347
1347
|
kind: "EntitySet",
|
|
1348
|
-
entityType: "
|
|
1348
|
+
entityType: "ERP.BinLocation",
|
|
1349
1349
|
primaryKey: "AbsEntry",
|
|
1350
1350
|
domain: "Inventory / Warehouse",
|
|
1351
1351
|
description: "\u5E93\u4F4D",
|
|
@@ -1366,7 +1366,7 @@ var API_LIST = [
|
|
|
1366
1366
|
{
|
|
1367
1367
|
name: "BatchNumberDetails",
|
|
1368
1368
|
kind: "EntitySet",
|
|
1369
|
-
entityType: "
|
|
1369
|
+
entityType: "ERP.BatchNumberDetail",
|
|
1370
1370
|
primaryKey: "DocEntry",
|
|
1371
1371
|
domain: "Inventory / Warehouse",
|
|
1372
1372
|
description: "\u6279\u6B21\u53F7\u660E\u7EC6",
|
|
@@ -1385,7 +1385,7 @@ var API_LIST = [
|
|
|
1385
1385
|
{
|
|
1386
1386
|
name: "SerialNumberDetails",
|
|
1387
1387
|
kind: "EntitySet",
|
|
1388
|
-
entityType: "
|
|
1388
|
+
entityType: "ERP.SerialNumberDetail",
|
|
1389
1389
|
primaryKey: "DocEntry",
|
|
1390
1390
|
domain: "Inventory / Warehouse",
|
|
1391
1391
|
description: "\u5E8F\u5217\u53F7\u660E\u7EC6",
|
|
@@ -1403,7 +1403,7 @@ var API_LIST = [
|
|
|
1403
1403
|
{
|
|
1404
1404
|
name: "ItemsService_InitData",
|
|
1405
1405
|
kind: "FunctionImport",
|
|
1406
|
-
entityType: "
|
|
1406
|
+
entityType: "ERP.Item",
|
|
1407
1407
|
domain: "Item / Product",
|
|
1408
1408
|
description: "\u521D\u59CB\u5316\u7269\u6599\u6570\u636E",
|
|
1409
1409
|
fields: []
|
|
@@ -1411,7 +1411,7 @@ var API_LIST = [
|
|
|
1411
1411
|
{
|
|
1412
1412
|
name: "BusinessPartnersService_InitData",
|
|
1413
1413
|
kind: "FunctionImport",
|
|
1414
|
-
entityType: "
|
|
1414
|
+
entityType: "ERP.BusinessPartner",
|
|
1415
1415
|
domain: "BusinessPartner",
|
|
1416
1416
|
description: "\u521D\u59CB\u5316 BP \u6570\u636E",
|
|
1417
1417
|
fields: []
|
|
@@ -1419,7 +1419,7 @@ var API_LIST = [
|
|
|
1419
1419
|
{
|
|
1420
1420
|
name: "OrdersService_InitData",
|
|
1421
1421
|
kind: "FunctionImport",
|
|
1422
|
-
entityType: "
|
|
1422
|
+
entityType: "ERP.Document",
|
|
1423
1423
|
domain: "Document",
|
|
1424
1424
|
description: "\u521D\u59CB\u5316\u8BA2\u5355\u6570\u636E",
|
|
1425
1425
|
fields: []
|
|
@@ -1427,7 +1427,7 @@ var API_LIST = [
|
|
|
1427
1427
|
{
|
|
1428
1428
|
name: "InvoicesService_InitData",
|
|
1429
1429
|
kind: "FunctionImport",
|
|
1430
|
-
entityType: "
|
|
1430
|
+
entityType: "ERP.Document",
|
|
1431
1431
|
domain: "Document",
|
|
1432
1432
|
description: "\u521D\u59CB\u5316\u53D1\u7968\u6570\u636E",
|
|
1433
1433
|
fields: []
|
|
@@ -1436,7 +1436,7 @@ var API_LIST = [
|
|
|
1436
1436
|
{
|
|
1437
1437
|
name: "SpecialPrices",
|
|
1438
1438
|
kind: "EntitySet",
|
|
1439
|
-
entityType: "
|
|
1439
|
+
entityType: "ERP.SpecialPrice",
|
|
1440
1440
|
primaryKey: "ItemCode+CardCode",
|
|
1441
1441
|
domain: "Item / Product",
|
|
1442
1442
|
description: "\u7279\u6B8A\u4EF7\u683C\uFF08BP/\u5BA2\u6237\u7279\u5B9A\u4EF7\u683C\uFF09",
|
|
@@ -1454,7 +1454,7 @@ var API_LIST = [
|
|
|
1454
1454
|
{
|
|
1455
1455
|
name: "LandedCosts",
|
|
1456
1456
|
kind: "EntitySet",
|
|
1457
|
-
entityType: "
|
|
1457
|
+
entityType: "ERP.LandedCost",
|
|
1458
1458
|
primaryKey: "DocEntry",
|
|
1459
1459
|
domain: "Document",
|
|
1460
1460
|
description: "\u5230\u5CB8\u6210\u672C/\u9644\u52A0\u6210\u672C\u51ED\u8BC1",
|
|
@@ -1463,7 +1463,7 @@ var API_LIST = [
|
|
|
1463
1463
|
{
|
|
1464
1464
|
name: "LandedCostsCodes",
|
|
1465
1465
|
kind: "EntitySet",
|
|
1466
|
-
entityType: "
|
|
1466
|
+
entityType: "ERP.LandedCostsCode",
|
|
1467
1467
|
primaryKey: "Code",
|
|
1468
1468
|
domain: "Document",
|
|
1469
1469
|
description: "\u5230\u5CB8\u6210\u672C\u4EE3\u7801\u5B9A\u4E49",
|
|
@@ -1472,7 +1472,7 @@ var API_LIST = [
|
|
|
1472
1472
|
{
|
|
1473
1473
|
name: "CompanyService_GetItemPrice",
|
|
1474
1474
|
kind: "FunctionImport",
|
|
1475
|
-
entityType: "
|
|
1475
|
+
entityType: "ERP.ItemPriceReturnParams",
|
|
1476
1476
|
domain: "Item / Product",
|
|
1477
1477
|
description: "\u6839\u636E\u53C2\u6570\u67E5\u8BE2\u7269\u6599\u4EF7\u683C\uFF08\u542B\u5386\u53F2\u660E\u7EC6\uFF09",
|
|
1478
1478
|
fields: ["ItemPrices", "ItemUnitOfMeasurementCollection"]
|
|
@@ -1501,7 +1501,7 @@ var API_LIST = [
|
|
|
1501
1501
|
{
|
|
1502
1502
|
name: "Z20_COST",
|
|
1503
1503
|
kind: "EntitySet",
|
|
1504
|
-
entityType: "
|
|
1504
|
+
entityType: "ERP.Z20_COST",
|
|
1505
1505
|
primaryKey: "DocEntry",
|
|
1506
1506
|
domain: "Item / Product",
|
|
1507
1507
|
description: "\u81EA\u5B9A\u4E49: \u6210\u672C\u8BB0\u5F55\u8868\uFF08\u542B\u5468\u671F/\u5B9E\u4F8B\u7EF4\u5EA6\u7684\u6210\u672C\u5386\u53F2\uFF09",
|
|
@@ -1524,7 +1524,7 @@ var API_LIST = [
|
|
|
1524
1524
|
{
|
|
1525
1525
|
name: "Z20_CPAT",
|
|
1526
1526
|
kind: "EntitySet",
|
|
1527
|
-
entityType: "
|
|
1527
|
+
entityType: "ERP.Z20_CPAT",
|
|
1528
1528
|
primaryKey: "DocEntry",
|
|
1529
1529
|
domain: "Item / Product",
|
|
1530
1530
|
description: "\u81EA\u5B9A\u4E49: \u6210\u672C/\u4EF7\u683C\u5206\u644A\u8BB0\u5F55",
|
|
@@ -1543,7 +1543,7 @@ var API_LIST = [
|
|
|
1543
1543
|
{
|
|
1544
1544
|
name: "Z20_OINP",
|
|
1545
1545
|
kind: "EntitySet",
|
|
1546
|
-
entityType: "
|
|
1546
|
+
entityType: "ERP.Z20_OINP",
|
|
1547
1547
|
primaryKey: "DocEntry",
|
|
1548
1548
|
domain: "Document",
|
|
1549
1549
|
description: "\u81EA\u5B9A\u4E49: \u91C7\u8D2D\u8BA2\u5355\u8F93\u5165\u4EF7\u683C\u8BB0\u5F55",
|
|
@@ -1562,7 +1562,7 @@ var API_LIST = [
|
|
|
1562
1562
|
{
|
|
1563
1563
|
name: "Z20_PWAG",
|
|
1564
1564
|
kind: "EntitySet",
|
|
1565
|
-
entityType: "
|
|
1565
|
+
entityType: "ERP.Z20_PWAG",
|
|
1566
1566
|
primaryKey: "DocEntry",
|
|
1567
1567
|
domain: "Item / Product",
|
|
1568
1568
|
description: "\u81EA\u5B9A\u4E49: \u5DE5\u4EF7/\u5DE5\u5E8F\u4EF7\u683C\u8BB0\u5F55",
|
|
@@ -1581,7 +1581,7 @@ var API_LIST = [
|
|
|
1581
1581
|
{
|
|
1582
1582
|
name: "Z20_HOLD",
|
|
1583
1583
|
kind: "EntitySet",
|
|
1584
|
-
entityType: "
|
|
1584
|
+
entityType: "ERP.Z20_HOLD",
|
|
1585
1585
|
primaryKey: "DocEntry",
|
|
1586
1586
|
domain: "Inventory / Warehouse",
|
|
1587
1587
|
description: "\u81EA\u5B9A\u4E49: \u6682\u5B58/\u51BB\u7ED3\u5E93\u5B58\u8BB0\u5F55",
|
|
@@ -1600,7 +1600,7 @@ var API_LIST = [
|
|
|
1600
1600
|
{
|
|
1601
1601
|
name: "Z20_IMIT",
|
|
1602
1602
|
kind: "EntitySet",
|
|
1603
|
-
entityType: "
|
|
1603
|
+
entityType: "ERP.Z20_IMIT",
|
|
1604
1604
|
primaryKey: "DocEntry",
|
|
1605
1605
|
domain: "Inventory / Warehouse",
|
|
1606
1606
|
description: "\u81EA\u5B9A\u4E49: \u5E93\u5B58\u521D\u59CB\u5316\u8BB0\u5F55",
|
|
@@ -1626,7 +1626,7 @@ function mapResult(e) {
|
|
|
1626
1626
|
primaryKey: e.primaryKey || null,
|
|
1627
1627
|
fields: e.fields,
|
|
1628
1628
|
readySelect: e.fields.length > 0 ? `$select=${e.fields.join(",")}` : void 0,
|
|
1629
|
-
hint: e.kind === "EntitySet" ? `${e.name} \u2014 ${e.description}\u3002\u4E3B\u952E: ${e.primaryKey}\u3002\u8C03\u7528
|
|
1629
|
+
hint: e.kind === "EntitySet" ? `${e.name} \u2014 ${e.description}\u3002\u4E3B\u952E: ${e.primaryKey}\u3002\u8C03\u7528 erp_api_call \u8FDB\u884C CRUD \u64CD\u4F5C\u3002` : `${e.name} \u2014 ${e.description}\u3002\u8C03\u7528 erp_api_call \u6267\u884C\u6B64\u65B9\u6CD5\u3002`
|
|
1630
1630
|
};
|
|
1631
1631
|
if (ENTITIES_WITH_LINES.has(e.name)) {
|
|
1632
1632
|
r.expand = ["DocumentLines", "DocumentAdditionalExpenses"];
|
|
@@ -1641,10 +1641,10 @@ function mapResult(e) {
|
|
|
1641
1641
|
return r;
|
|
1642
1642
|
}
|
|
1643
1643
|
registerToolLattice(
|
|
1644
|
-
"
|
|
1644
|
+
"erp_api_search",
|
|
1645
1645
|
{
|
|
1646
|
-
name: "
|
|
1647
|
-
description: "\u641C\u7D22
|
|
1646
|
+
name: "erp_api_search",
|
|
1647
|
+
description: "\u641C\u7D22 ERP Service Layer API \u63A5\u53E3\u5143\u6570\u636E\uFF0C\u8986\u76D6 BP/\u7269\u6599/\u8BA2\u5355/\u5E93\u5B58\u56DB\u5927\u9886\u57DF\u3002\u8FD4\u56DE\u63A5\u53E3\u540D\u3001\u4E3B\u952E\u3001\u5B57\u6BB5\u5217\u8868\u3001\u53EF\u9009 expand \u5BFC\u822A\u3002\u53EF\u7528 discover \u6A21\u5F0F\u53D1\u73B0\u5173\u8054\u63A5\u53E3\uFF08\u5982\u641C SalesPerson \u4E5F\u80FD\u627E\u5230 SalesPersons API\uFF09\u3002\u641C\u7D22\u7ED3\u679C\u4E2D\u7684 readySelect \u53EF\u76F4\u63A5\u590D\u5236\u5230 $select\u3002",
|
|
1648
1648
|
needUserApprove: false,
|
|
1649
1649
|
schema: z4.object({
|
|
1650
1650
|
query: z4.string().optional().describe(
|
|
@@ -1740,30 +1740,30 @@ registerToolLattice(
|
|
|
1740
1740
|
};
|
|
1741
1741
|
}
|
|
1742
1742
|
);
|
|
1743
|
-
var
|
|
1743
|
+
var ERP_COOKIE = process.env.ERP_SESSION ? `B1SESSION=${process.env.ERP_SESSION}; ROUTEID=.node0` : "";
|
|
1744
1744
|
registerToolLattice(
|
|
1745
|
-
"
|
|
1745
|
+
"erp_api_call",
|
|
1746
1746
|
{
|
|
1747
|
-
name: "
|
|
1748
|
-
description: `\u6267\u884C
|
|
1747
|
+
name: "erp_api_call",
|
|
1748
|
+
description: `\u6267\u884C ERP Service Layer \u7684 OData API \u67E5\u8BE2/\u521B\u5EFA/\u66F4\u65B0/\u5220\u9664\u3002Base: ${BASE_URL}\u3002\u26A0\uFE0F \u5148\u786E\u8BA4\u662F\u5426\u5DF2\u901A\u8FC7 erp_api_search \u67E5\u8FC7\u5B57\u6BB5\u5217\u8868\uFF0C\u52FF\u51ED\u8BB0\u5FC6\u7F16\u5B57\u6BB5\u540D\u3002
|
|
1749
1749
|
\u26A0\uFE0F \u8349\u7A3F/draft/\u6682\u5B58 \u2192 \u7528 Drafts \u63A5\u53E3\uFF0C\u4E0D\u662F Orders/Invoices \u7B49\u6B63\u5F0F\u5355\u636E\u3002Drafts \u901A\u8FC7 DocObjectCode \u533A\u5206\u5355\u636E\u7C7B\u578B(17=\u8BA2\u5355,13=\u53D1\u7968,16=\u4EA4\u8D27\u5355,23=\u91C7\u8D2D\u8BA2\u5355)\u3002
|
|
1750
1750
|
$filter \u64CD\u4F5C\u7B26: eq/ne/gt/lt/ge/le/contains(f,'v')/startswith(f,'v')/endswith(f,'v')\uFF0C\u591A\u6761\u4EF6\u7528 and/or\u3002\u5B57\u7B26\u4E32\u503C\u5FC5\u987B\u5355\u5F15\u53F7\u5305\u88F9\u3002$orderby=Field desc \u6392\u5E8F\u3002
|
|
1751
1751
|
|
|
1752
|
-
\u26A0\uFE0F
|
|
1752
|
+
\u26A0\uFE0F ERP \u5B9E\u6218\u7ECF\u9A8C:
|
|
1753
1753
|
1. \u4E0D\u8981\u7528 $expand\uFF01$expand \u6781\u6613\u89E6\u53D1 400/500\u3002\u6539\u7528 $select \u5305\u542B\u5D4C\u5957\u5B57\u6BB5\uFF0C\u5982 $select=DocEntry,DocNum,DocumentLines\uFF0C
|
|
1754
1754
|
DocumentLines \u4F1A\u81EA\u52A8\u4F5C\u4E3A\u5D4C\u5957 JSON \u8FD4\u56DE\u3002ItemPrices\u3001BPAddresses \u7B49\u540C\u7406\u3002
|
|
1755
1755
|
2. \u4E0D\u8981\u7528\u4E3B\u952E\u8DEF\u5F84 /Orders('1173')\uFF0C\u6613 500\u3002\u7528 $filter=DocEntry eq 1173 \u4EE3\u66FF\u3002
|
|
1756
1756
|
3. \u67E5\u5355\u6761\u8BB0\u5F55\u65F6\u4F18\u5148 $filter\uFF0C\u800C\u975E\u4F20 id \u53C2\u6570\u3002
|
|
1757
1757
|
400 \u591A\u4E3A\u7279\u6B8A\u5B57\u7B26\u672A\u7F16\u7801(\u5F15\u53F7\u7528 %27)\uFF1B500 \u591A\u4E3A\u5B57\u6BB5\u4E0D\u5B58\u5728\u6216\u7528\u9519\u4E86 $expand\uFF1B\u65E0\u7ED3\u679C\u5219\u653E\u5BBD filter\u3002
|
|
1758
|
-
POST \u521B\u5EFA:
|
|
1759
|
-
GET \u81EA\u52A8\u6CE8\u5165 $select+$top=20\uFF0C\u624B\u52A8\u4F20\u5165\u53EF\u8986\u76D6\u3002\u5D4C\u5957\u96C6\u5408(DocumentLines\u7B49)\u81EA\u52A8\u88C1\u526A\u53EA\u4FDD\u7559\u5E38\u7528\u5B57\u6BB5\uFF0C\u9632 token \u7206\u70B8\u3002\u8BA4\u8BC1\u9700
|
|
1758
|
+
POST \u521B\u5EFA: erp_api_search \u8FD4\u56DE\u7684 lineFields \u662F DocumentLines \u5B50\u5B57\u6BB5\u3002body \u5FC5\u542B DocObjectCode(DocType)\u3001CardCode\u3001DocDate\uFF1BDocumentLines \u4E3A\u6570\u7EC4\uFF0C\u6BCF\u9879\u5FC5\u542B ItemCode\u3001Quantity\u3002PATCH \u53EA\u4F20\u53D8\u66F4\u5B57\u6BB5\uFF1BDELETE \u9700\u4F20 id\u3002
|
|
1759
|
+
GET \u81EA\u52A8\u6CE8\u5165 $select+$top=20\uFF0C\u624B\u52A8\u4F20\u5165\u53EF\u8986\u76D6\u3002\u5D4C\u5957\u96C6\u5408(DocumentLines\u7B49)\u81EA\u52A8\u88C1\u526A\u53EA\u4FDD\u7559\u5E38\u7528\u5B57\u6BB5\uFF0C\u9632 token \u7206\u70B8\u3002\u8BA4\u8BC1\u9700 ERP_SESSION \u73AF\u5883\u53D8\u91CF\u3002`,
|
|
1760
1760
|
needUserApprove: false,
|
|
1761
1761
|
schema: z4.object({
|
|
1762
1762
|
entitySet: z4.string().describe("EntitySet \u540D\u79F0\uFF0C\u5982 'BusinessPartners', 'Orders', 'Items', 'PurchaseOrders'"),
|
|
1763
1763
|
method: z4.enum(["GET", "POST", "PATCH", "DELETE"]).describe("HTTP \u65B9\u6CD5"),
|
|
1764
1764
|
id: z4.string().optional().describe("\u4E3B\u952E\u503C\uFF0CGET/PATCH/DELETE \u5355\u4E2A\u5B9E\u4F53\u65F6\u4F7F\u7528\u3002\u5982 /BusinessPartners('C001')"),
|
|
1765
1765
|
queryOptions: z4.string().optional().describe(
|
|
1766
|
-
"OData \u67E5\u8BE2\u53C2\u6570\uFF08\u4E0D\u542B `?` \u524D\u7F00\uFF09\u3002\u5E38\u7528: $top=10, $select=CardCode,CardName, $filter=CardName eq 'xxx' or contains(CardName,'xxx'), $orderby=DocDate desc, $expand=DocumentLines\u3002\u5B57\u7B26\u4E32\u503C\u7528\u5355\u5F15\u53F7\
|
|
1766
|
+
"OData \u67E5\u8BE2\u53C2\u6570\uFF08\u4E0D\u542B `?` \u524D\u7F00\uFF09\u3002\u5E38\u7528: $top=10, $select=CardCode,CardName, $filter=CardName eq 'xxx' or contains(CardName,'xxx'), $orderby=DocDate desc, $expand=DocumentLines\u3002\u5B57\u7B26\u4E32\u503C\u7528\u5355\u5F15\u53F7\u3002erp_api_search \u8FD4\u56DE\u7684 readySelect \u53EF\u76F4\u63A5\u590D\u5236\u5230 $select\u3002"
|
|
1767
1767
|
),
|
|
1768
1768
|
body: z4.record(z4.unknown()).optional().describe("POST/PATCH \u65F6\u7684 JSON \u8BF7\u6C42\u4F53")
|
|
1769
1769
|
})
|
|
@@ -1776,7 +1776,7 @@ GET \u81EA\u52A8\u6CE8\u5165 $select+$top=20\uFF0C\u624B\u52A8\u4F20\u5165\u53EF
|
|
|
1776
1776
|
"Content-Type": "application/json",
|
|
1777
1777
|
Accept: "application/json"
|
|
1778
1778
|
};
|
|
1779
|
-
if (
|
|
1779
|
+
if (ERP_COOKIE) headers.Cookie = ERP_COOKIE;
|
|
1780
1780
|
const fetchOptions = { method, headers };
|
|
1781
1781
|
if ((method === "POST" || method === "PATCH") && input.body) {
|
|
1782
1782
|
fetchOptions.body = JSON.stringify(input.body);
|
|
@@ -1800,7 +1800,7 @@ GET \u81EA\u52A8\u6CE8\u5165 $select+$top=20\uFF0C\u624B\u52A8\u4F20\u5165\u53EF
|
|
|
1800
1800
|
};
|
|
1801
1801
|
if (!res.ok) {
|
|
1802
1802
|
result.error = `HTTP ${res.status} ${res.statusText}`;
|
|
1803
|
-
result.hint = res.status === 401 ? "\u9700\u8981\u6709\u6548\u7684 B1SESSION Cookie\u3002\u8BF7\u5148\u901A\u8FC7 Login \u7AEF\u70B9\u83B7\u53D6\uFF0C\u6216\u8BBE\u7F6E
|
|
1803
|
+
result.hint = res.status === 401 ? "\u9700\u8981\u6709\u6548\u7684 B1SESSION Cookie\u3002\u8BF7\u5148\u901A\u8FC7 Login \u7AEF\u70B9\u83B7\u53D6\uFF0C\u6216\u8BBE\u7F6E ERP_SESSION \u73AF\u5883\u53D8\u91CF\u3002" : res.status === 404 ? "\u63A5\u53E3\u6216\u5B9E\u4F53\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5 entitySet \u540D\u79F0\u548C id\u3002" : void 0;
|
|
1804
1804
|
}
|
|
1805
1805
|
return result;
|
|
1806
1806
|
} catch (err) {
|
|
@@ -1809,7 +1809,7 @@ GET \u81EA\u52A8\u6CE8\u5165 $select+$top=20\uFF0C\u624B\u52A8\u4F20\u5165\u53EF
|
|
|
1809
1809
|
ok: false,
|
|
1810
1810
|
error: `\u8BF7\u6C42\u5931\u8D25: ${message}`,
|
|
1811
1811
|
url,
|
|
1812
|
-
hint: "\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5
|
|
1812
|
+
hint: "\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 ERP_SERVICE_LAYER_URL \u662F\u5426\u6B63\u786E\u3002"
|
|
1813
1813
|
};
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|