@shakerquiz/contracts 0.0.62 → 0.0.64

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/contracts",
4
- "version": "0.0.62",
4
+ "version": "0.0.64",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -26,9 +26,6 @@
26
26
  },
27
27
  "max_members_count": {
28
28
  "type": "integer"
29
- },
30
- "status": {
31
- "type": "string"
32
29
  }
33
30
  },
34
31
  "required": [
@@ -22,9 +22,6 @@
22
22
  },
23
23
  "max_members_count": {
24
24
  "type": "integer"
25
- },
26
- "status": {
27
- "type": "string"
28
25
  }
29
26
  },
30
27
  "required": [],
@@ -0,0 +1,31 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ },
10
+ "status": {
11
+ "type": "string",
12
+ "enum": [
13
+ "APPROVED",
14
+ "ARCHIVE",
15
+ "CLOSED",
16
+ "FINISHED",
17
+ "FORINVITES",
18
+ "IS_RESERVE",
19
+ "MODERATION",
20
+ "PUBLISHED",
21
+ "REJECTED"
22
+ ]
23
+ }
24
+ },
25
+ "required": [
26
+ "id"
27
+ ],
28
+ "additionalProperties": false
29
+ },
30
+ "uniqueItems": true
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ },
10
+ "status": {
11
+ "type": "string",
12
+ "enum": [
13
+ "APPROVED",
14
+ "ARCHIVE",
15
+ "CLOSED",
16
+ "FINISHED",
17
+ "FORINVITES",
18
+ "IS_RESERVE",
19
+ "MODERATION",
20
+ "PUBLISHED",
21
+ "REJECTED"
22
+ ]
23
+ }
24
+ },
25
+ "required": [
26
+ "id"
27
+ ],
28
+ "additionalProperties": false
29
+ },
30
+ "uniqueItems": true
31
+ }
@@ -1,85 +1,5 @@
1
1
  {
2
2
  "type": "object",
3
- "properties": {
4
- "ads_from": {
5
- "type": "string"
6
- },
7
- "email": {
8
- "type": "string"
9
- },
10
- "vkontakte": {
11
- "type": "string"
12
- },
13
- "telegramBot": {
14
- "type": "string"
15
- },
16
- "comment": {
17
- "type": "string"
18
- },
19
- "event_id": {
20
- "type": "string",
21
- "format": "uuid"
22
- },
23
- "human_name": {
24
- "type": "string"
25
- },
26
- "team_name": {
27
- "type": "string"
28
- },
29
- "people_count": {
30
- "type": "integer"
31
- },
32
- "channel": {
33
- "type": "string"
34
- },
35
- "confirmed_channel": {
36
- "type": "string"
37
- },
38
- "is_alone": {
39
- "type": "boolean"
40
- },
41
- "is_birthday": {
42
- "type": "boolean"
43
- },
44
- "is_extensible": {
45
- "type": "boolean"
46
- },
47
- "is_first": {
48
- "type": "boolean"
49
- },
50
- "phone": {
51
- "type": "string"
52
- },
53
- "promocode": {
54
- "type": "string"
55
- },
56
- "utm_campaign": {
57
- "type": "string"
58
- },
59
- "utm_content": {
60
- "type": "string"
61
- },
62
- "utm_medium": {
63
- "type": "string"
64
- },
65
- "utm_source": {
66
- "type": "string"
67
- },
68
- "utm_term": {
69
- "type": "string"
70
- }
71
- },
72
- "required": [
73
- "event_id",
74
- "human_name",
75
- "team_name",
76
- "people_count",
77
- "channel",
78
- "is_alone",
79
- "is_birthday",
80
- "is_extensible",
81
- "is_first"
82
- ],
83
3
  "anyOf": [
84
4
  {
85
5
  "if": {
@@ -103,6 +23,15 @@
103
23
  "confirmed_channel": {
104
24
  "const": "telegramBot"
105
25
  },
26
+ "email": {
27
+ "type": "string"
28
+ },
29
+ "vkontakte": {
30
+ "type": "string"
31
+ },
32
+ "telegramBot": {
33
+ "type": "string"
34
+ },
106
35
  "is_alone": {
107
36
  "type": "boolean"
108
37
  },
@@ -115,21 +44,48 @@
115
44
  "is_first": {
116
45
  "type": "boolean"
117
46
  },
118
- "email": {
47
+ "ads_from": {
119
48
  "type": "string"
120
49
  },
121
- "vkontakte": {
50
+ "comment": {
122
51
  "type": "string"
123
52
  },
124
- "telegramBot": {
53
+ "phone": {
54
+ "type": "string"
55
+ },
56
+ "promocode": {
57
+ "type": "string"
58
+ },
59
+ "utm_campaign": {
60
+ "type": "string"
61
+ },
62
+ "utm_content": {
63
+ "type": "string"
64
+ },
65
+ "utm_medium": {
66
+ "type": "string"
67
+ },
68
+ "utm_source": {
69
+ "type": "string"
70
+ },
71
+ "utm_term": {
125
72
  "type": "string"
126
73
  }
127
74
  }
128
75
  },
129
76
  "then": {
130
77
  "required": [
78
+ "event_id",
79
+ "human_name",
80
+ "team_name",
81
+ "people_count",
82
+ "channel",
131
83
  "confirmed_channel",
132
- "telegramBot"
84
+ "telegramBot",
85
+ "is_alone",
86
+ "is_birthday",
87
+ "is_extensible",
88
+ "is_first"
133
89
  ]
134
90
  }
135
91
  },
@@ -155,6 +111,15 @@
155
111
  "confirmed_channel": {
156
112
  "const": "vkontakte"
157
113
  },
114
+ "email": {
115
+ "type": "string"
116
+ },
117
+ "vkontakte": {
118
+ "type": "string"
119
+ },
120
+ "telegramBot": {
121
+ "type": "string"
122
+ },
158
123
  "is_alone": {
159
124
  "type": "boolean"
160
125
  },
@@ -167,21 +132,48 @@
167
132
  "is_first": {
168
133
  "type": "boolean"
169
134
  },
170
- "email": {
135
+ "ads_from": {
171
136
  "type": "string"
172
137
  },
173
- "vkontakte": {
138
+ "comment": {
174
139
  "type": "string"
175
140
  },
176
- "telegramBot": {
141
+ "phone": {
142
+ "type": "string"
143
+ },
144
+ "promocode": {
145
+ "type": "string"
146
+ },
147
+ "utm_campaign": {
148
+ "type": "string"
149
+ },
150
+ "utm_content": {
151
+ "type": "string"
152
+ },
153
+ "utm_medium": {
154
+ "type": "string"
155
+ },
156
+ "utm_source": {
157
+ "type": "string"
158
+ },
159
+ "utm_term": {
177
160
  "type": "string"
178
161
  }
179
162
  }
180
163
  },
181
164
  "then": {
182
165
  "required": [
166
+ "event_id",
167
+ "human_name",
168
+ "team_name",
169
+ "people_count",
170
+ "channel",
183
171
  "confirmed_channel",
184
- "vkontakte"
172
+ "vkontakte",
173
+ "is_alone",
174
+ "is_birthday",
175
+ "is_extensible",
176
+ "is_first"
185
177
  ]
186
178
  }
187
179
  },
@@ -204,6 +196,18 @@
204
196
  "channel": {
205
197
  "const": "email"
206
198
  },
199
+ "confirmed_channel": {
200
+ "type": "null"
201
+ },
202
+ "email": {
203
+ "type": "string"
204
+ },
205
+ "vkontakte": {
206
+ "type": "string"
207
+ },
208
+ "telegramBot": {
209
+ "type": "string"
210
+ },
207
211
  "is_alone": {
208
212
  "type": "boolean"
209
213
  },
@@ -216,20 +220,47 @@
216
220
  "is_first": {
217
221
  "type": "boolean"
218
222
  },
219
- "email": {
223
+ "ads_from": {
220
224
  "type": "string"
221
225
  },
222
- "vkontakte": {
226
+ "comment": {
223
227
  "type": "string"
224
228
  },
225
- "telegramBot": {
229
+ "phone": {
230
+ "type": "string"
231
+ },
232
+ "promocode": {
233
+ "type": "string"
234
+ },
235
+ "utm_campaign": {
236
+ "type": "string"
237
+ },
238
+ "utm_content": {
239
+ "type": "string"
240
+ },
241
+ "utm_medium": {
242
+ "type": "string"
243
+ },
244
+ "utm_source": {
245
+ "type": "string"
246
+ },
247
+ "utm_term": {
226
248
  "type": "string"
227
249
  }
228
250
  }
229
251
  },
230
252
  "then": {
231
253
  "required": [
232
- "email"
254
+ "event_id",
255
+ "human_name",
256
+ "team_name",
257
+ "people_count",
258
+ "channel",
259
+ "email",
260
+ "is_alone",
261
+ "is_birthday",
262
+ "is_extensible",
263
+ "is_first"
233
264
  ]
234
265
  }
235
266
  }
package/source/index.js CHANGED
@@ -14,6 +14,7 @@ import PATCH_game_admin from './contracts/PATCH/game/admin.json' with { type: 'j
14
14
  import PATCH_game_status_admin from './contracts/PATCH/game/status/admin.json' with { type: 'json' }
15
15
  import PATCH_game_status_Service from './contracts/PATCH/game/status/Service.json' with { type: 'json' }
16
16
  import PATCH_games_admin from './contracts/PATCH/games/admin.json' with { type: 'json' }
17
+ import PATCH_games_status_admin from './contracts/PATCH/games/status/admin.json' with { type: 'json' }
17
18
  import PATCH_registration_admin from './contracts/PATCH/registration/admin.json' with { type: 'json' }
18
19
  import PATCH_registration_Unknown from './contracts/PATCH/registration/Unknown.json' with { type: 'json' }
19
20
  import PATCH_registration_status_admin from './contracts/PATCH/registration/status/admin.json' with { type: 'json' }
@@ -54,6 +55,7 @@ export const Contracts = Object.freeze(
54
55
  'PATCH/game/status/admin',
55
56
  'PATCH/game/status/Service',
56
57
  'PATCH/games/admin',
58
+ 'PATCH/games/status/admin',
57
59
  'PATCH/registration/admin',
58
60
  'PATCH/registration/Unknown',
59
61
  'PATCH/registration/status/admin',
@@ -96,6 +98,7 @@ export const Schemas = Object.freeze(
96
98
  PATCH_game_status_admin,
97
99
  PATCH_game_status_Service,
98
100
  PATCH_games_admin,
101
+ PATCH_games_status_admin,
99
102
  PATCH_registration_admin,
100
103
  PATCH_registration_Unknown,
101
104
  PATCH_registration_status_admin,
@@ -138,6 +141,7 @@ export const ContractSchema = Object.freeze(
138
141
  'PATCH/game/status/admin': PATCH_game_status_admin,
139
142
  'PATCH/game/status/Service': PATCH_game_status_Service,
140
143
  'PATCH/games/admin': PATCH_games_admin,
144
+ 'PATCH/games/status/admin': PATCH_games_status_admin,
141
145
  'PATCH/registration/admin': PATCH_registration_admin,
142
146
  'PATCH/registration/Unknown': PATCH_registration_Unknown,
143
147
  'PATCH/registration/status/admin': PATCH_registration_status_admin,