@deallony/shared 1.1.86 → 1.1.91
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.
- package/dist/cjs/constants/common/MetaData.d.ts +15 -0
- package/dist/cjs/constants/common/MetaData.js +18 -0
- package/dist/cjs/constants/common/index.d.ts +1 -0
- package/dist/cjs/constants/common/index.js +1 -0
- package/dist/cjs/constants/index.d.ts +1 -0
- package/dist/cjs/constants/index.js +2 -1
- package/dist/cjs/dto/events/EventVenue.dto.d.ts +7 -0
- package/dist/cjs/dto/events/EventVenue.dto.js +2 -0
- package/dist/cjs/dto/events/index.d.ts +1 -0
- package/dist/cjs/dto/events/index.js +1 -0
- package/dist/cjs/schema/events/EventVenue.schema.d.ts +36 -0
- package/dist/cjs/schema/events/EventVenue.schema.js +35 -0
- package/dist/cjs/schema/events/index.d.ts +1 -0
- package/dist/cjs/schema/events/index.js +1 -0
- package/dist/cjs/types/common/Config.d.ts +20 -1
- package/dist/cjs/types/common/MetaData.d.ts +22 -0
- package/dist/cjs/types/common/MetaData.js +4 -0
- package/dist/cjs/types/common/index.d.ts +1 -0
- package/dist/cjs/types/common/index.js +1 -0
- package/dist/cjs/types/communication/Chat.d.ts +3 -0
- package/dist/cjs/types/communication/Chat.js +2 -2
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +5 -2
- package/dist/cjs/types/user/Favorite.d.ts +14 -0
- package/dist/cjs/types/user/Favorite.js +8 -0
- package/dist/cjs/types/user/Loyalty.d.ts +22 -0
- package/dist/cjs/types/user/Loyalty.js +2 -0
- package/dist/cjs/types/user/Wallet.d.ts +11 -0
- package/dist/cjs/types/user/index.d.ts +2 -0
- package/dist/cjs/types/user/index.js +2 -0
- package/dist/esm/constants/common/MetaData.js +15 -0
- package/dist/esm/constants/common/index.js +1 -0
- package/dist/esm/constants/index.js +1 -0
- package/dist/esm/dto/events/EventVenue.dto.js +1 -0
- package/dist/esm/dto/events/index.js +1 -0
- package/dist/esm/schema/events/EventVenue.schema.js +32 -0
- package/dist/esm/schema/events/index.js +1 -0
- package/dist/esm/types/common/MetaData.js +3 -0
- package/dist/esm/types/common/index.js +1 -0
- package/dist/esm/types/communication/Chat.js +1 -0
- package/dist/esm/types/index.js +3 -0
- package/dist/esm/types/user/Favorite.js +5 -0
- package/dist/esm/types/user/Loyalty.js +1 -0
- package/dist/esm/types/user/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DEFAULT_META_DATA: {
|
|
2
|
+
bathrooms: number[];
|
|
3
|
+
bedrooms: number[];
|
|
4
|
+
motor_filter: {
|
|
5
|
+
filterMotorsMinYear: number;
|
|
6
|
+
filterMotorsMaxYear: number;
|
|
7
|
+
filterMotorsMinMileage: number;
|
|
8
|
+
filterMotorsMaxMileage: number;
|
|
9
|
+
};
|
|
10
|
+
filterDetails: {
|
|
11
|
+
maxPriceProperties: number;
|
|
12
|
+
maxPriceMotors: number;
|
|
13
|
+
maxPriceUsedProducts: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_META_DATA = void 0;
|
|
4
|
+
exports.DEFAULT_META_DATA = {
|
|
5
|
+
bathrooms: [0, 1, 2, 3, 4, 5, 6],
|
|
6
|
+
bedrooms: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
7
|
+
motor_filter: {
|
|
8
|
+
filterMotorsMinYear: 1991,
|
|
9
|
+
filterMotorsMaxYear: new Date().getFullYear() + 1,
|
|
10
|
+
filterMotorsMinMileage: 0,
|
|
11
|
+
filterMotorsMaxMileage: 300000,
|
|
12
|
+
},
|
|
13
|
+
filterDetails: {
|
|
14
|
+
maxPriceProperties: 1000000000000,
|
|
15
|
+
maxPriceMotors: 1000000000,
|
|
16
|
+
maxPriceUsedProducts: 10000000,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -33,8 +33,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.USED_PRODUCT = exports.SERVICE = exports.PROPERTY = exports.MOTOR = exports.EVENTS = exports.AD = exports.Subject = void 0;
|
|
36
|
+
exports.USED_PRODUCT = exports.SERVICE = exports.PROPERTY = exports.MOTOR = exports.EVENTS = exports.AD = exports.COMMON = exports.Subject = void 0;
|
|
37
37
|
exports.Subject = __importStar(require("./common/Subject"));
|
|
38
|
+
exports.COMMON = __importStar(require("./common"));
|
|
38
39
|
exports.AD = __importStar(require("./ad"));
|
|
39
40
|
exports.EVENTS = __importStar(require("./events"));
|
|
40
41
|
exports.MOTOR = __importStar(require("./motor"));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createEventVenueSchema, updateEventVenueSchema, getEventVenueFilterSchema, removeEventVenueSchema, removeManyEventVenuesSchema } from '../../schema/events/EventVenue.schema';
|
|
3
|
+
export type CreateEventVenueDto = z.infer<typeof createEventVenueSchema>;
|
|
4
|
+
export type UpdateEventVenueDto = z.infer<typeof updateEventVenueSchema>;
|
|
5
|
+
export type GetEventVenueFilterDto = z.infer<typeof getEventVenueFilterSchema>;
|
|
6
|
+
export type RemoveEventVenueDto = z.infer<typeof removeEventVenueSchema>;
|
|
7
|
+
export type RemoveManyEventVenuesDto = z.infer<typeof removeManyEventVenuesSchema>;
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Event.dto"), exports);
|
|
18
18
|
__exportStar(require("./EventTimeline.dto"), exports);
|
|
19
19
|
__exportStar(require("./EventWedding.dto"), exports);
|
|
20
|
+
__exportStar(require("./EventVenue.dto"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createEventVenueSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
company_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
5
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
6
|
+
long: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
7
|
+
images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
}, z.core.$loose>>>>;
|
|
10
|
+
supported_event_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
11
|
+
social_links: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const updateEventVenueSchema: z.ZodObject<{
|
|
14
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
15
|
+
name: z.ZodOptional<z.ZodString>;
|
|
16
|
+
company_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
17
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
18
|
+
long: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
19
|
+
images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
20
|
+
url: z.ZodString;
|
|
21
|
+
}, z.core.$loose>>>>;
|
|
22
|
+
supported_event_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
23
|
+
social_links: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const getEventVenueFilterSchema: z.ZodObject<{
|
|
26
|
+
search: z.ZodOptional<z.ZodString>;
|
|
27
|
+
company_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
28
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
29
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const removeEventVenueSchema: z.ZodObject<{
|
|
32
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export declare const removeManyEventVenuesSchema: z.ZodObject<{
|
|
35
|
+
ids: z.ZodArray<z.ZodCoercedNumber<unknown>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeManyEventVenuesSchema = exports.removeEventVenueSchema = exports.getEventVenueFilterSchema = exports.updateEventVenueSchema = exports.createEventVenueSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createEventVenueSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().trim().min(1).max(255),
|
|
7
|
+
company_id: zod_1.z.coerce.number().int().positive().nullable().optional(),
|
|
8
|
+
lat: zod_1.z.coerce.number().nullable().optional(),
|
|
9
|
+
long: zod_1.z.coerce.number().nullable().optional(),
|
|
10
|
+
images: zod_1.z.array(zod_1.z.object({ url: zod_1.z.string().url() }).passthrough()).nullable().optional(),
|
|
11
|
+
supported_event_types: zod_1.z.array(zod_1.z.string()).nullable().optional(),
|
|
12
|
+
social_links: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).nullable().optional(),
|
|
13
|
+
});
|
|
14
|
+
exports.updateEventVenueSchema = zod_1.z.object({
|
|
15
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
16
|
+
name: zod_1.z.string().trim().min(1).max(255).optional(),
|
|
17
|
+
company_id: zod_1.z.coerce.number().int().positive().nullable().optional(),
|
|
18
|
+
lat: zod_1.z.coerce.number().nullable().optional(),
|
|
19
|
+
long: zod_1.z.coerce.number().nullable().optional(),
|
|
20
|
+
images: zod_1.z.array(zod_1.z.object({ url: zod_1.z.string().url() }).passthrough()).nullable().optional(),
|
|
21
|
+
supported_event_types: zod_1.z.array(zod_1.z.string()).nullable().optional(),
|
|
22
|
+
social_links: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).nullable().optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.getEventVenueFilterSchema = zod_1.z.object({
|
|
25
|
+
search: zod_1.z.string().trim().optional(),
|
|
26
|
+
company_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
27
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
28
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
29
|
+
});
|
|
30
|
+
exports.removeEventVenueSchema = zod_1.z.object({
|
|
31
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
32
|
+
});
|
|
33
|
+
exports.removeManyEventVenuesSchema = zod_1.z.object({
|
|
34
|
+
ids: zod_1.z.array(zod_1.z.coerce.number().int().positive()).min(1),
|
|
35
|
+
});
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Event.schema"), exports);
|
|
18
18
|
__exportStar(require("./EventTimeline.schema"), exports);
|
|
19
19
|
__exportStar(require("./EventWedding.schema"), exports);
|
|
20
|
+
__exportStar(require("./EventVenue.schema"), exports);
|
|
@@ -2,6 +2,25 @@ export type ICountries = {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
placeholder: string;
|
|
5
|
-
lengithOfNumber_WithoutCodeAndZero:
|
|
5
|
+
lengithOfNumber_WithoutCodeAndZero: number;
|
|
6
6
|
startsWithDigits: string[];
|
|
7
7
|
};
|
|
8
|
+
export type IServerConfig = {
|
|
9
|
+
minAppVersion: string;
|
|
10
|
+
minVersionCode: string;
|
|
11
|
+
minBuildNumber: string;
|
|
12
|
+
latestAppVersion: string;
|
|
13
|
+
latestVersionCode: string;
|
|
14
|
+
latestBuildNumber: string;
|
|
15
|
+
download_link: string;
|
|
16
|
+
apk_link: string;
|
|
17
|
+
play_store_link: string;
|
|
18
|
+
apple_store_link: string;
|
|
19
|
+
isMaintenance: string;
|
|
20
|
+
otpLength: number;
|
|
21
|
+
ASSETS_SERVER: string;
|
|
22
|
+
sms: boolean;
|
|
23
|
+
countries: ICountries[];
|
|
24
|
+
s: string;
|
|
25
|
+
};
|
|
26
|
+
export type ServerConfigType = IServerConfig | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const bathrooms: readonly [0, 1, 2, 3, 4, 5, 6];
|
|
2
|
+
declare const bedrooms: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
3
|
+
export type MetaDataType = {
|
|
4
|
+
bathrooms: number[];
|
|
5
|
+
bedrooms: number[];
|
|
6
|
+
motor_filter: {
|
|
7
|
+
filterMotorsMinYear: number;
|
|
8
|
+
filterMotorsMaxYear: number;
|
|
9
|
+
filterMotorsMinMileage: number;
|
|
10
|
+
filterMotorsMaxMileage: number;
|
|
11
|
+
};
|
|
12
|
+
filterDetails: {
|
|
13
|
+
maxPriceProperties: number;
|
|
14
|
+
maxPriceMotors: number;
|
|
15
|
+
maxPriceUsedProducts: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type MetaDataDefaults = {
|
|
19
|
+
bathrooms: typeof bathrooms;
|
|
20
|
+
bedrooms: typeof bedrooms;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -42,6 +42,7 @@ export declare enum MessageTypeEnum {
|
|
|
42
42
|
TEXT = 1,
|
|
43
43
|
PRICE_OFFER = 2
|
|
44
44
|
}
|
|
45
|
+
export { MessageTypeEnum as MessageTypeType };
|
|
45
46
|
export type SendMessageDto = {
|
|
46
47
|
chat_room_id: number;
|
|
47
48
|
requester_id: number;
|
|
@@ -52,3 +53,5 @@ export type SendMessageDto = {
|
|
|
52
53
|
payload?: Record<string, any> | null;
|
|
53
54
|
ad_id?: number | null;
|
|
54
55
|
};
|
|
56
|
+
export type MessageType = IChatMessage;
|
|
57
|
+
export type MessageTypeCreate = SendMessageDto;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageTypeEnum = void 0;
|
|
3
|
+
exports.MessageTypeType = exports.MessageTypeEnum = void 0;
|
|
4
4
|
var MessageTypeEnum;
|
|
5
5
|
(function (MessageTypeEnum) {
|
|
6
6
|
MessageTypeEnum[MessageTypeEnum["TEXT"] = 1] = "TEXT";
|
|
7
7
|
MessageTypeEnum[MessageTypeEnum["PRICE_OFFER"] = 2] = "PRICE_OFFER";
|
|
8
|
-
})(MessageTypeEnum || (exports.MessageTypeEnum = MessageTypeEnum = {}));
|
|
8
|
+
})(MessageTypeEnum || (exports.MessageTypeType = exports.MessageTypeEnum = MessageTypeEnum = {}));
|
|
@@ -44,8 +44,11 @@ export * as User from "./user/User";
|
|
|
44
44
|
export * as Role from "./user/Role";
|
|
45
45
|
export * as Permission from "./user/Permission";
|
|
46
46
|
export * as Wallet from "./user/Wallet";
|
|
47
|
+
export * as Favorite from "./user/Favorite";
|
|
48
|
+
export * as Loyalty from "./user/Loyalty";
|
|
47
49
|
export * as PotentialUser from "./user/PotentialUser";
|
|
48
50
|
export * as Company from './company/Company';
|
|
51
|
+
export * as MetaData from "./common/MetaData";
|
|
49
52
|
export * as AppStartScreen from "./communication/AppStartScreen";
|
|
50
53
|
export * as Chat from "./communication/Chat";
|
|
51
54
|
export * as Device from "./communication/Device";
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -36,8 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.NotificationToken = exports.MessageTemplate = exports.Device = void 0;
|
|
39
|
+
exports.Company = exports.PotentialUser = exports.Loyalty = exports.Favorite = exports.Wallet = exports.Permission = exports.Role = exports.User = exports.EventVenue = exports.EventWedding = exports.EventTimeline = exports.Event = exports.District = exports.City = exports.AdminBoundary = exports.WorkType = exports.UsedProductCondition = exports.UsedProductAge = exports.Unit = exports.Transmission = exports.RegionalSpec = exports.PublisherType = exports.PropertyStatus = exports.PriceType = exports.OfferType = exports.LicenseType = exports.FuelType = exports.Feature = exports.Facility = exports.Currency = exports.Color = exports.CategoryWorkType = exports.Category = exports.CarBody = exports.UsedProduct = exports.Service = exports.PropertySubType = exports.Property = exports.MotorTrim = exports.Motor = exports.AdPromotion = exports.AdLocation = exports.Ad = exports.FilterParams = exports.Config = exports.AccessType = exports.Status = exports.Subject = exports.Response = exports.LocalizedName = void 0;
|
|
40
|
+
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = void 0;
|
|
41
41
|
// common
|
|
42
42
|
exports.LocalizedName = __importStar(require("./common/LocalizedName"));
|
|
43
43
|
exports.Response = __importStar(require("./common/Response"));
|
|
@@ -90,8 +90,11 @@ exports.User = __importStar(require("./user/User"));
|
|
|
90
90
|
exports.Role = __importStar(require("./user/Role"));
|
|
91
91
|
exports.Permission = __importStar(require("./user/Permission"));
|
|
92
92
|
exports.Wallet = __importStar(require("./user/Wallet"));
|
|
93
|
+
exports.Favorite = __importStar(require("./user/Favorite"));
|
|
94
|
+
exports.Loyalty = __importStar(require("./user/Loyalty"));
|
|
93
95
|
exports.PotentialUser = __importStar(require("./user/PotentialUser"));
|
|
94
96
|
exports.Company = __importStar(require("./company/Company"));
|
|
97
|
+
exports.MetaData = __importStar(require("./common/MetaData"));
|
|
95
98
|
// communication
|
|
96
99
|
exports.AppStartScreen = __importStar(require("./communication/AppStartScreen"));
|
|
97
100
|
exports.Chat = __importStar(require("./communication/Chat"));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAd } from "../ad/Ad";
|
|
2
|
+
import { IUser } from "./User";
|
|
3
|
+
export declare enum FavoritableType {
|
|
4
|
+
USED_PRODUCTS = "used_products",
|
|
5
|
+
SERVICES = "services"
|
|
6
|
+
}
|
|
7
|
+
export type IFavorite = {
|
|
8
|
+
id: number;
|
|
9
|
+
user_id: number;
|
|
10
|
+
user: IUser;
|
|
11
|
+
created_at: Date | string;
|
|
12
|
+
ad: IAd;
|
|
13
|
+
};
|
|
14
|
+
export type FavoriteType = IFavorite;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FavoritableType = void 0;
|
|
4
|
+
var FavoritableType;
|
|
5
|
+
(function (FavoritableType) {
|
|
6
|
+
FavoritableType["USED_PRODUCTS"] = "used_products";
|
|
7
|
+
FavoritableType["SERVICES"] = "services";
|
|
8
|
+
})(FavoritableType || (exports.FavoritableType = FavoritableType = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LocalizedName } from "../common/LocalizedName";
|
|
2
|
+
export type ILoyaltyTransaction = {
|
|
3
|
+
id: number;
|
|
4
|
+
user_id: number;
|
|
5
|
+
wallet_id: number;
|
|
6
|
+
points: number;
|
|
7
|
+
type: "earn" | "spend";
|
|
8
|
+
action: string;
|
|
9
|
+
reference_id?: number | null;
|
|
10
|
+
description?: LocalizedName;
|
|
11
|
+
created_at: string | Date;
|
|
12
|
+
};
|
|
13
|
+
export type LoyaltyRuleMeta = {
|
|
14
|
+
key: "create_ad" | "highlight_ad" | "watch_ads" | "referral" | "daily_login";
|
|
15
|
+
action: string;
|
|
16
|
+
type: "earn" | "spend";
|
|
17
|
+
note: LocalizedName;
|
|
18
|
+
points?: number;
|
|
19
|
+
pointsPerAd?: number;
|
|
20
|
+
dailyLimit?: number;
|
|
21
|
+
};
|
|
22
|
+
export type LoyaltyTransactionType = ILoyaltyTransaction;
|
|
@@ -5,3 +5,14 @@ export type IWallet = {
|
|
|
5
5
|
loyalty_points: number;
|
|
6
6
|
updated_at: string | Date;
|
|
7
7
|
};
|
|
8
|
+
export type IWalletTransaction = {
|
|
9
|
+
id: number;
|
|
10
|
+
wallet_id: number;
|
|
11
|
+
amount: string;
|
|
12
|
+
transaction_type: "credit" | "debit" | string;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
media: any;
|
|
15
|
+
created_at: string | Date;
|
|
16
|
+
};
|
|
17
|
+
export type WalletType = IWallet;
|
|
18
|
+
export type WalletTransactionType = IWalletTransaction;
|
|
@@ -18,4 +18,6 @@ __exportStar(require("./User"), exports);
|
|
|
18
18
|
__exportStar(require("./Role"), exports);
|
|
19
19
|
__exportStar(require("./Permission"), exports);
|
|
20
20
|
__exportStar(require("./Wallet"), exports);
|
|
21
|
+
__exportStar(require("./Favorite"), exports);
|
|
22
|
+
__exportStar(require("./Loyalty"), exports);
|
|
21
23
|
__exportStar(require("./PotentialUser"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const DEFAULT_META_DATA = {
|
|
2
|
+
bathrooms: [0, 1, 2, 3, 4, 5, 6],
|
|
3
|
+
bedrooms: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
4
|
+
motor_filter: {
|
|
5
|
+
filterMotorsMinYear: 1991,
|
|
6
|
+
filterMotorsMaxYear: new Date().getFullYear() + 1,
|
|
7
|
+
filterMotorsMinMileage: 0,
|
|
8
|
+
filterMotorsMaxMileage: 300000,
|
|
9
|
+
},
|
|
10
|
+
filterDetails: {
|
|
11
|
+
maxPriceProperties: 1000000000000,
|
|
12
|
+
maxPriceMotors: 1000000000,
|
|
13
|
+
maxPriceUsedProducts: 10000000,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const createEventVenueSchema = z.object({
|
|
3
|
+
name: z.string().trim().min(1).max(255),
|
|
4
|
+
company_id: z.coerce.number().int().positive().nullable().optional(),
|
|
5
|
+
lat: z.coerce.number().nullable().optional(),
|
|
6
|
+
long: z.coerce.number().nullable().optional(),
|
|
7
|
+
images: z.array(z.object({ url: z.string().url() }).passthrough()).nullable().optional(),
|
|
8
|
+
supported_event_types: z.array(z.string()).nullable().optional(),
|
|
9
|
+
social_links: z.record(z.string(), z.string()).nullable().optional(),
|
|
10
|
+
});
|
|
11
|
+
export const updateEventVenueSchema = z.object({
|
|
12
|
+
id: z.coerce.number().int().positive(),
|
|
13
|
+
name: z.string().trim().min(1).max(255).optional(),
|
|
14
|
+
company_id: z.coerce.number().int().positive().nullable().optional(),
|
|
15
|
+
lat: z.coerce.number().nullable().optional(),
|
|
16
|
+
long: z.coerce.number().nullable().optional(),
|
|
17
|
+
images: z.array(z.object({ url: z.string().url() }).passthrough()).nullable().optional(),
|
|
18
|
+
supported_event_types: z.array(z.string()).nullable().optional(),
|
|
19
|
+
social_links: z.record(z.string(), z.string()).nullable().optional(),
|
|
20
|
+
});
|
|
21
|
+
export const getEventVenueFilterSchema = z.object({
|
|
22
|
+
search: z.string().trim().optional(),
|
|
23
|
+
company_id: z.coerce.number().int().positive().optional(),
|
|
24
|
+
page: z.coerce.number().int().positive().optional(),
|
|
25
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
26
|
+
});
|
|
27
|
+
export const removeEventVenueSchema = z.object({
|
|
28
|
+
id: z.coerce.number().int().positive(),
|
|
29
|
+
});
|
|
30
|
+
export const removeManyEventVenuesSchema = z.object({
|
|
31
|
+
ids: z.array(z.coerce.number().int().positive()).min(1),
|
|
32
|
+
});
|
package/dist/esm/types/index.js
CHANGED
|
@@ -53,8 +53,11 @@ export * as User from "./user/User.js";
|
|
|
53
53
|
export * as Role from "./user/Role.js";
|
|
54
54
|
export * as Permission from "./user/Permission.js";
|
|
55
55
|
export * as Wallet from "./user/Wallet.js";
|
|
56
|
+
export * as Favorite from "./user/Favorite.js";
|
|
57
|
+
export * as Loyalty from "./user/Loyalty.js";
|
|
56
58
|
export * as PotentialUser from "./user/PotentialUser.js";
|
|
57
59
|
export * as Company from './company/Company.js';
|
|
60
|
+
export * as MetaData from "./common/MetaData.js";
|
|
58
61
|
// communication
|
|
59
62
|
export * as AppStartScreen from "./communication/AppStartScreen.js";
|
|
60
63
|
export * as Chat from "./communication/Chat.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|