@stoker-platform/web-client 0.5.42 → 0.5.43

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.
Files changed (2) hide show
  1. package/dist/bundle.js +3 -3
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -8,7 +8,7 @@ import { getFunctions as Ue, httpsCallable as Je, connectFunctionsEmulator as up
8
8
  import { ReCaptchaEnterpriseProvider as fp, initializeAppCheck as Gn, onTokenChanged as Hn } from "firebase/app-check";
9
9
  import { getPerformance as dp } from "firebase/performance";
10
10
  import { getRemoteConfig as hp, fetchAndActivate as mp } from "firebase/remote-config";
11
- const pp = "0.5.41", yp = (r) => !!r.auth, ct = (r, e) => {
11
+ const pp = "0.5.42", yp = (r) => !!r.auth, ct = (r, e) => {
12
12
  if (e?.operations)
13
13
  return e.operations.includes(r);
14
14
  }, An = (r, e) => e ? e.Role ? r.access?.includes(e.Role) : !1 : !0, gp = (r, e) => e ? !e.Role || r.restrictCreate === !0 ? !1 : typeof r.restrictCreate == "object" ? r.restrictCreate?.includes(e.Role) : !0 : !0, vp = (r, e) => e ? !e.Role || r.restrictUpdate === !0 ? !1 : typeof r.restrictUpdate == "object" ? r.restrictUpdate?.includes(e.Role) : !0 : !0, te = (r, e) => r.filter((t) => t.name === e)[0], ve = (r) => ["OneToOne", "OneToMany", "ManyToOne", "ManyToMany"].includes(r.type), Rd = (r, e) => {
@@ -1278,8 +1278,8 @@ const vy = /* @__PURE__ */ In(gy), _y = (r, e, t, n, s, i, a, o, c) => {
1278
1278
  throw new Error("PERMISSION_DENIED");
1279
1279
  i && !ct("Update", d) && (p = !1, O = "Authenticated user does not have Update access to this collection"), i && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1280
1280
  (!dn("Update", n, s, i, a, e) || // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1281
- !dn("Update", n, s, i, a, h)) && (p = !1, O = "Authenticated user does not have Update access to this document"), i && n.softDelete && r[n.softDelete.archivedField] === !0 && !e[n.softDelete.archivedField] && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1282
- !ct("Delete", d) && (p = !1, O = "Authenticated user does not have Delete access to this document");
1281
+ !dn("Update", n, s, i, a, h)) && (p = !1, O = "Authenticated user does not have Update access to this document"), i && n.softDelete && h[n.softDelete.archivedField] !== e[n.softDelete.archivedField] && // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1282
+ !ct("Delete", d) && (p = !1, O = "Authenticated user does not have Delete or Restore access to this document");
1283
1283
  for (const g of f) {
1284
1284
  const w = r[g.name];
1285
1285
  g.access && !An(g, a) && w !== void 0 && (O = `Authenticated user does not have access to field ${g.name}`, p = !1), w !== void 0 && !vp(g, a) && (O = `Authenticated user does not have Update access to field ${g.name}`, p = !1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-client",
3
- "version": "0.5.42",
3
+ "version": "0.5.43",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@stoker-platform/types": "0.5.28",
28
- "@stoker-platform/utils": "0.5.36",
28
+ "@stoker-platform/utils": "0.5.37",
29
29
  "@types/lodash": "^4.17.24",
30
30
  "@types/luxon": "^3.7.1",
31
31
  "firebase": "^12.11.0",