{"_id":"@az-tech/schemas","_rev":"6-5a8541341aa5f11833cb9c9a8990823a","name":"@az-tech/schemas","dist-tags":{"latest":"0.9.2"},"versions":{"0.8.0":{"name":"@az-tech/schemas","version":"0.8.0","description":"Schema builder and validator","main":"index.js","scripts":{"start":"node index.js","test":"nyc mocha --recursive --timeout 15000"},"author":{"name":"John Sposato"},"license":"ISC","devDependencies":{"chai":"^4.1.2","chai-spies":"^1.0.0","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^12.0.2","sinon":"^6.0.1"},"directories":{"test":"test"},"dependencies":{},"repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"homepage":"https://bitbucket.org/equipovision/azt-schema#readme","gitHead":"a1588bb70d5a4da79317d981030383c01fe45728","_id":"@az-tech/schemas@0.8.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"jantspo","email":"jantspo@gmail.com"},"dist":{"integrity":"sha512-wgCUmn7/X+4D7tyko7/UdywxyCOWyN4nZtFaP+fwwtoIP8beowS8nd863tHd1eLu5fRDozWzRGd7r/2nrAb7mg==","shasum":"dad6852ab0bcaa13e0f17151a848d93390cf9209","tarball":"https://registry.npmjs.org/@az-tech/schemas/-/schemas-0.8.0.tgz","fileCount":5,"unpackedSize":10781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTRZxCRA9TVsSAnZWagAAc8QP/1xkge14MFHBFi9klx15\n1bkahflYTuI1FxzocoLm12BrNw+wMDFbHhEs8JDcBwMe5mIxPn7UtqgbH1SP\negsAKzJ5bk1AbZr9c2HOCg4ucFKf0CXaqXP3i+F0Y56SiPrpekJ8Jlv/yXKs\njRjVZl15yI8xrYs8aC0HvFuhglGufAUsBDihXYKveCSKGddsFT0WGMsHE7u5\n2b0h7ZZ5KmIlTNXhDMH3znoFuclapv8tpvwbKwAeRmmgzuKezvXq9I0gKrU5\n9JDYJqnayknEJmWhZmRbPqsyl/uhQnhq19Rl5zbix3b1gY+ISHN6VumwrTF8\nUo9pHrs2YrmsBwaEvRs5fyGWzyQP72hf8yXD08k+9CA2PTNNgfB13Ja+B06a\n29M2c8mlNHZCjMMVGb+n/xiy0ICgNaupY10r5gAv+0NVWbtC833TEsWr7ls0\nG7rWJCumwPdcjoZwuoGxDven3LLsZ8/jN3/bXFNRoL2FbN14UXnfEjA2zsOz\nfLE9TYo68rcoq3TmqoE6bXBpF1H4Yu5qVwp4SsPjcR/PazTG7I+dX6HM2SkC\nuJk2N7D3ZTZOzrxqZwlnjYTfaNyVoThAtns06nm70/qvE2elmYtFbONo8okV\noR4Diinhu/nuNfCicXkS2L6GGaFZJYWIyvJIsqps45Ltx0rhCHpjVTND9F82\nyRdo\r\n=hNOr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD82t8XoSJx4W0lwLsXxJnTdbu8uqaRXOAjK4NJuuKlnAIgQgJ+rHFxF9AkpLjYcCjPVQQN7t4jsSnTU9AunkBxT6w="}]},"maintainers":[{"name":"jantspo","email":"jantspo@gmail.com"},{"name":"rbanuelos","email":"rick@equipovision.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/schemas_0.8.0_1531778673240_0.7750042586587935"},"_hasShrinkwrap":false},"0.8.1":{"name":"@az-tech/schemas","version":"0.8.1","description":"Schema builder and validator","main":"index.js","scripts":{"start":"node index.js","test":"nyc mocha --recursive --timeout 15000"},"author":{"name":"John Sposato"},"license":"ISC","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.2","chai-spies":"^1.0.0","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^12.0.2","sinon":"^6.0.1"},"repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"homepage":"https://bitbucket.org/equipovision/azt-schema#readme","gitHead":"a1588bb70d5a4da79317d981030383c01fe45728","_id":"@az-tech/schemas@0.8.1","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"jantspo","email":"jantspo@gmail.com"},"dist":{"integrity":"sha512-DYBFEDcRbebuytX8YvFzcxkH0UPUqN6o126u9hkdc/mYUARrULDHLSVWBiJv7lyz0ISHorkzetMhDD1s1couDA==","shasum":"546dbda0fff56a6602bf1bd3caee0426a3935c49","tarball":"https://registry.npmjs.org/@az-tech/schemas/-/schemas-0.8.1.tgz","fileCount":5,"unpackedSize":10609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTReACRA9TVsSAnZWagAATKkP/2AoYx18kNkCnqQEzRRf\nmv27w796yCz6DKoDMYVqsSq9wxdGJ655b6yAIZQit0MgEPn0214IrxC/U5wJ\nJmmQnDrS6ikMOL4D7obDchxq+kD72SAA4VsFRbnFDoyqdoDZAKuixRZp1IfD\naq9qX4JjnGr3NENEsO8G/77oGA8OY1d7vxYaBHZeyQ2dbnahY/9feGCB4SBA\nKnHskdSkym2wHgZOwKg5TTe105/x7nVOEd7PthUBhRCSG9+8NgUWUBdcb4m1\nDLFIiVHZKo4j3dB9JCYUkBIdnNk6Xx/+15+DleEjqz/IluOGkXkiYDxwBnm+\nyul7i3SIyApJE4gj2b9KfSfjcoihBcQapGGkiTIoNioLOyACmjgRjfC7kg6r\n0Ag02La78HYrqd5xVClFztZyOn1X2D9QC2F9XNwNjdJjrRX07ZydAC67MBuC\nCAMPjSXpBDUbw11F6EgwWdVkhm8PMqCUGFdzc1SC/p6KWZrgd7NoJimojM4L\nwppM643H1ho5Hyf3kjqIdYFx706jgebd5j/DCmkU78BA+H2oD0ou+xNNU4Bi\nocyZZsJ+twrRDikpVjVIMKR7kVuYXRp7ef8CmQjFstHMG10QpqUPTOAL/ffs\nwnB+SgS9CMCMKgz4wI5zl6RdNZOwunMFM1mfjhY5re2P3x+zrLSARlZhXjeC\nHPnR\r\n=aHag\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgOjJn5vs73Wf9cotVMkn6Y8E5LqmnSuJ0KMx7jpPZegIgR0RttvHN7VsAStkMNO3j9yx+9v3SWsu0e1ICD/SYfhc="}]},"maintainers":[{"name":"jantspo","email":"jantspo@gmail.com"},{"name":"rbanuelos","email":"rick@equipovision.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/schemas_0.8.1_1531778944413_0.9847056071414426"},"_hasShrinkwrap":false},"0.9.0":{"name":"@az-tech/schemas","version":"0.9.0","description":"Schema builder and validator","main":"index.js","scripts":{"start":"node index.js","test":"nyc mocha --recursive --timeout 15000"},"author":{"name":"John Sposato"},"license":"ISC","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.2","chai-spies":"^1.0.0","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^12.0.2","sinon":"^6.0.1"},"repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"homepage":"https://bitbucket.org/equipovision/azt-schema#readme","gitHead":"e1144baf72194b3082025c5333ba28001cb9ad24","_id":"@az-tech/schemas@0.9.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"jantspo","email":"jantspo@gmail.com"},"dist":{"integrity":"sha512-z9YlfL6qHB+EMgMqeTXSPiG2cBWt9HAhajM6UQXe1AxWxPT+W3dWsqDATG1dzlGRvmO5QxYBN8vUgsAuM79TZg==","shasum":"5b0933273cb3fb143779912dd6e0c5eeefec411d","tarball":"https://registry.npmjs.org/@az-tech/schemas/-/schemas-0.9.0.tgz","fileCount":5,"unpackedSize":11800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT3MdCRA9TVsSAnZWagAArXMP/jqVL57NvMiithBgdYkI\nkfeRoJ3Rgd7zQFpq/UevCKujGDy63pLn+xZuiZ5rfcI3jVzvpDTF0oFACBHa\njtl8YZm5XSSHRwIW/uzQ8nGaKfZZAtxCAh0w0G0hX9s3+y9z+qWvKrbiN+eS\nEc7fmZQpI9iRMeApwIkTiZGgSz2wulUWfuOgd446LcQLw97wo63knoZas6JO\n/Ztj2djeeb+uaU+tmPhiz1Pi9+bd6VrV0ubDAzln7fb2s29e6rGYVFZ8hUCO\nYfTBeHmUPaVvfvFx9r/2w/3k6Y3YDRz283GQ9nXqQMFJhyjYZH8avmtjIGQP\npjWJjuf6ex8O4DJEG1x9p/JMycshRh0XFzpzICrIJtlVrsxJsPMjrvyonAJv\n0jQNOJkQTsCaGrUMYEWkiZH0nWW0Xi31rxQKgmg0lRroZGgi0NcLNq58Vqba\nj9E7eJgrZFIP7E4+sb7tr6R+UWm+cvaggtuQ+lzrsg4/Z5NPZCB6OQbmBHkA\n6f1ioI6KtJmBbYS7R/NnHEnnqnBqoUYM1zJUhKwLrU/NcY/fqlaPY2iOjfo4\nTpgaMlgyy8pG/+UruZVaV6z7Egu6Jas6gNMiShM5nNVGy9s/J9tylrimGF0s\nLcSmgA73AZVx/liWveeXUklv+a+fyWaWGTyA8++OJc1ytXtLokN6P3bKBxWG\nrHg1\r\n=RGz9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCU37jC54mAVHADEYnWPOveQcX/d9rokp9/6/nAD8GN9wIhAOEbS1JUSjXjzDm+ggWAuLXIfskFuvUQeUlgebGsfaR4"}]},"maintainers":[{"email":"jantspo@gmail.com","name":"jantspo"},{"email":"rick@equipovision.com","name":"rbanuelos"},{"email":"vperezma89@gmail.com","name":"vpz910"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/schemas_0.9.0_1531933469194_0.7417793637324137"},"_hasShrinkwrap":false},"0.9.1":{"name":"@az-tech/schemas","version":"0.9.1","description":"Schema builder and validator","main":"index.js","scripts":{"start":"node index.js","test":"nyc mocha --recursive --timeout 15000"},"author":{"name":"John Sposato"},"license":"ISC","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.2","chai-spies":"^1.0.0","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^12.0.2","sinon":"^6.0.1"},"repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"homepage":"https://bitbucket.org/equipovision/azt-schema#readme","gitHead":"66ff6d0758e91ecbc0d50604972967909d697ec9","_id":"@az-tech/schemas@0.9.1","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"jantspo","email":"jantspo@gmail.com"},"dist":{"integrity":"sha512-eenZSXqchGBrWUnwnCVzVysxh3x7A+tc6bkdDY8ONCKwmrA6InCWdHlJ774kQv7nPwGm4KXzcFh+Pbr3GpL/EQ==","shasum":"1ab6811e6be873219e57bfaf3aef7d8a29c67453","tarball":"https://registry.npmjs.org/@az-tech/schemas/-/schemas-0.9.1.tgz","fileCount":5,"unpackedSize":12393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT5gvCRA9TVsSAnZWagAAzTAP/24YMqHEo30L08Vb9ZV8\nwXa8LMcHzI0w91hROiIaxIsKoF5XSBvNBn0RhFxT41Bvlv7LXwb4Jwjc/yWV\nG444+zX4XLmqXSqnQR78CLwXQhUro3tTOINgc7cQnlR7JvrJNRKdR5bBx/Nb\nUpVi9N9kxcFu6GobDIhuuq1fOnJ8L2hzDd9p/X16bFxTseijDi2KKNi294gX\n8LsIZ/dGWm7AS5zzU8S/kayUvBViWfxGYzjFU4SzUfl6MH5bVhFM2oBlUv/H\nllP8XwRi5RYvC3ZiiIwptJVGBzti6lRc4VTLeCaPPRi18wafoaajoKcyHGCt\nCPfilL1pdr/dP9KhOOUnN6KcCMe/Wxkg2Yd3sOCpq6WLpMqNf8Uqs8/vvoyF\ntNTmXQOqxixeJ9SBDRqg4WPyBcdfh1tkkHyySmQw9tHyeRtTZU8luA7UF3Ww\npI3WZOBrz/i1E1X9+fNgDFDX+SUKdkwWzHr/oQP1ZCn3HICe61xMWvs+35sC\n8/YuJcO7kY7CmYYIV4IdozIMTfWRgKVyNv2cf2bxfwL8AIWHV4abHC/wVFyB\n2DZ6KBFiBcf32keqgAxnKVQjIPhNfEiyprt08GgksUcf0Sh5ixqZoQQtZpJY\nsoncGfR4jibXab59IeJ3ZqioQ/36ebb7pw6Xu8JDnGF4EJaMxM7k/RErKMVf\nWiox\r\n=nD2f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/0mcYI2yKRvlPhka7fvhWivSVF20JHfoLDl3mMSXsGAiAbYwwV6cjxqLgKWMIn9LpWHTlbB1bgCDQJc3yhkqChqA=="}]},"maintainers":[{"email":"jantspo@gmail.com","name":"jantspo"},{"email":"rick@equipovision.com","name":"rbanuelos"},{"email":"vperezma89@gmail.com","name":"vpz910"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/schemas_0.9.1_1531942959085_0.28068194311394445"},"_hasShrinkwrap":false},"0.9.2":{"name":"@az-tech/schemas","version":"0.9.2","description":"Schema builder and validator","main":"index.js","scripts":{"start":"node index.js","test":"nyc mocha --recursive --timeout 15000"},"author":{"name":"John Sposato"},"license":"ISC","directories":{"test":"test"},"dependencies":{},"devDependencies":{"chai":"^4.1.2","chai-spies":"^1.0.0","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^12.0.2","sinon":"^6.0.1"},"repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"homepage":"https://bitbucket.org/equipovision/azt-schema#readme","gitHead":"fd8fcc5c9c9c10a3aa4c8e459f198f3fb132f601","_id":"@az-tech/schemas@0.9.2","_npmVersion":"6.1.0","_nodeVersion":"8.11.2","_npmUser":{"name":"jantspo","email":"jantspo@gmail.com"},"dist":{"integrity":"sha512-RMdCsPXjmxpgi7QKJKNCRx6IPL8WgnKmGIYcy60XFePFyhcVWGtDcVoZz//YznUX98UJpNcNsliZdL9At177+g==","shasum":"972bf517f1b89f9b857fe1c1241414c0f8eb27a7","tarball":"https://registry.npmjs.org/@az-tech/schemas/-/schemas-0.9.2.tgz","fileCount":5,"unpackedSize":12526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbX35VCRA9TVsSAnZWagAAb+QQAJ6+QDRkfgMSl3K6KC/q\nfxloB+ZO1IDoayfel3frDkzw9VLccq8FDruw+vET4pt6cYWxnlporXxHfEcA\n7iC9T6ruAtg6wJIyNOmf6CHC0E02c2aVsXSCjGOqPkjq0hUM0V53RJHn/NeY\nbaQrO6zVD7hFHFAkmEZosu74BuBv3+PXTeYlau3dvxkHfOTUpSM/QbfHcJ5d\nu17sao7yCBONr9XezFrL17n3TQKV96VtILj8fi9scSKWj2mqj90eQXrY4fin\nspmeQFu03KQW2XOg56pFYXJnMPSRnMM580BtyLl5HlPnayrv3p6zDHcnAmV5\nm/3Y2Lx7H5cOzcGIuMwIGmHYB/Fm221jCSOz1Aj6Gzc0JFqlI5dAfbGo9GiS\nOrDPNdpznt1s+0lossaVe3BVf0ofiWwshzrALtSVl9oQRX3ZhIL1aR/GAcPN\naO11RPXTBBCGPCz6xTJdrxbBSq/B9wnVV7XG0pjhBmLh5S/JVxcra/bETlo7\ntYnOazOrQ0LbZyj9LkFSaQzmuoHTQtaMDggEXlFAaOsjIPqveVeRxrOgG0/l\njAdTWyvQx2HS8DYJApfK4QSTwo3a/MJe4DeLgALFRa+tzGoajLKGsBkDbwg6\n2OjQmLGwYgZp9U+qcu7ZPxhj/atibxI3FMVAtdUqRNXxX1affgd/1DQVxhbw\nkUXV\r\n=mJm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuIpZLKw1mNKbLoGehE2ZM0yMNmw+OluKR4hh+X9JEiQIhAO7OBqse0dZXAyYkoplzngwGbrX6qe/akSs1V61V/HId"}]},"maintainers":[{"email":"jantspo@gmail.com","name":"jantspo"},{"email":"rick@equipovision.com","name":"rbanuelos"},{"email":"vperezma89@gmail.com","name":"vpz910"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/schemas_0.9.2_1532984917379_0.8608944181982388"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-16T22:04:33.117Z","0.8.0":"2018-07-16T22:04:33.334Z","modified":"2022-04-04T17:15:20.156Z","0.8.1":"2018-07-16T22:09:04.467Z","0.9.0":"2018-07-18T17:04:29.276Z","0.9.1":"2018-07-18T19:42:39.170Z","0.9.2":"2018-07-30T21:08:37.456Z"},"maintainers":[{"email":"jantspo@gmail.com","name":"jantspo"},{"email":"rick@equipovision.com","name":"rbanuelos"},{"email":"vperezma89@gmail.com","name":"vpz910"}],"description":"Schema builder and validator","homepage":"https://bitbucket.org/equipovision/azt-schema#readme","repository":{"type":"git","url":"git+https://jantspo@bitbucket.org/equipovision/azt-schema.git"},"author":{"name":"John Sposato"},"license":"ISC","readme":"##Schemas\nschema.js provides a simple schema constructor which provides validation methods of models.\n\n###Usage\nCreate a schema file for your model, *ie: 'myModel.schema.js'*, and require the 'schema.js' file in it.\nCreate an object representing the model and call `new Schema(myModel)` to create the new model schema.\n\n###Schema API\n`myschema.validate(object)` = Will validate the data being passed in against the model schema definition. This method will run the following commands.\n\n`mySchema.validateFieldType(field, modelField)` =   Validates that the property is of the proper data type. `field` is a string representing the property name of the schema. `modelField` is the property on the data to be validated.\n\n`mySchema.validateDateString(val)` = Validates that date strings are proper ISO format.\n\n`myschema.validateLength(field, modelField)` = Validates that the length of the field is neither over the maxLength or under the minLength of that property. `field`is the name of the prop to validate, `modelField` is the property value to be validated.\n\n###Model Definitions\nDefine model schemas as an object of `key`: `value` pairs where `key` is the name of the property and `value` is an object with the property defitions.\nCurrent property values are as follows:\n\n`type`: the data type of the property. Currently supported types are `'string'`,`'number'`,`'boolean'`,`'arrary'`, and `'date'`. `'date'` is current;ly assumed to be an ISO String.  \n`required`: A boolean value to specify whether a property is required to pass validation. Not providing a required `key`:`pair` will default to `required`:`false`  \n`minLength`: A number value to designate the minimum length of the property. Not providing a minLength will default the value to 0;  \n`maxLength`: A number value to designate the maximum length of the property. Not providing a minLength will default the value to null, allowing unlimited length;  \n`default`: Default value for property. If the data provided has a `key: value` pair it will use those values, otherwise it will use the provided default or null if no default is provided.  \n\n###Example:\nA model like:\n```\nconst myModel = new Schema({\n    properties:{\n        name: {required: true, type: 'string'},\n        age: {required: false, type: 'number', minLength: 2, maxLength: 3},\n        createdAt: {required: true, type: 'date'},\n        updatedAt: {required: true, type: 'date'},\n        active: {required: true, type: 'boolean'}\n    }\n})\n```\n\nwill create a new schema with 5 properties.\n\nCalling validate on an object will validate the object against the schema, returning either true, or an array of strings, with the strings detailing the issues with the validation.\n","readmeFilename":"README.md"}