hububb-models 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/models/listing.d.ts +2 -1
- package/dist/schemas/listing.d.ts +306 -0
- package/dist/schemas/listing.js +42 -1
- package/package.json +1 -1
package/dist/models/listing.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { z } from "zod";
|
2
|
-
import { AddressSchema, DoorSchema, ListingSchema, PictureSchema } from "../schemas/listing";
|
2
|
+
import { AddressSchema, CreateListingSchema, DoorSchema, ListingSchema, PictureSchema } from "../schemas/listing";
|
3
3
|
export type Listing = z.infer<typeof ListingSchema>;
|
4
4
|
export type Door = z.infer<typeof DoorSchema>;
|
5
5
|
export type Address = z.infer<typeof AddressSchema>;
|
6
6
|
export type Picture = z.infer<typeof PictureSchema>;
|
7
|
+
export type CreateListing = z.infer<typeof CreateListingSchema>;
|
@@ -814,3 +814,309 @@ export declare const ListingSchema: import("zod").ZodObject<{
|
|
814
814
|
apaleoPropertyId?: string | undefined;
|
815
815
|
apaleoUnitGroupId?: string | undefined;
|
816
816
|
}>;
|
817
|
+
export declare const CreateListingSchema: import("zod").ZodObject<{
|
818
|
+
title: import("zod").ZodString;
|
819
|
+
propertyType: import("zod").ZodString;
|
820
|
+
roomType: import("zod").ZodString;
|
821
|
+
accommodates: import("zod").ZodNumber;
|
822
|
+
bedrooms: import("zod").ZodNumber;
|
823
|
+
bathrooms: import("zod").ZodNumber;
|
824
|
+
beds: import("zod").ZodNumber;
|
825
|
+
address: import("zod").ZodObject<{
|
826
|
+
full: import("zod").ZodString;
|
827
|
+
lng: import("zod").ZodNumber;
|
828
|
+
lat: import("zod").ZodNumber;
|
829
|
+
street: import("zod").ZodString;
|
830
|
+
city: import("zod").ZodString;
|
831
|
+
country: import("zod").ZodString;
|
832
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
833
|
+
zipcode: import("zod").ZodOptional<import("zod").ZodString>;
|
834
|
+
unit: import("zod").ZodOptional<import("zod").ZodString>;
|
835
|
+
addressDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
836
|
+
}, "strip", import("zod").ZodTypeAny, {
|
837
|
+
full: string;
|
838
|
+
country: string;
|
839
|
+
lng: number;
|
840
|
+
lat: number;
|
841
|
+
street: string;
|
842
|
+
city: string;
|
843
|
+
state?: string | undefined;
|
844
|
+
unit?: string | undefined;
|
845
|
+
zipcode?: string | undefined;
|
846
|
+
addressDescription?: string | undefined;
|
847
|
+
}, {
|
848
|
+
full: string;
|
849
|
+
country: string;
|
850
|
+
lng: number;
|
851
|
+
lat: number;
|
852
|
+
street: string;
|
853
|
+
city: string;
|
854
|
+
state?: string | undefined;
|
855
|
+
unit?: string | undefined;
|
856
|
+
zipcode?: string | undefined;
|
857
|
+
addressDescription?: string | undefined;
|
858
|
+
}>;
|
859
|
+
timezone: import("zod").ZodString;
|
860
|
+
defaultCheckInTime: import("zod").ZodString;
|
861
|
+
defaultCheckOutTime: import("zod").ZodString;
|
862
|
+
picture: import("zod").ZodObject<{
|
863
|
+
regular: import("zod").ZodOptional<import("zod").ZodString>;
|
864
|
+
thumbnail: import("zod").ZodOptional<import("zod").ZodString>;
|
865
|
+
large: import("zod").ZodOptional<import("zod").ZodString>;
|
866
|
+
caption: import("zod").ZodOptional<import("zod").ZodString>;
|
867
|
+
original: import("zod").ZodOptional<import("zod").ZodString>;
|
868
|
+
height: import("zod").ZodOptional<import("zod").ZodNumber>;
|
869
|
+
size: import("zod").ZodOptional<import("zod").ZodNumber>;
|
870
|
+
width: import("zod").ZodOptional<import("zod").ZodNumber>;
|
871
|
+
}, "strip", import("zod").ZodTypeAny, {
|
872
|
+
height?: number | undefined;
|
873
|
+
width?: number | undefined;
|
874
|
+
caption?: string | undefined;
|
875
|
+
size?: number | undefined;
|
876
|
+
regular?: string | undefined;
|
877
|
+
thumbnail?: string | undefined;
|
878
|
+
large?: string | undefined;
|
879
|
+
original?: string | undefined;
|
880
|
+
}, {
|
881
|
+
height?: number | undefined;
|
882
|
+
width?: number | undefined;
|
883
|
+
caption?: string | undefined;
|
884
|
+
size?: number | undefined;
|
885
|
+
regular?: string | undefined;
|
886
|
+
thumbnail?: string | undefined;
|
887
|
+
large?: string | undefined;
|
888
|
+
original?: string | undefined;
|
889
|
+
}>;
|
890
|
+
pictures: import("zod").ZodArray<import("zod").ZodObject<{
|
891
|
+
regular: import("zod").ZodOptional<import("zod").ZodString>;
|
892
|
+
thumbnail: import("zod").ZodOptional<import("zod").ZodString>;
|
893
|
+
large: import("zod").ZodOptional<import("zod").ZodString>;
|
894
|
+
caption: import("zod").ZodOptional<import("zod").ZodString>;
|
895
|
+
original: import("zod").ZodOptional<import("zod").ZodString>;
|
896
|
+
height: import("zod").ZodOptional<import("zod").ZodNumber>;
|
897
|
+
size: import("zod").ZodOptional<import("zod").ZodNumber>;
|
898
|
+
width: import("zod").ZodOptional<import("zod").ZodNumber>;
|
899
|
+
}, "strip", import("zod").ZodTypeAny, {
|
900
|
+
height?: number | undefined;
|
901
|
+
width?: number | undefined;
|
902
|
+
caption?: string | undefined;
|
903
|
+
size?: number | undefined;
|
904
|
+
regular?: string | undefined;
|
905
|
+
thumbnail?: string | undefined;
|
906
|
+
large?: string | undefined;
|
907
|
+
original?: string | undefined;
|
908
|
+
}, {
|
909
|
+
height?: number | undefined;
|
910
|
+
width?: number | undefined;
|
911
|
+
caption?: string | undefined;
|
912
|
+
size?: number | undefined;
|
913
|
+
regular?: string | undefined;
|
914
|
+
thumbnail?: string | undefined;
|
915
|
+
large?: string | undefined;
|
916
|
+
original?: string | undefined;
|
917
|
+
}>, "many">;
|
918
|
+
amenities: import("zod").ZodArray<import("zod").ZodString, "many">;
|
919
|
+
terms: import("zod").ZodObject<{
|
920
|
+
minNights: import("zod").ZodNumber;
|
921
|
+
maxNights: import("zod").ZodNumber;
|
922
|
+
}, "strip", import("zod").ZodTypeAny, {
|
923
|
+
minNights: number;
|
924
|
+
maxNights: number;
|
925
|
+
}, {
|
926
|
+
minNights: number;
|
927
|
+
maxNights: number;
|
928
|
+
}>;
|
929
|
+
prices: import("zod").ZodObject<{
|
930
|
+
guestsIncludedInRegularFee: import("zod").ZodNumber;
|
931
|
+
extraPersonFee: import("zod").ZodNumber;
|
932
|
+
basePrice: import("zod").ZodNumber;
|
933
|
+
basePriceUSD: import("zod").ZodNumber;
|
934
|
+
monthlyPriceFactor: import("zod").ZodNumber;
|
935
|
+
weeklyPriceFactor: import("zod").ZodNumber;
|
936
|
+
weekendBasePrice: import("zod").ZodNumber;
|
937
|
+
securityDepositFee: import("zod").ZodNumber;
|
938
|
+
currency: import("zod").ZodString;
|
939
|
+
cleaningFee: import("zod").ZodNumber;
|
940
|
+
}, "strip", import("zod").ZodTypeAny, {
|
941
|
+
currency: string;
|
942
|
+
guestsIncludedInRegularFee: number;
|
943
|
+
extraPersonFee: number;
|
944
|
+
basePrice: number;
|
945
|
+
basePriceUSD: number;
|
946
|
+
monthlyPriceFactor: number;
|
947
|
+
weeklyPriceFactor: number;
|
948
|
+
weekendBasePrice: number;
|
949
|
+
securityDepositFee: number;
|
950
|
+
cleaningFee: number;
|
951
|
+
}, {
|
952
|
+
currency: string;
|
953
|
+
guestsIncludedInRegularFee: number;
|
954
|
+
extraPersonFee: number;
|
955
|
+
basePrice: number;
|
956
|
+
basePriceUSD: number;
|
957
|
+
monthlyPriceFactor: number;
|
958
|
+
weeklyPriceFactor: number;
|
959
|
+
weekendBasePrice: number;
|
960
|
+
securityDepositFee: number;
|
961
|
+
cleaningFee: number;
|
962
|
+
}>;
|
963
|
+
publicDescription: import("zod").ZodAny;
|
964
|
+
nickname: import("zod").ZodString;
|
965
|
+
metadata: import("zod").ZodObject<{
|
966
|
+
wifiName: import("zod").ZodString;
|
967
|
+
wifiPassword: import("zod").ZodString;
|
968
|
+
checkInInstructions: import("zod").ZodString;
|
969
|
+
checkOutInstructions: import("zod").ZodString;
|
970
|
+
checkInAgent: import("zod").ZodString;
|
971
|
+
}, "strip", import("zod").ZodTypeAny, {
|
972
|
+
wifiName: string;
|
973
|
+
wifiPassword: string;
|
974
|
+
checkInInstructions: string;
|
975
|
+
checkOutInstructions: string;
|
976
|
+
checkInAgent: string;
|
977
|
+
}, {
|
978
|
+
wifiName: string;
|
979
|
+
wifiPassword: string;
|
980
|
+
checkInInstructions: string;
|
981
|
+
checkOutInstructions: string;
|
982
|
+
checkInAgent: string;
|
983
|
+
}>;
|
984
|
+
}, "strip", import("zod").ZodTypeAny, {
|
985
|
+
address: {
|
986
|
+
full: string;
|
987
|
+
country: string;
|
988
|
+
lng: number;
|
989
|
+
lat: number;
|
990
|
+
street: string;
|
991
|
+
city: string;
|
992
|
+
state?: string | undefined;
|
993
|
+
unit?: string | undefined;
|
994
|
+
zipcode?: string | undefined;
|
995
|
+
addressDescription?: string | undefined;
|
996
|
+
};
|
997
|
+
picture: {
|
998
|
+
height?: number | undefined;
|
999
|
+
width?: number | undefined;
|
1000
|
+
caption?: string | undefined;
|
1001
|
+
size?: number | undefined;
|
1002
|
+
regular?: string | undefined;
|
1003
|
+
thumbnail?: string | undefined;
|
1004
|
+
large?: string | undefined;
|
1005
|
+
original?: string | undefined;
|
1006
|
+
};
|
1007
|
+
title: string;
|
1008
|
+
metadata: {
|
1009
|
+
wifiName: string;
|
1010
|
+
wifiPassword: string;
|
1011
|
+
checkInInstructions: string;
|
1012
|
+
checkOutInstructions: string;
|
1013
|
+
checkInAgent: string;
|
1014
|
+
};
|
1015
|
+
pictures: {
|
1016
|
+
height?: number | undefined;
|
1017
|
+
width?: number | undefined;
|
1018
|
+
caption?: string | undefined;
|
1019
|
+
size?: number | undefined;
|
1020
|
+
regular?: string | undefined;
|
1021
|
+
thumbnail?: string | undefined;
|
1022
|
+
large?: string | undefined;
|
1023
|
+
original?: string | undefined;
|
1024
|
+
}[];
|
1025
|
+
propertyType: string;
|
1026
|
+
roomType: string;
|
1027
|
+
accommodates: number;
|
1028
|
+
bedrooms: number;
|
1029
|
+
bathrooms: number;
|
1030
|
+
beds: number;
|
1031
|
+
timezone: string;
|
1032
|
+
defaultCheckInTime: string;
|
1033
|
+
defaultCheckOutTime: string;
|
1034
|
+
amenities: string[];
|
1035
|
+
terms: {
|
1036
|
+
minNights: number;
|
1037
|
+
maxNights: number;
|
1038
|
+
};
|
1039
|
+
prices: {
|
1040
|
+
currency: string;
|
1041
|
+
guestsIncludedInRegularFee: number;
|
1042
|
+
extraPersonFee: number;
|
1043
|
+
basePrice: number;
|
1044
|
+
basePriceUSD: number;
|
1045
|
+
monthlyPriceFactor: number;
|
1046
|
+
weeklyPriceFactor: number;
|
1047
|
+
weekendBasePrice: number;
|
1048
|
+
securityDepositFee: number;
|
1049
|
+
cleaningFee: number;
|
1050
|
+
};
|
1051
|
+
nickname: string;
|
1052
|
+
publicDescription?: any;
|
1053
|
+
}, {
|
1054
|
+
address: {
|
1055
|
+
full: string;
|
1056
|
+
country: string;
|
1057
|
+
lng: number;
|
1058
|
+
lat: number;
|
1059
|
+
street: string;
|
1060
|
+
city: string;
|
1061
|
+
state?: string | undefined;
|
1062
|
+
unit?: string | undefined;
|
1063
|
+
zipcode?: string | undefined;
|
1064
|
+
addressDescription?: string | undefined;
|
1065
|
+
};
|
1066
|
+
picture: {
|
1067
|
+
height?: number | undefined;
|
1068
|
+
width?: number | undefined;
|
1069
|
+
caption?: string | undefined;
|
1070
|
+
size?: number | undefined;
|
1071
|
+
regular?: string | undefined;
|
1072
|
+
thumbnail?: string | undefined;
|
1073
|
+
large?: string | undefined;
|
1074
|
+
original?: string | undefined;
|
1075
|
+
};
|
1076
|
+
title: string;
|
1077
|
+
metadata: {
|
1078
|
+
wifiName: string;
|
1079
|
+
wifiPassword: string;
|
1080
|
+
checkInInstructions: string;
|
1081
|
+
checkOutInstructions: string;
|
1082
|
+
checkInAgent: string;
|
1083
|
+
};
|
1084
|
+
pictures: {
|
1085
|
+
height?: number | undefined;
|
1086
|
+
width?: number | undefined;
|
1087
|
+
caption?: string | undefined;
|
1088
|
+
size?: number | undefined;
|
1089
|
+
regular?: string | undefined;
|
1090
|
+
thumbnail?: string | undefined;
|
1091
|
+
large?: string | undefined;
|
1092
|
+
original?: string | undefined;
|
1093
|
+
}[];
|
1094
|
+
propertyType: string;
|
1095
|
+
roomType: string;
|
1096
|
+
accommodates: number;
|
1097
|
+
bedrooms: number;
|
1098
|
+
bathrooms: number;
|
1099
|
+
beds: number;
|
1100
|
+
timezone: string;
|
1101
|
+
defaultCheckInTime: string;
|
1102
|
+
defaultCheckOutTime: string;
|
1103
|
+
amenities: string[];
|
1104
|
+
terms: {
|
1105
|
+
minNights: number;
|
1106
|
+
maxNights: number;
|
1107
|
+
};
|
1108
|
+
prices: {
|
1109
|
+
currency: string;
|
1110
|
+
guestsIncludedInRegularFee: number;
|
1111
|
+
extraPersonFee: number;
|
1112
|
+
basePrice: number;
|
1113
|
+
basePriceUSD: number;
|
1114
|
+
monthlyPriceFactor: number;
|
1115
|
+
weeklyPriceFactor: number;
|
1116
|
+
weekendBasePrice: number;
|
1117
|
+
securityDepositFee: number;
|
1118
|
+
cleaningFee: number;
|
1119
|
+
};
|
1120
|
+
nickname: string;
|
1121
|
+
publicDescription?: any;
|
1122
|
+
}>;
|
package/dist/schemas/listing.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ListingSchema = exports.PaymentProvidersSchema = exports.DoorSchema = exports.PictureSchema = exports.AddressSchema = void 0;
|
3
|
+
exports.CreateListingSchema = exports.ListingSchema = exports.PaymentProvidersSchema = exports.DoorSchema = exports.PictureSchema = exports.AddressSchema = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const helpers_1 = require("../helpers");
|
6
6
|
exports.AddressSchema = (0, zod_1.object)({
|
@@ -132,3 +132,44 @@ exports.ListingSchema = (0, zod_1.object)({
|
|
132
132
|
checkInAgent: (0, zod_1.optional)((0, zod_1.string)()),
|
133
133
|
})),
|
134
134
|
});
|
135
|
+
exports.CreateListingSchema = (0, zod_1.object)({
|
136
|
+
title: (0, zod_1.string)(),
|
137
|
+
propertyType: (0, zod_1.string)(),
|
138
|
+
roomType: (0, zod_1.string)(),
|
139
|
+
accommodates: (0, zod_1.number)(),
|
140
|
+
bedrooms: (0, zod_1.number)(),
|
141
|
+
bathrooms: (0, zod_1.number)(),
|
142
|
+
beds: (0, zod_1.number)(),
|
143
|
+
address: exports.AddressSchema,
|
144
|
+
timezone: (0, zod_1.string)(),
|
145
|
+
defaultCheckInTime: (0, zod_1.string)(),
|
146
|
+
defaultCheckOutTime: (0, zod_1.string)(),
|
147
|
+
picture: exports.PictureSchema,
|
148
|
+
pictures: (0, zod_1.array)(exports.PictureSchema),
|
149
|
+
amenities: (0, zod_1.array)((0, zod_1.string)()),
|
150
|
+
terms: (0, zod_1.object)({
|
151
|
+
minNights: (0, zod_1.number)(),
|
152
|
+
maxNights: (0, zod_1.number)(),
|
153
|
+
}),
|
154
|
+
prices: (0, zod_1.object)({
|
155
|
+
guestsIncludedInRegularFee: (0, zod_1.number)(),
|
156
|
+
extraPersonFee: (0, zod_1.number)(),
|
157
|
+
basePrice: (0, zod_1.number)(),
|
158
|
+
basePriceUSD: (0, zod_1.number)(),
|
159
|
+
monthlyPriceFactor: (0, zod_1.number)(),
|
160
|
+
weeklyPriceFactor: (0, zod_1.number)(),
|
161
|
+
weekendBasePrice: (0, zod_1.number)(),
|
162
|
+
securityDepositFee: (0, zod_1.number)(),
|
163
|
+
currency: (0, zod_1.string)(),
|
164
|
+
cleaningFee: (0, zod_1.number)(),
|
165
|
+
}),
|
166
|
+
publicDescription: (0, zod_1.any)(),
|
167
|
+
nickname: (0, zod_1.string)(),
|
168
|
+
metadata: (0, zod_1.object)({
|
169
|
+
wifiName: (0, zod_1.string)(),
|
170
|
+
wifiPassword: (0, zod_1.string)(),
|
171
|
+
checkInInstructions: (0, zod_1.string)(),
|
172
|
+
checkOutInstructions: (0, zod_1.string)(),
|
173
|
+
checkInAgent: (0, zod_1.string)(),
|
174
|
+
}),
|
175
|
+
});
|