File size: 1,044 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
export const idSchema = {
	type: [ 'integer', 'null' ],
	minimum: 0,
};

export const capabilitiesSchema = {
	type: 'object',
	additionalProperties: false,
	patternProperties: {
		'^\\d+$': {
			type: 'object',
			properties: {
				edit_pages: { type: 'boolean' },
				edit_posts: { type: 'boolean' },
				edit_others_posts: { type: 'boolean' },
				edit_others_pages: { type: 'boolean' },
				delete_posts: { type: 'boolean' },
				delete_others_posts: { type: 'boolean' },
				edit_theme_options: { type: 'boolean' },
				edit_users: { type: 'boolean' },
				list_users: { type: 'boolean' },
				manage_categories: { type: 'boolean' },
				manage_options: { type: 'boolean' },
				promote_users: { type: 'boolean' },
				publish_posts: { type: 'boolean' },
				upload_files: { type: 'boolean' },
				delete_users: { type: 'boolean' },
				remove_users: { type: 'boolean' },
				view_stats: { type: 'boolean' },
			},
		},
	},
};

export const flagsSchema = {
	type: 'array',
};

export const lasagnaSchema = {
	type: [ 'string', 'null' ],
};