@fctc/interface-logic 4.2.2 → 4.2.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/provider.mjs CHANGED
@@ -5793,6 +5793,112 @@ function useViewService() {
5793
5793
  },
5794
5794
  [env]
5795
5795
  );
5796
+ const getCountry = useCallback9(
5797
+ async ({
5798
+ service,
5799
+ xNode,
5800
+ ids,
5801
+ kwargs
5802
+ }) => {
5803
+ const body = {
5804
+ model: "res.country" /* COUNTRY */,
5805
+ ids,
5806
+ method: "get_data_select" /* GET_DATA_SELECT */,
5807
+ kwargs
5808
+ };
5809
+ return env?.requests?.post(
5810
+ "/call" /* CALL_PATH */,
5811
+ body,
5812
+ {
5813
+ headers: {
5814
+ "Content-Type": "application/json",
5815
+ ...xNode ? { "X-Node": xNode } : {}
5816
+ }
5817
+ },
5818
+ service
5819
+ );
5820
+ },
5821
+ [env]
5822
+ );
5823
+ const getCity = useCallback9(
5824
+ async ({
5825
+ service,
5826
+ xNode,
5827
+ ids,
5828
+ kwargs
5829
+ }) => {
5830
+ const body = {
5831
+ model: "res.country.state" /* COUNTRY_STATE */,
5832
+ ids,
5833
+ method: "get_data_select" /* GET_DATA_SELECT */,
5834
+ kwargs
5835
+ };
5836
+ return env?.requests?.post(
5837
+ "/call" /* CALL_PATH */,
5838
+ body,
5839
+ {
5840
+ headers: {
5841
+ "Content-Type": "application/json",
5842
+ ...xNode ? { "X-Node": xNode } : {}
5843
+ }
5844
+ },
5845
+ service
5846
+ );
5847
+ },
5848
+ [env]
5849
+ );
5850
+ const getWard = useCallback9(
5851
+ async ({
5852
+ service,
5853
+ xNode,
5854
+ kwargs
5855
+ }) => {
5856
+ const body = {
5857
+ model: "res.country.ward" /* COUNTRY_WARD */,
5858
+ method: "get_data_select" /* GET_DATA_SELECT */,
5859
+ kwargs
5860
+ };
5861
+ return env?.requests?.post(
5862
+ "/call" /* CALL_PATH */,
5863
+ body,
5864
+ {
5865
+ headers: {
5866
+ "Content-Type": "application/json",
5867
+ ...xNode ? { "X-Node": xNode } : {}
5868
+ }
5869
+ },
5870
+ service
5871
+ );
5872
+ },
5873
+ [env]
5874
+ );
5875
+ const getPartnerTitle = useCallback9(
5876
+ async ({
5877
+ service,
5878
+ xNode,
5879
+ kwargs,
5880
+ withContext
5881
+ }) => {
5882
+ const body = {
5883
+ model: "res.partner.title" /* RES_PARTNER_TITLE */,
5884
+ method: "get_data_select" /* GET_DATA_SELECT */,
5885
+ kwargs,
5886
+ with_context: withContext
5887
+ };
5888
+ return env?.requests?.post(
5889
+ "/call" /* CALL_PATH */,
5890
+ body,
5891
+ {
5892
+ headers: {
5893
+ "Content-Type": "application/json",
5894
+ ...xNode ? { "X-Node": xNode } : {}
5895
+ }
5896
+ },
5897
+ service
5898
+ );
5899
+ },
5900
+ [env]
5901
+ );
5796
5902
  return {
5797
5903
  getView,
5798
5904
  getMenu,
@@ -5838,7 +5944,11 @@ function useViewService() {
5838
5944
  getPinCode,
5839
5945
  getNotifications,
5840
5946
  createEInvoice,
5841
- getCurrentUser
5947
+ getCurrentUser,
5948
+ getCountry,
5949
+ getCity,
5950
+ getWard,
5951
+ getPartnerTitle
5842
5952
  };
5843
5953
  }
5844
5954
 
@@ -8649,6 +8759,92 @@ var useGetCurrentUser = () => {
8649
8759
  };
8650
8760
  var use_get_current_user_default = useGetCurrentUser;
8651
8761
 
8762
+ // src/hooks/view/use-get-ward.ts
8763
+ import { useMutation as useMutation82 } from "@tanstack/react-query";
8764
+ var useGetWard = () => {
8765
+ const { getWard } = useViewService();
8766
+ return useMutation82({
8767
+ mutationFn: ({
8768
+ service,
8769
+ xNode,
8770
+ kwargs
8771
+ }) => {
8772
+ return getWard({
8773
+ service,
8774
+ xNode,
8775
+ kwargs
8776
+ });
8777
+ }
8778
+ });
8779
+ };
8780
+ var use_get_ward_default = useGetWard;
8781
+
8782
+ // src/hooks/view/use-get-city.ts
8783
+ import { useMutation as useMutation83 } from "@tanstack/react-query";
8784
+ var useGetCity = () => {
8785
+ const { getCity } = useViewService();
8786
+ return useMutation83({
8787
+ mutationFn: ({
8788
+ service,
8789
+ xNode,
8790
+ ids,
8791
+ kwargs
8792
+ }) => {
8793
+ return getCity({
8794
+ service,
8795
+ xNode,
8796
+ ids,
8797
+ kwargs
8798
+ });
8799
+ }
8800
+ });
8801
+ };
8802
+ var use_get_city_default = useGetCity;
8803
+
8804
+ // src/hooks/view/use-get-country.ts
8805
+ import { useMutation as useMutation84 } from "@tanstack/react-query";
8806
+ var useGetCountry = () => {
8807
+ const { getCountry } = useViewService();
8808
+ return useMutation84({
8809
+ mutationFn: ({
8810
+ service,
8811
+ xNode,
8812
+ ids,
8813
+ kwargs
8814
+ }) => {
8815
+ return getCountry({
8816
+ service,
8817
+ xNode,
8818
+ ids,
8819
+ kwargs
8820
+ });
8821
+ }
8822
+ });
8823
+ };
8824
+ var use_get_country_default = useGetCountry;
8825
+
8826
+ // src/hooks/view/use-get-partner-title.ts
8827
+ import { useMutation as useMutation85 } from "@tanstack/react-query";
8828
+ var useGetPartnerTitle = () => {
8829
+ const { getPartnerTitle } = useViewService();
8830
+ return useMutation85({
8831
+ mutationFn: ({
8832
+ service,
8833
+ xNode,
8834
+ kwargs,
8835
+ withContext
8836
+ }) => {
8837
+ return getPartnerTitle({
8838
+ service,
8839
+ xNode,
8840
+ kwargs,
8841
+ withContext
8842
+ });
8843
+ }
8844
+ });
8845
+ };
8846
+ var use_get_partner_title_default = useGetPartnerTitle;
8847
+
8652
8848
  // src/hooks/chart/use-read-group.ts
8653
8849
  import { useQuery as useQuery24 } from "@tanstack/react-query";
8654
8850
  var useReadGroup = (services, xNode, body, enabled) => {
@@ -8799,7 +8995,11 @@ var ServiceProvider = ({
8799
8995
  useGetDataChart: use_get_data_chart_default,
8800
8996
  useGetVersion: use_get_version_default,
8801
8997
  useCreateEInvoice: use_create_e_invoice_default,
8802
- useGetCurrentUser: use_get_current_user_default
8998
+ useGetCurrentUser: use_get_current_user_default,
8999
+ useGetCity: use_get_city_default,
9000
+ useGetWard: use_get_ward_default,
9001
+ useGetCountry: use_get_country_default,
9002
+ useGetPartnerTitle: use_get_partner_title_default
8803
9003
  };
8804
9004
  return /* @__PURE__ */ jsx6(ServiceContext.Provider, { value: services, children });
8805
9005
  };
@@ -535,6 +535,29 @@ declare function useViewService(): {
535
535
  oauthUid?: string;
536
536
  extraHeaders?: any;
537
537
  }) => Promise<any>;
538
+ getCountry: ({ service, xNode, ids, kwargs, }: {
539
+ service?: string;
540
+ xNode?: string;
541
+ ids: any;
542
+ kwargs: any;
543
+ }) => Promise<any>;
544
+ getCity: ({ service, xNode, ids, kwargs, }: {
545
+ service?: string;
546
+ xNode?: string;
547
+ ids: any;
548
+ kwargs: any;
549
+ }) => Promise<any>;
550
+ getWard: ({ service, xNode, kwargs, }: {
551
+ service?: string;
552
+ xNode?: string;
553
+ kwargs: any;
554
+ }) => Promise<any>;
555
+ getPartnerTitle: ({ service, xNode, kwargs, withContext, }: {
556
+ service?: string;
557
+ xNode?: string;
558
+ kwargs: any;
559
+ withContext?: any;
560
+ }) => Promise<any>;
538
561
  };
539
562
 
540
563
  declare function useDashboardService(): {
@@ -535,6 +535,29 @@ declare function useViewService(): {
535
535
  oauthUid?: string;
536
536
  extraHeaders?: any;
537
537
  }) => Promise<any>;
538
+ getCountry: ({ service, xNode, ids, kwargs, }: {
539
+ service?: string;
540
+ xNode?: string;
541
+ ids: any;
542
+ kwargs: any;
543
+ }) => Promise<any>;
544
+ getCity: ({ service, xNode, ids, kwargs, }: {
545
+ service?: string;
546
+ xNode?: string;
547
+ ids: any;
548
+ kwargs: any;
549
+ }) => Promise<any>;
550
+ getWard: ({ service, xNode, kwargs, }: {
551
+ service?: string;
552
+ xNode?: string;
553
+ kwargs: any;
554
+ }) => Promise<any>;
555
+ getPartnerTitle: ({ service, xNode, kwargs, withContext, }: {
556
+ service?: string;
557
+ xNode?: string;
558
+ kwargs: any;
559
+ withContext?: any;
560
+ }) => Promise<any>;
538
561
  };
539
562
 
540
563
  declare function useDashboardService(): {
package/dist/services.js CHANGED
@@ -3198,12 +3198,24 @@ var import_react_query105 = require("@tanstack/react-query");
3198
3198
  // src/hooks/view/use-get-current-user.ts
3199
3199
  var import_react_query106 = require("@tanstack/react-query");
3200
3200
 
3201
- // src/hooks/chart/use-read-group.ts
3201
+ // src/hooks/view/use-get-ward.ts
3202
3202
  var import_react_query107 = require("@tanstack/react-query");
3203
3203
 
3204
- // src/hooks/chart/use-get-data-chart.ts
3204
+ // src/hooks/view/use-get-city.ts
3205
3205
  var import_react_query108 = require("@tanstack/react-query");
3206
3206
 
3207
+ // src/hooks/view/use-get-country.ts
3208
+ var import_react_query109 = require("@tanstack/react-query");
3209
+
3210
+ // src/hooks/view/use-get-partner-title.ts
3211
+ var import_react_query110 = require("@tanstack/react-query");
3212
+
3213
+ // src/hooks/chart/use-read-group.ts
3214
+ var import_react_query111 = require("@tanstack/react-query");
3215
+
3216
+ // src/hooks/chart/use-get-data-chart.ts
3217
+ var import_react_query112 = require("@tanstack/react-query");
3218
+
3207
3219
  // src/provider/service-provider.tsx
3208
3220
  var import_jsx_runtime6 = require("react/jsx-runtime");
3209
3221
  var ServiceContext = (0, import_react6.createContext)(null);
@@ -6049,6 +6061,112 @@ function useViewService() {
6049
6061
  },
6050
6062
  [env]
6051
6063
  );
6064
+ const getCountry = (0, import_react16.useCallback)(
6065
+ async ({
6066
+ service,
6067
+ xNode,
6068
+ ids,
6069
+ kwargs
6070
+ }) => {
6071
+ const body = {
6072
+ model: "res.country" /* COUNTRY */,
6073
+ ids,
6074
+ method: "get_data_select" /* GET_DATA_SELECT */,
6075
+ kwargs
6076
+ };
6077
+ return env?.requests?.post(
6078
+ "/call" /* CALL_PATH */,
6079
+ body,
6080
+ {
6081
+ headers: {
6082
+ "Content-Type": "application/json",
6083
+ ...xNode ? { "X-Node": xNode } : {}
6084
+ }
6085
+ },
6086
+ service
6087
+ );
6088
+ },
6089
+ [env]
6090
+ );
6091
+ const getCity = (0, import_react16.useCallback)(
6092
+ async ({
6093
+ service,
6094
+ xNode,
6095
+ ids,
6096
+ kwargs
6097
+ }) => {
6098
+ const body = {
6099
+ model: "res.country.state" /* COUNTRY_STATE */,
6100
+ ids,
6101
+ method: "get_data_select" /* GET_DATA_SELECT */,
6102
+ kwargs
6103
+ };
6104
+ return env?.requests?.post(
6105
+ "/call" /* CALL_PATH */,
6106
+ body,
6107
+ {
6108
+ headers: {
6109
+ "Content-Type": "application/json",
6110
+ ...xNode ? { "X-Node": xNode } : {}
6111
+ }
6112
+ },
6113
+ service
6114
+ );
6115
+ },
6116
+ [env]
6117
+ );
6118
+ const getWard = (0, import_react16.useCallback)(
6119
+ async ({
6120
+ service,
6121
+ xNode,
6122
+ kwargs
6123
+ }) => {
6124
+ const body = {
6125
+ model: "res.country.ward" /* COUNTRY_WARD */,
6126
+ method: "get_data_select" /* GET_DATA_SELECT */,
6127
+ kwargs
6128
+ };
6129
+ return env?.requests?.post(
6130
+ "/call" /* CALL_PATH */,
6131
+ body,
6132
+ {
6133
+ headers: {
6134
+ "Content-Type": "application/json",
6135
+ ...xNode ? { "X-Node": xNode } : {}
6136
+ }
6137
+ },
6138
+ service
6139
+ );
6140
+ },
6141
+ [env]
6142
+ );
6143
+ const getPartnerTitle = (0, import_react16.useCallback)(
6144
+ async ({
6145
+ service,
6146
+ xNode,
6147
+ kwargs,
6148
+ withContext
6149
+ }) => {
6150
+ const body = {
6151
+ model: "res.partner.title" /* RES_PARTNER_TITLE */,
6152
+ method: "get_data_select" /* GET_DATA_SELECT */,
6153
+ kwargs,
6154
+ with_context: withContext
6155
+ };
6156
+ return env?.requests?.post(
6157
+ "/call" /* CALL_PATH */,
6158
+ body,
6159
+ {
6160
+ headers: {
6161
+ "Content-Type": "application/json",
6162
+ ...xNode ? { "X-Node": xNode } : {}
6163
+ }
6164
+ },
6165
+ service
6166
+ );
6167
+ },
6168
+ [env]
6169
+ );
6052
6170
  return {
6053
6171
  getView,
6054
6172
  getMenu,
@@ -6094,7 +6212,11 @@ function useViewService() {
6094
6212
  getPinCode,
6095
6213
  getNotifications,
6096
6214
  createEInvoice,
6097
- getCurrentUser
6215
+ getCurrentUser,
6216
+ getCountry,
6217
+ getCity,
6218
+ getWard,
6219
+ getPartnerTitle
6098
6220
  };
6099
6221
  }
6100
6222
 
package/dist/services.mjs CHANGED
@@ -3153,6 +3153,18 @@ import { useMutation as useMutation80 } from "@tanstack/react-query";
3153
3153
  // src/hooks/view/use-get-current-user.ts
3154
3154
  import { useMutation as useMutation81 } from "@tanstack/react-query";
3155
3155
 
3156
+ // src/hooks/view/use-get-ward.ts
3157
+ import { useMutation as useMutation82 } from "@tanstack/react-query";
3158
+
3159
+ // src/hooks/view/use-get-city.ts
3160
+ import { useMutation as useMutation83 } from "@tanstack/react-query";
3161
+
3162
+ // src/hooks/view/use-get-country.ts
3163
+ import { useMutation as useMutation84 } from "@tanstack/react-query";
3164
+
3165
+ // src/hooks/view/use-get-partner-title.ts
3166
+ import { useMutation as useMutation85 } from "@tanstack/react-query";
3167
+
3156
3168
  // src/hooks/chart/use-read-group.ts
3157
3169
  import { useQuery as useQuery24 } from "@tanstack/react-query";
3158
3170
 
@@ -6004,6 +6016,112 @@ function useViewService() {
6004
6016
  },
6005
6017
  [env]
6006
6018
  );
6019
+ const getCountry = useCallback11(
6020
+ async ({
6021
+ service,
6022
+ xNode,
6023
+ ids,
6024
+ kwargs
6025
+ }) => {
6026
+ const body = {
6027
+ model: "res.country" /* COUNTRY */,
6028
+ ids,
6029
+ method: "get_data_select" /* GET_DATA_SELECT */,
6030
+ kwargs
6031
+ };
6032
+ return env?.requests?.post(
6033
+ "/call" /* CALL_PATH */,
6034
+ body,
6035
+ {
6036
+ headers: {
6037
+ "Content-Type": "application/json",
6038
+ ...xNode ? { "X-Node": xNode } : {}
6039
+ }
6040
+ },
6041
+ service
6042
+ );
6043
+ },
6044
+ [env]
6045
+ );
6046
+ const getCity = useCallback11(
6047
+ async ({
6048
+ service,
6049
+ xNode,
6050
+ ids,
6051
+ kwargs
6052
+ }) => {
6053
+ const body = {
6054
+ model: "res.country.state" /* COUNTRY_STATE */,
6055
+ ids,
6056
+ method: "get_data_select" /* GET_DATA_SELECT */,
6057
+ kwargs
6058
+ };
6059
+ return env?.requests?.post(
6060
+ "/call" /* CALL_PATH */,
6061
+ body,
6062
+ {
6063
+ headers: {
6064
+ "Content-Type": "application/json",
6065
+ ...xNode ? { "X-Node": xNode } : {}
6066
+ }
6067
+ },
6068
+ service
6069
+ );
6070
+ },
6071
+ [env]
6072
+ );
6073
+ const getWard = useCallback11(
6074
+ async ({
6075
+ service,
6076
+ xNode,
6077
+ kwargs
6078
+ }) => {
6079
+ const body = {
6080
+ model: "res.country.ward" /* COUNTRY_WARD */,
6081
+ method: "get_data_select" /* GET_DATA_SELECT */,
6082
+ kwargs
6083
+ };
6084
+ return env?.requests?.post(
6085
+ "/call" /* CALL_PATH */,
6086
+ body,
6087
+ {
6088
+ headers: {
6089
+ "Content-Type": "application/json",
6090
+ ...xNode ? { "X-Node": xNode } : {}
6091
+ }
6092
+ },
6093
+ service
6094
+ );
6095
+ },
6096
+ [env]
6097
+ );
6098
+ const getPartnerTitle = useCallback11(
6099
+ async ({
6100
+ service,
6101
+ xNode,
6102
+ kwargs,
6103
+ withContext
6104
+ }) => {
6105
+ const body = {
6106
+ model: "res.partner.title" /* RES_PARTNER_TITLE */,
6107
+ method: "get_data_select" /* GET_DATA_SELECT */,
6108
+ kwargs,
6109
+ with_context: withContext
6110
+ };
6111
+ return env?.requests?.post(
6112
+ "/call" /* CALL_PATH */,
6113
+ body,
6114
+ {
6115
+ headers: {
6116
+ "Content-Type": "application/json",
6117
+ ...xNode ? { "X-Node": xNode } : {}
6118
+ }
6119
+ },
6120
+ service
6121
+ );
6122
+ },
6123
+ [env]
6124
+ );
6007
6125
  return {
6008
6126
  getView,
6009
6127
  getMenu,
@@ -6049,7 +6167,11 @@ function useViewService() {
6049
6167
  getPinCode,
6050
6168
  getNotifications,
6051
6169
  createEInvoice,
6052
- getCurrentUser
6170
+ getCurrentUser,
6171
+ getCountry,
6172
+ getCity,
6173
+ getWard,
6174
+ getPartnerTitle
6053
6175
  };
6054
6176
  }
6055
6177