@ywfe/fe-tools 1.2.1-beta.6 → 1.2.1-beta.8

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.
@@ -58,6 +58,35 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
58
58
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
59
59
  };
60
60
 
61
+ function userInputToJson(_a) {
62
+ return __awaiter(this, arguments, void 0, function (_b) {
63
+ var res, result;
64
+ var input = _b.input;
65
+ return __generator(this, function (_c) {
66
+ switch (_c.label) {
67
+ case 0:
68
+ console.log("input", input);
69
+ return [4 /*yield*/, request({
70
+ input: {
71
+ url: "https://fc-typechat.ywwl.com/userInputToJson",
72
+ method: "GET",
73
+ params: input,
74
+ },
75
+ })];
76
+ case 1:
77
+ res = _c.sent();
78
+ if (res.success) {
79
+ result = res.data;
80
+ return [2 /*return*/, result.success ? result.data : result];
81
+ }
82
+ else {
83
+ return [2 /*return*/, res.success ? res.data : res];
84
+ }
85
+ }
86
+ });
87
+ });
88
+ }
89
+
61
90
  function getAugmentedNamespace(n) {
62
91
  if (n.__esModule) return n;
63
92
  var f = n.default;
@@ -8753,21 +8782,5 @@ function request(_a) {
8753
8782
  });
8754
8783
  }
8755
8784
 
8756
- function userInputToJson(_a) {
8757
- return __awaiter(this, arguments, void 0, function (_b) {
8758
- var input = _b.input;
8759
- return __generator(this, function (_c) {
8760
- input.userInput, input.rules;
8761
- //const res = await fetools.request({
8762
- //input:{
8763
- //url:"https://fc-typechat.ywwl.com/userInputToJson",
8764
- //method:"GET"
8765
- //}
8766
- //})
8767
- return [2 /*return*/, "2"];
8768
- });
8769
- });
8770
- }
8771
-
8772
8785
  export { request, userInputToJson };
8773
8786
  //# sourceMappingURL=ywfe-tools.esm.js.map