@shakerquiz/utilities 4.0.101 → 4.0.103

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "4.0.101",
4
+ "version": "4.0.103",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -5,6 +5,7 @@ import { Role } from './role.js'
5
5
  export const GameStatus = /** @type {const} */ ({
6
6
  'Approve': 'Approve',
7
7
  'Archive': 'Archive',
8
+ 'Cancel': 'Cancel',
8
9
  'Close': 'Close',
9
10
  'Finish': 'Finish',
10
11
  'Invite': 'Invite',
@@ -21,6 +22,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
21
22
  [GameStatus['Approve']]: Object.freeze([
22
23
  GameStatus['Approve'],
23
24
  GameStatus['Archive'],
25
+ GameStatus['Cancel'],
24
26
  GameStatus['Close'],
25
27
  GameStatus['Finish'],
26
28
  GameStatus['Invite'],
@@ -33,6 +35,20 @@ export const RoleGameStatusGameStatuses = Object.freeze({
33
35
  [GameStatus['Archive']]: Object.freeze([
34
36
  GameStatus['Approve'],
35
37
  GameStatus['Archive'],
38
+ GameStatus['Cancel'],
39
+ GameStatus['Close'],
40
+ GameStatus['Finish'],
41
+ GameStatus['Invite'],
42
+ GameStatus['Reserve'],
43
+ GameStatus['Moderate'],
44
+ GameStatus['Publish'],
45
+ GameStatus['Reject'],
46
+ ]),
47
+
48
+ [GameStatus['Cancel']]: Object.freeze([
49
+ GameStatus['Approve'],
50
+ GameStatus['Archive'],
51
+ GameStatus['Cancel'],
36
52
  GameStatus['Close'],
37
53
  GameStatus['Finish'],
38
54
  GameStatus['Invite'],
@@ -45,6 +61,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
45
61
  [GameStatus['Close']]: Object.freeze([
46
62
  GameStatus['Approve'],
47
63
  GameStatus['Archive'],
64
+ GameStatus['Cancel'],
48
65
  GameStatus['Close'],
49
66
  GameStatus['Finish'],
50
67
  GameStatus['Invite'],
@@ -57,6 +74,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
57
74
  [GameStatus['Finish']]: Object.freeze([
58
75
  GameStatus['Approve'],
59
76
  GameStatus['Archive'],
77
+ GameStatus['Cancel'],
60
78
  GameStatus['Close'],
61
79
  GameStatus['Finish'],
62
80
  GameStatus['Invite'],
@@ -69,6 +87,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
69
87
  [GameStatus['Invite']]: Object.freeze([
70
88
  GameStatus['Approve'],
71
89
  GameStatus['Archive'],
90
+ GameStatus['Cancel'],
72
91
  GameStatus['Close'],
73
92
  GameStatus['Finish'],
74
93
  GameStatus['Invite'],
@@ -81,6 +100,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
81
100
  [GameStatus['Reserve']]: Object.freeze([
82
101
  GameStatus['Approve'],
83
102
  GameStatus['Archive'],
103
+ GameStatus['Cancel'],
84
104
  GameStatus['Close'],
85
105
  GameStatus['Finish'],
86
106
  GameStatus['Invite'],
@@ -93,6 +113,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
93
113
  [GameStatus['Moderate']]: Object.freeze([
94
114
  GameStatus['Approve'],
95
115
  GameStatus['Archive'],
116
+ GameStatus['Cancel'],
96
117
  GameStatus['Close'],
97
118
  GameStatus['Finish'],
98
119
  GameStatus['Invite'],
@@ -105,6 +126,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
105
126
  [GameStatus['Publish']]: Object.freeze([
106
127
  GameStatus['Approve'],
107
128
  GameStatus['Archive'],
129
+ GameStatus['Cancel'],
108
130
  GameStatus['Close'],
109
131
  GameStatus['Finish'],
110
132
  GameStatus['Invite'],
@@ -117,6 +139,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
117
139
  [GameStatus['Reject']]: Object.freeze([
118
140
  GameStatus['Approve'],
119
141
  GameStatus['Archive'],
142
+ GameStatus['Cancel'],
120
143
  GameStatus['Close'],
121
144
  GameStatus['Finish'],
122
145
  GameStatus['Invite'],
@@ -129,6 +152,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
129
152
 
130
153
  [Role['Organizer']]: Object.freeze({
131
154
  [GameStatus['Approve']]: Object.freeze([
155
+ GameStatus['Cancel'],
132
156
  GameStatus['Close'],
133
157
  GameStatus['Invite'],
134
158
  GameStatus['Publish'],
@@ -137,7 +161,15 @@ export const RoleGameStatusGameStatuses = Object.freeze({
137
161
 
138
162
  [GameStatus['Archive']]: Object.freeze([]),
139
163
 
164
+ [GameStatus['Cancel']]: Object.freeze([
165
+ GameStatus['Close'],
166
+ GameStatus['Invite'],
167
+ GameStatus['Publish'],
168
+ GameStatus['Reserve'],
169
+ ]),
170
+
140
171
  [GameStatus['Close']]: Object.freeze([
172
+ GameStatus['Cancel'],
141
173
  GameStatus['Publish'],
142
174
  GameStatus['Invite'],
143
175
  GameStatus['Reserve'],
@@ -146,12 +178,14 @@ export const RoleGameStatusGameStatuses = Object.freeze({
146
178
  [GameStatus['Finish']]: Object.freeze([]),
147
179
 
148
180
  [GameStatus['Invite']]: Object.freeze([
181
+ GameStatus['Cancel'],
149
182
  GameStatus['Close'],
150
183
  GameStatus['Publish'],
151
184
  GameStatus['Reserve'],
152
185
  ]),
153
186
 
154
187
  [GameStatus['Reserve']]: Object.freeze([
188
+ GameStatus['Cancel'],
155
189
  GameStatus['Close'],
156
190
  GameStatus['Invite'],
157
191
  GameStatus['Publish'],
@@ -160,6 +194,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
160
194
  [GameStatus['Moderate']]: Object.freeze([]),
161
195
 
162
196
  [GameStatus['Publish']]: Object.freeze([
197
+ GameStatus['Cancel'],
163
198
  GameStatus['Close'],
164
199
  GameStatus['Invite'],
165
200
  GameStatus['Reserve'],
@@ -175,6 +210,8 @@ export const RoleGameStatusGameStatuses = Object.freeze({
175
210
 
176
211
  [GameStatus['Archive']]: Object.freeze([]),
177
212
 
213
+ [GameStatus['Cancel']]: Object.freeze([]),
214
+
178
215
  [GameStatus['Close']]: Object.freeze([]),
179
216
 
180
217
  [GameStatus['Finish']]: Object.freeze([]),
@@ -195,6 +232,7 @@ export const RoleGameStatuses = Object.freeze({
195
232
  [Role['Admin']]: Object.freeze([
196
233
  GameStatus['Approve'],
197
234
  GameStatus['Archive'],
235
+ GameStatus['Cancel'],
198
236
  GameStatus['Close'],
199
237
  GameStatus['Finish'],
200
238
  GameStatus['Invite'],
@@ -206,6 +244,7 @@ export const RoleGameStatuses = Object.freeze({
206
244
 
207
245
  [Role['Organizer']]: Object.freeze([
208
246
  GameStatus['Archive'],
247
+ GameStatus['Cancel'],
209
248
  GameStatus['Close'],
210
249
  GameStatus['Finish'],
211
250
  GameStatus['Invite'],
@@ -237,6 +276,10 @@ export const CategoryGameStatuses = Object.freeze({
237
276
  GameStatus['Approve'],
238
277
  ]),
239
278
 
279
+ [GameStatus['Cancel']]: Object.freeze([
280
+ GameStatus['Cancel'],
281
+ ]),
282
+
240
283
  [GameStatus['Finish']]: Object.freeze([
241
284
  GameStatus['Finish'],
242
285
  ]),
@@ -0,0 +1,7 @@
1
+ export const RegistrationExportFormat = /** @type {const} */ ({
2
+ 'Csv': 'Csv',
3
+ 'Xlsx': 'Xlsx',
4
+ 'Json': 'Json',
5
+ })
6
+
7
+ export const RegistrationExportFormats = Object.values(RegistrationExportFormat)
@@ -0,0 +1,35 @@
1
+ export const RegistrationTableColumn = /** @type {const} */ ({
2
+ 'id': 'id',
3
+ 'human_name': 'human_name',
4
+ 'email': 'email',
5
+ 'phone': 'phone',
6
+ 'team_name': 'team_name',
7
+ 'people_count': 'people_count',
8
+ 'is_first': 'is_first',
9
+ 'is_birthday': 'is_birthday',
10
+ 'is_extensible': 'is_extensible',
11
+ 'is_alone': 'is_alone',
12
+ 'ads_from': 'ads_from',
13
+ 'comment': 'comment',
14
+ 'promocode': 'promocode',
15
+ 'channel': 'channel',
16
+ 'vkontakte': 'vkontakte',
17
+ 'telegram': 'telegram',
18
+ 'chatapp_id': 'chatapp_id',
19
+ 'utm_term': 'utm_term',
20
+ 'utm_source': 'utm_source',
21
+ 'utm_medium': 'utm_medium',
22
+ 'utm_content': 'utm_content',
23
+ 'utm_campaign': 'utm_campaign',
24
+ 'confirmed_channel': 'confirmed_channel',
25
+ 'status': 'status',
26
+ 'lineup': 'lineup',
27
+ 'mailing': 'mailing',
28
+ 'celebrant': 'celebrant',
29
+ 'note': 'note',
30
+ 'visibility': 'visibility',
31
+ 'time_created': 'time_created',
32
+ 'time_updated': 'time_updated',
33
+ })
34
+
35
+ export const RegistrationTableColumns = Object.values(RegistrationTableColumn)
package/source/index.js CHANGED
@@ -24,6 +24,7 @@ export * from './entities/quantifier.js'
24
24
  export * from './entities/registration-attribute.js'
25
25
  export * from './entities/registration-cancellation.js'
26
26
  export * from './entities/registration-channel.js'
27
+ export * from './entities/registration-export-format.js'
27
28
  export * from './entities/registration-confirmation.js'
28
29
  export * from './entities/registration-interval.js'
29
30
  export * from './entities/registration-lineup-procedure.js'
@@ -35,6 +36,7 @@ export * from './entities/registration-reservation.js'
35
36
  export * from './entities/registration-restoration.js'
36
37
  export * from './entities/registration-status-procedure.js'
37
38
  export * from './entities/registration-status.js'
39
+ export * from './entities/registration-table-column.js'
38
40
  export * from './entities/registration-visibility.js'
39
41
  export * from './entities/role.js'
40
42
  export * from './entities/routes.js'