@fctc/interface-logic 2.0.5 → 2.0.7

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/provider.mjs CHANGED
@@ -2848,15 +2848,21 @@ function useActionService() {
2848
2848
  const loadAction = useCallback(
2849
2849
  async ({
2850
2850
  idAction,
2851
- context
2851
+ context,
2852
+ service
2852
2853
  }) => {
2853
2854
  const jsonData = {
2854
2855
  action_id: idAction,
2855
2856
  with_context: { ...context }
2856
2857
  };
2857
- return env.requests.post("/load_action" /* LOAD_ACTION */, jsonData, {
2858
- headers: { "Content-Type": "application/json" }
2859
- });
2858
+ return env.requests.post(
2859
+ "/load_action" /* LOAD_ACTION */,
2860
+ jsonData,
2861
+ {
2862
+ headers: { "Content-Type": "application/json" }
2863
+ },
2864
+ service
2865
+ );
2860
2866
  },
2861
2867
  [env]
2862
2868
  );
@@ -2865,7 +2871,8 @@ function useActionService() {
2865
2871
  model,
2866
2872
  ids = [],
2867
2873
  context,
2868
- method
2874
+ method,
2875
+ service
2869
2876
  }) => {
2870
2877
  try {
2871
2878
  const jsonData = {
@@ -2874,9 +2881,14 @@ function useActionService() {
2874
2881
  ids,
2875
2882
  with_context: context
2876
2883
  };
2877
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2878
- headers: { "Content-Type": "application/json" }
2879
- });
2884
+ return env.requests.post(
2885
+ "/call" /* CALL_PATH */,
2886
+ jsonData,
2887
+ {
2888
+ headers: { "Content-Type": "application/json" }
2889
+ },
2890
+ service
2891
+ );
2880
2892
  } catch (error) {
2881
2893
  console.error("Error when calling button action:", error);
2882
2894
  throw error;
@@ -2888,7 +2900,8 @@ function useActionService() {
2888
2900
  async ({
2889
2901
  model,
2890
2902
  ids,
2891
- context
2903
+ context,
2904
+ service
2892
2905
  }) => {
2893
2906
  const jsonData = {
2894
2907
  model,
@@ -2896,9 +2909,14 @@ function useActionService() {
2896
2909
  ids,
2897
2910
  with_context: context
2898
2911
  };
2899
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2900
- headers: { "Content-Type": "application/json" }
2901
- });
2912
+ return env.requests.post(
2913
+ "/call" /* CALL_PATH */,
2914
+ jsonData,
2915
+ {
2916
+ headers: { "Content-Type": "application/json" }
2917
+ },
2918
+ service
2919
+ );
2902
2920
  },
2903
2921
  [env]
2904
2922
  );
@@ -2906,7 +2924,8 @@ function useActionService() {
2906
2924
  async ({
2907
2925
  model,
2908
2926
  id,
2909
- context
2927
+ context,
2928
+ service
2910
2929
  }) => {
2911
2930
  const jsonData = {
2912
2931
  model,
@@ -2914,9 +2933,14 @@ function useActionService() {
2914
2933
  ids: id,
2915
2934
  with_context: context
2916
2935
  };
2917
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
2918
- headers: { "Content-Type": "application/json" }
2919
- });
2936
+ return env.requests.post(
2937
+ "/call" /* CALL_PATH */,
2938
+ jsonData,
2939
+ {
2940
+ headers: { "Content-Type": "application/json" }
2941
+ },
2942
+ service
2943
+ );
2920
2944
  },
2921
2945
  [env]
2922
2946
  );
@@ -2959,15 +2983,21 @@ function useActionService() {
2959
2983
  const runAction = useCallback(
2960
2984
  async ({
2961
2985
  idAction,
2962
- context
2986
+ context,
2987
+ service
2963
2988
  }) => {
2964
2989
  const jsonData = {
2965
2990
  action_id: idAction,
2966
2991
  with_context: { ...context }
2967
2992
  };
2968
- return env.requests.post("/run_action" /* RUN_ACTION_PATH */, jsonData, {
2969
- headers: { "Content-Type": "application/json" }
2970
- });
2993
+ return env.requests.post(
2994
+ "/run_action" /* RUN_ACTION_PATH */,
2995
+ jsonData,
2996
+ {
2997
+ headers: { "Content-Type": "application/json" }
2998
+ },
2999
+ service
3000
+ );
2971
3001
  },
2972
3002
  [env]
2973
3003
  );
@@ -3682,7 +3712,7 @@ function useModelService() {
3682
3712
  });
3683
3713
  }, [env]);
3684
3714
  const getAll = useCallback7(
3685
- async ({ data }) => {
3715
+ async ({ data, service }) => {
3686
3716
  const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
3687
3717
  fields: data.fields,
3688
3718
  groupby: data.groupby
@@ -3703,11 +3733,16 @@ function useModelService() {
3703
3733
  ...jsonReadGroup
3704
3734
  }
3705
3735
  };
3706
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3707
- headers: {
3708
- "Content-Type": "application/json"
3709
- }
3710
- });
3736
+ return env.requests.post(
3737
+ "/call" /* CALL_PATH */,
3738
+ jsonData,
3739
+ {
3740
+ headers: {
3741
+ "Content-Type": "application/json"
3742
+ }
3743
+ },
3744
+ service
3745
+ );
3711
3746
  },
3712
3747
  [env]
3713
3748
  );
@@ -3775,7 +3810,13 @@ function useModelService() {
3775
3810
  [env]
3776
3811
  );
3777
3812
  const getDetail = useCallback7(
3778
- async ({ ids = [], model, specification, context }) => {
3813
+ async ({
3814
+ ids = [],
3815
+ model,
3816
+ specification,
3817
+ context,
3818
+ service
3819
+ }) => {
3779
3820
  const jsonData = {
3780
3821
  model,
3781
3822
  method: "web_read" /* WEB_READ */,
@@ -3785,11 +3826,16 @@ function useModelService() {
3785
3826
  specification
3786
3827
  }
3787
3828
  };
3788
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3789
- headers: {
3790
- "Content-Type": "application/json"
3791
- }
3792
- });
3829
+ return env.requests.post(
3830
+ "/call" /* CALL_PATH */,
3831
+ jsonData,
3832
+ {
3833
+ headers: {
3834
+ "Content-Type": "application/json"
3835
+ }
3836
+ },
3837
+ service
3838
+ );
3793
3839
  },
3794
3840
  [env]
3795
3841
  );
@@ -3800,7 +3846,8 @@ function useModelService() {
3800
3846
  data = {},
3801
3847
  specification = {},
3802
3848
  context = {},
3803
- path
3849
+ path,
3850
+ service
3804
3851
  }) => {
3805
3852
  const jsonData = {
3806
3853
  model,
@@ -3812,26 +3859,36 @@ function useModelService() {
3812
3859
  specification
3813
3860
  }
3814
3861
  };
3815
- return env.requests.post(path ?? "/call" /* CALL_PATH */, jsonData, {
3816
- headers: {
3817
- "Content-Type": "application/json"
3818
- }
3819
- });
3862
+ return env.requests.post(
3863
+ path ?? "/call" /* CALL_PATH */,
3864
+ jsonData,
3865
+ {
3866
+ headers: {
3867
+ "Content-Type": "application/json"
3868
+ }
3869
+ },
3870
+ service
3871
+ );
3820
3872
  },
3821
3873
  [env]
3822
3874
  );
3823
3875
  const deleteApi = useCallback7(
3824
- async ({ ids = [], model }) => {
3876
+ async ({ ids = [], model, service }) => {
3825
3877
  const jsonData = {
3826
3878
  model,
3827
3879
  method: "unlink" /* UNLINK */,
3828
3880
  ids
3829
3881
  };
3830
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3831
- headers: {
3832
- "Content-Type": "application/json"
3833
- }
3834
- });
3882
+ return env.requests.post(
3883
+ "/call" /* CALL_PATH */,
3884
+ jsonData,
3885
+ {
3886
+ headers: {
3887
+ "Content-Type": "application/json"
3888
+ }
3889
+ },
3890
+ service
3891
+ );
3835
3892
  },
3836
3893
  [env]
3837
3894
  );
@@ -3842,7 +3899,8 @@ function useModelService() {
3842
3899
  object,
3843
3900
  specification,
3844
3901
  context,
3845
- fieldChange
3902
+ fieldChange,
3903
+ service
3846
3904
  }) => {
3847
3905
  const jsonData = {
3848
3906
  model,
@@ -3855,11 +3913,16 @@ function useModelService() {
3855
3913
  specification
3856
3914
  ]
3857
3915
  };
3858
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3859
- headers: {
3860
- "Content-Type": "application/json"
3861
- }
3862
- });
3916
+ return env.requests.post(
3917
+ "/call" /* CALL_PATH */,
3918
+ jsonData,
3919
+ {
3920
+ headers: {
3921
+ "Content-Type": "application/json"
3922
+ }
3923
+ },
3924
+ service
3925
+ );
3863
3926
  },
3864
3927
  [env]
3865
3928
  );
@@ -4033,7 +4096,8 @@ function useViewService() {
4033
4096
  views,
4034
4097
  context = {},
4035
4098
  options = {},
4036
- aid
4099
+ aid,
4100
+ service
4037
4101
  }) => {
4038
4102
  const defaultOptions = {
4039
4103
  load_filters: true,
@@ -4049,11 +4113,16 @@ function useViewService() {
4049
4113
  },
4050
4114
  with_context: context
4051
4115
  };
4052
- return env?.requests?.post("/call" /* CALL_PATH */, jsonDataView, {
4053
- headers: {
4054
- "Content-Type": "application/json"
4055
- }
4056
- });
4116
+ return env?.requests?.post(
4117
+ "/call" /* CALL_PATH */,
4118
+ jsonDataView,
4119
+ {
4120
+ headers: {
4121
+ "Content-Type": "application/json"
4122
+ }
4123
+ },
4124
+ service
4125
+ );
4057
4126
  },
4058
4127
  [env]
4059
4128
  );
@@ -4136,7 +4205,7 @@ function useViewService() {
4136
4205
  [env]
4137
4206
  );
4138
4207
  const getSelectionItem = useCallback9(
4139
- async ({ data }) => {
4208
+ async ({ data, service }) => {
4140
4209
  const jsonData = {
4141
4210
  model: data.model,
4142
4211
  ids: [],
@@ -4154,11 +4223,16 @@ function useViewService() {
4154
4223
  }
4155
4224
  }
4156
4225
  };
4157
- return env?.requests.post("/call" /* CALL_PATH */, jsonData, {
4158
- headers: {
4159
- "Content-Type": "application/json"
4160
- }
4161
- });
4226
+ return env?.requests.post(
4227
+ "/call" /* CALL_PATH */,
4228
+ jsonData,
4229
+ {
4230
+ headers: {
4231
+ "Content-Type": "application/json"
4232
+ }
4233
+ },
4234
+ service
4235
+ );
4162
4236
  },
4163
4237
  [env]
4164
4238
  );
@@ -4451,7 +4525,6 @@ var sessionStorageUtils = () => {
4451
4525
  // src/configs/axios-client.ts
4452
4526
  var axiosClient = {
4453
4527
  init(config) {
4454
- console.log("config", config);
4455
4528
  const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
4456
4529
  const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
4457
4530
  const db = config?.db;
@@ -4470,7 +4543,7 @@ var axiosClient = {
4470
4543
  };
4471
4544
  const instance = axios.create({
4472
4545
  adapter: axios.defaults.adapter,
4473
- baseURL: config.baseUrl,
4546
+ baseURL: config?.baseUrl,
4474
4547
  timeout: 5e4,
4475
4548
  paramsSerializer: (params) => new URLSearchParams(params).toString()
4476
4549
  });
@@ -4482,7 +4555,6 @@ var axiosClient = {
4482
4555
  if (database) {
4483
4556
  config2.headers["DATABASE"] = database;
4484
4557
  }
4485
- console.log("database", database);
4486
4558
  const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
4487
4559
  const token = await getToken?.();
4488
4560
  if (token) config2.headers["Authorization"] = `Bearer ${token}`;
@@ -4540,7 +4612,7 @@ var axiosClient = {
4540
4612
  );
4541
4613
  return new Promise(function(resolve) {
4542
4614
  axios.post(
4543
- `${config.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
4615
+ `${config?.baseUrl}${config.refreshTokenEndpoint ?? "/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
4544
4616
  payload,
4545
4617
  {
4546
4618
  headers: {
@@ -4608,20 +4680,47 @@ var axiosClient = {
4608
4680
  function formatUrl(url, db2) {
4609
4681
  return url + (db2 ? "?db=" + db2 : "");
4610
4682
  }
4683
+ const getBaseUrl = (baseUrl, serviceName) => {
4684
+ const service = serviceName || config?.default_service;
4685
+ return `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
4686
+ };
4611
4687
  const responseBody = (response) => response;
4612
4688
  const requests = {
4613
- get: (url, headers) => instance.get(formatUrl(url, db), headers).then(responseBody),
4614
- post: (url, body, headers) => instance.post(formatUrl(url, db), body, headers).then(responseBody),
4615
- post_excel: (url, body, headers) => instance.post(formatUrl(url, db), body, {
4616
- responseType: "arraybuffer",
4617
- headers: {
4618
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
4619
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
4689
+ get: (url, headers, serviceName) => instance.get(
4690
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4691
+ headers
4692
+ ).then(responseBody),
4693
+ post: (url, body, headers, serviceName) => instance.post(
4694
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4695
+ body,
4696
+ headers
4697
+ ).then(responseBody),
4698
+ post_excel: (url, body, headers, serviceName) => instance.post(
4699
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4700
+ body,
4701
+ {
4702
+ responseType: "arraybuffer",
4703
+ headers: {
4704
+ "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
4705
+ Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
4706
+ ...headers
4707
+ }
4620
4708
  }
4621
- }).then(responseBody),
4622
- put: (url, body, headers) => instance.put(formatUrl(url, db), body, headers).then(responseBody),
4623
- patch: (url, body) => instance.patch(formatUrl(url, db), body).then(responseBody),
4624
- delete: (url, body) => instance.delete(formatUrl(url, db), body).then(responseBody)
4709
+ ).then(responseBody),
4710
+ put: (url, body, headers, serviceName) => instance.put(
4711
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4712
+ body,
4713
+ headers
4714
+ ).then(responseBody),
4715
+ patch: (url, body, headers, serviceName) => instance.patch(
4716
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4717
+ body,
4718
+ headers
4719
+ ).then(responseBody),
4720
+ delete: (url, headers, serviceName) => instance.delete(
4721
+ formatUrl(getBaseUrl(config?.baseUrl, serviceName) + url, db),
4722
+ headers
4723
+ ).then(responseBody)
4625
4724
  };
4626
4725
  return requests;
4627
4726
  }
@@ -5217,7 +5316,7 @@ import { useMutation as useMutation25 } from "@tanstack/react-query";
5217
5316
  var useDelete = () => {
5218
5317
  const { deleteApi } = useModelService();
5219
5318
  return useMutation25({
5220
- mutationFn: ({ ids, model }) => deleteApi({ ids, model })
5319
+ mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
5221
5320
  });
5222
5321
  };
5223
5322
  var use_delete_default = useDelete;
@@ -5280,12 +5379,14 @@ var useGetDetail = () => {
5280
5379
  model,
5281
5380
  ids,
5282
5381
  specification,
5283
- context
5382
+ context,
5383
+ service
5284
5384
  }) => getDetail({
5285
5385
  model,
5286
5386
  ids,
5287
5387
  specification,
5288
- context
5388
+ context,
5389
+ service
5289
5390
  })
5290
5391
  });
5291
5392
  };
@@ -5481,14 +5582,16 @@ var useOnChangeForm = () => {
5481
5582
  specification,
5482
5583
  context,
5483
5584
  object,
5484
- fieldChange
5585
+ fieldChange,
5586
+ service
5485
5587
  }) => onChange({
5486
5588
  ids,
5487
5589
  model,
5488
5590
  specification,
5489
5591
  context,
5490
5592
  object,
5491
- fieldChange
5593
+ fieldChange,
5594
+ service
5492
5595
  })
5493
5596
  });
5494
5597
  };
@@ -5505,8 +5608,9 @@ var useSave = () => {
5505
5608
  data,
5506
5609
  specification,
5507
5610
  context,
5508
- path
5509
- }) => save({ ids, model, data, specification, context, path })
5611
+ path,
5612
+ service
5613
+ }) => save({ ids, model, data, specification, context, path, service })
5510
5614
  });
5511
5615
  };
5512
5616
  var use_save_default = useSave;
@@ -5558,12 +5662,14 @@ var useButton = () => {
5558
5662
  model,
5559
5663
  ids,
5560
5664
  context,
5561
- method
5665
+ method,
5666
+ service
5562
5667
  }) => callButton({
5563
5668
  model,
5564
5669
  ids,
5565
5670
  context,
5566
- method
5671
+ method,
5672
+ service
5567
5673
  }),
5568
5674
  onSuccess: (response) => {
5569
5675
  return response;
@@ -5580,11 +5686,13 @@ var useDuplicateRecord = () => {
5580
5686
  mutationFn: ({
5581
5687
  id,
5582
5688
  model,
5583
- context
5689
+ context,
5690
+ service
5584
5691
  }) => duplicateRecord({
5585
5692
  id,
5586
5693
  model,
5587
- context
5694
+ context,
5695
+ service
5588
5696
  })
5589
5697
  });
5590
5698
  };
@@ -5667,11 +5775,11 @@ var use_get_groups_default = useGetGroups;
5667
5775
 
5668
5776
  // src/hooks/view/use-get-list-data.ts
5669
5777
  import { useQuery as useQuery14 } from "@tanstack/react-query";
5670
- var useGetListData = (listDataProps, queryKey, enabled) => {
5778
+ var useGetListData = (listDataProps, queryKey, enabled, service) => {
5671
5779
  const { getAll } = useModelService();
5672
5780
  return useQuery14({
5673
5781
  queryKey,
5674
- queryFn: () => getAll({ data: listDataProps }).then((res) => {
5782
+ queryFn: () => getAll({ data: listDataProps, service }).then((res) => {
5675
5783
  if (res) {
5676
5784
  return res;
5677
5785
  }
@@ -5747,12 +5855,13 @@ import { useQuery as useQuery17 } from "@tanstack/react-query";
5747
5855
  var useGetSelection = ({
5748
5856
  data,
5749
5857
  queryKey,
5750
- enabled
5858
+ enabled,
5859
+ service
5751
5860
  }) => {
5752
5861
  const { getSelectionItem } = useViewService();
5753
5862
  return useQuery17({
5754
5863
  queryKey,
5755
- queryFn: () => getSelectionItem({ data }),
5864
+ queryFn: () => getSelectionItem({ data, service }),
5756
5865
  enabled,
5757
5866
  refetchOnWindowFocus: false
5758
5867
  });
@@ -5780,11 +5889,13 @@ var useLoadAction = () => {
5780
5889
  return useMutation35({
5781
5890
  mutationFn: ({
5782
5891
  idAction,
5783
- context
5892
+ context,
5893
+ service
5784
5894
  }) => {
5785
5895
  return loadAction({
5786
5896
  idAction,
5787
- context
5897
+ context,
5898
+ service
5788
5899
  });
5789
5900
  }
5790
5901
  });
@@ -5825,11 +5936,13 @@ var useRemoveRow = () => {
5825
5936
  mutationFn: ({
5826
5937
  model,
5827
5938
  ids,
5828
- context
5939
+ context,
5940
+ service
5829
5941
  }) => removeRows({
5830
5942
  model,
5831
5943
  ids,
5832
- context
5944
+ context,
5945
+ service
5833
5946
  })
5834
5947
  });
5835
5948
  };
@@ -5860,10 +5973,12 @@ var useRunAction = () => {
5860
5973
  return useMutation38({
5861
5974
  mutationFn: ({
5862
5975
  idAction,
5863
- context
5976
+ context,
5977
+ service
5864
5978
  }) => runAction({
5865
5979
  idAction,
5866
- context
5980
+ context,
5981
+ service
5867
5982
  })
5868
5983
  });
5869
5984
  };
@@ -1,25 +1,29 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.mjs';
1
+ import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-p4JdAOsz.mjs';
2
2
 
3
3
  declare function useActionService(): {
4
- loadAction: ({ idAction, context, }: {
4
+ loadAction: ({ idAction, context, service, }: {
5
5
  idAction: number;
6
6
  context: ContextApi;
7
+ service?: string;
7
8
  }) => Promise<any>;
8
- callButton: ({ model, ids, context, method, }: {
9
+ callButton: ({ model, ids, context, method, service, }: {
9
10
  model: string;
10
11
  ids: Record<string, any>[] | any;
11
12
  context: ContextApi;
12
13
  method: any;
14
+ service?: string;
13
15
  }) => Promise<any>;
14
- removeRows: ({ model, ids, context, }: {
16
+ removeRows: ({ model, ids, context, service, }: {
15
17
  model: string;
16
18
  ids: Record<string, any>[] | any;
17
19
  context: ContextApi;
20
+ service?: string;
18
21
  }) => Promise<any>;
19
- duplicateRecord: ({ model, id, context, }: {
22
+ duplicateRecord: ({ model, id, context, service, }: {
20
23
  model: string;
21
24
  id: any;
22
25
  context: ContextApi;
26
+ service?: string;
23
27
  }) => Promise<any>;
24
28
  getPrintReportName: ({ id }: {
25
29
  id: number;
@@ -29,9 +33,10 @@ declare function useActionService(): {
29
33
  report: any;
30
34
  db: any;
31
35
  }) => Promise<any>;
32
- runAction: ({ idAction, context, }: {
36
+ runAction: ({ idAction, context, service, }: {
33
37
  idAction: number;
34
38
  context: ContextApi;
39
+ service?: string;
35
40
  }) => Promise<any>;
36
41
  };
37
42
 
@@ -163,17 +168,18 @@ declare function useModelService(): {
163
168
  }) => Promise<any>;
164
169
  getCurrency: () => Promise<any>;
165
170
  getConversionRate: () => Promise<any>;
166
- getAll: ({ data }: {
171
+ getAll: ({ data, service }: {
167
172
  data: any;
173
+ service?: string;
168
174
  }) => Promise<any>;
169
175
  getListCalendar: ({ data }: {
170
176
  data: any;
171
177
  }) => Promise<any>;
172
178
  getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
173
- getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
174
- save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
175
- deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
176
- onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
179
+ getDetail: ({ ids, model, specification, context, service, }: GetDetailParams) => Promise<any>;
180
+ save: ({ model, ids, data, specification, context, path, service, }: SaveParams) => Promise<any>;
181
+ deleteApi: ({ ids, model, service }: DeleteParams) => Promise<any>;
182
+ onChange: ({ ids, model, object, specification, context, fieldChange, service, }: OnChangeParams) => Promise<any>;
177
183
  getListFieldsOnchange: ({ model }: {
178
184
  model: string;
179
185
  }) => Promise<any>;
@@ -195,7 +201,7 @@ declare function useUserService(): {
195
201
  };
196
202
 
197
203
  declare function useViewService(): {
198
- getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
204
+ getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
199
205
  getMenu: (context: any, specification: any) => Promise<any>;
200
206
  getActionDetail: (aid: number, context: any) => Promise<any>;
201
207
  getResequence: ({ model, ids, context, offset, }: {
@@ -204,8 +210,9 @@ declare function useViewService(): {
204
210
  context: any;
205
211
  offset: any;
206
212
  }) => Promise<any>;
207
- getSelectionItem: ({ data }: {
213
+ getSelectionItem: ({ data, service }: {
208
214
  data: GetSelectionType;
215
+ service?: string;
209
216
  }) => Promise<any>;
210
217
  loadMessages: () => Promise<any>;
211
218
  getVersion: () => Promise<any>;