@fctc/interface-logic 2.9.1 → 2.9.3

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/services.mjs CHANGED
@@ -3537,18 +3537,36 @@ import { useCallback as useCallback5 } from "react";
3537
3537
  function useExcelService() {
3538
3538
  const { env } = useEnv();
3539
3539
  const uploadFileExcel = useCallback5(
3540
- async ({ formData }) => {
3541
- return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData);
3540
+ async ({
3541
+ formData,
3542
+ service,
3543
+ xNode
3544
+ }) => {
3545
+ return env.requests.post(
3546
+ "/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
3547
+ formData,
3548
+ {
3549
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3550
+ },
3551
+ service
3552
+ );
3542
3553
  },
3543
3554
  [env]
3544
3555
  );
3545
3556
  const uploadIdFile = useCallback5(
3546
- async ({ formData }) => {
3547
- return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData, {
3548
- headers: {
3549
- "Content-Type": "multipart/form-data"
3550
- }
3551
- });
3557
+ async ({
3558
+ formData,
3559
+ service,
3560
+ xNode
3561
+ }) => {
3562
+ return env.requests.post(
3563
+ "/upload/file" /* UPLOAD_FILE_EXCEL_PATH */,
3564
+ formData,
3565
+ {
3566
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3567
+ },
3568
+ service
3569
+ );
3552
3570
  },
3553
3571
  [env]
3554
3572
  );
@@ -3557,7 +3575,9 @@ function useExcelService() {
3557
3575
  id,
3558
3576
  selectedSheet,
3559
3577
  isHeader,
3560
- context
3578
+ context,
3579
+ service,
3580
+ xNode
3561
3581
  }) => {
3562
3582
  const jsonData = {
3563
3583
  model: "base_import.import" /* BASE_IMPORT */,
@@ -3588,11 +3608,14 @@ function useExcelService() {
3588
3608
  },
3589
3609
  with_context: context
3590
3610
  };
3591
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3592
- headers: {
3593
- "Content-Type": "application/json"
3594
- }
3595
- });
3611
+ return env.requests.post(
3612
+ "/call" /* CALL_PATH */,
3613
+ jsonData,
3614
+ {
3615
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3616
+ },
3617
+ service
3618
+ );
3596
3619
  },
3597
3620
  [env]
3598
3621
  );
@@ -3603,7 +3626,9 @@ function useExcelService() {
3603
3626
  idFile,
3604
3627
  options,
3605
3628
  dryrun,
3606
- context
3629
+ context,
3630
+ service,
3631
+ xNode
3607
3632
  }) => {
3608
3633
  const jsonData = {
3609
3634
  model: "base_import.import" /* BASE_IMPORT */,
@@ -3617,22 +3642,36 @@ function useExcelService() {
3617
3642
  },
3618
3643
  with_context: context
3619
3644
  };
3620
- return env.requests.post("/call" /* CALL_PATH */, jsonData, {
3621
- headers: {
3622
- "Content-Type": "application/json"
3623
- }
3624
- });
3645
+ return env.requests.post(
3646
+ "/call" /* CALL_PATH */,
3647
+ jsonData,
3648
+ {
3649
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3650
+ },
3651
+ service
3652
+ );
3625
3653
  },
3626
3654
  [env]
3627
3655
  );
3628
3656
  const getFileExcel = useCallback5(
3629
- async ({ model }) => {
3657
+ async ({
3658
+ model,
3659
+ service,
3660
+ xNode
3661
+ }) => {
3630
3662
  const jsonData = {
3631
3663
  model,
3632
3664
  method: "get_import_templates" /* GET_IMPORT */,
3633
3665
  args: []
3634
3666
  };
3635
- return env.requests.post("/call" /* CALL_PATH */, jsonData);
3667
+ return env.requests.post(
3668
+ "/call" /* CALL_PATH */,
3669
+ jsonData,
3670
+ {
3671
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3672
+ },
3673
+ service
3674
+ );
3636
3675
  },
3637
3676
  [env]
3638
3677
  );
@@ -3647,7 +3686,9 @@ function useExcelService() {
3647
3686
  prefix,
3648
3687
  name,
3649
3688
  context,
3650
- importCompat
3689
+ importCompat,
3690
+ service,
3691
+ xNode
3651
3692
  }) => {
3652
3693
  const jsonData = {
3653
3694
  model,
@@ -3663,7 +3704,14 @@ function useExcelService() {
3663
3704
  jsonData.prefix = prefix;
3664
3705
  jsonData.exclude = [null];
3665
3706
  }
3666
- return env.requests.post("/export/get_fields", jsonData);
3707
+ return env.requests.post(
3708
+ "/export/get_fields",
3709
+ jsonData,
3710
+ {
3711
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3712
+ },
3713
+ service
3714
+ );
3667
3715
  },
3668
3716
  [env]
3669
3717
  );
@@ -3676,7 +3724,9 @@ function useExcelService() {
3676
3724
  type,
3677
3725
  importCompat,
3678
3726
  context,
3679
- groupby
3727
+ groupby,
3728
+ service,
3729
+ xNode
3680
3730
  }) => {
3681
3731
  const jsonData = {
3682
3732
  model,
@@ -3687,7 +3737,14 @@ function useExcelService() {
3687
3737
  with_context: context,
3688
3738
  groupby: groupby ?? []
3689
3739
  };
3690
- return env.requests.post_excel(`/export/${type}`, jsonData);
3740
+ return env.requests.post_excel(
3741
+ `/export/${type}`,
3742
+ jsonData,
3743
+ {
3744
+ headers: { "Content-Type": "application/json", "X-Node": xNode }
3745
+ },
3746
+ service
3747
+ );
3691
3748
  },
3692
3749
  [env]
3693
3750
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "2.9.1",
3
+ "version": "2.9.3",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",