@fctc/interface-logic 2.5.6 → 2.5.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
@@ -683,6 +683,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
683
683
  UriConstants2["GRANT_ACCESS"] = "/grant-access";
684
684
  UriConstants2["TOKEN_BY_CODE"] = "/token";
685
685
  UriConstants2["LOGOUT"] = "/logout";
686
+ UriConstants2["CREATE_UPDATE"] = "/create_update";
686
687
  return UriConstants2;
687
688
  })(UriConstants || {});
688
689
 
@@ -4468,6 +4469,166 @@ function useViewService() {
4468
4469
  },
4469
4470
  [env]
4470
4471
  );
4472
+ const getASession = useCallback9(
4473
+ async ({
4474
+ model,
4475
+ args,
4476
+ domain,
4477
+ service,
4478
+ xNode
4479
+ }) => {
4480
+ const jsonData = {
4481
+ model,
4482
+ method: "web_search_read" /* WEB_SEARCH_READ */,
4483
+ args,
4484
+ kwargs: {
4485
+ domain: [domain],
4486
+ specification: {
4487
+ name: {},
4488
+ user_id: {},
4489
+ config_id: {},
4490
+ start_at: {},
4491
+ stop_at: {},
4492
+ sequence_number: {},
4493
+ login_number: {},
4494
+ payment_method_ids: {},
4495
+ state: {},
4496
+ update_stock_at_closing: {},
4497
+ cash_register_balance_start: {}
4498
+ }
4499
+ }
4500
+ };
4501
+ return env?.requests.post(
4502
+ "/call" /* CALL_PATH */,
4503
+ jsonData,
4504
+ {
4505
+ headers: {
4506
+ "Content-Type": "application/json",
4507
+ ...xNode ? { "X-Node": xNode } : {}
4508
+ }
4509
+ },
4510
+ service
4511
+ );
4512
+ },
4513
+ [env]
4514
+ );
4515
+ const updateClosedSession = useCallback9(
4516
+ ({
4517
+ model,
4518
+ domain,
4519
+ values,
4520
+ service,
4521
+ xNode
4522
+ }) => {
4523
+ const jsonData = {
4524
+ model,
4525
+ domain,
4526
+ values
4527
+ };
4528
+ return env?.requests.post(
4529
+ "/create_update" /* CREATE_UPDATE */,
4530
+ jsonData,
4531
+ {
4532
+ headers: {
4533
+ "Content-Type": "application/json",
4534
+ ...xNode ? { "X-Node": xNode } : {}
4535
+ }
4536
+ },
4537
+ service
4538
+ );
4539
+ },
4540
+ [env]
4541
+ );
4542
+ const manageSession = useCallback9(
4543
+ ({
4544
+ model,
4545
+ method,
4546
+ ids,
4547
+ args,
4548
+ kwargs,
4549
+ xNode,
4550
+ service
4551
+ }) => {
4552
+ const jsonData = {
4553
+ model,
4554
+ method,
4555
+ ids,
4556
+ args,
4557
+ kwargs
4558
+ };
4559
+ return env?.requests.post(
4560
+ "/call" /* CALL_PATH */,
4561
+ jsonData,
4562
+ {
4563
+ headers: {
4564
+ "Content-Type": "application/json",
4565
+ ...xNode ? { "X-Node": xNode } : {}
4566
+ }
4567
+ },
4568
+ service
4569
+ );
4570
+ },
4571
+ [env]
4572
+ );
4573
+ const handleClosingSession = useCallback9(
4574
+ ({
4575
+ model,
4576
+ method,
4577
+ ids,
4578
+ kwargs,
4579
+ xNode,
4580
+ service
4581
+ }) => {
4582
+ const jsonData = {
4583
+ model,
4584
+ method,
4585
+ ids,
4586
+ kwargs
4587
+ };
4588
+ return env?.requests.post(
4589
+ "/call" /* CALL_PATH */,
4590
+ jsonData,
4591
+ {
4592
+ headers: {
4593
+ "Content-Type": "application/json",
4594
+ ...xNode ? { "X-Node": xNode } : {}
4595
+ }
4596
+ },
4597
+ service
4598
+ );
4599
+ },
4600
+ [env]
4601
+ );
4602
+ const createSession = useCallback9(
4603
+ ({
4604
+ model,
4605
+ configId,
4606
+ xNode,
4607
+ service
4608
+ }) => {
4609
+ const jsonData = {
4610
+ model,
4611
+ method: "create" /* CREATE */,
4612
+ args: [
4613
+ {
4614
+ config_id: configId
4615
+ }
4616
+ ]
4617
+ };
4618
+ return env?.requests.post(
4619
+ "/call" /* CALL_PATH */,
4620
+ jsonData,
4621
+ {
4622
+ headers: {
4623
+ "Content-Type": "application/json",
4624
+ ...xNode ? { "X-Node": xNode } : {}
4625
+ }
4626
+ },
4627
+ service
4628
+ );
4629
+ },
4630
+ [env]
4631
+ );
4471
4632
  return {
4472
4633
  getView,
4473
4634
  getMenu,
@@ -4483,7 +4644,12 @@ function useViewService() {
4483
4644
  signInSSO,
4484
4645
  verify2FA,
4485
4646
  get2FAMethods,
4486
- verifyTotp
4647
+ verifyTotp,
4648
+ getASession,
4649
+ updateClosedSession,
4650
+ manageSession,
4651
+ handleClosingSession,
4652
+ createSession
4487
4653
  };
4488
4654
  }
4489
4655
 
@@ -6225,6 +6391,21 @@ var useVerifyTotp = () => {
6225
6391
  };
6226
6392
  var use_verify_totp_default = useVerifyTotp;
6227
6393
 
6394
+ // src/hooks/view/use-a-session.ts
6395
+ import { useMutation as useMutation48 } from "@tanstack/react-query";
6396
+
6397
+ // src/hooks/view/use-update-closed-session.ts
6398
+ import { useMutation as useMutation49 } from "@tanstack/react-query";
6399
+
6400
+ // src/hooks/view/use-manage-session.ts
6401
+ import { useMutation as useMutation50 } from "@tanstack/react-query";
6402
+
6403
+ // src/hooks/view/use-handle-closing-session.ts
6404
+ import { useMutation as useMutation51 } from "@tanstack/react-query";
6405
+
6406
+ // src/hooks/view/use-create-session.ts
6407
+ import { useMutation as useMutation52 } from "@tanstack/react-query";
6408
+
6228
6409
  // src/provider/service-provider.tsx
6229
6410
  import { jsx as jsx6 } from "react/jsx-runtime";
6230
6411
  var ServiceContext = createContext2(null);
@@ -272,6 +272,43 @@ declare function useViewService(): {
272
272
  action_token: string;
273
273
  code: string;
274
274
  }) => any;
275
+ getASession: ({ model, args, domain, service, xNode, }: {
276
+ model: string;
277
+ args: [];
278
+ domain: [];
279
+ service: string;
280
+ xNode: string;
281
+ }) => Promise<any>;
282
+ updateClosedSession: ({ model, domain, values, service, xNode, }: {
283
+ model: string;
284
+ domain: [];
285
+ values: {};
286
+ service: string;
287
+ xNode: string;
288
+ }) => any;
289
+ manageSession: ({ model, method, ids, args, kwargs, xNode, service, }: {
290
+ model: string;
291
+ method: string;
292
+ ids: [];
293
+ args: [];
294
+ kwargs: {};
295
+ service: string;
296
+ xNode: string;
297
+ }) => any;
298
+ handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
299
+ model: string;
300
+ method: string;
301
+ ids: [];
302
+ kwargs: {};
303
+ service: string;
304
+ xNode: string;
305
+ }) => any;
306
+ createSession: ({ model, configId, xNode, service, }: {
307
+ model: string;
308
+ configId: number;
309
+ service: string;
310
+ xNode: string;
311
+ }) => any;
275
312
  };
276
313
 
277
314
  export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
@@ -272,6 +272,43 @@ declare function useViewService(): {
272
272
  action_token: string;
273
273
  code: string;
274
274
  }) => any;
275
+ getASession: ({ model, args, domain, service, xNode, }: {
276
+ model: string;
277
+ args: [];
278
+ domain: [];
279
+ service: string;
280
+ xNode: string;
281
+ }) => Promise<any>;
282
+ updateClosedSession: ({ model, domain, values, service, xNode, }: {
283
+ model: string;
284
+ domain: [];
285
+ values: {};
286
+ service: string;
287
+ xNode: string;
288
+ }) => any;
289
+ manageSession: ({ model, method, ids, args, kwargs, xNode, service, }: {
290
+ model: string;
291
+ method: string;
292
+ ids: [];
293
+ args: [];
294
+ kwargs: {};
295
+ service: string;
296
+ xNode: string;
297
+ }) => any;
298
+ handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
299
+ model: string;
300
+ method: string;
301
+ ids: [];
302
+ kwargs: {};
303
+ service: string;
304
+ xNode: string;
305
+ }) => any;
306
+ createSession: ({ model, configId, xNode, service, }: {
307
+ model: string;
308
+ configId: number;
309
+ service: string;
310
+ xNode: string;
311
+ }) => any;
275
312
  };
276
313
 
277
314
  export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
package/dist/services.js CHANGED
@@ -74,6 +74,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
74
74
  UriConstants2["GRANT_ACCESS"] = "/grant-access";
75
75
  UriConstants2["TOKEN_BY_CODE"] = "/token";
76
76
  UriConstants2["LOGOUT"] = "/logout";
77
+ UriConstants2["CREATE_UPDATE"] = "/create_update";
77
78
  return UriConstants2;
78
79
  })(UriConstants || {});
79
80
 
@@ -3049,6 +3050,21 @@ var import_react_query68 = require("@tanstack/react-query");
3049
3050
  // src/hooks/view/use-verify-totp.ts
3050
3051
  var import_react_query69 = require("@tanstack/react-query");
3051
3052
 
3053
+ // src/hooks/view/use-a-session.ts
3054
+ var import_react_query70 = require("@tanstack/react-query");
3055
+
3056
+ // src/hooks/view/use-update-closed-session.ts
3057
+ var import_react_query71 = require("@tanstack/react-query");
3058
+
3059
+ // src/hooks/view/use-manage-session.ts
3060
+ var import_react_query72 = require("@tanstack/react-query");
3061
+
3062
+ // src/hooks/view/use-handle-closing-session.ts
3063
+ var import_react_query73 = require("@tanstack/react-query");
3064
+
3065
+ // src/hooks/view/use-create-session.ts
3066
+ var import_react_query74 = require("@tanstack/react-query");
3067
+
3052
3068
  // src/provider/service-provider.tsx
3053
3069
  var import_jsx_runtime6 = require("react/jsx-runtime");
3054
3070
  var ServiceContext = (0, import_react4.createContext)(null);
@@ -4681,6 +4697,166 @@ function useViewService() {
4681
4697
  },
4682
4698
  [env]
4683
4699
  );
4700
+ const getASession = (0, import_react14.useCallback)(
4701
+ async ({
4702
+ model,
4703
+ args,
4704
+ domain,
4705
+ service,
4706
+ xNode
4707
+ }) => {
4708
+ const jsonData = {
4709
+ model,
4710
+ method: "web_search_read" /* WEB_SEARCH_READ */,
4711
+ args,
4712
+ kwargs: {
4713
+ domain: [domain],
4714
+ specification: {
4715
+ name: {},
4716
+ user_id: {},
4717
+ config_id: {},
4718
+ start_at: {},
4719
+ stop_at: {},
4720
+ sequence_number: {},
4721
+ login_number: {},
4722
+ payment_method_ids: {},
4723
+ state: {},
4724
+ update_stock_at_closing: {},
4725
+ cash_register_balance_start: {}
4726
+ }
4727
+ }
4728
+ };
4729
+ return env?.requests.post(
4730
+ "/call" /* CALL_PATH */,
4731
+ jsonData,
4732
+ {
4733
+ headers: {
4734
+ "Content-Type": "application/json",
4735
+ ...xNode ? { "X-Node": xNode } : {}
4736
+ }
4737
+ },
4738
+ service
4739
+ );
4740
+ },
4741
+ [env]
4742
+ );
4743
+ const updateClosedSession = (0, import_react14.useCallback)(
4744
+ ({
4745
+ model,
4746
+ domain,
4747
+ values,
4748
+ service,
4749
+ xNode
4750
+ }) => {
4751
+ const jsonData = {
4752
+ model,
4753
+ domain,
4754
+ values
4755
+ };
4756
+ return env?.requests.post(
4757
+ "/create_update" /* CREATE_UPDATE */,
4758
+ jsonData,
4759
+ {
4760
+ headers: {
4761
+ "Content-Type": "application/json",
4762
+ ...xNode ? { "X-Node": xNode } : {}
4763
+ }
4764
+ },
4765
+ service
4766
+ );
4767
+ },
4768
+ [env]
4769
+ );
4770
+ const manageSession = (0, import_react14.useCallback)(
4771
+ ({
4772
+ model,
4773
+ method,
4774
+ ids,
4775
+ args,
4776
+ kwargs,
4777
+ xNode,
4778
+ service
4779
+ }) => {
4780
+ const jsonData = {
4781
+ model,
4782
+ method,
4783
+ ids,
4784
+ args,
4785
+ kwargs
4786
+ };
4787
+ return env?.requests.post(
4788
+ "/call" /* CALL_PATH */,
4789
+ jsonData,
4790
+ {
4791
+ headers: {
4792
+ "Content-Type": "application/json",
4793
+ ...xNode ? { "X-Node": xNode } : {}
4794
+ }
4795
+ },
4796
+ service
4797
+ );
4798
+ },
4799
+ [env]
4800
+ );
4801
+ const handleClosingSession = (0, import_react14.useCallback)(
4802
+ ({
4803
+ model,
4804
+ method,
4805
+ ids,
4806
+ kwargs,
4807
+ xNode,
4808
+ service
4809
+ }) => {
4810
+ const jsonData = {
4811
+ model,
4812
+ method,
4813
+ ids,
4814
+ kwargs
4815
+ };
4816
+ return env?.requests.post(
4817
+ "/call" /* CALL_PATH */,
4818
+ jsonData,
4819
+ {
4820
+ headers: {
4821
+ "Content-Type": "application/json",
4822
+ ...xNode ? { "X-Node": xNode } : {}
4823
+ }
4824
+ },
4825
+ service
4826
+ );
4827
+ },
4828
+ [env]
4829
+ );
4830
+ const createSession = (0, import_react14.useCallback)(
4831
+ ({
4832
+ model,
4833
+ configId,
4834
+ xNode,
4835
+ service
4836
+ }) => {
4837
+ const jsonData = {
4838
+ model,
4839
+ method: "create" /* CREATE */,
4840
+ args: [
4841
+ {
4842
+ config_id: configId
4843
+ }
4844
+ ]
4845
+ };
4846
+ return env?.requests.post(
4847
+ "/call" /* CALL_PATH */,
4848
+ jsonData,
4849
+ {
4850
+ headers: {
4851
+ "Content-Type": "application/json",
4852
+ ...xNode ? { "X-Node": xNode } : {}
4853
+ }
4854
+ },
4855
+ service
4856
+ );
4857
+ },
4858
+ [env]
4859
+ );
4684
4860
  return {
4685
4861
  getView,
4686
4862
  getMenu,
@@ -4696,7 +4872,12 @@ function useViewService() {
4696
4872
  signInSSO,
4697
4873
  verify2FA,
4698
4874
  get2FAMethods,
4699
- verifyTotp
4875
+ verifyTotp,
4876
+ getASession,
4877
+ updateClosedSession,
4878
+ manageSession,
4879
+ handleClosingSession,
4880
+ createSession
4700
4881
  };
4701
4882
  }
4702
4883
  // Annotate the CommonJS export names for ESM import in node:
package/dist/services.mjs CHANGED
@@ -30,6 +30,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
30
30
  UriConstants2["GRANT_ACCESS"] = "/grant-access";
31
31
  UriConstants2["TOKEN_BY_CODE"] = "/token";
32
32
  UriConstants2["LOGOUT"] = "/logout";
33
+ UriConstants2["CREATE_UPDATE"] = "/create_update";
33
34
  return UriConstants2;
34
35
  })(UriConstants || {});
35
36
 
@@ -3005,6 +3006,21 @@ import { useMutation as useMutation46 } from "@tanstack/react-query";
3005
3006
  // src/hooks/view/use-verify-totp.ts
3006
3007
  import { useMutation as useMutation47 } from "@tanstack/react-query";
3007
3008
 
3009
+ // src/hooks/view/use-a-session.ts
3010
+ import { useMutation as useMutation48 } from "@tanstack/react-query";
3011
+
3012
+ // src/hooks/view/use-update-closed-session.ts
3013
+ import { useMutation as useMutation49 } from "@tanstack/react-query";
3014
+
3015
+ // src/hooks/view/use-manage-session.ts
3016
+ import { useMutation as useMutation50 } from "@tanstack/react-query";
3017
+
3018
+ // src/hooks/view/use-handle-closing-session.ts
3019
+ import { useMutation as useMutation51 } from "@tanstack/react-query";
3020
+
3021
+ // src/hooks/view/use-create-session.ts
3022
+ import { useMutation as useMutation52 } from "@tanstack/react-query";
3023
+
3008
3024
  // src/provider/service-provider.tsx
3009
3025
  import { jsx as jsx6 } from "react/jsx-runtime";
3010
3026
  var ServiceContext = createContext2(null);
@@ -4637,6 +4653,166 @@ function useViewService() {
4637
4653
  },
4638
4654
  [env]
4639
4655
  );
4656
+ const getASession = useCallback10(
4657
+ async ({
4658
+ model,
4659
+ args,
4660
+ domain,
4661
+ service,
4662
+ xNode
4663
+ }) => {
4664
+ const jsonData = {
4665
+ model,
4666
+ method: "web_search_read" /* WEB_SEARCH_READ */,
4667
+ args,
4668
+ kwargs: {
4669
+ domain: [domain],
4670
+ specification: {
4671
+ name: {},
4672
+ user_id: {},
4673
+ config_id: {},
4674
+ start_at: {},
4675
+ stop_at: {},
4676
+ sequence_number: {},
4677
+ login_number: {},
4678
+ payment_method_ids: {},
4679
+ state: {},
4680
+ update_stock_at_closing: {},
4681
+ cash_register_balance_start: {}
4682
+ }
4683
+ }
4684
+ };
4685
+ return env?.requests.post(
4686
+ "/call" /* CALL_PATH */,
4687
+ jsonData,
4688
+ {
4689
+ headers: {
4690
+ "Content-Type": "application/json",
4691
+ ...xNode ? { "X-Node": xNode } : {}
4692
+ }
4693
+ },
4694
+ service
4695
+ );
4696
+ },
4697
+ [env]
4698
+ );
4699
+ const updateClosedSession = useCallback10(
4700
+ ({
4701
+ model,
4702
+ domain,
4703
+ values,
4704
+ service,
4705
+ xNode
4706
+ }) => {
4707
+ const jsonData = {
4708
+ model,
4709
+ domain,
4710
+ values
4711
+ };
4712
+ return env?.requests.post(
4713
+ "/create_update" /* CREATE_UPDATE */,
4714
+ jsonData,
4715
+ {
4716
+ headers: {
4717
+ "Content-Type": "application/json",
4718
+ ...xNode ? { "X-Node": xNode } : {}
4719
+ }
4720
+ },
4721
+ service
4722
+ );
4723
+ },
4724
+ [env]
4725
+ );
4726
+ const manageSession = useCallback10(
4727
+ ({
4728
+ model,
4729
+ method,
4730
+ ids,
4731
+ args,
4732
+ kwargs,
4733
+ xNode,
4734
+ service
4735
+ }) => {
4736
+ const jsonData = {
4737
+ model,
4738
+ method,
4739
+ ids,
4740
+ args,
4741
+ kwargs
4742
+ };
4743
+ return env?.requests.post(
4744
+ "/call" /* CALL_PATH */,
4745
+ jsonData,
4746
+ {
4747
+ headers: {
4748
+ "Content-Type": "application/json",
4749
+ ...xNode ? { "X-Node": xNode } : {}
4750
+ }
4751
+ },
4752
+ service
4753
+ );
4754
+ },
4755
+ [env]
4756
+ );
4757
+ const handleClosingSession = useCallback10(
4758
+ ({
4759
+ model,
4760
+ method,
4761
+ ids,
4762
+ kwargs,
4763
+ xNode,
4764
+ service
4765
+ }) => {
4766
+ const jsonData = {
4767
+ model,
4768
+ method,
4769
+ ids,
4770
+ kwargs
4771
+ };
4772
+ return env?.requests.post(
4773
+ "/call" /* CALL_PATH */,
4774
+ jsonData,
4775
+ {
4776
+ headers: {
4777
+ "Content-Type": "application/json",
4778
+ ...xNode ? { "X-Node": xNode } : {}
4779
+ }
4780
+ },
4781
+ service
4782
+ );
4783
+ },
4784
+ [env]
4785
+ );
4786
+ const createSession = useCallback10(
4787
+ ({
4788
+ model,
4789
+ configId,
4790
+ xNode,
4791
+ service
4792
+ }) => {
4793
+ const jsonData = {
4794
+ model,
4795
+ method: "create" /* CREATE */,
4796
+ args: [
4797
+ {
4798
+ config_id: configId
4799
+ }
4800
+ ]
4801
+ };
4802
+ return env?.requests.post(
4803
+ "/call" /* CALL_PATH */,
4804
+ jsonData,
4805
+ {
4806
+ headers: {
4807
+ "Content-Type": "application/json",
4808
+ ...xNode ? { "X-Node": xNode } : {}
4809
+ }
4810
+ },
4811
+ service
4812
+ );
4813
+ },
4814
+ [env]
4815
+ );
4640
4816
  return {
4641
4817
  getView,
4642
4818
  getMenu,
@@ -4652,7 +4828,12 @@ function useViewService() {
4652
4828
  signInSSO,
4653
4829
  verify2FA,
4654
4830
  get2FAMethods,
4655
- verifyTotp
4831
+ verifyTotp,
4832
+ getASession,
4833
+ updateClosedSession,
4834
+ manageSession,
4835
+ handleClosingSession,
4836
+ createSession
4656
4837
  };
4657
4838
  }
4658
4839
  export {