@shakerquiz/utilities 0.3.39 → 0.3.41
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/backends.d.ts +4 -4
- package/source/enumerations/backends.js +5 -3
- package/source/enumerations/domains.d.ts +4 -3
- package/source/enumerations/domains.js +41 -25
- package/source/enumerations/features.d.ts +4 -3
- package/source/enumerations/features.js +3 -2
- package/source/enumerations/schemas.d.ts +11 -3
- package/source/enumerations/schemas.js +5 -3
- package/source/index.d.ts +1 -0
- package/source/index.js +1 -0
- package/source/schemas/role.d.ts +21 -0
- package/source/schemas/role.js +21 -0
- package/source/user.d.ts +16 -1
package/package.json
CHANGED
|
@@ -6,14 +6,14 @@ export namespace Backends {
|
|
|
6
6
|
let Integrations: "Integrations";
|
|
7
7
|
}
|
|
8
8
|
export namespace BackendFeatures {
|
|
9
|
-
let Backend_1: ("
|
|
9
|
+
let Backend_1: ("Checkin" | "User" | "Role" | "City" | "Venue" | "Theme" | "Game" | "Registration")[];
|
|
10
10
|
export { Backend_1 as Backend };
|
|
11
|
-
let Games_1: ("
|
|
11
|
+
let Games_1: ("Theme" | "Game" | "Registration")[];
|
|
12
12
|
export { Games_1 as Games };
|
|
13
13
|
let Locations_1: ("City" | "Venue")[];
|
|
14
14
|
export { Locations_1 as Locations };
|
|
15
|
-
let Users_1: ("User" | "
|
|
15
|
+
let Users_1: ("Checkin" | "User" | "Role")[];
|
|
16
16
|
export { Users_1 as Users };
|
|
17
|
-
let Integrations_1:
|
|
17
|
+
let Integrations_1: ("Mailing" | "Redirect")[];
|
|
18
18
|
export { Integrations_1 as Integrations };
|
|
19
19
|
}
|
|
@@ -11,12 +11,13 @@ export var Backends = /** @type {const} */ ({
|
|
|
11
11
|
|
|
12
12
|
export var BackendFeatures = {
|
|
13
13
|
[Backends.Backend]: [
|
|
14
|
+
Domains.User,
|
|
15
|
+
Domains.Role,
|
|
14
16
|
Domains.City,
|
|
17
|
+
Domains.Venue,
|
|
18
|
+
Domains.Theme,
|
|
15
19
|
Domains.Game,
|
|
16
20
|
Domains.Registration,
|
|
17
|
-
Domains.Theme,
|
|
18
|
-
Domains.User,
|
|
19
|
-
Domains.Venue,
|
|
20
21
|
Procedures.Checkin,
|
|
21
22
|
],
|
|
22
23
|
|
|
@@ -33,6 +34,7 @@ export var BackendFeatures = {
|
|
|
33
34
|
|
|
34
35
|
[Backends.Users]: [
|
|
35
36
|
Domains.User,
|
|
37
|
+
Domains.Role,
|
|
36
38
|
Procedures.Checkin,
|
|
37
39
|
],
|
|
38
40
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export namespace Domains {
|
|
2
|
+
let User: "User";
|
|
3
|
+
let Role: "Role";
|
|
2
4
|
let City: "City";
|
|
5
|
+
let Venue: "Venue";
|
|
6
|
+
let Theme: "Theme";
|
|
3
7
|
let Game: "Game";
|
|
4
8
|
let Registration: "Registration";
|
|
5
|
-
let Theme: "Theme";
|
|
6
|
-
let User: "User";
|
|
7
|
-
let Venue: "Venue";
|
|
8
9
|
let Mailing: "Mailing";
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
@@ -4,12 +4,13 @@ import { Methods } from './methods.js'
|
|
|
4
4
|
import { Requirements } from './requirements.js'
|
|
5
5
|
|
|
6
6
|
export var Domains = /** @type {const} */ ({
|
|
7
|
+
User: 'User',
|
|
8
|
+
Role: 'Role',
|
|
7
9
|
City: 'City',
|
|
10
|
+
Venue: 'Venue',
|
|
11
|
+
Theme: 'Theme',
|
|
8
12
|
Game: 'Game',
|
|
9
13
|
Registration: 'Registration',
|
|
10
|
-
Theme: 'Theme',
|
|
11
|
-
User: 'User',
|
|
12
|
-
Venue: 'Venue',
|
|
13
14
|
Mailing: 'Mailing',
|
|
14
15
|
})
|
|
15
16
|
|
|
@@ -17,12 +18,13 @@ export var Domains = /** @type {const} */ ({
|
|
|
17
18
|
* @type {Record<Domain, Icon>}
|
|
18
19
|
*/
|
|
19
20
|
export var DomainIcons = {
|
|
21
|
+
[Domains.User]: Icons['users'],
|
|
22
|
+
[Domains.Role]: Icons['identification'],
|
|
20
23
|
[Domains.City]: Icons['building-office'],
|
|
24
|
+
[Domains.Venue]: Icons['map-pin'],
|
|
25
|
+
[Domains.Theme]: Icons['document-text'],
|
|
21
26
|
[Domains.Game]: Icons['newspaper'],
|
|
22
27
|
[Domains.Registration]: Icons['user-group'],
|
|
23
|
-
[Domains.Theme]: Icons['document-text'],
|
|
24
|
-
[Domains.User]: Icons['users'],
|
|
25
|
-
[Domains.Venue]: Icons['map-pin'],
|
|
26
28
|
[Domains.Mailing]: Icons['envelope'],
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -30,19 +32,24 @@ export var DomainIcons = {
|
|
|
30
32
|
* @type {Record<Domain, Record<Kind, string>>}
|
|
31
33
|
*/
|
|
32
34
|
export var DomainKindPathnames = {
|
|
35
|
+
[Domains.User]: {
|
|
36
|
+
[Kinds.Unit]: '/user/:user?',
|
|
37
|
+
[Kinds.Set]: '/users',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
[Domains.User]: {
|
|
41
|
+
[Kinds.Unit]: '/role/:role?',
|
|
42
|
+
[Kinds.Set]: '/roles',
|
|
43
|
+
},
|
|
44
|
+
|
|
33
45
|
[Domains.City]: {
|
|
34
46
|
[Kinds.Unit]: '/city/:city?',
|
|
35
47
|
[Kinds.Set]: '/cities',
|
|
36
48
|
},
|
|
37
49
|
|
|
38
|
-
[Domains.
|
|
39
|
-
[Kinds.Unit]: '/
|
|
40
|
-
[Kinds.Set]: '/
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
[Domains.Registration]: {
|
|
44
|
-
[Kinds.Unit]: '/registration/:registration?',
|
|
45
|
-
[Kinds.Set]: '/registrations',
|
|
50
|
+
[Domains.Venue]: {
|
|
51
|
+
[Kinds.Unit]: '/venue/:venue?',
|
|
52
|
+
[Kinds.Set]: '/venues',
|
|
46
53
|
},
|
|
47
54
|
|
|
48
55
|
[Domains.Theme]: {
|
|
@@ -50,14 +57,14 @@ export var DomainKindPathnames = {
|
|
|
50
57
|
[Kinds.Set]: '/themes',
|
|
51
58
|
},
|
|
52
59
|
|
|
53
|
-
[Domains.
|
|
54
|
-
[Kinds.Unit]: '/
|
|
55
|
-
[Kinds.Set]: '/
|
|
60
|
+
[Domains.Game]: {
|
|
61
|
+
[Kinds.Unit]: '/game/:game?',
|
|
62
|
+
[Kinds.Set]: '/games',
|
|
56
63
|
},
|
|
57
64
|
|
|
58
|
-
[Domains.
|
|
59
|
-
[Kinds.Unit]: '/
|
|
60
|
-
[Kinds.Set]: '/
|
|
65
|
+
[Domains.Registration]: {
|
|
66
|
+
[Kinds.Unit]: '/registration/:registration?',
|
|
67
|
+
[Kinds.Set]: '/registrations',
|
|
61
68
|
},
|
|
62
69
|
|
|
63
70
|
[Domains.Mailing]: {
|
|
@@ -70,7 +77,7 @@ export var DomainKindPathnames = {
|
|
|
70
77
|
* @type {Record<Domain, Record<Method, Set<Requirement>>>}
|
|
71
78
|
*/
|
|
72
79
|
export var DomainMethodRequirements = {
|
|
73
|
-
[Domains.
|
|
80
|
+
[Domains.User]: {
|
|
74
81
|
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
75
82
|
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
76
83
|
[Methods.OPTIONS]: new Set([]),
|
|
@@ -79,7 +86,7 @@ export var DomainMethodRequirements = {
|
|
|
79
86
|
[Methods.PUT]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
80
87
|
},
|
|
81
88
|
|
|
82
|
-
[Domains.
|
|
89
|
+
[Domains.Role]: {
|
|
83
90
|
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
84
91
|
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
85
92
|
[Methods.OPTIONS]: new Set([]),
|
|
@@ -88,7 +95,16 @@ export var DomainMethodRequirements = {
|
|
|
88
95
|
[Methods.PUT]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
89
96
|
},
|
|
90
97
|
|
|
91
|
-
[Domains.
|
|
98
|
+
[Domains.City]: {
|
|
99
|
+
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
100
|
+
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
101
|
+
[Methods.OPTIONS]: new Set([]),
|
|
102
|
+
[Methods.PATCH]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
103
|
+
[Methods.POST]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
104
|
+
[Methods.PUT]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
[Domains.Venue]: {
|
|
92
108
|
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
93
109
|
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
94
110
|
[Methods.OPTIONS]: new Set([]),
|
|
@@ -106,7 +122,7 @@ export var DomainMethodRequirements = {
|
|
|
106
122
|
[Methods.PUT]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
107
123
|
},
|
|
108
124
|
|
|
109
|
-
[Domains.
|
|
125
|
+
[Domains.Game]: {
|
|
110
126
|
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
111
127
|
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
112
128
|
[Methods.OPTIONS]: new Set([]),
|
|
@@ -115,7 +131,7 @@ export var DomainMethodRequirements = {
|
|
|
115
131
|
[Methods.PUT]: new Set([Requirements.Checkin, Requirements.Body]),
|
|
116
132
|
},
|
|
117
133
|
|
|
118
|
-
[Domains.
|
|
134
|
+
[Domains.Registration]: {
|
|
119
135
|
[Methods.DELETE]: new Set([Requirements.Checkin]),
|
|
120
136
|
[Methods.GET]: new Set([Requirements.Checkin]),
|
|
121
137
|
[Methods.OPTIONS]: new Set([]),
|
|
@@ -5,12 +5,13 @@ export const Features: {
|
|
|
5
5
|
Exception: "Exception";
|
|
6
6
|
Home: "Home";
|
|
7
7
|
Profile: "Profile";
|
|
8
|
+
User: "User";
|
|
9
|
+
Role: "Role";
|
|
8
10
|
City: "City";
|
|
11
|
+
Venue: "Venue";
|
|
12
|
+
Theme: "Theme";
|
|
9
13
|
Game: "Game";
|
|
10
14
|
Registration: "Registration";
|
|
11
|
-
Theme: "Theme";
|
|
12
|
-
User: "User";
|
|
13
|
-
Venue: "Venue";
|
|
14
15
|
Mailing: "Mailing";
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
@@ -48,12 +48,13 @@ export var FeatureKindPathnames = {
|
|
|
48
48
|
* @type {Record<Domain, Service>}
|
|
49
49
|
*/
|
|
50
50
|
export var DomainServiceDefaults = {
|
|
51
|
+
[Domains.User]: Backends.Users,
|
|
52
|
+
[Domains.Role]: Backends.Users,
|
|
51
53
|
[Domains.City]: Backends.Locations,
|
|
54
|
+
[Domains.Venue]: Backends.Locations,
|
|
52
55
|
[Domains.Game]: Backends.Games,
|
|
53
56
|
[Domains.Registration]: Backends.Games,
|
|
54
57
|
[Domains.Theme]: Backends.Games,
|
|
55
|
-
[Domains.User]: Backends.Users,
|
|
56
|
-
[Domains.Venue]: Backends.Locations,
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/**
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export namespace Schemas {
|
|
2
|
+
export { UserSchema as User };
|
|
3
|
+
export { RoleSchema as Role };
|
|
2
4
|
export { CitySchema as City };
|
|
5
|
+
export { VenueSchema as Venue };
|
|
6
|
+
export { ThemeSchema as Theme };
|
|
3
7
|
export { GameSchema as Game };
|
|
4
8
|
export { RegistrationSchema as Registration };
|
|
5
|
-
export { ThemeSchema as Theme };
|
|
6
|
-
export { UserSchema as User };
|
|
7
|
-
export { VenueSchema as Venue };
|
|
8
9
|
}
|
|
10
|
+
import { UserSchema } from '../schemas/user.js';
|
|
11
|
+
import { RoleSchema } from '../schemas/role.js';
|
|
12
|
+
import { CitySchema } from '../schemas/city.js';
|
|
13
|
+
import { VenueSchema } from '../schemas/venue.js';
|
|
14
|
+
import { ThemeSchema } from '../schemas/theme.js';
|
|
15
|
+
import { GameSchema } from '../schemas/game.js';
|
|
16
|
+
import { RegistrationSchema } from '../schemas/registration.js';
|
|
@@ -3,15 +3,17 @@ import { Domains } from '../enumerations/domains.js'
|
|
|
3
3
|
import { CitySchema } from '../schemas/city.js'
|
|
4
4
|
import { GameSchema } from '../schemas/game.js'
|
|
5
5
|
import { RegistrationSchema } from '../schemas/registration.js'
|
|
6
|
+
import { RoleSchema } from '../schemas/role.js'
|
|
6
7
|
import { ThemeSchema } from '../schemas/theme.js'
|
|
7
8
|
import { UserSchema } from '../schemas/user.js'
|
|
8
9
|
import { VenueSchema } from '../schemas/venue.js'
|
|
9
10
|
|
|
10
11
|
export var Schemas = /** @type {const} */ ({
|
|
12
|
+
[Domains.User]: UserSchema,
|
|
13
|
+
[Domains.Role]: RoleSchema,
|
|
11
14
|
[Domains.City]: CitySchema,
|
|
15
|
+
[Domains.Venue]: VenueSchema,
|
|
16
|
+
[Domains.Theme]: ThemeSchema,
|
|
12
17
|
[Domains.Game]: GameSchema,
|
|
13
18
|
[Domains.Registration]: RegistrationSchema,
|
|
14
|
-
[Domains.Theme]: ThemeSchema,
|
|
15
|
-
[Domains.User]: UserSchema,
|
|
16
|
-
[Domains.Venue]: VenueSchema,
|
|
17
19
|
})
|
package/source/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './functions/url.js'
|
|
|
42
42
|
export * from './schemas/city.js'
|
|
43
43
|
export * from './schemas/game.js'
|
|
44
44
|
export * from './schemas/registration.js'
|
|
45
|
+
export * from './schemas/role.js'
|
|
45
46
|
export * from './schemas/theme.js'
|
|
46
47
|
export * from './schemas/user.js'
|
|
47
48
|
export * from './schemas/venue.js'
|
package/source/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export * from './functions/url.js'
|
|
|
42
42
|
export * from './schemas/city.js'
|
|
43
43
|
export * from './schemas/game.js'
|
|
44
44
|
export * from './schemas/registration.js'
|
|
45
|
+
export * from './schemas/role.js'
|
|
45
46
|
export * from './schemas/theme.js'
|
|
46
47
|
export * from './schemas/user.js'
|
|
47
48
|
export * from './schemas/venue.js'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export namespace RoleSchema {
|
|
2
|
+
namespace description {
|
|
3
|
+
let type: "String";
|
|
4
|
+
}
|
|
5
|
+
namespace id {
|
|
6
|
+
let type_1: "String";
|
|
7
|
+
export { type_1 as type };
|
|
8
|
+
}
|
|
9
|
+
namespace name {
|
|
10
|
+
let type_2: "String";
|
|
11
|
+
export { type_2 as type };
|
|
12
|
+
}
|
|
13
|
+
namespace time_created {
|
|
14
|
+
let type_3: "String";
|
|
15
|
+
export { type_3 as type };
|
|
16
|
+
}
|
|
17
|
+
namespace time_updated {
|
|
18
|
+
let type_4: "String";
|
|
19
|
+
export { type_4 as type };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export var RoleSchema = /** @type {const} */ ({
|
|
2
|
+
description: {
|
|
3
|
+
type: 'String',
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
id: {
|
|
7
|
+
type: 'String',
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
name: {
|
|
11
|
+
type: 'String',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
time_created: {
|
|
15
|
+
type: 'String',
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
time_updated: {
|
|
19
|
+
type: 'String',
|
|
20
|
+
},
|
|
21
|
+
})
|
package/source/user.d.ts
CHANGED
|
@@ -28,7 +28,22 @@ type CheckinOrganizerResult = {
|
|
|
28
28
|
role_name: RoleRow['name']
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
type UserAdminResult =
|
|
31
|
+
type UserAdminResult = {
|
|
32
|
+
id: UserRow['id']
|
|
33
|
+
email: UserRow['email']
|
|
34
|
+
phone: UserRow['phone']
|
|
35
|
+
first_name: UserRow['first_name']
|
|
36
|
+
last_name: UserRow['last_name']
|
|
37
|
+
is_active: UserRow['is_active']
|
|
38
|
+
gmail_link: UserRow['gmail_link']
|
|
39
|
+
mailru_link: UserRow['mailru_link']
|
|
40
|
+
role_id: RoleRow['id']
|
|
41
|
+
role_name: RoleRow['name']
|
|
42
|
+
cities: {
|
|
43
|
+
id: CityRow['id']
|
|
44
|
+
name: CityRow['name']
|
|
45
|
+
}[]
|
|
46
|
+
}
|
|
32
47
|
|
|
33
48
|
type UserDefaultResult = unknown
|
|
34
49
|
|