@dev-crew-berlin/enter-js-utils 0.48.0 → 0.50.1

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.
@@ -21,6 +21,12 @@ export default class API extends APIBase {
21
21
  getCheckinCounts(args: {
22
22
  instanceName: string;
23
23
  }): Promise<APIResult<CheckinCounts>>;
24
+ calculateCustomCounts(args: {
25
+ instanceName: string;
26
+ counter: components['schemas']['CustomCounter'][];
27
+ }): Promise<APIResult<{
28
+ [key: string]: number;
29
+ }>>;
24
30
  getAttendeeList(args: {
25
31
  instanceName: string;
26
32
  includeDeleted?: boolean;
@@ -25,6 +25,12 @@ export default class API extends APIBase {
25
25
  const instanceName = args.instanceName;
26
26
  return this.get(`/instances/${instanceName}/checkin_counts`);
27
27
  }
28
+ async calculateCustomCounts(args) {
29
+ const instanceName = args.instanceName;
30
+ return this.post(`/instances/${instanceName}/custom_counts`, {
31
+ counters: args.counter
32
+ });
33
+ }
28
34
  async getAttendeeList(args) {
29
35
  const query = new URLSearchParams();
30
36
  if (args.includeDeleted) {
@@ -10,6 +10,9 @@ export declare type paths = {
10
10
  "/instances/{instance_name}/checkin_counts": {
11
11
  get: operations["checkin_counts_instances__instance_name__checkin_counts_get"];
12
12
  };
13
+ "/instances/{instance_name}/custom_counts": {
14
+ post: operations["calcualte_custom_counts_instances__instance_name__custom_counts_post"];
15
+ };
13
16
  "/events": {
14
17
  /** Send a list of events to be applied to the current state. Events are executed in order. */
15
18
  post: operations["create_events_events_post"];
@@ -65,6 +68,29 @@ export declare type paths = {
65
68
  };
66
69
  export declare type components = {
67
70
  schemas: {
71
+ /**
72
+ * AttendeeAuthCodeRequested
73
+ * @description A request to set an auth_code for the attendee
74
+ *
75
+ * This will generate and set an auth code for the attendee. If none is already set.
76
+ */
77
+ AttendeeAuthCodeRequested: {
78
+ /**
79
+ * Id
80
+ * Format: uuid
81
+ */
82
+ id?: string;
83
+ /**
84
+ * Event
85
+ * @default attendee-auth-code-requested
86
+ * @enum {string}
87
+ */
88
+ event: "attendee-auth-code-requested";
89
+ /** Instancename */
90
+ instanceName: string;
91
+ /** Attendeeid */
92
+ attendeeId: string;
93
+ };
68
94
  /**
69
95
  * AttendeeCreatedEvent
70
96
  * @description New attendee was created
@@ -218,55 +244,6 @@ export declare type components = {
218
244
  */
219
245
  suffix: string;
220
246
  };
221
- /** AuthField */
222
- AuthField: {
223
- /**
224
- * Type
225
- * @default auth
226
- * @enum {string}
227
- */
228
- type: "auth";
229
- /**
230
- * Name
231
- * @default new_field
232
- */
233
- name: string;
234
- /** Title */
235
- title?: string | {
236
- [key: string]: string;
237
- };
238
- /** Info */
239
- info?: string | {
240
- [key: string]: string;
241
- };
242
- /**
243
- * Class
244
- * @default
245
- */
246
- class: string;
247
- /**
248
- * Ismetafield
249
- * @default false
250
- */
251
- isMetaField: boolean;
252
- /**
253
- * Static
254
- * @default false
255
- */
256
- static: boolean;
257
- /**
258
- * Required
259
- * @default false
260
- */
261
- required: boolean;
262
- /**
263
- * Hidden
264
- * @default false
265
- */
266
- hidden: boolean;
267
- /** Value */
268
- value?: string;
269
- };
270
247
  /** CheckboxField */
271
248
  CheckboxField: {
272
249
  /**
@@ -473,6 +450,65 @@ export declare type components = {
473
450
  */
474
451
  deleted: string[];
475
452
  };
453
+ /** CodeField */
454
+ CodeField: {
455
+ /**
456
+ * Type
457
+ * @default code
458
+ * @enum {string}
459
+ */
460
+ type: "code";
461
+ /**
462
+ * Name
463
+ * @default new_field
464
+ */
465
+ name: string;
466
+ /** Title */
467
+ title?: string | {
468
+ [key: string]: string;
469
+ };
470
+ /** Info */
471
+ info?: string | {
472
+ [key: string]: string;
473
+ };
474
+ /**
475
+ * Class
476
+ * @default
477
+ */
478
+ class: string;
479
+ /**
480
+ * Ismetafield
481
+ * @default false
482
+ */
483
+ isMetaField: boolean;
484
+ /**
485
+ * Static
486
+ * @default false
487
+ */
488
+ static: boolean;
489
+ /**
490
+ * Required
491
+ * @default false
492
+ */
493
+ required: boolean;
494
+ /**
495
+ * Hidden
496
+ * @default false
497
+ */
498
+ hidden: boolean;
499
+ /** Value */
500
+ value?: string;
501
+ /**
502
+ * Min
503
+ * @default 0
504
+ */
505
+ min: number;
506
+ /**
507
+ * Max
508
+ * @default 2000
509
+ */
510
+ max: number;
511
+ };
476
512
  /** CompanionJSON */
477
513
  CompanionJSON: {
478
514
  /**
@@ -483,6 +519,18 @@ export declare type components = {
483
519
  /** Mainguestid */
484
520
  mainGuestId: string;
485
521
  };
522
+ /** CustomCountQuery */
523
+ CustomCountQuery: {
524
+ /** Counters */
525
+ counters: components["schemas"]["CustomCounter"][];
526
+ };
527
+ /** CustomCounter */
528
+ CustomCounter: {
529
+ /** Name */
530
+ name: string;
531
+ /** Filter */
532
+ filter: string;
533
+ };
486
534
  /** DateField */
487
535
  DateField: {
488
536
  /**
@@ -637,10 +685,16 @@ export declare type components = {
637
685
  hidden: boolean;
638
686
  /** Value */
639
687
  value?: string;
640
- /** Min */
641
- min?: number;
642
- /** Max */
643
- max?: number;
688
+ /**
689
+ * Min
690
+ * @default 0
691
+ */
692
+ min: number;
693
+ /**
694
+ * Max
695
+ * @default 1000
696
+ */
697
+ max: number;
644
698
  };
645
699
  /**
646
700
  * EmailUnsubscribedEvent
@@ -671,7 +725,7 @@ export declare type components = {
671
725
  emailAddress: string;
672
726
  };
673
727
  /** EventList */
674
- EventList: (components["schemas"]["AttendeeCreatedEvent"] | components["schemas"]["AttendeeUpdatedEvent"] | components["schemas"]["AttendeeRespondedEvent"] | components["schemas"]["EmailUnsubscribedEvent"] | components["schemas"]["AttendeeDeletedEvent"] | components["schemas"]["CheckinCreatedEvent"] | components["schemas"]["CheckinDeletedEvent"] | components["schemas"]["PaymentPaidEvent"])[];
728
+ EventList: (components["schemas"]["AttendeeCreatedEvent"] | components["schemas"]["AttendeeUpdatedEvent"] | components["schemas"]["AttendeeRespondedEvent"] | components["schemas"]["AttendeeAuthCodeRequested"] | components["schemas"]["EmailUnsubscribedEvent"] | components["schemas"]["AttendeeDeletedEvent"] | components["schemas"]["CheckinCreatedEvent"] | components["schemas"]["CheckinDeletedEvent"] | components["schemas"]["PaymentPaidEvent"])[];
675
729
  /** EventResponse */
676
730
  EventResponse: {
677
731
  /** Created */
@@ -680,7 +734,7 @@ export declare type components = {
680
734
  /** FieldGroup */
681
735
  FieldGroup: {
682
736
  /** Questions */
683
- questions: (components["schemas"]["TextField"] | components["schemas"]["StaticField"] | components["schemas"]["ImageUploadField"] | components["schemas"]["FileUploadField"] | components["schemas"]["LongtextField"] | components["schemas"]["RadioButtonField"] | components["schemas"]["RadioButtonGroupField"] | components["schemas"]["DropdownField"] | components["schemas"]["DateField"] | components["schemas"]["EmailField"] | components["schemas"]["AuthField"] | components["schemas"]["NumberField"] | components["schemas"]["CheckboxField"] | components["schemas"]["CheckboxGroupField"])[];
737
+ questions: (components["schemas"]["TextField"] | components["schemas"]["StaticField"] | components["schemas"]["ImageUploadField"] | components["schemas"]["FileUploadField"] | components["schemas"]["LongtextField"] | components["schemas"]["RadioButtonGroupField"] | components["schemas"]["DropdownField"] | components["schemas"]["DateField"] | components["schemas"]["EmailField"] | components["schemas"]["NumberField"] | components["schemas"]["CheckboxField"] | components["schemas"]["CheckboxGroupField"] | components["schemas"]["CodeField"])[];
684
738
  /** Info */
685
739
  info?: string | {
686
740
  [key: string]: string;
@@ -887,10 +941,16 @@ export declare type components = {
887
941
  hidden: boolean;
888
942
  /** Value */
889
943
  value?: string;
890
- /** Min */
891
- min?: number;
892
- /** Max */
893
- max?: number;
944
+ /**
945
+ * Min
946
+ * @default 0
947
+ */
948
+ min: number;
949
+ /**
950
+ * Max
951
+ * @default 1000
952
+ */
953
+ max: number;
894
954
  };
895
955
  /** MainGuestJSON */
896
956
  MainGuestJSON: {
@@ -948,10 +1008,16 @@ export declare type components = {
948
1008
  hidden: boolean;
949
1009
  /** Value */
950
1010
  value?: string;
951
- /** Min */
952
- min?: number;
953
- /** Max */
954
- max?: number;
1011
+ /**
1012
+ * Min
1013
+ * @default 0
1014
+ */
1015
+ min: number;
1016
+ /**
1017
+ * Max
1018
+ * @default 1000
1019
+ */
1020
+ max: number;
955
1021
  };
956
1022
  /** Payment */
957
1023
  Payment: {
@@ -1105,57 +1171,6 @@ export declare type components = {
1105
1171
  /** Answer */
1106
1172
  answer: string;
1107
1173
  };
1108
- /** RadioButtonField */
1109
- RadioButtonField: {
1110
- /**
1111
- * Type
1112
- * @default radiobutton
1113
- * @enum {string}
1114
- */
1115
- type: "radiobutton";
1116
- /**
1117
- * Name
1118
- * @default new_field
1119
- */
1120
- name: string;
1121
- /** Title */
1122
- title?: string | {
1123
- [key: string]: string;
1124
- };
1125
- /** Info */
1126
- info?: string | {
1127
- [key: string]: string;
1128
- };
1129
- /**
1130
- * Class
1131
- * @default
1132
- */
1133
- class: string;
1134
- /**
1135
- * Ismetafield
1136
- * @default false
1137
- */
1138
- isMetaField: boolean;
1139
- /**
1140
- * Static
1141
- * @default false
1142
- */
1143
- static: boolean;
1144
- /**
1145
- * Required
1146
- * @default false
1147
- */
1148
- required: boolean;
1149
- /**
1150
- * Hidden
1151
- * @default false
1152
- */
1153
- hidden: boolean;
1154
- /** Value */
1155
- value?: string;
1156
- /** Itemval */
1157
- itemval?: string;
1158
- };
1159
1174
  /** RadioButtonGroupField */
1160
1175
  RadioButtonGroupField: {
1161
1176
  /**
@@ -1296,6 +1311,16 @@ export declare type components = {
1296
1311
  hidden: boolean;
1297
1312
  /** Value */
1298
1313
  value?: string;
1314
+ /**
1315
+ * Min
1316
+ * @default 0
1317
+ */
1318
+ min: number;
1319
+ /**
1320
+ * Max
1321
+ * @default 1000
1322
+ */
1323
+ max: number;
1299
1324
  };
1300
1325
  /** TextField */
1301
1326
  TextField: {
@@ -1345,10 +1370,16 @@ export declare type components = {
1345
1370
  hidden: boolean;
1346
1371
  /** Value */
1347
1372
  value?: string;
1348
- /** Min */
1349
- min?: number;
1350
- /** Max */
1351
- max?: number;
1373
+ /**
1374
+ * Min
1375
+ * @default 0
1376
+ */
1377
+ min: number;
1378
+ /**
1379
+ * Max
1380
+ * @default 1000
1381
+ */
1382
+ max: number;
1352
1383
  };
1353
1384
  /** UserPreferencesUpdate */
1354
1385
  UserPreferencesUpdate: {
@@ -1438,6 +1469,37 @@ export declare type operations = {
1438
1469
  };
1439
1470
  };
1440
1471
  };
1472
+ calcualte_custom_counts_instances__instance_name__custom_counts_post: {
1473
+ parameters: {
1474
+ path: {
1475
+ instance_name: string;
1476
+ };
1477
+ query: {
1478
+ include_deleted?: boolean;
1479
+ };
1480
+ };
1481
+ responses: {
1482
+ /** Successful Response */
1483
+ 200: {
1484
+ content: {
1485
+ "application/json": {
1486
+ [key: string]: number;
1487
+ };
1488
+ };
1489
+ };
1490
+ /** Validation Error */
1491
+ 422: {
1492
+ content: {
1493
+ "application/json": components["schemas"]["HTTPValidationError"];
1494
+ };
1495
+ };
1496
+ };
1497
+ requestBody: {
1498
+ content: {
1499
+ "application/json": components["schemas"]["CustomCountQuery"];
1500
+ };
1501
+ };
1502
+ };
1441
1503
  /** Send a list of events to be applied to the current state. Events are executed in order. */
1442
1504
  create_events_events_post: {
1443
1505
  responses: {
@@ -20,9 +20,6 @@ export declare type SingleCheckboxField = components['schemas']['CheckboxField']
20
20
  export declare type RadioField = components['schemas']['RadioButtonGroupField'] & {
21
21
  group: string;
22
22
  };
23
- export declare type SingleRadioField = components['schemas']['RadioButtonField'] & {
24
- group: string;
25
- };
26
23
  export declare type SelectField = components['schemas']['DropdownField'] & {
27
24
  group: string;
28
25
  };
@@ -9,7 +9,7 @@ export type { Event, AttendeeUpdatedEvent, AttendeeCreatedEvent, AttendeeRespond
9
9
  export type { FieldGroup } from './field-group';
10
10
  export { FieldGroups } from './field-group';
11
11
  export type { FieldValue } from './field-value';
12
- export type { StaticField, TextField, EmailField, NumberField, CheckboxField, SingleCheckboxField, RadioField, SingleRadioField, SelectField, Field, } from './field';
12
+ export type { StaticField, TextField, EmailField, NumberField, CheckboxField, SingleCheckboxField, RadioField, SelectField, Field, } from './field';
13
13
  export { Instance } from './instance';
14
14
  export type { InstanceJSON } from './instance';
15
15
  export type { Permission } from './permission';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.48.0",
3
+ "version": "0.50.1",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",