@fctc/interface-logic 3.4.3 → 3.4.4

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/hooks.d.mts CHANGED
@@ -171,6 +171,8 @@ declare const useUploadImage: () => _tanstack_react_query.UseMutationResult<any,
171
171
 
172
172
  declare const useUploadFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
173
173
  formData: any;
174
+ service?: string;
175
+ xNode?: string;
174
176
  }, unknown>;
175
177
 
176
178
  declare const useGetThreadData: ({ data, queryKey, enabled, service, xNode, }: {
package/dist/hooks.d.ts CHANGED
@@ -171,6 +171,8 @@ declare const useUploadImage: () => _tanstack_react_query.UseMutationResult<any,
171
171
 
172
172
  declare const useUploadFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
173
173
  formData: any;
174
+ service?: string;
175
+ xNode?: string;
174
176
  }, unknown>;
175
177
 
176
178
  declare const useGetThreadData: ({ data, queryKey, enabled, service, xNode, }: {
package/dist/hooks.js CHANGED
@@ -3871,8 +3871,22 @@ function useFormService() {
3871
3871
  [env]
3872
3872
  );
3873
3873
  const uploadFile = (0, import_react10.useCallback)(
3874
- async ({ formData }) => {
3875
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3874
+ async ({
3875
+ formData,
3876
+ service,
3877
+ xNode
3878
+ }) => {
3879
+ return env.requests.post(
3880
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
3881
+ formData,
3882
+ {
3883
+ headers: {
3884
+ "Content-Type": "application/json",
3885
+ ...xNode ? { "X-Node": xNode } : {}
3886
+ }
3887
+ },
3888
+ service
3889
+ );
3876
3890
  },
3877
3891
  [env]
3878
3892
  );
@@ -4752,12 +4766,12 @@ function useViewService() {
4752
4766
  path,
4753
4767
  scope
4754
4768
  }) => {
4755
- const params = Object.entries({
4756
- redirect_uri,
4757
- state,
4769
+ const params = new URLSearchParams({
4770
+ response_type,
4758
4771
  client_id,
4759
- response_type
4760
- }).map(([key, value]) => `${key}=${value}`).join("&");
4772
+ redirect_uri,
4773
+ state
4774
+ });
4761
4775
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4762
4776
  scope
4763
4777
  )}`;
@@ -6201,8 +6215,14 @@ var import_react_query34 = require("@tanstack/react-query");
6201
6215
  var useUploadFile = () => {
6202
6216
  const { uploadFile } = useFormService();
6203
6217
  return (0, import_react_query34.useMutation)({
6204
- mutationFn: ({ formData }) => uploadFile({
6205
- formData
6218
+ mutationFn: ({
6219
+ formData,
6220
+ service,
6221
+ xNode
6222
+ }) => uploadFile({
6223
+ formData,
6224
+ service,
6225
+ xNode
6206
6226
  })
6207
6227
  });
6208
6228
  };
package/dist/hooks.mjs CHANGED
@@ -3736,8 +3736,22 @@ function useFormService() {
3736
3736
  [env]
3737
3737
  );
3738
3738
  const uploadFile = useCallback6(
3739
- async ({ formData }) => {
3740
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3739
+ async ({
3740
+ formData,
3741
+ service,
3742
+ xNode
3743
+ }) => {
3744
+ return env.requests.post(
3745
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
3746
+ formData,
3747
+ {
3748
+ headers: {
3749
+ "Content-Type": "application/json",
3750
+ ...xNode ? { "X-Node": xNode } : {}
3751
+ }
3752
+ },
3753
+ service
3754
+ );
3741
3755
  },
3742
3756
  [env]
3743
3757
  );
@@ -4617,12 +4631,12 @@ function useViewService() {
4617
4631
  path,
4618
4632
  scope
4619
4633
  }) => {
4620
- const params = Object.entries({
4621
- redirect_uri,
4622
- state,
4634
+ const params = new URLSearchParams({
4635
+ response_type,
4623
4636
  client_id,
4624
- response_type
4625
- }).map(([key, value]) => `${key}=${value}`).join("&");
4637
+ redirect_uri,
4638
+ state
4639
+ });
4626
4640
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4627
4641
  scope
4628
4642
  )}`;
@@ -6066,8 +6080,14 @@ import { useMutation as useMutation27 } from "@tanstack/react-query";
6066
6080
  var useUploadFile = () => {
6067
6081
  const { uploadFile } = useFormService();
6068
6082
  return useMutation27({
6069
- mutationFn: ({ formData }) => uploadFile({
6070
- formData
6083
+ mutationFn: ({
6084
+ formData,
6085
+ service,
6086
+ xNode
6087
+ }) => uploadFile({
6088
+ formData,
6089
+ service,
6090
+ xNode
6071
6091
  })
6072
6092
  });
6073
6093
  };
package/dist/provider.js CHANGED
@@ -3865,8 +3865,22 @@ function useFormService() {
3865
3865
  [env]
3866
3866
  );
3867
3867
  const uploadFile = (0, import_react6.useCallback)(
3868
- async ({ formData }) => {
3869
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3868
+ async ({
3869
+ formData,
3870
+ service,
3871
+ xNode
3872
+ }) => {
3873
+ return env.requests.post(
3874
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
3875
+ formData,
3876
+ {
3877
+ headers: {
3878
+ "Content-Type": "application/json",
3879
+ ...xNode ? { "X-Node": xNode } : {}
3880
+ }
3881
+ },
3882
+ service
3883
+ );
3870
3884
  },
3871
3885
  [env]
3872
3886
  );
@@ -4746,12 +4760,12 @@ function useViewService() {
4746
4760
  path,
4747
4761
  scope
4748
4762
  }) => {
4749
- const params = Object.entries({
4750
- redirect_uri,
4751
- state,
4763
+ const params = new URLSearchParams({
4764
+ response_type,
4752
4765
  client_id,
4753
- response_type
4754
- }).map(([key, value]) => `${key}=${value}`).join("&");
4766
+ redirect_uri,
4767
+ state
4768
+ });
4755
4769
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4756
4770
  scope
4757
4771
  )}`;
@@ -6578,8 +6592,14 @@ var import_react_query34 = require("@tanstack/react-query");
6578
6592
  var useUploadFile = () => {
6579
6593
  const { uploadFile } = useFormService();
6580
6594
  return (0, import_react_query34.useMutation)({
6581
- mutationFn: ({ formData }) => uploadFile({
6582
- formData
6595
+ mutationFn: ({
6596
+ formData,
6597
+ service,
6598
+ xNode
6599
+ }) => uploadFile({
6600
+ formData,
6601
+ service,
6602
+ xNode
6583
6603
  })
6584
6604
  });
6585
6605
  };
package/dist/provider.mjs CHANGED
@@ -3822,8 +3822,22 @@ function useFormService() {
3822
3822
  [env]
3823
3823
  );
3824
3824
  const uploadFile = useCallback5(
3825
- async ({ formData }) => {
3826
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
3825
+ async ({
3826
+ formData,
3827
+ service,
3828
+ xNode
3829
+ }) => {
3830
+ return env.requests.post(
3831
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
3832
+ formData,
3833
+ {
3834
+ headers: {
3835
+ "Content-Type": "application/json",
3836
+ ...xNode ? { "X-Node": xNode } : {}
3837
+ }
3838
+ },
3839
+ service
3840
+ );
3827
3841
  },
3828
3842
  [env]
3829
3843
  );
@@ -4703,12 +4717,12 @@ function useViewService() {
4703
4717
  path,
4704
4718
  scope
4705
4719
  }) => {
4706
- const params = Object.entries({
4707
- redirect_uri,
4708
- state,
4720
+ const params = new URLSearchParams({
4721
+ response_type,
4709
4722
  client_id,
4710
- response_type
4711
- }).map(([key, value]) => `${key}=${value}`).join("&");
4723
+ redirect_uri,
4724
+ state
4725
+ });
4712
4726
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4713
4727
  scope
4714
4728
  )}`;
@@ -6535,8 +6549,14 @@ import { useMutation as useMutation27 } from "@tanstack/react-query";
6535
6549
  var useUploadFile = () => {
6536
6550
  const { uploadFile } = useFormService();
6537
6551
  return useMutation27({
6538
- mutationFn: ({ formData }) => uploadFile({
6539
- formData
6552
+ mutationFn: ({
6553
+ formData,
6554
+ service,
6555
+ xNode
6556
+ }) => uploadFile({
6557
+ formData,
6558
+ service,
6559
+ xNode
6540
6560
  })
6541
6561
  });
6542
6562
  };
@@ -178,8 +178,10 @@ declare function useFormService(): {
178
178
  data: TFormView;
179
179
  }) => Promise<any>;
180
180
  changeStatus: ({ data }: any) => Promise<any>;
181
- uploadFile: ({ formData }: {
181
+ uploadFile: ({ formData, service, xNode, }: {
182
182
  formData: any;
183
+ service?: string;
184
+ xNode?: string;
183
185
  }) => Promise<any>;
184
186
  getThreadMessages: ({ data, xNode, service, }: {
185
187
  data: TThreadData;
@@ -178,8 +178,10 @@ declare function useFormService(): {
178
178
  data: TFormView;
179
179
  }) => Promise<any>;
180
180
  changeStatus: ({ data }: any) => Promise<any>;
181
- uploadFile: ({ formData }: {
181
+ uploadFile: ({ formData, service, xNode, }: {
182
182
  formData: any;
183
+ service?: string;
184
+ xNode?: string;
183
185
  }) => Promise<any>;
184
186
  getThreadMessages: ({ data, xNode, service, }: {
185
187
  data: TThreadData;
package/dist/services.js CHANGED
@@ -4051,8 +4051,22 @@ function useFormService() {
4051
4051
  [env]
4052
4052
  );
4053
4053
  const uploadFile = (0, import_react10.useCallback)(
4054
- async ({ formData }) => {
4055
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
4054
+ async ({
4055
+ formData,
4056
+ service,
4057
+ xNode
4058
+ }) => {
4059
+ return env.requests.post(
4060
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
4061
+ formData,
4062
+ {
4063
+ headers: {
4064
+ "Content-Type": "application/json",
4065
+ ...xNode ? { "X-Node": xNode } : {}
4066
+ }
4067
+ },
4068
+ service
4069
+ );
4056
4070
  },
4057
4071
  [env]
4058
4072
  );
@@ -4932,12 +4946,12 @@ function useViewService() {
4932
4946
  path,
4933
4947
  scope
4934
4948
  }) => {
4935
- const params = Object.entries({
4936
- redirect_uri,
4937
- state,
4949
+ const params = new URLSearchParams({
4950
+ response_type,
4938
4951
  client_id,
4939
- response_type
4940
- }).map(([key, value]) => `${key}=${value}`).join("&");
4952
+ redirect_uri,
4953
+ state
4954
+ });
4941
4955
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4942
4956
  scope
4943
4957
  )}`;
package/dist/services.mjs CHANGED
@@ -4007,8 +4007,22 @@ function useFormService() {
4007
4007
  [env]
4008
4008
  );
4009
4009
  const uploadFile = useCallback6(
4010
- async ({ formData }) => {
4011
- return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
4010
+ async ({
4011
+ formData,
4012
+ service,
4013
+ xNode
4014
+ }) => {
4015
+ return env.requests.post(
4016
+ "/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */,
4017
+ formData,
4018
+ {
4019
+ headers: {
4020
+ "Content-Type": "application/json",
4021
+ ...xNode ? { "X-Node": xNode } : {}
4022
+ }
4023
+ },
4024
+ service
4025
+ );
4012
4026
  },
4013
4027
  [env]
4014
4028
  );
@@ -4888,12 +4902,12 @@ function useViewService() {
4888
4902
  path,
4889
4903
  scope
4890
4904
  }) => {
4891
- const params = Object.entries({
4892
- redirect_uri,
4893
- state,
4905
+ const params = new URLSearchParams({
4906
+ response_type,
4894
4907
  client_id,
4895
- response_type
4896
- }).map(([key, value]) => `${key}=${value}`).join("&");
4908
+ redirect_uri,
4909
+ state
4910
+ });
4897
4911
  const queryString = `${params.toString()}&scope=${encodeURIComponent(
4898
4912
  scope
4899
4913
  )}`;
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "3.4.3",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./configs": {
14
- "types": "./dist/configs.d.ts",
15
- "import": "./dist/configs.mjs",
16
- "require": "./dist/configs.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hooks": {
29
- "types": "./dist/hooks.d.ts",
30
- "import": "./dist/hooks.mjs",
31
- "require": "./dist/hooks.cjs"
32
- },
33
- "./provider": {
34
- "types": "./dist/provider.d.ts",
35
- "import": "./dist/provider.mjs",
36
- "require": "./dist/provider.cjs"
37
- },
38
- "./services": {
39
- "types": "./dist/services.d.ts",
40
- "import": "./dist/services.mjs",
41
- "require": "./dist/services.cjs"
42
- },
43
- "./store": {
44
- "types": "./dist/store.d.ts",
45
- "import": "./dist/store.mjs",
46
- "require": "./dist/store.cjs"
47
- },
48
- "./utils": {
49
- "types": "./dist/utils.d.ts",
50
- "import": "./dist/utils.mjs",
51
- "require": "./dist/utils.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- },
58
- "./models": {
59
- "types": "./dist/models.d.ts",
60
- "import": "./dist/models.mjs",
61
- "require": "./dist/models.cjs"
62
- }
63
- },
64
- "files": [
65
- "dist"
66
- ],
67
- "scripts": {
68
- "build": "tsup",
69
- "test": "jest"
70
- },
71
- "peerDependencies": {
72
- "react": "18.0.0",
73
- "@tanstack/react-query": "^5.83.0"
74
- },
75
- "dependencies": {
76
- "@reduxjs/toolkit": "^2.8.2",
77
- "@tanstack/react-query": "^5.83.0",
78
- "axios": "^1.11.0",
79
- "moment": "^2.30.1",
80
- "react-redux": "^9.2.0"
81
- },
82
- "devDependencies": {
83
- "@types/react": "^18.3.1",
84
- "react": "18.0.0",
85
- "jest": "^29.7.0",
86
- "tsup": "^8.0.0",
87
- "typescript": "^5.8.2"
88
- },
89
- "packageManager": "yarn@1.22.0"
90
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "3.4.4",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ },
58
+ "./models": {
59
+ "types": "./dist/models.d.ts",
60
+ "import": "./dist/models.mjs",
61
+ "require": "./dist/models.cjs"
62
+ }
63
+ },
64
+ "files": [
65
+ "dist"
66
+ ],
67
+ "scripts": {
68
+ "build": "tsup",
69
+ "test": "jest"
70
+ },
71
+ "peerDependencies": {
72
+ "react": "18.0.0",
73
+ "@tanstack/react-query": "^5.83.0"
74
+ },
75
+ "dependencies": {
76
+ "@reduxjs/toolkit": "^2.8.2",
77
+ "@tanstack/react-query": "^5.83.0",
78
+ "axios": "^1.11.0",
79
+ "moment": "^2.30.1",
80
+ "react-redux": "^9.2.0"
81
+ },
82
+ "devDependencies": {
83
+ "@types/react": "^18.3.1",
84
+ "react": "18.0.0",
85
+ "jest": "^29.7.0",
86
+ "tsup": "^8.0.0",
87
+ "typescript": "^5.8.2"
88
+ },
89
+ "packageManager": "yarn@1.22.0"
90
+ }