@shakerquiz/contracts 0.0.71 → 0.0.72

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.71",
4
+ "version": "0.0.72",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "mailing": {
5
+ "type": "string"
6
+ },
7
+ "chatapp_id": {
8
+ "type": "string"
9
+ }
10
+ },
11
+ "required": [],
12
+ "additionalProperties": false
13
+ }
@@ -1,8 +1,32 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "team_name": {
5
+ "type": "string"
6
+ },
7
+ "human_name": {
8
+ "type": "string"
9
+ },
4
10
  "people_count": {
5
11
  "type": "integer"
12
+ },
13
+ "celebrant": {
14
+ "type": "string"
15
+ },
16
+ "note": {
17
+ "type": "string"
18
+ },
19
+ "is_alone": {
20
+ "type": "boolean"
21
+ },
22
+ "is_birthday": {
23
+ "type": "boolean"
24
+ },
25
+ "is_extensible": {
26
+ "type": "boolean"
27
+ },
28
+ "is_first": {
29
+ "type": "boolean"
6
30
  }
7
31
  },
8
32
  "required": [],
@@ -10,12 +10,23 @@
10
10
  "people_count": {
11
11
  "type": "integer"
12
12
  },
13
- "phone": {
13
+ "celebrant": {
14
14
  "type": "string"
15
15
  },
16
- "email": {
17
- "type": "string",
18
- "format": "email"
16
+ "comment": {
17
+ "type": "string"
18
+ },
19
+ "is_alone": {
20
+ "type": "boolean"
21
+ },
22
+ "is_birthday": {
23
+ "type": "boolean"
24
+ },
25
+ "is_extensible": {
26
+ "type": "boolean"
27
+ },
28
+ "is_first": {
29
+ "type": "boolean"
19
30
  }
20
31
  },
21
32
  "required": [],
@@ -0,0 +1,89 @@
1
+ {
2
+ "type": "object",
3
+ "anyOf": [
4
+ {
5
+ "if": {
6
+ "properties": {
7
+ "channel": {
8
+ "const": "vkontakte"
9
+ },
10
+ "confirmed_channel": {
11
+ "const": "vkontakte"
12
+ },
13
+ "email": {
14
+ "type": "string"
15
+ },
16
+ "vkontakte": {
17
+ "type": "string"
18
+ },
19
+ "telegramBot": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "then": {
25
+ "required": [
26
+ "channel",
27
+ "confirmed_channel",
28
+ "vkontakte"
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "if": {
34
+ "properties": {
35
+ "channel": {
36
+ "const": "telegramBot"
37
+ },
38
+ "confirmed_channel": {
39
+ "const": "telegramBot"
40
+ },
41
+ "email": {
42
+ "type": "string"
43
+ },
44
+ "vkontakte": {
45
+ "type": "string"
46
+ },
47
+ "telegramBot": {
48
+ "type": "string"
49
+ }
50
+ }
51
+ },
52
+ "then": {
53
+ "required": [
54
+ "channel",
55
+ "confirmed_channel",
56
+ "telegramBot"
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "if": {
62
+ "properties": {
63
+ "channel": {
64
+ "const": "email"
65
+ },
66
+ "confirmed_channel": {
67
+ "const": "email"
68
+ },
69
+ "email": {
70
+ "type": "string"
71
+ },
72
+ "vkontakte": {
73
+ "type": "string"
74
+ },
75
+ "telegramBot": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "then": {
81
+ "required": [
82
+ "channel",
83
+ "confirmed_channel",
84
+ "email"
85
+ ]
86
+ }
87
+ }
88
+ ]
89
+ }
@@ -1,22 +1,89 @@
1
1
  {
2
2
  "type": "object",
3
- "properties": {
4
- "channel": {
5
- "type": "string"
3
+ "anyOf": [
4
+ {
5
+ "if": {
6
+ "properties": {
7
+ "channel": {
8
+ "const": "vkontakte"
9
+ },
10
+ "confirmed_channel": {
11
+ "const": "vkontakte"
12
+ },
13
+ "email": {
14
+ "type": "string"
15
+ },
16
+ "vkontakte": {
17
+ "type": "string"
18
+ },
19
+ "telegramBot": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "then": {
25
+ "required": [
26
+ "channel",
27
+ "confirmed_channel",
28
+ "vkontakte"
29
+ ]
30
+ }
6
31
  },
7
- "confirmed_channel": {
8
- "type": "string"
32
+ {
33
+ "if": {
34
+ "properties": {
35
+ "channel": {
36
+ "const": "telegramBot"
37
+ },
38
+ "confirmed_channel": {
39
+ "const": "telegramBot"
40
+ },
41
+ "email": {
42
+ "type": "string"
43
+ },
44
+ "vkontakte": {
45
+ "type": "string"
46
+ },
47
+ "telegramBot": {
48
+ "type": "string"
49
+ }
50
+ }
51
+ },
52
+ "then": {
53
+ "required": [
54
+ "channel",
55
+ "confirmed_channel",
56
+ "telegramBot"
57
+ ]
58
+ }
9
59
  },
10
- "email": {
11
- "type": "string"
12
- },
13
- "vkontakte": {
14
- "type": "string"
15
- },
16
- "telegramBot": {
17
- "type": "string"
60
+ {
61
+ "if": {
62
+ "properties": {
63
+ "channel": {
64
+ "const": "email"
65
+ },
66
+ "confirmed_channel": {
67
+ "const": "email"
68
+ },
69
+ "email": {
70
+ "type": "string"
71
+ },
72
+ "vkontakte": {
73
+ "type": "string"
74
+ },
75
+ "telegramBot": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "then": {
81
+ "required": [
82
+ "channel",
83
+ "confirmed_channel",
84
+ "email"
85
+ ]
86
+ }
18
87
  }
19
- },
20
- "required": [],
21
- "additionalProperties": false
88
+ ]
22
89
  }
@@ -1,22 +1,89 @@
1
1
  {
2
2
  "type": "object",
3
- "properties": {
4
- "channel": {
5
- "type": "string"
3
+ "anyOf": [
4
+ {
5
+ "if": {
6
+ "properties": {
7
+ "channel": {
8
+ "const": "vkontakte"
9
+ },
10
+ "confirmed_channel": {
11
+ "const": "vkontakte"
12
+ },
13
+ "email": {
14
+ "type": "string"
15
+ },
16
+ "vkontakte": {
17
+ "type": "string"
18
+ },
19
+ "telegramBot": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "then": {
25
+ "required": [
26
+ "channel",
27
+ "confirmed_channel",
28
+ "vkontakte"
29
+ ]
30
+ }
6
31
  },
7
- "confirmed_channel": {
8
- "type": "string"
32
+ {
33
+ "if": {
34
+ "properties": {
35
+ "channel": {
36
+ "const": "telegramBot"
37
+ },
38
+ "confirmed_channel": {
39
+ "const": "telegramBot"
40
+ },
41
+ "email": {
42
+ "type": "string"
43
+ },
44
+ "vkontakte": {
45
+ "type": "string"
46
+ },
47
+ "telegramBot": {
48
+ "type": "string"
49
+ }
50
+ }
51
+ },
52
+ "then": {
53
+ "required": [
54
+ "channel",
55
+ "confirmed_channel",
56
+ "telegramBot"
57
+ ]
58
+ }
9
59
  },
10
- "email": {
11
- "type": "string"
12
- },
13
- "vkontakte": {
14
- "type": "string"
15
- },
16
- "telegramBot": {
17
- "type": "string"
60
+ {
61
+ "if": {
62
+ "properties": {
63
+ "channel": {
64
+ "const": "email"
65
+ },
66
+ "confirmed_channel": {
67
+ "const": "email"
68
+ },
69
+ "email": {
70
+ "type": "string"
71
+ },
72
+ "vkontakte": {
73
+ "type": "string"
74
+ },
75
+ "telegramBot": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "then": {
81
+ "required": [
82
+ "channel",
83
+ "confirmed_channel",
84
+ "email"
85
+ ]
86
+ }
18
87
  }
19
- },
20
- "required": [],
21
- "additionalProperties": false
88
+ ]
22
89
  }
@@ -0,0 +1,89 @@
1
+ {
2
+ "type": "object",
3
+ "anyOf": [
4
+ {
5
+ "if": {
6
+ "properties": {
7
+ "channel": {
8
+ "const": "vkontakte"
9
+ },
10
+ "confirmed_channel": {
11
+ "const": "vkontakte"
12
+ },
13
+ "email": {
14
+ "type": "string"
15
+ },
16
+ "vkontakte": {
17
+ "type": "string"
18
+ },
19
+ "telegramBot": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "then": {
25
+ "required": [
26
+ "channel",
27
+ "confirmed_channel",
28
+ "vkontakte"
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ "if": {
34
+ "properties": {
35
+ "channel": {
36
+ "const": "telegramBot"
37
+ },
38
+ "confirmed_channel": {
39
+ "const": "telegramBot"
40
+ },
41
+ "email": {
42
+ "type": "string"
43
+ },
44
+ "vkontakte": {
45
+ "type": "string"
46
+ },
47
+ "telegramBot": {
48
+ "type": "string"
49
+ }
50
+ }
51
+ },
52
+ "then": {
53
+ "required": [
54
+ "channel",
55
+ "confirmed_channel",
56
+ "telegramBot"
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "if": {
62
+ "properties": {
63
+ "channel": {
64
+ "const": "email"
65
+ },
66
+ "confirmed_channel": {
67
+ "const": "email"
68
+ },
69
+ "email": {
70
+ "type": "string"
71
+ },
72
+ "vkontakte": {
73
+ "type": "string"
74
+ },
75
+ "telegramBot": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "then": {
81
+ "required": [
82
+ "channel",
83
+ "confirmed_channel",
84
+ "email"
85
+ ]
86
+ }
87
+ }
88
+ ]
89
+ }
@@ -2,13 +2,23 @@
2
2
  "type": "object",
3
3
  "properties": {
4
4
  "lineup": {
5
- "type": "string",
6
- "enum": [
7
- "Main",
8
- "Reserve"
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Main",
11
+ "Reserve"
12
+ ]
13
+ }
14
+ },
15
+ "required": [
16
+ "value"
9
17
  ]
10
18
  }
11
19
  },
12
- "required": [],
20
+ "required": [
21
+ "lineup"
22
+ ],
13
23
  "additionalProperties": false
14
24
  }
@@ -0,0 +1,24 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "lineup": {
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Main",
11
+ "Reserve"
12
+ ]
13
+ }
14
+ },
15
+ "required": [
16
+ "value"
17
+ ]
18
+ }
19
+ },
20
+ "required": [
21
+ "lineup"
22
+ ],
23
+ "additionalProperties": false
24
+ }
@@ -1,35 +1,32 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "team_name": {
5
+ "type": "string"
6
+ },
7
+ "human_name": {
8
+ "type": "string"
9
+ },
4
10
  "people_count": {
5
11
  "type": "integer"
6
12
  },
7
- "human_name": {
13
+ "celebrant": {
14
+ "type": "string"
15
+ },
16
+ "comment": {
8
17
  "type": "string"
9
18
  },
10
19
  "is_alone": {
11
20
  "type": "boolean"
12
21
  },
13
- "is_reserve": {
22
+ "is_birthday": {
14
23
  "type": "boolean"
15
24
  },
16
- "team_name": {
17
- "type": "string"
25
+ "is_extensible": {
26
+ "type": "boolean"
18
27
  },
19
- "status": {
20
- "type": "string",
21
- "enum": [
22
- "Created",
23
- "Confirmed",
24
- "Cancelled"
25
- ]
26
- },
27
- "lineup": {
28
- "type": "string",
29
- "enum": [
30
- "Main",
31
- "Reserve"
32
- ]
28
+ "is_first": {
29
+ "type": "boolean"
33
30
  }
34
31
  },
35
32
  "required": [],
@@ -0,0 +1,25 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "status": {
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Created",
11
+ "Confirmed",
12
+ "Cancelled"
13
+ ]
14
+ }
15
+ },
16
+ "required": [
17
+ "value"
18
+ ]
19
+ }
20
+ },
21
+ "required": [
22
+ "status"
23
+ ],
24
+ "additionalProperties": false
25
+ }
@@ -2,14 +2,24 @@
2
2
  "type": "object",
3
3
  "properties": {
4
4
  "status": {
5
- "type": "string",
6
- "enum": [
7
- "Created",
8
- "Confirmed",
9
- "Cancelled"
10
- ]
11
- }
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Created",
11
+ "Confirmed",
12
+ "Cancelled"
13
+ ]
14
+ }
15
+ }
16
+ },
17
+ "required": [
18
+ "value"
19
+ ]
12
20
  },
13
- "required": [],
21
+ "required": [
22
+ "status"
23
+ ],
14
24
  "additionalProperties": false
15
25
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "status": {
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Created",
11
+ "Confirmed",
12
+ "Cancelled"
13
+ ]
14
+ }
15
+ }
16
+ },
17
+ "required": [
18
+ "value"
19
+ ]
20
+ },
21
+ "required": [
22
+ "status"
23
+ ],
24
+ "additionalProperties": false
25
+ }
@@ -18,10 +18,10 @@
18
18
  "type": "integer"
19
19
  },
20
20
  "channel": {
21
- "const": "telegramBot"
21
+ "const": "vkontakte"
22
22
  },
23
23
  "confirmed_channel": {
24
- "const": "telegramBot"
24
+ "const": "vkontakte"
25
25
  },
26
26
  "email": {
27
27
  "type": "string"
@@ -81,7 +81,7 @@
81
81
  "people_count",
82
82
  "channel",
83
83
  "confirmed_channel",
84
- "telegramBot",
84
+ "vkontakte",
85
85
  "is_alone",
86
86
  "is_birthday",
87
87
  "is_extensible",
@@ -106,10 +106,10 @@
106
106
  "type": "integer"
107
107
  },
108
108
  "channel": {
109
- "const": "vkontakte"
109
+ "const": "telegramBot"
110
110
  },
111
111
  "confirmed_channel": {
112
- "const": "vkontakte"
112
+ "const": "telegramBot"
113
113
  },
114
114
  "email": {
115
115
  "type": "string"
@@ -169,7 +169,7 @@
169
169
  "people_count",
170
170
  "channel",
171
171
  "confirmed_channel",
172
- "vkontakte",
172
+ "telegramBot",
173
173
  "is_alone",
174
174
  "is_birthday",
175
175
  "is_extensible",
package/source/index.js CHANGED
@@ -23,10 +23,16 @@ import PATCH_games_status_admin from './contracts/PATCH/games/status/admin.json'
23
23
  import PATCH_games_status_organizer from './contracts/PATCH/games/status/organizer.json' with { type: 'json' }
24
24
  import PATCH_registration_admin from './contracts/PATCH/registration/admin.json' with { type: 'json' }
25
25
  import PATCH_registration_organizer from './contracts/PATCH/registration/organizer.json' with { type: 'json' }
26
+ import PATCH_registration_Service from './contracts/PATCH/registration/Service.json' with { type: 'json' }
26
27
  import PATCH_registration_Unknown from './contracts/PATCH/registration/Unknown.json' with { type: 'json' }
27
28
  import PATCH_registration_status_admin from './contracts/PATCH/registration/status/admin.json' with { type: 'json' }
29
+ import PATCH_registration_status_organizer from './contracts/PATCH/registration/status/organizer.json' with { type: 'json' }
30
+ import PATCH_registration_status_Service from './contracts/PATCH/registration/status/Service.json' with { type: 'json' }
28
31
  import PATCH_registration_lineup_admin from './contracts/PATCH/registration/lineup/admin.json' with { type: 'json' }
32
+ import PATCH_registration_lineup_organizer from './contracts/PATCH/registration/lineup/organizer.json' with { type: 'json' }
29
33
  import PATCH_registration_channel_admin from './contracts/PATCH/registration/channel/admin.json' with { type: 'json' }
34
+ import PATCH_registration_channel_organizer from './contracts/PATCH/registration/channel/organizer.json' with { type: 'json' }
35
+ import PATCH_registration_channel_Service from './contracts/PATCH/registration/channel/Service.json' with { type: 'json' }
30
36
  import PATCH_registration_channel_Unknown from './contracts/PATCH/registration/channel/Unknown.json' with { type: 'json' }
31
37
  import POST_user_admin from './contracts/POST/user/admin.json' with { type: 'json' }
32
38
  import POST_user_password_admin from './contracts/POST/user/password/admin.json' with { type: 'json' }
@@ -77,10 +83,16 @@ export const Contracts = Object.freeze(
77
83
  'PATCH/games/status/organizer',
78
84
  'PATCH/registration/admin',
79
85
  'PATCH/registration/organizer',
86
+ 'PATCH/registration/Service',
80
87
  'PATCH/registration/Unknown',
81
88
  'PATCH/registration/status/admin',
89
+ 'PATCH/registration/status/organizer',
90
+ 'PATCH/registration/status/Service',
82
91
  'PATCH/registration/lineup/admin',
92
+ 'PATCH/registration/lineup/organizer',
83
93
  'PATCH/registration/channel/admin',
94
+ 'PATCH/registration/channel/organizer',
95
+ 'PATCH/registration/channel/Service',
84
96
  'PATCH/registration/channel/Unknown',
85
97
  'POST/user/admin',
86
98
  'POST/user/password/admin',
@@ -133,10 +145,16 @@ export const Schemas = Object.freeze(
133
145
  PATCH_games_status_organizer,
134
146
  PATCH_registration_admin,
135
147
  PATCH_registration_organizer,
148
+ PATCH_registration_Service,
136
149
  PATCH_registration_Unknown,
137
150
  PATCH_registration_status_admin,
151
+ PATCH_registration_status_organizer,
152
+ PATCH_registration_status_Service,
138
153
  PATCH_registration_lineup_admin,
154
+ PATCH_registration_lineup_organizer,
139
155
  PATCH_registration_channel_admin,
156
+ PATCH_registration_channel_organizer,
157
+ PATCH_registration_channel_Service,
140
158
  PATCH_registration_channel_Unknown,
141
159
  POST_user_admin,
142
160
  POST_user_password_admin,
@@ -189,10 +207,16 @@ export const ContractSchema = Object.freeze(
189
207
  'PATCH/games/status/organizer': PATCH_games_status_organizer,
190
208
  'PATCH/registration/admin': PATCH_registration_admin,
191
209
  'PATCH/registration/organizer': PATCH_registration_organizer,
210
+ 'PATCH/registration/Service': PATCH_registration_Service,
192
211
  'PATCH/registration/Unknown': PATCH_registration_Unknown,
193
212
  'PATCH/registration/status/admin': PATCH_registration_status_admin,
213
+ 'PATCH/registration/status/organizer': PATCH_registration_status_organizer,
214
+ 'PATCH/registration/status/Service': PATCH_registration_status_Service,
194
215
  'PATCH/registration/lineup/admin': PATCH_registration_lineup_admin,
216
+ 'PATCH/registration/lineup/organizer': PATCH_registration_lineup_organizer,
195
217
  'PATCH/registration/channel/admin': PATCH_registration_channel_admin,
218
+ 'PATCH/registration/channel/organizer': PATCH_registration_channel_organizer,
219
+ 'PATCH/registration/channel/Service': PATCH_registration_channel_Service,
196
220
  'PATCH/registration/channel/Unknown': PATCH_registration_channel_Unknown,
197
221
  'POST/user/admin': POST_user_admin,
198
222
  'POST/user/password/admin': POST_user_password_admin,
@@ -1,19 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "is_alone": {
5
- "type": "boolean"
6
- },
7
- "is_birthday": {
8
- "type": "boolean"
9
- },
10
- "is_extensible": {
11
- "type": "boolean"
12
- },
13
- "is_first": {
14
- "type": "boolean"
15
- }
16
- },
17
- "required": [],
18
- "additionalProperties": false
19
- }