hububb-models 1.0.61 → 1.0.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) 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 +14 -0
  4. package/dist/index.js +30 -0
  5. package/dist/models/apaleo/offer.d.ts +3 -0
  6. package/dist/models/apaleo/offer.js +2 -0
  7. package/dist/models/blog.d.ts +3 -0
  8. package/dist/models/blog.js +2 -0
  9. package/dist/models/calendar.d.ts +4 -0
  10. package/dist/models/calendar.js +2 -0
  11. package/dist/models/listing.d.ts +6 -0
  12. package/dist/models/listing.js +2 -0
  13. package/dist/models/reservation.d.ts +3 -0
  14. package/dist/models/reservation.js +2 -0
  15. package/dist/models/thread.d.ts +4 -0
  16. package/dist/models/thread.js +2 -0
  17. package/dist/models/user.d.ts +3 -0
  18. package/dist/models/user.js +2 -0
  19. package/dist/schemas/apaleo/offer.d.ts +675 -0
  20. package/dist/schemas/apaleo/offer.js +111 -0
  21. package/dist/schemas/blog.d.ts +102 -0
  22. package/dist/schemas/blog.js +33 -0
  23. package/dist/schemas/calendar.d.ts +68 -0
  24. package/dist/schemas/calendar.js +17 -0
  25. package/dist/schemas/listing.d.ts +758 -0
  26. package/dist/schemas/listing.js +122 -0
  27. package/dist/schemas/reservation.d.ts +148 -0
  28. package/dist/schemas/reservation.js +46 -0
  29. package/dist/schemas/thread.d.ts +779 -0
  30. package/dist/schemas/thread.js +27 -0
  31. package/dist/schemas/user.d.ts +148 -0
  32. package/dist/schemas/user.js +42 -0
  33. package/package.json +17 -8
  34. package/src/index.d.ts +0 -6
  35. package/src/index.js +0 -2
  36. package/src/index.ts +0 -9
  37. package/src/models/blog/blog.d.ts +0 -25
  38. package/src/models/blog/blog.js +0 -2
  39. package/src/models/blog/blog.ts +0 -26
  40. package/src/models/listing/listing.d.ts +0 -117
  41. package/src/models/listing/listing.js +0 -2
  42. package/src/models/listing/listing.ts +0 -121
  43. package/src/models/reservation/reservation.d.ts +0 -39
  44. package/src/models/reservation/reservation.js +0 -2
  45. package/src/models/reservation/reservation.ts +0 -40
  46. package/src/models/thread/message.d.ts +0 -15
  47. package/src/models/thread/message.js +0 -2
  48. package/src/models/thread/message.ts +0 -16
  49. package/src/models/thread/thread.d.ts +0 -12
  50. package/src/models/thread/thread.js +0 -2
  51. package/src/models/thread/thread.ts +0 -13
  52. package/src/models/user/user.d.ts +0 -30
  53. package/src/models/user/user.js +0 -2
  54. package/src/models/user/user.ts +0 -30
  55. package/tsconfig.json +0 -10
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListingSchema = exports.PaymentProvidersSchema = exports.DoorSchema = exports.PictureSchema = exports.AddressSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const helpers_1 = require("../helpers");
6
+ exports.AddressSchema = (0, zod_1.object)({
7
+ full: (0, zod_1.string)(),
8
+ lng: (0, zod_1.number)(),
9
+ lat: (0, zod_1.number)(),
10
+ street: (0, zod_1.string)(),
11
+ city: (0, zod_1.string)(),
12
+ country: (0, zod_1.string)(),
13
+ state: (0, zod_1.optional)((0, zod_1.string)()),
14
+ zipcode: (0, zod_1.optional)((0, zod_1.string)()),
15
+ });
16
+ exports.PictureSchema = (0, zod_1.object)({
17
+ regular: (0, zod_1.optional)((0, zod_1.string)()),
18
+ thumbnail: (0, zod_1.optional)((0, zod_1.string)()),
19
+ large: (0, zod_1.optional)((0, zod_1.string)()),
20
+ caption: (0, zod_1.optional)((0, zod_1.string)()),
21
+ original: (0, zod_1.optional)((0, zod_1.string)()),
22
+ height: (0, zod_1.optional)((0, zod_1.number)()),
23
+ size: (0, zod_1.optional)((0, zod_1.number)()),
24
+ width: (0, zod_1.optional)((0, zod_1.number)()),
25
+ });
26
+ exports.DoorSchema = (0, zod_1.object)({
27
+ id: (0, zod_1.optional)((0, zod_1.string)()),
28
+ method: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.literal)("unlock"), (0, zod_1.literal)("open")])),
29
+ });
30
+ exports.PaymentProvidersSchema = (0, zod_1.object)({
31
+ stripe: (0, zod_1.object)({
32
+ active: (0, zod_1.boolean)(),
33
+ status: (0, zod_1.string)(),
34
+ accountName: (0, zod_1.string)(),
35
+ defaultCurrency: (0, zod_1.string)(),
36
+ syncedAt: helpers_1.firestoreTimestampSchema,
37
+ payload: (0, zod_1.object)({
38
+ id: (0, zod_1.string)(),
39
+ livemode: (0, zod_1.boolean)(),
40
+ token_type: (0, zod_1.string)(),
41
+ stripe_publishable_key: (0, zod_1.string)(),
42
+ stripe_user_id: (0, zod_1.string)(),
43
+ scope: (0, zod_1.string)(),
44
+ }),
45
+ }),
46
+ });
47
+ exports.ListingSchema = (0, zod_1.object)({
48
+ id: (0, zod_1.optional)((0, zod_1.string)()),
49
+ _geo: (0, zod_1.object)({
50
+ lat: (0, zod_1.number)(),
51
+ lng: (0, zod_1.number)(),
52
+ }),
53
+ guestyId: (0, zod_1.optional)((0, zod_1.string)()),
54
+ accountId: (0, zod_1.optional)((0, zod_1.string)()),
55
+ createdAt: helpers_1.firestoreTimestampSchema,
56
+ isVirtual: (0, zod_1.optional)((0, zod_1.boolean)()),
57
+ isListed: (0, zod_1.boolean)(),
58
+ title: (0, zod_1.optional)((0, zod_1.string)()),
59
+ propertyType: (0, zod_1.optional)((0, zod_1.string)()),
60
+ roomType: (0, zod_1.optional)((0, zod_1.string)()),
61
+ bedType: (0, zod_1.optional)((0, zod_1.string)()),
62
+ accommodates: (0, zod_1.optional)((0, zod_1.number)()),
63
+ bedrooms: (0, zod_1.optional)((0, zod_1.number)()),
64
+ bathrooms: (0, zod_1.optional)((0, zod_1.number)()),
65
+ bathroomShared: (0, zod_1.optional)((0, zod_1.number)()),
66
+ bathroomPrivate: (0, zod_1.optional)((0, zod_1.number)()),
67
+ beds: (0, zod_1.optional)((0, zod_1.number)()),
68
+ areaSquareFeet: (0, zod_1.optional)((0, zod_1.number)()),
69
+ address: exports.AddressSchema,
70
+ publishedAddress: (0, zod_1.optional)((0, zod_1.object)({
71
+ full: (0, zod_1.string)(),
72
+ lng: (0, zod_1.number)(),
73
+ lat: (0, zod_1.number)(),
74
+ street: (0, zod_1.string)(),
75
+ city: (0, zod_1.string)(),
76
+ country: (0, zod_1.string)(),
77
+ })),
78
+ timezone: (0, zod_1.optional)((0, zod_1.string)()),
79
+ defaultCheckInTime: (0, zod_1.optional)((0, zod_1.string)()),
80
+ defaultCheckOutTime: (0, zod_1.optional)((0, zod_1.string)()),
81
+ picture: (0, zod_1.optional)(exports.PictureSchema),
82
+ pictures: (0, zod_1.array)(exports.PictureSchema),
83
+ amenities: (0, zod_1.array)((0, zod_1.string)()),
84
+ terms: (0, zod_1.object)({
85
+ minNights: (0, zod_1.number)(),
86
+ maxNights: (0, zod_1.number)(),
87
+ cancellation: (0, zod_1.string)(),
88
+ }),
89
+ prices: (0, zod_1.object)({
90
+ guestsIncludedInRegularFee: (0, zod_1.optional)((0, zod_1.number)()),
91
+ extraPersonFee: (0, zod_1.optional)((0, zod_1.number)()),
92
+ basePrice: (0, zod_1.number)(),
93
+ basePriceUSD: (0, zod_1.optional)((0, zod_1.number)()),
94
+ monthlyPriceFactor: (0, zod_1.optional)((0, zod_1.number)()),
95
+ weeklyPriceFactor: (0, zod_1.optional)((0, zod_1.number)()),
96
+ weekendBasePrice: (0, zod_1.optional)((0, zod_1.number)()),
97
+ securityDepositFee: (0, zod_1.optional)((0, zod_1.number)()),
98
+ currency: (0, zod_1.string)(),
99
+ cleaningFee: (0, zod_1.number)(),
100
+ }),
101
+ netIncomeFormula: (0, zod_1.optional)((0, zod_1.string)()),
102
+ commissionFormula: (0, zod_1.optional)((0, zod_1.string)()),
103
+ commissionTaxPrecentage: (0, zod_1.optional)((0, zod_1.string)()),
104
+ paymentProcessing: (0, zod_1.optional)((0, zod_1.object)({
105
+ active: (0, zod_1.boolean)(),
106
+ paymentProviders: exports.PaymentProvidersSchema,
107
+ })),
108
+ active: (0, zod_1.boolean)(),
109
+ publicDescription: (0, zod_1.any)(),
110
+ frontDoor: (0, zod_1.optional)(exports.DoorSchema),
111
+ mainDoor: (0, zod_1.optional)(exports.DoorSchema),
112
+ noAptKey: (0, zod_1.optional)((0, zod_1.boolean)()),
113
+ aptKey: (0, zod_1.optional)((0, zod_1.string)()),
114
+ keyMethod: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.literal)("unlock"), (0, zod_1.literal)("open")])),
115
+ externalId: (0, zod_1.optional)((0, zod_1.string)()),
116
+ requestToBook: (0, zod_1.optional)((0, zod_1.boolean)()),
117
+ nickname: (0, zod_1.optional)((0, zod_1.string)()),
118
+ listingType: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.literal)("parent"), (0, zod_1.literal)("child"), (0, zod_1.literal)("shared")])),
119
+ parentId: (0, zod_1.optional)((0, zod_1.string)()),
120
+ childIds: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
121
+ city: (0, zod_1.optional)((0, zod_1.string)()),
122
+ });
@@ -0,0 +1,148 @@
1
+ export declare const ReservationSchema: import("zod").ZodObject<{
2
+ id: import("zod").ZodString;
3
+ createdAt: import("zod").ZodOptional<import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>>;
4
+ externalId: import("zod").ZodOptional<import("zod").ZodString>;
5
+ checkIn: import("zod").ZodOptional<import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>>;
6
+ checkOut: import("zod").ZodOptional<import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>>;
7
+ status: import("zod").ZodOptional<import("zod").ZodString>;
8
+ statusDescription: import("zod").ZodOptional<import("zod").ZodString>;
9
+ guest: import("zod").ZodOptional<import("zod").ZodObject<{
10
+ id: import("zod").ZodOptional<import("zod").ZodString>;
11
+ externalId: import("zod").ZodOptional<import("zod").ZodString>;
12
+ fullName: import("zod").ZodOptional<import("zod").ZodString>;
13
+ email: import("zod").ZodOptional<import("zod").ZodString>;
14
+ ids: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
15
+ }, "strip", import("zod").ZodTypeAny, {
16
+ id?: string | undefined;
17
+ email?: string | undefined;
18
+ fullName?: string | undefined;
19
+ externalId?: string | undefined;
20
+ ids?: string[] | undefined;
21
+ }, {
22
+ id?: string | undefined;
23
+ email?: string | undefined;
24
+ fullName?: string | undefined;
25
+ externalId?: string | undefined;
26
+ ids?: string[] | undefined;
27
+ }>>;
28
+ listing: import("zod").ZodOptional<import("zod").ZodObject<{
29
+ id: import("zod").ZodOptional<import("zod").ZodString>;
30
+ externalId: import("zod").ZodOptional<import("zod").ZodString>;
31
+ title: import("zod").ZodOptional<import("zod").ZodString>;
32
+ picture: import("zod").ZodOptional<import("zod").ZodString>;
33
+ }, "strip", import("zod").ZodTypeAny, {
34
+ id?: string | undefined;
35
+ picture?: string | undefined;
36
+ title?: string | undefined;
37
+ externalId?: string | undefined;
38
+ }, {
39
+ id?: string | undefined;
40
+ picture?: string | undefined;
41
+ title?: string | undefined;
42
+ externalId?: string | undefined;
43
+ }>>;
44
+ klevio: import("zod").ZodOptional<import("zod").ZodObject<{
45
+ keyId: import("zod").ZodOptional<import("zod").ZodString>;
46
+ from: import("zod").ZodOptional<import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>>;
47
+ to: import("zod").ZodOptional<import("zod").ZodType<import("@firebase/firestore").Timestamp, import("zod").ZodTypeDef, import("@firebase/firestore").Timestamp>>;
48
+ keyholderId: import("zod").ZodOptional<import("zod").ZodString>;
49
+ keyholderEmail: import("zod").ZodOptional<import("zod").ZodString>;
50
+ propertyId: import("zod").ZodOptional<import("zod").ZodString>;
51
+ }, "strip", import("zod").ZodTypeAny, {
52
+ keyId?: string | undefined;
53
+ from?: import("@firebase/firestore").Timestamp | undefined;
54
+ to?: import("@firebase/firestore").Timestamp | undefined;
55
+ keyholderId?: string | undefined;
56
+ keyholderEmail?: string | undefined;
57
+ propertyId?: string | undefined;
58
+ }, {
59
+ keyId?: string | undefined;
60
+ from?: import("@firebase/firestore").Timestamp | undefined;
61
+ to?: import("@firebase/firestore").Timestamp | undefined;
62
+ keyholderId?: string | undefined;
63
+ keyholderEmail?: string | undefined;
64
+ propertyId?: string | undefined;
65
+ }>>;
66
+ refNumber: import("zod").ZodOptional<import("zod").ZodString>;
67
+ money: import("zod").ZodOptional<import("zod").ZodAny>;
68
+ source: import("zod").ZodOptional<import("zod").ZodString>;
69
+ total: import("zod").ZodOptional<import("zod").ZodNumber>;
70
+ guests: import("zod").ZodOptional<import("zod").ZodNumber>;
71
+ adults: import("zod").ZodOptional<import("zod").ZodNumber>;
72
+ children: import("zod").ZodOptional<import("zod").ZodNumber>;
73
+ inboxId: import("zod").ZodOptional<import("zod").ZodNumber>;
74
+ }, "strip", import("zod").ZodTypeAny, {
75
+ id: string;
76
+ source?: string | undefined;
77
+ total?: number | undefined;
78
+ listing?: {
79
+ id?: string | undefined;
80
+ picture?: string | undefined;
81
+ title?: string | undefined;
82
+ externalId?: string | undefined;
83
+ } | undefined;
84
+ children?: number | undefined;
85
+ status?: string | undefined;
86
+ createdAt?: import("@firebase/firestore").Timestamp | undefined;
87
+ externalId?: string | undefined;
88
+ checkIn?: import("@firebase/firestore").Timestamp | undefined;
89
+ checkOut?: import("@firebase/firestore").Timestamp | undefined;
90
+ statusDescription?: string | undefined;
91
+ guest?: {
92
+ id?: string | undefined;
93
+ email?: string | undefined;
94
+ fullName?: string | undefined;
95
+ externalId?: string | undefined;
96
+ ids?: string[] | undefined;
97
+ } | undefined;
98
+ klevio?: {
99
+ keyId?: string | undefined;
100
+ from?: import("@firebase/firestore").Timestamp | undefined;
101
+ to?: import("@firebase/firestore").Timestamp | undefined;
102
+ keyholderId?: string | undefined;
103
+ keyholderEmail?: string | undefined;
104
+ propertyId?: string | undefined;
105
+ } | undefined;
106
+ refNumber?: string | undefined;
107
+ money?: any;
108
+ guests?: number | undefined;
109
+ adults?: number | undefined;
110
+ inboxId?: number | undefined;
111
+ }, {
112
+ id: string;
113
+ source?: string | undefined;
114
+ total?: number | undefined;
115
+ listing?: {
116
+ id?: string | undefined;
117
+ picture?: string | undefined;
118
+ title?: string | undefined;
119
+ externalId?: string | undefined;
120
+ } | undefined;
121
+ children?: number | undefined;
122
+ status?: string | undefined;
123
+ createdAt?: import("@firebase/firestore").Timestamp | undefined;
124
+ externalId?: string | undefined;
125
+ checkIn?: import("@firebase/firestore").Timestamp | undefined;
126
+ checkOut?: import("@firebase/firestore").Timestamp | undefined;
127
+ statusDescription?: string | undefined;
128
+ guest?: {
129
+ id?: string | undefined;
130
+ email?: string | undefined;
131
+ fullName?: string | undefined;
132
+ externalId?: string | undefined;
133
+ ids?: string[] | undefined;
134
+ } | undefined;
135
+ klevio?: {
136
+ keyId?: string | undefined;
137
+ from?: import("@firebase/firestore").Timestamp | undefined;
138
+ to?: import("@firebase/firestore").Timestamp | undefined;
139
+ keyholderId?: string | undefined;
140
+ keyholderEmail?: string | undefined;
141
+ propertyId?: string | undefined;
142
+ } | undefined;
143
+ refNumber?: string | undefined;
144
+ money?: any;
145
+ guests?: number | undefined;
146
+ adults?: number | undefined;
147
+ inboxId?: number | undefined;
148
+ }>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReservationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const helpers_1 = require("../helpers");
6
+ const GuestSchema = (0, zod_1.object)({
7
+ id: (0, zod_1.optional)((0, zod_1.string)()),
8
+ externalId: (0, zod_1.optional)((0, zod_1.string)()),
9
+ fullName: (0, zod_1.optional)((0, zod_1.string)()),
10
+ email: (0, zod_1.optional)((0, zod_1.string)()),
11
+ ids: (0, zod_1.optional)((0, zod_1.array)((0, zod_1.string)())),
12
+ });
13
+ const ListingSchema = (0, zod_1.object)({
14
+ id: (0, zod_1.optional)((0, zod_1.string)()),
15
+ externalId: (0, zod_1.optional)((0, zod_1.string)()),
16
+ title: (0, zod_1.optional)((0, zod_1.string)()),
17
+ picture: (0, zod_1.optional)((0, zod_1.string)()),
18
+ });
19
+ const KlevioSchema = (0, zod_1.object)({
20
+ keyId: (0, zod_1.optional)((0, zod_1.string)()),
21
+ from: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
22
+ to: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
23
+ keyholderId: (0, zod_1.optional)((0, zod_1.string)()),
24
+ keyholderEmail: (0, zod_1.optional)((0, zod_1.string)()),
25
+ propertyId: (0, zod_1.optional)((0, zod_1.string)()),
26
+ });
27
+ exports.ReservationSchema = (0, zod_1.object)({
28
+ id: (0, zod_1.string)(),
29
+ createdAt: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
30
+ externalId: (0, zod_1.optional)((0, zod_1.string)()),
31
+ checkIn: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
32
+ checkOut: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
33
+ status: (0, zod_1.optional)((0, zod_1.string)()),
34
+ statusDescription: (0, zod_1.optional)((0, zod_1.string)()),
35
+ guest: (0, zod_1.optional)(GuestSchema),
36
+ listing: (0, zod_1.optional)(ListingSchema),
37
+ klevio: (0, zod_1.optional)(KlevioSchema),
38
+ refNumber: (0, zod_1.optional)((0, zod_1.string)()),
39
+ money: (0, zod_1.optional)((0, zod_1.any)()),
40
+ source: (0, zod_1.optional)((0, zod_1.string)()),
41
+ total: (0, zod_1.optional)((0, zod_1.number)()),
42
+ guests: (0, zod_1.optional)((0, zod_1.number)()),
43
+ adults: (0, zod_1.optional)((0, zod_1.number)()),
44
+ children: (0, zod_1.optional)((0, zod_1.number)()),
45
+ inboxId: (0, zod_1.optional)((0, zod_1.number)()),
46
+ });