UNPKG

3.32 kBJSONView Raw
1{
2 "$id": "common.json",
3 "definitions": {
4 "uuid-v4": {
5 "type": "string",
6 "format": "uuid"
7 },
8 "filter": {
9 "type": "object",
10 "properties": {
11 "#multi": {
12 "type": "object",
13 "required": ["fields", "match"],
14 "properties": {
15 "fields": {
16 "type": "array",
17 "minItems": 1,
18 "items": {
19 "type": "string",
20 "minLength": 1
21 }
22 },
23 "match": {
24 "type": "string",
25 "minLength": 1
26 }
27 }
28 }
29 },
30 "additionalProperties": {
31 "oneOf": [
32 {
33 "type": "string",
34 "minLength": 1
35 },
36 {
37 "type": "object",
38 "minProperties": 1,
39 "maxProperties": 2,
40 "patternProperties": {
41 "^(ne|eq|match)$": {
42 "type": "string",
43 "minLength": 1
44 },
45 "^(gte|lte)$": {
46 "type": "number"
47 },
48 "^(exists|isempty)$": {
49 "type": "boolean",
50 "const": true
51 }
52 }
53 }
54 ]
55 }
56 },
57 "challengeType": {
58 "description": "Challenge type",
59 "enum": [
60 "email",
61 "phone"
62 ],
63 "type": "string"
64 },
65 "userId": {
66 "type": "string",
67 "oneOf": [
68 { "format": "email" },
69 { "pattern": "^\\d+$" },
70 { "pattern": "^(fb|sso)/[\\d_]+$" }
71 ]
72 },
73 "alias": {
74 "type": "string",
75 "pattern": "^[a-zA-Z0-9\\-\\.\\_]{3,20}$"
76 },
77 "totp": {
78 "type": "string",
79 "minLength": 6,
80 "maxLength": 36
81 },
82 "mfa-secret": {
83 "type": "string",
84 "minLength": 32,
85 "maxLength": 64,
86 "pattern": "^([A-Z2-7]{2}){16,32}$"
87 },
88 "metadata": {
89 "type": "object",
90 "minProperties": 1,
91 "properties": {
92 "$set": {
93 "type": "object",
94 "minProperties": 1,
95 "additionalProperties": {
96 "oneOf": [
97 {
98 "type": "string",
99 "minLength": 1
100 },
101 {
102 "type": "array"
103 },
104 {
105 "type": "object"
106 },
107 {
108 "type": "boolean"
109 },
110 {
111 "type": "number"
112 }
113 ]
114 }
115 },
116 "$remove": {
117 "type": "array",
118 "items": {
119 "type": "string",
120 "minLength": 1
121 },
122 "minItems": 1
123 },
124 "$incr": {
125 "type": "object",
126 "minProperties": 1,
127 "additionalProperties": {
128 "type": "integer"
129 }
130 }
131 }
132 },
133 "organizationMember": {
134 "type": "object",
135 "required": [
136 "firstName",
137 "lastName",
138 "email"
139 ],
140 "properties": {
141 "email": {
142 "type": "string"
143 },
144 "firstName": {
145 "type": "string"
146 },
147 "lastName": {
148 "type": "string"
149 },
150 "permissions": {
151 "type": "array"
152 }
153 }
154 }
155 }
156}