@fctc/interface-logic 3.3.6 → 3.3.8

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
@@ -270,7 +270,10 @@ type SwitchUserLocaleParams = {
270
270
  values: any;
271
271
  };
272
272
  };
273
- declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, SwitchUserLocaleParams, unknown>;
273
+ declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, {
274
+ data: SwitchUserLocaleParams;
275
+ service: string;
276
+ }, unknown>;
274
277
 
275
278
  declare const useButton: () => _tanstack_react_query.UseMutationResult<any, Error, {
276
279
  model: string;
package/dist/hooks.d.ts CHANGED
@@ -270,7 +270,10 @@ type SwitchUserLocaleParams = {
270
270
  values: any;
271
271
  };
272
272
  };
273
- declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, SwitchUserLocaleParams, unknown>;
273
+ declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, {
274
+ data: SwitchUserLocaleParams;
275
+ service: string;
276
+ }, unknown>;
274
277
 
275
278
  declare const useButton: () => _tanstack_react_query.UseMutationResult<any, Error, {
276
279
  model: string;
package/dist/hooks.js CHANGED
@@ -4439,17 +4439,22 @@ function useUserService() {
4439
4439
  [env]
4440
4440
  );
4441
4441
  const switchUserLocale = (0, import_react13.useCallback)(
4442
- async ({ id, values }) => {
4442
+ async ({ id, values, service }) => {
4443
4443
  const jsonData = {
4444
4444
  model: "res.users",
4445
4445
  domain: [["id", "=", id]],
4446
4446
  values
4447
4447
  };
4448
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4449
- headers: {
4450
- "Content-Type": "application/json"
4451
- }
4452
- });
4448
+ return env?.requests.post(
4449
+ UriConstants?.CREATE_UPDATE_PATH,
4450
+ jsonData,
4451
+ {
4452
+ headers: {
4453
+ "Content-Type": "application/json"
4454
+ }
4455
+ },
4456
+ service
4457
+ );
4453
4458
  },
4454
4459
  [env]
4455
4460
  );
@@ -6538,10 +6543,14 @@ var import_react_query48 = require("@tanstack/react-query");
6538
6543
  var useSwitchLocale = () => {
6539
6544
  const { switchUserLocale } = useUserService();
6540
6545
  return (0, import_react_query48.useMutation)({
6541
- mutationFn: ({ data }) => {
6546
+ mutationFn: ({
6547
+ data,
6548
+ service
6549
+ }) => {
6542
6550
  return switchUserLocale({
6543
- id: data.id,
6544
- values: data.values
6551
+ id: data.data.id,
6552
+ values: data.data.values,
6553
+ service
6545
6554
  });
6546
6555
  }
6547
6556
  });
package/dist/hooks.mjs CHANGED
@@ -4306,17 +4306,22 @@ function useUserService() {
4306
4306
  [env]
4307
4307
  );
4308
4308
  const switchUserLocale = useCallback9(
4309
- async ({ id, values }) => {
4309
+ async ({ id, values, service }) => {
4310
4310
  const jsonData = {
4311
4311
  model: "res.users",
4312
4312
  domain: [["id", "=", id]],
4313
4313
  values
4314
4314
  };
4315
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4316
- headers: {
4317
- "Content-Type": "application/json"
4318
- }
4319
- });
4315
+ return env?.requests.post(
4316
+ UriConstants?.CREATE_UPDATE_PATH,
4317
+ jsonData,
4318
+ {
4319
+ headers: {
4320
+ "Content-Type": "application/json"
4321
+ }
4322
+ },
4323
+ service
4324
+ );
4320
4325
  },
4321
4326
  [env]
4322
4327
  );
@@ -6405,10 +6410,14 @@ import { useMutation as useMutation34 } from "@tanstack/react-query";
6405
6410
  var useSwitchLocale = () => {
6406
6411
  const { switchUserLocale } = useUserService();
6407
6412
  return useMutation34({
6408
- mutationFn: ({ data }) => {
6413
+ mutationFn: ({
6414
+ data,
6415
+ service
6416
+ }) => {
6409
6417
  return switchUserLocale({
6410
- id: data.id,
6411
- values: data.values
6418
+ id: data.data.id,
6419
+ values: data.data.values,
6420
+ service
6412
6421
  });
6413
6422
  }
6414
6423
  });
package/dist/provider.js CHANGED
@@ -4435,17 +4435,22 @@ function useUserService() {
4435
4435
  [env]
4436
4436
  );
4437
4437
  const switchUserLocale = (0, import_react9.useCallback)(
4438
- async ({ id, values }) => {
4438
+ async ({ id, values, service }) => {
4439
4439
  const jsonData = {
4440
4440
  model: "res.users",
4441
4441
  domain: [["id", "=", id]],
4442
4442
  values
4443
4443
  };
4444
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4445
- headers: {
4446
- "Content-Type": "application/json"
4447
- }
4448
- });
4444
+ return env?.requests.post(
4445
+ UriConstants?.CREATE_UPDATE_PATH,
4446
+ jsonData,
4447
+ {
4448
+ headers: {
4449
+ "Content-Type": "application/json"
4450
+ }
4451
+ },
4452
+ service
4453
+ );
4449
4454
  },
4450
4455
  [env]
4451
4456
  );
@@ -6917,10 +6922,14 @@ var import_react_query48 = require("@tanstack/react-query");
6917
6922
  var useSwitchLocale = () => {
6918
6923
  const { switchUserLocale } = useUserService();
6919
6924
  return (0, import_react_query48.useMutation)({
6920
- mutationFn: ({ data }) => {
6925
+ mutationFn: ({
6926
+ data,
6927
+ service
6928
+ }) => {
6921
6929
  return switchUserLocale({
6922
- id: data.id,
6923
- values: data.values
6930
+ id: data.data.id,
6931
+ values: data.data.values,
6932
+ service
6924
6933
  });
6925
6934
  }
6926
6935
  });
package/dist/provider.mjs CHANGED
@@ -4392,17 +4392,22 @@ function useUserService() {
4392
4392
  [env]
4393
4393
  );
4394
4394
  const switchUserLocale = useCallback8(
4395
- async ({ id, values }) => {
4395
+ async ({ id, values, service }) => {
4396
4396
  const jsonData = {
4397
4397
  model: "res.users",
4398
4398
  domain: [["id", "=", id]],
4399
4399
  values
4400
4400
  };
4401
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4402
- headers: {
4403
- "Content-Type": "application/json"
4404
- }
4405
- });
4401
+ return env?.requests.post(
4402
+ UriConstants?.CREATE_UPDATE_PATH,
4403
+ jsonData,
4404
+ {
4405
+ headers: {
4406
+ "Content-Type": "application/json"
4407
+ }
4408
+ },
4409
+ service
4410
+ );
4406
4411
  },
4407
4412
  [env]
4408
4413
  );
@@ -6874,10 +6879,14 @@ import { useMutation as useMutation34 } from "@tanstack/react-query";
6874
6879
  var useSwitchLocale = () => {
6875
6880
  const { switchUserLocale } = useUserService();
6876
6881
  return useMutation34({
6877
- mutationFn: ({ data }) => {
6882
+ mutationFn: ({
6883
+ data,
6884
+ service
6885
+ }) => {
6878
6886
  return switchUserLocale({
6879
- id: data.id,
6880
- values: data.values
6887
+ id: data.data.id,
6888
+ values: data.data.values,
6889
+ service
6881
6890
  });
6882
6891
  }
6883
6892
  });
@@ -248,7 +248,7 @@ declare function useUserService(): {
248
248
  context: any;
249
249
  id: any;
250
250
  }) => Promise<any>;
251
- switchUserLocale: ({ id, values }: any) => Promise<any>;
251
+ switchUserLocale: ({ id, values, service }: any) => Promise<any>;
252
252
  };
253
253
 
254
254
  declare function useViewService(): {
@@ -248,7 +248,7 @@ declare function useUserService(): {
248
248
  context: any;
249
249
  id: any;
250
250
  }) => Promise<any>;
251
- switchUserLocale: ({ id, values }: any) => Promise<any>;
251
+ switchUserLocale: ({ id, values, service }: any) => Promise<any>;
252
252
  };
253
253
 
254
254
  declare function useViewService(): {
package/dist/services.js CHANGED
@@ -4615,17 +4615,22 @@ function useUserService() {
4615
4615
  [env]
4616
4616
  );
4617
4617
  const switchUserLocale = (0, import_react13.useCallback)(
4618
- async ({ id, values }) => {
4618
+ async ({ id, values, service }) => {
4619
4619
  const jsonData = {
4620
4620
  model: "res.users",
4621
4621
  domain: [["id", "=", id]],
4622
4622
  values
4623
4623
  };
4624
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4625
- headers: {
4626
- "Content-Type": "application/json"
4627
- }
4628
- });
4624
+ return env?.requests.post(
4625
+ UriConstants?.CREATE_UPDATE_PATH,
4626
+ jsonData,
4627
+ {
4628
+ headers: {
4629
+ "Content-Type": "application/json"
4630
+ }
4631
+ },
4632
+ service
4633
+ );
4629
4634
  },
4630
4635
  [env]
4631
4636
  );
package/dist/services.mjs CHANGED
@@ -4571,17 +4571,22 @@ function useUserService() {
4571
4571
  [env]
4572
4572
  );
4573
4573
  const switchUserLocale = useCallback9(
4574
- async ({ id, values }) => {
4574
+ async ({ id, values, service }) => {
4575
4575
  const jsonData = {
4576
4576
  model: "res.users",
4577
4577
  domain: [["id", "=", id]],
4578
4578
  values
4579
4579
  };
4580
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4581
- headers: {
4582
- "Content-Type": "application/json"
4583
- }
4584
- });
4580
+ return env?.requests.post(
4581
+ UriConstants?.CREATE_UPDATE_PATH,
4582
+ jsonData,
4583
+ {
4584
+ headers: {
4585
+ "Content-Type": "application/json"
4586
+ }
4587
+ },
4588
+ service
4589
+ );
4585
4590
  },
4586
4591
  [env]
4587
4592
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.3.6",
3
+ "version": "3.3.8",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",