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.
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.js +6 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +30 -0
- package/dist/models/apaleo/offer.d.ts +3 -0
- package/dist/models/apaleo/offer.js +2 -0
- package/dist/models/blog.d.ts +3 -0
- package/dist/models/blog.js +2 -0
- package/dist/models/calendar.d.ts +4 -0
- package/dist/models/calendar.js +2 -0
- package/dist/models/listing.d.ts +6 -0
- package/dist/models/listing.js +2 -0
- package/dist/models/reservation.d.ts +3 -0
- package/dist/models/reservation.js +2 -0
- package/dist/models/thread.d.ts +4 -0
- package/dist/models/thread.js +2 -0
- package/dist/models/user.d.ts +3 -0
- package/dist/models/user.js +2 -0
- package/dist/schemas/apaleo/offer.d.ts +675 -0
- package/dist/schemas/apaleo/offer.js +111 -0
- package/dist/schemas/blog.d.ts +102 -0
- package/dist/schemas/blog.js +33 -0
- package/dist/schemas/calendar.d.ts +68 -0
- package/dist/schemas/calendar.js +17 -0
- package/dist/schemas/listing.d.ts +758 -0
- package/dist/schemas/listing.js +122 -0
- package/dist/schemas/reservation.d.ts +148 -0
- package/dist/schemas/reservation.js +46 -0
- package/dist/schemas/thread.d.ts +779 -0
- package/dist/schemas/thread.js +27 -0
- package/dist/schemas/user.d.ts +148 -0
- package/dist/schemas/user.js +42 -0
- package/package.json +17 -8
- package/src/index.d.ts +0 -6
- package/src/index.js +0 -2
- package/src/index.ts +0 -9
- package/src/models/blog/blog.d.ts +0 -25
- package/src/models/blog/blog.js +0 -2
- package/src/models/blog/blog.ts +0 -26
- package/src/models/listing/listing.d.ts +0 -117
- package/src/models/listing/listing.js +0 -2
- package/src/models/listing/listing.ts +0 -121
- package/src/models/reservation/reservation.d.ts +0 -39
- package/src/models/reservation/reservation.js +0 -2
- package/src/models/reservation/reservation.ts +0 -40
- package/src/models/thread/message.d.ts +0 -15
- package/src/models/thread/message.js +0 -2
- package/src/models/thread/message.ts +0 -16
- package/src/models/thread/thread.d.ts +0 -12
- package/src/models/thread/thread.js +0 -2
- package/src/models/thread/thread.ts +0 -13
- package/src/models/user/user.d.ts +0 -30
- package/src/models/user/user.js +0 -2
- package/src/models/user/user.ts +0 -30
- package/tsconfig.json +0 -10
@@ -0,0 +1,111 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ApaleoOfferSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const totalAmountSchema = (0, zod_1.object)({
|
6
|
+
grossAmount: (0, zod_1.number)(),
|
7
|
+
netAmount: (0, zod_1.number)(),
|
8
|
+
vatType: (0, zod_1.string)(),
|
9
|
+
vatPercent: (0, zod_1.number)(),
|
10
|
+
currency: (0, zod_1.string)(),
|
11
|
+
});
|
12
|
+
const baseAmountSchema = (0, zod_1.object)({
|
13
|
+
grossAmount: (0, zod_1.number)(),
|
14
|
+
netAmount: (0, zod_1.number)(),
|
15
|
+
vatType: (0, zod_1.string)(),
|
16
|
+
vatPercent: (0, zod_1.number)(),
|
17
|
+
currency: (0, zod_1.string)(),
|
18
|
+
});
|
19
|
+
const timeSliceSchema = (0, zod_1.object)({
|
20
|
+
from: (0, zod_1.string)(),
|
21
|
+
to: (0, zod_1.string)(),
|
22
|
+
availableUnits: (0, zod_1.number)(),
|
23
|
+
baseAmount: baseAmountSchema,
|
24
|
+
totalGrossAmount: (0, zod_1.object)({
|
25
|
+
amount: (0, zod_1.number)(),
|
26
|
+
currency: (0, zod_1.string)(),
|
27
|
+
}),
|
28
|
+
});
|
29
|
+
const feeSchema = (0, zod_1.object)({
|
30
|
+
id: (0, zod_1.string)(),
|
31
|
+
code: (0, zod_1.string)(),
|
32
|
+
name: (0, zod_1.string)(),
|
33
|
+
totalAmount: totalAmountSchema,
|
34
|
+
});
|
35
|
+
const taxDetailsSchema = (0, zod_1.object)({
|
36
|
+
vatType: (0, zod_1.string)(),
|
37
|
+
vatPercent: (0, zod_1.number)(),
|
38
|
+
net: (0, zod_1.object)({
|
39
|
+
amount: (0, zod_1.number)(),
|
40
|
+
currency: (0, zod_1.string)(),
|
41
|
+
}),
|
42
|
+
tax: (0, zod_1.object)({
|
43
|
+
amount: (0, zod_1.number)(),
|
44
|
+
currency: (0, zod_1.string)(),
|
45
|
+
}),
|
46
|
+
});
|
47
|
+
const cancellationFeeSchema = (0, zod_1.object)({
|
48
|
+
code: (0, zod_1.string)(),
|
49
|
+
name: (0, zod_1.string)(),
|
50
|
+
description: (0, zod_1.string)(),
|
51
|
+
dueDateTime: (0, zod_1.string)(),
|
52
|
+
fee: (0, zod_1.object)({
|
53
|
+
amount: (0, zod_1.number)(),
|
54
|
+
currency: (0, zod_1.string)(),
|
55
|
+
}),
|
56
|
+
});
|
57
|
+
const noShowFeeSchema = (0, zod_1.object)({
|
58
|
+
code: (0, zod_1.string)(),
|
59
|
+
name: (0, zod_1.string)(),
|
60
|
+
description: (0, zod_1.string)(),
|
61
|
+
fee: (0, zod_1.object)({
|
62
|
+
amount: (0, zod_1.number)(),
|
63
|
+
currency: (0, zod_1.string)(),
|
64
|
+
}),
|
65
|
+
});
|
66
|
+
const ratePlanSchema = (0, zod_1.object)({
|
67
|
+
id: (0, zod_1.string)(),
|
68
|
+
code: (0, zod_1.string)(),
|
69
|
+
name: (0, zod_1.string)(),
|
70
|
+
description: (0, zod_1.string)(),
|
71
|
+
isSubjectToCityTax: (0, zod_1.boolean)(),
|
72
|
+
});
|
73
|
+
const unitGroupSchema = (0, zod_1.object)({
|
74
|
+
id: (0, zod_1.string)(),
|
75
|
+
code: (0, zod_1.string)(),
|
76
|
+
name: (0, zod_1.string)(),
|
77
|
+
description: (0, zod_1.string)(),
|
78
|
+
maxPersons: (0, zod_1.number)(),
|
79
|
+
type: (0, zod_1.string)(),
|
80
|
+
});
|
81
|
+
const offerSchema = (0, zod_1.object)({
|
82
|
+
arrival: (0, zod_1.string)(),
|
83
|
+
departure: (0, zod_1.string)(),
|
84
|
+
unitGroup: unitGroupSchema,
|
85
|
+
minGuaranteeType: (0, zod_1.string)(),
|
86
|
+
availableUnits: (0, zod_1.number)(),
|
87
|
+
ratePlan: ratePlanSchema,
|
88
|
+
totalGrossAmount: (0, zod_1.object)({
|
89
|
+
amount: (0, zod_1.number)(),
|
90
|
+
currency: (0, zod_1.string)(),
|
91
|
+
}),
|
92
|
+
cancellationFee: cancellationFeeSchema.optional(),
|
93
|
+
noShowFee: noShowFeeSchema.optional(),
|
94
|
+
timeSlices: (0, zod_1.array)(timeSliceSchema),
|
95
|
+
fees: (0, zod_1.array)(feeSchema).optional(),
|
96
|
+
taxDetails: (0, zod_1.array)(taxDetailsSchema).optional(),
|
97
|
+
isCorporate: (0, zod_1.boolean)(),
|
98
|
+
prePaymentAmount: (0, zod_1.object)({
|
99
|
+
amount: (0, zod_1.number)(),
|
100
|
+
currency: (0, zod_1.string)(),
|
101
|
+
}),
|
102
|
+
});
|
103
|
+
exports.ApaleoOfferSchema = (0, zod_1.object)({
|
104
|
+
property: (0, zod_1.object)({
|
105
|
+
id: (0, zod_1.string)(),
|
106
|
+
code: (0, zod_1.string)(),
|
107
|
+
name: (0, zod_1.string)(),
|
108
|
+
description: (0, zod_1.string)(),
|
109
|
+
}),
|
110
|
+
offers: (0, zod_1.array)(offerSchema),
|
111
|
+
});
|
@@ -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
|
+
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
export declare const calendarEntrySchema: import("zod").ZodObject<{
|
2
|
+
id: import("zod").ZodNumber;
|
3
|
+
date: import("zod").ZodString;
|
4
|
+
status: import("zod").ZodString;
|
5
|
+
currency: import("zod").ZodString;
|
6
|
+
price: import("zod").ZodNumber;
|
7
|
+
base_price: import("zod").ZodNumber;
|
8
|
+
note: import("zod").ZodNullable<import("zod").ZodString>;
|
9
|
+
reservation_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
10
|
+
listing_id: import("zod").ZodNumber;
|
11
|
+
auto_pricing: import("zod").ZodNumber;
|
12
|
+
}, "strip", import("zod").ZodTypeAny, {
|
13
|
+
id: number;
|
14
|
+
status: string;
|
15
|
+
currency: string;
|
16
|
+
date: string;
|
17
|
+
price: number;
|
18
|
+
base_price: number;
|
19
|
+
note: string | null;
|
20
|
+
reservation_id: number | null;
|
21
|
+
listing_id: number;
|
22
|
+
auto_pricing: number;
|
23
|
+
}, {
|
24
|
+
id: number;
|
25
|
+
status: string;
|
26
|
+
currency: string;
|
27
|
+
date: string;
|
28
|
+
price: number;
|
29
|
+
base_price: number;
|
30
|
+
note: string | null;
|
31
|
+
reservation_id: number | null;
|
32
|
+
listing_id: number;
|
33
|
+
auto_pricing: number;
|
34
|
+
}>;
|
35
|
+
export declare const calendarSchema: import("zod").ZodArray<import("zod").ZodObject<{
|
36
|
+
id: import("zod").ZodNumber;
|
37
|
+
date: import("zod").ZodString;
|
38
|
+
status: import("zod").ZodString;
|
39
|
+
currency: import("zod").ZodString;
|
40
|
+
price: import("zod").ZodNumber;
|
41
|
+
base_price: import("zod").ZodNumber;
|
42
|
+
note: import("zod").ZodNullable<import("zod").ZodString>;
|
43
|
+
reservation_id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
44
|
+
listing_id: import("zod").ZodNumber;
|
45
|
+
auto_pricing: import("zod").ZodNumber;
|
46
|
+
}, "strip", import("zod").ZodTypeAny, {
|
47
|
+
id: number;
|
48
|
+
status: string;
|
49
|
+
currency: string;
|
50
|
+
date: string;
|
51
|
+
price: number;
|
52
|
+
base_price: number;
|
53
|
+
note: string | null;
|
54
|
+
reservation_id: number | null;
|
55
|
+
listing_id: number;
|
56
|
+
auto_pricing: number;
|
57
|
+
}, {
|
58
|
+
id: number;
|
59
|
+
status: string;
|
60
|
+
currency: string;
|
61
|
+
date: string;
|
62
|
+
price: number;
|
63
|
+
base_price: number;
|
64
|
+
note: string | null;
|
65
|
+
reservation_id: number | null;
|
66
|
+
listing_id: number;
|
67
|
+
auto_pricing: number;
|
68
|
+
}>, "many">;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.calendarSchema = exports.calendarEntrySchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.calendarEntrySchema = (0, zod_1.object)({
|
6
|
+
id: (0, zod_1.number)(),
|
7
|
+
date: (0, zod_1.string)(),
|
8
|
+
status: (0, zod_1.string)(),
|
9
|
+
currency: (0, zod_1.string)(),
|
10
|
+
price: (0, zod_1.number)(),
|
11
|
+
base_price: (0, zod_1.number)(),
|
12
|
+
note: (0, zod_1.string)().nullable(),
|
13
|
+
reservation_id: (0, zod_1.number)().nullable(),
|
14
|
+
listing_id: (0, zod_1.number)(),
|
15
|
+
auto_pricing: (0, zod_1.number)().int(),
|
16
|
+
});
|
17
|
+
exports.calendarSchema = (0, zod_1.array)(exports.calendarEntrySchema);
|