@stoker-platform/web-client 0.5.16 → 0.5.17

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/bundle.js CHANGED
@@ -8,7 +8,7 @@ import { getFunctions as $e, httpsCallable as Ye, 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.15", yp = (r) => !!r.auth, vt = (r, e) => {
11
+ const pp = "0.5.16", yp = (r) => !!r.auth, vt = (r, e) => {
12
12
  if (e?.operations)
13
13
  return e.operations.includes(r);
14
14
  }, Cn = (r, e) => e ? e.Role ? r.access?.includes(e.Role) : !1 : !0, gp = (r, e) => r.restrictCreate === !0 ? !1 : e && typeof r.restrictCreate == "object" ? e.Role ? r.restrictCreate?.includes(e.Role) : !1 : !0, _p = (r, e) => r.restrictUpdate === !0 ? !1 : e && typeof r.restrictUpdate == "object" ? e.Role ? r.restrictUpdate?.includes(e.Role) : !1 : !0, re = (r, e) => r.filter((t) => t.name === e)[0], ge = (r) => ["OneToOne", "OneToMany", "ManyToOne", "ManyToMany"].includes(r.type), Rd = (r, e) => {
@@ -11802,7 +11802,7 @@ const fw = async (r, e) => {
11802
11802
  throw new Error(`VALIDATION_ERROR: ${D.message}`);
11803
11803
  }
11804
11804
  if (i && i(), xt(O), by(O, b, g, o, C.uid, d), ac("create", I, r, b, O, o, g, n, c, Io, ko, An, (D) => Ce(f, "tenants", a, "system_fields", v.collection, `${v.collection}-${D.name}`, b), (D, Y) => Ce(f, "tenants", a, "system_unique", v.collection, `Unique-${v.collection}-${D.name}`, Y), (D) => Ce(f, "tenants", a, "system_fields", v.collection, `${v.collection}-${D}`, b)), I.set(Ce(f, "tenants", a, r.join("/"), b), O), !_ && T && He("create", "written", O, r, b, g, C.uid), await dc("create", r, b, O, w, g, A, I, C.uid, T || !1, d, !!_), _?.type === "unique")
11805
- return { docId: b, record: O };
11805
+ return { id: b, ...O };
11806
11806
  T && He("create", "success", O, r, b, g, C.uid);
11807
11807
  const x = ["create", O, b, w, !!_], F = [...x];
11808
11808
  return await oe("postWrite", l, A, x), await oe("postOperation", l, A, F), { id: b, ...O };
@@ -1,4 +1,3 @@
1
- import { Timestamp } from "firebase/firestore";
2
1
  import { StokerRecord, StokerPermissions } from "@stoker-platform/types";
3
2
  export declare const addRecord: (path: string[], data: Partial<StokerRecord>, user?: {
4
3
  password: string;
@@ -9,19 +8,4 @@ export declare const addRecord: (path: string[], data: Partial<StokerRecord>, us
9
8
  type: string;
10
9
  docId: string;
11
10
  };
12
- }, id?: string, onValid?: () => void) => Promise<StokerRecord | {
13
- Collection_Path: string[];
14
- Last_Write_At: Timestamp | FirebaseFirestore.FieldValue;
15
- Last_Save_At: Timestamp | FirebaseFirestore.FieldValue;
16
- Last_Write_By: string;
17
- Last_Write_App: string;
18
- Last_Write_Connection_Status: "Online" | "Offline";
19
- Last_Write_Version: number;
20
- Created_At: Timestamp | FirebaseFirestore.FieldValue;
21
- Saved_At: Timestamp | FirebaseFirestore.FieldValue;
22
- Created_By: string;
23
- id: string;
24
- } | {
25
- docId: string;
26
- record: StokerRecord;
27
- }>;
11
+ }, id?: string, onValid?: () => void) => Promise<StokerRecord>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-client",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [