UNPKG

3.28 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 { "pattern": "^tbits\\/\\d+\\/\\d+$"}
72 ]
73 },
74 "alias": {
75 "type": "string",
76 "pattern": "^[a-zA-Z0-9\\-\\.\\_]{3,20}$"
77 },
78 "totp": {
79 "type": "string",
80 "minLength": 6,
81 "maxLength": 36
82 },
83 "mfa-secret": {
84 "type": "string",
85 "minLength": 32,
86 "maxLength": 64,
87 "pattern": "^([A-Z2-7]{2}){16,32}$"
88 },
89 "metadata": {
90 "type": "object",
91 "minProperties": 1,
92 "properties": {
93 "$set": {
94 "type": "object",
95 "minProperties": 1,
96 "additionalProperties": {
97 "oneOf": [
98 {
99 "type": "string",
100 "minLength": 1
101 },
102 {
103 "type": "array"
104 },
105 {
106 "type": "object"
107 },
108 {
109 "type": "boolean"
110 },
111 {
112 "type": "number"
113 }
114 ]
115 }
116 },
117 "$remove": {
118 "type": "array",
119 "items": {
120 "type": "string",
121 "minLength": 1
122 },
123 "minItems": 1
124 },
125 "$incr": {
126 "type": "object",
127 "minProperties": 1,
128 "additionalProperties": {
129 "type": "integer"
130 }
131 }
132 }
133 },
134 "organizationMember": {
135 "type": "object",
136 "properties": {
137 "email": {
138 "type": "string"
139 },
140 "firstName": {
141 "type": "string"
142 },
143 "lastName": {
144 "type": "string"
145 },
146 "permissions": {
147 "type": "array"
148 }
149 }
150 }
151 }
152}