@ywfe/fe-tools 1.2.1-beta.17 → 1.2.1-beta.18

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/index.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default as request } from './request'
2
+ export { default as userInputToJson } from './userInputToJson'
package/lib/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default as request } from './request';
2
+ export { default as userInputToJson } from './userInputToJson';
@@ -0,0 +1,8 @@
1
+ interface userInput {
2
+ userInput?: string;
3
+ rules?: string;
4
+ }
5
+ declare function userInputToJson({ input }: {
6
+ input: userInput;
7
+ }): Promise<any>;
8
+ export default userInputToJson;
@@ -8762,5 +8762,35 @@ function request(_a) {
8762
8762
  });
8763
8763
  }
8764
8764
 
8765
+ function userInputToJson(_a) {
8766
+ return __awaiter(this, arguments, void 0, function (_b) {
8767
+ var res, result;
8768
+ var input = _b.input;
8769
+ return __generator(this, function (_c) {
8770
+ switch (_c.label) {
8771
+ case 0:
8772
+ console.log("input", input);
8773
+ return [4 /*yield*/, request({
8774
+ input: {
8775
+ url: "https://fc-typechat.ywwl.com/userInputToJson",
8776
+ method: "GET",
8777
+ params: input,
8778
+ },
8779
+ })];
8780
+ case 1:
8781
+ res = _c.sent();
8782
+ if (res.success) {
8783
+ result = res.data;
8784
+ return [2 /*return*/, result.success ? result.data : result];
8785
+ }
8786
+ else {
8787
+ return [2 /*return*/, res.success ? res.data : res];
8788
+ }
8789
+ }
8790
+ });
8791
+ });
8792
+ }
8793
+
8765
8794
  exports.request = request;
8795
+ exports.userInputToJson = userInputToJson;
8766
8796
  //# sourceMappingURL=ywfe-tools.cjs.map