@medha-analytics/medha-one-access-react 1.0.8 → 1.0.9
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/index.js
CHANGED
|
@@ -18730,7 +18730,32 @@ function dw() {
|
|
|
18730
18730
|
function fw() {
|
|
18731
18731
|
let e = G(), t = w();
|
|
18732
18732
|
return S({
|
|
18733
|
-
mutationFn: async (t) =>
|
|
18733
|
+
mutationFn: async (t) => {
|
|
18734
|
+
let n = t.id || t.email || "", r = t.first_name ?? "", i = t.last_name ?? "", a = t.email ?? "", o = t.department ?? "", s = t.role ?? "", c = t.manager_id || null, l = {
|
|
18735
|
+
type: t.type ?? "USER",
|
|
18736
|
+
active: t.active ?? !0,
|
|
18737
|
+
id: n,
|
|
18738
|
+
first_name: r,
|
|
18739
|
+
last_name: i,
|
|
18740
|
+
email: a,
|
|
18741
|
+
department: o,
|
|
18742
|
+
role: s,
|
|
18743
|
+
manager_id: c,
|
|
18744
|
+
parent_group_id: t.parent_group_id ?? null,
|
|
18745
|
+
owner_id: t.owner_id ?? null,
|
|
18746
|
+
expression: t.expression ?? null,
|
|
18747
|
+
user_metadata: {
|
|
18748
|
+
name: `${r} ${i}`.trim(),
|
|
18749
|
+
first_name: r,
|
|
18750
|
+
last_name: i,
|
|
18751
|
+
email: a,
|
|
18752
|
+
department: o,
|
|
18753
|
+
role: s,
|
|
18754
|
+
manager_id: c
|
|
18755
|
+
}
|
|
18756
|
+
};
|
|
18757
|
+
return (await e.post("/users/", l)).data;
|
|
18758
|
+
},
|
|
18734
18759
|
onSuccess: () => t.invalidateQueries({ queryKey: ["users"] })
|
|
18735
18760
|
});
|
|
18736
18761
|
}
|
|
@@ -19590,7 +19615,23 @@ function $w(e) {
|
|
|
19590
19615
|
function eT() {
|
|
19591
19616
|
let e = G(), t = w();
|
|
19592
19617
|
return S({
|
|
19593
|
-
mutationFn: async (t) =>
|
|
19618
|
+
mutationFn: async (t) => {
|
|
19619
|
+
let n = t.id || t.name || "", r = t.description ?? "", i = {
|
|
19620
|
+
id: n,
|
|
19621
|
+
type: "USERGROUP",
|
|
19622
|
+
active: t.active ?? !0,
|
|
19623
|
+
expression: t.expression ?? null,
|
|
19624
|
+
manager_id: null,
|
|
19625
|
+
parent_group_id: t.parent_group_id ?? null,
|
|
19626
|
+
owner_id: t.owner_id ?? null,
|
|
19627
|
+
description: r,
|
|
19628
|
+
user_metadata: {
|
|
19629
|
+
name: t.name ?? n,
|
|
19630
|
+
description: r
|
|
19631
|
+
}
|
|
19632
|
+
};
|
|
19633
|
+
return (await e.post("/users/", i)).data;
|
|
19634
|
+
},
|
|
19594
19635
|
onSuccess: () => t.invalidateQueries({ queryKey: ["groups"] })
|
|
19595
19636
|
});
|
|
19596
19637
|
}
|