@semics-tech/emdash-events 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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +82 -2
  3. package/dist/index.d.mts +5 -0
  4. package/dist/index.mjs +392 -0
  5. package/dist/manifest.json +401 -0
  6. package/dist/plugin.d.mts +11 -0
  7. package/dist/plugin.mjs +7 -0
  8. package/dist/ts/astro/lib/call.d.ts +54 -0
  9. package/dist/ts/astro/lib/call.js +121 -0
  10. package/dist/ts/integration/index.d.ts +48 -0
  11. package/dist/ts/integration/index.js +76 -0
  12. package/dist/ts/ui/index.d.ts +6 -0
  13. package/dist/ts/ui/index.js +46 -0
  14. package/emdash-plugin.jsonc +206 -0
  15. package/package.json +77 -3
  16. package/src/astro/AddToCalendar.astro +47 -0
  17. package/src/astro/BookingBlock.astro +30 -0
  18. package/src/astro/BookingPage.astro +193 -0
  19. package/src/astro/BookingStatus.astro +106 -0
  20. package/src/astro/BookingWidget.astro +581 -0
  21. package/src/astro/CheckIn.astro +186 -0
  22. package/src/astro/DoorSignPage.astro +62 -0
  23. package/src/astro/EventCard.astro +81 -0
  24. package/src/astro/EventList.astro +83 -0
  25. package/src/astro/OptOutPage.astro +58 -0
  26. package/src/astro/PaymentReturn.astro +96 -0
  27. package/src/astro/TicketPass.astro +95 -0
  28. package/src/astro/checkout-endpoint.ts +11 -0
  29. package/src/astro/index.js +18 -0
  30. package/src/astro/lib/call.ts +185 -0
  31. package/src/astro/lib/checkout-form.ts +271 -0
  32. package/src/astro/lib/list.ts +99 -0
  33. package/src/astro/lib/opt-out.ts +49 -0
  34. package/src/astro/lib/pass.ts +35 -0
  35. package/src/astro/lib/payment.ts +73 -0
  36. package/src/astro/lib/promo.ts +162 -0
  37. package/src/astro/lib/questions.ts +107 -0
  38. package/src/astro/lib/receipt.ts +132 -0
  39. package/src/astro/lib/waitlist.ts +72 -0
  40. package/src/astro/lib/widget.ts +278 -0
  41. package/src/astro/promo-endpoint.ts +11 -0
  42. package/src/astro/virtual.d.ts +16 -0
  43. package/src/astro/waitlist-endpoint.ts +12 -0
  44. package/src/client/booking.ts +188 -0
  45. package/src/client/checkin.ts +260 -0
  46. package/src/client/payment.ts +76 -0
  47. package/src/client/receipt.ts +75 -0
  48. package/src/i18n/ar.ts +213 -0
  49. package/src/i18n/en.ts +219 -0
  50. package/src/i18n/index.ts +121 -0
@@ -0,0 +1,401 @@
1
+ {
2
+ "id": "semics-events",
3
+ "version": "1.0.0-rc.0",
4
+ "declaredAccess": {
5
+ "content": {
6
+ "read": {}
7
+ },
8
+ "schema": {
9
+ "read": {}
10
+ },
11
+ "network": {
12
+ "request": {
13
+ "allowedHosts": [
14
+ "challenges.cloudflare.com"
15
+ ]
16
+ }
17
+ },
18
+ "email": {
19
+ "send": {}
20
+ }
21
+ },
22
+ "capabilities": [
23
+ "content:read",
24
+ "schema:read",
25
+ "network:request",
26
+ "email:send"
27
+ ],
28
+ "allowedHosts": [
29
+ "challenges.cloudflare.com"
30
+ ],
31
+ "storage": {
32
+ "event_configs": {
33
+ "indexes": [
34
+ "status",
35
+ "salesEnd"
36
+ ]
37
+ },
38
+ "occurrences": {
39
+ "indexes": [
40
+ [
41
+ "eventId",
42
+ "startsAt"
43
+ ],
44
+ "startsAt",
45
+ "status"
46
+ ]
47
+ },
48
+ "ticket_types": {
49
+ "indexes": [
50
+ "eventId"
51
+ ]
52
+ },
53
+ "bookings": {
54
+ "indexes": [
55
+ "eventId",
56
+ "status",
57
+ "email",
58
+ "createdAt",
59
+ [
60
+ "status",
61
+ "holdExpiresAt"
62
+ ],
63
+ [
64
+ "eventId",
65
+ "status"
66
+ ],
67
+ [
68
+ "ipHash",
69
+ "createdAt"
70
+ ]
71
+ ],
72
+ "uniqueIndexes": [
73
+ "ref"
74
+ ]
75
+ },
76
+ "payments": {
77
+ "indexes": [
78
+ "bookingId"
79
+ ]
80
+ },
81
+ "attendees": {
82
+ "indexes": [
83
+ "bookingId",
84
+ "eventId",
85
+ "email",
86
+ [
87
+ "eventId",
88
+ "checkedInAt"
89
+ ]
90
+ ],
91
+ "uniqueIndexes": [
92
+ "code"
93
+ ]
94
+ },
95
+ "waitlist": {
96
+ "indexes": [
97
+ [
98
+ "eventId",
99
+ "status"
100
+ ],
101
+ "offerExpiresAt",
102
+ "email"
103
+ ]
104
+ },
105
+ "promo_codes": {
106
+ "indexes": [
107
+ "eventId"
108
+ ],
109
+ "uniqueIndexes": [
110
+ "code"
111
+ ]
112
+ },
113
+ "outbox": {
114
+ "indexes": [
115
+ [
116
+ "status",
117
+ "nextAttemptAt"
118
+ ],
119
+ "to"
120
+ ]
121
+ }
122
+ },
123
+ "hooks": [
124
+ "plugin:activate",
125
+ "content:afterSave",
126
+ "content:afterPublish",
127
+ "content:afterUnpublish",
128
+ "content:beforeDelete",
129
+ "content:afterDelete",
130
+ "page:metadata",
131
+ "cron"
132
+ ],
133
+ "routes": [
134
+ "config/get",
135
+ "config/save",
136
+ "admin",
137
+ {
138
+ "name": "attendees/export",
139
+ "methods": [
140
+ "GET"
141
+ ],
142
+ "response": "raw"
143
+ },
144
+ "editor/tickets",
145
+ {
146
+ "name": "public/events",
147
+ "methods": [
148
+ "GET"
149
+ ],
150
+ "public": true,
151
+ "cacheControl": "public, max-age=60, stale-while-revalidate=300"
152
+ },
153
+ {
154
+ "name": "public/event",
155
+ "methods": [
156
+ "GET"
157
+ ],
158
+ "public": true
159
+ },
160
+ {
161
+ "name": "public/checkout/reserve",
162
+ "methods": [
163
+ "POST"
164
+ ],
165
+ "public": true
166
+ },
167
+ {
168
+ "name": "public/checkout/continue",
169
+ "methods": [
170
+ "POST"
171
+ ],
172
+ "public": true
173
+ },
174
+ {
175
+ "name": "public/booking",
176
+ "methods": [
177
+ "POST"
178
+ ],
179
+ "public": true
180
+ },
181
+ {
182
+ "name": "public/booking/cancel",
183
+ "methods": [
184
+ "POST"
185
+ ],
186
+ "public": true
187
+ },
188
+ {
189
+ "name": "public/booking/redeem",
190
+ "methods": [
191
+ "POST"
192
+ ],
193
+ "public": true
194
+ },
195
+ {
196
+ "name": "public/booking/ics",
197
+ "methods": [
198
+ "GET"
199
+ ],
200
+ "response": "raw",
201
+ "public": true
202
+ },
203
+ {
204
+ "name": "public/event/ics",
205
+ "methods": [
206
+ "GET"
207
+ ],
208
+ "response": "raw",
209
+ "public": true,
210
+ "cacheControl": "public, max-age=300"
211
+ },
212
+ {
213
+ "name": "public/waitlist/join",
214
+ "methods": [
215
+ "POST"
216
+ ],
217
+ "public": true
218
+ },
219
+ {
220
+ "name": "public/waitlist/claim",
221
+ "methods": [
222
+ "POST"
223
+ ],
224
+ "public": true
225
+ },
226
+ {
227
+ "name": "webhooks/stripe",
228
+ "methods": [
229
+ "POST"
230
+ ],
231
+ "request": {
232
+ "body": "text",
233
+ "headers": [
234
+ "stripe-signature"
235
+ ]
236
+ },
237
+ "response": "raw",
238
+ "public": true
239
+ },
240
+ {
241
+ "name": "signatures/receipt",
242
+ "methods": [
243
+ "POST"
244
+ ],
245
+ "public": true
246
+ }
247
+ ],
248
+ "admin": {
249
+ "settingsSchema": {
250
+ "eventsCollection": {
251
+ "label": "Events collection",
252
+ "description": "Slug of the collection that holds your events.",
253
+ "type": "string",
254
+ "default": "events"
255
+ },
256
+ "fieldStartsAt": {
257
+ "label": "Start field",
258
+ "description": "Field that holds the start date and time.",
259
+ "type": "string",
260
+ "default": "starts_at"
261
+ },
262
+ "fieldEndsAt": {
263
+ "label": "End field",
264
+ "description": "Field that holds the end date and time.",
265
+ "type": "string",
266
+ "default": "ends_at"
267
+ },
268
+ "fieldTimezone": {
269
+ "label": "Timezone field",
270
+ "description": "Field that holds the IANA timezone, for example Europe/London.",
271
+ "type": "string",
272
+ "default": "timezone"
273
+ },
274
+ "fieldVenue": {
275
+ "label": "Venue field",
276
+ "description": "Field that holds the venue name or address.",
277
+ "type": "string",
278
+ "default": "venue"
279
+ },
280
+ "holdMinutesFree": {
281
+ "label": "Hold time, free tickets (minutes)",
282
+ "description": "How long a seat is held while a buyer completes a free checkout.",
283
+ "type": "number",
284
+ "default": 15,
285
+ "min": 5,
286
+ "max": 60
287
+ },
288
+ "holdMinutesPaid": {
289
+ "label": "Hold time, paid tickets (minutes)",
290
+ "description": "How long a seat is held during a paid checkout. Card processors need at least 30 minutes.",
291
+ "type": "number",
292
+ "default": 35,
293
+ "min": 30,
294
+ "max": 60
295
+ },
296
+ "holdCeilingMinutes": {
297
+ "label": "Maximum total hold (minutes)",
298
+ "description": "Each checkout step extends the hold, but never beyond this many minutes from the first hold.",
299
+ "type": "number",
300
+ "default": 60,
301
+ "min": 15,
302
+ "max": 120
303
+ },
304
+ "cancelCutoffHours": {
305
+ "label": "Self-service cancel cutoff (hours before start)",
306
+ "description": "Buyers can cancel a confirmed booking up to this many hours before the event starts.",
307
+ "type": "number",
308
+ "default": 24,
309
+ "min": 0,
310
+ "max": 720
311
+ },
312
+ "currency": {
313
+ "label": "Default currency",
314
+ "description": "Three-letter ISO 4217 code, for example GBP.",
315
+ "type": "string",
316
+ "default": "GBP"
317
+ },
318
+ "turnstileSiteKey": {
319
+ "label": "Turnstile site key",
320
+ "description": "Public site key of your Cloudflare Turnstile widget.",
321
+ "type": "string"
322
+ },
323
+ "turnstileSecretKey": {
324
+ "label": "Turnstile secret key",
325
+ "description": "Secret key used to verify bot checks. Stored encrypted.",
326
+ "type": "secret"
327
+ },
328
+ "esignPairing": {
329
+ "label": "E-sign pairing string",
330
+ "description": "Pairing string from the e-sign plugin, for events that require signed waivers. Stored encrypted.",
331
+ "type": "secret"
332
+ },
333
+ "licenceKey": {
334
+ "label": "Licence key (Pro)",
335
+ "description": "Used by Events Pro only; the Free edition ignores it. Stored encrypted.",
336
+ "type": "secret"
337
+ },
338
+ "stripeSecretKey": {
339
+ "label": "Stripe secret key (Pro)",
340
+ "description": "Used by Events Pro only, for paid tickets; the Free edition ignores it. Stored encrypted.",
341
+ "type": "secret"
342
+ },
343
+ "stripeWebhookSecret": {
344
+ "label": "Stripe webhook signing secret (Pro)",
345
+ "description": "Used by Events Pro only, for paid tickets; the Free edition ignores it. Stored encrypted.",
346
+ "type": "secret"
347
+ },
348
+ "retentionDays": {
349
+ "label": "Keep booking data (days)",
350
+ "description": "Personal data of past events is erased after this many days.",
351
+ "type": "number",
352
+ "default": 365,
353
+ "min": 30
354
+ },
355
+ "emailSenderName": {
356
+ "label": "Email sender name",
357
+ "description": "Name shown on booking emails. Defaults to the site name.",
358
+ "type": "string"
359
+ }
360
+ },
361
+ "pages": [
362
+ {
363
+ "path": "/bookings",
364
+ "label": "Bookings",
365
+ "icon": "ticket"
366
+ },
367
+ {
368
+ "path": "/attendees",
369
+ "label": "Attendees",
370
+ "icon": "users"
371
+ },
372
+ {
373
+ "path": "/events",
374
+ "label": "Event editor",
375
+ "icon": "calendar"
376
+ },
377
+ {
378
+ "path": "/setup",
379
+ "label": "Setup check",
380
+ "icon": "gear"
381
+ }
382
+ ],
383
+ "widgets": [
384
+ {
385
+ "id": "sales",
386
+ "title": "Ticket sales",
387
+ "size": "half"
388
+ }
389
+ ],
390
+ "editorPanels": [
391
+ {
392
+ "id": "tickets",
393
+ "title": "Tickets & booking",
394
+ "route": "editor/tickets",
395
+ "collections": [
396
+ "events"
397
+ ]
398
+ }
399
+ ]
400
+ }
401
+ }
@@ -0,0 +1,11 @@
1
+ import { SandboxedPlugin } from "emdash/plugin";
2
+
3
+ //#region src/plugin.d.ts
4
+ /**
5
+ * Sandboxed plugin entry. The explicit `SandboxedPlugin` annotation gives TypeScript per-hook /
6
+ * per-route inference (`ctx` is `PluginContext` automatically; hook
7
+ * `event` parameters are typed by hook name).
8
+ */
9
+ declare const plugin: SandboxedPlugin;
10
+ //#endregion
11
+ export { plugin as default };