@shakerquiz/utilities 0.4.78 → 0.4.80
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
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Kinds } from './kinds.js'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
3
6
|
export var Domains = /** @type {const} */ ([
|
|
4
7
|
// 'Asset',
|
|
5
8
|
'User',
|
|
@@ -18,6 +21,8 @@ export var Domains = /** @type {const} */ ([
|
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* @type {Record<Domain, Icon>}
|
|
24
|
+
*
|
|
25
|
+
* @deprecated
|
|
21
26
|
*/
|
|
22
27
|
export var DomainIcon = {
|
|
23
28
|
'User': 'users',
|
|
@@ -34,6 +39,8 @@ export var DomainIcon = {
|
|
|
34
39
|
|
|
35
40
|
/**
|
|
36
41
|
* @type {Record<Domain, Record<Kind, string>>}
|
|
42
|
+
*
|
|
43
|
+
* @deprecated
|
|
37
44
|
*/
|
|
38
45
|
export var DomainKindPathname = /** @type {const} */ ({
|
|
39
46
|
'User': {
|
|
@@ -98,6 +105,9 @@ export var DomainKindPathname = /** @type {const} */ ({
|
|
|
98
105
|
},
|
|
99
106
|
})
|
|
100
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated
|
|
110
|
+
*/
|
|
101
111
|
export var Procedures = /** @type {const} */ ([
|
|
102
112
|
'Checkin',
|
|
103
113
|
'Redirect',
|
|
@@ -105,6 +115,8 @@ export var Procedures = /** @type {const} */ ([
|
|
|
105
115
|
|
|
106
116
|
/**
|
|
107
117
|
* @type {Record<Procedure, Icon>}
|
|
118
|
+
*
|
|
119
|
+
* @deprecated
|
|
108
120
|
*/
|
|
109
121
|
export var ProcedureIcon = {
|
|
110
122
|
'Checkin': 'arrow-right-end-on-rectangle',
|
|
@@ -113,6 +125,8 @@ export var ProcedureIcon = {
|
|
|
113
125
|
|
|
114
126
|
/**
|
|
115
127
|
* @type {Record<Procedure, Record<Kind, string>>}
|
|
128
|
+
*
|
|
129
|
+
* @deprecated
|
|
116
130
|
*/
|
|
117
131
|
export var ProcedureKindPathname = /** @type {const} */ ({
|
|
118
132
|
'Checkin': {
|
|
@@ -128,11 +142,15 @@ export var ProcedureKindPathname = /** @type {const} */ ({
|
|
|
128
142
|
|
|
129
143
|
/**
|
|
130
144
|
* @type {Array<Domain | Procedure>}
|
|
145
|
+
*
|
|
146
|
+
* @deprecated
|
|
131
147
|
*/
|
|
132
148
|
export var Features = Domains.concat(Procedures)
|
|
133
149
|
|
|
134
150
|
/**
|
|
135
151
|
* @type {Record<Feature, Icon>}
|
|
152
|
+
*
|
|
153
|
+
* @deprecated
|
|
136
154
|
*/
|
|
137
155
|
export var FeatureIcon = {
|
|
138
156
|
...DomainIcon,
|
|
@@ -141,6 +159,8 @@ export var FeatureIcon = {
|
|
|
141
159
|
|
|
142
160
|
/**
|
|
143
161
|
* @type {Record<Feature, Record<Kind, string>>}
|
|
162
|
+
*
|
|
163
|
+
* @deprecated
|
|
144
164
|
*/
|
|
145
165
|
export var FeatureKindPathname = {
|
|
146
166
|
...DomainKindPathname,
|
|
@@ -149,6 +169,8 @@ export var FeatureKindPathname = {
|
|
|
149
169
|
|
|
150
170
|
/**
|
|
151
171
|
* @type {Array<[feature: Feature, kind: Kind, pathname: string]>}
|
|
172
|
+
*
|
|
173
|
+
* @deprecated
|
|
152
174
|
*/
|
|
153
175
|
export var FeatureKindPathnames = Object
|
|
154
176
|
.keys(FeatureKindPathname)
|
|
@@ -160,6 +182,8 @@ export var FeatureKindPathnames = Object
|
|
|
160
182
|
|
|
161
183
|
/**
|
|
162
184
|
* @type {Array<[feature: Feature, kind: Kind, pattern: URLPattern]>}
|
|
185
|
+
*
|
|
186
|
+
* @deprecated
|
|
163
187
|
*/
|
|
164
188
|
export var FeatureKindPatterns = FeatureKindPathnames
|
|
165
189
|
.map(([feature, kind, pathname]) => [
|
|
@@ -171,6 +195,8 @@ export var FeatureKindPatterns = FeatureKindPathnames
|
|
|
171
195
|
/**
|
|
172
196
|
* @param {Feature} feature
|
|
173
197
|
* @param {Kind} kind
|
|
198
|
+
*
|
|
199
|
+
* @deprecated
|
|
174
200
|
*/
|
|
175
201
|
export var getPathname = (feature, kind) => {
|
|
176
202
|
if (!Features.includes(feature))
|
|
@@ -189,6 +215,8 @@ export var getPathname = (feature, kind) => {
|
|
|
189
215
|
/**
|
|
190
216
|
* @param {Feature} feature
|
|
191
217
|
* @param {Kind} kind
|
|
218
|
+
*
|
|
219
|
+
* @deprecated
|
|
192
220
|
*/
|
|
193
221
|
export var getPattern = (feature, kind) => {
|
|
194
222
|
if (!Features.includes(feature))
|
|
@@ -204,6 +232,57 @@ export var getPattern = (feature, kind) => {
|
|
|
204
232
|
return FeatureKindPatterns.find(([f, k]) => f == feature && k == kind)[2]
|
|
205
233
|
}
|
|
206
234
|
|
|
235
|
+
export var Feature = /** @type {const} */ ({
|
|
236
|
+
'Users': 'Users',
|
|
237
|
+
'User': 'User',
|
|
238
|
+
'Roles': 'Roles',
|
|
239
|
+
'Role': 'Role',
|
|
240
|
+
'Checkins': 'Checkins',
|
|
241
|
+
'Checkin': 'Checkin',
|
|
242
|
+
'Countries': 'Countries',
|
|
243
|
+
'Country': 'Country',
|
|
244
|
+
'Currencies': 'Currencies',
|
|
245
|
+
'Currency': 'Currency',
|
|
246
|
+
'Cities': 'Cities',
|
|
247
|
+
'City': 'City',
|
|
248
|
+
'Venues': 'Venues',
|
|
249
|
+
'Venue': 'Venue',
|
|
250
|
+
'Games': 'Games',
|
|
251
|
+
'Game': 'Game',
|
|
252
|
+
'Themes': 'Themes',
|
|
253
|
+
'Theme': 'Theme',
|
|
254
|
+
'Registrations': 'Registrations',
|
|
255
|
+
'Registration': 'Registration',
|
|
256
|
+
'Mailings': 'Mailings',
|
|
257
|
+
'Mailing': 'Mailing',
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
/** @type {Record<Feature, Icon>} */
|
|
261
|
+
export var FeatureIcon = {
|
|
262
|
+
[Feature.Users]: 'hero/solid/users',
|
|
263
|
+
[Feature.User]: 'hero/solid/users',
|
|
264
|
+
[Feature.Roles]: 'hero/solid/identification',
|
|
265
|
+
[Feature.Role]: 'hero/solid/identification',
|
|
266
|
+
[Feature.Checkins]: 'arrow-right-end-on-rectangle',
|
|
267
|
+
[Feature.Checkin]: 'arrow-right-end-on-rectangle',
|
|
268
|
+
[Feature.Countries]: 'hero/outline/no-symbol',
|
|
269
|
+
[Feature.Country]: 'hero/outline/no-symbol',
|
|
270
|
+
[Feature.Currencies]: 'hero/outline/banknotes',
|
|
271
|
+
[Feature.Currency]: 'hero/outline/banknotes',
|
|
272
|
+
[Feature.Cities]: 'hero/outline/building-office',
|
|
273
|
+
[Feature.City]: 'hero/outline/building-office',
|
|
274
|
+
[Feature.Venues]: 'hero/outline/map-pin',
|
|
275
|
+
[Feature.Venue]: 'hero/outline/map-pin',
|
|
276
|
+
[Feature.Games]: 'hero/outline/newspaper',
|
|
277
|
+
[Feature.Game]: 'hero/outline/newspaper',
|
|
278
|
+
[Feature.Themes]: 'hero/outline/document-text',
|
|
279
|
+
[Feature.Theme]: 'hero/outline/document-text',
|
|
280
|
+
[Feature.Registrations]: 'hero/outline/user-group',
|
|
281
|
+
[Feature.Registration]: 'hero/outline/user-group',
|
|
282
|
+
[Feature.Mailings]: 'hero/outline/envelope',
|
|
283
|
+
[Feature.Mailing]: 'hero/outline/envelope',
|
|
284
|
+
}
|
|
285
|
+
|
|
207
286
|
export var RoutePathname = /** @type {const} */ ({
|
|
208
287
|
'users': '/users',
|
|
209
288
|
'user': '/users/:user?',
|
package/source/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
/// <reference path="./server.d.ts" />
|
|
4
4
|
/// <reference path="./tables.d.ts" />
|
|
5
5
|
|
|
6
|
-
export * from './enumerations/core/features.d.ts'
|
|
7
6
|
export * from './enumerations/core/kinds.d.ts'
|
|
8
7
|
export * from './enumerations/core/methods.d.ts'
|
|
9
8
|
export * from './enumerations/core/networks.d.ts'
|
|
@@ -15,13 +14,3 @@ export * from './enumerations/misc/cookies.d.ts'
|
|
|
15
14
|
export * from './enumerations/misc/icons.d.ts'
|
|
16
15
|
export * from './enumerations/misc/phases.d.ts'
|
|
17
16
|
export * from './enumerations/misc/regexps.d.ts'
|
|
18
|
-
|
|
19
|
-
export * from './enumerations/entities/city-affilations.d.ts'
|
|
20
|
-
export * from './enumerations/entities/game-statuses.d.ts'
|
|
21
|
-
export * from './enumerations/entities/registration-attributes.d.ts'
|
|
22
|
-
export * from './enumerations/entities/registration-channels.d.ts'
|
|
23
|
-
export * from './enumerations/entities/registration-lineups.d.ts'
|
|
24
|
-
export * from './enumerations/entities/registration-mailings.d.ts'
|
|
25
|
-
export * from './enumerations/entities/registration-statuses.d.ts'
|
|
26
|
-
export * from './enumerations/entities/roles.d.ts'
|
|
27
|
-
export * from './enumerations/entities/venue-statuses.d.ts'
|
package/source/misc.d.ts
CHANGED
|
@@ -24,11 +24,7 @@ type UseState<T> = [
|
|
|
24
24
|
|
|
25
25
|
type Method = (typeof import('./enumerations/core/methods.js').Methods)[number]
|
|
26
26
|
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
type Procedure = (typeof import('./enumerations/core/features.js').Procedures)[number]
|
|
30
|
-
|
|
31
|
-
type Feature = Domain | Procedure
|
|
27
|
+
type Feature = keyof typeof import('./enumerations/core/features.js').Feature
|
|
32
28
|
|
|
33
29
|
/**
|
|
34
30
|
* @deprecated
|
|
@@ -71,7 +67,7 @@ type VenueStatus = keyof typeof import('./enumerations/entities/venue-statuses.j
|
|
|
71
67
|
* misc
|
|
72
68
|
*/
|
|
73
69
|
|
|
74
|
-
type Icon =
|
|
70
|
+
type Icon = keyof typeof import('./enumerations/misc/icons.js').Icon
|
|
75
71
|
|
|
76
72
|
type Phase = keyof typeof import('./enumerations/misc/phases.js').Phase
|
|
77
73
|
|
package/source/server.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
type EndpointHandler = (
|
|
2
2
|
request: Request,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
context: {
|
|
4
|
+
url: URL
|
|
5
|
+
checkin: ScopeRoleResponse['GET/Checkin/Unit'][Role]
|
|
6
|
+
pattern: URLPatternResult
|
|
7
|
+
},
|
|
8
|
+
) => any
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
export const Domains: readonly ["User", "Role", "Country", "Currency", "City", "Venue", "Theme", "Game", "Registration", "Mailing"];
|
|
2
|
-
/**
|
|
3
|
-
* @type {Record<Domain, Icon>}
|
|
4
|
-
*/
|
|
5
|
-
export const DomainIcon: Record<Domain, Icon>;
|
|
6
|
-
/**
|
|
7
|
-
* @type {Record<Domain, Record<Kind, string>>}
|
|
8
|
-
*/
|
|
9
|
-
export const DomainKindPathname: Record<Domain, Record<Kind, string>>;
|
|
10
|
-
export const Procedures: readonly ["Checkin", "Redirect"];
|
|
11
|
-
/**
|
|
12
|
-
* @type {Record<Procedure, Icon>}
|
|
13
|
-
*/
|
|
14
|
-
export const ProcedureIcon: Record<Procedure, Icon>;
|
|
15
|
-
/**
|
|
16
|
-
* @type {Record<Procedure, Record<Kind, string>>}
|
|
17
|
-
*/
|
|
18
|
-
export const ProcedureKindPathname: Record<Procedure, Record<Kind, string>>;
|
|
19
|
-
/**
|
|
20
|
-
* @type {Array<Domain | Procedure>}
|
|
21
|
-
*/
|
|
22
|
-
export const Features: Array<Domain | Procedure>;
|
|
23
|
-
/**
|
|
24
|
-
* @type {Record<Feature, Icon>}
|
|
25
|
-
*/
|
|
26
|
-
export const FeatureIcon: Record<Feature, Icon>;
|
|
27
|
-
/**
|
|
28
|
-
* @type {Record<Feature, Record<Kind, string>>}
|
|
29
|
-
*/
|
|
30
|
-
export const FeatureKindPathname: Record<Feature, Record<Kind, string>>;
|
|
31
|
-
/**
|
|
32
|
-
* @type {Array<[feature: Feature, kind: Kind, pathname: string]>}
|
|
33
|
-
*/
|
|
34
|
-
export const FeatureKindPathnames: Array<[feature: Feature, kind: Kind, pathname: string]>;
|
|
35
|
-
/**
|
|
36
|
-
* @type {Array<[feature: Feature, kind: Kind, pattern: URLPattern]>}
|
|
37
|
-
*/
|
|
38
|
-
export const FeatureKindPatterns: Array<[feature: Feature, kind: Kind, pattern: URLPattern]>;
|
|
39
|
-
export function getPathname(feature: Feature, kind: Kind): string;
|
|
40
|
-
export function getPattern(feature: Feature, kind: Kind): any;
|
|
41
|
-
export const RoutePathname: {
|
|
42
|
-
readonly users: "/users";
|
|
43
|
-
readonly user: "/users/:user?";
|
|
44
|
-
readonly roles: "/roles";
|
|
45
|
-
readonly role: "/roles/:role?";
|
|
46
|
-
readonly checkins: "/checkins";
|
|
47
|
-
readonly checkin: "/checkins/:checkin?";
|
|
48
|
-
readonly countries: "/countries";
|
|
49
|
-
readonly country: "/countries/:country?";
|
|
50
|
-
readonly currencies: "/currencies";
|
|
51
|
-
readonly currency: "/currencies/:currency?";
|
|
52
|
-
readonly cities: "/cities";
|
|
53
|
-
readonly city: "/cities/:city?";
|
|
54
|
-
readonly venues: "/venues";
|
|
55
|
-
readonly venue: "/venues/:venue?";
|
|
56
|
-
readonly games: "/games";
|
|
57
|
-
readonly 'games/attendance': "/games/attendance";
|
|
58
|
-
readonly 'games/amounts': "/games/amounts";
|
|
59
|
-
readonly game: "/games/:game?";
|
|
60
|
-
readonly 'game/attendance': "/games/:game/attendance";
|
|
61
|
-
readonly themes: "/themes";
|
|
62
|
-
readonly theme: "/themes/:theme?";
|
|
63
|
-
readonly registrations: "/registrations";
|
|
64
|
-
readonly registration: "/registrations/:registration?";
|
|
65
|
-
readonly mailings: "/mailings";
|
|
66
|
-
readonly mailing: "/mailings/:mailing?";
|
|
67
|
-
};
|
|
68
|
-
export namespace RoutePathParams {
|
|
69
|
-
let users: readonly [];
|
|
70
|
-
let user: readonly [":user?"];
|
|
71
|
-
let roles: readonly [];
|
|
72
|
-
let role: readonly [":role?"];
|
|
73
|
-
let checkins: readonly [];
|
|
74
|
-
let checkin: readonly [":checkin?"];
|
|
75
|
-
let countries: readonly [];
|
|
76
|
-
let country: readonly [":country?"];
|
|
77
|
-
let currencies: readonly [];
|
|
78
|
-
let currency: readonly [":currency?"];
|
|
79
|
-
let cities: readonly [];
|
|
80
|
-
let city: readonly [":city?"];
|
|
81
|
-
let venues: readonly [];
|
|
82
|
-
let venue: readonly [":venue?"];
|
|
83
|
-
let games: readonly [];
|
|
84
|
-
let game: readonly [":game?"];
|
|
85
|
-
let themes: readonly [];
|
|
86
|
-
let theme: readonly [":theme?"];
|
|
87
|
-
let registrations: readonly [];
|
|
88
|
-
let registration: readonly [":registration?"];
|
|
89
|
-
let mailings: readonly [];
|
|
90
|
-
let mailing: readonly [":mailing?"];
|
|
91
|
-
}
|
|
92
|
-
export namespace RouteSearchParams {
|
|
93
|
-
let users_1: readonly [];
|
|
94
|
-
export { users_1 as users };
|
|
95
|
-
let user_1: readonly [];
|
|
96
|
-
export { user_1 as user };
|
|
97
|
-
let roles_1: readonly [];
|
|
98
|
-
export { roles_1 as roles };
|
|
99
|
-
let role_1: readonly [];
|
|
100
|
-
export { role_1 as role };
|
|
101
|
-
let checkins_1: readonly [];
|
|
102
|
-
export { checkins_1 as checkins };
|
|
103
|
-
let checkin_1: readonly [];
|
|
104
|
-
export { checkin_1 as checkin };
|
|
105
|
-
let countries_1: readonly [];
|
|
106
|
-
export { countries_1 as countries };
|
|
107
|
-
let country_1: readonly [];
|
|
108
|
-
export { country_1 as country };
|
|
109
|
-
let currencies_1: readonly [];
|
|
110
|
-
export { currencies_1 as currencies };
|
|
111
|
-
let currency_1: readonly [];
|
|
112
|
-
export { currency_1 as currency };
|
|
113
|
-
let cities_1: readonly [];
|
|
114
|
-
export { cities_1 as cities };
|
|
115
|
-
let city_1: readonly [];
|
|
116
|
-
export { city_1 as city };
|
|
117
|
-
let venues_1: readonly [];
|
|
118
|
-
export { venues_1 as venues };
|
|
119
|
-
let venue_1: readonly [];
|
|
120
|
-
export { venue_1 as venue };
|
|
121
|
-
let games_1: readonly ["city", "status"];
|
|
122
|
-
export { games_1 as games };
|
|
123
|
-
let game_1: readonly ["city"];
|
|
124
|
-
export { game_1 as game };
|
|
125
|
-
let themes_1: readonly [];
|
|
126
|
-
export { themes_1 as themes };
|
|
127
|
-
let theme_1: readonly [];
|
|
128
|
-
export { theme_1 as theme };
|
|
129
|
-
let registrations_1: readonly ["game", "city"];
|
|
130
|
-
export { registrations_1 as registrations };
|
|
131
|
-
let registration_1: readonly [];
|
|
132
|
-
export { registration_1 as registration };
|
|
133
|
-
let mailings_1: readonly [];
|
|
134
|
-
export { mailings_1 as mailings };
|
|
135
|
-
let mailing_1: readonly [];
|
|
136
|
-
export { mailing_1 as mailing };
|
|
137
|
-
}
|