@semics-tech/emdash-events-pro 0.0.0-stage → 1.0.0-rc.0

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.mjs ADDED
@@ -0,0 +1,656 @@
1
+ // Auto-generated by emdash-plugin build. Do not edit.
2
+ // Source: emdash-plugin.jsonc + package.json
3
+ //
4
+ // Default-exports a sandboxed plugin descriptor. Pass it directly into
5
+ // emdash's `plugins:` or `sandboxed:` array — no factory call needed.
6
+
7
+ /** @type {import("emdash").PluginDescriptor} */
8
+ const descriptor = Object.freeze({
9
+ "id": "semics-events",
10
+ "version": "1.0.0-rc.0",
11
+ "format": "standard",
12
+ "entrypoint": "@semics-tech/emdash-events-pro/sandbox",
13
+ "capabilities": [
14
+ "content:read",
15
+ "schema:read",
16
+ "network:request",
17
+ "email:send"
18
+ ],
19
+ "allowedHosts": [
20
+ "challenges.cloudflare.com",
21
+ "api.stripe.com"
22
+ ],
23
+ "storage": {
24
+ "event_configs": {
25
+ "indexes": [
26
+ "status",
27
+ "salesEnd"
28
+ ]
29
+ },
30
+ "occurrences": {
31
+ "indexes": [
32
+ [
33
+ "eventId",
34
+ "startsAt"
35
+ ],
36
+ "startsAt",
37
+ "status"
38
+ ]
39
+ },
40
+ "ticket_types": {
41
+ "indexes": [
42
+ "eventId"
43
+ ]
44
+ },
45
+ "bookings": {
46
+ "indexes": [
47
+ "eventId",
48
+ "status",
49
+ "email",
50
+ "createdAt",
51
+ [
52
+ "status",
53
+ "holdExpiresAt"
54
+ ],
55
+ [
56
+ "eventId",
57
+ "status"
58
+ ],
59
+ [
60
+ "ipHash",
61
+ "createdAt"
62
+ ]
63
+ ],
64
+ "uniqueIndexes": [
65
+ "ref"
66
+ ]
67
+ },
68
+ "payments": {
69
+ "indexes": [
70
+ "bookingId"
71
+ ]
72
+ },
73
+ "attendees": {
74
+ "indexes": [
75
+ "bookingId",
76
+ "eventId",
77
+ "email",
78
+ [
79
+ "eventId",
80
+ "checkedInAt"
81
+ ]
82
+ ],
83
+ "uniqueIndexes": [
84
+ "code"
85
+ ]
86
+ },
87
+ "waitlist": {
88
+ "indexes": [
89
+ [
90
+ "eventId",
91
+ "status"
92
+ ],
93
+ "offerExpiresAt",
94
+ "email"
95
+ ]
96
+ },
97
+ "promo_codes": {
98
+ "indexes": [
99
+ "eventId"
100
+ ],
101
+ "uniqueIndexes": [
102
+ "code"
103
+ ]
104
+ },
105
+ "outbox": {
106
+ "indexes": [
107
+ [
108
+ "status",
109
+ "nextAttemptAt"
110
+ ],
111
+ "to"
112
+ ]
113
+ },
114
+ "report_events": {
115
+ "indexes": []
116
+ },
117
+ "report_exports": {
118
+ "indexes": [
119
+ "expiresAt"
120
+ ]
121
+ },
122
+ "broadcasts": {
123
+ "indexes": [
124
+ "createdAt"
125
+ ]
126
+ }
127
+ },
128
+ "hooks": [
129
+ "plugin:activate",
130
+ "content:afterSave",
131
+ "content:afterPublish",
132
+ "content:afterUnpublish",
133
+ "content:beforeDelete",
134
+ "content:afterDelete",
135
+ "page:metadata",
136
+ "cron"
137
+ ],
138
+ "routes": [
139
+ "config/get",
140
+ "config/save",
141
+ "admin",
142
+ {
143
+ "name": "attendees/export",
144
+ "methods": [
145
+ "GET"
146
+ ],
147
+ "response": "raw"
148
+ },
149
+ "editor/tickets",
150
+ {
151
+ "name": "public/events",
152
+ "methods": [
153
+ "GET"
154
+ ],
155
+ "public": true,
156
+ "cacheControl": "public, max-age=60, stale-while-revalidate=300"
157
+ },
158
+ {
159
+ "name": "public/event",
160
+ "methods": [
161
+ "GET"
162
+ ],
163
+ "public": true
164
+ },
165
+ {
166
+ "name": "public/checkout/reserve",
167
+ "methods": [
168
+ "POST"
169
+ ],
170
+ "public": true
171
+ },
172
+ {
173
+ "name": "public/checkout/continue",
174
+ "methods": [
175
+ "POST"
176
+ ],
177
+ "public": true
178
+ },
179
+ {
180
+ "name": "public/booking",
181
+ "methods": [
182
+ "POST"
183
+ ],
184
+ "public": true
185
+ },
186
+ {
187
+ "name": "public/booking/cancel",
188
+ "methods": [
189
+ "POST"
190
+ ],
191
+ "public": true
192
+ },
193
+ {
194
+ "name": "public/booking/redeem",
195
+ "methods": [
196
+ "POST"
197
+ ],
198
+ "public": true
199
+ },
200
+ {
201
+ "name": "public/booking/ics",
202
+ "methods": [
203
+ "GET"
204
+ ],
205
+ "response": "raw",
206
+ "public": true
207
+ },
208
+ {
209
+ "name": "public/event/ics",
210
+ "methods": [
211
+ "GET"
212
+ ],
213
+ "response": "raw",
214
+ "public": true,
215
+ "cacheControl": "public, max-age=300"
216
+ },
217
+ {
218
+ "name": "public/waitlist/join",
219
+ "methods": [
220
+ "POST"
221
+ ],
222
+ "public": true
223
+ },
224
+ {
225
+ "name": "public/waitlist/claim",
226
+ "methods": [
227
+ "POST"
228
+ ],
229
+ "public": true
230
+ },
231
+ {
232
+ "name": "webhooks/stripe",
233
+ "methods": [
234
+ "POST"
235
+ ],
236
+ "request": {
237
+ "body": "text",
238
+ "headers": [
239
+ "stripe-signature"
240
+ ]
241
+ },
242
+ "response": "raw",
243
+ "public": true
244
+ },
245
+ {
246
+ "name": "signatures/receipt",
247
+ "methods": [
248
+ "POST"
249
+ ],
250
+ "public": true
251
+ },
252
+ "pro/licence",
253
+ {
254
+ "name": "esign/catalog",
255
+ "methods": [
256
+ "POST"
257
+ ],
258
+ "public": true
259
+ },
260
+ {
261
+ "name": "checkin/code",
262
+ "methods": [
263
+ "POST"
264
+ ]
265
+ },
266
+ {
267
+ "name": "public/mail/opt-out",
268
+ "methods": [
269
+ "POST"
270
+ ],
271
+ "public": true
272
+ },
273
+ {
274
+ "name": "pro/reports/export",
275
+ "methods": [
276
+ "GET"
277
+ ],
278
+ "response": "raw"
279
+ },
280
+ {
281
+ "name": "public/promo/check",
282
+ "methods": [
283
+ "POST"
284
+ ],
285
+ "public": true
286
+ },
287
+ {
288
+ "name": "pro/mcp/events",
289
+ "permission": "plugins:manage"
290
+ },
291
+ {
292
+ "name": "pro/mcp/availability",
293
+ "permission": "plugins:manage"
294
+ },
295
+ {
296
+ "name": "pro/mcp/booking",
297
+ "permission": "plugins:manage"
298
+ },
299
+ {
300
+ "name": "pro/mcp/attendees",
301
+ "permission": "plugins:manage"
302
+ },
303
+ {
304
+ "name": "pro/mcp/check-in",
305
+ "permission": "plugins:manage"
306
+ },
307
+ {
308
+ "name": "pro/mcp/cancel",
309
+ "permission": "plugins:manage"
310
+ },
311
+ {
312
+ "name": "pro/mcp/refund",
313
+ "permission": "plugins:manage"
314
+ }
315
+ ],
316
+ "mcp": {
317
+ "tools": [
318
+ {
319
+ "name": "listEvents",
320
+ "description": "List the events open for booking or listed: id, title, status, next start, venue, currency, lowest price and seats left.",
321
+ "route": "pro/mcp/events",
322
+ "permission": "plugins:manage",
323
+ "destructive": false,
324
+ "inputSchema": {
325
+ "type": "object",
326
+ "properties": {},
327
+ "additionalProperties": false
328
+ }
329
+ },
330
+ {
331
+ "name": "getAvailability",
332
+ "description": "One event's ticket types (price, seats left, order limits) and, for a recurring event, its dates.",
333
+ "route": "pro/mcp/availability",
334
+ "permission": "plugins:manage",
335
+ "destructive": false,
336
+ "inputSchema": {
337
+ "type": "object",
338
+ "properties": {
339
+ "eventId": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "maxLength": 200,
343
+ "description": "The event id (from listEvents)."
344
+ }
345
+ },
346
+ "required": [
347
+ "eventId"
348
+ ],
349
+ "additionalProperties": false
350
+ }
351
+ },
352
+ {
353
+ "name": "findBooking",
354
+ "description": "Find a booking by its reference (status, buyer, tickets, totals, attendees, whether it can be cancelled), or list a buyer's bookings by email.",
355
+ "route": "pro/mcp/booking",
356
+ "permission": "plugins:manage",
357
+ "destructive": false,
358
+ "inputSchema": {
359
+ "type": "object",
360
+ "properties": {
361
+ "ref": {
362
+ "type": "string",
363
+ "minLength": 1,
364
+ "maxLength": 200,
365
+ "description": "The booking reference, e.g. 7KX2M9QD4T."
366
+ },
367
+ "email": {
368
+ "type": "string",
369
+ "minLength": 1,
370
+ "maxLength": 200,
371
+ "description": "The buyer's email."
372
+ }
373
+ },
374
+ "additionalProperties": false
375
+ }
376
+ },
377
+ {
378
+ "name": "listAttendees",
379
+ "description": "An event's attendees, 50 at a time: id, name, email, ticket type, status, check-in time and booking. Pass `cursor` for the next page.",
380
+ "route": "pro/mcp/attendees",
381
+ "permission": "plugins:manage",
382
+ "destructive": false,
383
+ "inputSchema": {
384
+ "type": "object",
385
+ "properties": {
386
+ "eventId": {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "maxLength": 200,
390
+ "description": "The event id (from listEvents)."
391
+ },
392
+ "cursor": {
393
+ "type": "string",
394
+ "minLength": 1,
395
+ "maxLength": 200,
396
+ "description": "From the previous page's nextCursor."
397
+ }
398
+ },
399
+ "required": [
400
+ "eventId"
401
+ ],
402
+ "additionalProperties": false
403
+ }
404
+ },
405
+ {
406
+ "name": "checkInAttendee",
407
+ "description": "Check an attendee in by id (from listAttendees) or ticket code. Refused when the booking is not confirmed or a waiver is pending; a second check-in is told the first time.",
408
+ "route": "pro/mcp/check-in",
409
+ "permission": "plugins:manage",
410
+ "destructive": false,
411
+ "inputSchema": {
412
+ "type": "object",
413
+ "properties": {
414
+ "attendeeId": {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "maxLength": 200,
418
+ "description": "The attendee id."
419
+ },
420
+ "code": {
421
+ "type": "string",
422
+ "minLength": 1,
423
+ "maxLength": 200,
424
+ "description": "The ticket's check-in code."
425
+ },
426
+ "eventId": {
427
+ "type": "string",
428
+ "minLength": 1,
429
+ "maxLength": 200,
430
+ "description": "The event id (from listEvents)."
431
+ }
432
+ },
433
+ "additionalProperties": false
434
+ }
435
+ },
436
+ {
437
+ "name": "cancelBooking",
438
+ "description": "Cancel a booking until its event starts: its seats are released and the buyer is emailed. A paid booking is refunded in full through Stripe first. This cannot be undone.",
439
+ "route": "pro/mcp/cancel",
440
+ "permission": "plugins:manage",
441
+ "destructive": true,
442
+ "inputSchema": {
443
+ "type": "object",
444
+ "properties": {
445
+ "ref": {
446
+ "type": "string",
447
+ "minLength": 1,
448
+ "maxLength": 200,
449
+ "description": "The booking reference, e.g. 7KX2M9QD4T."
450
+ }
451
+ },
452
+ "required": [
453
+ "ref"
454
+ ],
455
+ "additionalProperties": false
456
+ }
457
+ },
458
+ {
459
+ "name": "refundBooking",
460
+ "description": "Refund a confirmed paid booking in full through Stripe, at any time: it is cancelled, its seats released and the buyer emailed. This cannot be undone.",
461
+ "route": "pro/mcp/refund",
462
+ "permission": "plugins:manage",
463
+ "destructive": true,
464
+ "inputSchema": {
465
+ "type": "object",
466
+ "properties": {
467
+ "ref": {
468
+ "type": "string",
469
+ "minLength": 1,
470
+ "maxLength": 200,
471
+ "description": "The booking reference, e.g. 7KX2M9QD4T."
472
+ }
473
+ },
474
+ "required": [
475
+ "ref"
476
+ ],
477
+ "additionalProperties": false
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ "adminPages": [
483
+ {
484
+ "path": "/bookings",
485
+ "label": "Bookings",
486
+ "icon": "ticket"
487
+ },
488
+ {
489
+ "path": "/attendees",
490
+ "label": "Attendees",
491
+ "icon": "users"
492
+ },
493
+ {
494
+ "path": "/events",
495
+ "label": "Event editor",
496
+ "icon": "calendar"
497
+ },
498
+ {
499
+ "path": "/setup",
500
+ "label": "Setup check",
501
+ "icon": "gear"
502
+ },
503
+ {
504
+ "path": "/reports",
505
+ "label": "Sales reports",
506
+ "icon": "chart"
507
+ },
508
+ {
509
+ "path": "/promo-codes",
510
+ "label": "Promo codes",
511
+ "icon": "tag"
512
+ },
513
+ {
514
+ "path": "/broadcasts",
515
+ "label": "Email attendees",
516
+ "icon": "mail"
517
+ }
518
+ ],
519
+ "adminWidgets": [
520
+ {
521
+ "id": "sales",
522
+ "title": "Ticket sales",
523
+ "size": "half"
524
+ }
525
+ ],
526
+ "settingsSchema": {
527
+ "eventsCollection": {
528
+ "label": "Events collection",
529
+ "description": "Slug of the collection that holds your events.",
530
+ "type": "string",
531
+ "default": "events"
532
+ },
533
+ "fieldStartsAt": {
534
+ "label": "Start field",
535
+ "description": "Field that holds the start date and time.",
536
+ "type": "string",
537
+ "default": "starts_at"
538
+ },
539
+ "fieldEndsAt": {
540
+ "label": "End field",
541
+ "description": "Field that holds the end date and time.",
542
+ "type": "string",
543
+ "default": "ends_at"
544
+ },
545
+ "fieldTimezone": {
546
+ "label": "Timezone field",
547
+ "description": "Field that holds the IANA timezone, for example Europe/London.",
548
+ "type": "string",
549
+ "default": "timezone"
550
+ },
551
+ "fieldVenue": {
552
+ "label": "Venue field",
553
+ "description": "Field that holds the venue name or address.",
554
+ "type": "string",
555
+ "default": "venue"
556
+ },
557
+ "holdMinutesFree": {
558
+ "label": "Hold time, free tickets (minutes)",
559
+ "description": "How long a seat is held while a buyer completes a free checkout.",
560
+ "type": "number",
561
+ "default": 15,
562
+ "min": 5,
563
+ "max": 60
564
+ },
565
+ "holdMinutesPaid": {
566
+ "label": "Hold time, paid tickets (minutes)",
567
+ "description": "How long a seat is held during a paid checkout. Card processors need at least 30 minutes.",
568
+ "type": "number",
569
+ "default": 35,
570
+ "min": 30,
571
+ "max": 60
572
+ },
573
+ "holdCeilingMinutes": {
574
+ "label": "Maximum total hold (minutes)",
575
+ "description": "Each checkout step extends the hold, but never beyond this many minutes from the first hold.",
576
+ "type": "number",
577
+ "default": 60,
578
+ "min": 15,
579
+ "max": 120
580
+ },
581
+ "cancelCutoffHours": {
582
+ "label": "Self-service cancel cutoff (hours before start)",
583
+ "description": "Buyers can cancel a confirmed booking up to this many hours before the event starts.",
584
+ "type": "number",
585
+ "default": 24,
586
+ "min": 0,
587
+ "max": 720
588
+ },
589
+ "currency": {
590
+ "label": "Default currency",
591
+ "description": "Three-letter ISO 4217 code, for example GBP.",
592
+ "type": "string",
593
+ "default": "GBP"
594
+ },
595
+ "turnstileSiteKey": {
596
+ "label": "Turnstile site key",
597
+ "description": "Public site key of your Cloudflare Turnstile widget.",
598
+ "type": "string"
599
+ },
600
+ "turnstileSecretKey": {
601
+ "label": "Turnstile secret key",
602
+ "description": "Secret key used to verify bot checks. Stored encrypted.",
603
+ "type": "secret"
604
+ },
605
+ "esignPairing": {
606
+ "label": "E-sign pairing string",
607
+ "description": "Pairing string from the e-sign plugin, for events that require signed waivers. Stored encrypted.",
608
+ "type": "secret"
609
+ },
610
+ "licenceKey": {
611
+ "label": "Pro licence key",
612
+ "description": "The semics1. key from your purchase email. Not needed on local or preview hosts. Stored encrypted.",
613
+ "type": "secret"
614
+ },
615
+ "stripeSecretKey": {
616
+ "label": "Stripe secret key",
617
+ "description": "Your Stripe secret key (sk_live_ or sk_test_, or a restricted key that can write Checkout Sessions). Needed to sell paid tickets. Stored encrypted.",
618
+ "type": "secret"
619
+ },
620
+ "stripeWebhookSecret": {
621
+ "label": "Stripe webhook signing secret",
622
+ "description": "The whsec_ secret of your Stripe webhook endpoint for /_emdash/api/plugins/semics-events/webhooks/stripe (events: checkout.session.completed, checkout.session.expired, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed). Paid bookings are confirmed only through it. Stored encrypted.",
623
+ "type": "secret"
624
+ },
625
+ "retentionDays": {
626
+ "label": "Keep booking data (days)",
627
+ "description": "Personal data of past events is erased after this many days.",
628
+ "type": "number",
629
+ "default": 365,
630
+ "min": 30
631
+ },
632
+ "emailSenderName": {
633
+ "label": "Email sender name",
634
+ "description": "Name shown on booking emails. Defaults to the site name.",
635
+ "type": "string"
636
+ },
637
+ "reminderHours": {
638
+ "label": "Reminder emails (hours before the start)",
639
+ "description": "Confirmed bookings get a reminder this many hours before their event or date. Up to three, comma-separated, e.g. 168, 24. Leave empty to send none.",
640
+ "type": "string",
641
+ "default": "24"
642
+ }
643
+ },
644
+ "editorPanels": [
645
+ {
646
+ "id": "tickets",
647
+ "title": "Tickets & booking",
648
+ "route": "editor/tickets",
649
+ "collections": [
650
+ "events"
651
+ ]
652
+ }
653
+ ]
654
+ });
655
+
656
+ export default descriptor;