@shakerquiz/utilities 0.4.74 → 0.4.76
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/package.json +1 -1
- package/source/enumerations/core/features.d.ts +117 -1
- package/source/enumerations/core/features.js +105 -0
- package/source/misc.d.ts +8 -0
- package/source/schemas/PATCH/Registration/default/schema.json +15 -0
- package/source/schemas/PATCH/Registration/organizer/schema.json +15 -0
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const Domains: readonly ["User", "Role", "Country", "Currency", "City", "Venue", "Theme", "Game", "Registration"];
|
|
1
|
+
export const Domains: readonly ["User", "Role", "Country", "Currency", "City", "Venue", "Theme", "Game", "Registration", "Mailing"];
|
|
2
2
|
/**
|
|
3
3
|
* @type {Record<Domain, Icon>}
|
|
4
4
|
*/
|
|
@@ -38,3 +38,119 @@ export const FeatureKindPathnames: Array<[feature: Feature, kind: Kind, pathname
|
|
|
38
38
|
export const FeatureKindPatterns: Array<[feature: Feature, kind: Kind, pattern: URLPattern]>;
|
|
39
39
|
export function getPathname(feature: Feature, kind: Kind): string;
|
|
40
40
|
export function getPattern(feature: Feature, kind: Kind): any;
|
|
41
|
+
export namespace RoutePathname {
|
|
42
|
+
let users: "/users";
|
|
43
|
+
let user: "/users/:user?";
|
|
44
|
+
let roles: "/roles";
|
|
45
|
+
let role: "/roles/:role?";
|
|
46
|
+
let checkins: "/checkins";
|
|
47
|
+
let checkin: "/checkins/:checkin?";
|
|
48
|
+
let countries: "/countries";
|
|
49
|
+
let country: "/countries/:country?";
|
|
50
|
+
let currencies: "/currencies";
|
|
51
|
+
let currency: "/currencies/:currency?";
|
|
52
|
+
let cities: "/cities";
|
|
53
|
+
let city: "/cities/:city?";
|
|
54
|
+
let venues: "/venues";
|
|
55
|
+
let venue: "/venues/:venue?";
|
|
56
|
+
let games: "/games";
|
|
57
|
+
let game: "/games/:game?";
|
|
58
|
+
let themes: "/themes";
|
|
59
|
+
let theme: "/themes/:theme?";
|
|
60
|
+
let registrations: "/registrations";
|
|
61
|
+
let registration: "/registrations/:registration?";
|
|
62
|
+
let mailings: "/mailings";
|
|
63
|
+
let mailing: "/mailings/:mailing?";
|
|
64
|
+
}
|
|
65
|
+
export namespace RoutePathParams {
|
|
66
|
+
let users_1: readonly [];
|
|
67
|
+
export { users_1 as users };
|
|
68
|
+
let user_1: readonly [":user?"];
|
|
69
|
+
export { user_1 as user };
|
|
70
|
+
let roles_1: readonly [];
|
|
71
|
+
export { roles_1 as roles };
|
|
72
|
+
let role_1: readonly [":role?"];
|
|
73
|
+
export { role_1 as role };
|
|
74
|
+
let checkins_1: readonly [];
|
|
75
|
+
export { checkins_1 as checkins };
|
|
76
|
+
let checkin_1: readonly [":checkin?"];
|
|
77
|
+
export { checkin_1 as checkin };
|
|
78
|
+
let countries_1: readonly [];
|
|
79
|
+
export { countries_1 as countries };
|
|
80
|
+
let country_1: readonly [":country?"];
|
|
81
|
+
export { country_1 as country };
|
|
82
|
+
let currencies_1: readonly [];
|
|
83
|
+
export { currencies_1 as currencies };
|
|
84
|
+
let currency_1: readonly [":currency?"];
|
|
85
|
+
export { currency_1 as currency };
|
|
86
|
+
let cities_1: readonly [];
|
|
87
|
+
export { cities_1 as cities };
|
|
88
|
+
let city_1: readonly [":city?"];
|
|
89
|
+
export { city_1 as city };
|
|
90
|
+
let venues_1: readonly [];
|
|
91
|
+
export { venues_1 as venues };
|
|
92
|
+
let venue_1: readonly [":venue?"];
|
|
93
|
+
export { venue_1 as venue };
|
|
94
|
+
let games_1: readonly [];
|
|
95
|
+
export { games_1 as games };
|
|
96
|
+
let game_1: readonly [":game?"];
|
|
97
|
+
export { game_1 as game };
|
|
98
|
+
let themes_1: readonly [];
|
|
99
|
+
export { themes_1 as themes };
|
|
100
|
+
let theme_1: readonly [":theme?"];
|
|
101
|
+
export { theme_1 as theme };
|
|
102
|
+
let registrations_1: readonly [];
|
|
103
|
+
export { registrations_1 as registrations };
|
|
104
|
+
let registration_1: readonly [":registration?"];
|
|
105
|
+
export { registration_1 as registration };
|
|
106
|
+
let mailings_1: readonly [];
|
|
107
|
+
export { mailings_1 as mailings };
|
|
108
|
+
let mailing_1: readonly [":mailing?"];
|
|
109
|
+
export { mailing_1 as mailing };
|
|
110
|
+
}
|
|
111
|
+
export namespace RouteSearchParams {
|
|
112
|
+
let users_2: readonly [];
|
|
113
|
+
export { users_2 as users };
|
|
114
|
+
let user_2: readonly [];
|
|
115
|
+
export { user_2 as user };
|
|
116
|
+
let roles_2: readonly [];
|
|
117
|
+
export { roles_2 as roles };
|
|
118
|
+
let role_2: readonly [];
|
|
119
|
+
export { role_2 as role };
|
|
120
|
+
let checkins_2: readonly [];
|
|
121
|
+
export { checkins_2 as checkins };
|
|
122
|
+
let checkin_2: readonly [];
|
|
123
|
+
export { checkin_2 as checkin };
|
|
124
|
+
let countries_2: readonly [];
|
|
125
|
+
export { countries_2 as countries };
|
|
126
|
+
let country_2: readonly [];
|
|
127
|
+
export { country_2 as country };
|
|
128
|
+
let currencies_2: readonly [];
|
|
129
|
+
export { currencies_2 as currencies };
|
|
130
|
+
let currency_2: readonly [];
|
|
131
|
+
export { currency_2 as currency };
|
|
132
|
+
let cities_2: readonly [];
|
|
133
|
+
export { cities_2 as cities };
|
|
134
|
+
let city_2: readonly [];
|
|
135
|
+
export { city_2 as city };
|
|
136
|
+
let venues_2: readonly [];
|
|
137
|
+
export { venues_2 as venues };
|
|
138
|
+
let venue_2: readonly [];
|
|
139
|
+
export { venue_2 as venue };
|
|
140
|
+
let games_2: readonly ["city", "status"];
|
|
141
|
+
export { games_2 as games };
|
|
142
|
+
let game_2: readonly ["city"];
|
|
143
|
+
export { game_2 as game };
|
|
144
|
+
let themes_2: readonly [];
|
|
145
|
+
export { themes_2 as themes };
|
|
146
|
+
let theme_2: readonly [];
|
|
147
|
+
export { theme_2 as theme };
|
|
148
|
+
let registrations_2: readonly ["game", "city"];
|
|
149
|
+
export { registrations_2 as registrations };
|
|
150
|
+
let registration_2: readonly [];
|
|
151
|
+
export { registration_2 as registration };
|
|
152
|
+
let mailings_2: readonly [];
|
|
153
|
+
export { mailings_2 as mailings };
|
|
154
|
+
let mailing_2: readonly [];
|
|
155
|
+
export { mailing_2 as mailing };
|
|
156
|
+
}
|
|
@@ -203,3 +203,108 @@ export var getPattern = (feature, kind) => {
|
|
|
203
203
|
|
|
204
204
|
return FeatureKindPatterns.find(([f, k]) => f == feature && k == kind)[2]
|
|
205
205
|
}
|
|
206
|
+
|
|
207
|
+
export var RoutePathname = /** @type {const} */ ({
|
|
208
|
+
users: '/users',
|
|
209
|
+
user: '/users/:user?',
|
|
210
|
+
|
|
211
|
+
roles: '/roles',
|
|
212
|
+
role: '/roles/:role?',
|
|
213
|
+
|
|
214
|
+
checkins: '/checkins',
|
|
215
|
+
checkin: '/checkins/:checkin?',
|
|
216
|
+
|
|
217
|
+
countries: '/countries',
|
|
218
|
+
country: '/countries/:country?',
|
|
219
|
+
|
|
220
|
+
currencies: '/currencies',
|
|
221
|
+
currency: '/currencies/:currency?',
|
|
222
|
+
|
|
223
|
+
cities: '/cities',
|
|
224
|
+
city: '/cities/:city?',
|
|
225
|
+
|
|
226
|
+
venues: '/venues',
|
|
227
|
+
venue: '/venues/:venue?',
|
|
228
|
+
|
|
229
|
+
games: '/games',
|
|
230
|
+
game: '/games/:game?',
|
|
231
|
+
|
|
232
|
+
themes: '/themes',
|
|
233
|
+
theme: '/themes/:theme?',
|
|
234
|
+
|
|
235
|
+
registrations: '/registrations',
|
|
236
|
+
registration: '/registrations/:registration?',
|
|
237
|
+
|
|
238
|
+
mailings: '/mailings',
|
|
239
|
+
mailing: '/mailings/:mailing?',
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
export var RoutePathParams = /** @type {const} */ ({
|
|
243
|
+
users: [],
|
|
244
|
+
user: [':user?'],
|
|
245
|
+
|
|
246
|
+
roles: [],
|
|
247
|
+
role: [':role?'],
|
|
248
|
+
|
|
249
|
+
checkins: [],
|
|
250
|
+
checkin: [':checkin?'],
|
|
251
|
+
|
|
252
|
+
countries: [],
|
|
253
|
+
country: [':country?'],
|
|
254
|
+
|
|
255
|
+
currencies: [],
|
|
256
|
+
currency: [':currency?'],
|
|
257
|
+
|
|
258
|
+
cities: [],
|
|
259
|
+
city: [':city?'],
|
|
260
|
+
|
|
261
|
+
venues: [],
|
|
262
|
+
venue: [':venue?'],
|
|
263
|
+
|
|
264
|
+
games: [],
|
|
265
|
+
game: [':game?'],
|
|
266
|
+
|
|
267
|
+
themes: [],
|
|
268
|
+
theme: [':theme?'],
|
|
269
|
+
|
|
270
|
+
registrations: [],
|
|
271
|
+
registration: [':registration?'],
|
|
272
|
+
|
|
273
|
+
mailings: [],
|
|
274
|
+
mailing: [':mailing?'],
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
export var RouteSearchParams = /** @type {const} */ ({
|
|
278
|
+
users: [],
|
|
279
|
+
user: [],
|
|
280
|
+
|
|
281
|
+
roles: [],
|
|
282
|
+
role: [],
|
|
283
|
+
|
|
284
|
+
checkins: [],
|
|
285
|
+
checkin: [],
|
|
286
|
+
|
|
287
|
+
countries: [],
|
|
288
|
+
country: [],
|
|
289
|
+
|
|
290
|
+
currencies: [],
|
|
291
|
+
currency: [],
|
|
292
|
+
|
|
293
|
+
cities: [],
|
|
294
|
+
city: [],
|
|
295
|
+
|
|
296
|
+
venues: [],
|
|
297
|
+
venue: [],
|
|
298
|
+
|
|
299
|
+
games: ['city', 'status'],
|
|
300
|
+
game: ['city'],
|
|
301
|
+
|
|
302
|
+
themes: [],
|
|
303
|
+
theme: [],
|
|
304
|
+
|
|
305
|
+
registrations: ['game', 'city'],
|
|
306
|
+
registration: [],
|
|
307
|
+
|
|
308
|
+
mailings: [],
|
|
309
|
+
mailing: [],
|
|
310
|
+
})
|
package/source/misc.d.ts
CHANGED
|
@@ -77,3 +77,11 @@ type ScopePhase = Record<Scope, Phase>
|
|
|
77
77
|
type ScopeState = Record<Scope, any>
|
|
78
78
|
|
|
79
79
|
type ScopeController = Record<Scope, AbortController | null>
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Server
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
type Routes = keyof typeof import('./enumerations/core/features.js').RoutePathname
|
|
86
|
+
|
|
87
|
+
type Pathnames = typeof import('./enumerations/core/features.js').RoutePathname[Routes]
|
|
@@ -24,6 +24,21 @@
|
|
|
24
24
|
},
|
|
25
25
|
"is_confirm": {
|
|
26
26
|
"type": "boolean"
|
|
27
|
+
},
|
|
28
|
+
"status": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"Created",
|
|
32
|
+
"Confirmed",
|
|
33
|
+
"Cancelled"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"lineup": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": [
|
|
39
|
+
"Main",
|
|
40
|
+
"Reserve"
|
|
41
|
+
]
|
|
27
42
|
}
|
|
28
43
|
},
|
|
29
44
|
"required": [],
|
|
@@ -21,6 +21,21 @@
|
|
|
21
21
|
},
|
|
22
22
|
"team_name": {
|
|
23
23
|
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"status": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"Created",
|
|
29
|
+
"Confirmed",
|
|
30
|
+
"Cancelled"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"lineup": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"Main",
|
|
37
|
+
"Reserve"
|
|
38
|
+
]
|
|
24
39
|
}
|
|
25
40
|
},
|
|
26
41
|
"required": [],
|