@dev-crew-berlin/enter-js-utils 0.24.0 → 0.30.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 +2 -7
- package/dist/api-client/api-base.d.ts +22 -7
- package/dist/api-client/api-base.js +30 -32
- package/dist/api-client/index.d.ts +27 -45
- package/dist/api-client/index.js +58 -46
- package/dist/generated/api-schema.d.ts +1665 -0
- package/dist/generated/api-schema.js +1 -0
- package/dist/lib/api-result.d.ts +1 -8
- package/dist/lib/api-result.js +1 -12
- package/dist/models/access-token.d.ts +2 -11
- package/dist/models/access-token.js +1 -11
- package/dist/models/attendee.d.ts +13 -60
- package/dist/models/attendee.js +41 -87
- package/dist/models/checkin-counts.d.ts +4 -10
- package/dist/models/checkin-counts.js +1 -10
- package/dist/models/checkin.d.ts +9 -0
- package/dist/models/checkin.js +16 -0
- package/dist/models/checkins.d.ts +4 -32
- package/dist/models/checkins.js +14 -42
- package/dist/models/event.d.ts +2 -40
- package/dist/models/field-group.d.ts +5 -448
- package/dist/models/field-group.js +4 -31
- package/dist/models/field-value.d.ts +0 -1
- package/dist/models/field-value.js +1 -3
- package/dist/models/field.d.ts +11 -297
- package/dist/models/field.js +1 -89
- package/dist/models/index.d.ts +2 -3
- package/dist/models/instance.d.ts +10 -53
- package/dist/models/instance.js +23 -65
- package/dist/models/user.d.ts +2 -20
- package/dist/models/user.js +1 -13
- package/dist/models/variable.d.ts +2 -27
- package/dist/models/variable.js +1 -16
- package/dist/ui/companion-info.stories.js +1 -3
- package/dist/ui/guest-card.stories.js +2 -6
- package/package.json +10 -8
- package/dist/models/_helpers.d.ts +0 -23
- package/dist/models/_helpers.js +0 -89
- package/dist/models/invite.d.ts +0 -33
- package/dist/models/invite.js +0 -21
- package/dist/models/meta-field.d.ts +0 -7
- package/dist/models/meta-field.js +0 -9
package/dist/models/field.d.ts
CHANGED
|
@@ -1,297 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare
|
|
12
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
13
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
14
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
15
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
16
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
17
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
18
|
-
type: import("fefe").Validator<"text", import("fefe").LeafError>;
|
|
19
|
-
}>, import("fefe").FefeError>;
|
|
20
|
-
declare const emailField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
21
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
22
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
23
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
24
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
25
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
26
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
27
|
-
type: import("fefe").Validator<"email", import("fefe").LeafError>;
|
|
28
|
-
}>, import("fefe").FefeError>;
|
|
29
|
-
declare const numberField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
30
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
31
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
32
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
33
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
34
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
35
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
36
|
-
type: import("fefe").Validator<"number", import("fefe").LeafError>;
|
|
37
|
-
}>, import("fefe").FefeError>;
|
|
38
|
-
declare const checkboxField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
39
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
40
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
41
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
42
|
-
}>[], import("fefe").FefeError>;
|
|
43
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
44
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
45
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
46
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
47
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
48
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
49
|
-
type: import("fefe").Validator<"check", import("fefe").LeafError>;
|
|
50
|
-
}>, import("fefe").FefeError>;
|
|
51
|
-
declare const singleCheckboxField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
52
|
-
value: import("fefe").Validator<number, import("fefe").FefeError>;
|
|
53
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
54
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
55
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
56
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
57
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
58
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
59
|
-
type: import("fefe").Validator<"checkbox", import("fefe").LeafError>;
|
|
60
|
-
}>, import("fefe").FefeError>;
|
|
61
|
-
declare const radioField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
62
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
63
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
64
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
65
|
-
}>[], import("fefe").FefeError>;
|
|
66
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
67
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
68
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
69
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
70
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
71
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
72
|
-
type: import("fefe").Validator<"radio", import("fefe").LeafError>;
|
|
73
|
-
}>, import("fefe").FefeError>;
|
|
74
|
-
declare const singleRadioField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
75
|
-
itemval: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
76
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
77
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
78
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
79
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
80
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
81
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
82
|
-
type: import("fefe").Validator<"radiobutton", import("fefe").LeafError>;
|
|
83
|
-
}>, import("fefe").FefeError>;
|
|
84
|
-
declare const selectField: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
85
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
86
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
87
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
88
|
-
}>[], import("fefe").FefeError>;
|
|
89
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
90
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
91
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
92
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
93
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
94
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
95
|
-
type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
|
|
96
|
-
}>, import("fefe").FefeError>;
|
|
97
|
-
export declare const field: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
98
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
99
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
100
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
101
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
102
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
103
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
104
|
-
type: import("fefe").Validator<"static", import("fefe").LeafError>;
|
|
105
|
-
}> | import("fefe").ObjectResult<{
|
|
106
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
107
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
108
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
109
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
110
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
111
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
112
|
-
type: import("fefe").Validator<"text", import("fefe").LeafError>;
|
|
113
|
-
}> | import("fefe").ObjectResult<{
|
|
114
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
115
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
116
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
117
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
118
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
119
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
120
|
-
type: import("fefe").Validator<"longtext", import("fefe").LeafError>;
|
|
121
|
-
}> | import("fefe").ObjectResult<{
|
|
122
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
123
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
124
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
125
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
126
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
127
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
128
|
-
type: import("fefe").Validator<"email", import("fefe").LeafError>;
|
|
129
|
-
}> | import("fefe").ObjectResult<{
|
|
130
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
131
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
132
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
133
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
134
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
135
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
136
|
-
type: import("fefe").Validator<"number", import("fefe").LeafError>;
|
|
137
|
-
}> | import("fefe").ObjectResult<{
|
|
138
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
139
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
140
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
141
|
-
}>[], import("fefe").FefeError>;
|
|
142
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
143
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
144
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
145
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
146
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
147
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
148
|
-
type: import("fefe").Validator<"check", import("fefe").LeafError>;
|
|
149
|
-
}> | import("fefe").ObjectResult<{
|
|
150
|
-
value: import("fefe").Validator<number, import("fefe").FefeError>;
|
|
151
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
152
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
153
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
154
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
155
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
156
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
157
|
-
type: import("fefe").Validator<"checkbox", import("fefe").LeafError>;
|
|
158
|
-
}> | import("fefe").ObjectResult<{
|
|
159
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
160
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
161
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
162
|
-
}>[], import("fefe").FefeError>;
|
|
163
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
164
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
165
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
166
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
167
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
168
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
169
|
-
type: import("fefe").Validator<"radio", import("fefe").LeafError>;
|
|
170
|
-
}> | import("fefe").ObjectResult<{
|
|
171
|
-
itemval: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
172
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
173
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
174
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
175
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
176
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
177
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
178
|
-
type: import("fefe").Validator<"radiobutton", import("fefe").LeafError>;
|
|
179
|
-
}> | import("fefe").ObjectResult<{
|
|
180
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
181
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
182
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
183
|
-
}>[], import("fefe").FefeError>;
|
|
184
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
185
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
186
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
187
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
188
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
189
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
190
|
-
type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
|
|
191
|
-
}>, import("fefe").LeafError>;
|
|
192
|
-
export declare const parseField: import("../lib").APIValidator<import("fefe").ObjectResult<{
|
|
193
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
194
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
195
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
196
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
197
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
198
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
199
|
-
type: import("fefe").Validator<"static", import("fefe").LeafError>;
|
|
200
|
-
}> | import("fefe").ObjectResult<{
|
|
201
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
202
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
203
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
204
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
205
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
206
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
207
|
-
type: import("fefe").Validator<"text", import("fefe").LeafError>;
|
|
208
|
-
}> | import("fefe").ObjectResult<{
|
|
209
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
210
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
211
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
212
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
213
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
214
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
215
|
-
type: import("fefe").Validator<"longtext", import("fefe").LeafError>;
|
|
216
|
-
}> | import("fefe").ObjectResult<{
|
|
217
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
218
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
219
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
220
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
221
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
222
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
223
|
-
type: import("fefe").Validator<"email", import("fefe").LeafError>;
|
|
224
|
-
}> | import("fefe").ObjectResult<{
|
|
225
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
226
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
227
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
228
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
229
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
230
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
231
|
-
type: import("fefe").Validator<"number", import("fefe").LeafError>;
|
|
232
|
-
}> | import("fefe").ObjectResult<{
|
|
233
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
234
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
235
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
236
|
-
}>[], import("fefe").FefeError>;
|
|
237
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
238
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
239
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
240
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
241
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
242
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
243
|
-
type: import("fefe").Validator<"check", import("fefe").LeafError>;
|
|
244
|
-
}> | import("fefe").ObjectResult<{
|
|
245
|
-
value: import("fefe").Validator<number, import("fefe").FefeError>;
|
|
246
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
247
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
248
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
249
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
250
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
251
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
252
|
-
type: import("fefe").Validator<"checkbox", import("fefe").LeafError>;
|
|
253
|
-
}> | import("fefe").ObjectResult<{
|
|
254
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
255
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
256
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
257
|
-
}>[], import("fefe").FefeError>;
|
|
258
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
259
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
260
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
261
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
262
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
263
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
264
|
-
type: import("fefe").Validator<"radio", import("fefe").LeafError>;
|
|
265
|
-
}> | import("fefe").ObjectResult<{
|
|
266
|
-
itemval: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
267
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
268
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
269
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
270
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
271
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
272
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
273
|
-
type: import("fefe").Validator<"radiobutton", import("fefe").LeafError>;
|
|
274
|
-
}> | import("fefe").ObjectResult<{
|
|
275
|
-
items: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
276
|
-
name: import("fefe").Validator<string | import("./_helpers").Dictionary<string>, import("fefe").LeafError>;
|
|
277
|
-
value: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
278
|
-
}>[], import("fefe").FefeError>;
|
|
279
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
280
|
-
title: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
281
|
-
info: import("fefe").Validator<string | import("./_helpers").Dictionary<string> | null, import("fefe").FefeError>;
|
|
282
|
-
required: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
283
|
-
isMetaField: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
284
|
-
class: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
285
|
-
type: import("fefe").Validator<"dropdown", import("fefe").LeafError>;
|
|
286
|
-
}>>;
|
|
287
|
-
export declare type StaticField = ValidatorReturnType<typeof staticField>;
|
|
288
|
-
export declare type TextField = ValidatorReturnType<typeof textField>;
|
|
289
|
-
export declare type EmailField = ValidatorReturnType<typeof emailField>;
|
|
290
|
-
export declare type NumberField = ValidatorReturnType<typeof numberField>;
|
|
291
|
-
export declare type CheckboxField = ValidatorReturnType<typeof checkboxField>;
|
|
292
|
-
export declare type SingleCheckboxField = ValidatorReturnType<typeof singleCheckboxField>;
|
|
293
|
-
export declare type RadioField = ValidatorReturnType<typeof radioField>;
|
|
294
|
-
export declare type SingleRadioField = ValidatorReturnType<typeof singleRadioField>;
|
|
295
|
-
export declare type SelectField = ValidatorReturnType<typeof selectField>;
|
|
296
|
-
export declare type Field = ValidatorReturnType<typeof field>;
|
|
297
|
-
export {};
|
|
1
|
+
import { components } from '../generated/api-schema';
|
|
2
|
+
export declare type StaticField = components['schemas']['StaticField'];
|
|
3
|
+
export declare type TextField = components['schemas']['TextField'];
|
|
4
|
+
export declare type EmailField = components['schemas']['EmailField'];
|
|
5
|
+
export declare type NumberField = components['schemas']['NumberField'];
|
|
6
|
+
export declare type CheckboxField = components['schemas']['CheckboxGroupField'];
|
|
7
|
+
export declare type SingleCheckboxField = components['schemas']['CheckboxField'];
|
|
8
|
+
export declare type RadioField = components['schemas']['RadioButtonGroupField'];
|
|
9
|
+
export declare type SingleRadioField = components['schemas']['RadioButtonField'];
|
|
10
|
+
export declare type SelectField = components['schemas']['DropdownField'];
|
|
11
|
+
export declare type Field = components['schemas']['FieldGroup']['questions'][number];
|
package/dist/models/field.js
CHANGED
|
@@ -1,89 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { apiValidator } from '../lib';
|
|
3
|
-
import { dictionary, maybe } from './_helpers';
|
|
4
|
-
const basicFieldProps = {
|
|
5
|
-
name: string({
|
|
6
|
-
minLength: 1
|
|
7
|
-
}),
|
|
8
|
-
title: maybe(union(string(), dictionary(string()))),
|
|
9
|
-
info: maybe(union(string(), dictionary(string()))),
|
|
10
|
-
required: maybe(boolean(), false),
|
|
11
|
-
isMetaField: boolean(),
|
|
12
|
-
class: maybe(string())
|
|
13
|
-
};
|
|
14
|
-
const staticField = object({
|
|
15
|
-
type: enumerate('static'),
|
|
16
|
-
...basicFieldProps
|
|
17
|
-
}, {
|
|
18
|
-
allowExcessProperties: true
|
|
19
|
-
});
|
|
20
|
-
const textField = object({
|
|
21
|
-
type: enumerate('text'),
|
|
22
|
-
...basicFieldProps
|
|
23
|
-
}, {
|
|
24
|
-
allowExcessProperties: true
|
|
25
|
-
});
|
|
26
|
-
const longtextField = object({
|
|
27
|
-
type: enumerate('longtext'),
|
|
28
|
-
...basicFieldProps
|
|
29
|
-
}, {
|
|
30
|
-
allowExcessProperties: true
|
|
31
|
-
});
|
|
32
|
-
const emailField = object({
|
|
33
|
-
type: enumerate('email'),
|
|
34
|
-
...basicFieldProps
|
|
35
|
-
}, {
|
|
36
|
-
allowExcessProperties: true
|
|
37
|
-
});
|
|
38
|
-
const numberField = object({
|
|
39
|
-
type: enumerate('number'),
|
|
40
|
-
...basicFieldProps
|
|
41
|
-
}, {
|
|
42
|
-
allowExcessProperties: true
|
|
43
|
-
});
|
|
44
|
-
const checkboxField = object({
|
|
45
|
-
type: enumerate('check'),
|
|
46
|
-
...basicFieldProps,
|
|
47
|
-
items: array(object({
|
|
48
|
-
name: union(string(), dictionary(string())),
|
|
49
|
-
value: maybe(string())
|
|
50
|
-
}))
|
|
51
|
-
}, {
|
|
52
|
-
allowExcessProperties: true
|
|
53
|
-
});
|
|
54
|
-
const singleCheckboxField = object({
|
|
55
|
-
type: enumerate('checkbox'),
|
|
56
|
-
...basicFieldProps,
|
|
57
|
-
value: maybe(number(), 0)
|
|
58
|
-
}, {
|
|
59
|
-
allowExcessProperties: true
|
|
60
|
-
});
|
|
61
|
-
const radioField = object({
|
|
62
|
-
type: enumerate('radio'),
|
|
63
|
-
...basicFieldProps,
|
|
64
|
-
items: array(object({
|
|
65
|
-
name: union(string(), dictionary(string())),
|
|
66
|
-
value: maybe(string())
|
|
67
|
-
}))
|
|
68
|
-
}, {
|
|
69
|
-
allowExcessProperties: true
|
|
70
|
-
});
|
|
71
|
-
const singleRadioField = object({
|
|
72
|
-
type: enumerate('radiobutton'),
|
|
73
|
-
...basicFieldProps,
|
|
74
|
-
itemval: maybe(string())
|
|
75
|
-
}, {
|
|
76
|
-
allowExcessProperties: true
|
|
77
|
-
});
|
|
78
|
-
const selectField = object({
|
|
79
|
-
type: enumerate('dropdown'),
|
|
80
|
-
...basicFieldProps,
|
|
81
|
-
items: array(object({
|
|
82
|
-
name: union(string(), dictionary(string())),
|
|
83
|
-
value: maybe(string())
|
|
84
|
-
}))
|
|
85
|
-
}, {
|
|
86
|
-
allowExcessProperties: true
|
|
87
|
-
});
|
|
88
|
-
export const field = union(staticField, textField, longtextField, emailField, numberField, checkboxField, singleCheckboxField, radioField, singleRadioField, selectField);
|
|
89
|
-
export const parseField = apiValidator(field);
|
|
1
|
+
export {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
export type { AccessToken } from './access-token';
|
|
2
2
|
export { Attendee } from './attendee';
|
|
3
3
|
export type { CheckinCounts } from './checkin-counts';
|
|
4
|
-
export type { Checkin,
|
|
4
|
+
export type { Checkin, CheckinJSON } from './checkin';
|
|
5
|
+
export type { CheckinsJSON, Checkins } from './checkins';
|
|
5
6
|
export type { Event } from './event';
|
|
6
7
|
export type { FieldGroup, FieldLabels } from './field-group';
|
|
7
8
|
export { FieldGroups } from './field-group';
|
|
8
9
|
export type { FieldValue } from './field-value';
|
|
9
10
|
export type { StaticField, TextField, EmailField, NumberField, CheckboxField, SingleCheckboxField, RadioField, SingleRadioField, SelectField, Field, } from './field';
|
|
10
11
|
export { Instance } from './instance';
|
|
11
|
-
export type { Invite } from './invite';
|
|
12
|
-
export type { MetaField } from './meta-field';
|
|
13
12
|
export type { User } from './user';
|
|
14
13
|
export type { Variable } from './variable';
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { APIResult } from '../lib';
|
|
1
|
+
import { components } from '../generated/api-schema';
|
|
3
2
|
import { Attendee } from './attendee';
|
|
4
|
-
|
|
5
|
-
import { MetaField } from './meta-field';
|
|
6
|
-
export declare type InstanceJSON = {
|
|
7
|
-
name: string;
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
checkins: string[];
|
|
11
|
-
thumbnail: boolean;
|
|
12
|
-
url: {
|
|
13
|
-
domain: string;
|
|
14
|
-
rootPath: string;
|
|
15
|
-
};
|
|
3
|
+
export declare type InstanceJSON = Omit<components['schemas']['PublicInstance'], 'registration'> & {
|
|
16
4
|
registration: {
|
|
17
|
-
start
|
|
18
|
-
end
|
|
5
|
+
start?: string;
|
|
6
|
+
end?: string;
|
|
19
7
|
closed: boolean;
|
|
20
8
|
canEdit: boolean;
|
|
21
|
-
editEnd
|
|
9
|
+
editEnd?: string;
|
|
22
10
|
};
|
|
23
|
-
guestNameFields: string[];
|
|
24
|
-
metaFields: Record<string, MetaField>;
|
|
25
11
|
};
|
|
26
12
|
export declare class Instance {
|
|
27
13
|
name: string;
|
|
@@ -34,45 +20,16 @@ export declare class Instance {
|
|
|
34
20
|
rootPath: string;
|
|
35
21
|
};
|
|
36
22
|
registration: {
|
|
37
|
-
start
|
|
38
|
-
end
|
|
23
|
+
start?: Date;
|
|
24
|
+
end?: Date;
|
|
39
25
|
closed: boolean;
|
|
40
26
|
canEdit: boolean;
|
|
41
|
-
editEnd
|
|
27
|
+
editEnd?: Date;
|
|
42
28
|
};
|
|
43
29
|
guestNameFields: string[];
|
|
44
|
-
|
|
45
|
-
constructor(rawInstance: RawInstance);
|
|
30
|
+
constructor(json: InstanceJSON);
|
|
46
31
|
toJSON(): InstanceJSON;
|
|
47
32
|
isRegistrationClosed(): boolean;
|
|
48
33
|
canEditRegistration(): boolean;
|
|
49
|
-
formatName(guest: Attendee
|
|
34
|
+
formatName(guest: Attendee): string;
|
|
50
35
|
}
|
|
51
|
-
declare const rawInstance: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
52
|
-
name: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
53
|
-
title: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
54
|
-
description: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
55
|
-
checkins: import("fefe").Validator<string[], import("fefe").FefeError>;
|
|
56
|
-
thumbnail: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
57
|
-
url: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
58
|
-
domain: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
59
|
-
rootPath: import("fefe").Validator<string, import("fefe").LeafError>;
|
|
60
|
-
}>, import("fefe").FefeError>;
|
|
61
|
-
registration: import("fefe").Validator<import("fefe").ObjectResult<{
|
|
62
|
-
start: import("fefe").Validator<Date | null, import("fefe").FefeError>;
|
|
63
|
-
end: import("fefe").Validator<Date | null, import("fefe").FefeError>;
|
|
64
|
-
closed: import("fefe").Validator<boolean, import("fefe").LeafError>;
|
|
65
|
-
canEdit: import("fefe").Validator<boolean, import("fefe").FefeError>;
|
|
66
|
-
editEnd: import("fefe").Validator<Date | null, import("fefe").FefeError>;
|
|
67
|
-
}>, import("fefe").FefeError>;
|
|
68
|
-
guestNameFields: import("fefe").Validator<string[], import("fefe").FefeError>;
|
|
69
|
-
metaFields: (value: unknown) => import("fefe").Result<import("./_helpers").Dictionary<import("fefe").ObjectResult<{
|
|
70
|
-
type: import("fefe").Validator<"text" | "checkbox" | "list" | "textfield", import("fefe").LeafError>;
|
|
71
|
-
values: import("fefe").Validator<string[] | null, import("fefe").FefeError>;
|
|
72
|
-
default: import("fefe").Validator<string | null, import("fefe").FefeError>;
|
|
73
|
-
}>>, import("fefe").FefeError>;
|
|
74
|
-
}>, import("fefe").FefeError>;
|
|
75
|
-
declare type RawInstance = ValidatorReturnType<typeof rawInstance>;
|
|
76
|
-
export declare const parseInstance: (value: unknown) => APIResult<Instance>;
|
|
77
|
-
export declare const parseInstanceList: (value: unknown) => APIResult<Instance[]>;
|
|
78
|
-
export {};
|
package/dist/models/instance.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { array, boolean, object, parseDate, pipe, string, defaultTo } from 'fefe';
|
|
2
|
-
import { apiValidator, success } from '../lib';
|
|
3
|
-
import { metaField } from './meta-field';
|
|
4
|
-
import { dictionary, maybe } from './_helpers';
|
|
5
1
|
export class Instance {
|
|
6
|
-
constructor(
|
|
7
|
-
this.name =
|
|
8
|
-
this.title =
|
|
9
|
-
this.description =
|
|
10
|
-
this.checkinTags =
|
|
11
|
-
this.hasTumbnail =
|
|
12
|
-
this.url =
|
|
13
|
-
this.registration =
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
constructor(json) {
|
|
3
|
+
this.name = json.name;
|
|
4
|
+
this.title = json.title;
|
|
5
|
+
this.description = json.description;
|
|
6
|
+
this.checkinTags = json.checkins;
|
|
7
|
+
this.hasTumbnail = json.thumbnail;
|
|
8
|
+
this.url = json.url;
|
|
9
|
+
this.registration = {
|
|
10
|
+
start: json.registration.start ? new Date(json.registration.start) : undefined,
|
|
11
|
+
end: json.registration.end ? new Date(json.registration.end) : undefined,
|
|
12
|
+
closed: json.registration.closed,
|
|
13
|
+
canEdit: json.registration.canEdit,
|
|
14
|
+
editEnd: json.registration.editEnd ? new Date(json.registration.editEnd) : undefined
|
|
15
|
+
};
|
|
16
|
+
this.guestNameFields = json.guestNameFields;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
toJSON() {
|
|
@@ -24,14 +25,14 @@ export class Instance {
|
|
|
24
25
|
thumbnail: this.hasTumbnail,
|
|
25
26
|
url: this.url,
|
|
26
27
|
registration: {
|
|
27
|
-
start: this.registration.start?.toISOString()
|
|
28
|
-
end: this.registration.end?.toISOString()
|
|
28
|
+
start: this.registration.start?.toISOString(),
|
|
29
|
+
end: this.registration.end?.toISOString(),
|
|
29
30
|
closed: this.registration.closed,
|
|
30
31
|
canEdit: this.registration.canEdit,
|
|
31
|
-
editEnd: this.registration.editEnd?.toISOString()
|
|
32
|
+
editEnd: this.registration.editEnd?.toISOString()
|
|
32
33
|
},
|
|
33
34
|
guestNameFields: this.guestNameFields,
|
|
34
|
-
metaFields:
|
|
35
|
+
metaFields: {}
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -43,8 +44,8 @@ export class Instance {
|
|
|
43
44
|
} = this.registration;
|
|
44
45
|
if (closed) return true;
|
|
45
46
|
const now = new Date();
|
|
46
|
-
if (start !==
|
|
47
|
-
if (end !==
|
|
47
|
+
if (start !== undefined && now < start) return true;
|
|
48
|
+
if (end !== undefined && now >= end) return true;
|
|
48
49
|
return false;
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -54,7 +55,7 @@ export class Instance {
|
|
|
54
55
|
editEnd
|
|
55
56
|
} = this.registration;
|
|
56
57
|
if (!canEdit) return false;
|
|
57
|
-
if (editEnd ===
|
|
58
|
+
if (editEnd === undefined) return true;
|
|
58
59
|
const now = new Date();
|
|
59
60
|
return editEnd < now;
|
|
60
61
|
}
|
|
@@ -68,47 +69,4 @@ export class Instance {
|
|
|
68
69
|
return this.guestNameFields.map(fieldKey => guest.userdata[fieldKey] ?? '').join(' ');
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
}
|
|
72
|
-
const rawInstance = object({
|
|
73
|
-
name: string(),
|
|
74
|
-
title: string(),
|
|
75
|
-
description: string(),
|
|
76
|
-
checkins: array(string()),
|
|
77
|
-
thumbnail: boolean(),
|
|
78
|
-
url: object({
|
|
79
|
-
domain: string(),
|
|
80
|
-
rootPath: string()
|
|
81
|
-
}),
|
|
82
|
-
registration: object({
|
|
83
|
-
start: maybe(pipe(string()).pipe(parseDate({
|
|
84
|
-
iso: true
|
|
85
|
-
}))),
|
|
86
|
-
end: maybe(pipe(string()).pipe(parseDate({
|
|
87
|
-
iso: true
|
|
88
|
-
}))),
|
|
89
|
-
closed: boolean(),
|
|
90
|
-
canEdit: defaultTo(boolean(), false),
|
|
91
|
-
editEnd: defaultTo(maybe(pipe(string()).pipe(parseDate({
|
|
92
|
-
iso: true
|
|
93
|
-
}))), null)
|
|
94
|
-
}),
|
|
95
|
-
guestNameFields: array(string()),
|
|
96
|
-
metaFields: dictionary(metaField)
|
|
97
|
-
}, {
|
|
98
|
-
allowExcessProperties: true
|
|
99
|
-
});
|
|
100
|
-
const rawInstanceList = object({
|
|
101
|
-
instances: array(rawInstance)
|
|
102
|
-
});
|
|
103
|
-
const parseRawInstance = apiValidator(rawInstance);
|
|
104
|
-
const parseRawInstanceList = apiValidator(rawInstanceList);
|
|
105
|
-
export const parseInstance = value => {
|
|
106
|
-
const result = parseRawInstance(value);
|
|
107
|
-
if (!result.success) return result;
|
|
108
|
-
return success(new Instance(result.data));
|
|
109
|
-
};
|
|
110
|
-
export const parseInstanceList = value => {
|
|
111
|
-
const result = parseRawInstanceList(value);
|
|
112
|
-
if (!result.success) return result;
|
|
113
|
-
return success(result.data.instances.map(rawInstance => new Instance(rawInstance)));
|
|
114
|
-
};
|
|
72
|
+
}
|