accountSchemaV6 (experimental).js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. module.exports = {
  2. name: "Account",
  3. description: "Account schema",
  4. version: 6,
  5. fields: [
  6. {
  7. name: "Name",
  8. fieldId: "name",
  9. fieldTypes: [
  10. {
  11. type: "text",
  12. fill: true,
  13. fieldTypeId: "name"
  14. }
  15. ],
  16. minEntries: 1,
  17. maxEntries: 1
  18. },
  19. {
  20. name: "Domain",
  21. fieldId: "domain",
  22. fieldTypes: [
  23. {
  24. type: "text",
  25. fill: true,
  26. fieldTypeId: "domain",
  27. autosuggestGroup: "domain"
  28. }
  29. ],
  30. minEntries: 0,
  31. maxEntries: 10
  32. },
  33. {
  34. name: "App",
  35. fieldId: "app",
  36. fieldTypes: [
  37. {
  38. type: "select",
  39. options: [
  40. {
  41. value: "android",
  42. text: "Android"
  43. },
  44. {
  45. value: "ios",
  46. text: "iOS"
  47. },
  48. {
  49. value: "windows",
  50. text: "Windows"
  51. }
  52. ],
  53. fieldTypeId: "appType"
  54. },
  55. {
  56. type: "text",
  57. fill: true,
  58. fieldTypeId: "appName"
  59. }
  60. ],
  61. minEntries: 0,
  62. maxEntries: 10
  63. },
  64. {
  65. name: "Account exists",
  66. fieldId: "accountExists",
  67. fieldTypes: [
  68. {
  69. type: "checkbox",
  70. fieldTypeId: "accountExists"
  71. }
  72. ],
  73. minEntries: 0,
  74. maxEntries: 1
  75. },
  76. {
  77. name: "E-mail",
  78. fieldId: "email",
  79. fieldTypes: [
  80. {
  81. type: "text",
  82. fieldTypeId: "email",
  83. fill: true,
  84. autosuggestGroup: "email"
  85. }
  86. ],
  87. minEntries: 0,
  88. maxEntries: 10
  89. },
  90. {
  91. name: "Username",
  92. fieldId: "username",
  93. fieldTypes: [
  94. {
  95. type: "text",
  96. fieldTypeId: "username",
  97. fill: true,
  98. autosuggestGroup: "username"
  99. }
  100. ],
  101. minEntries: 0,
  102. maxEntries: 10
  103. },
  104. {
  105. name: "Login name",
  106. fieldId: "loginName",
  107. fieldTypes: [
  108. {
  109. type: "text",
  110. fieldTypeId: "loginName",
  111. fill: true
  112. }
  113. ],
  114. minEntries: 0,
  115. maxEntries: 10
  116. },
  117. {
  118. name: "Category",
  119. fieldId: "category",
  120. fieldTypes: [
  121. {
  122. type: "text",
  123. fieldTypeId: "category",
  124. fill: true
  125. }
  126. ],
  127. minEntries: 0,
  128. maxEntries: 10
  129. },
  130. {
  131. name: "Uses password",
  132. fieldId: "usesPassword",
  133. fieldTypes: [
  134. {
  135. type: "checkbox",
  136. fieldTypeId: "usesPassword"
  137. }
  138. ],
  139. minEntries: 0,
  140. maxEntries: 1
  141. },
  142. {
  143. name: "Password last changed",
  144. fieldId: "passwordLastChanged",
  145. fieldTypes: [
  146. {
  147. type: "text",
  148. fieldTypeId: "passwordLastChanged",
  149. fill: true
  150. }
  151. ],
  152. minEntries: 0,
  153. maxEntries: 1
  154. },
  155. {
  156. name: "2FA possible",
  157. fieldId: "twofaPossible",
  158. fieldTypes: [
  159. {
  160. type: "select",
  161. options: [
  162. {
  163. value: "otp",
  164. text: "OTP"
  165. },
  166. {
  167. value: "sms",
  168. text: "SMS"
  169. }
  170. ],
  171. fieldTypeId: "twofaPossibleType",
  172. fill: true
  173. }
  174. ],
  175. minEntries: 0,
  176. maxEntries: 10
  177. },
  178. {
  179. name: "2FA used",
  180. fieldId: "twofaUsed",
  181. fieldTypes: [
  182. {
  183. type: "select",
  184. options: [
  185. {
  186. value: "otp",
  187. text: "OTP"
  188. },
  189. {
  190. value: "sms",
  191. text: "SMS"
  192. }
  193. ],
  194. fieldTypeId: "twofaUsedType"
  195. },
  196. {
  197. type: "text",
  198. fieldTypeId: "twofaUsedValue",
  199. fill: true
  200. }
  201. ],
  202. minEntries: 0,
  203. maxEntries: 10
  204. },
  205. {
  206. name: "2FA recovery method",
  207. fieldId: "twofaRecovery",
  208. fieldTypes: [
  209. {
  210. type: "select",
  211. options: [
  212. {
  213. value: "backupCodes",
  214. text: "Backup codes"
  215. }
  216. ],
  217. fieldTypeId: "twofaRecoveryMethod"
  218. },
  219. {
  220. type: "text",
  221. fieldTypeId: "twofaRecoveryValue",
  222. fill: true
  223. }
  224. ],
  225. minEntries: 0,
  226. maxEntries: 10
  227. },
  228. {
  229. name: "Login service",
  230. fieldId: "loginService",
  231. fieldTypes: [
  232. {
  233. type: "text",
  234. fieldTypeId: "loginService",
  235. fill: true
  236. }
  237. ],
  238. minEntries: 0,
  239. maxEntries: 10
  240. },
  241. {
  242. name: "Service linked",
  243. fieldId: "serviceLinked",
  244. fieldTypes: [
  245. {
  246. type: "text",
  247. fieldTypeId: "serviceLinked",
  248. fill: true
  249. }
  250. ],
  251. minEntries: 0,
  252. maxEntries: 10
  253. },
  254. {
  255. name: "Uses security questions",
  256. fieldId: "usesSecurityQuestions",
  257. fieldTypes: [
  258. {
  259. type: "checkbox",
  260. fieldTypeId: "usesSecurityQuestions",
  261. fill: true
  262. }
  263. ],
  264. minEntries: 0,
  265. maxEntries: 1
  266. },
  267. {
  268. name: "Recovery e-mail",
  269. fieldId: "recoveryEmail",
  270. fieldTypes: [
  271. {
  272. type: "text",
  273. fieldTypeId: "recoveryEmail",
  274. fill: true,
  275. autosuggestGroup: "email"
  276. }
  277. ],
  278. minEntries: 0,
  279. maxEntries: 10
  280. },
  281. {
  282. name: "Recovery phone number",
  283. fieldId: "recoveryPhoneNumber",
  284. fieldTypes: [
  285. {
  286. type: "text",
  287. fieldTypeId: "recoveryPhoneNumber",
  288. fill: true
  289. }
  290. ],
  291. minEntries: 0,
  292. maxEntries: 10
  293. },
  294. {
  295. name: "Comments",
  296. fieldId: "comments",
  297. fieldTypes: [
  298. {
  299. type: "text",
  300. fieldTypeId: "comments",
  301. fill: true
  302. }
  303. ],
  304. minEntries: 0,
  305. maxEntries: 1
  306. },
  307. {
  308. name: "In 1password",
  309. fieldId: "in1password",
  310. fieldTypes: [
  311. {
  312. type: "checkbox",
  313. fieldTypeId: "in1password"
  314. }
  315. ],
  316. minEntries: 0,
  317. maxEntries: 1
  318. },
  319. {
  320. name: "Deleted",
  321. fieldId: "deleted",
  322. fieldTypes: [
  323. {
  324. type: "checkbox",
  325. fieldTypeId: "deleted"
  326. }
  327. ],
  328. minEntries: 0,
  329. maxEntries: 1
  330. },
  331. {
  332. name: "Deleted at",
  333. fieldId: "deletedAt",
  334. fieldTypes: [
  335. {
  336. type: "text",
  337. fieldTypeId: "deletedAt",
  338. fill: true
  339. }
  340. ],
  341. minEntries: 0,
  342. maxEntries: 1
  343. },
  344. {
  345. name: "Service accessible",
  346. fieldId: "serviceAccessible",
  347. fieldTypes: [
  348. {
  349. type: "checkbox",
  350. fieldTypeId: "serviceAccessible"
  351. }
  352. ],
  353. minEntries: 0,
  354. maxEntries: 1
  355. },
  356. {
  357. name: "Requested deletion",
  358. fieldId: "requestedDeletion",
  359. fieldTypes: [
  360. {
  361. type: "checkbox",
  362. fieldTypeId: "requestedDeletion"
  363. }
  364. ],
  365. minEntries: 0,
  366. maxEntries: 1
  367. },
  368. {
  369. name: "Requested deletion at",
  370. fieldId: "requestedDeletionAt",
  371. fieldTypes: [
  372. {
  373. type: "text",
  374. fieldTypeId: "requestedDeletionAt",
  375. fill: true
  376. }
  377. ],
  378. minEntries: 0,
  379. maxEntries: 1
  380. },
  381. {
  382. name: "To delete",
  383. fieldId: "toDelete",
  384. fieldTypes: [
  385. {
  386. type: "checkbox",
  387. fieldTypeId: "toDelete"
  388. }
  389. ],
  390. minEntries: 0,
  391. maxEntries: 1
  392. },
  393. {
  394. name: "Created at",
  395. fieldId: "createdAt",
  396. fieldTypes: [
  397. {
  398. type: "text",
  399. fieldTypeId: "createdAt",
  400. fill: true
  401. }
  402. ],
  403. minEntries: 0,
  404. maxEntries: 1
  405. }
  406. ],
  407. dependencies: {
  408. "passwordLastChanged": {
  409. eval: "{fields}.usesPassword.length > 0",
  410. fieldId: "usesPassword"
  411. },
  412. "requestedDeletionAt": {
  413. eval: "{fields}.requestedDeletion.length > 0",
  414. fieldId: "requestedDeletion"
  415. },
  416. "deletedAt": {
  417. eval: "{fields}.deleted.length > 0",
  418. fieldId: "deleted"
  419. },
  420. "twofaUsed": {
  421. eval: "{fields}.twofaPossible.length > 0",
  422. fieldId: "twofaPossible"
  423. },
  424. "twofaRecovery": {
  425. eval: "{fields}.twofaUsed.length > 0",
  426. fieldId: "twofaUsed"
  427. }
  428. }
  429. };