@mac777/project-pinecone-schema 1.0.1 → 1.0.3
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/events/events.constants.d.ts +1 -8
- package/dist/events/events.constants.js +1 -6
- package/dist/events/events.schema.d.ts +110 -55
- package/dist/events/events.type.d.ts +0 -8
- package/dist/events/utils/ticket.schema.d.ts +6 -3
- package/dist/events/utils/ticket.schema.js +2 -1
- package/package.json +2 -5
- package/src/auth/auth.constants.ts +9 -0
- package/src/auth/auth.schema.ts +65 -0
- package/src/auth/auth.type.ts +42 -0
- package/src/auth/index.ts +3 -0
- package/src/auth/utils/password.schema.ts +18 -0
- package/src/events/events.constants.ts +170 -0
- package/src/events/events.schema.ts +158 -0
- package/src/events/events.type.ts +51 -0
- package/src/events/events.utils.schema.ts +5 -0
- package/{dist/events/events.d.ts → src/events/index.ts} +4 -3
- package/src/events/utils/admin.schema.ts +77 -0
- package/src/events/utils/age.restriction.schema.ts +3 -0
- package/src/events/utils/document.schema.ts +8 -0
- package/src/events/utils/event.type.schema.ts +3 -0
- package/src/events/utils/media.schema.ts +36 -0
- package/src/events/utils/organizer.schema.ts +14 -0
- package/src/events/utils/schedule.schema.ts +10 -0
- package/src/events/utils/ticket.schema.ts +33 -0
- package/src/events/utils/venue.schema.ts +22 -0
- package/src/index.ts +5 -0
- package/src/media/index.ts +2 -0
- package/src/media/media.schema.ts +37 -0
- package/src/media/media.type.ts +18 -0
- package/src/media/utils/backblaze.schema.ts +8 -0
- package/src/media/utils/imagekit.schema.ts +20 -0
- package/src/orders/index.ts +6 -0
- package/src/orders/orders.schema.ts +106 -0
- package/src/orders/orders.type.ts +85 -0
- package/src/orders/payments.schema.ts +81 -0
- package/src/orders/payments.type.ts +87 -0
- package/src/orders/ticket.schema.ts +78 -0
- package/src/orders/ticket.type.ts +103 -0
- package/tsconfig.json +13 -0
- package/dist/auth.d.ts +0 -1
- package/dist/auth.js +0 -18
- package/dist/events/admin.schema.d.ts +0 -208
- package/dist/events/admin.schema.js +0 -70
- package/dist/events/age.restriction.schema.d.ts +0 -2
- package/dist/events/age.restriction.schema.js +0 -5
- package/dist/events/document.schema.d.ts +0 -17
- package/dist/events/document.schema.js +0 -10
- package/dist/events/event.schema.d.ts +0 -0
- package/dist/events/event.schema.js +0 -1
- package/dist/events/event.type.schema.d.ts +0 -2
- package/dist/events/event.type.schema.js +0 -5
- package/dist/events/events.constant.d.ts +0 -9
- package/dist/events/events.constant.js +0 -12
- package/dist/events/events.js +0 -19
- package/dist/events/media.schema.d.ts +0 -77
- package/dist/events/media.schema.js +0 -36
- package/dist/events/organizer.schema.d.ts +0 -55
- package/dist/events/organizer.schema.js +0 -15
- package/dist/events/schedule.schema.d.ts +0 -20
- package/dist/events/schedule.schema.js +0 -11
- package/dist/events/step.schema.d.ts +0 -0
- package/dist/events/step.schema.js +0 -1
- package/dist/events/ticket.schema.d.ts +0 -113
- package/dist/events/ticket.schema.js +0 -29
- package/dist/events/utils.schema.d.ts +0 -6
- package/dist/events/utils.schema.js +0 -22
- package/dist/events/venue.schema.d.ts +0 -75
- package/dist/events/venue.schema.js +0 -22
- package/dist/events.constant.d.ts +0 -9
- package/dist/events.constant.js +0 -12
- package/dist/events.constants.d.ts +0 -9
- package/dist/events.constants.js +0 -12
- package/dist/events.d.ts +0 -39
- package/dist/events.js +0 -2
- package/dist/events.schema.d.ts +0 -229
- package/dist/events.schema.js +0 -95
- package/dist/events.type.d.ts +0 -42
- package/dist/events.type.js +0 -2
- package/dist/events.utils.schema.d.ts +0 -6
- package/dist/events.utils.schema.js +0 -22
package/dist/events/events.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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("./events.schema"), exports);
|
|
18
|
-
__exportStar(require("./events.type"), exports);
|
|
19
|
-
__exportStar(require("./events.utils.schema"), exports);
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const coverImageSchema: z.ZodObject<{
|
|
3
|
-
alt: z.ZodString;
|
|
4
|
-
thumbnailUrl: z.ZodString;
|
|
5
|
-
url: z.ZodString;
|
|
6
|
-
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
alt: string;
|
|
8
|
-
thumbnailUrl: string;
|
|
9
|
-
url: string;
|
|
10
|
-
}, {
|
|
11
|
-
alt: string;
|
|
12
|
-
thumbnailUrl: string;
|
|
13
|
-
url: string;
|
|
14
|
-
}>;
|
|
15
|
-
export declare const gallerySchema: z.ZodArray<z.ZodObject<{
|
|
16
|
-
alt: z.ZodString;
|
|
17
|
-
thumbnailUrl: z.ZodString;
|
|
18
|
-
url: z.ZodString;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
alt: string;
|
|
21
|
-
thumbnailUrl: string;
|
|
22
|
-
url: string;
|
|
23
|
-
}, {
|
|
24
|
-
alt: string;
|
|
25
|
-
thumbnailUrl: string;
|
|
26
|
-
url: string;
|
|
27
|
-
}>, "many">;
|
|
28
|
-
export declare const mediaSchema: z.ZodObject<{
|
|
29
|
-
coverImage: z.ZodObject<{
|
|
30
|
-
alt: z.ZodString;
|
|
31
|
-
thumbnailUrl: z.ZodString;
|
|
32
|
-
url: z.ZodString;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
alt: string;
|
|
35
|
-
thumbnailUrl: string;
|
|
36
|
-
url: string;
|
|
37
|
-
}, {
|
|
38
|
-
alt: string;
|
|
39
|
-
thumbnailUrl: string;
|
|
40
|
-
url: string;
|
|
41
|
-
}>;
|
|
42
|
-
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
-
alt: z.ZodString;
|
|
44
|
-
thumbnailUrl: z.ZodString;
|
|
45
|
-
url: z.ZodString;
|
|
46
|
-
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
alt: string;
|
|
48
|
-
thumbnailUrl: string;
|
|
49
|
-
url: string;
|
|
50
|
-
}, {
|
|
51
|
-
alt: string;
|
|
52
|
-
thumbnailUrl: string;
|
|
53
|
-
url: string;
|
|
54
|
-
}>, "many">>;
|
|
55
|
-
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
coverImage: {
|
|
57
|
-
alt: string;
|
|
58
|
-
thumbnailUrl: string;
|
|
59
|
-
url: string;
|
|
60
|
-
};
|
|
61
|
-
gallery?: {
|
|
62
|
-
alt: string;
|
|
63
|
-
thumbnailUrl: string;
|
|
64
|
-
url: string;
|
|
65
|
-
}[] | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
coverImage: {
|
|
68
|
-
alt: string;
|
|
69
|
-
thumbnailUrl: string;
|
|
70
|
-
url: string;
|
|
71
|
-
};
|
|
72
|
-
gallery?: {
|
|
73
|
-
alt: string;
|
|
74
|
-
thumbnailUrl: string;
|
|
75
|
-
url: string;
|
|
76
|
-
}[] | undefined;
|
|
77
|
-
}>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mediaSchema = exports.gallerySchema = exports.coverImageSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.coverImageSchema = zod_1.z.object({
|
|
6
|
-
alt: zod_1.z.string({
|
|
7
|
-
required_error: 'Alt text is required',
|
|
8
|
-
invalid_type_error: 'Alt text must be a string'
|
|
9
|
-
}),
|
|
10
|
-
thumbnailUrl: zod_1.z.string({
|
|
11
|
-
required_error: 'Thumbnail URL is required',
|
|
12
|
-
invalid_type_error: 'Thumbnail URL must be a string'
|
|
13
|
-
}),
|
|
14
|
-
url: zod_1.z.string({
|
|
15
|
-
required_error: 'URL is required',
|
|
16
|
-
invalid_type_error: 'URL must be a string'
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
exports.gallerySchema = zod_1.z.array(zod_1.z.object({
|
|
20
|
-
alt: zod_1.z.string({
|
|
21
|
-
required_error: 'Alt text is required',
|
|
22
|
-
invalid_type_error: 'Alt text must be a string'
|
|
23
|
-
}),
|
|
24
|
-
thumbnailUrl: zod_1.z.string({
|
|
25
|
-
required_error: 'Thumbnail URL is required',
|
|
26
|
-
invalid_type_error: 'Thumbnail URL must be a string'
|
|
27
|
-
}),
|
|
28
|
-
url: zod_1.z.string({
|
|
29
|
-
required_error: 'URL is required',
|
|
30
|
-
invalid_type_error: 'URL must be a string'
|
|
31
|
-
})
|
|
32
|
-
}));
|
|
33
|
-
exports.mediaSchema = zod_1.z.object({
|
|
34
|
-
coverImage: exports.coverImageSchema,
|
|
35
|
-
gallery: exports.gallerySchema.optional()
|
|
36
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const contactPersonSchema: z.ZodObject<{
|
|
3
|
-
name: z.ZodString;
|
|
4
|
-
phone: z.ZodString;
|
|
5
|
-
email: z.ZodString;
|
|
6
|
-
designation: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
email: string;
|
|
9
|
-
name: string;
|
|
10
|
-
phone: string;
|
|
11
|
-
designation?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
email: string;
|
|
14
|
-
name: string;
|
|
15
|
-
phone: string;
|
|
16
|
-
designation?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const organizerSchema: z.ZodObject<{
|
|
19
|
-
role: z.ZodOptional<z.ZodEnum<["event_organizer", "venue_owner", "authorized_rep", "artist"]>>;
|
|
20
|
-
companyName: z.ZodOptional<z.ZodString>;
|
|
21
|
-
contactPerson: z.ZodObject<{
|
|
22
|
-
name: z.ZodString;
|
|
23
|
-
phone: z.ZodString;
|
|
24
|
-
email: z.ZodString;
|
|
25
|
-
designation: z.ZodOptional<z.ZodString>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
email: string;
|
|
28
|
-
name: string;
|
|
29
|
-
phone: string;
|
|
30
|
-
designation?: string | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
email: string;
|
|
33
|
-
name: string;
|
|
34
|
-
phone: string;
|
|
35
|
-
designation?: string | undefined;
|
|
36
|
-
}>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
contactPerson: {
|
|
39
|
-
email: string;
|
|
40
|
-
name: string;
|
|
41
|
-
phone: string;
|
|
42
|
-
designation?: string | undefined;
|
|
43
|
-
};
|
|
44
|
-
role?: "event_organizer" | "venue_owner" | "authorized_rep" | "artist" | undefined;
|
|
45
|
-
companyName?: string | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
contactPerson: {
|
|
48
|
-
email: string;
|
|
49
|
-
name: string;
|
|
50
|
-
phone: string;
|
|
51
|
-
designation?: string | undefined;
|
|
52
|
-
};
|
|
53
|
-
role?: "event_organizer" | "venue_owner" | "authorized_rep" | "artist" | undefined;
|
|
54
|
-
companyName?: string | undefined;
|
|
55
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.organizerSchema = exports.contactPersonSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.contactPersonSchema = zod_1.z.object({
|
|
6
|
-
name: zod_1.z.string({ required_error: 'Contact person name is required' }),
|
|
7
|
-
phone: zod_1.z.string({ required_error: 'Contact person phone is required' }).min(11, 'Phone number must be 11 digits 11 digits'),
|
|
8
|
-
email: zod_1.z.string({ required_error: 'Contact person email is required' }).email('Contact person email must be valid'),
|
|
9
|
-
designation: zod_1.z.string().optional(),
|
|
10
|
-
});
|
|
11
|
-
exports.organizerSchema = zod_1.z.object({
|
|
12
|
-
role: zod_1.z.enum(['event_organizer', 'venue_owner', 'authorized_rep', 'artist'], { required_error: 'Organizer role must be event_organizer, venue_owner, authorized_rep, or artist' }).optional(),
|
|
13
|
-
companyName: zod_1.z.string().optional(),
|
|
14
|
-
contactPerson: exports.contactPersonSchema,
|
|
15
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const scheduleSchema: z.ZodObject<{
|
|
3
|
-
startDate: z.ZodString;
|
|
4
|
-
endDate: z.ZodString;
|
|
5
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
6
|
-
isMultiDay: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
-
doors: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
startDate: string;
|
|
10
|
-
endDate: string;
|
|
11
|
-
timezone?: string | undefined;
|
|
12
|
-
isMultiDay?: boolean | undefined;
|
|
13
|
-
doors?: string | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
startDate: string;
|
|
16
|
-
endDate: string;
|
|
17
|
-
timezone?: string | undefined;
|
|
18
|
-
isMultiDay?: boolean | undefined;
|
|
19
|
-
doors?: string | undefined;
|
|
20
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scheduleSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.scheduleSchema = zod_1.z.object({
|
|
6
|
-
startDate: zod_1.z.string({ required_error: 'Event start date is required' }).datetime('Start date must be a valid ISO datetime string'),
|
|
7
|
-
endDate: zod_1.z.string({ required_error: 'Event end date is required' }).datetime('End date must be a valid ISO datetime string'),
|
|
8
|
-
timezone: zod_1.z.string().optional(),
|
|
9
|
-
isMultiDay: zod_1.z.boolean().optional(),
|
|
10
|
-
doors: zod_1.z.string().optional(),
|
|
11
|
-
});
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const priceSchema: z.ZodObject<{
|
|
3
|
-
amount: z.ZodNumber;
|
|
4
|
-
currency: z.ZodDefault<z.ZodString>;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
amount: number;
|
|
7
|
-
currency: string;
|
|
8
|
-
}, {
|
|
9
|
-
amount: number;
|
|
10
|
-
currency?: string | undefined;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const salesWindowSchema: z.ZodObject<{
|
|
13
|
-
startDate: z.ZodOptional<z.ZodString>;
|
|
14
|
-
endDate: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
startDate?: string | undefined;
|
|
17
|
-
endDate?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
startDate?: string | undefined;
|
|
20
|
-
endDate?: string | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
export declare const limitsSchema: z.ZodObject<{
|
|
23
|
-
minPerOrder: z.ZodDefault<z.ZodNumber>;
|
|
24
|
-
maxPerOrder: z.ZodDefault<z.ZodNumber>;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
minPerOrder: number;
|
|
27
|
-
maxPerOrder: number;
|
|
28
|
-
}, {
|
|
29
|
-
minPerOrder?: number | undefined;
|
|
30
|
-
maxPerOrder?: number | undefined;
|
|
31
|
-
}>;
|
|
32
|
-
export declare const ticketSchema: z.ZodObject<{
|
|
33
|
-
id: z.ZodOptional<z.ZodString>;
|
|
34
|
-
name: z.ZodString;
|
|
35
|
-
description: z.ZodOptional<z.ZodString>;
|
|
36
|
-
price: z.ZodObject<{
|
|
37
|
-
amount: z.ZodNumber;
|
|
38
|
-
currency: z.ZodDefault<z.ZodString>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
amount: number;
|
|
41
|
-
currency: string;
|
|
42
|
-
}, {
|
|
43
|
-
amount: number;
|
|
44
|
-
currency?: string | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
quantity: z.ZodNumber;
|
|
47
|
-
salesWindow: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
startDate: z.ZodOptional<z.ZodString>;
|
|
49
|
-
endDate: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
startDate?: string | undefined;
|
|
52
|
-
endDate?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
startDate?: string | undefined;
|
|
55
|
-
endDate?: string | undefined;
|
|
56
|
-
}>>;
|
|
57
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
58
|
-
minPerOrder: z.ZodDefault<z.ZodNumber>;
|
|
59
|
-
maxPerOrder: z.ZodDefault<z.ZodNumber>;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
minPerOrder: number;
|
|
62
|
-
maxPerOrder: number;
|
|
63
|
-
}, {
|
|
64
|
-
minPerOrder?: number | undefined;
|
|
65
|
-
maxPerOrder?: number | undefined;
|
|
66
|
-
}>>;
|
|
67
|
-
visibility: z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "hidden", "invite_only"]>>>;
|
|
68
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["active", "inactive"]>>>;
|
|
69
|
-
benefits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
70
|
-
tier: z.ZodDefault<z.ZodEnum<["early_bird", "regular", "vip"]>>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
name: string;
|
|
73
|
-
price: {
|
|
74
|
-
amount: number;
|
|
75
|
-
currency: string;
|
|
76
|
-
};
|
|
77
|
-
quantity: number;
|
|
78
|
-
tier: "early_bird" | "regular" | "vip";
|
|
79
|
-
status?: "active" | "inactive" | undefined;
|
|
80
|
-
id?: string | undefined;
|
|
81
|
-
description?: string | undefined;
|
|
82
|
-
salesWindow?: {
|
|
83
|
-
startDate?: string | undefined;
|
|
84
|
-
endDate?: string | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
limits?: {
|
|
87
|
-
minPerOrder: number;
|
|
88
|
-
maxPerOrder: number;
|
|
89
|
-
} | undefined;
|
|
90
|
-
visibility?: "public" | "hidden" | "invite_only" | undefined;
|
|
91
|
-
benefits?: string[] | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
name: string;
|
|
94
|
-
price: {
|
|
95
|
-
amount: number;
|
|
96
|
-
currency?: string | undefined;
|
|
97
|
-
};
|
|
98
|
-
quantity: number;
|
|
99
|
-
status?: "active" | "inactive" | undefined;
|
|
100
|
-
id?: string | undefined;
|
|
101
|
-
description?: string | undefined;
|
|
102
|
-
salesWindow?: {
|
|
103
|
-
startDate?: string | undefined;
|
|
104
|
-
endDate?: string | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
limits?: {
|
|
107
|
-
minPerOrder?: number | undefined;
|
|
108
|
-
maxPerOrder?: number | undefined;
|
|
109
|
-
} | undefined;
|
|
110
|
-
visibility?: "public" | "hidden" | "invite_only" | undefined;
|
|
111
|
-
benefits?: string[] | undefined;
|
|
112
|
-
tier?: "early_bird" | "regular" | "vip" | undefined;
|
|
113
|
-
}>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ticketSchema = exports.limitsSchema = exports.salesWindowSchema = exports.priceSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.priceSchema = zod_1.z.object({
|
|
6
|
-
amount: zod_1.z.number({ required_error: 'Ticket price amount is required' }).positive('Ticket price must be positive'),
|
|
7
|
-
currency: zod_1.z.string({ required_error: 'Ticket currency is required' }).default('BDT'),
|
|
8
|
-
});
|
|
9
|
-
exports.salesWindowSchema = zod_1.z.object({
|
|
10
|
-
startDate: zod_1.z.string().datetime('Sales start date must be a valid ISO datetime string').optional(),
|
|
11
|
-
endDate: zod_1.z.string().datetime('Sales end date must be a valid ISO datetime string').optional(),
|
|
12
|
-
});
|
|
13
|
-
exports.limitsSchema = zod_1.z.object({
|
|
14
|
-
minPerOrder: zod_1.z.number({ required_error: 'Min per order must be a number' }).int('Min per order must be an integer').min(1, 'Min per order must be at least 1').default(1),
|
|
15
|
-
maxPerOrder: zod_1.z.number({ required_error: 'Max per order must be a number' }).int('Max per order must be an integer').min(1, 'Max per order must be at least 1').default(10),
|
|
16
|
-
});
|
|
17
|
-
exports.ticketSchema = zod_1.z.object({
|
|
18
|
-
id: zod_1.z.string().optional(),
|
|
19
|
-
name: zod_1.z.string({ required_error: 'Ticket name is required' }),
|
|
20
|
-
description: zod_1.z.string().optional(),
|
|
21
|
-
price: exports.priceSchema,
|
|
22
|
-
quantity: zod_1.z.number({ required_error: 'Ticket quantity is required' }).int('Quantity must be an integer').positive('Quantity must be positive'),
|
|
23
|
-
salesWindow: exports.salesWindowSchema.optional(),
|
|
24
|
-
limits: exports.limitsSchema.optional(),
|
|
25
|
-
visibility: zod_1.z.enum(['public', 'hidden', 'invite_only'], { required_error: 'Ticket visibility must be public, hidden, or invite_only' }).default('public').optional(),
|
|
26
|
-
status: zod_1.z.enum(['active', 'inactive'], { required_error: 'Ticket status must be active or inactive' }).default('active').optional(),
|
|
27
|
-
benefits: zod_1.z.array(zod_1.z.string(), { required_error: 'Benefits must be an array of strings' }).optional(),
|
|
28
|
-
tier: zod_1.z.enum(['early_bird', 'regular', 'vip'], { required_error: 'Ticket tier must be early_bird, regular or vip' }).default('regular')
|
|
29
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
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("./admin.schema"), exports);
|
|
18
|
-
__exportStar(require("./media.schema"), exports);
|
|
19
|
-
__exportStar(require("./ticket.schema"), exports);
|
|
20
|
-
__exportStar(require("./document.schema"), exports);
|
|
21
|
-
__exportStar(require("./organizer.schema"), exports);
|
|
22
|
-
__exportStar(require("./venue.schema"), exports);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const venueTypeSchema: z.ZodOptional<z.ZodEnum<["indoor", "outdoor", "hybrid"]>>;
|
|
3
|
-
export declare const addressSchema: z.ZodObject<{
|
|
4
|
-
street: z.ZodString;
|
|
5
|
-
city: z.ZodString;
|
|
6
|
-
country: z.ZodString;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
street: string;
|
|
9
|
-
city: string;
|
|
10
|
-
country: string;
|
|
11
|
-
}, {
|
|
12
|
-
street: string;
|
|
13
|
-
city: string;
|
|
14
|
-
country: string;
|
|
15
|
-
}>;
|
|
16
|
-
export declare const venueSchema: z.ZodObject<{
|
|
17
|
-
name: z.ZodString;
|
|
18
|
-
address: z.ZodObject<{
|
|
19
|
-
street: z.ZodString;
|
|
20
|
-
city: z.ZodString;
|
|
21
|
-
country: z.ZodString;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
street: string;
|
|
24
|
-
city: string;
|
|
25
|
-
country: string;
|
|
26
|
-
}, {
|
|
27
|
-
street: string;
|
|
28
|
-
city: string;
|
|
29
|
-
country: string;
|
|
30
|
-
}>;
|
|
31
|
-
coordinates: z.ZodOptional<z.ZodObject<{
|
|
32
|
-
type: z.ZodLiteral<"Point">;
|
|
33
|
-
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
type: "Point";
|
|
36
|
-
coordinates: [number, number];
|
|
37
|
-
}, {
|
|
38
|
-
type: "Point";
|
|
39
|
-
coordinates: [number, number];
|
|
40
|
-
}>>;
|
|
41
|
-
capacity: z.ZodNumber;
|
|
42
|
-
type: z.ZodOptional<z.ZodEnum<["indoor", "outdoor", "hybrid"]>>;
|
|
43
|
-
parking: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
publicTransit: z.ZodOptional<z.ZodString>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
name: string;
|
|
47
|
-
address: {
|
|
48
|
-
street: string;
|
|
49
|
-
city: string;
|
|
50
|
-
country: string;
|
|
51
|
-
};
|
|
52
|
-
capacity: number;
|
|
53
|
-
type?: "indoor" | "outdoor" | "hybrid" | undefined;
|
|
54
|
-
coordinates?: {
|
|
55
|
-
type: "Point";
|
|
56
|
-
coordinates: [number, number];
|
|
57
|
-
} | undefined;
|
|
58
|
-
parking?: boolean | undefined;
|
|
59
|
-
publicTransit?: string | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
name: string;
|
|
62
|
-
address: {
|
|
63
|
-
street: string;
|
|
64
|
-
city: string;
|
|
65
|
-
country: string;
|
|
66
|
-
};
|
|
67
|
-
capacity: number;
|
|
68
|
-
type?: "indoor" | "outdoor" | "hybrid" | undefined;
|
|
69
|
-
coordinates?: {
|
|
70
|
-
type: "Point";
|
|
71
|
-
coordinates: [number, number];
|
|
72
|
-
} | undefined;
|
|
73
|
-
parking?: boolean | undefined;
|
|
74
|
-
publicTransit?: string | undefined;
|
|
75
|
-
}>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.venueSchema = exports.addressSchema = exports.venueTypeSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.venueTypeSchema = zod_1.z.enum(['indoor', 'outdoor', 'hybrid'], { required_error: 'Venue type must be indoor, outdoor, or hybrid' }).optional();
|
|
6
|
-
exports.addressSchema = zod_1.z.object({
|
|
7
|
-
street: zod_1.z.string({ required_error: 'Street is required' }).min(1, 'Street is required'),
|
|
8
|
-
city: zod_1.z.string({ required_error: 'City is required' }).min(1, 'City is required'),
|
|
9
|
-
country: zod_1.z.string({ required_error: 'Country is required' }).min(1, 'Country is required'),
|
|
10
|
-
});
|
|
11
|
-
exports.venueSchema = zod_1.z.object({
|
|
12
|
-
name: zod_1.z.string({ required_error: 'Venue name is required' }).min(1, 'Venue name is required'),
|
|
13
|
-
address: exports.addressSchema,
|
|
14
|
-
coordinates: zod_1.z.object({
|
|
15
|
-
type: zod_1.z.literal('Point', { required_error: 'Coordinates type must be Point' }),
|
|
16
|
-
coordinates: zod_1.z.tuple([zod_1.z.number({ required_error: 'Longitude is required' }), zod_1.z.number({ required_error: 'Latitude is required' })], { required_error: 'Coordinates array [lng, lat] is required' }), // [lng, lat]
|
|
17
|
-
}).optional(),
|
|
18
|
-
capacity: zod_1.z.number({ required_error: 'Venue capacity is required' }).int('Capacity must be an integer').positive('Capacity must be positive').min(10, 'Capacity must be at least 10'),
|
|
19
|
-
type: exports.venueTypeSchema,
|
|
20
|
-
parking: zod_1.z.boolean().optional(),
|
|
21
|
-
publicTransit: zod_1.z.string().optional(),
|
|
22
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const MAX_TAGLINE_LENGTH = 150;
|
|
2
|
-
export declare const MAX_CATEGORIES = 3;
|
|
3
|
-
export declare const MAX_DESCRIPTION_LENGTH = 2000;
|
|
4
|
-
export declare const MAX_DOCUMENTS = 5;
|
|
5
|
-
export declare const SUPPORTED_IMAGE_TYPES: string[];
|
|
6
|
-
export declare const MAX_FILE_SIZE_MB = 10;
|
|
7
|
-
export declare const MAX_FILE_SIZE_BYTES: number;
|
|
8
|
-
export declare const ALLOWED_FILE_TYPES: string[];
|
|
9
|
-
export declare const ALLOWED_FILE_EXTENSIONS: string[];
|
package/dist/events.constant.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALLOWED_FILE_EXTENSIONS = exports.ALLOWED_FILE_TYPES = exports.MAX_FILE_SIZE_BYTES = exports.MAX_FILE_SIZE_MB = exports.SUPPORTED_IMAGE_TYPES = exports.MAX_DOCUMENTS = exports.MAX_DESCRIPTION_LENGTH = exports.MAX_CATEGORIES = exports.MAX_TAGLINE_LENGTH = void 0;
|
|
4
|
-
exports.MAX_TAGLINE_LENGTH = 150;
|
|
5
|
-
exports.MAX_CATEGORIES = 3;
|
|
6
|
-
exports.MAX_DESCRIPTION_LENGTH = 2000;
|
|
7
|
-
exports.MAX_DOCUMENTS = 5;
|
|
8
|
-
exports.SUPPORTED_IMAGE_TYPES = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp'];
|
|
9
|
-
exports.MAX_FILE_SIZE_MB = 10;
|
|
10
|
-
exports.MAX_FILE_SIZE_BYTES = exports.MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
11
|
-
exports.ALLOWED_FILE_TYPES = ['image/jpeg', 'image/png', 'application/pdf'];
|
|
12
|
-
exports.ALLOWED_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.pdf'];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const MAX_TAGLINE_LENGTH = 150;
|
|
2
|
-
export declare const MAX_CATEGORIES = 3;
|
|
3
|
-
export declare const MAX_DESCRIPTION_LENGTH = 2000;
|
|
4
|
-
export declare const MAX_DOCUMENTS = 5;
|
|
5
|
-
export declare const SUPPORTED_IMAGE_TYPES: string[];
|
|
6
|
-
export declare const MAX_FILE_SIZE_MB = 10;
|
|
7
|
-
export declare const MAX_FILE_SIZE_BYTES: number;
|
|
8
|
-
export declare const ALLOWED_FILE_TYPES: string[];
|
|
9
|
-
export declare const ALLOWED_FILE_EXTENSIONS: string[];
|
package/dist/events.constants.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALLOWED_FILE_EXTENSIONS = exports.ALLOWED_FILE_TYPES = exports.MAX_FILE_SIZE_BYTES = exports.MAX_FILE_SIZE_MB = exports.SUPPORTED_IMAGE_TYPES = exports.MAX_DOCUMENTS = exports.MAX_DESCRIPTION_LENGTH = exports.MAX_CATEGORIES = exports.MAX_TAGLINE_LENGTH = void 0;
|
|
4
|
-
exports.MAX_TAGLINE_LENGTH = 150;
|
|
5
|
-
exports.MAX_CATEGORIES = 3;
|
|
6
|
-
exports.MAX_DESCRIPTION_LENGTH = 2000;
|
|
7
|
-
exports.MAX_DOCUMENTS = 5;
|
|
8
|
-
exports.SUPPORTED_IMAGE_TYPES = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp'];
|
|
9
|
-
exports.MAX_FILE_SIZE_MB = 10;
|
|
10
|
-
exports.MAX_FILE_SIZE_BYTES = exports.MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
11
|
-
exports.ALLOWED_FILE_TYPES = ['image/jpeg', 'image/png', 'application/pdf'];
|
|
12
|
-
exports.ALLOWED_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.pdf'];
|
package/dist/events.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { mediaSchema } from './events/media.schema';
|
|
3
|
-
import { scheduleSchema } from './events/schedule.schema';
|
|
4
|
-
import { venueSchema } from './events/venue.schema';
|
|
5
|
-
import { organizerSchema } from './events/organizer.schema';
|
|
6
|
-
import { documentSchema } from './events/document.schema';
|
|
7
|
-
import { ticketSchema } from './events/ticket.schema';
|
|
8
|
-
export type Document = z.infer<typeof documentSchema>;
|
|
9
|
-
export type Media = z.infer<typeof mediaSchema>;
|
|
10
|
-
export type CoverImage = z.infer<typeof mediaSchema.shape.coverImage>;
|
|
11
|
-
export type Gallery = z.infer<typeof mediaSchema.shape.gallery>;
|
|
12
|
-
export type Organizer = z.infer<typeof organizerSchema>;
|
|
13
|
-
export type ContactPerson = z.infer<typeof organizerSchema.shape.contactPerson>;
|
|
14
|
-
export type Schedule = z.infer<typeof scheduleSchema>;
|
|
15
|
-
export type Ticket = z.infer<typeof ticketSchema>;
|
|
16
|
-
export type Price = z.infer<typeof ticketSchema.shape.price>;
|
|
17
|
-
export type SalesWindow = z.infer<typeof ticketSchema.shape.salesWindow>;
|
|
18
|
-
export type Limits = z.infer<typeof ticketSchema.shape.limits>;
|
|
19
|
-
export type Venue = z.infer<typeof venueSchema>;
|
|
20
|
-
export type VenueType = z.infer<typeof venueSchema.shape.type>;
|
|
21
|
-
export type Address = z.infer<typeof venueSchema.shape.address>;
|
|
22
|
-
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
23
|
-
export type AgeRestriction = z.infer<typeof ageRestrictionSchema>;
|
|
24
|
-
export type StepBasicsData = z.infer<typeof stepBasicsSchema>;
|
|
25
|
-
export type StepDetailsData = z.infer<typeof stepDetailsSchema>;
|
|
26
|
-
export type StepLogisticsData = z.infer<typeof stepLogisticsSchema>;
|
|
27
|
-
export type StepVerifyData = z.infer<typeof stepVerifySchema>;
|
|
28
|
-
export type StepTicketsData = z.infer<typeof stepTicketsSchema>;
|
|
29
|
-
export type StepReviewData = z.infer<typeof stepReviewSchema>;
|
|
30
|
-
export type SubmitEventInput = z.infer<typeof submitEventSchema>;
|
|
31
|
-
export type DraftEventInput = z.infer<typeof draftEventSchema>;
|
|
32
|
-
export interface Event {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
location: string;
|
|
36
|
-
category: string;
|
|
37
|
-
date: string;
|
|
38
|
-
image?: string;
|
|
39
|
-
}
|
package/dist/events.js
DELETED