@shakerquiz/contracts 0.0.86 → 0.0.88

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.86",
4
+ "version": "0.0.88",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -16,10 +16,20 @@
16
16
  "type": "integer"
17
17
  },
18
18
  "channel": {
19
- "type": "string"
19
+ "type": "string",
20
+ "enum": [
21
+ "vkontakte",
22
+ "telegramBot",
23
+ "email"
24
+ ]
20
25
  },
21
26
  "confirmed_channel": {
22
- "type": "string"
27
+ "type": "string",
28
+ "enum": [
29
+ "vkontakte",
30
+ "telegramBot",
31
+ "email"
32
+ ]
23
33
  },
24
34
  "email": {
25
35
  "type": "string"
@@ -82,38 +92,36 @@
82
92
  "is_first"
83
93
  ],
84
94
  "additionalProperties": false,
85
- "oneOf": [
95
+ "allOf": [
86
96
  {
87
- "properties": {
88
- "channel": {
89
- "const": "vkontakte"
97
+ "if": {
98
+ "properties": {
99
+ "channel": { "const": "vkontakte" }
90
100
  }
91
101
  },
92
- "required": [
93
- "confirmed_channel",
94
- "vkontakte"
95
- ]
102
+ "then": {
103
+ "required": ["vkontakte", "confirmed_channel"]
104
+ }
96
105
  },
97
106
  {
98
- "properties": {
99
- "channel": {
100
- "const": "telegramBot"
107
+ "if": {
108
+ "properties": {
109
+ "channel": { "const": "telegramBot" }
101
110
  }
102
111
  },
103
- "required": [
104
- "confirmed_channel",
105
- "telegramBot"
106
- ]
112
+ "then": {
113
+ "required": ["telegramBot", "confirmed_channel"]
114
+ }
107
115
  },
108
116
  {
109
- "properties": {
110
- "channel": {
111
- "const": "email"
117
+ "if": {
118
+ "properties": {
119
+ "channel": { "const": "email" }
112
120
  }
113
121
  },
114
- "required": [
115
- "email"
116
- ]
122
+ "then": {
123
+ "required": ["email"]
124
+ }
117
125
  }
118
126
  ]
119
- }
127
+ }