hububb-saas-shared 1.0.73 → 1.0.74

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.
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ export interface Timestamp {
3
+ seconds: number;
4
+ nanoseconds: number;
5
+ isEqual: (other: Timestamp) => boolean;
6
+ toDate: () => Date;
7
+ toMillis: () => number;
8
+ valueOf: () => string;
9
+ }
10
+ export declare const firestoreTimestampSchema: z.ZodType<Timestamp>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firestoreTimestampSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ // Create a complete type-safe timestamp schema
6
+ exports.firestoreTimestampSchema = zod_1.z
7
+ .object({
8
+ seconds: zod_1.z.number(),
9
+ nanoseconds: zod_1.z.number(),
10
+ isEqual: zod_1.z.function().args(zod_1.z.any()).returns(zod_1.z.boolean()),
11
+ toDate: zod_1.z.function().returns(zod_1.z.date()),
12
+ toMillis: zod_1.z.function().returns(zod_1.z.number()),
13
+ valueOf: zod_1.z.function().returns(zod_1.z.string()),
14
+ })
15
+ .refine((val) => val && typeof val.toDate === "function", "Must be a valid Timestamp");
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./types";
2
2
  export * from "./schemas";
3
+ export * from "./helpers";
package/dist/index.js CHANGED
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./types"), exports);
18
18
  __exportStar(require("./schemas"), exports);
19
+ __exportStar(require("./helpers"), exports);
@@ -1,4 +1,3 @@
1
- export * from "../helpers";
2
1
  export * from "./user";
3
2
  export * from "./user-role";
4
3
  export * from "./tier";
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("../helpers"), exports);
18
17
  __exportStar(require("./user"), exports);
19
18
  __exportStar(require("./user-role"), exports);
20
19
  __exportStar(require("./tier"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.0.73",
4
+ "version": "1.0.74",
5
5
  "description": "This is a shared package for the hububb saas project",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",
@@ -9,7 +9,8 @@
9
9
  "dist/index.js",
10
10
  "dist/index.d.ts",
11
11
  "dist/types/**",
12
- "dist/schemas/**"
12
+ "dist/schemas/**",
13
+ "dist/helpers/**"
13
14
  ],
14
15
  "scripts": {
15
16
  "test": "echo \"Error: no test specified\" && exit 1",