@shakerquiz/utilities 0.4.14 → 0.4.16

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.
@@ -0,0 +1,187 @@
1
+ type User = {
2
+ email: string | null
3
+ first_name: string | null
4
+ gmail_link: string | null
5
+ hashed_password: string | null
6
+ id: string
7
+ image_id: string | null
8
+ is_active: boolean | null
9
+ is_superuser: boolean | null
10
+ is_verified: boolean | null
11
+ last_name: string | null
12
+ mailru_link: string | null
13
+ phone: string | null
14
+ role_id: string
15
+ telegram_data: string | null
16
+ telegram_id: string | null
17
+ third_name: string | null
18
+ time_created: string
19
+ time_updated: string | null
20
+ }
21
+
22
+ type Role = {
23
+ description: string | null
24
+ id: string
25
+ name: Role
26
+ time_created: string
27
+ time_updated: string | null
28
+ }
29
+
30
+ type City = {
31
+ address: string | null
32
+ alias: string | null
33
+ chatapp_category: string | null
34
+ chatapp_legacy: boolean | null
35
+ chatapp_line: string | null
36
+ chatapp_tag: string | null
37
+ chatapp_user: string | null
38
+ country: string | null
39
+ currency: string | null
40
+ custom_html: string | null
41
+ custom_script: string | null
42
+ description: string | null
43
+ email: string | null
44
+ game_time: string | null
45
+ id: string
46
+ inst_comment: string | null
47
+ inst_link: string | null
48
+ inst_login: string | null
49
+ inst_password: string | null
50
+ is_default: boolean | null
51
+ is_franchise: boolean | null
52
+ max_members_count: number | null
53
+ meta_description: string | null
54
+ meta_title: string | null
55
+ min_members_count: number | null
56
+ name: string | null
57
+ phone: string | null
58
+ price: number | null
59
+ region: string | null
60
+ telegram_chat_id: string | null
61
+ tg_comment: string | null
62
+ tg_link: string | null
63
+ tg_login: string | null
64
+ tg_password: string | null
65
+ time_created: string
66
+ time_updated: string | null
67
+ timezone: number | null
68
+ title: string | null
69
+ vk_comment: string | null
70
+ vk_group_id: string | null
71
+ vk_link: string | null
72
+ yandex_metrica: string | null
73
+ }
74
+
75
+ type Venue = {
76
+ city_id: string | null
77
+ comment_equipment: string | null
78
+ comment_responsible: string | null
79
+ comment: string | null
80
+ floor: string | null
81
+ game_time: string | null
82
+ house_number: string | null
83
+ id: string
84
+ is_adult: boolean | null
85
+ latitude: number | null
86
+ location_info: string | null
87
+ longitude: number | null
88
+ metro: string | null
89
+ name: string | null
90
+ people_capacity: number | null
91
+ street: string | null
92
+ team_capacity: number | null
93
+ time_created: string
94
+ time_updated: string
95
+ }
96
+
97
+ type Theme = {
98
+ description: string | null
99
+ id: string
100
+ image_id: string
101
+ name: string | null
102
+ short_description: string | null
103
+ time_created: string
104
+ time_updated: string
105
+ }
106
+
107
+ type Game = {
108
+ alias: string | null
109
+ city_id: string | null
110
+ created_by_id: string
111
+ currency: string | null
112
+ description: string | null
113
+ event_time: string | null
114
+ game_pack_id: string | null
115
+ id: string
116
+ image_id: string | null
117
+ location_id: string
118
+ max_members_count: number | null
119
+ min_members_count: number | null
120
+ name: string | null
121
+ number: string | null
122
+ owner_id: string
123
+ personal_comment: string | null
124
+ price: number | null
125
+ short_description: string | null
126
+ status: GameStatus
127
+ theme_id: string
128
+ time_created: string
129
+ time_updated: string | null
130
+ timezone: number | null
131
+ weekday: string | null
132
+ }
133
+
134
+ type Registration = {
135
+ ads_from: string | null
136
+ change_people_count: number | null
137
+ channel: string | null
138
+ chatapp_id: string | null
139
+ comment: string | null
140
+ email: string | null
141
+ event_id: string
142
+ fact_people_count: number | null
143
+ human_name: string | null
144
+ id: string
145
+ is_actual_presence: boolean | null
146
+ is_alone: boolean | null
147
+ is_birthday: boolean | null
148
+ is_canceled: boolean | null
149
+ is_confirm: boolean | null
150
+ is_extensible: boolean | null
151
+ is_first: boolean | null
152
+ is_reserve: boolean | null
153
+ last_broadcast: string | null
154
+ people_count: number | null
155
+ phone: string | null
156
+ promocode: string | null
157
+ team_name: string | null
158
+ telegramBot: string | null
159
+ time_created: string
160
+ time_updated: string | null
161
+ utm_campaign: string | null
162
+ utm_content: string | null
163
+ utm_medium: string | null
164
+ utm_source: string | null
165
+ utm_term: string | null
166
+ vkontakte: string | null
167
+ }
168
+
169
+ type Media = {
170
+ id: string
171
+ time_created: string
172
+ time_updated: string | null
173
+ title: string | null
174
+ cached_link: string | null
175
+ description: string | null
176
+ path: string | null
177
+ }
178
+
179
+ type ImageMedia = {
180
+ file_format: string | null
181
+ height: number | null
182
+ id: string
183
+ media_id: string
184
+ time_created: string
185
+ time_updated: string | null
186
+ width: number | null
187
+ }
@@ -65,11 +65,22 @@ export var DomainKindPathname = /** @type {const} */ ({
65
65
  },
66
66
 
67
67
  'Game': {
68
+ /**
69
+ * Parameter "game" can be one of:
70
+ * - UUID of a Game,
71
+ * - Game alias combined with City (UUID, alias or VK group ID),
72
+ * - UUID of a Registration
73
+ */
68
74
  'Unit': '/game/:game?',
69
75
  'Set': '/games',
70
76
  },
71
77
 
72
78
  'Registration': {
79
+ /**
80
+ * Parameter "registration" can be one of:
81
+ * - UUID of a Registration,
82
+ * - VK identifier of a Registration
83
+ */
73
84
  'Unit': '/registration/:registration?',
74
85
  'Set': '/registrations',
75
86
  },
@@ -5,4 +5,4 @@
5
5
  * - CONNECT: {@link https://datatracker.ietf.org/doc/html/rfc9110}
6
6
  * - WebDAV Extensions {@link https://datatracker.ietf.org/doc/html/rfc4918}
7
7
  */
8
- export const Methods: readonly ["CONNECT", "COPY", "DELETE", "GET", "HEAD", "LOCK", "MKCOL", "MOVE", "OPTIONS", "PATCH", "POST", "PROPFIND", "PROPPATCH", "PUT", "TRACE", "UNLOCK"];
8
+ export const Methods: readonly ["DELETE", "GET", "OPTIONS", "PATCH", "POST", "PUT"];
@@ -6,20 +6,20 @@
6
6
  * - WebDAV Extensions {@link https://datatracker.ietf.org/doc/html/rfc4918}
7
7
  */
8
8
  export var Methods = /** @type {const} */ ([
9
- 'CONNECT',
10
- 'COPY',
9
+ // 'CONNECT',
10
+ // 'COPY',
11
11
  'DELETE',
12
12
  'GET',
13
- 'HEAD',
14
- 'LOCK',
15
- 'MKCOL',
16
- 'MOVE',
13
+ // 'HEAD',
14
+ // 'LOCK',
15
+ // 'MKCOL',
16
+ // 'MOVE',
17
17
  'OPTIONS',
18
18
  'PATCH',
19
19
  'POST',
20
- 'PROPFIND',
21
- 'PROPPATCH',
20
+ // 'PROPFIND',
21
+ // 'PROPPATCH',
22
22
  'PUT',
23
- 'TRACE',
24
- 'UNLOCK',
23
+ // 'TRACE',
24
+ // 'UNLOCK',
25
25
  ])
@@ -70,20 +70,3 @@ type ScopePhase = Record<Scope, Phase>
70
70
  type ScopeState = Record<Scope, any>
71
71
 
72
72
  type ScopeController = Record<Scope, AbortController | null>
73
-
74
- /**
75
- * Schemas
76
- */
77
-
78
- type CityColumn = keyof typeof import('./schemas/city.js').CityColumns
79
-
80
- type GameColumn = keyof typeof import('./schemas/game.js').GameColumns
81
-
82
- type RegistrationColumn =
83
- keyof typeof import('./schemas/registration.js').RegistrationColumns
84
-
85
- type ThemeColumn = keyof typeof import('./schemas/theme.js').ThemeColumns
86
-
87
- type UserColumn = keyof typeof import('./schemas/user.js').UserColumns
88
-
89
- type VenueColumn = keyof typeof import('./schemas/venue.js').VenueColumns
package/source/index.d.ts CHANGED
@@ -1,16 +1,7 @@
1
+ /// <reference path='./api.d.ts' />
2
+ /// <reference path='./database.d.ts' />
1
3
  /// <reference path='./globals.d.ts' />
2
4
 
3
- /// <reference path='./checkin.d.ts' />
4
- /// <reference path='./city.d.ts' />
5
- /// <reference path='./game.d.ts' />
6
- /// <reference path='./image-media.d.ts' />
7
- /// <reference path='./media.d.ts' />
8
- /// <reference path='./registration.d.ts' />
9
- /// <reference path='./role.d.ts' />
10
- /// <reference path='./theme.d.ts' />
11
- /// <reference path='./user.d.ts' />
12
- /// <reference path='./venue.d.ts' />
13
-
14
5
  export * from './enumerations/core/features.js'
15
6
  export * from './enumerations/core/kinds.js'
16
7
  export * from './enumerations/core/methods.js'
package/source/index.js CHANGED
@@ -1,14 +1,7 @@
1
+ /// <reference path='./api.d.ts' />
2
+ /// <reference path='./database.d.ts' />
1
3
  /// <reference path='./globals.d.ts' />
2
4
 
3
- /// <reference path='./city.d.ts' />
4
- /// <reference path='./game.d.ts' />
5
- /// <reference path='./registration.d.ts' />
6
- /// <reference path='./role.d.ts' />
7
- /// <reference path='./media.d.ts' />
8
- /// <reference path='./theme.d.ts' />
9
- /// <reference path='./user.d.ts' />
10
- /// <reference path='./venue.d.ts' />
11
-
12
5
  export * from './enumerations/core/features.js'
13
6
  export * from './enumerations/core/kinds.js'
14
7
  export * from './enumerations/core/methods.js'
@@ -1,9 +0,0 @@
1
- type CheckinResponse = {
2
- email: UserTable['email']
3
- first_name: UserTable['first_name']
4
- id: UserTable['id']
5
- last_name: UserTable['last_name']
6
- phone: UserTable['phone']
7
- third_name: UserTable['third_name']
8
- role: RoleResponse
9
- }
package/source/city.d.ts DELETED
@@ -1,191 +0,0 @@
1
- type CityTable = {
2
- /**
3
- * @description "timestamp with time zone"
4
- */
5
- time_created: string
6
- /**
7
- * @description "integer"
8
- */
9
- timezone: number | null
10
- /**
11
- * @description "boolean"
12
- */
13
- is_default: boolean | null
14
- /**
15
- * @description "boolean"
16
- */
17
- is_franchise: boolean | null
18
- /**
19
- * @description "integer"
20
- */
21
- min_members_count: number | null
22
- /**
23
- * @description "integer"
24
- */
25
- max_members_count: number | null
26
- /**
27
- * @description "boolean"
28
- */
29
- chatapp_legacy: boolean | null
30
- /**
31
- * @description "timestamp with time zone"
32
- */
33
- time_updated: string | null
34
- /**
35
- * @description "double precision"
36
- */
37
- price: number | null
38
- /**
39
- * @description "uuid"
40
- */
41
- id: string
42
- /**
43
- * @description "character varying"
44
- */
45
- inst_login: string | null
46
- /**
47
- * @description "character varying"
48
- */
49
- inst_password: string | null
50
- /**
51
- * @description "character varying"
52
- */
53
- inst_comment: string | null
54
- /**
55
- * @description "character varying"
56
- */
57
- custom_script: string | null
58
- /**
59
- * @description "character varying"
60
- */
61
- custom_html: string | null
62
- /**
63
- * @description "character varying"
64
- */
65
- alias: string | null
66
- /**
67
- * @description "character varying"
68
- */
69
- vk_group_id: string | null
70
- /**
71
- * @description "character varying"
72
- */
73
- chatapp_line: string | null
74
- /**
75
- * @description "character varying"
76
- */
77
- chatapp_user: string | null
78
- /**
79
- * @description "character varying"
80
- */
81
- chatapp_tag: string | null
82
- /**
83
- * @description "character varying"
84
- */
85
- chatapp_category: string | null
86
- /**
87
- * @description "character varying"
88
- */
89
- telegram_chat_id: string | null
90
- /**
91
- * @description "character varying"
92
- */
93
- title: string | null
94
- /**
95
- * @description "character varying"
96
- */
97
- description: string | null
98
- /**
99
- * @description "character varying"
100
- */
101
- region: string | null
102
- /**
103
- * @description "character varying"
104
- */
105
- country: string | null
106
- /**
107
- * @description "character varying"
108
- */
109
- yandex_metrica: string | null
110
- /**
111
- * @description "character varying"
112
- */
113
- meta_title: string | null
114
- /**
115
- * @description "character varying"
116
- */
117
- meta_description: string | null
118
- /**
119
- * @description "character varying"
120
- */
121
- phone: string | null
122
- /**
123
- * @description "character varying"
124
- */
125
- email: string | null
126
- /**
127
- * @description "character varying"
128
- */
129
- name: string | null
130
- /**
131
- * @description "character varying"
132
- */
133
- address: string | null
134
- /**
135
- * @description "character varying"
136
- */
137
- currency: string | null
138
- /**
139
- * @description "character varying"
140
- */
141
- game_time: string | null
142
- /**
143
- * @description "character varying"
144
- */
145
- vk_link: string | null
146
- /**
147
- * @description "character varying"
148
- */
149
- vk_comment: string | null
150
- /**
151
- * @description "character varying"
152
- */
153
- tg_link: string | null
154
- /**
155
- * @description "character varying"
156
- */
157
- tg_login: string | null
158
- /**
159
- * @description "character varying"
160
- */
161
- tg_password: string | null
162
- /**
163
- * @description "character varying"
164
- */
165
- tg_comment: string | null
166
- /**
167
- * @description "character varying"
168
- */
169
- inst_link: string | null
170
- }
171
-
172
- type CityResponse = {
173
- address: CityTable['address']
174
- alias: CityTable['alias']
175
- country: CityTable['country']
176
- custom_html: CityTable['custom_html']
177
- custom_script: CityTable['custom_script']
178
- email: CityTable['email']
179
- id: CityTable['id']
180
- inst_link: CityTable['inst_link']
181
- max_members_count: CityTable['max_members_count']
182
- meta_description: CityTable['meta_description']
183
- meta_title: CityTable['meta_title']
184
- min_members_count: CityTable['min_members_count']
185
- name: CityTable['name']
186
- phone: CityTable['phone']
187
- tg_link: CityTable['tg_link']
188
- vk_group_id: CityTable['vk_group_id']
189
- vk_link: CityTable['vk_link']
190
- yandex_metrica: CityTable['yandex_metrica']
191
- }
package/source/game.d.ts DELETED
@@ -1,188 +0,0 @@
1
- type GameAdminResult = {
2
- // City
3
- city_alias: CityTable['alias']
4
- city_id: CityTable['id']
5
- city_is_franchise: CityTable['is_franchise']
6
- city_name: CityTable['name']
7
- // Event
8
- event_alias: GameRow['alias']
9
- event_id: GameRow['id']
10
- event_number: GameRow['number']
11
- event_status: GameRow['status']
12
- event_time: GameRow['event_time']
13
- // Location
14
- location_id: VenueTable['id']
15
- location_name: VenueTable['name']
16
- // Media
17
- media_id: ImageMediaTable['id']
18
- media_path: ImageMediaTable['path']
19
- media_title: ImageMediaTable['title']
20
- // Custom
21
- people_amount: number
22
- people_reserve_amount: number
23
- teams_amount: number
24
- teams_reserve_amount: number
25
- // Theme
26
- theme_id: ThemeTable['id']
27
- theme_name: ThemeTable['name']
28
- }
29
-
30
- type GameDefaultResult = {
31
- // City
32
- city_alias: CityTable['alias']
33
- city_id: CityTable['id']
34
- // Event
35
- event_alias: GameRow['alias']
36
- event_currency: GameRow['currency']
37
- event_id: GameRow['id']
38
- event_max_members_count: GameRow['max_members_count']
39
- event_min_members_count: GameRow['min_members_count']
40
- event_number: GameRow['number']
41
- event_price: GameRow['price']
42
- event_status: GameRow['status']
43
- event_time: GameRow['event_time']
44
- // Image
45
- image_id: ImageMediaTable['id']
46
- // Location
47
- location_house_number: VenueTable['house_number']
48
- location_id: VenueTable['id']
49
- location_info: VenueTable['location_info']
50
- location_name: VenueTable['name']
51
- location_street: VenueTable['street']
52
- // Media
53
- media_id: MediaTable['id']
54
- media_path: MediaTable['path']
55
- // Theme
56
- theme_description: ThemeTable['description']
57
- theme_id: ThemeTable['id']
58
- theme_name: ThemeTable['name']
59
- theme_short_description: ThemeTable['short_description']
60
- }
61
-
62
- type GameOrginizerResult = {
63
- // City
64
- city_alias: CityTable['alias']
65
- city_id: CityTable['id']
66
- city_is_franchise: CityTable['is_franchise']
67
- city_name: CityTable['name']
68
- // Event
69
- event_alias: GameRow['alias']
70
- event_id: GameRow['id']
71
- event_number: GameRow['number']
72
- event_status: GameRow['status']
73
- event_time: GameRow['event_time']
74
- // Location
75
- location_id: VenueTable['id']
76
- location_name: VenueTable['name']
77
- // Media
78
- media_id: ImageMediaTable['id']
79
- media_path: ImageMediaTable['path']
80
- media_title: ImageMediaTable['title']
81
- // Custom
82
- people_amount: number
83
- people_reserve_amount: number
84
- teams_amount: number
85
- teams_reserve_amount: number
86
- // Theme
87
- theme_id: ThemeTable['id']
88
- theme_name: ThemeTable['name']
89
- }
90
-
91
- type GameRow = {
92
- /**
93
- * @description "uuid"
94
- */
95
- city_id: string | null
96
- /**
97
- * @description "uuid"
98
- */
99
- game_pack_id: string | null
100
- /**
101
- * @description "uuid"
102
- */
103
- id: string
104
- /**
105
- * @description "timestamp with time zone"
106
- */
107
- time_created: string
108
- /**
109
- * @description "timestamp with time zone"
110
- */
111
- time_updated: string | null
112
- /**
113
- * @description "uuid"
114
- */
115
- owner_id: string
116
- /**
117
- * @description "integer"
118
- */
119
- timezone: number | null
120
- /**
121
- * @description "integer"
122
- */
123
- min_members_count: number | null
124
- /**
125
- * @description "integer"
126
- */
127
- max_members_count: number | null
128
- /**
129
- * @description "USER-DEFINED"
130
- */
131
- status: GameStatus
132
- /**
133
- * @description "timestamp without time zone"
134
- */
135
- event_time: string | null
136
- /**
137
- * @description "double precision"
138
- */
139
- price: number | null
140
- /**
141
- * @description "uuid"
142
- */
143
- created_by_id: string
144
- /**
145
- * @description "uuid"
146
- */
147
- image_id: string | null
148
- /**
149
- * @description "uuid"
150
- */
151
- location_id: string
152
- /**
153
- * @description "uuid"
154
- */
155
- theme_id: string
156
- /**
157
- * @description "character varying"
158
- */
159
- description: string | null
160
- /**
161
- * @description "character varying"
162
- */
163
- number: string | null
164
- /**
165
- * @description "character varying"
166
- */
167
- short_description: string | null
168
- /**
169
- * @description "character varying"
170
- */
171
- personal_comment: string | null
172
- /**
173
- * @description "character varying"
174
- */
175
- weekday: string | null
176
- /**
177
- * @description "character varying"
178
- */
179
- alias: string | null
180
- /**
181
- * @description "character varying"
182
- */
183
- name: string | null
184
- /**
185
- * @description "character varying"
186
- */
187
- currency: string | null
188
- }