@molda-org/events-tickets 0.1.0-next.2 → 0.1.0-next.21
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/index.d.ts +189 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -5
- package/index.d.ts +0 -20
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { MoldaModuleDefinition, MoldaModuleShape } from '@molda-org/module-contracts';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type ModuleRepository } from '@molda-org/module-runtime';
|
|
4
|
+
export type EventsTicketsAction = 'createEvent' | 'issueTicket' | 'cancelTicket' | 'checkInTicket';
|
|
5
|
+
export type EventsTicketsView = 'upcomingEvents' | 'ticketSales' | 'attendance';
|
|
6
|
+
export type EventsTicketsHook = 'useEvents' | 'useTickets' | 'useAttendance';
|
|
7
|
+
export interface EventsTicketsModuleShape extends MoldaModuleShape<'events-tickets', EventsTicketsAction, EventsTicketsView, EventsTicketsHook> {
|
|
8
|
+
readonly stage: 'phase-two';
|
|
9
|
+
readonly category: 'operations';
|
|
10
|
+
readonly purpose: 'Events, capacity, ticket issuance, cancellation, transfer evidence, and check-in.';
|
|
11
|
+
}
|
|
12
|
+
export type EventsTicketsModule = MoldaModuleDefinition<EventsTicketsModuleShape>;
|
|
13
|
+
export declare const EventsTicketsActionIds: readonly ["createEvent", "issueTicket", "cancelTicket", "checkInTicket"];
|
|
14
|
+
export declare const EventsTicketsViewIds: readonly ["upcomingEvents", "ticketSales", "attendance"];
|
|
15
|
+
export declare const EventsTicketsHookIds: readonly ["useEvents", "useTickets", "useAttendance"];
|
|
16
|
+
export declare const EventsTicketsSpecification: {
|
|
17
|
+
readonly id: "events-tickets";
|
|
18
|
+
readonly version: "1.0.0";
|
|
19
|
+
readonly collections: {
|
|
20
|
+
readonly events: z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
startsAt: z.ZodString;
|
|
23
|
+
endsAt: z.ZodString;
|
|
24
|
+
capacity: z.ZodNumber;
|
|
25
|
+
status: z.ZodEnum<{
|
|
26
|
+
draft: "draft";
|
|
27
|
+
published: "published";
|
|
28
|
+
cancelled: "cancelled";
|
|
29
|
+
}>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
readonly tickets: z.ZodObject<{
|
|
32
|
+
eventId: z.ZodString;
|
|
33
|
+
holderName: z.ZodString;
|
|
34
|
+
code: z.ZodString;
|
|
35
|
+
status: z.ZodEnum<{
|
|
36
|
+
cancelled: "cancelled";
|
|
37
|
+
issued: "issued";
|
|
38
|
+
"checked-in": "checked-in";
|
|
39
|
+
}>;
|
|
40
|
+
transitionReason: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
};
|
|
43
|
+
readonly actions: {
|
|
44
|
+
readonly createEvent: {
|
|
45
|
+
readonly kind: "create";
|
|
46
|
+
readonly collection: "events";
|
|
47
|
+
readonly permission: "create.event";
|
|
48
|
+
readonly event: "create.event";
|
|
49
|
+
};
|
|
50
|
+
readonly issueTicket: {
|
|
51
|
+
readonly kind: "create";
|
|
52
|
+
readonly collection: "tickets";
|
|
53
|
+
readonly permission: "issue.ticket";
|
|
54
|
+
readonly event: "issue.ticket";
|
|
55
|
+
readonly confirmation: "required";
|
|
56
|
+
readonly validate: ({ value, transaction }: {
|
|
57
|
+
readonly value: import("@molda-org/module-runtime").ModuleEntityValue;
|
|
58
|
+
readonly current: import("@molda-org/module-runtime").ModuleRecord | null;
|
|
59
|
+
readonly transaction: import("@molda-org/module-runtime").ModuleTransaction;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
readonly cancelTicket: {
|
|
63
|
+
readonly kind: "transition";
|
|
64
|
+
readonly collection: "tickets";
|
|
65
|
+
readonly permission: "cancel.ticket";
|
|
66
|
+
readonly event: "cancel.ticket";
|
|
67
|
+
readonly status: "cancelled";
|
|
68
|
+
readonly allowedFrom: readonly ["issued"];
|
|
69
|
+
readonly confirmation: "required";
|
|
70
|
+
};
|
|
71
|
+
readonly checkInTicket: {
|
|
72
|
+
readonly kind: "transition";
|
|
73
|
+
readonly collection: "tickets";
|
|
74
|
+
readonly permission: "check.in.ticket";
|
|
75
|
+
readonly event: "check.in.ticket";
|
|
76
|
+
readonly status: "checked-in";
|
|
77
|
+
readonly allowedFrom: readonly ["issued"];
|
|
78
|
+
readonly confirmation: "required";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly views: {
|
|
82
|
+
readonly upcomingEvents: {
|
|
83
|
+
readonly kind: "list";
|
|
84
|
+
readonly collection: "events";
|
|
85
|
+
readonly permission: "upcoming.events.read";
|
|
86
|
+
};
|
|
87
|
+
readonly ticketSales: {
|
|
88
|
+
readonly kind: "list";
|
|
89
|
+
readonly collection: "tickets";
|
|
90
|
+
readonly permission: "ticket.sales.read";
|
|
91
|
+
};
|
|
92
|
+
readonly attendance: {
|
|
93
|
+
readonly kind: "list";
|
|
94
|
+
readonly collection: "tickets";
|
|
95
|
+
readonly permission: "attendance.read";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly migrations: readonly [{
|
|
99
|
+
readonly version: 1;
|
|
100
|
+
readonly description: "Create events-tickets collections and indexes";
|
|
101
|
+
}];
|
|
102
|
+
readonly fixtures: readonly [{
|
|
103
|
+
readonly id: "events-tickets-baseline";
|
|
104
|
+
readonly description: "Deterministic events-tickets production-case fixture";
|
|
105
|
+
readonly records: readonly [{
|
|
106
|
+
readonly collection: "events";
|
|
107
|
+
readonly id: "event-fixture";
|
|
108
|
+
readonly value: {
|
|
109
|
+
readonly name: "Fixture Event";
|
|
110
|
+
readonly startsAt: "2026-10-10T18:00:00.000Z";
|
|
111
|
+
readonly endsAt: "2026-10-10T20:00:00.000Z";
|
|
112
|
+
readonly capacity: 100;
|
|
113
|
+
readonly status: "published";
|
|
114
|
+
};
|
|
115
|
+
}];
|
|
116
|
+
}];
|
|
117
|
+
};
|
|
118
|
+
export declare const EventsTicketsBlueprint: import("@molda-org/module-runtime").ModuleBlueprint<{
|
|
119
|
+
[k: string]: import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
120
|
+
id: string;
|
|
121
|
+
data: Record<string, unknown>;
|
|
122
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
123
|
+
data: Record<string, unknown>;
|
|
124
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
125
|
+
id: string;
|
|
126
|
+
expectedRevision: number;
|
|
127
|
+
patch: Record<string, unknown>;
|
|
128
|
+
reason?: string | undefined;
|
|
129
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
130
|
+
id: string;
|
|
131
|
+
expectedRevision: number;
|
|
132
|
+
patch: Record<string, unknown>;
|
|
133
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>>;
|
|
134
|
+
}, {
|
|
135
|
+
[k: string]: import("@molda-org/module-runtime").ModuleViewDefinition<{
|
|
136
|
+
id: string;
|
|
137
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleViewDefinition<{
|
|
138
|
+
limit: number;
|
|
139
|
+
equals?: Record<string, unknown> | undefined;
|
|
140
|
+
}, readonly import("@molda-org/module-runtime").ModuleRecord<Record<string, unknown>>[]>;
|
|
141
|
+
}>;
|
|
142
|
+
export declare function createEventsTicketsService(repository: ModuleRepository): {
|
|
143
|
+
blueprint: import("@molda-org/module-runtime").ModuleBlueprint<{
|
|
144
|
+
[k: string]: import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
145
|
+
id: string;
|
|
146
|
+
data: Record<string, unknown>;
|
|
147
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
148
|
+
data: Record<string, unknown>;
|
|
149
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
150
|
+
id: string;
|
|
151
|
+
expectedRevision: number;
|
|
152
|
+
patch: Record<string, unknown>;
|
|
153
|
+
reason?: string | undefined;
|
|
154
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
|
|
155
|
+
id: string;
|
|
156
|
+
expectedRevision: number;
|
|
157
|
+
patch: Record<string, unknown>;
|
|
158
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>>;
|
|
159
|
+
}, {
|
|
160
|
+
[k: string]: import("@molda-org/module-runtime").ModuleViewDefinition<{
|
|
161
|
+
id: string;
|
|
162
|
+
}, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleViewDefinition<{
|
|
163
|
+
limit: number;
|
|
164
|
+
equals?: Record<string, unknown> | undefined;
|
|
165
|
+
}, readonly import("@molda-org/module-runtime").ModuleRecord<Record<string, unknown>>[]>;
|
|
166
|
+
}>;
|
|
167
|
+
executeAction<TKey extends string>(actionId: TKey, unsafeInput: {
|
|
168
|
+
id: string;
|
|
169
|
+
data: Record<string, unknown>;
|
|
170
|
+
} | {
|
|
171
|
+
data: Record<string, unknown>;
|
|
172
|
+
} | {
|
|
173
|
+
id: string;
|
|
174
|
+
expectedRevision: number;
|
|
175
|
+
patch: Record<string, unknown>;
|
|
176
|
+
reason?: string | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
id: string;
|
|
179
|
+
expectedRevision: number;
|
|
180
|
+
patch: Record<string, unknown>;
|
|
181
|
+
}, invocation: import("@molda-org/module-runtime").ModuleActionInvocation): Promise<import("@molda-org/module-runtime").ModuleActionExecution<never>>;
|
|
182
|
+
executeView<TKey extends string>(viewId: TKey, unsafeInput: {
|
|
183
|
+
id: string;
|
|
184
|
+
} | {
|
|
185
|
+
limit: number;
|
|
186
|
+
equals?: Record<string, unknown> | undefined;
|
|
187
|
+
}, context: import("@molda-org/module-runtime").ModuleExecutionContext): Promise<never>;
|
|
188
|
+
};
|
|
189
|
+
export declare function createEventsTicketsRuntimeModule(repository: ModuleRepository): import("@molda-org/module-runtime").ResourceModuleContribution;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createResourceModuleContribution, createResourceModuleService, defineResourceModule, ModuleConflictError, } from '@molda-org/module-runtime';
|
|
3
|
+
export const EventsTicketsActionIds = ["createEvent", "issueTicket", "cancelTicket", "checkInTicket"];
|
|
4
|
+
export const EventsTicketsViewIds = ["upcomingEvents", "ticketSales", "attendance"];
|
|
5
|
+
export const EventsTicketsHookIds = ["useEvents", "useTickets", "useAttendance"];
|
|
6
|
+
export const EventsTicketsSpecification = {
|
|
7
|
+
id: 'events-tickets',
|
|
8
|
+
version: '1.0.0',
|
|
9
|
+
collections: {
|
|
10
|
+
'events': z.object({ name: z.string().min(1).max(200), startsAt: z.string().datetime({ offset: true }), endsAt: z.string().datetime({ offset: true }), capacity: z.number().int().positive(), status: z.enum(['draft', 'published', 'cancelled']) }).strict().refine((value) => Date.parse(value.startsAt) < Date.parse(value.endsAt), { message: 'Event end must be after start' }),
|
|
11
|
+
'tickets': z.object({ eventId: z.string().min(1).max(200), holderName: z.string().min(1).max(200), code: z.string().min(8).max(200), status: z.enum(['issued', 'cancelled', 'checked-in']), transitionReason: z.string().max(1_000).optional() }).strict(),
|
|
12
|
+
},
|
|
13
|
+
actions: {
|
|
14
|
+
createEvent: { kind: 'create', collection: 'events', permission: 'create.event', event: 'create.event' },
|
|
15
|
+
issueTicket: {
|
|
16
|
+
kind: 'create', collection: 'tickets', permission: 'issue.ticket', event: 'issue.ticket', confirmation: 'required',
|
|
17
|
+
validate: async ({ value, transaction }) => {
|
|
18
|
+
const duplicateCodes = await transaction.list('tickets', { equals: { code: value.code }, limit: 1 });
|
|
19
|
+
if (duplicateCodes.length > 0)
|
|
20
|
+
throw new ModuleConflictError('Ticket code must be unique within the project');
|
|
21
|
+
const event = await transaction.require('events', String(value.eventId));
|
|
22
|
+
if (event.value.status !== 'published')
|
|
23
|
+
throw new ModuleConflictError('Tickets require a published event');
|
|
24
|
+
const tickets = await transaction.list('tickets', { equals: { eventId: value.eventId }, limit: 500 });
|
|
25
|
+
const issued = tickets.filter(({ value: ticket }) => ticket.status !== 'cancelled').length;
|
|
26
|
+
if (issued >= Number(event.value.capacity))
|
|
27
|
+
throw new ModuleConflictError('Event ticket capacity is exhausted');
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
cancelTicket: { kind: 'transition', collection: 'tickets', permission: 'cancel.ticket', event: 'cancel.ticket', status: 'cancelled', allowedFrom: ["issued"], confirmation: 'required' },
|
|
31
|
+
checkInTicket: { kind: 'transition', collection: 'tickets', permission: 'check.in.ticket', event: 'check.in.ticket', status: 'checked-in', allowedFrom: ["issued"], confirmation: 'required' },
|
|
32
|
+
},
|
|
33
|
+
views: {
|
|
34
|
+
upcomingEvents: { kind: 'list', collection: 'events', permission: 'upcoming.events.read' },
|
|
35
|
+
ticketSales: { kind: 'list', collection: 'tickets', permission: 'ticket.sales.read' },
|
|
36
|
+
attendance: { kind: 'list', collection: 'tickets', permission: 'attendance.read' },
|
|
37
|
+
},
|
|
38
|
+
migrations: [{ version: 1, description: 'Create events-tickets collections and indexes' }],
|
|
39
|
+
fixtures: [{ id: 'events-tickets-baseline', description: 'Deterministic events-tickets production-case fixture', records: [
|
|
40
|
+
{ collection: 'events', id: 'event-fixture', value: { name: 'Fixture Event', startsAt: '2026-10-10T18:00:00.000Z', endsAt: '2026-10-10T20:00:00.000Z', capacity: 100, status: 'published' } },
|
|
41
|
+
] }],
|
|
42
|
+
};
|
|
43
|
+
export const EventsTicketsBlueprint = defineResourceModule(EventsTicketsSpecification);
|
|
44
|
+
export function createEventsTicketsService(repository) {
|
|
45
|
+
return createResourceModuleService(EventsTicketsSpecification, repository);
|
|
46
|
+
}
|
|
47
|
+
export function createEventsTicketsRuntimeModule(repository) {
|
|
48
|
+
return createResourceModuleContribution(EventsTicketsSpecification, repository);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,GAGpB,MAAM,2BAA2B,CAAC;AAcnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,aAAa,EAAC,aAAa,EAAC,cAAc,EAAC,eAAe,CAAU,CAAC;AAC5G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,gBAAgB,EAAC,aAAa,EAAC,YAAY,CAAU,CAAC;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,WAAW,EAAC,YAAY,EAAC,eAAe,CAAU,CAAC;AAExF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,EAAE,EAAE,gBAAgB;IACpB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE;QACX,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,C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CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,UAA4B;IAC3E,OAAO,gCAAgC,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC;AAClF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molda-org/events-tickets",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.21",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"types": "./index.d.ts",
|
|
6
5
|
"exports": {
|
|
7
6
|
".": {
|
|
8
|
-
"types": "./index.d.ts"
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"
|
|
12
|
+
"dist"
|
|
13
13
|
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json",
|
|
16
|
+
"prepack": "npm run build",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
18
|
+
},
|
|
14
19
|
"dependencies": {
|
|
15
|
-
"@molda-org/module-contracts": "0.1.0-next.
|
|
20
|
+
"@molda-org/module-contracts": "0.1.0-next.21",
|
|
21
|
+
"@molda-org/module-runtime": "0.1.0-next.21",
|
|
22
|
+
"zod": "4.6.5"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "22.19.19",
|
|
26
|
+
"typescript": "5.9.3"
|
|
16
27
|
},
|
|
17
28
|
"publishConfig": {
|
|
18
29
|
"access": "public",
|
package/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { MoldaModuleDefinition, MoldaModuleShape } from '@molda-org/module-contracts';
|
|
2
|
-
|
|
3
|
-
export type EventsTicketsAction = 'createEvent' | 'issueTicket' | 'cancelTicket' | 'checkInTicket';
|
|
4
|
-
export type EventsTicketsView = 'upcomingEvents' | 'ticketSales' | 'attendance';
|
|
5
|
-
export type EventsTicketsHook = 'useEvents' | 'useTickets';
|
|
6
|
-
|
|
7
|
-
export interface EventsTicketsModuleShape
|
|
8
|
-
extends MoldaModuleShape<
|
|
9
|
-
'events-tickets',
|
|
10
|
-
EventsTicketsAction,
|
|
11
|
-
EventsTicketsView,
|
|
12
|
-
EventsTicketsHook
|
|
13
|
-
> {
|
|
14
|
-
readonly stage: 'phase-two';
|
|
15
|
-
readonly category: 'operations';
|
|
16
|
-
readonly purpose: 'Events, capacity, ticket types, registration, admission, and attendance.';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type EventsTicketsModule = MoldaModuleDefinition<EventsTicketsModuleShape>;
|
|
20
|
-
|