@dev-crew-berlin/enter-js-utils 0.70.2 → 0.80.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/README.md +1 -1
- package/dist/api-client/api-base.d.ts +11 -5
- package/dist/api-client/api-base.js +13 -12
- package/dist/api-client/index.d.ts +20 -20
- package/dist/api-client/index.js +38 -38
- package/dist/generated/api-schema.d.ts +208 -20
- package/dist/lib/result.js +0 -1
- package/dist/models/attendee.d.ts +16 -15
- package/dist/models/attendee.js +43 -25
- package/dist/models/branch.d.ts +9 -0
- package/dist/models/branch.js +7 -0
- package/dist/models/checkin-counter.d.ts +2 -0
- package/dist/models/checkin-counter.js +1 -0
- package/dist/models/checkin.d.ts +5 -2
- package/dist/models/checkin.js +4 -1
- package/dist/models/checkins.d.ts +2 -2
- package/dist/models/checkins.js +6 -6
- package/dist/models/event.d.ts +2 -1
- package/dist/models/field.d.ts +9 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +1 -0
- package/dist/models/instance.d.ts +2 -1
- package/dist/models/instance.js +6 -3
- package/dist/models/rsvp.d.ts +3 -2
- package/dist/models/rsvp.js +7 -4
- package/dist/ui/button.js +7 -6
- package/dist/ui/button.stories.d.ts +16 -59
- package/dist/ui/button.stories.js +66 -54
- package/dist/ui/checkin-count-indicator.stories.d.ts +14 -84
- package/dist/ui/checkin-count-indicator.stories.js +60 -52
- package/dist/ui/checkin-progress-bar.js +11 -11
- package/dist/ui/checkin-progress-bar.stories.d.ts +12 -59
- package/dist/ui/checkin-progress-bar.stories.js +45 -39
- package/dist/ui/companion-info.js +6 -6
- package/dist/ui/companion-info.stories.d.ts +8 -44
- package/dist/ui/companion-info.stories.js +29 -27
- package/dist/ui/enter-logo.js +2 -2
- package/dist/ui/enter-logo.stories.d.ts +7 -12
- package/dist/ui/enter-logo.stories.js +11 -12
- package/dist/ui/form-elements/input.js +6 -6
- package/dist/ui/form-elements/input.stories.d.ts +8 -15
- package/dist/ui/form-elements/input.stories.js +26 -24
- package/dist/ui/form-elements/label.js +6 -6
- package/dist/ui/form-elements/label.stories.d.ts +6 -5
- package/dist/ui/form-elements/label.stories.js +6 -6
- package/dist/ui/form-elements/search-input.js +10 -10
- package/dist/ui/form-elements/search-input.stories.d.ts +7 -18
- package/dist/ui/form-elements/search-input.stories.js +18 -17
- package/dist/ui/form-elements/segmented-control.js +8 -8
- package/dist/ui/form-elements/segmented-control.stories.d.ts +6 -17
- package/dist/ui/form-elements/segmented-control.stories.js +7 -7
- package/dist/ui/guest-card.d.ts +2 -1
- package/dist/ui/guest-card.js +17 -16
- package/dist/ui/guest-card.stories.d.ts +14 -124
- package/dist/ui/guest-card.stories.js +93 -76
- package/dist/ui/icons/add-guest-icon.stories.d.ts +7 -12
- package/dist/ui/icons/add-guest-icon.stories.js +11 -12
- package/dist/ui/icons/caret-icon.stories.d.ts +7 -15
- package/dist/ui/icons/caret-icon.stories.js +11 -12
- package/dist/ui/icons/filter-icon.stories.d.ts +7 -12
- package/dist/ui/icons/filter-icon.stories.js +11 -12
- package/dist/ui/icons/search-icon.stories.d.ts +7 -12
- package/dist/ui/icons/search-icon.stories.js +11 -12
- package/dist/ui/icons/settings-icon.stories.d.ts +7 -12
- package/dist/ui/icons/settings-icon.stories.js +11 -12
- package/dist/ui/icons/sort-list-icon.stories.d.ts +7 -15
- package/dist/ui/icons/sort-list-icon.stories.js +11 -12
- package/dist/ui/tag.js +5 -5
- package/dist/ui/tag.stories.d.ts +6 -9
- package/dist/ui/tag.stories.js +6 -6
- package/package.json +18 -17
|
@@ -115,7 +115,7 @@ export declare type components = {
|
|
|
115
115
|
/** Group */
|
|
116
116
|
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
117
117
|
/** Preconditions */
|
|
118
|
-
preconditions?: [components["schemas"]["
|
|
118
|
+
preconditions?: [components["schemas"]["AttendeesSelector"], components["schemas"]["RegistrationInfo"]] | null;
|
|
119
119
|
/** Instancename */
|
|
120
120
|
instanceName: string;
|
|
121
121
|
/** Attendeeid */
|
|
@@ -165,7 +165,7 @@ export declare type components = {
|
|
|
165
165
|
event?: "attendee-deleted";
|
|
166
166
|
/** Group */
|
|
167
167
|
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
168
|
-
preconditions?: components["schemas"]["
|
|
168
|
+
preconditions?: components["schemas"]["AttendeesSelector"] | null;
|
|
169
169
|
/** Attendeeid */
|
|
170
170
|
attendeeId: string;
|
|
171
171
|
/** Instancename */
|
|
@@ -204,7 +204,7 @@ export declare type components = {
|
|
|
204
204
|
event?: "attendee-responded";
|
|
205
205
|
/** Group */
|
|
206
206
|
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
207
|
-
preconditions?: components["schemas"]["
|
|
207
|
+
preconditions?: components["schemas"]["common__events__attendee_responded_event__Preconditions"] | null;
|
|
208
208
|
/** Instancename */
|
|
209
209
|
instanceName: string;
|
|
210
210
|
/** Attendeeid */
|
|
@@ -239,6 +239,10 @@ export declare type components = {
|
|
|
239
239
|
};
|
|
240
240
|
companions?: components["schemas"]["RootModel_Union_Companion__MainGuest__-Input"];
|
|
241
241
|
payment?: components["schemas"]["Payment"] | null;
|
|
242
|
+
/** Branches */
|
|
243
|
+
branches?: string[];
|
|
244
|
+
/** Deletedbranches */
|
|
245
|
+
deletedBranches?: string[];
|
|
242
246
|
};
|
|
243
247
|
/**
|
|
244
248
|
* AttendeeUpdatedEvent
|
|
@@ -260,7 +264,7 @@ export declare type components = {
|
|
|
260
264
|
/** Group */
|
|
261
265
|
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
262
266
|
/** Preconditions */
|
|
263
|
-
preconditions?: [components["schemas"]["
|
|
267
|
+
preconditions?: [components["schemas"]["AttendeesSelector"], components["schemas"]["FieldGroup-Input"][]] | null;
|
|
264
268
|
/** Instancename */
|
|
265
269
|
instanceName: string;
|
|
266
270
|
/** Attendeeid */
|
|
@@ -272,6 +276,24 @@ export declare type components = {
|
|
|
272
276
|
*/
|
|
273
277
|
time?: string;
|
|
274
278
|
};
|
|
279
|
+
/** AttendeesSelector */
|
|
280
|
+
AttendeesSelector: {
|
|
281
|
+
/** Instancename */
|
|
282
|
+
instanceName: string;
|
|
283
|
+
/**
|
|
284
|
+
* Branchname
|
|
285
|
+
* @default default
|
|
286
|
+
*/
|
|
287
|
+
branchName?: string;
|
|
288
|
+
/** @default {} */
|
|
289
|
+
filter?: components["schemas"]["Filter"];
|
|
290
|
+
/**
|
|
291
|
+
* Deleted
|
|
292
|
+
* @default exclude_deleted
|
|
293
|
+
* @enum {string}
|
|
294
|
+
*/
|
|
295
|
+
deleted?: "exclude_deleted" | "include_deleted" | "only_deleted";
|
|
296
|
+
};
|
|
275
297
|
/** AuthCode */
|
|
276
298
|
AuthCode: {
|
|
277
299
|
/** Authcode */
|
|
@@ -304,6 +326,28 @@ export declare type components = {
|
|
|
304
326
|
*/
|
|
305
327
|
suffix?: string;
|
|
306
328
|
};
|
|
329
|
+
/** Branch */
|
|
330
|
+
Branch: {
|
|
331
|
+
/** Title */
|
|
332
|
+
title: string;
|
|
333
|
+
/**
|
|
334
|
+
* Guestlistlabel
|
|
335
|
+
* @default Guests
|
|
336
|
+
*/
|
|
337
|
+
guestlistLabel: string;
|
|
338
|
+
/**
|
|
339
|
+
* Checkincounters
|
|
340
|
+
* @default {
|
|
341
|
+
* "main": {
|
|
342
|
+
* "label": "Main Entrance",
|
|
343
|
+
* "short_label": "🎫"
|
|
344
|
+
* }
|
|
345
|
+
* }
|
|
346
|
+
*/
|
|
347
|
+
checkinCounters: {
|
|
348
|
+
[key: string]: components["schemas"]["CheckinCounter"];
|
|
349
|
+
};
|
|
350
|
+
};
|
|
307
351
|
/** CheckboxField */
|
|
308
352
|
"CheckboxField-Input": {
|
|
309
353
|
/**
|
|
@@ -510,7 +554,7 @@ export declare type components = {
|
|
|
510
554
|
* Checkin
|
|
511
555
|
* @description The unique event with the time when someone passed a checkpoint
|
|
512
556
|
*/
|
|
513
|
-
Checkin: {
|
|
557
|
+
"Checkin-Input": {
|
|
514
558
|
/**
|
|
515
559
|
* Id
|
|
516
560
|
* Format: uuid
|
|
@@ -521,6 +565,32 @@ export declare type components = {
|
|
|
521
565
|
* Format: date-time
|
|
522
566
|
*/
|
|
523
567
|
time: string;
|
|
568
|
+
/**
|
|
569
|
+
* Countername
|
|
570
|
+
* @default main
|
|
571
|
+
*/
|
|
572
|
+
counterName?: string;
|
|
573
|
+
};
|
|
574
|
+
/**
|
|
575
|
+
* Checkin
|
|
576
|
+
* @description The unique event with the time when someone passed a checkpoint
|
|
577
|
+
*/
|
|
578
|
+
"Checkin-Output": {
|
|
579
|
+
/**
|
|
580
|
+
* Id
|
|
581
|
+
* Format: uuid
|
|
582
|
+
*/
|
|
583
|
+
id: string;
|
|
584
|
+
/**
|
|
585
|
+
* Time
|
|
586
|
+
* Format: date-time
|
|
587
|
+
*/
|
|
588
|
+
time: string;
|
|
589
|
+
/**
|
|
590
|
+
* Countername
|
|
591
|
+
* @default main
|
|
592
|
+
*/
|
|
593
|
+
counterName: string;
|
|
524
594
|
};
|
|
525
595
|
/** CheckinCount */
|
|
526
596
|
CheckinCount: {
|
|
@@ -535,6 +605,13 @@ export declare type components = {
|
|
|
535
605
|
*/
|
|
536
606
|
checkins: number;
|
|
537
607
|
};
|
|
608
|
+
/** CheckinCounter */
|
|
609
|
+
CheckinCounter: {
|
|
610
|
+
/** Label */
|
|
611
|
+
label: string;
|
|
612
|
+
/** Shortlabel */
|
|
613
|
+
shortLabel: string;
|
|
614
|
+
};
|
|
538
615
|
/**
|
|
539
616
|
* CheckinCreatedEvent
|
|
540
617
|
* @description A new checkin was created
|
|
@@ -560,9 +637,9 @@ export declare type components = {
|
|
|
560
637
|
instanceName: string;
|
|
561
638
|
/** Attendeeid */
|
|
562
639
|
attendeeId: string;
|
|
563
|
-
/**
|
|
564
|
-
|
|
565
|
-
checkin: components["schemas"]["Checkin"];
|
|
640
|
+
/** Branchname */
|
|
641
|
+
branchName: string;
|
|
642
|
+
checkin: components["schemas"]["Checkin-Input"];
|
|
566
643
|
};
|
|
567
644
|
/**
|
|
568
645
|
* CheckinDeletedEvent
|
|
@@ -594,8 +671,8 @@ export declare type components = {
|
|
|
594
671
|
* Format: uuid
|
|
595
672
|
*/
|
|
596
673
|
checkinId: string;
|
|
597
|
-
/**
|
|
598
|
-
|
|
674
|
+
/** Branchname */
|
|
675
|
+
branchName: string;
|
|
599
676
|
};
|
|
600
677
|
/**
|
|
601
678
|
* Checkins
|
|
@@ -606,7 +683,7 @@ export declare type components = {
|
|
|
606
683
|
* Checkins
|
|
607
684
|
* @default []
|
|
608
685
|
*/
|
|
609
|
-
checkins?: components["schemas"]["Checkin"][];
|
|
686
|
+
checkins?: components["schemas"]["Checkin-Input"][];
|
|
610
687
|
/**
|
|
611
688
|
* Deleted
|
|
612
689
|
* @default []
|
|
@@ -622,7 +699,7 @@ export declare type components = {
|
|
|
622
699
|
* Checkins
|
|
623
700
|
* @default []
|
|
624
701
|
*/
|
|
625
|
-
checkins: components["schemas"]["Checkin"][];
|
|
702
|
+
checkins: components["schemas"]["Checkin-Output"][];
|
|
626
703
|
/**
|
|
627
704
|
* Deleted
|
|
628
705
|
* @default []
|
|
@@ -1117,6 +1194,11 @@ export declare type components = {
|
|
|
1117
1194
|
* @default false
|
|
1118
1195
|
*/
|
|
1119
1196
|
invites?: boolean;
|
|
1197
|
+
/**
|
|
1198
|
+
* Branch
|
|
1199
|
+
* @default default
|
|
1200
|
+
*/
|
|
1201
|
+
branch?: string;
|
|
1120
1202
|
/**
|
|
1121
1203
|
* Sort Order
|
|
1122
1204
|
* @default 0
|
|
@@ -1239,6 +1321,76 @@ export declare type components = {
|
|
|
1239
1321
|
*/
|
|
1240
1322
|
max: number;
|
|
1241
1323
|
};
|
|
1324
|
+
/** EmailStatus */
|
|
1325
|
+
EmailStatus: {
|
|
1326
|
+
/**
|
|
1327
|
+
* Mailing Id
|
|
1328
|
+
* @description the unique id of the bulk or single mailing
|
|
1329
|
+
*/
|
|
1330
|
+
mailing_id: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* Status
|
|
1333
|
+
* @enum {string}
|
|
1334
|
+
*/
|
|
1335
|
+
status: "pending" | "waiting" | "submitted" | "skipped" | "sent" | "opened" | "clicked" | "invalid" | "rejected" | "unsubscribed";
|
|
1336
|
+
/**
|
|
1337
|
+
* Updated At
|
|
1338
|
+
* Format: date-time
|
|
1339
|
+
*/
|
|
1340
|
+
updated_at?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Time
|
|
1343
|
+
* @description the time the email was sent (this should only be set when setting the status to 'sent')
|
|
1344
|
+
*/
|
|
1345
|
+
time?: string | null;
|
|
1346
|
+
/**
|
|
1347
|
+
* Reason
|
|
1348
|
+
* @description for error states a reason can be added to the event (reasons will be merged with reasons from prevoius errors)
|
|
1349
|
+
*/
|
|
1350
|
+
reason?: string | string[];
|
|
1351
|
+
/**
|
|
1352
|
+
* Clients
|
|
1353
|
+
* @description for open events a set of email clients can be added (those will be merged with clients from prevois states)
|
|
1354
|
+
*/
|
|
1355
|
+
clients?: string[];
|
|
1356
|
+
/**
|
|
1357
|
+
* Clicks
|
|
1358
|
+
* @description for clicked events a url can be provided (those will be merged with clicks from prevois events)
|
|
1359
|
+
*/
|
|
1360
|
+
clicks?: string[];
|
|
1361
|
+
};
|
|
1362
|
+
/**
|
|
1363
|
+
* EmailStatusUpdatedEvent
|
|
1364
|
+
* @description EmailStatus for attendee was updated.
|
|
1365
|
+
*
|
|
1366
|
+
* Note that there is a special email-unsubscribed-event that also
|
|
1367
|
+
* adds the email address to a blacklist.
|
|
1368
|
+
* This event will only update the email status of the atttendee and nothing else.
|
|
1369
|
+
*/
|
|
1370
|
+
EmailStatusUpdatedEvent: {
|
|
1371
|
+
/**
|
|
1372
|
+
* Id
|
|
1373
|
+
* Format: uuid
|
|
1374
|
+
*/
|
|
1375
|
+
id?: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Event
|
|
1378
|
+
* @default email-status-updated
|
|
1379
|
+
* @constant
|
|
1380
|
+
* @enum {string}
|
|
1381
|
+
*/
|
|
1382
|
+
event?: "email-status-updated";
|
|
1383
|
+
/** Group */
|
|
1384
|
+
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
1385
|
+
preconditions?: components["schemas"]["AttendeesSelector"] | null;
|
|
1386
|
+
/** Instancename */
|
|
1387
|
+
instanceName: string;
|
|
1388
|
+
/** Attendeeid */
|
|
1389
|
+
attendeeId: string;
|
|
1390
|
+
/** Mailid */
|
|
1391
|
+
mailId: string;
|
|
1392
|
+
emailStatus: components["schemas"]["EmailStatus"];
|
|
1393
|
+
};
|
|
1242
1394
|
/**
|
|
1243
1395
|
* EmailUnsubscribedEvent
|
|
1244
1396
|
* @description Attendee unsubscribed from email list.
|
|
@@ -1937,13 +2089,12 @@ export declare type components = {
|
|
|
1937
2089
|
event?: "payment-paid";
|
|
1938
2090
|
/** Group */
|
|
1939
2091
|
group?: components["schemas"]["EventGroup"] | components["schemas"]["NoGroup"];
|
|
1940
|
-
preconditions?: components["schemas"]["
|
|
2092
|
+
preconditions?: components["schemas"]["common__events__payment_paid_event__Preconditions"] | null;
|
|
1941
2093
|
/** Attendeeid */
|
|
1942
2094
|
attendeeId: string;
|
|
1943
2095
|
/** Instancename */
|
|
1944
2096
|
instanceName: string;
|
|
1945
2097
|
};
|
|
1946
|
-
Preconditions: [components["schemas"]["Filter"], [string, components["schemas"]["EmailConfig"]][], components["schemas"]["MailgunConfig"] | components["schemas"]["SmtpConfig"], components["schemas"]["FrontendConfig"]];
|
|
1947
2098
|
/** PublicAttendee */
|
|
1948
2099
|
"PublicAttendee-Input": {
|
|
1949
2100
|
/** Id */
|
|
@@ -1981,6 +2132,11 @@ export declare type components = {
|
|
|
1981
2132
|
checkin?: {
|
|
1982
2133
|
[key: string]: components["schemas"]["Checkins-Input"];
|
|
1983
2134
|
};
|
|
2135
|
+
/**
|
|
2136
|
+
* Branches
|
|
2137
|
+
* @default []
|
|
2138
|
+
*/
|
|
2139
|
+
branches?: string[];
|
|
1984
2140
|
/**
|
|
1985
2141
|
* @default {
|
|
1986
2142
|
* "isCompanion": false
|
|
@@ -2031,6 +2187,11 @@ export declare type components = {
|
|
|
2031
2187
|
checkin: {
|
|
2032
2188
|
[key: string]: components["schemas"]["Checkins-Output"];
|
|
2033
2189
|
};
|
|
2190
|
+
/**
|
|
2191
|
+
* Branches
|
|
2192
|
+
* @default []
|
|
2193
|
+
*/
|
|
2194
|
+
branches: string[];
|
|
2034
2195
|
/**
|
|
2035
2196
|
* @default {
|
|
2036
2197
|
* "isCompanion": false
|
|
@@ -2059,8 +2220,6 @@ export declare type components = {
|
|
|
2059
2220
|
name: string;
|
|
2060
2221
|
/** Title */
|
|
2061
2222
|
title: string;
|
|
2062
|
-
/** Checkins */
|
|
2063
|
-
checkins: string[];
|
|
2064
2223
|
/** Description */
|
|
2065
2224
|
description: string;
|
|
2066
2225
|
/** Thumbnail */
|
|
@@ -2073,6 +2232,10 @@ export declare type components = {
|
|
|
2073
2232
|
tagColors: {
|
|
2074
2233
|
[key: string]: string;
|
|
2075
2234
|
};
|
|
2235
|
+
/** Branches */
|
|
2236
|
+
branches: {
|
|
2237
|
+
[key: string]: components["schemas"]["Branch"];
|
|
2238
|
+
};
|
|
2076
2239
|
};
|
|
2077
2240
|
/** PublicRegistrationInfo */
|
|
2078
2241
|
PublicRegistrationInfo: {
|
|
@@ -2113,7 +2276,11 @@ export declare type components = {
|
|
|
2113
2276
|
userdata: Record<string, unknown>;
|
|
2114
2277
|
/** Permissions */
|
|
2115
2278
|
permissions: {
|
|
2116
|
-
[key: string]: ("attendees:read" | "attendees:create" | "attendees:write" | "attendees:write:bulk" | "attendees:import" | "attendees:export" | "attendees:delete:soft" | "attendees:delete:final" | "emails:send" | "emails:send:bulk" | "email-config:write" | "pdfs:write" | "pdfs:export" | "payment:write" | "checkins:write" | "branches:
|
|
2279
|
+
[key: string]: ("attendees:read" | "attendees:create" | "attendees:write" | "attendees:write:bulk" | "attendees:import" | "attendees:export" | "attendees:delete:soft" | "attendees:delete:final" | "emails:send" | "emails:send:bulk" | "email-config:write" | "pdfs:write" | "pdfs:export" | "payment:write" | "checkins:write" | "branches:write" | "files:write" | "fields:write" | "fields:read" | "templates:write" | "register-flow:write" | "export-config:write" | "instance-info:read" | "instance-info:write" | "domains:manage" | "stats:read" | "stats:write" | "backup:write" | "variables:read" | "variables:write" | "webhooks:read" | "webhooks:write" | "eventlog:read")[];
|
|
2280
|
+
};
|
|
2281
|
+
/** Groups */
|
|
2282
|
+
groups: {
|
|
2283
|
+
[key: string]: ("team" | "external")[];
|
|
2117
2284
|
};
|
|
2118
2285
|
};
|
|
2119
2286
|
/** QuestionFields */
|
|
@@ -2137,6 +2304,13 @@ export declare type components = {
|
|
|
2137
2304
|
tieBreaker?: string;
|
|
2138
2305
|
/** Personcount */
|
|
2139
2306
|
personCount: number;
|
|
2307
|
+
/**
|
|
2308
|
+
* Checkincounters
|
|
2309
|
+
* @default [
|
|
2310
|
+
* "main"
|
|
2311
|
+
* ]
|
|
2312
|
+
*/
|
|
2313
|
+
checkinCounters?: string[];
|
|
2140
2314
|
/** Time */
|
|
2141
2315
|
time: string | null;
|
|
2142
2316
|
};
|
|
@@ -2149,6 +2323,13 @@ export declare type components = {
|
|
|
2149
2323
|
tieBreaker: string;
|
|
2150
2324
|
/** Personcount */
|
|
2151
2325
|
personCount: number;
|
|
2326
|
+
/**
|
|
2327
|
+
* Checkincounters
|
|
2328
|
+
* @default [
|
|
2329
|
+
* "main"
|
|
2330
|
+
* ]
|
|
2331
|
+
*/
|
|
2332
|
+
checkinCounters: string[];
|
|
2152
2333
|
/** Time */
|
|
2153
2334
|
time: string | null;
|
|
2154
2335
|
/** Confirmed */
|
|
@@ -2289,8 +2470,8 @@ export declare type components = {
|
|
|
2289
2470
|
"RootModel_Union_Companion__MainGuest__-Input": components["schemas"]["Companion-Input"] | components["schemas"]["MainGuest-Input"];
|
|
2290
2471
|
/** RootModel[Union[Companion, MainGuest]] */
|
|
2291
2472
|
"RootModel_Union_Companion__MainGuest__-Output": components["schemas"]["Companion-Output"] | components["schemas"]["MainGuest-Output"];
|
|
2292
|
-
/** RootModel[list[Annotated[Union[AttendeeCreatedEvent, AttendeeUpdatedEvent, AttendeeRespondedEvent, AttendeeAuthCodeRequested, EmailUnsubscribedEvent, AttendeeDeletedEvent, CheckinCreatedEvent, CheckinDeletedEvent, PaymentPaidEvent], FieldInfo(annotation=NoneType, required=True, discriminator='event')]]] */
|
|
2293
|
-
|
|
2473
|
+
/** RootModel[list[Annotated[Union[AttendeeCreatedEvent, AttendeeUpdatedEvent, AttendeeRespondedEvent, AttendeeAuthCodeRequested, EmailStatusUpdatedEvent, EmailUnsubscribedEvent, AttendeeDeletedEvent, CheckinCreatedEvent, CheckinDeletedEvent, PaymentPaidEvent], FieldInfo(annotation=NoneType, required=True, discriminator='event')]]] */
|
|
2474
|
+
RootModel_list_Annotated_Union_AttendeeCreatedEvent__AttendeeUpdatedEvent__AttendeeRespondedEvent__AttendeeAuthCodeRequested__EmailStatusUpdatedEvent__EmailUnsubscribedEvent__AttendeeDeletedEvent__CheckinCreatedEvent__CheckinDeletedEvent__PaymentPaidEvent___FieldInfo_annotation_NoneType__required_True__discriminator__event_____: (components["schemas"]["AttendeeCreatedEvent"] | components["schemas"]["AttendeeUpdatedEvent"] | components["schemas"]["AttendeeRespondedEvent"] | components["schemas"]["AttendeeAuthCodeRequested"] | components["schemas"]["EmailStatusUpdatedEvent"] | components["schemas"]["EmailUnsubscribedEvent"] | components["schemas"]["AttendeeDeletedEvent"] | components["schemas"]["CheckinCreatedEvent"] | components["schemas"]["CheckinDeletedEvent"] | components["schemas"]["PaymentPaidEvent"])[];
|
|
2294
2475
|
/** SecurityQuestion */
|
|
2295
2476
|
SecurityQuestion: {
|
|
2296
2477
|
security_question: components["schemas"]["QuestionFields"];
|
|
@@ -2628,6 +2809,8 @@ export declare type components = {
|
|
|
2628
2809
|
/** Isprivate */
|
|
2629
2810
|
isPrivate?: boolean | null;
|
|
2630
2811
|
};
|
|
2812
|
+
common__events__attendee_responded_event__Preconditions: [components["schemas"]["AttendeesSelector"], [string, components["schemas"]["EmailConfig"]][], components["schemas"]["MailgunConfig"] | components["schemas"]["SmtpConfig"], components["schemas"]["FrontendConfig"]];
|
|
2813
|
+
common__events__payment_paid_event__Preconditions: [components["schemas"]["AttendeesSelector"], [string, components["schemas"]["EmailConfig"]][], components["schemas"]["MailgunConfig"] | components["schemas"]["SmtpConfig"], components["schemas"]["FrontendConfig"]];
|
|
2631
2814
|
};
|
|
2632
2815
|
responses: never;
|
|
2633
2816
|
parameters: never;
|
|
@@ -2655,6 +2838,9 @@ export declare type operations = {
|
|
|
2655
2838
|
/** Checkin Counts */
|
|
2656
2839
|
checkin_counts_instances__instance_name__checkin_counts_get: {
|
|
2657
2840
|
parameters: {
|
|
2841
|
+
query?: {
|
|
2842
|
+
branch?: string;
|
|
2843
|
+
};
|
|
2658
2844
|
header?: {
|
|
2659
2845
|
"x-enter-device-name"?: string | null;
|
|
2660
2846
|
};
|
|
@@ -2683,6 +2869,7 @@ export declare type operations = {
|
|
|
2683
2869
|
calcualte_custom_counts_instances__instance_name__custom_counts_post: {
|
|
2684
2870
|
parameters: {
|
|
2685
2871
|
query?: {
|
|
2872
|
+
branch?: string;
|
|
2686
2873
|
include_deleted?: boolean;
|
|
2687
2874
|
};
|
|
2688
2875
|
header?: {
|
|
@@ -2726,7 +2913,7 @@ export declare type operations = {
|
|
|
2726
2913
|
};
|
|
2727
2914
|
requestBody: {
|
|
2728
2915
|
content: {
|
|
2729
|
-
"application/json": components["schemas"]["
|
|
2916
|
+
"application/json": components["schemas"]["RootModel_list_Annotated_Union_AttendeeCreatedEvent__AttendeeUpdatedEvent__AttendeeRespondedEvent__AttendeeAuthCodeRequested__EmailStatusUpdatedEvent__EmailUnsubscribedEvent__AttendeeDeletedEvent__CheckinCreatedEvent__CheckinDeletedEvent__PaymentPaidEvent___FieldInfo_annotation_NoneType__required_True__discriminator__event_____"];
|
|
2730
2917
|
};
|
|
2731
2918
|
};
|
|
2732
2919
|
responses: {
|
|
@@ -2877,6 +3064,7 @@ export declare type operations = {
|
|
|
2877
3064
|
attendee_list_instances__instance_name__attendees_get: {
|
|
2878
3065
|
parameters: {
|
|
2879
3066
|
query?: {
|
|
3067
|
+
branch?: string;
|
|
2880
3068
|
filter?: string | null;
|
|
2881
3069
|
include_deleted?: boolean;
|
|
2882
3070
|
};
|
package/dist/lib/result.js
CHANGED
|
@@ -40,7 +40,6 @@ export function combineResults(results) {
|
|
|
40
40
|
) // also the typechecker does not resolve this so we just tell him its fine and hope there are no errors
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
|
|
44
43
|
return {
|
|
45
44
|
success: false,
|
|
46
45
|
error: results.map(result => asFailure(result)?.error).filter(failure => failure !== undefined) // the typechecker does not resolve this so we just tell him its fine and hope there are no errors
|
|
@@ -7,12 +7,13 @@ export declare type AttendeeJSON = components['schemas']['PublicAttendee-Output'
|
|
|
7
7
|
declare type AttendeeJSONInput = components['schemas']['PublicAttendee-Input'];
|
|
8
8
|
export declare class Attendee {
|
|
9
9
|
id: string;
|
|
10
|
-
userdata:
|
|
11
|
-
tags: string
|
|
10
|
+
userdata: Map<string, FieldValue>;
|
|
11
|
+
tags: Set<string>;
|
|
12
12
|
language: string | null;
|
|
13
13
|
time: Date;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
branches: Set<string>;
|
|
15
|
+
rsvp: Map<string, Rsvp | null>;
|
|
16
|
+
checkin: Map<string, Checkins>;
|
|
16
17
|
companions: {
|
|
17
18
|
isCompanion: false;
|
|
18
19
|
} | {
|
|
@@ -36,20 +37,20 @@ export declare class Attendee {
|
|
|
36
37
|
*/
|
|
37
38
|
static generateID(prefix: string): string;
|
|
38
39
|
toJSON(): AttendeeJSON;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
getRsvpCountForBranch(branchName: string): number;
|
|
41
|
+
getRsvpCount(branchName: string, counterName: string): number;
|
|
42
|
+
getResponseForBranch(branchName: string): 'no-response' | 'negative-response' | 'positive-response';
|
|
43
|
+
getResponse(branchName: string, counterName: string): 'no-response' | 'negative-response' | 'positive-response';
|
|
44
|
+
getCheckinsForBranch(branchName: string): Checkins;
|
|
45
|
+
getCheckinCount(branchName: string, counterName: string): number;
|
|
46
|
+
addCheckinForBranch(args: {
|
|
47
|
+
branchName: string;
|
|
45
48
|
checkin: Checkin;
|
|
46
49
|
}): Attendee;
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
deleteCheckinForBranch(args: {
|
|
51
|
+
branchName: string;
|
|
49
52
|
checkinId: string;
|
|
50
53
|
}): Attendee;
|
|
51
|
-
|
|
52
|
-
checkinTags: string[];
|
|
53
|
-
}): boolean;
|
|
54
|
+
getFieldValueString(fieldKey: string): string;
|
|
54
55
|
}
|
|
55
56
|
export {};
|
package/dist/models/attendee.js
CHANGED
|
@@ -2,11 +2,12 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
2
2
|
import { Checkins } from './checkins';
|
|
3
3
|
import { Rsvp } from './rsvp';
|
|
4
4
|
export class Attendee {
|
|
5
|
-
userdata =
|
|
6
|
-
tags =
|
|
5
|
+
userdata = new Map();
|
|
6
|
+
tags = new Set();
|
|
7
7
|
language = null;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
branches = new Set();
|
|
9
|
+
rsvp = new Map();
|
|
10
|
+
checkin = new Map();
|
|
10
11
|
companions = {
|
|
11
12
|
isCompanion: false
|
|
12
13
|
};
|
|
@@ -20,12 +21,13 @@ export class Attendee {
|
|
|
20
21
|
}
|
|
21
22
|
const json = args;
|
|
22
23
|
this.id = json.id;
|
|
23
|
-
this.userdata = json.userdata;
|
|
24
|
-
this.tags = json.tags
|
|
24
|
+
this.userdata = new Map(Object.entries(json.userdata ?? {}));
|
|
25
|
+
this.tags = new Set(json.tags);
|
|
25
26
|
this.language = json.language;
|
|
27
|
+
this.branches = new Set(json.branches);
|
|
26
28
|
this.time = json.time ? new Date(json.time) : new Date();
|
|
27
|
-
this.rsvp =
|
|
28
|
-
this.checkin =
|
|
29
|
+
this.rsvp = new Map(Object.entries(json.rsvp ?? {}).map(([checkinTag, rsvp]) => [checkinTag, rsvp ? new Rsvp(rsvp) : null]));
|
|
30
|
+
this.checkin = new Map(Object.entries(json.checkin ?? {}).map(([checkinTag, checkin]) => [checkinTag, new Checkins(checkin)]));
|
|
29
31
|
this.companions = json.companions?.isCompanion ? {
|
|
30
32
|
isCompanion: true,
|
|
31
33
|
...json.companions
|
|
@@ -62,45 +64,60 @@ export class Attendee {
|
|
|
62
64
|
return {
|
|
63
65
|
...this,
|
|
64
66
|
time: this.time?.toISOString(),
|
|
67
|
+
branches: Array.from(this.branches),
|
|
68
|
+
tags: Array.from(this.tags),
|
|
69
|
+
userdata: Object.fromEntries(this.userdata),
|
|
65
70
|
checkin,
|
|
66
71
|
rsvp
|
|
67
72
|
};
|
|
68
73
|
}
|
|
69
|
-
|
|
70
|
-
const rsvp = this.rsvp
|
|
74
|
+
getRsvpCountForBranch(branchName) {
|
|
75
|
+
const rsvp = this.rsvp.get(branchName);
|
|
71
76
|
if (!rsvp) return 0;
|
|
72
77
|
return rsvp.personCount;
|
|
73
78
|
}
|
|
74
|
-
|
|
75
|
-
const rsvp = this.rsvp
|
|
79
|
+
getRsvpCount(branchName, counterName) {
|
|
80
|
+
const rsvp = this.rsvp.get(branchName);
|
|
81
|
+
if (!rsvp) return 0;
|
|
82
|
+
if (!rsvp.checkinCounters.has(counterName)) return 0;
|
|
83
|
+
return rsvp.personCount;
|
|
84
|
+
}
|
|
85
|
+
getResponseForBranch(branchName) {
|
|
86
|
+
const rsvp = this.rsvp.get(branchName) ?? null;
|
|
87
|
+
if (rsvp === null) return 'no-response';
|
|
88
|
+
return rsvp.confirmed ? 'positive-response' : 'negative-response';
|
|
89
|
+
}
|
|
90
|
+
getResponse(branchName, counterName) {
|
|
91
|
+
const rsvp = this.rsvp.get(branchName) ?? null;
|
|
76
92
|
if (rsvp === null) return 'no-response';
|
|
93
|
+
if (!rsvp.checkinCounters.has(counterName)) 'no-response';
|
|
77
94
|
return rsvp.confirmed ? 'positive-response' : 'negative-response';
|
|
78
95
|
}
|
|
79
|
-
|
|
80
|
-
return this.checkin
|
|
96
|
+
getCheckinsForBranch(branchName) {
|
|
97
|
+
return this.checkin.get(branchName) ?? new Checkins({
|
|
81
98
|
checkins: [],
|
|
82
99
|
deleted: []
|
|
83
100
|
});
|
|
84
101
|
}
|
|
85
|
-
|
|
86
|
-
const checkins = this.checkin
|
|
102
|
+
getCheckinCount(branchName, counterName) {
|
|
103
|
+
const checkins = this.checkin.get(branchName);
|
|
87
104
|
if (!checkins) return 0;
|
|
88
|
-
return checkins.getActiveCheckins().length;
|
|
105
|
+
return checkins.getActiveCheckins(counterName).length;
|
|
89
106
|
}
|
|
90
|
-
|
|
91
|
-
const exsitingCheckins = this.
|
|
107
|
+
addCheckinForBranch(args) {
|
|
108
|
+
const exsitingCheckins = this.getCheckinsForBranch(args.branchName);
|
|
92
109
|
const newCheckins = new Checkins();
|
|
93
110
|
newCheckins.checkins = [args.checkin];
|
|
94
111
|
const mergedCheckins = exsitingCheckins.merge(newCheckins);
|
|
95
112
|
const newAttendee = new Attendee(this.toJSON());
|
|
96
113
|
newAttendee.checkin = {
|
|
97
114
|
...this.checkin,
|
|
98
|
-
[args.
|
|
115
|
+
[args.branchName]: mergedCheckins
|
|
99
116
|
};
|
|
100
117
|
return newAttendee;
|
|
101
118
|
}
|
|
102
|
-
|
|
103
|
-
const exsitingCheckins = this.
|
|
119
|
+
deleteCheckinForBranch(args) {
|
|
120
|
+
const exsitingCheckins = this.getCheckinsForBranch(args.branchName);
|
|
104
121
|
const deletedCheckins = new Checkins({
|
|
105
122
|
checkins: [],
|
|
106
123
|
deleted: [args.checkinId]
|
|
@@ -109,11 +126,12 @@ export class Attendee {
|
|
|
109
126
|
const newAttendee = new Attendee(this.toJSON());
|
|
110
127
|
newAttendee.checkin = {
|
|
111
128
|
...this.checkin,
|
|
112
|
-
[args.
|
|
129
|
+
[args.branchName]: mergedCheckins
|
|
113
130
|
};
|
|
114
131
|
return newAttendee;
|
|
115
132
|
}
|
|
116
|
-
|
|
117
|
-
|
|
133
|
+
getFieldValueString(fieldKey) {
|
|
134
|
+
const fieldValue = this.userdata.get(fieldKey);
|
|
135
|
+
return fieldValue?.toString() ?? '';
|
|
118
136
|
}
|
|
119
137
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { components } from '../generated/api-schema';
|
|
2
|
+
import { CheckinCounter } from './checkin-counter';
|
|
3
|
+
export declare type BranchJSON = components['schemas']['Branch'];
|
|
4
|
+
export declare class Branch {
|
|
5
|
+
title: string;
|
|
6
|
+
guestlistLabel: string;
|
|
7
|
+
checkinCounters: Map<string, CheckinCounter>;
|
|
8
|
+
constructor(json: BranchJSON);
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/models/checkin.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { components } from '../generated/api-schema';
|
|
2
|
-
export declare type CheckinJSON = components['schemas']['Checkin'];
|
|
2
|
+
export declare type CheckinJSON = components['schemas']['Checkin-Output'];
|
|
3
|
+
declare type CheckinJSONInput = components['schemas']['Checkin-Input'];
|
|
3
4
|
export declare class Checkin {
|
|
4
5
|
id: string;
|
|
5
6
|
time: Date;
|
|
6
|
-
|
|
7
|
+
counterName: string;
|
|
8
|
+
constructor(json: CheckinJSONInput);
|
|
7
9
|
toJSON(): CheckinJSON;
|
|
8
10
|
}
|
|
11
|
+
export {};
|