@shakerquiz/contracts 0.0.28 → 0.0.30

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.28",
4
+ "version": "0.0.30",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -1,8 +1,12 @@
1
1
  {
2
- "types": "array",
2
+ "type": "array",
3
3
  "items": {
4
4
  "type": "object",
5
5
  "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid"
9
+ },
6
10
  "location_id": {
7
11
  "type": "string",
8
12
  "format": "uuid"
@@ -27,7 +31,9 @@
27
31
  "type": "string"
28
32
  }
29
33
  },
30
- "required": [],
34
+ "required": [
35
+ "id"
36
+ ],
31
37
  "additionalProperties": false
32
38
  },
33
39
  "uniqueItems": true
@@ -0,0 +1,24 @@
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
+ "Active",
14
+ "Archive"
15
+ ]
16
+ }
17
+ },
18
+ "required": [
19
+ "id"
20
+ ],
21
+ "additionalProperties": false
22
+ },
23
+ "uniqueItems": true
24
+ }
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
- "id": {
5
- "type": "string",
6
- "format": "uuid"
4
+ "role": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "format": "uuid"
10
+ }
11
+ },
12
+ "required": [
13
+ "id"
14
+ ]
7
15
  }
8
16
  },
9
17
  "required": [
10
- "id"
18
+ "role"
11
19
  ],
12
20
  "additionalProperties": false
13
21
  }
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
- "id": {
5
- "type": "string",
6
- "format": "uuid"
4
+ "role": {
5
+ "type": "object",
6
+ "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "format": "uuid"
10
+ }
11
+ },
12
+ "required": [
13
+ "id"
14
+ ]
7
15
  }
8
16
  },
9
17
  "required": [
10
- "id"
18
+ "role"
11
19
  ],
12
20
  "additionalProperties": false
13
21
  }
package/source/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import DELETE_city_vk_group_token_admin from './contracts/DELETE/city/vk_group_token/admin.json' with { type: 'json' }
2
2
  import DELETE_user_cities_admin from './contracts/DELETE/user/cities/admin.json' with { type: 'json' }
3
3
  import DELETE_user_password_admin from './contracts/DELETE/user/password/admin.json' with { type: 'json' }
4
- import DELETE_user_role_admin from './contracts/DELETE/user/role/admin.json' with { type: 'json' }
5
4
  import PATCH_city_admin from './contracts/PATCH/city/admin.json' with { type: 'json' }
6
5
  import PATCH_city_country_admin from './contracts/PATCH/city/country/admin.json' with { type: 'json' }
7
6
  import PATCH_city_currency_admin from './contracts/PATCH/city/currency/admin.json' with { type: 'json' }
@@ -13,6 +12,7 @@ import PATCH_registration_admin from './contracts/PATCH/registration/admin.json'
13
12
  import PATCH_registration_Unknown from './contracts/PATCH/registration/Unknown.json' with { type: 'json' }
14
13
  import PATCH_registration_channel_Unknown from './contracts/PATCH/registration/channel/Unknown.json' with { type: 'json' }
15
14
  import PATCH_theme_admin from './contracts/PATCH/theme/admin.json' with { type: 'json' }
15
+ import PATCH_themes_admin from './contracts/PATCH/themes/admin.json' with { type: 'json' }
16
16
  import PATCH_user_admin from './contracts/PATCH/user/admin.json' with { type: 'json' }
17
17
  import PATCH_user_password_admin from './contracts/PATCH/user/password/admin.json' with { type: 'json' }
18
18
  import PATCH_user_role_admin from './contracts/PATCH/user/role/admin.json' with { type: 'json' }
@@ -38,7 +38,6 @@ export const Contracts = Object.freeze(
38
38
  'DELETE/city/vk_group_token/admin',
39
39
  'DELETE/user/cities/admin',
40
40
  'DELETE/user/password/admin',
41
- 'DELETE/user/role/admin',
42
41
  'PATCH/city/admin',
43
42
  'PATCH/city/country/admin',
44
43
  'PATCH/city/currency/admin',
@@ -50,6 +49,7 @@ export const Contracts = Object.freeze(
50
49
  'PATCH/registration/Unknown',
51
50
  'PATCH/registration/channel/Unknown',
52
51
  'PATCH/theme/admin',
52
+ 'PATCH/themes/admin',
53
53
  'PATCH/user/admin',
54
54
  'PATCH/user/password/admin',
55
55
  'PATCH/user/role/admin',
@@ -77,7 +77,6 @@ export const Schemas = Object.freeze(
77
77
  DELETE_city_vk_group_token_admin,
78
78
  DELETE_user_cities_admin,
79
79
  DELETE_user_password_admin,
80
- DELETE_user_role_admin,
81
80
  PATCH_city_admin,
82
81
  PATCH_city_country_admin,
83
82
  PATCH_city_currency_admin,
@@ -89,6 +88,7 @@ export const Schemas = Object.freeze(
89
88
  PATCH_registration_Unknown,
90
89
  PATCH_registration_channel_Unknown,
91
90
  PATCH_theme_admin,
91
+ PATCH_themes_admin,
92
92
  PATCH_user_admin,
93
93
  PATCH_user_password_admin,
94
94
  PATCH_user_role_admin,
@@ -116,7 +116,6 @@ export const ContractSchema = Object.freeze(
116
116
  'DELETE/city/vk_group_token/admin': DELETE_city_vk_group_token_admin,
117
117
  'DELETE/user/cities/admin': DELETE_user_cities_admin,
118
118
  'DELETE/user/password/admin': DELETE_user_password_admin,
119
- 'DELETE/user/role/admin': DELETE_user_role_admin,
120
119
  'PATCH/city/admin': PATCH_city_admin,
121
120
  'PATCH/city/country/admin': PATCH_city_country_admin,
122
121
  'PATCH/city/currency/admin': PATCH_city_currency_admin,
@@ -128,6 +127,7 @@ export const ContractSchema = Object.freeze(
128
127
  'PATCH/registration/Unknown': PATCH_registration_Unknown,
129
128
  'PATCH/registration/channel/Unknown': PATCH_registration_channel_Unknown,
130
129
  'PATCH/theme/admin': PATCH_theme_admin,
130
+ 'PATCH/themes/admin': PATCH_themes_admin,
131
131
  'PATCH/user/admin': PATCH_user_admin,
132
132
  'PATCH/user/password/admin': PATCH_user_password_admin,
133
133
  'PATCH/user/role/admin': PATCH_user_role_admin,
@@ -1,6 +0,0 @@
1
- {
2
- "type": "object",
3
- "properties": {},
4
- "required": [],
5
- "additionalProperties": false
6
- }