hububb-models 1.0.60 → 1.0.62

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 (47) hide show
  1. package/dist/helpers/index.d.ts +3 -0
  2. package/dist/helpers/index.js +6 -0
  3. package/dist/index.d.ts +10 -0
  4. package/dist/index.js +26 -0
  5. package/dist/models/blog.d.ts +3 -0
  6. package/dist/models/blog.js +2 -0
  7. package/dist/models/listing.d.ts +6 -0
  8. package/dist/models/listing.js +2 -0
  9. package/dist/models/reservation.d.ts +3 -0
  10. package/dist/models/reservation.js +2 -0
  11. package/dist/models/thread.d.ts +4 -0
  12. package/dist/models/thread.js +2 -0
  13. package/dist/models/user.d.ts +3 -0
  14. package/dist/models/user.js +2 -0
  15. package/dist/schemas/blog.d.ts +102 -0
  16. package/dist/schemas/blog.js +33 -0
  17. package/dist/schemas/listing.d.ts +758 -0
  18. package/dist/schemas/listing.js +122 -0
  19. package/dist/schemas/reservation.d.ts +148 -0
  20. package/dist/schemas/reservation.js +46 -0
  21. package/dist/schemas/thread.d.ts +779 -0
  22. package/dist/schemas/thread.js +27 -0
  23. package/dist/schemas/user.d.ts +148 -0
  24. package/dist/schemas/user.js +42 -0
  25. package/package.json +17 -8
  26. package/src/index.d.ts +0 -6
  27. package/src/index.js +0 -2
  28. package/src/index.ts +0 -9
  29. package/src/models/blog/blog.d.ts +0 -25
  30. package/src/models/blog/blog.js +0 -2
  31. package/src/models/blog/blog.ts +0 -26
  32. package/src/models/listing/listing.d.ts +0 -117
  33. package/src/models/listing/listing.js +0 -2
  34. package/src/models/listing/listing.ts +0 -121
  35. package/src/models/reservation/reservation.d.ts +0 -39
  36. package/src/models/reservation/reservation.js +0 -2
  37. package/src/models/reservation/reservation.ts +0 -40
  38. package/src/models/thread/message.d.ts +0 -15
  39. package/src/models/thread/message.js +0 -2
  40. package/src/models/thread/message.ts +0 -16
  41. package/src/models/thread/thread.d.ts +0 -12
  42. package/src/models/thread/thread.js +0 -2
  43. package/src/models/thread/thread.ts +0 -13
  44. package/src/models/user/user.d.ts +0 -30
  45. package/src/models/user/user.js +0 -2
  46. package/src/models/user/user.ts +0 -30
  47. package/tsconfig.json +0 -10
@@ -0,0 +1,3 @@
1
+ import { Timestamp } from "@firebase/firestore";
2
+ import { z } from "zod";
3
+ export declare const firestoreTimestampSchema: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firestoreTimestampSchema = void 0;
4
+ const firestore_1 = require("@firebase/firestore");
5
+ const zod_1 = require("zod");
6
+ exports.firestoreTimestampSchema = zod_1.z.instanceof(firestore_1.Timestamp);
@@ -0,0 +1,10 @@
1
+ export * from "./schemas/user";
2
+ export * from "./schemas/blog";
3
+ export * from "./schemas/thread";
4
+ export * from "./schemas/reservation";
5
+ export * from "./schemas/listing";
6
+ export * from "./models/user";
7
+ export * from "./models/blog";
8
+ export * from "./models/thread";
9
+ export * from "./models/reservation";
10
+ export * from "./models/listing";
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./schemas/user"), exports);
18
+ __exportStar(require("./schemas/blog"), exports);
19
+ __exportStar(require("./schemas/thread"), exports);
20
+ __exportStar(require("./schemas/reservation"), exports);
21
+ __exportStar(require("./schemas/listing"), exports);
22
+ __exportStar(require("./models/user"), exports);
23
+ __exportStar(require("./models/blog"), exports);
24
+ __exportStar(require("./models/thread"), exports);
25
+ __exportStar(require("./models/reservation"), exports);
26
+ __exportStar(require("./models/listing"), exports);
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { BlogSchema } from "../schemas/blog";
3
+ export type Blog = z.infer<typeof BlogSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ import { AddressSchema, DoorSchema, ListingSchema, PictureSchema } from "../schemas/listing";
3
+ export type Listing = z.infer<typeof ListingSchema>;
4
+ export type Door = z.infer<typeof DoorSchema>;
5
+ export type Address = z.infer<typeof AddressSchema>;
6
+ export type Picture = z.infer<typeof PictureSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { ReservationSchema } from "../schemas/reservation";
3
+ export type Reservation = z.infer<typeof ReservationSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ import { ChatMessageSchema, ChatThreadSchema } from "../schemas/thread";
3
+ export type ChatMessage = z.infer<typeof ChatMessageSchema>;
4
+ export type ChatThread = z.infer<typeof ChatThreadSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { UserSchema } from "../schemas/user";
3
+ export type User = z.infer<typeof UserSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,102 @@
1
+ export declare const BlogSchema: import("zod").ZodObject<{
2
+ id: import("zod").ZodString;
3
+ metaTitle: import("zod").ZodString;
4
+ metaDescription: import("zod").ZodString;
5
+ createdAt: import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>;
6
+ title: import("zod").ZodString;
7
+ subtitle: import("zod").ZodString;
8
+ contentSections: import("zod").ZodArray<import("zod").ZodObject<{
9
+ title: import("zod").ZodString;
10
+ content: import("zod").ZodString;
11
+ subcontent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
12
+ title: import("zod").ZodString;
13
+ content: import("zod").ZodString;
14
+ }, "strip", import("zod").ZodTypeAny, {
15
+ content: string;
16
+ title: string;
17
+ }, {
18
+ content: string;
19
+ title: string;
20
+ }>, "many">>;
21
+ }, "strip", import("zod").ZodTypeAny, {
22
+ content: string;
23
+ title: string;
24
+ subcontent?: {
25
+ content: string;
26
+ title: string;
27
+ }[] | undefined;
28
+ }, {
29
+ content: string;
30
+ title: string;
31
+ subcontent?: {
32
+ content: string;
33
+ title: string;
34
+ }[] | undefined;
35
+ }>, "many">;
36
+ faqs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
37
+ question: import("zod").ZodString;
38
+ answer: import("zod").ZodString;
39
+ }, "strip", import("zod").ZodTypeAny, {
40
+ answer: string;
41
+ question: string;
42
+ }, {
43
+ answer: string;
44
+ question: string;
45
+ }>, "many">>;
46
+ pictures: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
47
+ downloadUrl: import("zod").ZodString;
48
+ sortOrder: import("zod").ZodNumber;
49
+ }, "strip", import("zod").ZodTypeAny, {
50
+ downloadUrl: string;
51
+ sortOrder: number;
52
+ }, {
53
+ downloadUrl: string;
54
+ sortOrder: number;
55
+ }>, "many">>;
56
+ }, "strip", import("zod").ZodTypeAny, {
57
+ id: string;
58
+ title: string;
59
+ metaTitle: string;
60
+ metaDescription: string;
61
+ createdAt: import("@firebase/firestore").Timestamp;
62
+ subtitle: string;
63
+ contentSections: {
64
+ content: string;
65
+ title: string;
66
+ subcontent?: {
67
+ content: string;
68
+ title: string;
69
+ }[] | undefined;
70
+ }[];
71
+ faqs?: {
72
+ answer: string;
73
+ question: string;
74
+ }[] | undefined;
75
+ pictures?: {
76
+ downloadUrl: string;
77
+ sortOrder: number;
78
+ }[] | undefined;
79
+ }, {
80
+ id: string;
81
+ title: string;
82
+ metaTitle: string;
83
+ metaDescription: string;
84
+ createdAt: import("@firebase/firestore").Timestamp;
85
+ subtitle: string;
86
+ contentSections: {
87
+ content: string;
88
+ title: string;
89
+ subcontent?: {
90
+ content: string;
91
+ title: string;
92
+ }[] | undefined;
93
+ }[];
94
+ faqs?: {
95
+ answer: string;
96
+ question: string;
97
+ }[] | undefined;
98
+ pictures?: {
99
+ downloadUrl: string;
100
+ sortOrder: number;
101
+ }[] | undefined;
102
+ }>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlogSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const helpers_1 = require("../helpers");
6
+ const SubcontentSchema = (0, zod_1.object)({
7
+ title: (0, zod_1.string)(),
8
+ content: (0, zod_1.string)(),
9
+ });
10
+ const ContentSectionSchema = (0, zod_1.object)({
11
+ title: (0, zod_1.string)(),
12
+ content: (0, zod_1.string)(),
13
+ subcontent: (0, zod_1.optional)((0, zod_1.array)(SubcontentSchema)),
14
+ });
15
+ const FaqSchema = (0, zod_1.object)({
16
+ question: (0, zod_1.string)(),
17
+ answer: (0, zod_1.string)(),
18
+ });
19
+ const PictureSchema = (0, zod_1.object)({
20
+ downloadUrl: (0, zod_1.string)(),
21
+ sortOrder: (0, zod_1.number)(),
22
+ });
23
+ exports.BlogSchema = (0, zod_1.object)({
24
+ id: (0, zod_1.string)(),
25
+ metaTitle: (0, zod_1.string)(),
26
+ metaDescription: (0, zod_1.string)(),
27
+ createdAt: helpers_1.firestoreTimestampSchema,
28
+ title: (0, zod_1.string)(),
29
+ subtitle: (0, zod_1.string)(),
30
+ contentSections: (0, zod_1.array)(ContentSectionSchema),
31
+ faqs: (0, zod_1.optional)((0, zod_1.array)(FaqSchema)),
32
+ pictures: (0, zod_1.optional)((0, zod_1.array)(PictureSchema)),
33
+ });