@shakerquiz/contracts 0.0.0

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.
Files changed (47) hide show
  1. package/dprint.json +24 -0
  2. package/generate.js +57 -0
  3. package/jsconfig.json +18 -0
  4. package/package.json +23 -0
  5. package/source/contracts/PATCH/city/admin.json +126 -0
  6. package/source/contracts/PATCH/city/currency/admin.json +173 -0
  7. package/source/contracts/PATCH/city/timezone/admin.json +501 -0
  8. package/source/contracts/PATCH/game/admin.json +30 -0
  9. package/source/contracts/PATCH/game/organizer.json +30 -0
  10. package/source/contracts/PATCH/games/admin.json +34 -0
  11. package/source/contracts/PATCH/games/organizer.json +34 -0
  12. package/source/contracts/PATCH/registration/Unknown.json +10 -0
  13. package/source/contracts/PATCH/registration/admin.json +43 -0
  14. package/source/contracts/PATCH/registration/cancellation/Unknown.json +12 -0
  15. package/source/contracts/PATCH/registration/channel/Unknown.json +22 -0
  16. package/source/contracts/PATCH/registration/confirmation/Unknown.json +12 -0
  17. package/source/contracts/PATCH/registration/organizer.json +43 -0
  18. package/source/contracts/PATCH/theme/admin.json +19 -0
  19. package/source/contracts/PATCH/user/admin.json +30 -0
  20. package/source/contracts/PATCH/user/cities/admin.json +17 -0
  21. package/source/contracts/PATCH/user/password/admin.json +12 -0
  22. package/source/contracts/PATCH/user/role/admin.json +13 -0
  23. package/source/contracts/PATCH/users/cities/admin.json +19 -0
  24. package/source/contracts/PATCH/users/role/admin.json +19 -0
  25. package/source/contracts/PATCH/venue/admin.json +44 -0
  26. package/source/contracts/PATCH/venue/organizer.json +44 -0
  27. package/source/contracts/POST/checkin/Unknown.json +16 -0
  28. package/source/contracts/POST/city/admin.json +696 -0
  29. package/source/contracts/POST/cover/admin.json +24 -0
  30. package/source/contracts/POST/game/admin.json +27 -0
  31. package/source/contracts/POST/game/organizer.json +27 -0
  32. package/source/contracts/POST/game/registrations/export/admin.json +17 -0
  33. package/source/contracts/POST/game/registrations/export/organizer.json +17 -0
  34. package/source/contracts/POST/registration/Unknown.json +125 -0
  35. package/source/contracts/POST/registration/mailing/admin.json +16 -0
  36. package/source/contracts/POST/registration/mailing/organizer.json +16 -0
  37. package/source/contracts/POST/registrations/export/admin.json +17 -0
  38. package/source/contracts/POST/registrations/export/organizer.json +17 -0
  39. package/source/contracts/POST/theme/admin.json +24 -0
  40. package/source/contracts/POST/user/admin.json +12 -0
  41. package/source/contracts/POST/user/cities/admin.json +17 -0
  42. package/source/contracts/POST/user/password/admin.json +12 -0
  43. package/source/contracts/POST/user/role/admin.json +13 -0
  44. package/source/contracts/POST/venue/admin.json +38 -0
  45. package/source/contracts/POST/venue/organizer.json +38 -0
  46. package/source/contracts/PUT/cover/admin.json +13 -0
  47. package/source/index.js +83 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "theme_id": {
5
+ "type": "string",
6
+ "format": "uuid"
7
+ },
8
+ "cover": {
9
+ "type": "string",
10
+ "format": "base64"
11
+ },
12
+ "name": {
13
+ "type": "string"
14
+ },
15
+ "type": {
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "theme_id",
21
+ "cover"
22
+ ],
23
+ "additionalProperties": false
24
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "location_id": {
5
+ "type": "string",
6
+ "format": "uuid"
7
+ },
8
+ "theme_id": {
9
+ "type": "string",
10
+ "format": "uuid"
11
+ },
12
+ "number": {
13
+ "type": "string"
14
+ },
15
+ "event_time": {
16
+ "type": "string",
17
+ "format": "iso-date-time"
18
+ }
19
+ },
20
+ "required": [
21
+ "location_id",
22
+ "theme_id",
23
+ "number",
24
+ "event_time"
25
+ ],
26
+ "additionalProperties": false
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "location_id": {
5
+ "type": "string",
6
+ "format": "uuid"
7
+ },
8
+ "theme_id": {
9
+ "type": "string",
10
+ "format": "uuid"
11
+ },
12
+ "number": {
13
+ "type": "string"
14
+ },
15
+ "event_time": {
16
+ "type": "string",
17
+ "format": "iso-date-time"
18
+ }
19
+ },
20
+ "required": [
21
+ "location_id",
22
+ "theme_id",
23
+ "number",
24
+ "event_time"
25
+ ],
26
+ "additionalProperties": false
27
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ }
10
+ },
11
+ "required": [
12
+ "id"
13
+ ],
14
+ "additionalProperties": false
15
+ },
16
+ "uniqueItems": true
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ }
10
+ },
11
+ "required": [
12
+ "id"
13
+ ],
14
+ "additionalProperties": false
15
+ },
16
+ "uniqueItems": true
17
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "ads_from": {
5
+ "type": "string"
6
+ },
7
+ "channel": {
8
+ "type": "string"
9
+ },
10
+ "confirmed_channel": {
11
+ "type": "string"
12
+ },
13
+ "comment": {
14
+ "type": "string"
15
+ },
16
+ "email": {
17
+ "type": "string"
18
+ },
19
+ "event_id": {
20
+ "type": "string",
21
+ "format": "uuid"
22
+ },
23
+ "human_name": {
24
+ "type": "string"
25
+ },
26
+ "is_alone": {
27
+ "type": "boolean"
28
+ },
29
+ "is_birthday": {
30
+ "type": "boolean"
31
+ },
32
+ "is_extensible": {
33
+ "type": "boolean"
34
+ },
35
+ "is_first": {
36
+ "type": "boolean"
37
+ },
38
+ "people_count": {
39
+ "type": "integer"
40
+ },
41
+ "phone": {
42
+ "type": "string"
43
+ },
44
+ "promocode": {
45
+ "type": "string"
46
+ },
47
+ "team_name": {
48
+ "type": "string"
49
+ },
50
+ "telegramBot": {
51
+ "type": "string"
52
+ },
53
+ "utm_campaign": {
54
+ "type": "string"
55
+ },
56
+ "utm_content": {
57
+ "type": "string"
58
+ },
59
+ "utm_medium": {
60
+ "type": "string"
61
+ },
62
+ "utm_source": {
63
+ "type": "string"
64
+ },
65
+ "utm_term": {
66
+ "type": "string"
67
+ },
68
+ "vkontakte": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "required": [
73
+ "event_id",
74
+ "human_name",
75
+ "is_alone",
76
+ "is_birthday",
77
+ "is_extensible",
78
+ "is_first",
79
+ "people_count",
80
+ "team_name",
81
+ "channel",
82
+ "email"
83
+ ],
84
+ "additionalProperties": false,
85
+ "allOf": [
86
+ {
87
+ "if": {
88
+ "properties": {
89
+ "channel": {
90
+ "const": "telegramBot"
91
+ }
92
+ },
93
+ "required": [
94
+ "channel"
95
+ ]
96
+ },
97
+ "then": {
98
+ "required": [
99
+ "channel",
100
+ "confirmed_channel",
101
+ "telegramBot"
102
+ ]
103
+ }
104
+ },
105
+ {
106
+ "if": {
107
+ "properties": {
108
+ "channel": {
109
+ "const": "vkontakte"
110
+ }
111
+ },
112
+ "required": [
113
+ "channel"
114
+ ]
115
+ },
116
+ "then": {
117
+ "required": [
118
+ "channel",
119
+ "confirmed_channel",
120
+ "vkontakte"
121
+ ]
122
+ }
123
+ }
124
+ ]
125
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "template": {
5
+ "type": "string"
6
+ },
7
+ "text": {
8
+ "type": "string"
9
+ }
10
+ },
11
+ "required": [
12
+ "template",
13
+ "text"
14
+ ],
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "template": {
5
+ "type": "string"
6
+ },
7
+ "text": {
8
+ "type": "string"
9
+ }
10
+ },
11
+ "required": [
12
+ "template",
13
+ "text"
14
+ ],
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ }
10
+ },
11
+ "required": [
12
+ "id"
13
+ ],
14
+ "additionalProperties": false
15
+ },
16
+ "uniqueItems": true
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ }
10
+ },
11
+ "required": [
12
+ "id"
13
+ ],
14
+ "additionalProperties": false
15
+ },
16
+ "uniqueItems": true
17
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string"
6
+ },
7
+ "short_description": {
8
+ "type": "string"
9
+ },
10
+ "description": {
11
+ "type": "string"
12
+ },
13
+ "alias": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "name",
19
+ "short_description",
20
+ "description",
21
+ "alias"
22
+ ],
23
+ "additionalProperties": false
24
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "email": {
5
+ "type": "string"
6
+ }
7
+ },
8
+ "required": [
9
+ "email"
10
+ ],
11
+ "additionalProperties": false
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "array",
3
+ "items": {
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ }
10
+ },
11
+ "required": [
12
+ "id"
13
+ ],
14
+ "additionalProperties": false
15
+ },
16
+ "uniqueItems": true
17
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "password": {
5
+ "type": "string"
6
+ }
7
+ },
8
+ "required": [
9
+ "password"
10
+ ],
11
+ "additionalProperties": false
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "id": {
5
+ "type": "string",
6
+ "format": "uuid"
7
+ }
8
+ },
9
+ "required": [
10
+ "id"
11
+ ],
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string"
6
+ },
7
+ "street": {
8
+ "type": "string"
9
+ },
10
+ "house_number": {
11
+ "type": "string"
12
+ },
13
+ "people_capacity": {
14
+ "type": "integer"
15
+ },
16
+ "team_capacity": {
17
+ "type": "integer"
18
+ },
19
+ "game_time": {
20
+ "type": "string",
21
+ "format": "iso-time"
22
+ },
23
+ "city_id": {
24
+ "type": "string",
25
+ "format": "uuid"
26
+ }
27
+ },
28
+ "required": [
29
+ "name",
30
+ "street",
31
+ "house_number",
32
+ "people_capacity",
33
+ "team_capacity",
34
+ "game_time",
35
+ "city_id"
36
+ ],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string"
6
+ },
7
+ "street": {
8
+ "type": "string"
9
+ },
10
+ "house_number": {
11
+ "type": "string"
12
+ },
13
+ "people_capacity": {
14
+ "type": "integer"
15
+ },
16
+ "team_capacity": {
17
+ "type": "integer"
18
+ },
19
+ "game_time": {
20
+ "type": "string",
21
+ "format": "iso-time"
22
+ },
23
+ "city_id": {
24
+ "type": "string",
25
+ "format": "uuid"
26
+ }
27
+ },
28
+ "required": [
29
+ "name",
30
+ "street",
31
+ "house_number",
32
+ "people_capacity",
33
+ "team_capacity",
34
+ "game_time",
35
+ "city_id"
36
+ ],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "cover": {
5
+ "type": "string",
6
+ "format": "base64"
7
+ }
8
+ },
9
+ "required": [
10
+ "cover"
11
+ ],
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,83 @@
1
+ import POST_checkin_Unknown from'./contracts/POST/checkin/Unknown.json' with { type: 'json' }
2
+ import POST_city_admin from'./contracts/POST/city/admin.json' with { type: 'json' }
3
+ import POST_game_admin from'./contracts/POST/game/admin.json' with { type: 'json' }
4
+ import POST_game_organizer from'./contracts/POST/game/organizer.json' with { type: 'json' }
5
+ import POST_game_registrations_export_admin from'./contracts/POST/game/registrations/export/admin.json' with { type: 'json' }
6
+ import POST_game_registrations_export_organizer from'./contracts/POST/game/registrations/export/organizer.json' with { type: 'json' }
7
+ import POST_registration_Unknown from'./contracts/POST/registration/Unknown.json' with { type: 'json' }
8
+ import POST_registration_mailing_admin from'./contracts/POST/registration/mailing/admin.json' with { type: 'json' }
9
+ import POST_registration_mailing_organizer from'./contracts/POST/registration/mailing/organizer.json' with { type: 'json' }
10
+ import POST_registrations_export_admin from'./contracts/POST/registrations/export/admin.json' with { type: 'json' }
11
+ import POST_registrations_export_organizer from'./contracts/POST/registrations/export/organizer.json' with { type: 'json' }
12
+ import POST_theme_admin from'./contracts/POST/theme/admin.json' with { type: 'json' }
13
+ import POST_user_admin from'./contracts/POST/user/admin.json' with { type: 'json' }
14
+ import POST_user_cities_admin from'./contracts/POST/user/cities/admin.json' with { type: 'json' }
15
+ import POST_user_password_admin from'./contracts/POST/user/password/admin.json' with { type: 'json' }
16
+ import POST_user_role_admin from'./contracts/POST/user/role/admin.json' with { type: 'json' }
17
+ import POST_venue_admin from'./contracts/POST/venue/admin.json' with { type: 'json' }
18
+ import POST_venue_organizer from'./contracts/POST/venue/organizer.json' with { type: 'json' }
19
+ import PATCH_city_admin from'./contracts/PATCH/city/admin.json' with { type: 'json' }
20
+ import PATCH_city_currency_admin from'./contracts/PATCH/city/currency/admin.json' with { type: 'json' }
21
+ import PATCH_city_timezone_admin from'./contracts/PATCH/city/timezone/admin.json' with { type: 'json' }
22
+ import PATCH_game_admin from'./contracts/PATCH/game/admin.json' with { type: 'json' }
23
+ import PATCH_game_organizer from'./contracts/PATCH/game/organizer.json' with { type: 'json' }
24
+ import PATCH_games_admin from'./contracts/PATCH/games/admin.json' with { type: 'json' }
25
+ import PATCH_games_organizer from'./contracts/PATCH/games/organizer.json' with { type: 'json' }
26
+ import PATCH_registration_admin from'./contracts/PATCH/registration/admin.json' with { type: 'json' }
27
+ import PATCH_registration_organizer from'./contracts/PATCH/registration/organizer.json' with { type: 'json' }
28
+ import PATCH_registration_Unknown from'./contracts/PATCH/registration/Unknown.json' with { type: 'json' }
29
+ import PATCH_registration_cancellation_Unknown from'./contracts/PATCH/registration/cancellation/Unknown.json' with { type: 'json' }
30
+ import PATCH_registration_channel_Unknown from'./contracts/PATCH/registration/channel/Unknown.json' with { type: 'json' }
31
+ import PATCH_registration_confirmation_Unknown from'./contracts/PATCH/registration/confirmation/Unknown.json' with { type: 'json' }
32
+ import PATCH_theme_admin from'./contracts/PATCH/theme/admin.json' with { type: 'json' }
33
+ import PATCH_user_admin from'./contracts/PATCH/user/admin.json' with { type: 'json' }
34
+ import PATCH_user_cities_admin from'./contracts/PATCH/user/cities/admin.json' with { type: 'json' }
35
+ import PATCH_user_password_admin from'./contracts/PATCH/user/password/admin.json' with { type: 'json' }
36
+ import PATCH_user_role_admin from'./contracts/PATCH/user/role/admin.json' with { type: 'json' }
37
+ import PATCH_users_cities_admin from'./contracts/PATCH/users/cities/admin.json' with { type: 'json' }
38
+ import PATCH_users_role_admin from'./contracts/PATCH/users/role/admin.json' with { type: 'json' }
39
+ import PATCH_venue_admin from'./contracts/PATCH/venue/admin.json' with { type: 'json' }
40
+ import PATCH_venue_organizer from'./contracts/PATCH/venue/organizer.json' with { type: 'json' }
41
+
42
+ export const Schema = Object.freeze({
43
+ 'POST/checkin/Unknown': POST_checkin_Unknown,
44
+ 'POST/city/admin': POST_city_admin,
45
+ 'POST/game/admin': POST_game_admin,
46
+ 'POST/game/organizer': POST_game_organizer,
47
+ 'POST/game/registrations/export/admin': POST_game_registrations_export_admin,
48
+ 'POST/game/registrations/export/organizer': POST_game_registrations_export_organizer,
49
+ 'POST/registration/Unknown': POST_registration_Unknown,
50
+ 'POST/registration/mailing/admin': POST_registration_mailing_admin,
51
+ 'POST/registration/mailing/organizer': POST_registration_mailing_organizer,
52
+ 'POST/registrations/export/admin': POST_registrations_export_admin,
53
+ 'POST/registrations/export/organizer': POST_registrations_export_organizer,
54
+ 'POST/theme/admin': POST_theme_admin,
55
+ 'POST/user/admin': POST_user_admin,
56
+ 'POST/user/cities/admin': POST_user_cities_admin,
57
+ 'POST/user/password/admin': POST_user_password_admin,
58
+ 'POST/user/role/admin': POST_user_role_admin,
59
+ 'POST/venue/admin': POST_venue_admin,
60
+ 'POST/venue/organizer': POST_venue_organizer,
61
+ 'PATCH/city/admin': PATCH_city_admin,
62
+ 'PATCH/city/currency/admin': PATCH_city_currency_admin,
63
+ 'PATCH/city/timezone/admin': PATCH_city_timezone_admin,
64
+ 'PATCH/game/admin': PATCH_game_admin,
65
+ 'PATCH/game/organizer': PATCH_game_organizer,
66
+ 'PATCH/games/admin': PATCH_games_admin,
67
+ 'PATCH/games/organizer': PATCH_games_organizer,
68
+ 'PATCH/registration/admin': PATCH_registration_admin,
69
+ 'PATCH/registration/organizer': PATCH_registration_organizer,
70
+ 'PATCH/registration/Unknown': PATCH_registration_Unknown,
71
+ 'PATCH/registration/cancellation/Unknown': PATCH_registration_cancellation_Unknown,
72
+ 'PATCH/registration/channel/Unknown': PATCH_registration_channel_Unknown,
73
+ 'PATCH/registration/confirmation/Unknown': PATCH_registration_confirmation_Unknown,
74
+ 'PATCH/theme/admin': PATCH_theme_admin,
75
+ 'PATCH/user/admin': PATCH_user_admin,
76
+ 'PATCH/user/cities/admin': PATCH_user_cities_admin,
77
+ 'PATCH/user/password/admin': PATCH_user_password_admin,
78
+ 'PATCH/user/role/admin': PATCH_user_role_admin,
79
+ 'PATCH/users/cities/admin': PATCH_users_cities_admin,
80
+ 'PATCH/users/role/admin': PATCH_users_role_admin,
81
+ 'PATCH/venue/admin': PATCH_venue_admin,
82
+ 'PATCH/venue/organizer': PATCH_venue_organizer,
83
+ })