From 4d19f59b6babac125810b4ffeb381979726a8de6 Mon Sep 17 00:00:00 2001 From: Ravi Date: Sat, 12 Jan 2019 11:37:25 +0530 Subject: [PATCH 01/35] Resolved issue. --- lib/utils/plivoxml.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/utils/plivoxml.js b/lib/utils/plivoxml.js index 73d08853..a7ab1cc4 100644 --- a/lib/utils/plivoxml.js +++ b/lib/utils/plivoxml.js @@ -2,7 +2,7 @@ var qs = require('querystring'); var xmlBuilder = require('xmlbuilder'); var util = require('util'); -export class PlivoXMLError extends Error {} +export class PlivoXMLError extends Error { } /** * Response element @@ -227,7 +227,7 @@ Response.prototype = { * @param {string} [attributes.callbackMethod] */ addRecord: function (attributes) { - return this.add(new Record(Response),'', attributes); + return this.add(new Record(Response), '', attributes); }, /** @@ -251,9 +251,23 @@ Response.prototype = { * @param {number} [attributes.loop] */ addSpeak: function (body, attributes) { - return this.add(new Speak(Response), body, attributes); + //Convert accented characters to numerical references first + let accentedCharsList = { + "Á": "A", "Ă": "A", "Ắ": "A", "Ặ": "A", "Ằ": "A", "Ẳ": "A", "Ẵ": "A", "Ǎ": "A", "Â": "A", "Ấ": "A", "Ậ": "A", "Ầ": "A", "Ẩ": "A", "Ẫ": "A", "Ä": "A", "Ǟ": "A", "Ȧ": "A", "Ǡ": "A", "Ạ": "A", "Ȁ": "A", "À": "A", "Ả": "A", "Ȃ": "A", "Ā": "A", "Ą": "A", "Å": "A", "Ǻ": "A", "Ḁ": "A", "Ⱥ": "A", "Ã": "A", "Ꜳ": "AA", "Æ": "AE", "Ǽ": "AE", "Ǣ": "AE", "Ꜵ": "AO", "Ꜷ": "AU", "Ꜹ": "AV", "Ꜻ": "AV", "Ꜽ": "AY", "Ḃ": "B", "Ḅ": "B", "Ɓ": "B", "Ḇ": "B", "Ƀ": "B", "Ƃ": "B", "Ć": "C", "Č": "C", "Ç": "C", "Ḉ": "C", "Ĉ": "C", "Ċ": "C", "Ƈ": "C", "Ȼ": "C", "Ď": "D", "Ḑ": "D", "Ḓ": "D", "Ḋ": "D", "Ḍ": "D", "Ɗ": "D", "Ḏ": "D", "Dz": "D", "Dž": "D", "Đ": "D", "Ƌ": "D", "DZ": "DZ", "DŽ": "DZ", "É": "E", "Ĕ": "E", "Ě": "E", "Ȩ": "E", "Ḝ": "E", "Ê": "E", "Ế": "E", "Ệ": "E", "Ề": "E", "Ể": "E", "Ễ": "E", "Ḙ": "E", "Ë": "E", "Ė": "E", "Ẹ": "E", "Ȅ": "E", "È": "E", "Ẻ": "E", "Ȇ": "E", "Ē": "E", "Ḗ": "E", "Ḕ": "E", "Ę": "E", "Ɇ": "E", "Ẽ": "E", "Ḛ": "E", "Ꝫ": "ET", "Ḟ": "F", "Ƒ": "F", "Ǵ": "G", "Ğ": "G", "Ǧ": "G", "Ģ": "G", "Ĝ": "G", "Ġ": "G", "Ɠ": "G", "Ḡ": "G", "Ǥ": "G", "Ḫ": "H", "Ȟ": "H", "Ḩ": "H", "Ĥ": "H", "Ⱨ": "H", "Ḧ": "H", "Ḣ": "H", "Ḥ": "H", "Ħ": "H", "Í": "I", "Ĭ": "I", "Ǐ": "I", "Î": "I", "Ï": "I", "Ḯ": "I", "İ": "I", "Ị": "I", "Ȉ": "I", "Ì": "I", "Ỉ": "I", "Ȋ": "I", "Ī": "I", "Į": "I", "Ɨ": "I", "Ĩ": "I", "Ḭ": "I", "Ꝺ": "D", "Ꝼ": "F", "Ᵹ": "G", "Ꞃ": "R", "Ꞅ": "S", "Ꞇ": "T", "Ꝭ": "IS", "Ĵ": "J", "Ɉ": "J", "Ḱ": "K", "Ǩ": "K", "Ķ": "K", "Ⱪ": "K", "Ꝃ": "K", "Ḳ": "K", "Ƙ": "K", "Ḵ": "K", "Ꝁ": "K", "Ꝅ": "K", "Ĺ": "L", "Ƚ": "L", "Ľ": "L", "Ļ": "L", "Ḽ": "L", "Ḷ": "L", "Ḹ": "L", "Ⱡ": "L", "Ꝉ": "L", "Ḻ": "L", "Ŀ": "L", "Ɫ": "L", "Lj": "L", "Ł": "L", "LJ": "LJ", "Ḿ": "M", "Ṁ": "M", "Ṃ": "M", "Ɱ": "M", "Ń": "N", "Ň": "N", "Ņ": "N", "Ṋ": "N", "Ṅ": "N", "Ṇ": "N", "Ǹ": "N", "Ɲ": "N", "Ṉ": "N", "Ƞ": "N", "Nj": "N", "Ñ": "N", "NJ": "NJ", "Ó": "O", "Ŏ": "O", "Ǒ": "O", "Ô": "O", "Ố": "O", "Ộ": "O", "Ồ": "O", "Ổ": "O", "Ỗ": "O", "Ö": "O", "Ȫ": "O", "Ȯ": "O", "Ȱ": "O", "Ọ": "O", "Ő": "O", "Ȍ": "O", "Ò": "O", "Ỏ": "O", "Ơ": "O", "Ớ": "O", "Ợ": "O", "Ờ": "O", "Ở": "O", "Ỡ": "O", "Ȏ": "O", "Ꝋ": "O", "Ꝍ": "O", "Ō": "O", "Ṓ": "O", "Ṑ": "O", "Ɵ": "O", "Ǫ": "O", "Ǭ": "O", "Ø": "O", "Ǿ": "O", "Õ": "O", "Ṍ": "O", "Ṏ": "O", "Ȭ": "O", "Ƣ": "OI", "Ꝏ": "OO", "Ɛ": "E", "Ɔ": "O", "Ȣ": "OU", "Ṕ": "P", "Ṗ": "P", "Ꝓ": "P", "Ƥ": "P", "Ꝕ": "P", "Ᵽ": "P", "Ꝑ": "P", "Ꝙ": "Q", "Ꝗ": "Q", "Ŕ": "R", "Ř": "R", "Ŗ": "R", "Ṙ": "R", "Ṛ": "R", "Ṝ": "R", "Ȑ": "R", "Ȓ": "R", "Ṟ": "R", "Ɍ": "R", "Ɽ": "R", "Ꜿ": "C", "Ǝ": "E", "Ś": "S", "Ṥ": "S", "Š": "S", "Ṧ": "S", "Ş": "S", "Ŝ": "S", "Ș": "S", "Ṡ": "S", "Ṣ": "S", "Ṩ": "S", "Ť": "T", "Ţ": "T", "Ṱ": "T", "Ț": "T", "Ⱦ": "T", "Ṫ": "T", "Ṭ": "T", "Ƭ": "T", "Ṯ": "T", "Ʈ": "T", "Ŧ": "T", "Ɐ": "A", "Ꞁ": "L", "Ɯ": "M", "Ʌ": "V", "Ꜩ": "TZ", "Ú": "U", "Ŭ": "U", "Ǔ": "U", "Û": "U", "Ṷ": "U", "Ü": "U", "Ǘ": "U", "Ǚ": "U", "Ǜ": "U", "Ǖ": "U", "Ṳ": "U", "Ụ": "U", "Ű": "U", "Ȕ": "U", "Ù": "U", "Ủ": "U", "Ư": "U", "Ứ": "U", "Ự": "U", "Ừ": "U", "Ử": "U", "Ữ": "U", "Ȗ": "U", "Ū": "U", "Ṻ": "U", "Ų": "U", "Ů": "U", "Ũ": "U", "Ṹ": "U", "Ṵ": "U", "Ꝟ": "V", "Ṿ": "V", "Ʋ": "V", "Ṽ": "V", "Ꝡ": "VY", "Ẃ": "W", "Ŵ": "W", "Ẅ": "W", "Ẇ": "W", "Ẉ": "W", "Ẁ": "W", "Ⱳ": "W", "Ẍ": "X", "Ẋ": "X", "Ý": "Y", "Ŷ": "Y", "Ÿ": "Y", "Ẏ": "Y", "Ỵ": "Y", "Ỳ": "Y", "Ƴ": "Y", "Ỷ": "Y", "Ỿ": "Y", "Ȳ": "Y", "Ɏ": "Y", "Ỹ": "Y", "Ź": "Z", "Ž": "Z", "Ẑ": "Z", "Ⱬ": "Z", "Ż": "Z", "Ẓ": "Z", "Ȥ": "Z", "Ẕ": "Z", "Ƶ": "Z", "IJ": "IJ", "Œ": "OE", "ᴀ": "A", "ᴁ": "AE", "ʙ": "B", "ᴃ": "B", "ᴄ": "C", "ᴅ": "D", "ᴇ": "E", "ꜰ": "F", "ɢ": "G", "ʛ": "G", "ʜ": "H", "ɪ": "I", "ʁ": "R", "ᴊ": "J", "ᴋ": "K", "ʟ": "L", "ᴌ": "L", "ᴍ": "M", "ɴ": "N", "ᴏ": "O", "ɶ": "OE", "ᴐ": "O", "ᴕ": "OU", "ᴘ": "P", "ʀ": "R", "ᴎ": "N", "ᴙ": "R", "ꜱ": "S", "ᴛ": "T", "ⱻ": "E", "ᴚ": "R", "ᴜ": "U", "ᴠ": "V", "ᴡ": "W", "ʏ": "Y", "ᴢ": "Z", "á": "a", "ă": "a", "ắ": "a", "ặ": "a", "ằ": "a", "ẳ": "a", "ẵ": "a", "ǎ": "a", "â": "a", "ấ": "a", "ậ": "a", "ầ": "a", "ẩ": "a", "ẫ": "a", "ä": "a", "ǟ": "a", "ȧ": "a", "ǡ": "a", "ạ": "a", "ȁ": "a", "à": "a", "ả": "a", "ȃ": "a", "ā": "a", "ą": "a", "ᶏ": "a", "ẚ": "a", "å": "a", "ǻ": "a", "ḁ": "a", "ⱥ": "a", "ã": "a", "ꜳ": "aa", "æ": "ae", "ǽ": "ae", "ǣ": "ae", "ꜵ": "ao", "ꜷ": "au", "ꜹ": "av", "ꜻ": "av", "ꜽ": "ay", "ḃ": "b", "ḅ": "b", "ɓ": "b", "ḇ": "b", "ᵬ": "b", "ᶀ": "b", "ƀ": "b", "ƃ": "b", "ɵ": "o", "ć": "c", "č": "c", "ç": "c", "ḉ": "c", "ĉ": "c", "ɕ": "c", "ċ": "c", "ƈ": "c", "ȼ": "c", "ď": "d", "ḑ": "d", "ḓ": "d", "ȡ": "d", "ḋ": "d", "ḍ": "d", "ɗ": "d", "ᶑ": "d", "ḏ": "d", "ᵭ": "d", "ᶁ": "d", "đ": "d", "ɖ": "d", "ƌ": "d", "ı": "i", "ȷ": "j", "ɟ": "j", "ʄ": "j", "dz": "dz", "dž": "dz", "é": "e", "ĕ": "e", "ě": "e", "ȩ": "e", "ḝ": "e", "ê": "e", "ế": "e", "ệ": "e", "ề": "e", "ể": "e", "ễ": "e", "ḙ": "e", "ë": "e", "ė": "e", "ẹ": "e", "ȅ": "e", "è": "e", "ẻ": "e", "ȇ": "e", "ē": "e", "ḗ": "e", "ḕ": "e", "ⱸ": "e", "ę": "e", "ᶒ": "e", "ɇ": "e", "ẽ": "e", "ḛ": "e", "ꝫ": "et", "ḟ": "f", "ƒ": "f", "ᵮ": "f", "ᶂ": "f", "ǵ": "g", "ğ": "g", "ǧ": "g", "ģ": "g", "ĝ": "g", "ġ": "g", "ɠ": "g", "ḡ": "g", "ᶃ": "g", "ǥ": "g", "ḫ": "h", "ȟ": "h", "ḩ": "h", "ĥ": "h", "ⱨ": "h", "ḧ": "h", "ḣ": "h", "ḥ": "h", "ɦ": "h", "ẖ": "h", "ħ": "h", "ƕ": "hv", "í": "i", "ĭ": "i", "ǐ": "i", "î": "i", "ï": "i", "ḯ": "i", "ị": "i", "ȉ": "i", "ì": "i", "ỉ": "i", "ȋ": "i", "ī": "i", "į": "i", "ᶖ": "i", "ɨ": "i", "ĩ": "i", "ḭ": "i", "ꝺ": "d", "ꝼ": "f", "ᵹ": "g", "ꞃ": "r", "ꞅ": "s", "ꞇ": "t", "ꝭ": "is", "ǰ": "j", "ĵ": "j", "ʝ": "j", "ɉ": "j", "ḱ": "k", "ǩ": "k", "ķ": "k", "ⱪ": "k", "ꝃ": "k", "ḳ": "k", "ƙ": "k", "ḵ": "k", "ᶄ": "k", "ꝁ": "k", "ꝅ": "k", "ĺ": "l", "ƚ": "l", "ɬ": "l", "ľ": "l", "ļ": "l", "ḽ": "l", "ȴ": "l", "ḷ": "l", "ḹ": "l", "ⱡ": "l", "ꝉ": "l", "ḻ": "l", "ŀ": "l", "ɫ": "l", "ᶅ": "l", "ɭ": "l", "ł": "l", "lj": "lj", "ſ": "s", "ẜ": "s", "ẛ": "s", "ẝ": "s", "ḿ": "m", "ṁ": "m", "ṃ": "m", "ɱ": "m", "ᵯ": "m", "ᶆ": "m", "ń": "n", "ň": "n", "ņ": "n", "ṋ": "n", "ȵ": "n", "ṅ": "n", "ṇ": "n", "ǹ": "n", "ɲ": "n", "ṉ": "n", "ƞ": "n", "ᵰ": "n", "ᶇ": "n", "ɳ": "n", "ñ": "n", "nj": "nj", "ó": "o", "ŏ": "o", "ǒ": "o", "ô": "o", "ố": "o", "ộ": "o", "ồ": "o", "ổ": "o", "ỗ": "o", "ö": "o", "ȫ": "o", "ȯ": "o", "ȱ": "o", "ọ": "o", "ő": "o", "ȍ": "o", "ò": "o", "ỏ": "o", "ơ": "o", "ớ": "o", "ợ": "o", "ờ": "o", "ở": "o", "ỡ": "o", "ȏ": "o", "ꝋ": "o", "ꝍ": "o", "ⱺ": "o", "ō": "o", "ṓ": "o", "ṑ": "o", "ǫ": "o", "ǭ": "o", "ø": "o", "ǿ": "o", "õ": "o", "ṍ": "o", "ṏ": "o", "ȭ": "o", "ƣ": "oi", "ꝏ": "oo", "ɛ": "e", "ᶓ": "e", "ɔ": "o", "ᶗ": "o", "ȣ": "ou", "ṕ": "p", "ṗ": "p", "ꝓ": "p", "ƥ": "p", "ᵱ": "p", "ᶈ": "p", "ꝕ": "p", "ᵽ": "p", "ꝑ": "p", "ꝙ": "q", "ʠ": "q", "ɋ": "q", "ꝗ": "q", "ŕ": "r", "ř": "r", "ŗ": "r", "ṙ": "r", "ṛ": "r", "ṝ": "r", "ȑ": "r", "ɾ": "r", "ᵳ": "r", "ȓ": "r", "ṟ": "r", "ɼ": "r", "ᵲ": "r", "ᶉ": "r", "ɍ": "r", "ɽ": "r", "ↄ": "c", "ꜿ": "c", "ɘ": "e", "ɿ": "r", "ś": "s", "ṥ": "s", "š": "s", "ṧ": "s", "ş": "s", "ŝ": "s", "ș": "s", "ṡ": "s", "ṣ": "s", "ṩ": "s", "ʂ": "s", "ᵴ": "s", "ᶊ": "s", "ȿ": "s", "ɡ": "g", "ᴑ": "o", "ᴓ": "o", "ᴝ": "u", "ť": "t", "ţ": "t", "ṱ": "t", "ț": "t", "ȶ": "t", "ẗ": "t", "ⱦ": "t", "ṫ": "t", "ṭ": "t", "ƭ": "t", "ṯ": "t", "ᵵ": "t", "ƫ": "t", "ʈ": "t", "ŧ": "t", "ᵺ": "th", "ɐ": "a", "ᴂ": "ae", "ǝ": "e", "ᵷ": "g", "ɥ": "h", "ʮ": "h", "ʯ": "h", "ᴉ": "i", "ʞ": "k", "ꞁ": "l", "ɯ": "m", "ɰ": "m", "ᴔ": "oe", "ɹ": "r", "ɻ": "r", "ɺ": "r", "ⱹ": "r", "ʇ": "t", "ʌ": "v", "ʍ": "w", "ʎ": "y", "ꜩ": "tz", "ú": "u", "ŭ": "u", "ǔ": "u", "û": "u", "ṷ": "u", "ü": "u", "ǘ": "u", "ǚ": "u", "ǜ": "u", "ǖ": "u", "ṳ": "u", "ụ": "u", "ű": "u", "ȕ": "u", "ù": "u", "ủ": "u", "ư": "u", "ứ": "u", "ự": "u", "ừ": "u", "ử": "u", "ữ": "u", "ȗ": "u", "ū": "u", "ṻ": "u", "ų": "u", "ᶙ": "u", "ů": "u", "ũ": "u", "ṹ": "u", "ṵ": "u", "ᵫ": "ue", "ꝸ": "um", "ⱴ": "v", "ꝟ": "v", "ṿ": "v", "ʋ": "v", "ᶌ": "v", "ⱱ": "v", "ṽ": "v", "ꝡ": "vy", "ẃ": "w", "ŵ": "w", "ẅ": "w", "ẇ": "w", "ẉ": "w", "ẁ": "w", "ⱳ": "w", "ẘ": "w", "ẍ": "x", "ẋ": "x", "ᶍ": "x", "ý": "y", "ŷ": "y", "ÿ": "y", "ẏ": "y", "ỵ": "y", "ỳ": "y", "ƴ": "y", "ỷ": "y", "ỿ": "y", "ȳ": "y", "ẙ": "y", "ɏ": "y", "ỹ": "y", "ź": "z", "ž": "z", "ẑ": "z", "ʑ": "z", "ⱬ": "z", "ż": "z", "ẓ": "z", "ȥ": "z", "ẕ": "z", "ᵶ": "z", "ᶎ": "z", "ʐ": "z", "ƶ": "z", "ɀ": "z", "ff": "ff", "ffi": "ffi", "ffl": "ffl", "fi": "fi", "fl": "fl", "ij": "ij", "œ": "oe", "st": "st", "ₐ": "a", "ₑ": "e", "ᵢ": "i", "ⱼ": "j", "ₒ": "o", "ᵣ": "r", "ᵤ": "u", "ᵥ": "v", "ₓ": "x" + + }; + let newBody = ''; + for (var i = 0; i < body.length; i++) { + if (accentedCharsList[body[i]]) { + newBody += '&#' + body.charCodeAt(i) + ';'; + } else { + newBody += body[i]; + } + } + return this.add(new Speak(Response), newBody, attributes); }, + /** * Add a Wait element * @method @@ -291,7 +305,7 @@ function Conference(Response) { this.element = 'Conference'; this.valid_attributes = ['muted', 'beep', 'startConferenceOnEnter', 'endConferenceOnExit', 'waitSound', 'enterSound', 'exitSound', - 'timeLimit', 'hangupOnStar', 'maxMembers', 'record','recordWhenAlone', + 'timeLimit', 'hangupOnStar', 'maxMembers', 'record', 'recordWhenAlone', 'recordFileFormat', 'action', 'method', 'redirect', 'digitsMatch', 'callbackUrl', 'callbackMethod', 'stayAlone', 'floorEvent', 'transcriptionType', 'transcriptionUrl', From 3858a2502177c00ef492e2db731dc358ce24e98d Mon Sep 17 00:00:00 2001 From: Ravi Date: Thu, 24 Jan 2019 17:40:57 +0530 Subject: [PATCH 02/35] Resolved issue of message list --- lib/rest/utils.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/rest/utils.js b/lib/rest/utils.js index 81f4cf3b..27a9bf7f 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -22,7 +22,17 @@ export function camelCaseRequestWrapper(requestFunc) { return (method, action, params) => { params = recursivelyRenameObject(params, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; + + // Snake Case logic has issue, it replaces double underscores with single + // So dont run snake case logic for following params + let skipParamsFromSnakeCasing = [ + 'message_time__lt', 'message_time__lte', + 'message_time__gt', 'message_time__gte', + ] + if (skipParamsFromSnakeCasing.indexOf(key) >= 0) { + return key; + } return _snakeCase(key) .replace('_less_than', '__lt') @@ -35,7 +45,7 @@ export function camelCaseRequestWrapper(requestFunc) { return requestFunc(method, action, params).then(res => { res.body = recursivelyRenameObject(res.body, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; return _camelCase(key); }); From 2ec504a301ed75931e0b141e8ba080df78fa2285 Mon Sep 17 00:00:00 2001 From: patelravi Date: Wed, 30 Jan 2019 09:36:22 +0530 Subject: [PATCH 03/35] Finished create, list,get identity methods with test cases. --- gulpfile.js | 13 +- lib/base.js | 5 +- lib/resources/verification.js | 292 ++ lib/rest/client-test.js | 25 +- lib/rest/client.js | 35 +- lib/rest/request-test.js | 127 +- lib/rest/request.js | 9 +- lib/rest/utils.js | 8 +- package-lock.json | 5580 +++++++++++++++++++++++++++++++++ package.json | 1 - test/test.verification.js | 85 + 11 files changed, 6129 insertions(+), 51 deletions(-) create mode 100644 lib/resources/verification.js create mode 100644 package-lock.json create mode 100644 test/test.verification.js diff --git a/gulpfile.js b/gulpfile.js index b8010bf0..553452ee 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,6 @@ var eslint = require('gulp-eslint'); var excludeGitignore = require('gulp-exclude-gitignore'); var mocha = require('gulp-mocha'); var istanbul = require('gulp-babel-istanbul'); -var nsp = require('gulp-nsp'); var plumber = require('gulp-plumber'); var coveralls = require('gulp-coveralls'); var babel = require('gulp-babel'); @@ -31,10 +30,6 @@ gulp.task('static', function () { .pipe(eslint.failAfterError()); }); -gulp.task('nsp', function (cb) { - nsp({package: path.resolve('package.json')}, cb); -}); - gulp.task('pre-test', function () { return gulp.src('lib/**/*.js') .pipe(excludeGitignore()) @@ -48,12 +43,12 @@ gulp.task('pre-test', function () { gulp.task('test', ['pre-test'], function (cb) { var mochaErr; - gulp.src('test/**/*.js') + gulp.src('test/**/test.verification.js') .pipe(plumber()) - .pipe(mocha({reporter: 'spec'})) + .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { mochaErr = err; - throw(err) + throw (err) }) .pipe(istanbul.writeReports()) .on('end', function () { @@ -93,5 +88,5 @@ gulp.task('clean', function () { return del('dist'); }); -gulp.task('prepublish', ['nsp', 'babel']); +gulp.task('prepublish', ['babel']); gulp.task('default', ['static', 'test', 'coveralls']); diff --git a/lib/base.js b/lib/base.js index aed64a64..feb7a7ee 100644 --- a/lib/base.js +++ b/lib/base.js @@ -1,4 +1,4 @@ -import {extend} from './utils/common.js'; +import { extend } from './utils/common.js'; let actionKey = Symbol('api action'); let klassKey = Symbol('constructor'); @@ -50,6 +50,7 @@ export class PlivoResource { let id = this.id; return new Promise((resolve, reject) => { + console.log('action is', action, ', id is ', id, ',url is', action + id); client('DELETE', action + id + '/', params) .then(() => { resolve(true); @@ -113,7 +114,7 @@ export class PlivoResourceInterface { client('GET', action, params) .then(response => { let objects = []; - Object.defineProperty(objects, 'meta', {value: response.body.meta}); + Object.defineProperty(objects, 'meta', { value: response.body.meta }); response.body.objects.forEach(item => { objects.push(new Klass(client, item)); }); diff --git a/lib/resources/verification.js b/lib/resources/verification.js new file mode 100644 index 00000000..59b64e35 --- /dev/null +++ b/lib/resources/verification.js @@ -0,0 +1,292 @@ +import { + extend, + validate +} from '../utils/common.js'; +import { + PlivoResource, + PlivoResourceInterface +} from '../base'; + +const clientKey = Symbol(); +const addressVerificationAction = 'Verification/Address/'; +const identityVerificationAction = 'Verification/Identity/'; +const idField = 'id'; + +/* ---------------Address method----------*/ +export class AddressVerification extends PlivoResource { + constructor(client, data = {}) { + super(addressVerificationAction, AddressVerification, idField, client); + + if (idField in data) { + this.id = data[idField]; + } + + extend(this, data); + } + delete_address(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return super.delete(id); + } + update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + return super.update({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }); + } + + +} + +export class AddressVerificationInterface extends PlivoResourceInterface { + constructor(client, data = {}) { + super(addressVerificationAction, AddressVerification, idField, client); + extend(this, data); + + this[clientKey] = client; + } + + retreive_address(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return super.get(id); + } + + list_all_addresses(params) { + return super.list(params, 'POST'); + } + + create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + return super.create({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }); + } +} +/* ---------------Identity method----------*/ + +export class IdentityVerification extends PlivoResource { + constructor(client, data = {}) { + super(identityVerificationAction, IdentityVerification, idField, client); + + this[clientKey] = client; + + if (idField in data) { + this.id = data[idField]; + } + + extend(this, data); + } + delete_identity(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return (new IdentityVerification(this[clientKey], { id: id })).delete({}); + } + update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + + return (new IdentityVerification(this[clientKey], { + id: id + })).update({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + nationality: nationality, + id_nationality: id_nationality, + birth_place: birth_place, + birth_date: birth_date, + id_issue_date: id_issue_date, + business_name: business_name, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }); + } + +} + +export class IdentityVerificationInterface extends PlivoResourceInterface { + constructor(client, data = {}) { + super(identityVerificationAction, IdentityVerification, idField, client); + extend(this, data); + + this[clientKey] = client; + } + + retreive_identity(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return super.get(id); + + } + + list_all_identity() { + return super.list(); + } + + create_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + return super.create({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + nationality: nationality, + id_nationality: id_nationality, + birth_place: birth_place, + birth_date: birth_date, + id_issue_date: id_issue_date, + business_name: business_name, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }); + } + + +} + + +/* ---------------Verificatiob Address and Identity method----------*/ +export class Verification { + + constructor(client, data = {}) { + this.addressVerificationResource = new exports.AddressVerification(client); + this.addressVerificationInterface = new exports.AddressVerificationInterface(client); + this.identityVerificationResource = new exports.IdentityVerification(client); + this.identityVerificationInterface = new exports.IdentityVerificationInterface(client); + } + + retreive_address(id) { + return this.addressVerificationInterface.retreive_address(id); + } + + list_all_addresses() { + return this.addressVerificationInterface.list_all_addresses(); + } + + create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + + return this.addressVerificationInterface.create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code); + + } + + delete_address(id) { + return this.addressVerificationResource.delete_address(id); + } + + update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + + return this.addressVerificationResource.update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code); + + } + + + + + retreive_identity(id) { + return this.identityVerificationInterface.retreive_identity(id); + } + + list_all_identity() { + return this.identityVerificationInterface.list_all_identity(); + } + + create_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + + return this.identityVerificationInterface.create_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code); + + } + + delete_identity(id) { + return this.identityVerificationResource.delete_identity(id); + } + + update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + + return this.identityVerificationResource.update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code); + } + +} + diff --git a/lib/rest/client-test.js b/lib/rest/client-test.js index b96a2ac0..53ae48bc 100644 --- a/lib/rest/client-test.js +++ b/lib/rest/client-test.js @@ -1,14 +1,15 @@ -import {Request} from './request-test.js'; -import {CallInterface} from '../resources/call.js'; -import {AccountInterface, SubaccountInterface} from '../resources/accounts.js'; -import {ApplicationInterface} from '../resources/applications.js'; -import {ConferenceInterface} from '../resources/conferences.js'; -import {EndpointInterface} from '../resources/endpoints.js'; -import {MessageInterface} from '../resources/messages.js'; -import {NumberInterface} from '../resources/numbers.js'; -import {PricingInterface} from '../resources/pricings.js'; -import {RecordingInterface} from '../resources/recordings.js'; -import {camelCaseRequestWrapper} from './utils'; +import { Request } from './request-test.js'; +import { CallInterface } from '../resources/call.js'; +import { AccountInterface, SubaccountInterface } from '../resources/accounts.js'; +import { ApplicationInterface } from '../resources/applications.js'; +import { ConferenceInterface } from '../resources/conferences.js'; +import { EndpointInterface } from '../resources/endpoints.js'; +import { MessageInterface } from '../resources/messages.js'; +import { NumberInterface } from '../resources/numbers.js'; +import { PricingInterface } from '../resources/pricings.js'; +import { RecordingInterface } from '../resources/recordings.js'; +import { camelCaseRequestWrapper } from './utils'; +import { Verification } from "../resources/verification"; export class Client { constructor(authId, authToken, proxy) { @@ -48,5 +49,7 @@ export class Client { this.numbers = new NumberInterface(client); this.pricings = new PricingInterface(client); this.recordings = new RecordingInterface(client); + this.verification = new Verification(client); + } } diff --git a/lib/rest/client.js b/lib/rest/client.js index 894db589..6487ce75 100644 --- a/lib/rest/client.js +++ b/lib/rest/client.js @@ -1,17 +1,18 @@ -import {Request} from './request.js'; -import {camelCaseRequestWrapper} from './utils'; -import {name, version} from '../../package.json'; -import {CallInterface} from "../resources/call"; -import {SubaccountInterface, AccountInterface} from "../resources/accounts"; -import {ApplicationInterface} from "../resources/applications"; -import {ConferenceInterface} from "../resources/conferences"; -import {EndpointInterface} from "../resources/endpoints"; -import {MessageInterface} from "../resources/messages"; -import {NumberInterface} from "../resources/numbers"; -import {PricingInterface} from "../resources/pricings"; -import {RecordingInterface} from "../resources/recordings"; -import {Response} from "../utils/plivoxml"; -import {validateSignature} from "../utils/security"; +import { Request } from './request.js'; +import { camelCaseRequestWrapper } from './utils'; +import { name, version } from '../../package.json'; +import { CallInterface } from "../resources/call"; +import { SubaccountInterface, AccountInterface } from "../resources/accounts"; +import { ApplicationInterface } from "../resources/applications"; +import { ConferenceInterface } from "../resources/conferences"; +import { EndpointInterface } from "../resources/endpoints"; +import { MessageInterface } from "../resources/messages"; +import { NumberInterface } from "../resources/numbers"; +import { PricingInterface } from "../resources/pricings"; +import { RecordingInterface } from "../resources/recordings"; +import { Response } from "../utils/plivoxml"; +import { validateSignature } from "../utils/security"; +import { Verification } from "../resources/verification"; exports.Response = function () { return new Response(); @@ -45,7 +46,10 @@ export class Client { authId: authId, authToken: authToken, version: 'v1', - url: 'https://api.plivo.com/v1/Account/' + authId, + // url: 'https://api.plivo.com/v1/Account/' + authId, + // url: 'https://api.test.plivo.com/v1/Account/' + authId, + url: 'https://api.numbers.plivodev.com/v1/Account/' + authId, + userAgent: `${'plivo-node'}/${version || 'Unknown Version'} (Node: ${process.version})`, }, options); @@ -61,5 +65,6 @@ export class Client { this.numbers = new NumberInterface(client); this.pricings = new PricingInterface(client); this.recordings = new RecordingInterface(client); + this.verification = new Verification(client); } } diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 057e0bb6..1bf98e50 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -35,7 +35,7 @@ export function Request(config) { } return new Promise((resolve, reject) => { - // LiveCall - needs to be at top + // LiveCall - needs to be at top if (method === 'GET' && action === 'Call/6653422-91b6-4716-9fad-9463daaeeec2/' && params.status === 'live') { resolve({ response: {}, @@ -184,7 +184,7 @@ export function Request(config) { // } // // - // Accounts + // Accounts if (action == '' && method == 'GET') { resolve({ response: {}, @@ -215,7 +215,7 @@ export function Request(config) { }); } - if(action === 'Subaccount/' && method === 'POST') { + if (action === 'Subaccount/' && method === 'POST') { resolve({ response: {}, body: { @@ -295,7 +295,7 @@ export function Request(config) { if (action == 'Subaccount/1/' && method == 'DELETE') { resolve({ response: {}, - body: { } + body: {} }); } @@ -517,7 +517,7 @@ export function Request(config) { if (method == 'DELETE' && action == 'Conference/MyConf/Member/1/Deaf/') { resolve({ response: {}, - body: { } + body: {} }); } @@ -568,7 +568,7 @@ export function Request(config) { if (method == 'DELETE' && action == 'Conference/MyConf/Record/') { resolve({ response: {}, - body: { } + body: {} }); } @@ -1068,7 +1068,120 @@ export function Request(config) { if (method == 'DELETE' && action == 'Recording/1/') { resolve({ response: {}, - body: { } + body: {} + }); + } + + // ============= Identity Verification =================== + // List identities + if (method == 'GET' && action == 'Verification/Identity/') { + resolve({ + response: {}, + body: + { + api_id: '0b163520-2443-11e9-8480-0242ac110004', + meta: + { + limit: 3, + next: + 'https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/?offset=3', + offset: 0, + previous: null, + total_count: 116 + }, + objects: [{ + "id": "11200986643200", + "account": "MAMTI0ZWVIMDC5MMRIOT", + "addressLine1": "32432", + "addressLine2": "23432", + "addressProofType": "identity", + "alias": null, + "city": "324", + "countryIso": "US", + "documentDetails": { + "addressLine1": "32432", + "addressLine2": "23432", + "city": "324", + "firstName": "test", + "idNumber": "ashish", + "lastName": "test", + "nationality": "TT", + "postalCode": "23432", + "proofType": "ed", + "region": "324", + "salutation": "Mr" + }, + "firstName": "test", + "idNumber": "ashish", + "iso3": "USA", + "lastName": "test", + "nationality": "TT", + "pk": 216, + "postalCode": "23432", + "proofType": "ed", + "region": "324", + "salutation": "Mr", + "subaccount": null, + "url": "https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Download/Document/11200986643200/", + "validationStatus": "accepted", + "verificationStatus": "pending" + }] + } + }); + } + //GEt identity details + if (method == 'GET' && action == 'Verification/Identity/27658110766647/') { + resolve({ + response: {}, + body: + { + "id": "11200986643200", + "account": "MAMTI0ZWVIMDC5MMRIOT", + "addressLine1": "32432", + "addressLine2": "23432", + "addressProofType": "identity", + "alias": null, + "city": "324", + "countryIso": "US", + "documentDetails": { + "addressLine1": "32432", + "addressLine2": "23432", + "city": "324", + "firstName": "test", + "idNumber": "ashish", + "lastName": "test", + "nationality": "TT", + "postalCode": "23432", + "proofType": "ed", + "region": "324", + "salutation": "Mr" + }, + "firstName": "test", + "idNumber": "ashish", + "iso3": "USA", + "lastName": "test", + "nationality": "TT", + "pk": 216, + "postalCode": "23432", + "proofType": "ed", + "region": "324", + "salutation": "Mr", + "subaccount": null, + "url": "https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Download/Document/11200986643200/", + "validationStatus": "accepted", + "verificationStatus": "pending" + } + }); + } + //Create identity details + if (method == 'POST' && action == 'Verification/Identity/') { + resolve({ + response: {}, + body: + { + api_id: 'e731f42c-2443-11e9-8480-0242ac110004', + message: 'Your request has been accepted.' + } }); } diff --git a/lib/rest/request.js b/lib/rest/request.js index ac994089..14a48f58 100644 --- a/lib/rest/request.js +++ b/lib/rest/request.js @@ -5,7 +5,7 @@ import * as _ from "lodash"; export function Request(config) { let auth = 'Basic ' + new Buffer(config.authId + ':' + config.authToken) - .toString('base64'); + .toString('base64'); let headers = { Authorization: auth, @@ -34,14 +34,15 @@ export function Request(config) { if (typeof config.timeout !== 'undefined') { options.timeout = config.timeout; } - + console.log('==> dummy data', action, method); return new Promise((resolve, reject) => { + console.log('request options', options); request(options, (error, response, body) => { if (error) { reject(error); return; } - + console.log('Response =>', response.statusCode, body); const exceptionClass = { 400: Exceptions.InvalidRequestError, 401: Exceptions.AuthenticationError, @@ -59,7 +60,7 @@ export function Request(config) { } } else { let body = response.body; - resolve({response: response, body: body}); + resolve({ response: response, body: body }); } }); }); diff --git a/lib/rest/utils.js b/lib/rest/utils.js index 81f4cf3b..bee8b7d3 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -22,7 +22,11 @@ export function camelCaseRequestWrapper(requestFunc) { return (method, action, params) => { params = recursivelyRenameObject(params, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; + + if (key == 'address_line1' || key == 'address_line2') { + return key; + } return _snakeCase(key) .replace('_less_than', '__lt') @@ -35,7 +39,7 @@ export function camelCaseRequestWrapper(requestFunc) { return requestFunc(method, action, params).then(res => { res.body = recursivelyRenameObject(res.body, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; return _camelCase(key); }); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..c0c3715c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5580 @@ +{ + "name": "plivo", + "version": "4.0.5", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", + "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-eslint": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-6.1.2.tgz", + "integrity": "sha1-UpNBn+NnLWZZjTJ9qWlFZ7pqXy8=", + "dev": true, + "requires": { + "babel-traverse": "^6.0.20", + "babel-types": "^6.0.19", + "babylon": "^6.0.18", + "lodash.assign": "^4.0.0", + "lodash.pickby": "^4.0.0" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-istanbul": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/babel-istanbul/-/babel-istanbul-0.12.2.tgz", + "integrity": "sha1-5yPwfJokMtiAVVILwi519cI5Fhw=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "multi-glob": "^1.0.1", + "nopt": "3.x", + "object-assign": "^4.0.1", + "once": "1.x", + "resolve": "^1.1.0", + "source-map": "0.4.x", + "supports-color": "3.1.x", + "which": "1.2.x", + "wordwrap": "1.0.x" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "dev": true + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "dev": true, + "requires": { + "babel-plugin-syntax-flow": "^6.18.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-es2015": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.9.0.tgz", + "integrity": "sha1-leRxasRIHfswmZy1wRGBThraD0E=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.3.13", + "babel-plugin-transform-es2015-arrow-functions": "^6.3.13", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13", + "babel-plugin-transform-es2015-block-scoping": "^6.9.0", + "babel-plugin-transform-es2015-classes": "^6.9.0", + "babel-plugin-transform-es2015-computed-properties": "^6.3.13", + "babel-plugin-transform-es2015-destructuring": "^6.9.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.6.0", + "babel-plugin-transform-es2015-for-of": "^6.6.0", + "babel-plugin-transform-es2015-function-name": "^6.9.0", + "babel-plugin-transform-es2015-literals": "^6.3.13", + "babel-plugin-transform-es2015-modules-commonjs": "^6.6.0", + "babel-plugin-transform-es2015-object-super": "^6.3.13", + "babel-plugin-transform-es2015-parameters": "^6.9.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.3.13", + "babel-plugin-transform-es2015-spread": "^6.3.13", + "babel-plugin-transform-es2015-sticky-regex": "^6.3.13", + "babel-plugin-transform-es2015-template-literals": "^6.6.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.6.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.3.13", + "babel-plugin-transform-regenerator": "^6.9.0" + } + }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "^6.22.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base-64": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", + "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "bufferstreams": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.1.3.tgz", + "integrity": "sha512-HaJnVuslRF4g2kSDeyl++AaVizoitCpL9PglzCYwy0uHHyvWerfvEb8jWmYbF1z4kiVFolGomnxSGl+GUQp2jg==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "build-url": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/build-url/-/build-url-1.3.2.tgz", + "integrity": "sha512-L6H0SvNHEQC3GaTh07IdQ04BbERtccx6rHEBpprU2vPerYY2n0qyU2jb2Un5T7xgGhoCrP5Br1ThO6jH3pR5ow==" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffeescript": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.3.2.tgz", + "integrity": "sha512-YObiFDoukx7qPBi/K0kUKyntEZDfBQiqs/DbrR1xzASKOBjGT7auD85/DiPeRr9k++lRj7l3uA9TNMLfyfcD/Q==", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.3.tgz", + "integrity": "sha512-l00tmFFZOBHtYhN4Cz7k32VM7vTn3rE2ANjQDxdEN6zmXZ/xq1jQuutnmHvMG1ZJ7xd72+TA5YpUK8wz3rWsfQ==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "coveralls": { + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz", + "integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==", + "dev": true, + "requires": { + "js-yaml": "3.6.1", + "lcov-parse": "0.0.10", + "log-driver": "1.2.5", + "minimist": "1.2.0", + "request": "2.79.0" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "js-yaml": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", + "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "dev": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "qs": "~6.3.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1", + "uuid": "^3.0.0" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "^1.4.1" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + } + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "requires": { + "boom": "2.x.x" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "es5-ext": { + "version": "0.10.47", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.47.tgz", + "integrity": "sha512-/1TItLfj+TTfWoeRcDn/0FbGV6SNo4R+On2GGVucPU/j3BWnXE2Co8h8CTo4Tu34gFJtnmwS9xiScKs4EjZhdw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.5.2", + "debug": "^2.1.1", + "doctrine": "^2.0.0", + "escope": "^3.6.0", + "espree": "^3.4.0", + "esquery": "^1.0.0", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.14.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~2.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" + } + }, + "eslint-config-xo": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.17.0.tgz", + "integrity": "sha1-Hn1Khr9JF5gFxGIugyp7G+606IE=", + "dev": true + }, + "eslint-config-xo-space": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-space/-/eslint-config-xo-space-0.15.0.tgz", + "integrity": "sha1-EXSjdsFZr9AyldWhypxIj7U3nNA=", + "dev": true, + "requires": { + "eslint-config-xo": "^0.17.0" + } + }, + "eslint-plugin-babel": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-babel/-/eslint-plugin-babel-3.3.0.tgz", + "integrity": "sha1-L0lK7c9vSqTnW5FVmAg3vB+94ZM=", + "dev": true + }, + "eslint-plugin-flowtype": { + "version": "2.50.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.3.tgz", + "integrity": "sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz", + "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, + "flow-bin": { + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.47.0.tgz", + "integrity": "sha1-oqCKs+DR8ctX0X4nswsRi2L9o2c=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "formatio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.2.0.tgz", + "integrity": "sha1-87IWfZBoxGmKjVH092CjmlTYGOs=", + "dev": true, + "requires": { + "samsam": "1.x" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "~0.1.0" + } + }, + "generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dev": true, + "requires": { + "is-property": "^1.0.2" + } + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "^1.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "^4.3.1", + "glob2base": "^0.0.12", + "minimatch": "^2.0.1", + "ordered-read-streams": "^0.1.0", + "through2": "^0.6.1", + "unique-stream": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "^0.5.1" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "^0.1.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "~3.1.21", + "lodash": "~1.0.1", + "minimatch": "~0.2.11" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "~1.2.0", + "inherits": "1", + "minimatch": "~0.2.11" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2", + "sigmund": "~1.0.0" + } + } + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "^1.0.0", + "chalk": "^1.0.0", + "deprecated": "^0.0.1", + "gulp-util": "^3.0.0", + "interpret": "^1.0.0", + "liftoff": "^2.1.0", + "minimist": "^1.1.0", + "orchestrator": "^0.3.0", + "pretty-hrtime": "^1.0.0", + "semver": "^4.1.0", + "tildify": "^1.0.0", + "v8flags": "^2.0.2", + "vinyl-fs": "^0.3.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "gulp-babel": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/gulp-babel/-/gulp-babel-6.1.3.tgz", + "integrity": "sha512-tm15R3rt4gO59WXCuqrwf4QXJM9VIJC+0J2NPYSC6xZn+cZRD5y5RPGAiHaDxCJq7Rz5BDljlrk3cEjWADF+wQ==", + "dev": true, + "requires": { + "babel-core": "^6.23.1", + "object-assign": "^4.0.1", + "plugin-error": "^1.0.1", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.0" + } + }, + "gulp-babel-istanbul": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-babel-istanbul/-/gulp-babel-istanbul-1.6.0.tgz", + "integrity": "sha1-SxRj2daUP6C7uWlA1qa3cBwVWjI=", + "dev": true, + "requires": { + "babel-core": "^6.21.0", + "babel-istanbul": "^0.12.1", + "babel-preset-es2015": "^6.18.0", + "gulp-util": "^3.0.8", + "lodash": "^4.17.4", + "through2": "^2.0.3" + }, + "dependencies": { + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + } + } + }, + "gulp-coveralls": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/gulp-coveralls/-/gulp-coveralls-0.1.4.tgz", + "integrity": "sha1-L2IKyN9i0LhrS73mTaNnzEGhkMk=", + "dev": true, + "requires": { + "coveralls": "^2.11.2", + "gulp-util": "^3.0.4", + "through2": "^1.1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", + "integrity": "sha1-CEfLxESfNAVXTb3M2buEG4OsNUU=", + "dev": true, + "requires": { + "readable-stream": ">=1.1.13-1 <1.2.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + } + } + }, + "gulp-eslint": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-3.0.1.tgz", + "integrity": "sha1-BOV+PhjGl0JnwSz2hV3HF9SjE70=", + "dev": true, + "requires": { + "bufferstreams": "^1.1.1", + "eslint": "^3.0.0", + "gulp-util": "^3.0.6" + } + }, + "gulp-exclude-gitignore": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gulp-exclude-gitignore/-/gulp-exclude-gitignore-1.2.0.tgz", + "integrity": "sha512-J3LCmz9C1UU1pxf5Npx6SNc5o9YQptyc9IHaqLiBlihZmg44jaaTplWUZ0JPQkMdOTae0YgEDvT9TKlUWDSMUA==", + "dev": true, + "requires": { + "gulp-ignore": "^2.0.2" + } + }, + "gulp-ignore": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/gulp-ignore/-/gulp-ignore-2.0.2.tgz", + "integrity": "sha1-XC6ioKRALgq0orzRLv2SlTRNePI=", + "dev": true, + "requires": { + "gulp-match": "^1.0.3", + "through2": "^2.0.1" + } + }, + "gulp-istanbul": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gulp-istanbul/-/gulp-istanbul-1.1.3.tgz", + "integrity": "sha512-uMLSdqPDnBAV/B9rNyOgVMgrVC1tPbe+5GH6P13UOyxbRDT/w4sKYHWftPMA8j9om+NFvfeRlqpDXL2fixFWNA==", + "dev": true, + "requires": { + "istanbul": "^0.4.0", + "istanbul-threshold-checker": "^0.2.1", + "lodash": "^4.0.0", + "plugin-error": "^0.1.2", + "through2": "^2.0.0", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-line-ending-corrector": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gulp-line-ending-corrector/-/gulp-line-ending-corrector-1.0.3.tgz", + "integrity": "sha512-l68bon1Bbni5S5boKqya3MiwDGn8f6XGV7fsmOokkS+etVk/LY+OhFm24xy0Jlo8Xf0Rx4LsDNhmdzUGIaw7Yg==", + "dev": true, + "requires": { + "coffeescript": "^2.0.3", + "line-ending-corrector": "^1.0.1", + "plugin-error": "^1.0.1", + "through2": "^2.0.0" + } + }, + "gulp-match": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.0.3.tgz", + "integrity": "sha1-kcfA1/Kb7NZgbVfYCn+Hdqh6uo4=", + "dev": true, + "requires": { + "minimatch": "^3.0.3" + } + }, + "gulp-mocha": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-3.0.1.tgz", + "integrity": "sha1-qwyiw5QDcYF03drXUOY6Yb4X4EE=", + "dev": true, + "requires": { + "gulp-util": "^3.0.0", + "mocha": "^3.0.0", + "plur": "^2.1.0", + "req-cwd": "^1.0.1", + "temp": "^0.8.3", + "through": "^2.3.4" + } + }, + "gulp-plumber": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/gulp-plumber/-/gulp-plumber-1.2.1.tgz", + "integrity": "sha512-mctAi9msEAG7XzW5ytDVZ9PxWMzzi1pS2rBH7lA095DhMa6KEXjm+St0GOCc567pJKJ/oCvosVAZEpAey0q2eQ==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "fancy-log": "^1.3.2", + "plugin-error": "^0.1.2", + "through2": "^2.0.3" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^2.0.0", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "handlebars": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, + "requires": { + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true + }, + "is-my-json-valid": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz", + "integrity": "sha512-mG0f/unGX1HZ5ep4uhRaPOS8EkAY8/j6mDRMJrutq4CqhoJWYp7qAlonIPy3TV7p3ju4TK9fo/PbnoksWmsp5Q==", + "dev": true, + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isparta": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/isparta/-/isparta-4.1.1.tgz", + "integrity": "sha512-kGwkNqmALQzdfGhgo5o8kOA88p14R3Lwg0nfQ/qzv4IhB4rXarT9maPMaYbo6cms4poWbeulrlFlURLUR6rDwQ==", + "dev": true, + "requires": { + "babel-core": "^6.1.4", + "escodegen": "^1.6.1", + "esprima": "^4.0.0", + "istanbul": "0.4.5", + "mkdirp": "^0.5.0", + "nomnomnomnom": "^2.0.0", + "object-assign": "^4.0.1", + "source-map": "^0.5.0", + "which": "^1.0.9" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-threshold-checker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.1.tgz", + "integrity": "sha1-xdyU6PLMXNP/0zVFL4S1U8QkgzE=", + "dev": true, + "requires": { + "istanbul": "~0.4.5", + "lodash": "~4.17.2" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "line-ending-corrector": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/line-ending-corrector/-/line-ending-corrector-1.0.1.tgz", + "integrity": "sha1-WGN+//piwZo29AGPI4i6jTHayQA=", + "dev": true, + "requires": { + "coffeescript": "^2.0.3" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "^3.0.0" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.pickby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz", + "integrity": "sha1-feoh2MGNdwOifHBMFdO4SmfjOv8=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0" + } + }, + "log-driver": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", + "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=", + "dev": true + }, + "lolex": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", + "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "requires": { + "mime-db": "~1.37.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "dependencies": { + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multi-glob": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/multi-glob/-/multi-glob-1.0.2.tgz", + "integrity": "sha512-sUBlFqEARG0FhuI7dELtmLmC+vGHz0supHIMntXazUjzV7hV34dK7LXWtpgD/L29tHsWoui91pLD+vjRnk6PVw==", + "dev": true, + "requires": { + "glob": "5.x" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", + "dev": true + }, + "natives": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz", + "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nomnomnomnom": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nomnomnomnom/-/nomnomnomnom-2.0.1.tgz", + "integrity": "sha1-siOfAxyNBNpn4yg24eMZnhL3qOI=", + "dev": true, + "requires": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "~0.1.5", + "sequencify": "~0.0.7", + "stream-consume": "~0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "^1.0.0" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "mute-stream": "0.0.5" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "req-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-1.0.1.tgz", + "integrity": "sha1-DXOurpJm5penj3l2AZZ352rPD/8=", + "dev": true, + "requires": { + "req-from": "^1.0.1" + } + }, + "req-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-1.0.1.tgz", + "integrity": "sha1-v4HaUUeUfTLRO5R9wSpYrUWHNQ4=", + "dev": true, + "requires": { + "resolve-from": "^2.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "dev": true + } + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, + "requires": { + "once": "^1.3.0" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "sinon": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-2.4.1.tgz", + "integrity": "sha512-vFTrO9Wt0ECffDYIPSP/E5bBugt0UjcBQOfQUMh66xzkyPEnhl/vM2LRZi2ajuTdkH07sA6DzrM6KvdvGIH8xw==", + "dev": true, + "requires": { + "diff": "^3.1.0", + "formatio": "1.2.0", + "lolex": "^1.6.0", + "native-promise-only": "^0.8.1", + "path-to-regexp": "^1.7.0", + "samsam": "^1.1.3", + "text-encoding": "0.6.4", + "type-detect": "^4.0.0" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-consume": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", + "chalk": "^1.1.1", + "lodash": "^4.0.0", + "slice-ansi": "0.0.4", + "string-width": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "uri-parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-parser/-/uri-parser-1.0.1.tgz", + "integrity": "sha512-TRjjM2M83RD9jIIYttNj7ghUQTKSov+WXZbQIMM8DxY1R1QdJEGWNKKMYCxyeOw1p9re2nQ85usM6dPTVtox1g==" + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "utf8": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + }, + "dependencies": { + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + } + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "^1.0.0", + "glob-stream": "^3.1.5", + "glob-watcher": "^0.0.6", + "graceful-fs": "^3.0.0", + "mkdirp": "^0.5.0", + "strip-bom": "^1.0.0", + "through2": "^0.6.1", + "vinyl": "^0.4.0" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "^1.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "^1.0.0", + "is-utf8": "^0.2.0" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "^0.2.0", + "clone-stats": "^0.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + } + } +} diff --git a/package.json b/package.json index d2c158f1..f5842b7a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "gulp-istanbul": "^1.0.0", "gulp-line-ending-corrector": "^1.0.1", "gulp-mocha": "^3.0.1", - "gulp-nsp": "^2.1.0", "gulp-plumber": "^1.0.0", "isparta": "^4.0.0", "sinon": "^2.1.0" diff --git a/test/test.verification.js b/test/test.verification.js new file mode 100644 index 00000000..37a46e84 --- /dev/null +++ b/test/test.verification.js @@ -0,0 +1,85 @@ +import { + Client + // } from '../lib/rest/client'; +} from '../lib/rest/client-test'; + +// let authId = 'MAZJJKMWNLZJNIYJKYYT'; +// let authToken = 'ZTQyYjI5NjkyMWE2N2YzMmM3ZWZiYWQ1YWI1NzAw'; + +let authId = 'MAMTI0ZWVIMDC5MMRIOT'; +let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; + + +// let authId = 'auth_id'; +// let authToken = 'auth_token'; + + +let client = new Client(authId, authToken); + +describe('IdentityVerification Interface', function () { + + // it('Get Identity List', function () { + // client.verification.list_all_identity().then(function (identityList) { + // console.log('identity list is =>', JSON.stringify(identityList)); + // }); + // }); + + // it('Get Identity Details', function () { + // client.verification.retreive_identity(27658110766647).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + // }); + // }); + + // it('Create Identity', function () { + + // client.verification.create_identity('IN', '9274222998', 'Mr', 'aBCD', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // }); + + // }); + + it('Update Identity', function () { + }); + + it('Delete Identity', function () { + }); + + it('Dummy', function () { + // await client.verification.retreive_address(5); + + // let addressList = await client.verification.list_all_addresses(); + // console.log('addreess list is =>', JSON.stringify(addressList)); + + // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + // console.log('address Create is=>',JSON.stringify(addressCreate)); + + // await client.verification.delete_address(5); + + // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + + + // await client.verification.retreive_identity(5); + + // Get identity list + + + // Get Identity Details + + + + + // Delete identity + // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ + // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } + // client.verification.delete_identity(20594710404052).then(function (identityDelete) { + // console.log('identity Delete result =>', JSON.stringify(identityDelete)); + // }); + + + // client.verification.update_identity('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + // }); + + }); + +}); From fe3eb6a36bc7bbf16476f21b88f3949cd7148efd Mon Sep 17 00:00:00 2001 From: patelravi Date: Thu, 31 Jan 2019 18:33:19 +0530 Subject: [PATCH 04/35] Mid commit. --- lib/rest/request-test.js | 83 +++++++++++++++++++++++++++++++++++++ test/test.verification.js | 86 ++++++++++++++++++++++++++++----------- 2 files changed, 146 insertions(+), 23 deletions(-) diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 1bf98e50..fa447ed2 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1185,6 +1185,89 @@ export function Request(config) { }); } + + // ============= Address Verification =================== + // List Addresses + if (method == 'GET' && action == 'Verification/Address/') { + resolve({ + response: {}, + body: { + meta: + { + limit: 3, + next: + 'https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Address/?offset=3', + offset: 0, + previous: null, + total_count: 378 + }, + objects: + [{ + account: 'MAMTI0ZWVIMDC5MMRIOT', + address_line1: '2929 Walker Ave NW', + address_line2: 'MI', + address_proof_type: 'address', + alias: '', + city: 'Grand Rapids', + country_iso: 'US', + document_details: [Object], + first_name: 'Ashish', + id: '', + iso3: 'USA', + last_name: 'Ranjan', + pk: 154, + postal_code: '49544', + region: 'Grand Rapids', + salutation: 'Mr', + subaccount: null, + url: + 'https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Download/Document//', + validation_status: 'rejected', + verification_status: 'pending' + }] + } + }); + } + + //Get Address Detail By Document Id + if (method == 'GET' && action == 'Verification/Address/14632037725844/') { + resolve({ + response: {}, + body: + { + account: 'MAMTI0ZWVIMDC5MMRIOT', + address_line1: '2929 Walker Ave NW', + address_line2: 'MI', + address_proof_type: 'address', + alias: '', + city: 'Grand Rapids', + country_iso: 'US', + document_details: [Object], + first_name: 'Ashish', + id: '', + iso3: 'USA', + last_name: 'Ranjan', + pk: 154, + postal_code: '49544', + region: 'Grand Rapids', + salutation: 'Mr', + subaccount: null, + url: + 'https://api.test.plivo.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Download/Document//', + validation_status: 'rejected', + verification_status: 'pending' + } + }); + } + + //Create Address Detail By Document Id + if (method == 'POST' && action == 'Verification/Address/') { + resolve({ + response: {}, + body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } + }); + } + reject(new Error('not found')); }); }; diff --git a/test/test.verification.js b/test/test.verification.js index 37a46e84..b9fc65c6 100644 --- a/test/test.verification.js +++ b/test/test.verification.js @@ -39,47 +39,87 @@ describe('IdentityVerification Interface', function () { // }); it('Update Identity', function () { - }); - it('Delete Identity', function () { + client.verification.update_identity('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { + console.log('identity update result =>', JSON.stringify(updateResult)); + }); + }); - it('Dummy', function () { - // await client.verification.retreive_address(5); + // it('Delete Identity', function () { + // }); - // let addressList = await client.verification.list_all_addresses(); - // console.log('addreess list is =>', JSON.stringify(addressList)); + // it('Dummy', function () { + // // await client.verification.retreive_address(5); - // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); - // console.log('address Create is=>',JSON.stringify(addressCreate)); + // // let addressList = await client.verification.list_all_addresses(); + // // console.log('addreess list is =>', JSON.stringify(addressList)); - // await client.verification.delete_address(5); + // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + // // console.log('address Create is=>',JSON.stringify(addressCreate)); - // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + // // await client.verification.delete_address(5); + // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); - // await client.verification.retreive_identity(5); - // Get identity list + // // await client.verification.retreive_identity(5); + // // Get identity list - // Get Identity Details + // // Get Identity Details - // Delete identity - // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ - // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } - // client.verification.delete_identity(20594710404052).then(function (identityDelete) { - // console.log('identity Delete result =>', JSON.stringify(identityDelete)); - // }); + // // Delete identity + // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ + // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } + // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { + // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); + // // }); - // client.verification.update_identity('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { - // console.log('identity update result =>', JSON.stringify(updateResult)); - // }); - }); + + // }); + +}); + +describe('AddressVerification Interface', function () { + + // it('Get Address List', function () { + // client.verification.list_all_addresses().then(function (addressList) { + // console.log('addressList list is =>', JSON.stringify(addressList)); + // }); + // }); + + // it('Get Address Details', function () { + // client.verification.retreive_address(14632037725844).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + // }); + // }); + + // it('Create Address', function () { + + // client.verification.create_address('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (createResponse) { + // console.log('address Create response =>', JSON.stringify(createResponse)); + // }); + + // }); + + // it('Update Address', function () { + + // // client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (updateResponse) { + // // console.log('address update response =>', JSON.stringify(updateResponse)); + // // }); + + // }); + + // it('Delete Address', function () { + // client.verification.delete_address(20594710404052).then(function (deleteResult) { + // console.log('address delete result =>', JSON.stringify(deleteResult)); + // }); + // }); }); From f59cfc311458f1985bb21ee44aeebf7af2e13559 Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 4 Feb 2019 11:40:19 +0530 Subject: [PATCH 05/35] Resolving nsp issue. --- gulpfile.js | 11 +++-------- package.json | 3 +-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b8010bf0..371cdcb5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,6 @@ var eslint = require('gulp-eslint'); var excludeGitignore = require('gulp-exclude-gitignore'); var mocha = require('gulp-mocha'); var istanbul = require('gulp-babel-istanbul'); -var nsp = require('gulp-nsp'); var plumber = require('gulp-plumber'); var coveralls = require('gulp-coveralls'); var babel = require('gulp-babel'); @@ -31,10 +30,6 @@ gulp.task('static', function () { .pipe(eslint.failAfterError()); }); -gulp.task('nsp', function (cb) { - nsp({package: path.resolve('package.json')}, cb); -}); - gulp.task('pre-test', function () { return gulp.src('lib/**/*.js') .pipe(excludeGitignore()) @@ -50,10 +45,10 @@ gulp.task('test', ['pre-test'], function (cb) { gulp.src('test/**/*.js') .pipe(plumber()) - .pipe(mocha({reporter: 'spec'})) + .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { mochaErr = err; - throw(err) + throw (err) }) .pipe(istanbul.writeReports()) .on('end', function () { @@ -93,5 +88,5 @@ gulp.task('clean', function () { return del('dist'); }); -gulp.task('prepublish', ['nsp', 'babel']); +gulp.task('prepublish', ['babel']); gulp.task('default', ['static', 'test', 'coveralls']); diff --git a/package.json b/package.json index d2c158f1..a72378e6 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "gulp-istanbul": "^1.0.0", "gulp-line-ending-corrector": "^1.0.1", "gulp-mocha": "^3.0.1", - "gulp-nsp": "^2.1.0", "gulp-plumber": "^1.0.0", "isparta": "^4.0.0", "sinon": "^2.1.0" @@ -67,4 +66,4 @@ "uri-parser": "^1.0.0", "utf8": "^2.1.2" } -} +} \ No newline at end of file From f0993bfab1057e9b79cda81129d880414aa1698f Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 15:41:48 +0530 Subject: [PATCH 06/35] Added node version to check logs. --- gulpfile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 371cdcb5..6898f9cf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,6 +43,8 @@ gulp.task('pre-test', function () { gulp.task('test', ['pre-test'], function (cb) { var mochaErr; + console.log('Running tests with node version', process.version); + gulp.src('test/**/*.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) From d52b14dfeda07ce89df0053aa44f7a18bf790b0e Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:24:25 +0530 Subject: [PATCH 07/35] Added travis ci config file. --- .circleci/config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..b1104427 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2 # use CircleCI 2.0 +jobs: # a collection of steps + build: # runs not using Workflows must have a `build` job as entry point + working_directory: ~/# directory where steps will run + docker: # run the steps with Docker + - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run + steps: # a collection of executable commands + - checkout # special step to check out source code to working directory + - run: + name: update-npm + command: 'sudo npm install -g npm@latest' + - restore_cache: # special step to restore the dependency cache + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + key: dependency-cache-{{ checksum "package.json" }} + - run: + name: install-npm-wee + command: npm install + - save_cache: # special step to save the dependency cache + key: dependency-cache-{{ checksum "package.json" }} + paths: + - ./node_modules + - run: # run tests + name: test + command: gulp + \ No newline at end of file From ccf35eab71e74bdeed4838a9e0ec36c44a095c7a Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:28:42 +0530 Subject: [PATCH 08/35] Added permision for circle ci --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b1104427..0be1df54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,9 @@ jobs: # a collection of steps - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # special step to check out source code to working directory + - run: + name: file-permission + command: 'chown -R $USER:$USER /path/to/directory' - run: name: update-npm command: 'sudo npm install -g npm@latest' From 7347071fc36e1c724ee9b99d89851fe0f7f83b68 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:33:01 +0530 Subject: [PATCH 09/35] Resolving circle ci issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0be1df54..14eebba7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: # a collection of steps - checkout # special step to check out source code to working directory - run: name: file-permission - command: 'chown -R $USER:$USER /path/to/directory' + command: 'chown -R $USER:$USER /home/circleci' - run: name: update-npm command: 'sudo npm install -g npm@latest' From 6f81511bd4ab5f67b1c892a68eeee30464a1d8ea Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:34:44 +0530 Subject: [PATCH 10/35] Modified circle ci configuration. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14eebba7..419347d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,14 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: ~/# directory where steps will run + working_directory: ~/ # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - - checkout # special step to check out source code to working directory - run: name: file-permission - command: 'chown -R $USER:$USER /home/circleci' + command: 'chown -R $USER:$USER ~/' + - checkout # special step to check out source code to working directory - run: name: update-npm command: 'sudo npm install -g npm@latest' From 4d73cf47d25cb0693fc2cb50a92917f4f0402de3 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:37:53 +0530 Subject: [PATCH 11/35] Resolving circle ci config issue. --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 419347d7..230cd2fc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,10 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: ~/ # directory where steps will run + working_directory: /tmp # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - - run: - name: file-permission - command: 'chown -R $USER:$USER ~/' - checkout # special step to check out source code to working directory - run: name: update-npm From ac004f581247c4e007c1bbcb77020bcd28b29b39 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:40:10 +0530 Subject: [PATCH 12/35] Resolving circle ci config issue. --- .circleci/config.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 230cd2fc..dbe4cae8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,16 +9,9 @@ jobs: # a collection of steps - run: name: update-npm command: 'sudo npm install -g npm@latest' - - restore_cache: # special step to restore the dependency cache - # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ - key: dependency-cache-{{ checksum "package.json" }} - run: name: install-npm-wee command: npm install - - save_cache: # special step to save the dependency cache - key: dependency-cache-{{ checksum "package.json" }} - paths: - - ./node_modules - run: # run tests name: test command: gulp From cee782bb178f0cdd90a9ec0791180e1c6bf411f6 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:42:31 +0530 Subject: [PATCH 13/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dbe4cae8..3d82e1be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: /tmp # directory where steps will run + working_directory: ~/src # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands From 4d149666f0df6d00f8eb98692eb1aded6d002805 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:49:01 +0530 Subject: [PATCH 14/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d82e1be..509288fc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/src # directory where steps will run docker: # run the steps with Docker - - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run + - image: circleci/node:11.9.0 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # special step to check out source code to working directory - run: From f05a46cfc5e2b4882b2028991d7f4374baf7ea30 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:51:51 +0530 Subject: [PATCH 15/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 509288fc..d8c143fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: install-npm-wee - command: npm install + command: npm install --dev - run: # run tests name: test command: gulp From bd997ab0a86a9c9c84bbe8f10ffbb79ebca63633 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:52:59 +0530 Subject: [PATCH 16/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8c143fa..ec38db18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,5 +14,5 @@ jobs: # a collection of steps command: npm install --dev - run: # run tests name: test - command: gulp + command: 'gulp' \ No newline at end of file From c028a973aec166a97788cafd74336faa39867d85 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:53:58 +0530 Subject: [PATCH 17/35] Resolving circle ci config issue. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ec38db18..0d307b7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,8 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: install-npm-wee - command: npm install --dev + command: 'npm install --dev' - run: # run tests name: test - command: 'gulp' + command: 'gulp test' \ No newline at end of file From d63354d327c8198429e170deb1304f72104cd6b0 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:55:45 +0530 Subject: [PATCH 18/35] Resolving circle ci config issue. --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0d307b7b..a03bc400 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,9 @@ jobs: # a collection of steps - run: name: update-npm command: 'sudo npm install -g npm@latest' + - run: + name: update-npm + command: 'npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From 10764f52750720b55e1fc69eb9da10d42c1ae767 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:56:33 +0530 Subject: [PATCH 19/35] Resolving circle ci config issue. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a03bc400..ccb25677 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ jobs: # a collection of steps name: update-npm command: 'sudo npm install -g npm@latest' - run: - name: update-npm - command: 'npm install -g gulp' + name: update-gulp + command: 'npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From f98c27f82bbf85dead0a82f72efe5b385716639b Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:57:10 +0530 Subject: [PATCH 20/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ccb25677..b3449932 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: update-gulp - command: 'npm install -g gulp' + command: 'sudo npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From e2a9404a62a0d990998d754f842b0879fe7efae7 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:58:40 +0530 Subject: [PATCH 21/35] Resolving circle ci config issue. --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 6898f9cf..f272484d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -64,6 +64,7 @@ gulp.task('watch', function () { gulp.task('coveralls', ['test'], function () { if (!process.env.CI) { + console.log('ignoring coveralls report generation.'); return; } From 9aa744fc8e4a5a700a1187997acc4798313cf4f9 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 17:05:25 +0530 Subject: [PATCH 22/35] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3449932..4ee11596 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,5 +17,5 @@ jobs: # a collection of steps command: 'npm install --dev' - run: # run tests name: test - command: 'gulp test' + command: 'gulp' \ No newline at end of file From 49f873943b6a5843c13a3770497d0d94ce8b0574 Mon Sep 17 00:00:00 2001 From: Nixon Samuel Date: Wed, 6 Feb 2019 15:40:22 +0530 Subject: [PATCH 23/35] Bugfix: speak XML- accented characters to numeric expression. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1c0a6295..a261e998 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.0.6", + "version": "4.0.7", "description": "A Node.js SDK to make voice calls & send SMS using Plivo and to generate Plivo XML", "homepage": "https://github.com/plivo/plivo-node", "files": [ @@ -66,4 +66,4 @@ "uri-parser": "^1.0.0", "utf8": "^2.1.2" } -} \ No newline at end of file +} From 1cd835553ed67905f3951273ae54092fd86fb39a Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 10 Feb 2019 13:04:56 +0530 Subject: [PATCH 24/35] Finished address verification and identity verification. --- lib/base.js | 4 ++-- lib/resources/verification.js | 4 ++-- lib/rest/request-test.js | 21 +++++++++++++++-- lib/rest/request.js | 21 +++++++++++++++-- lib/rest/utils.js | 4 ++-- package-lock.json | 2 +- test/api_uploads/address_proof.png | Bin 0 -> 13547 bytes test/test.verification.js | 35 +++++++++++++++++++---------- 8 files changed, 68 insertions(+), 23 deletions(-) create mode 100644 test/api_uploads/address_proof.png diff --git a/lib/base.js b/lib/base.js index feb7a7ee..3c1b62b1 100644 --- a/lib/base.js +++ b/lib/base.js @@ -126,13 +126,13 @@ export class PlivoResourceInterface { }); } - create(params) { + create(params, requestConfig) { let client = this[clientKey]; let idField = this[idKey]; let action = this[actionKey] + (this.id ? this.id + '/' : ''); return new Promise((resolve, reject) => { - client('POST', action, params) + client('POST', action, params, requestConfig) .then(response => { resolve(new PlivoGenericResponse(response.body, idField)); }) diff --git a/lib/resources/verification.js b/lib/resources/verification.js index 59b64e35..f2b77a24 100644 --- a/lib/resources/verification.js +++ b/lib/resources/verification.js @@ -106,7 +106,7 @@ export class AddressVerificationInterface extends PlivoResourceInterface { fiscal_identification_code: fiscal_identification_code, street_code: street_code, municipal_code: municipal_code - }); + }, { isMultipart: true }); } } /* ---------------Identity method----------*/ @@ -221,7 +221,7 @@ export class IdentityVerificationInterface extends PlivoResourceInterface { fiscal_identification_code: fiscal_identification_code, street_code: street_code, municipal_code: municipal_code - }); + }, { isMultipart: true }); } diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index fa447ed2..2b1bd3be 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -11,13 +11,30 @@ export function Request(config) { 'Content-Type': 'application/json' }; - return (method, action, params) => { + //Here config is an optional parameter can have following keys + // isMultipart, saying if request to be made is multipart + return (method, action, params, requestConfig) => { + + // Build copy of original headers + var currentHeaders = JSON.parse(JSON.stringify(headers)); + + console.log('at requset ,request config', requestConfig); + if (requestConfig && requestConfig.isMultipart == true) { + currentHeaders['Content-Type'] = 'multipart/form-data'; + params.file = require('fs').createReadStream(params.file); + for (var key in params) { + if (params[key] === undefined || params[key] == null) { + params[key] = ''; + } + } + } + params = params || {}; var options = { url: config.url + '/' + action, method: method, formData: params || '', - headers: headers, + headers: currentHeaders, json: true }; diff --git a/lib/rest/request.js b/lib/rest/request.js index 14a48f58..921e1c46 100644 --- a/lib/rest/request.js +++ b/lib/rest/request.js @@ -13,12 +13,29 @@ export function Request(config) { 'Content-Type': 'application/json' }; - return (method, action, params) => { + //Here config is an optional parameter can have following keys + // isMultipart, saying if request to be made is multipart + return (method, action, params, requestConfig) => { + + // Build copy of original headers + var currentHeaders = JSON.parse(JSON.stringify(headers)); + + console.log('at requset ,request config', requestConfig); + if (requestConfig && requestConfig.isMultipart == true) { + currentHeaders['Content-Type'] = 'multipart/form-data'; + params.file = require('fs').createReadStream(params.file); + for (var key in params) { + if (params[key] === undefined || params[key] == null) { + params[key] = ''; + } + } + } + var options = { url: config.url + '/' + action, method: method, formData: params || '', - headers: headers, + headers: currentHeaders, json: true }; diff --git a/lib/rest/utils.js b/lib/rest/utils.js index bee8b7d3..71f9d8a3 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -19,7 +19,7 @@ function recursivelyRenameObject(object, renameFunc) { } export function camelCaseRequestWrapper(requestFunc) { - return (method, action, params) => { + return (method, action, params, requestConfig) => { params = recursivelyRenameObject(params, function (value, key) { if (typeof key !== 'string') return key; @@ -37,7 +37,7 @@ export function camelCaseRequestWrapper(requestFunc) { .replace('_equals', ''); }); - return requestFunc(method, action, params).then(res => { + return requestFunc(method, action, params, requestConfig).then(res => { res.body = recursivelyRenameObject(res.body, function (value, key) { if (typeof key !== 'string') return key; return _camelCase(key); diff --git a/package-lock.json b/package-lock.json index c0c3715c..c57dae1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.0.5", + "version": "4.0.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/test/api_uploads/address_proof.png b/test/api_uploads/address_proof.png new file mode 100644 index 0000000000000000000000000000000000000000..21675498f9c54a87ca08deab8d17b51501499417 GIT binary patch literal 13547 zcma)@^;=ZW|Mz#7rMtVkyFt23(glg7yStZ`Mx;v`=?(#50SU>KR%#IxM35DbM!vj1 z_djr-U*^m_UiCaXXZPA`W|E)lYvAM1-~a#sd@W5?BLDys1^|F$!Dvq-kME23pBk{U zlAaO((4L8VZ;Sra2l^XnC<9vN>3%+Sgr4h~sA>4`904zcv zHUS6|1B`}`hl`G5cf3Ci05AcxRFzCZz8;tAxm#*bB;w=C=TXG+{+h{ltVr$Zh#SD} zV;2OkMp3vHtT>d@#*{h`^Wn93Vte6XZ{xY)X-(i(O$c2&*tQiYK!rPLoR~!w6i0=8 zohTn-+xg55UtU!mnXJ?subg&Dcm)Q2xEegDIx3S!gSqo8>}+af%MQzp7y*b%A{bja zH6l6_zXO=K@-n}N!`=C?0KkMDXDx*tJ3RoF`mh2UHW{9x*sWgn9fT4Pi}05G^o`jJ z0|w|Ttlx2HNT>lS%JFIuEJ0`i)uJW)u}&m_MN*{x5UkD(!U#}Z(!uFV{|jWA0$*oQ zm|+3lo2;dx%f+yRn4Y7h6X7XNVbCyB0Y=D7%ZX!wMEX^h!&oB#teS@M9fyv@1dt+& zJUMXBgap7sZM5j^N6d>3Q|xyG=}WYk0AAUv8V+;W1DUeqO@W-^d=!9Dh~cW>Gz6fj z;+VK6f6#6T0Mo*R)6o_CsD(1n(U{VS=^rY|@nC%Y7NEo=3`G)^u-k+r3??K1j}RZm zlt^lYtN;?JynG2qApn{c4b3*QegLM##37jQ6DQ*N1qSYn^#hq=*<+)8Yl#5N$A)0J z!Sv}0#wijS)5_P;&Wo%IS&@fheJ3bCkw6qA3;gL`KJFuFLE|-9hrrKVzLiHfA zD7Ya^A++5Fa`-73Uc8-oHbYSOi?UZG4scP-)@py>uGq5a#40NHL&H8}0Mlp=;fYOtF}0v|5{%~Qdn)39{> zuf7PW1wcF-{1;k}X?PGg?Ho@Lymj`0CO5f-El-gI4_tnhviXUEPHfv3V^j>$p8osF z1N-SgVL8c8lEyYmyRePG6&j33mOe-9b*_Tb*r-AXHKs8)BzMbSgV9{y?eLMRU=7{g z&y})S-R})Yce5g0J(!S^0QXrobjH}>kYF1`!UfDAI13zyawXL7dmog;*HoKy|Fa(* z-P;Zqn0dI>{1xY>G3w^uOR-FFiNJ3rY>YTkSln;)7f~UP>;l!pe+bz|m>dFHo$w^U zZ~I!j|Hi|XhG+C*6^8yS*{rpxDG`4F3a4?l^19TTkq_=p2t`C)Q|>$rC0gNlpd%d` zCi)jA>7_{w=+Wq*Mbr}Q`_rt!XI`N+LQV34Ya9p9Ltk{J==;!mK*|av=Ic|EJ^!2M*}3+Wnt!%ND{uG@nXTVPCBric1r$B$2E_-Ezk z=Z-VGJK+&Y5%{ze7b+1WfsiT<#_eGFGH$3SY2c@274VYzdus zDQ629CW|37ihSrR9-%pOPj*Jh+O=6{kWEvXK5f2 zV}+Y>l~OXn`8MWRVAhBk{fv=^WlDVnR>`8!&tmYm3WHy^-J0b9#cDQpK^vPi-*7m@LyW3iLpOAt-6NQN{{HrQ zV9(~yZ`P%Od74BJ0bIp-yt6CKKu+M5ks0Y>t~wfHIN=VLPb{VrC3_$qI^T|pGktdv zH#w?u65VjdEvO<9)tBek!q63w+ZNmAXUC&NDj2Q%rW5__NQxA!P6dQZ%+7>l=Il_t_1Hm{XWHq z<=Kc;AV=(3P}1nEhdqke!-eQ#?Xj znOu#MLzBNeH{j)i`PiY`)(g$Sd3h$ze0rEhF8biqX@#tBlianQlSMN_>FE9|_J@=} zKWXmKo(|ZjF}nS!cV8&`up(a_)NdO!`0lwZAf9)O zPWMnAFSGQ*=}xwYR4eqSgRusj`;_%0xSgI|2{=<&(S2C%=v7t1@uev*s=k!%TO{>= zk3q=i4FzGY#DaM-XowRrxPM+Yahp3`k_WX7?3Pu?zV=A@_Escb))ux#I zLfG@N%c51hP&ew-?2@2wLJCNFUW~A?xnJeq*+<@g*>C89B`-nZr|*5}eqd73xa6|D zv%=&TB-r03@2cTP&ipH#rc=%8?{8UOu;-)i)3d?4p6I_E>$bScO5w`rjbh-9U__`Oo}KoK@A6F>U>@c!JpL;#6C z$=vtrqZ`ni;CVDlf9;y1a21E$1J2OaGb{MAulBfgo2@BGtBt8&LOgKehLdQZ>^Bb# z{YL4H0Q78QXvM4s#d-5E{IBi$XLJ@gDP{}DcU8)3{B@Kg+X%WSk3YsOd!{jul`!O@ zD)Zs|9c3iF77C7zoLxkjzW_ZGjCh#P1D9mye;@kHC?D)WOA)O`BIg2>GB%Na0V*TQ z0#oLqY^brX69yd34L_g0M7PPeRs=hpDAw@2dn3%Z^`4bbp6!gTrano)lbyWg?cG2amq;Xbgiw@JsCcz&EMu_Femh}5b{~^+q(*w zjnp(h&TXRT^f{XpDV;0enU%`VKGL?wAcr+`9Np*_KFP@fQehISCJaA6jzfg=$~%u} zS3WWiiMEe27cA%ex-6@7!w9q4a}dc!V(B2v-+=M+L6@b;s z*iTYpabLmbUM+*ioTsKf;@}=vO@Jg&i1%yv1g-92{|4)(_@_7*0h^~SJOY1z$&&KQ z84r}+ULZc1==8<~D7kadwo?DiY{X8z%b0Pndy+@H}l42>F0Ib*mMT>*9HNyEeNMmm()JNCqn8s(Kxp-E@Toc- z5*@t${wb1!Nb2_zFK|5kdP_w%K1PW(K+4wlh|E$C><2CN%Rz|};|0K60Ovl=2R7*QFnyakxFvz#!~ zFWTRh;QR8fckv*3GuFJ*j?sK7pF?q%7z7KSB`FZ(m>e|K!hg$mef=~^FU>!wbjlnU z5+FVyhCaoJIc?^%*#VKiuTR<*xn}hlkd4N6FXcxMvX1=ImEJ$g-S(2O`Iu6` zw!kk-8*#f$$My8Tv9^|hU1aryoJKyuC%Ss|?Y8=o!x2m0W$gE1)$X>EhpV_71f`SF%C zz3LKup+xTVR3k~RrusUV2YVB%b5QdC%%+Rr0!Gjz%3p_;ikY_Bzasvf4>(4kR4uT1 zZxq5`EG$_Bsp0A{gp9kOI+fBd~zs3jKqX4k(#@>{q?HWv=;`{KY zkW$+mhqn#CFHwG#s;-7iAjX~+K-(PO^xbK4ET_owcO9iG1}K&g3Sbz`cmr3LPRWP2 z;KS0*l(+r%Y_(Y3*%7tq5-+g_DlGcm>T)-|1*h)vQbiTN zGn5M84Qid%s$y(f!a4X8o}s4o!2HYip6&?tt`{!EioKjdegKs*18jFk>VFGO{`#;QIl>K||V{A+8OI>7>#KM7HY#;I&E01g1 zcY5G#ACqQ%=Tc7`jCKE!TlWmXblsyNpn`ec zcV8O7K7@VW(JjNHl~Xl3boLRG2E21Q;dqFU$vRP0B)xWYUrCC1_Yf{N`9IjtBew16 zLXLaw{~`a<+o_rSM~KTE*ChMh^b&(h*2f;vvYNVzz|u5v*GH#S3)_qy(M&&+n-^u5 zig9c`AHIup-MkE7KHfRD;MFZ!w7{1qvJ72B!?&*y-~VV^Pt86Rq)HeAV1N?@#HvgG zP8}XaP{I4>Ub*<)tU9{v;Y$_ke6!1;PG{oKdr$SaO1t->m)d-dWO2yX(#;EA$jc(6 zUbupl$2_eBMd-N$8VSV2x-?;L@tgZ`9k!oC(?lAH2NNRNnhTVn2yuUad+k^CO7FI( zs!jy5<|@J!0fgnlc(F(0Ty=$bbHJuTw_k4DyHOHi(l{6T*Bry3Z@n3^ukoqBuN#!3 zn~`6<4BLT6ve_Bd?2{Y*YBJH=O!k=K(pVrM@g0R24efB!$y#YQJH?dyh>EQN-j5~|PWTuv^J|DGyS zX-)WzPoZNkX_gcoXxPn`Pk3jCt;@sOkB~b~SD8A1G?Y(zHmjsJUNuL^Oz$8ei>`;u$P3X}uWW1^+|W&M7jLW9=S zJU7J}_6u>-h6rA=>@zJcQ=%<_cg6>=tngrgqY(ZTL7xK@UyDvXlWfvQZ&J}|oD9F` zR2MQB!`ik@fEiwU{%8LG^R{;6iff@39p*A5AV~st!=G@48|Cjkyzy~54M^(8@}xFV z!l(umtJ6)u>sb0w&Xj*UQ65eV7Smk4weyLxSsHg)`b zjGbhde>qftiVHJ&YB!KU3 zX&T?1N0ulRD@FI$K`^#J4uIYN$?1XPY-#EZU$S=-b)GXb7o)cRHJ+*OkL+PKBuRF8mRY?}PD$~v*aR1^$QhCDhoA~TBS6y1RTEB?j<$Wtw^B5k5v%3sL0rr+YC2 z)1-AkG~b!F@09*?WzAi2T9Z>WW+3H;DfPbA6B@@YZRf&#t+Zy3d@<{Up?){4Vk(*V zceh(+0@&yD-t%L!9})G_zZqD9hq{K(4AF=IU1Ps+6GmF6$ROfNir*%$fK`2bJB=Cm z-)MV-I}5(AXkUO}Ky4+R>3r$LTKbj@?;p~6`bP7=JP7^}#oc`MIVYZJrIp7$&J zE=T=MjSh*|G>UtPyZW<6IdN0vFJA)&U3=%X-{laJ9TjP+l>3hPa5AMSCe0aA2UJr) zf&{xK1UPnh8M#cvUmxujnv(|GC05dzoQbBOLzBzP|2p>0(d7H(hLF?)x6Tf&5AjN; zl^hW57Ep7lnXKVcX-iIbg)F79B4`7pjI1F6Pn?$;S{vNdn>y+;cg%DMS9gaoP>M>L|-Ot1YBN+WN0w z4y%ye;fIwbRp}|?lC2Pc*M>aDh<^Ypq!qoTDsU%nw}qH<+Lx(sI;Fc z!dGD93TSP&!*DI*ay;2@Rt+AXLXkFQsBiwtfUaGeAH^ec|1ngQiO0+*XD^Jx0{VN- zW4(o*G6PaW5fWbp_%=wLRVF7kt>lE5>jP}#ga|H2R{Lu-AwEq>;sW%1CfmIKo2#OS z7M6hX?2d`z;XBR6-gk;rkwQr`OiiKMg40Tli1x%AH9CuY{=Q5TNZn|Da9SCl0n<+~ z&SFC7Fk$N25nn7IP2me+t%+OA?w91+FSW$n(@J@dFWZ5$yQ0&v@6{qEtdLDEF`;Xp z+`+;;tK{)YYn5mP`mL*T`2LiJFfq$?xt?V#EgkSc%^2ry>+ z4Y~7|+|rnCZYATV-{9z@z29F-@k2aZDd7O3NRyNXGOHaOi6qdMIQqQ0omHO@b$~qj zJ;^x&qvGV{)$6l{x<2}%-=X(Ea4PNiwTh9UW4xJ?#xC&7yQh>UrmvMYeq_p;RSQ1N z|M_xvS3ro$V4J&t@YU;~SYrTAXZJLp$@q+yGo&iou%Eg0BZR4*i_t>4k3V!~&eW507Tt>?yx6F2WNyQzVb z?i)asXjWj_`9*|GyEge!w^h!lWYMX)&}4zG55%Hj;c~*nn!Ijj!e^MXmwS?{(GlxO z!a4bym3vak!d9D|Z6e0F-Fidh(7^&4`wo^p9QtgrHM;kO1>o(Gh|2&+$ku*>F}I;c zkazfZUk5(cu`pTHo9Mf}s?EoP;e4_&`I9X~19sl`n@lFGZBa)=dOTo|H0gLo%i#Ou zg2kSKBIuw#m@f#gh6Ef(aQGNmLIgVxe2_UduD@A1TEah4Xt5=RJFI|b&hDwm ze|@MAU(>^e(;Dud4I%o&@8tN-^Ur|Sip5Hu8G;TbTk&Vy1Tg2I#*xq z9*m?8x~m8P46QmLVt2B;@kF5}P3$uX{^I-q?~m8DvXy|aK$fQd08S^Jti}E5npy?=QiCNx?2~@J&TZe)>k>o zIdLQ9#r43xhsgNBPqdfxZ#`f&vGza3n!LcPU!U&?+Nn!RmFnz*8GS#Vmj z3QmKO!4$<6=ewNnB}*Xeh6EIA=Z%qyC4A8TL`{l~|=>u@S!{;y2@A zp6U@_u~+$@2?ou)6lpv)@%OKpwhg>#bZnx+)E~F#u|qVI0S6PjS2(*)MgOGfC-)#* z`KZMHTqv8NtAd4iC>pVUxIA`~0ZS_E&5NxD_;wYdO{(QwGmLRDJllVw$5SivtR@i0 zF>qodlf`c(ea_tqsdu?*h$6j5%kd>XWTg?RkK4_P3T0I3dSvfnmt`QV*N9n%!rsxB z@EQ`NUcAdr_C=aBk<&i?GU|8rlz|!uAWpXdWE3q~j?%eiXPr*=*dr+vd+>UQjzqc+ zt0|zjcbF-J{`KW%xg>vrB;?+nCV8b~#rj=(ArreZEeI;ZZ!dhP-vRLQjy%#^WfqH0 zIu3CzJHMJ(|?0!)S^D3i*z51*+p<-;PvnImFoY}2Vu>(9*;N@LPvy9nnlIQU(A%_nEE}f96n7fO1f_8?FnjyxbZi9 zJV4^qU;x0TbH}isx1NX2Rd7o}jrPbn^i)s7GlQ{@%d{yBf?H7TdEm|Ea|arMo@R2xv;aIMOBrK%=s1f>G`1C@r>HJ^n?sboi zSZOT#y(Knu3=PT98%rdq! z_&FTnTqO*#WTpyhU2ucptI4M2008kFPksg7ug)SnRZT2g!C^@b*giN`&S*( zFdORAcndurtLX1N4WrV&3~`qfeXrK6u*nZM_w~e?4*xj-g)mVi+;OY!v8Ide8y-(P z63B%A+Y6vMS-^j-{kJTbu8njhIw)ygjW`2jQl|YTe}TGB8g`W)Q@sLitbVPCrsdqw zzYG6k!DRn|pvZIKSzN_5Fg#=4mH^s8j2=2-lvci9=|Zh=ML~!JJheXGSEsvSCgJ6Tbr$j6L0L{ z7|Zd%3<;xhza3@?8%e@t`p?Yk$&5Q4oZ`pFQwIA6nQJ+?p6jRUyYsJOoBDJPbf@;PA1 zq`a!@;nMv0h7`PSL6w_V`IBR`&}}T8eY{rp-{WcI>GoaJ-vx7fo%!g~!SMMHS6h?j zRVroxGfq^|P&RpTnDUmUx*%KbcQP@7b5fAXc<9#N``7N`@T`U|P?Z{&=|bXy`h%|( znykJ165tF8ZDR@zr$kieu$i2I*VcE{ZW4KbJ88j6#1G4~zhwtswLhDmIL8*^(B$7Fqvq`9d^Cw0D|SLx z)binjJlWyGJ-@F4)%LOsc_(|OzPAG3xw4*7K-SQLT*aZ0AOqSHj)lu)yP|nFK~g#L z=V45#YN8|VgCV6p_{#qUFlsw*XMVq|PS`Xk_&JOK*W*VTfiz3KE&+V{X{muT(<0-5 zKDK9Hn^wL}WN34k^nVeIbeHB+WiJ^j1!5$dzLn?yA!Fb%?qx>R!cW{GP*G_f2HRZr%sp-c_(uSF$c=F8k-K$Jefn?F zv_|n`a4rKS&Gx)YF?+VxM}tuj7NN$J{e#JfXP%Od*gDRnv!;jwXXnE-ZNArCdMBO6 z>_Uz2K40AqKHJK1)q#+-e{U|QEw7m)pcQG9S7boC62|VcxkiL7AbsX5_w`W@rrLZakcpWbW5|Z~aU4D@xm(RgmZk==iuE8`FO*$i3SR^|i3wNeV=Xco}tfxw=Rb zg-0y^!jnZ6-(o(iPx^_%TDY7lL|y4J&*rG7;& zaO{eu#R|$FBopIn^X1j}J%N$>yLv50414zaz$}hFi${5J3Y;JL9}bOtT*Bn*f8#Xb zP7<;pLDT1mZ5r>e#072*=W>BS&zC2f!gGZdHje>eJ0s$9Fu~TCAjU zCVZQ_|EwU;U#87xmKQ$kAqwCaYAu&SqxqO64L#@2Z-2d6$D!G4o7F?XZqOJE?RGtQ zvJuVD+{?jvqnCw9YG?FxU&xQf>A=s$#8u_ZSh@zvxK@Y$zGYUWH9aCDxbrw+fM+zt zNNF$b_t_@OMjR-#bD?#AY4SiHkB`Ve4fOP6#1D=TcwngGboh%-S50M|1f`+G7B~Lx zCv8C{h!D#4P4Ic}q0C6?5%G0LB-Os8ef^42ldjLWq0+&K`kpEOS@Vj7lGRV*5Pn4} z2OYW(7AeFr2JZL~=v$by=`Xq$dd)<&sQFAmrY`THntSjXG9QT&%!3Wu=jbBG(tThF7B?)2GrE+j}SqW0+C6)VCUjA9* zC(hakguhNq@5V`hDkk&Y(sm6JEFXC6#GW~ zc*)O68$6^%39Asxh?30yWLe50Yn3R$r_g3h;4eVqn?VK6!5U-~Vh)oRS6-|v?pS!n zU0$Bvh-;M;7x}sf+mr>RuPGf|Lc#2c&@)G3qI0>twCz6hYYVO~L>R4yLK2`F)d^W* zhqbevaUim;_Czl!4+P<-VcjJ7ekjC$Bx5RZ+~^l&_SfT&IRD|G_44xo@;Vh{cbmLY zj+hy5jkroL4(lFe;E19zzSaIDO1ap2nk&I`4^cr}vDH;H(fRemXde!GsTuy(4@#;# zmFNIza15vNY3;t)DpT$afrQ2JH#V{^1u67@e_qGBz_58=;(VPj#G|-L%d>c&brBRS z76}5uRp-~*#eSByd;owsUP8O2AcO&aRFv5m$MKT4<(~eu=f}6I6>10l6fsw$7Eooy zj_G|a%4|r>h`>$MZhQ7QzM*_JkmH>eKIlzS)6aysny!z`E6R&>3ah>FXT@wf%GsQY z>d^~nz?v)yh;YTCt`d&Uhpc7igBhXJv7SK$vg|mxFL8iu5p;$2JsLNNw>gxx9^UGC zF(N;6rW_LvHu=KR@$^^cfg%~dLv z^!A`P{B5_9vHCpyH{C_;DaX*vaJ<@WF5&S`lR9#&upaPG2>~wM`-)~>Zi_jHRnVvh zVAVVkDd6sYK`**}2Hw_8M$aJn>|g)VMUt;$0cSZ&S4GINsyS;^doB+ytM7?r#?lXc z`^vL{s82}}-zAP9YpdL|>sMXfon5iIKQ8Evjd(HcSvuOjubBzf=C|oUFmx%Q<~Da& zemL^VHTH!BJ4&yWh{Y@J7k2Zv$5xvD=}#NXfR|2M--~l}v2_Jlx?8`BUh8KCt|AbT z`r8D+brBt&;eqf(FbC!9CW+-UU*vUTWd-hW8oLn!r_cGkyEySl6c27htatS6MvzK# z=U}3M-vbGU@4Is6j`!|~PnvSkpKUDf$hGc7-LP$n%-G;$n7OPW;>j&lb>8OrlKj># zx1}pQYP1p7wpGJSVCi$}?Mht?5C4<_-!Inu;`Zy!Dgw>vxgu#z1-_Y!cpEFKs5f~a z%Y~+6{){0DFDvR*4#fs378vP;qml z$VpD$TCv{pUu@lBt%A>-VXE3AXvg1mE2|8UIvu50l!PQFIRzep!*BAMhVA z{JYxIJ5${oz-3bvuT*0fYLqSQr$j1`G&g$2jys|lBguhOM00OFXxFktELCNc=n1HN zVmV^GE2t4`(@g02ANL@y;TlA-N6b_}sXZwKE6RjGjZLHo3l76|3j;fe`R<=-sv~Jg zn4E`t^opf~h$n=>do)Hr+AGzOkshjliR9qHV?%~4D6%5rWfdWYLyQ(T;t;~u@u4|q zq@RTt6jkY6H^cyY=2-;+-~e2rqzr->b6{VJV@SG;wk9m=?-@JFkxb-f-C-lz5=7u2tben&7f)k86d;-NYPNVl2bBA79)l z5)F9ZqsxT)C|gr;b|6CS!sXJ@2#k*TL-itTGcu{bCha~s8oSE}sn1(Hf)qpv6nz3S zP(q>)BC)Zt3tceQcB6qTZpq*>x`DzdQDtPNu$kd3W~Qh_g1|F8q1Y8wkj91jzvN0Hp=IX8mxXC!i|1C3Iarn*<+UoG1mEw?g*A_ue$GTpur^Fe8Kv3&#w@L!+n!a zXBQyptUhP2E;Tal)hH!3s!9^42&KL)KPW&502*d; zplUvP{SXMvVfk7PR7CsW0^*!=dFyQz81|I{NCl|&A<{xt(_I)CM8k1FLIAJ|e>VJ& z>Rt5s7bCjs2x z0B9T+NW%h2+5GygFQFa;K!ouZ3p6ZgE%#U@{yRyiVdO9t1E6%lf+g3IdG?$1%wR;E z4bZ0Op97B$djKy^$#M(sIjLmbN&65|0oV*_*?k1Aex3dc370w>y1(@u%`|UejY9`q zLg+P+#*Mebm%q!pn?(U*DDLZ)4_ECe4i@Kq+{(N9( zdj0}V', JSON.stringify(identityDetails)); // }); // }); - it('Update Identity', function () { + // it('Create Identity - Invalid Fields', function () { - client.verification.update_identity('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { - console.log('identity update result =>', JSON.stringify(updateResult)); - }); + // client.verification.create_identity('in', '', 'Mr', 'aBCD', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // }); - }); + // }); + + // it('Update Identity', function () { + + // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + // }); + + // }); // it('Delete Identity', function () { // }); @@ -100,13 +108,16 @@ describe('AddressVerification Interface', function () { // }); // }); - // it('Create Address', function () { + it('Create Address', function () { - // client.verification.create_address('IN', '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (createResponse) { - // console.log('address Create response =>', JSON.stringify(createResponse)); - // }); + // Upload sample file + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // }); + client.verification.create_address('IN', '9274222998', 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (createResponse) { + console.log('address Create response =>', JSON.stringify(createResponse)); + }); + + }); // it('Update Address', function () { From c02971c717c005156628520df30a64680b7cdcdc Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 10 Feb 2019 16:11:25 +0530 Subject: [PATCH 25/35] Added create address and identity test cases. --- lib/rest/request-test.js | 67 ++++++++++++++++++++++++++++------- test/test.verification.js | 73 ++++++++++++++++++++++++++++++--------- 2 files changed, 110 insertions(+), 30 deletions(-) diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 2b1bd3be..7fd57aa1 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1,5 +1,6 @@ import request from 'request'; import queryString from 'querystring'; +import { InvalidRequestError } from './../utils/exceptions'; export function Request(config) { let auth = 'Basic ' + new Buffer(config.authId + ':' + config.authToken) @@ -15,10 +16,11 @@ export function Request(config) { // isMultipart, saying if request to be made is multipart return (method, action, params, requestConfig) => { + // console.log("for dummy requset", method, action); + // Build copy of original headers var currentHeaders = JSON.parse(JSON.stringify(headers)); - console.log('at requset ,request config', requestConfig); if (requestConfig && requestConfig.isMultipart == true) { currentHeaders['Content-Type'] = 'multipart/form-data'; params.file = require('fs').createReadStream(params.file); @@ -1190,17 +1192,42 @@ export function Request(config) { } }); } - //Create identity details - if (method == 'POST' && action == 'Verification/Identity/') { - resolve({ - response: {}, - body: - { - api_id: 'e731f42c-2443-11e9-8480-0242ac110004', - message: 'Your request has been accepted.' - } - }); - } + // //Create identity + // if (method == 'POST' && action == 'Verification/Identity/') { + // resolve({ + // response: {}, + // body: + // { + // api_id: 'e731f42c-2443-11e9-8480-0242ac110004', + // message: 'Your request has been accepted.' + // } + // }); + // } + + + //Create Identity Detail By Document Id - Valid input data + // console.log("params first name==>",params, ); + if (method == 'POST' && action == 'Verification/Identity/' && params.first_name == '') { + var response = { + error: 'first_name field is mandatory.', + message: 'Could not complete identity verification.', + status: 'error' + } + + throw new InvalidRequestError(JSON.stringify(response)); + } + + //Create Identity Detail By Document Id - Valid input data + if (method == 'POST' && action == 'Verification/Identity/') { + resolve({ + response: {}, + body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } + }); + + } + + + // ============= Address Verification =================== @@ -1277,14 +1304,28 @@ export function Request(config) { }); } - //Create Address Detail By Document Id + //Create Address Detail By Document Id - Valid input data + // console.log("params first name==>",params, ); + if (method == 'POST' && action == 'Verification/Address/' && params.first_name == '') { + var response = { + error: 'first_name field is mandatory.', + message: 'Could not complete Address verification.', + status: 'error' + } + + throw new InvalidRequestError(JSON.stringify(response)); + } + + //Create Identity Detail By Document Id - Valid input data if (method == 'POST' && action == 'Verification/Address/') { resolve({ response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } }); + } + reject(new Error('not found')); }); }; diff --git a/test/test.verification.js b/test/test.verification.js index 99912b13..f4d8cae0 100644 --- a/test/test.verification.js +++ b/test/test.verification.js @@ -2,6 +2,7 @@ import { Client // } from '../lib/rest/client'; } from '../lib/rest/client-test'; +import { AssertionError } from 'assert'; // let authId = 'MAZJJKMWNLZJNIYJKYYT'; // let authToken = 'ZTQyYjI5NjkyMWE2N2YzMmM3ZWZiYWQ1YWI1NzAw'; @@ -30,21 +31,37 @@ describe('IdentityVerification Interface', function () { // }); // }); - // it('Create Identity - Valid Fields', function () { - // client.verification.create_identity('in', '', 'Mr', 'aBCD', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // }); - - // }); + it('Create Identity - In-valid Fields', function (done) { - // it('Create Identity - Invalid Fields', function () { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(new Error("Invalid result. Create identity should throw error with invalid data.")) + }) + .catch(function (Erroridentity) { + done(); + // console.log("identity result==>", Erroridentity); + + }) + }); - // client.verification.create_identity('in', '', 'Mr', 'aBCD', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // }); + it('Create Identity - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // }); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(); + }) + .catch(function (Erroridentity) { + done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // console.log("identity result==>", Erroridentity); + + }) + }); // it('Update Identity', function () { @@ -63,7 +80,7 @@ describe('IdentityVerification Interface', function () { // // let addressList = await client.verification.list_all_addresses(); // // console.log('addreess list is =>', JSON.stringify(addressList)); - // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); // // console.log('address Create is=>',JSON.stringify(addressCreate)); // // await client.verification.delete_address(5); @@ -107,18 +124,40 @@ describe('AddressVerification Interface', function () { // console.log('identity detail is =>', JSON.stringify(identityDetails)); // }); // }); + - it('Create Address', function () { + it('Create Address - In-valid Fields', function (done) { - // Upload sample file var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(new Error("Invalid result. Create address should throw error with invalid data.")) + }) + .catch(function (Erroraddress) { + done(); + // console.log("address result==>", Erroraddress); + + }) + }); - client.verification.create_address('IN', '9274222998', 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (createResponse) { - console.log('address Create response =>', JSON.stringify(createResponse)); - }); + it('Create Address - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(); + }) + .catch(function (Erroraddress) { + done(new Error("Invalid result. Create address should not throw error with valid data.")) + // console.log("address result==>", Erroraddress); + + }) }); + // it('Update Address', function () { // // client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (updateResponse) { From e88961b0809bacfd1d7f0b06f488683e94ce6358 Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 17 Feb 2019 16:35:36 +0530 Subject: [PATCH 26/35] ADded addresses.js --- lib/resources/addresses.js | 106 +++++++++++++++++++++ lib/rest/client.js | 4 + test/test.verification.js | 182 +++++++++++++++++++------------------ 3 files changed, 204 insertions(+), 88 deletions(-) create mode 100644 lib/resources/addresses.js diff --git a/lib/resources/addresses.js b/lib/resources/addresses.js new file mode 100644 index 00000000..3c47e827 --- /dev/null +++ b/lib/resources/addresses.js @@ -0,0 +1,106 @@ +import { extend, validate } from '../utils/common.js'; +import { PlivoResource, PlivoResourceInterface } from '../base'; + +const clientKey = Symbol(); +const action = 'Verification/Address/'; +const idField = 'id'; + +/* ---------------Address method----------*/ +export class Address extends PlivoResource { + constructor(client, data = {}) { + super(action, Address, idField, client); + + if (idField in data) { + this.id = data[idField]; + } + + extend(this, data); + } + + delete_address(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return super.delete(id); + } + + update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + return super.update({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }); + } + + +} + +export class AddressInterface extends PlivoResourceInterface { + constructor(client, data = {}) { + super(action, Address, idField, client); + extend(this, data); + + this[clientKey] = client; + } + + retreive_address(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return super.get(id); + } + + list(params) { + return super.list(params, 'POST'); + } + + create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + return super.create({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }, { isMultipart: true }); + } +} diff --git a/lib/rest/client.js b/lib/rest/client.js index 6487ce75..d3313d4b 100644 --- a/lib/rest/client.js +++ b/lib/rest/client.js @@ -13,6 +13,7 @@ import { RecordingInterface } from "../resources/recordings"; import { Response } from "../utils/plivoxml"; import { validateSignature } from "../utils/security"; import { Verification } from "../resources/verification"; +import { AddressInterface } from "../resources/addresses"; exports.Response = function () { return new Response(); @@ -53,6 +54,7 @@ export class Client { userAgent: `${'plivo-node'}/${version || 'Unknown Version'} (Node: ${process.version})`, }, options); + let client = camelCaseRequestWrapper(Request(options)); this.calls = new CallInterface(client); @@ -66,5 +68,7 @@ export class Client { this.pricings = new PricingInterface(client); this.recordings = new RecordingInterface(client); this.verification = new Verification(client); + // this.addresses = new AddressInterface(client); + } } diff --git a/test/test.verification.js b/test/test.verification.js index f4d8cae0..8bd14628 100644 --- a/test/test.verification.js +++ b/test/test.verification.js @@ -17,99 +17,99 @@ let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; let client = new Client(authId, authToken); -describe('IdentityVerification Interface', function () { +// describe('IdentityVerification Interface', function () { - // it('Get Identity List', function () { - // client.verification.list_all_identity().then(function (identityList) { - // console.log('identity list is =>', JSON.stringify(identityList)); - // }); - // }); +// it('Get Identity List', function () { +// client.verification.list_all_identity().then(function (identityList) { +// console.log('identity list is =>', JSON.stringify(identityList)); +// }); +// }); - // it('Get Identity Details', function () { - // client.verification.retreive_identity(27658110766647).then(function (identityDetails) { - // console.log('identity detail is =>', JSON.stringify(identityDetails)); - // }); - // }); +// it('Get Identity Details', function () { +// client.verification.retreive_identity(27658110766647).then(function (identityDetails) { +// console.log('identity detail is =>', JSON.stringify(identityDetails)); +// }); +// }); - it('Create Identity - In-valid Fields', function (done) { +// it('Create Identity - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(new Error("Invalid result. Create identity should throw error with invalid data.")) - }) - .catch(function (Erroridentity) { - done(); - // console.log("identity result==>", Erroridentity); +// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; +// client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') +// .then(function (identityDetails) { +// // console.log('identity Create result =>', JSON.stringify(identityDetails)); +// done(new Error("Invalid result. Create identity should throw error with invalid data.")) +// }) +// .catch(function (Erroridentity) { +// done(); +// // console.log("identity result==>", Erroridentity); - }) - }); +// }) +// }); - it('Create Identity - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; +// it('Create Identity - Valid Fields', function (done) { +// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(); - }) - .catch(function (Erroridentity) { - done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // console.log("identity result==>", Erroridentity); +// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; +// client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') +// .then(function (identityDetails) { +// // console.log('identity Create result =>', JSON.stringify(identityDetails)); +// done(); +// }) +// .catch(function (Erroridentity) { +// done(new Error("Invalid result. Create identity should not throw error with valid data.")) +// // console.log("identity result==>", Erroridentity); - }) - }); +// }) +// }); - // it('Update Identity', function () { +// // it('Update Identity', function () { - // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { - // console.log('identity update result =>', JSON.stringify(updateResult)); - // }); +// // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { +// // console.log('identity update result =>', JSON.stringify(updateResult)); +// // }); - // }); +// // }); - // it('Delete Identity', function () { - // }); +// // it('Delete Identity', function () { +// // }); - // it('Dummy', function () { - // // await client.verification.retreive_address(5); +// // it('Dummy', function () { +// // // await client.verification.retreive_address(5); - // // let addressList = await client.verification.list_all_addresses(); - // // console.log('addreess list is =>', JSON.stringify(addressList)); +// // // let addressList = await client.verification.list_all_addresses(); +// // // console.log('addreess list is =>', JSON.stringify(addressList)); - // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); - // // console.log('address Create is=>',JSON.stringify(addressCreate)); +// // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); +// // // console.log('address Create is=>',JSON.stringify(addressCreate)); - // // await client.verification.delete_address(5); +// // // await client.verification.delete_address(5); - // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); +// // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); - // // await client.verification.retreive_identity(5); +// // // await client.verification.retreive_identity(5); - // // Get identity list +// // // Get identity list - // // Get Identity Details +// // // Get Identity Details - // // Delete identity - // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ - // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } - // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { - // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); - // // }); +// // // Delete identity +// // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ +// // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } +// // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { +// // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); +// // // }); - // }); +// // }); -}); +// }); describe('AddressVerification Interface', function () { @@ -119,43 +119,49 @@ describe('AddressVerification Interface', function () { // }); // }); + it('Get Address List', function () { + client.addresses.list().then(function (addressList) { + console.log('addressList list is =>', JSON.stringify(addressList)); + }); + }); + // it('Get Address Details', function () { // client.verification.retreive_address(14632037725844).then(function (identityDetails) { // console.log('identity detail is =>', JSON.stringify(identityDetails)); // }); // }); - - it('Create Address - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(new Error("Invalid result. Create address should throw error with invalid data.")) - }) - .catch(function (Erroraddress) { - done(); - // console.log("address result==>", Erroraddress); + // it('Create Address - In-valid Fields', function (done) { - }) - }); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(new Error("Invalid result. Create address should throw error with invalid data.")) + // }) + // .catch(function (Erroraddress) { + // done(); + // // console.log("address result==>", Erroraddress); - it('Create Address - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // }) + // }); - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(); - }) - .catch(function (Erroraddress) { - done(new Error("Invalid result. Create address should not throw error with valid data.")) - // console.log("address result==>", Erroraddress); + // it('Create Address - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - }) - }); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(); + // }) + // .catch(function (Erroraddress) { + // done(new Error("Invalid result. Create address should not throw error with valid data.")) + // // console.log("address result==>", Erroraddress); + + // }) + // }); // it('Update Address', function () { From 8a3a77ad6247ec5f5de7f37031edc885d2d99278 Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 17 Feb 2019 16:57:07 +0530 Subject: [PATCH 27/35] update and delete identity and address --- lib/base.js | 4 +- lib/resources/verification.js | 94 ++++++------------ lib/rest/request.js | 13 ++- test/test.verification.js | 177 ++++++++++++++++++++++------------ 4 files changed, 159 insertions(+), 129 deletions(-) diff --git a/lib/base.js b/lib/base.js index 3c1b62b1..4b63b2c8 100644 --- a/lib/base.js +++ b/lib/base.js @@ -25,14 +25,14 @@ export class PlivoResource { this[clientKey] = request; } - update(params, id) { + update(params, id, requestConfig) { let client = this[clientKey]; let action = this[actionKey]; let that = this; id = typeof id !== 'undefined' ? id : that.id; return new Promise((resolve, reject) => { - client('POST', action + id + '/', params) + client('POST', action + id + '/', params, requestConfig) .then(response => { extend(that, response.body); extend(that, params); diff --git a/lib/resources/verification.js b/lib/resources/verification.js index f2b77a24..b1ad0391 100644 --- a/lib/resources/verification.js +++ b/lib/resources/verification.js @@ -16,12 +16,16 @@ const idField = 'id'; export class AddressVerification extends PlivoResource { constructor(client, data = {}) { super(addressVerificationAction, AddressVerification, idField, client); - + this[clientKey] = client; if (idField in data) { this.id = data[idField]; } extend(this, data); + + + + } delete_address(id) { let errors = validate([ @@ -32,35 +36,23 @@ export class AddressVerification extends PlivoResource { return errors; } - return super.delete(id); - } - update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { - return super.update({ - phone_number_country: phone_number_country, - number_type: number_type, - salutation: salutation, - first_name: first_name, - last_name: last_name, - address_line1: address_line1, - address_line2: address_line2, - city: city, - region: region, - postal_code: postal_code, - country_iso: country_iso, - callback_url: callback_url, - alias: alias, - file: file, - proof_type: proof_type, - id_number: id_number, - fiscal_identification_code: fiscal_identification_code, - street_code: street_code, - municipal_code: municipal_code - }); + return (new AddressVerification(this[clientKey], { + id: id + })).delete(id); } + update_address(dataToUpdate) { + + return (new AddressVerification(this[clientKey], { + id: dataToUpdate.address_id + })).update(dataToUpdate, this.id, { isMultipart: true }); + } } + + + export class AddressVerificationInterface extends PlivoResourceInterface { constructor(client, data = {}) { super(addressVerificationAction, AddressVerification, idField, client); @@ -109,6 +101,7 @@ export class AddressVerificationInterface extends PlivoResourceInterface { }, { isMultipart: true }); } } + /* ---------------Identity method----------*/ export class IdentityVerification extends PlivoResource { @@ -132,39 +125,16 @@ export class IdentityVerification extends PlivoResource { return errors; } - return (new IdentityVerification(this[clientKey], { id: id })).delete({}); + return (new IdentityVerification(this[clientKey], { + id: id + })).delete(id); } - update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + + update_identity(dataToUpdate) { return (new IdentityVerification(this[clientKey], { - id: id - })).update({ - phone_number_country: phone_number_country, - number_type: number_type, - salutation: salutation, - first_name: first_name, - last_name: last_name, - address_line1: address_line1, - address_line2: address_line2, - city: city, - region: region, - postal_code: postal_code, - country_iso: country_iso, - callback_url: callback_url, - alias: alias, - file: file, - proof_type: proof_type, - id_number: id_number, - nationality: nationality, - id_nationality: id_nationality, - birth_place: birth_place, - birth_date: birth_date, - id_issue_date: id_issue_date, - business_name: business_name, - fiscal_identification_code: fiscal_identification_code, - street_code: street_code, - municipal_code: municipal_code - }); + id: dataToUpdate.identity_id + })).update(dataToUpdate, this.id, { isMultipart: true }); } } @@ -255,11 +225,9 @@ export class Verification { delete_address(id) { return this.addressVerificationResource.delete_address(id); } - - update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { - - return this.addressVerificationResource.update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code); - + update_address(dataToUpdate) { + // If address_id is nor provided in key throw error + return this.addressVerificationResource.update_address(dataToUpdate); } @@ -283,9 +251,11 @@ export class Verification { return this.identityVerificationResource.delete_identity(id); } - update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code) { + update_identity(dataToUpdate) { + + // If identity_id is nor provided in key throw error - return this.identityVerificationResource.update_identity(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, nationality, id_nationality, birth_place, birth_date, id_issue_date, business_name, fiscal_identification_code, street_code, municipal_code); + return this.identityVerificationResource.update_identity(dataToUpdate); } } diff --git a/lib/rest/request.js b/lib/rest/request.js index 921e1c46..c65e3efb 100644 --- a/lib/rest/request.js +++ b/lib/rest/request.js @@ -20,13 +20,16 @@ export function Request(config) { // Build copy of original headers var currentHeaders = JSON.parse(JSON.stringify(headers)); - console.log('at requset ,request config', requestConfig); + console.log('at requset =>', method, action, params, requestConfig); if (requestConfig && requestConfig.isMultipart == true) { currentHeaders['Content-Type'] = 'multipart/form-data'; - params.file = require('fs').createReadStream(params.file); - for (var key in params) { - if (params[key] === undefined || params[key] == null) { - params[key] = ''; + // If file provided, read the file + if (params.file) { + params.file = require('fs').createReadStream(params.file); + for (var key in params) { + if (params[key] === undefined || params[key] == null) { + params[key] = ''; + } } } } diff --git a/test/test.verification.js b/test/test.verification.js index f4d8cae0..b47b20db 100644 --- a/test/test.verification.js +++ b/test/test.verification.js @@ -1,7 +1,7 @@ import { Client - // } from '../lib/rest/client'; -} from '../lib/rest/client-test'; + } from '../lib/rest/client'; +// } from '../lib/rest/client-test'; import { AssertionError } from 'assert'; // let authId = 'MAZJJKMWNLZJNIYJKYYT'; @@ -32,47 +32,81 @@ describe('IdentityVerification Interface', function () { // }); - it('Create Identity - In-valid Fields', function (done) { + // it('Create Identity - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(new Error("Invalid result. Create identity should throw error with invalid data.")) - }) - .catch(function (Erroridentity) { - done(); - // console.log("identity result==>", Erroridentity); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(new Error("Invalid result. Create identity should throw error with invalid data.")) + // }) + // .catch(function (Erroridentity) { + // done(); + // // console.log("identity result==>", Erroridentity); - }) - }); + // }) + // }); - it('Create Identity - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // it('Create Identity - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(); - }) - .catch(function (Erroridentity) { - done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // console.log("identity result==>", Erroridentity); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(); + // }) + // .catch(function (Erroridentity) { + // done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // // console.log("identity result==>", Erroridentity); - }) - }); + // }) + // }); // it('Update Identity', function () { + + // var params={ + // identity_id :"40796989105693", + // proof_type:"PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // // salutation: salutation, + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: file, + // // proof_type: proof_type, + // // id_number: id_number, + // // nationality: nationality, + // // id_nationality: id_nationality, + // // birth_place: birth_place, + // // birth_date: birth_date, + // // id_issue_date: id_issue_date, + // // business_name: business_name, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + - // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { + // client.verification.update_identity(params).then(function (updateResult) { // console.log('identity update result =>', JSON.stringify(updateResult)); // }); // }); - // it('Delete Identity', function () { - // }); + it('Delete Identity', function () { + client.verification.delete_identity(17117604461384).then(function (deleteResult) { + console.log('identity delete result =>', JSON.stringify(deleteResult)); + }); + }); // it('Dummy', function () { // // await client.verification.retreive_address(5); @@ -126,48 +160,71 @@ describe('AddressVerification Interface', function () { // }); - it('Create Address - In-valid Fields', function (done) { + // it('Create Address - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(new Error("Invalid result. Create address should throw error with invalid data.")) - }) - .catch(function (Erroraddress) { - done(); - // console.log("address result==>", Erroraddress); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(new Error("Invalid result. Create address should throw error with invalid data.")) + // }) + // .catch(function (Erroraddress) { + // done(); + // // console.log("address result==>", Erroraddress); - }) - }); + // }) + // }); - it('Create Address - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // it('Create Address - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(); - }) - .catch(function (Erroraddress) { - done(new Error("Invalid result. Create address should not throw error with valid data.")) - // console.log("address result==>", Erroraddress); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(); + // }) + // .catch(function (Erroraddress) { + // done(new Error("Invalid result. Create address should not throw error with valid data.")) + // // console.log("address result==>", Erroraddress); - }) - }); + // }) + // }); // it('Update Address', function () { + // var params={ + // address_id :"73529957241107", + // proof_type:"PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // // salutation: salutation, + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: file, + // // proof_type: proof_type, + // // id_number: id_number, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + - // // client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (updateResponse) { - // // console.log('address update response =>', JSON.stringify(updateResponse)); - // // }); + // client.verification.update_address(params).then(function (updateResult) { + // console.log('address update result =>', JSON.stringify(updateResult)); + // }); // }); - // it('Delete Address', function () { - // client.verification.delete_address(20594710404052).then(function (deleteResult) { + // client.verification.delete_address(73529957241107).then(function (deleteResult) { // console.log('address delete result =>', JSON.stringify(deleteResult)); // }); // }); From ef16ce1eefe615210070bc727fe4d5aa4a066512 Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 17 Feb 2019 17:04:07 +0530 Subject: [PATCH 28/35] Syncing. --- lib/base.js | 1 - lib/resources/addresses.js | 22 +++++++---- lib/rest/client-test.js | 4 +- lib/rest/request-test.js | 51 ++++++++++++------------ package.json | 2 +- test/test.verification.js | 79 +++++++++++++++++--------------------- 6 files changed, 80 insertions(+), 79 deletions(-) diff --git a/lib/base.js b/lib/base.js index 3c1b62b1..063b4934 100644 --- a/lib/base.js +++ b/lib/base.js @@ -50,7 +50,6 @@ export class PlivoResource { let id = this.id; return new Promise((resolve, reject) => { - console.log('action is', action, ', id is ', id, ',url is', action + id); client('DELETE', action + id + '/', params) .then(() => { resolve(true); diff --git a/lib/resources/addresses.js b/lib/resources/addresses.js index 3c47e827..56a12147 100644 --- a/lib/resources/addresses.js +++ b/lib/resources/addresses.js @@ -17,7 +17,7 @@ export class Address extends PlivoResource { extend(this, data); } - delete_address(id) { + delete(id) { let errors = validate([ { field: 'id', value: id, validators: ['isRequired'] } ]); @@ -25,7 +25,6 @@ export class Address extends PlivoResource { if (errors) { return errors; } - return super.delete(id); } @@ -60,19 +59,16 @@ export class AddressInterface extends PlivoResourceInterface { constructor(client, data = {}) { super(action, Address, idField, client); extend(this, data); - this[clientKey] = client; } - retreive_address(id) { + get(id) { let errors = validate([ { field: 'id', value: id, validators: ['isRequired'] } ]); - if (errors) { return errors; } - return super.get(id); } @@ -80,7 +76,7 @@ export class AddressInterface extends PlivoResourceInterface { return super.list(params, 'POST'); } - create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + create(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { return super.create({ phone_number_country: phone_number_country, number_type: number_type, @@ -103,4 +99,16 @@ export class AddressInterface extends PlivoResourceInterface { municipal_code: municipal_code }, { isMultipart: true }); } + + delete(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return new Address(this[clientKey], { id: id }).delete(id); + } } diff --git a/lib/rest/client-test.js b/lib/rest/client-test.js index 53ae48bc..9c00b576 100644 --- a/lib/rest/client-test.js +++ b/lib/rest/client-test.js @@ -10,6 +10,7 @@ import { PricingInterface } from '../resources/pricings.js'; import { RecordingInterface } from '../resources/recordings.js'; import { camelCaseRequestWrapper } from './utils'; import { Verification } from "../resources/verification"; +import { AddressInterface } from "../resources/addresses"; export class Client { constructor(authId, authToken, proxy) { @@ -49,7 +50,8 @@ export class Client { this.numbers = new NumberInterface(client); this.pricings = new PricingInterface(client); this.recordings = new RecordingInterface(client); - this.verification = new Verification(client); + // this.verification = new Verification(client); + this.addresses = new AddressInterface(client); } } diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 7fd57aa1..7441f95d 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -16,7 +16,7 @@ export function Request(config) { // isMultipart, saying if request to be made is multipart return (method, action, params, requestConfig) => { - // console.log("for dummy requset", method, action); + console.log("===> for dummy requset", method, action); // Build copy of original headers var currentHeaders = JSON.parse(JSON.stringify(headers)); @@ -1204,29 +1204,29 @@ export function Request(config) { // }); // } - - //Create Identity Detail By Document Id - Valid input data + + //Create Identity Detail By Document Id - Valid input data // console.log("params first name==>",params, ); - if (method == 'POST' && action == 'Verification/Identity/' && params.first_name == '') { - var response = { - error: 'first_name field is mandatory.', - message: 'Could not complete identity verification.', - status: 'error' - } - - throw new InvalidRequestError(JSON.stringify(response)); - } - - //Create Identity Detail By Document Id - Valid input data - if (method == 'POST' && action == 'Verification/Identity/') { - resolve({ - response: {}, - body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } - }); - - } - - + if (method == 'POST' && action == 'Verification/Identity/' && params.first_name == '') { + var response = { + error: 'first_name field is mandatory.', + message: 'Could not complete identity verification.', + status: 'error' + } + + throw new InvalidRequestError(JSON.stringify(response)); + } + + //Create Identity Detail By Document Id - Valid input data + if (method == 'POST' && action == 'Verification/Identity/') { + resolve({ + response: {}, + body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } + }); + + } + + @@ -1305,8 +1305,8 @@ export function Request(config) { } //Create Address Detail By Document Id - Valid input data - // console.log("params first name==>",params, ); - if (method == 'POST' && action == 'Verification/Address/' && params.first_name == '') { + // console.log("params first name==>",params, ); + if (method == 'POST' && action == 'Verification/Address/' && params.first_name == '') { var response = { error: 'first_name field is mandatory.', message: 'Could not complete Address verification.', @@ -1325,7 +1325,6 @@ export function Request(config) { } - reject(new Error('not found')); }); }; diff --git a/package.json b/package.json index b0935d0f..a261e998 100644 --- a/package.json +++ b/package.json @@ -66,4 +66,4 @@ "uri-parser": "^1.0.0", "utf8": "^2.1.2" } -} \ No newline at end of file +} diff --git a/test/test.verification.js b/test/test.verification.js index 8bd14628..c1bf4c51 100644 --- a/test/test.verification.js +++ b/test/test.verification.js @@ -113,67 +113,60 @@ let client = new Client(authId, authToken); describe('AddressVerification Interface', function () { - // it('Get Address List', function () { - // client.verification.list_all_addresses().then(function (addressList) { - // console.log('addressList list is =>', JSON.stringify(addressList)); - // }); - // }); - it('Get Address List', function () { client.addresses.list().then(function (addressList) { console.log('addressList list is =>', JSON.stringify(addressList)); }); }); - // it('Get Address Details', function () { - // client.verification.retreive_address(14632037725844).then(function (identityDetails) { - // console.log('identity detail is =>', JSON.stringify(identityDetails)); - // }); - // }); - + it('Get Address Details', function () { + client.addresses.get(14632037725844).then(function (identityDetails) { + console.log('identity detail is =>', JSON.stringify(identityDetails)); + }); + }); - // it('Create Address - In-valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_address("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (addressDetails) { - // // console.log('address Create result =>', JSON.stringify(addressDetails)); - // done(new Error("Invalid result. Create address should throw error with invalid data.")) - // }) - // .catch(function (Erroraddress) { - // done(); - // // console.log("address result==>", Erroraddress); + it('Create Address - In-valid Fields', function (done) { - // }) - // }); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(new Error("Invalid result. Create address should throw error with invalid data.")) + }) + .catch(function (Erroraddress) { + done(); + // console.log("address result==>", Erroraddress); + }) + }); - // it('Create Address - Valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + it('Create Address - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_address("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (addressDetails) { - // // console.log('address Create result =>', JSON.stringify(addressDetails)); - // done(); - // }) - // .catch(function (Erroraddress) { - // done(new Error("Invalid result. Create address should not throw error with valid data.")) - // // console.log("address result==>", Erroraddress); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(); + }) + .catch(function (Erroraddress) { + done(new Error("Invalid result. Create address should not throw error with valid data.")) + // console.log("address result==>", Erroraddress); - // }) - // }); + }) + }); - // it('Update Address', function () { + it('Update Address', function () { - // // client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (updateResponse) { - // // console.log('address update response =>', JSON.stringify(updateResponse)); - // // }); + client.addresses.udpate('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34').then(function (updateResponse) { + console.log('address update response =>', JSON.stringify(updateResponse)); + }); - // }); + }); // it('Delete Address', function () { - // client.verification.delete_address(20594710404052).then(function (deleteResult) { + // client.addresses.delete(20594710404052).then(function (deleteResult) { // console.log('address delete result =>', JSON.stringify(deleteResult)); // }); // }); From c08a03f3a066783fdca6fe398acf4a4d137c56fd Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 17 Feb 2019 18:02:09 +0530 Subject: [PATCH 29/35] Finished address verification. --- gulpfile.js | 2 +- lib/resources/addresses.js | 56 +++---- lib/resources/verification.js | 8 +- lib/rest/request-test.js | 42 ++++-- test/test.address.js | 137 +++++++++++++++++ test/test.identity.js | 173 ++++++++++++++++++++++ test/test.verification.js | 269 ---------------------------------- 7 files changed, 357 insertions(+), 330 deletions(-) create mode 100644 test/test.address.js create mode 100644 test/test.identity.js delete mode 100644 test/test.verification.js diff --git a/gulpfile.js b/gulpfile.js index 6bfa66f2..bb7967c9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,7 +45,7 @@ gulp.task('test', ['pre-test'], function (cb) { console.log('Running tests with node version', process.version); - gulp.src('test/**/test.verification.js') + gulp.src('test/**/test.identity.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { diff --git a/lib/resources/addresses.js b/lib/resources/addresses.js index 56a12147..c99d0d10 100644 --- a/lib/resources/addresses.js +++ b/lib/resources/addresses.js @@ -9,50 +9,13 @@ const idField = 'id'; export class Address extends PlivoResource { constructor(client, data = {}) { super(action, Address, idField, client); - + this[clientKey] = client; if (idField in data) { this.id = data[idField]; } extend(this, data); } - - delete(id) { - let errors = validate([ - { field: 'id', value: id, validators: ['isRequired'] } - ]); - - if (errors) { - return errors; - } - return super.delete(id); - } - - update_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { - return super.update({ - phone_number_country: phone_number_country, - number_type: number_type, - salutation: salutation, - first_name: first_name, - last_name: last_name, - address_line1: address_line1, - address_line2: address_line2, - city: city, - region: region, - postal_code: postal_code, - country_iso: country_iso, - callback_url: callback_url, - alias: alias, - file: file, - proof_type: proof_type, - id_number: id_number, - fiscal_identification_code: fiscal_identification_code, - street_code: street_code, - municipal_code: municipal_code - }); - } - - } export class AddressInterface extends PlivoResourceInterface { @@ -100,6 +63,21 @@ export class AddressInterface extends PlivoResourceInterface { }, { isMultipart: true }); } + update(dataToUpdate) { + + let errors = validate([ + { field: 'address_id', value: dataToUpdate.address_id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return (new Address(this[clientKey], { + id: dataToUpdate.address_id + })).update(dataToUpdate, this.id, { isMultipart: true }); + } + delete(id) { let errors = validate([ { field: 'id', value: id, validators: ['isRequired'] } @@ -109,6 +87,6 @@ export class AddressInterface extends PlivoResourceInterface { return errors; } - return new Address(this[clientKey], { id: id }).delete(id); + return (new Address(this[clientKey], { id: id })).delete(id); } } diff --git a/lib/resources/verification.js b/lib/resources/verification.js index b1ad0391..efd49aba 100644 --- a/lib/resources/verification.js +++ b/lib/resources/verification.js @@ -22,10 +22,6 @@ export class AddressVerification extends PlivoResource { } extend(this, data); - - - - } delete_address(id) { let errors = validate([ @@ -36,9 +32,7 @@ export class AddressVerification extends PlivoResource { return errors; } - return (new AddressVerification(this[clientKey], { - id: id - })).delete(id); + return (new AddressVerification(this[clientKey], { id: id })).delete(id); } update_address(dataToUpdate) { diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 7441f95d..0e3ee36e 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -16,17 +16,19 @@ export function Request(config) { // isMultipart, saying if request to be made is multipart return (method, action, params, requestConfig) => { - console.log("===> for dummy requset", method, action); + // console.log('request ==>', method, action, params, requestConfig); // Build copy of original headers var currentHeaders = JSON.parse(JSON.stringify(headers)); if (requestConfig && requestConfig.isMultipart == true) { currentHeaders['Content-Type'] = 'multipart/form-data'; - params.file = require('fs').createReadStream(params.file); - for (var key in params) { - if (params[key] === undefined || params[key] == null) { - params[key] = ''; + if (params.file) { + params.file = require('fs').createReadStream(params.file); + for (var key in params) { + if (params[key] === undefined || params[key] == null) { + params[key] = ''; + } } } } @@ -1226,11 +1228,8 @@ export function Request(config) { } + // *************=================== Address Verification *************=================== // - - - - // ============= Address Verification =================== // List Addresses if (method == 'GET' && action == 'Verification/Address/') { resolve({ @@ -1273,7 +1272,7 @@ export function Request(config) { }); } - //Get Address Detail By Document Id + // Address Detail => By Document Id if (method == 'GET' && action == 'Verification/Address/14632037725844/') { resolve({ response: {}, @@ -1304,25 +1303,40 @@ export function Request(config) { }); } - //Create Address Detail By Document Id - Valid input data - // console.log("params first name==>",params, ); + //Create Address => Invalid input data if (method == 'POST' && action == 'Verification/Address/' && params.first_name == '') { var response = { error: 'first_name field is mandatory.', message: 'Could not complete Address verification.', status: 'error' } - throw new InvalidRequestError(JSON.stringify(response)); } - //Create Identity Detail By Document Id - Valid input data + //Create Address - Valid input data if (method == 'POST' && action == 'Verification/Address/') { resolve({ response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } }); + } + + //Update Address => - Invalid input data + if (method == 'POST' && action == 'Verification/Address/73529957241107/' && params.first_name == '') { + var response = { + error: 'first_name field is mandatory.', + message: 'Could not complete Address verification.', + status: 'error' + } + throw new InvalidRequestError(JSON.stringify(response)); + } + //Update Address => Valid input data + if (method == 'POST' && action == 'Verification/Address/73529957241107/') { + resolve({ + response: {}, + body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } + }); } reject(new Error('not found')); diff --git a/test/test.address.js b/test/test.address.js new file mode 100644 index 00000000..368c2f1f --- /dev/null +++ b/test/test.address.js @@ -0,0 +1,137 @@ +// import { Client } from '../lib/rest/client'; +import { Client } from '../lib/rest/client-test'; + +let authId = 'auth_id'; +let authToken = 'auth_token'; + +let client = new Client(authId, authToken); + +describe('AddressVerification Interface', function () { + + it('Get Address List', function (done) { + client.addresses.list().then(function (addressList) { + done(); + }).catch(function (err) { + done(new Error("Test Failed. - Failed to fetch address list")) + }) + }); + + it('Get Address Details', function (done) { + client.addresses.get(14632037725844).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + done(); + }).catch(function (err) { + done(new Error("Test Failed. - Failed to fetch address details")) + }) + }); + + + it('Create Address - In-valid Fields', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(new Error("Invalid result. Create address should throw error with invalid data.")) + }) + .catch(function (Erroraddress) { + done(); + // console.log("address result==>", Erroraddress); + }) + }); + + it('Create Address - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(); + }) + .catch(function (Erroraddress) { + done(new Error("Invalid result. Create address should not throw error with valid data.")) + }) + }); + + + it('Update Address', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + var params = { + address_id: "73529957241107", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + salutation: "Mr", + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: addressProofPath, + // proof_type: proof_type, + // id_number: id_number, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.addresses.update(params).then(function (updateResult) { + done(); + }).catch((err) => { + done(err); + }); + + }); + + it('Update Address', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + var params = { + // address_id: "73529957241107", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + salutation: "Mr", + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: addressProofPath, + // proof_type: proof_type, + // id_number: id_number, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.addresses.update(params).then(function (updateResult) { + done(new Error("Invalid result. Update address should throw error when address_id not provided.")) + }).catch((err) => { + done(); + }); + + }); + + + // it('Delete Address', function () { + // client.addresses.delete(73529957241107).then(function (deleteResult) { + // console.log('address delete result =>', JSON.stringify(deleteResult)); + // }); + // }); + +}); diff --git a/test/test.identity.js b/test/test.identity.js new file mode 100644 index 00000000..fc5eda9f --- /dev/null +++ b/test/test.identity.js @@ -0,0 +1,173 @@ +// import { Client } from '../lib/rest/client'; +import { Client } from '../lib/rest/client-test'; + +let authId = 'auth_id'; +let authToken = 'auth_token'; + +let client = new Client(authId, authToken); + + +describe('IdentityVerification Interface', function () { + + it('Get Identity List', function () { + client.verification.list_all_identity().then(function (identityList) { + console.log('identity list is =>', JSON.stringify(identityList)); + }); + }); + + it('Get Identity Details', function () { + client.verification.retreive_identity(27658110766647).then(function (identityDetails) { + console.log('identity detail is =>', JSON.stringify(identityDetails)); + }); + }); + + // it('Create Identity - In-valid Fields', function (done) { + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(new Error("Invalid result. Create identity should throw error with invalid data.")) + // }) + // .catch(function (Erroridentity) { + // done(); + // // console.log("identity result==>", Erroridentity); + + // }) + // }); + + // it('Create Identity - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(); + // }) + // .catch(function (Erroridentity) { + // done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // // console.log("identity result==>", Erroridentity); + + // }) + // }); + + // it('Update Identity', function () { + + // var params = { + // identity_id: "40796989105693", + // proof_type: "PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // // salutation: salutation, + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: file, + // // proof_type: proof_type, + // // id_number: id_number, + // // nationality: nationality, + // // id_nationality: id_nationality, + // // birth_place: birth_place, + // // birth_date: birth_date, + // // id_issue_date: id_issue_date, + // // business_name: business_name, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + + + // client.verification.update_identity(params).then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + // }); + + // it('Create Identity - In-valid Fields', function (done) { + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(new Error("Invalid result. Create identity should throw error with invalid data.")) + // }) + // .catch(function (Erroridentity) { + // done(); + // // console.log("identity result==>", Erroridentity); + + // }) + // }); + + // it('Create Identity - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(); + // }) + // .catch(function (Erroridentity) { + // done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // // console.log("identity result==>", Erroridentity); + + // }) + // }); + + // // it('Update Identity', function () { + + // // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { + // // console.log('identity update result =>', JSON.stringify(updateResult)); + // // }); + + + // it('Delete Identity', function () { + // client.verification.delete_identity(17117604461384).then(function (deleteResult) { + // console.log('identity delete result =>', JSON.stringify(deleteResult)); + // }); + // }); + + + // it('Dummy', function () { + // // await client.verification.retreive_address(5); + + // // let addressList = await client.verification.list_all_addresses(); + // // console.log('addreess list is =>', JSON.stringify(addressList)); + + // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); + // // console.log('address Create is=>',JSON.stringify(addressCreate)); + + // // await client.verification.delete_address(5); + + // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + + + // // await client.verification.retreive_identity(5); + + // // Get identity list + + + // // Get Identity Details + + + + + // // Delete identity + // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ + // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } + // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { + // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); + // // }); + + + + // }); + +}); + diff --git a/test/test.verification.js b/test/test.verification.js deleted file mode 100644 index 2a4ce52d..00000000 --- a/test/test.verification.js +++ /dev/null @@ -1,269 +0,0 @@ -import { - Client - // } from '../lib/rest/client'; -} from '../lib/rest/client-test'; -import { AssertionError } from 'assert'; - -// let authId = 'MAZJJKMWNLZJNIYJKYYT'; -// let authToken = 'ZTQyYjI5NjkyMWE2N2YzMmM3ZWZiYWQ1YWI1NzAw'; - -let authId = 'MAMTI0ZWVIMDC5MMRIOT'; -let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; - - -// let authId = 'auth_id'; -// let authToken = 'auth_token'; - - -let client = new Client(authId, authToken); - -// describe('IdentityVerification Interface', function () { - -// it('Get Identity List', function () { -// client.verification.list_all_identity().then(function (identityList) { -// console.log('identity list is =>', JSON.stringify(identityList)); -// }); -// }); - -// it('Get Identity Details', function () { -// client.verification.retreive_identity(27658110766647).then(function (identityDetails) { -// console.log('identity detail is =>', JSON.stringify(identityDetails)); -// }); -// }); - - - -// it('Create Identity - In-valid Fields', function (done) { - -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; -// client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') -// .then(function (identityDetails) { -// // console.log('identity Create result =>', JSON.stringify(identityDetails)); -// done(new Error("Invalid result. Create identity should throw error with invalid data.")) -// }) -// .catch(function (Erroridentity) { -// done(); -// // console.log("identity result==>", Erroridentity); - -// }) -// }); - -// it('Create Identity - Valid Fields', function (done) { -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; -// client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') -// .then(function (identityDetails) { -// // console.log('identity Create result =>', JSON.stringify(identityDetails)); -// done(); -// }) -// .catch(function (Erroridentity) { -// done(new Error("Invalid result. Create identity should not throw error with valid data.")) -// // console.log("identity result==>", Erroridentity); - -// }) -// }); - -// it('Update Identity', function () { - -// var params={ -// identity_id :"40796989105693", -// proof_type:"PASSPORT", -// phone_number_country: "in", -// number_type: "9898989685", -// // salutation: salutation, -// // first_name: first_name, -// // last_name: last_name, -// // address_line1: address_line1, -// // address_line2: address_line2, -// // city: city, -// // region: region, -// // postal_code: postal_code, -// // country_iso: country_iso, -// // callback_url: callback_url, -// // alias: alias, -// // file: file, -// // proof_type: proof_type, -// // id_number: id_number, -// // nationality: nationality, -// // id_nationality: id_nationality, -// // birth_place: birth_place, -// // birth_date: birth_date, -// // id_issue_date: id_issue_date, -// // business_name: business_name, -// // fiscal_identification_code: fiscal_identification_code, -// // street_code: street_code, -// // municipal_code: municipal_code -// }; - - -// client.verification.update_identity(params).then(function (updateResult) { -// console.log('identity update result =>', JSON.stringify(updateResult)); -// }); - -// it('Create Identity - In-valid Fields', function (done) { - -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; -// client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') -// .then(function (identityDetails) { -// // console.log('identity Create result =>', JSON.stringify(identityDetails)); -// done(new Error("Invalid result. Create identity should throw error with invalid data.")) -// }) -// .catch(function (Erroridentity) { -// done(); -// // console.log("identity result==>", Erroridentity); - -// }) -// }); - -// it('Create Identity - Valid Fields', function (done) { -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - -// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; -// client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') -// .then(function (identityDetails) { -// // console.log('identity Create result =>', JSON.stringify(identityDetails)); -// done(); -// }) -// .catch(function (Erroridentity) { -// done(new Error("Invalid result. Create identity should not throw error with valid data.")) -// // console.log("identity result==>", Erroridentity); - -// }) -// }); - -// // it('Update Identity', function () { - -// // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { -// // console.log('identity update result =>', JSON.stringify(updateResult)); -// // }); - - -// it('Delete Identity', function () { -// client.verification.delete_identity(17117604461384).then(function (deleteResult) { -// console.log('identity delete result =>', JSON.stringify(deleteResult)); -// }); -// }); - - -// // it('Dummy', function () { -// // // await client.verification.retreive_address(5); - -// // // let addressList = await client.verification.list_all_addresses(); -// // // console.log('addreess list is =>', JSON.stringify(addressList)); - -// // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); -// // // console.log('address Create is=>',JSON.stringify(addressCreate)); - -// // // await client.verification.delete_address(5); - -// // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); - - -// // // await client.verification.retreive_identity(5); - -// // // Get identity list - - -// // // Get Identity Details - - - - -// // // Delete identity -// // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ -// // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } -// // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { -// // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); -// // // }); - - - -// // }); - -// }); - -describe('AddressVerification Interface', function () { - - it('Get Address List', function () { - client.addresses.list().then(function (addressList) { - console.log('addressList list is =>', JSON.stringify(addressList)); - }); - }); - - it('Get Address Details', function () { - client.addresses.get(14632037725844).then(function (identityDetails) { - console.log('identity detail is =>', JSON.stringify(identityDetails)); - }); - }); - - - it('Create Address - In-valid Fields', function (done) { - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(new Error("Invalid result. Create address should throw error with invalid data.")) - }) - .catch(function (Erroraddress) { - done(); - // console.log("address result==>", Erroraddress); - }) - }); - - it('Create Address - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(); - }) - .catch(function (Erroraddress) { - done(new Error("Invalid result. Create address should not throw error with valid data.")) - // console.log("address result==>", Erroraddress); - - }) - }); - - - it('Update Address', function () { - var params = { - address_id: "73529957241107", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - // salutation: salutation, - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: file, - // proof_type: proof_type, - // id_number: id_number, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.addresses.update(params).then(function (updateResult) { - console.log('address update result =>', JSON.stringify(updateResult)); - }); - - }); - it('Delete Address', function () { - client.addresses.deelte(73529957241107).then(function (deleteResult) { - console.log('address delete result =>', JSON.stringify(deleteResult)); - }); - }); - -}); From 6001fe1dfa52fdbb0a646b3e368d765e8a1762cb Mon Sep 17 00:00:00 2001 From: patelravi Date: Sun, 17 Feb 2019 18:47:02 +0530 Subject: [PATCH 30/35] Finished changes for client.addresses --- lib/resources/identities.js | 92 +++++++++++++ lib/resources/verification.js | 84 ------------ lib/rest/client-test.js | 3 +- lib/rest/request-test.js | 38 ++--- test/test.address.js | 226 +++++++++++++++--------------- test/test.identity.js | 251 ++++++++++++++++------------------ 6 files changed, 345 insertions(+), 349 deletions(-) create mode 100644 lib/resources/identities.js diff --git a/lib/resources/identities.js b/lib/resources/identities.js new file mode 100644 index 00000000..c4f7d0e5 --- /dev/null +++ b/lib/resources/identities.js @@ -0,0 +1,92 @@ +import { extend, validate } from '../utils/common.js'; +import { PlivoResource, PlivoResourceInterface } from '../base'; + +const clientKey = Symbol(); +const action = 'Verification/Identity/'; +const idField = 'id'; + +/* ---------------Identity method----------*/ +export class Identity extends PlivoResource { + constructor(client, data = {}) { + super(action, Identity, idField, client); + this[clientKey] = client; + if (idField in data) { + this.id = data[idField]; + } + + extend(this, data); + } +} + +export class IdentityInterface extends PlivoResourceInterface { + constructor(client, data = {}) { + super(action, Identity, idField, client); + extend(this, data); + this[clientKey] = client; + } + + get(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + if (errors) { + return errors; + } + return super.get(id); + } + + list(params) { + return super.list(params, 'POST'); + } + + create(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { + return super.create({ + phone_number_country: phone_number_country, + number_type: number_type, + salutation: salutation, + first_name: first_name, + last_name: last_name, + address_line1: address_line1, + address_line2: address_line2, + city: city, + region: region, + postal_code: postal_code, + country_iso: country_iso, + callback_url: callback_url, + alias: alias, + file: file, + proof_type: proof_type, + id_number: id_number, + fiscal_identification_code: fiscal_identification_code, + street_code: street_code, + municipal_code: municipal_code + }, { isMultipart: true }); + } + + update(dataToUpdate) { + + let errors = validate([ + { field: 'identity_id', value: dataToUpdate.identity_id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return (new Identity(this[clientKey], { + id: dataToUpdate.identity_id + })).update(dataToUpdate, this.id, { isMultipart: true }); + } + + delete(id) { + let errors = validate([ + { field: 'id', value: id, validators: ['isRequired'] } + ]); + + if (errors) { + return errors; + } + + return (new Identity(this[clientKey], { id: id })).delete(id); + } +} diff --git a/lib/resources/verification.js b/lib/resources/verification.js index efd49aba..20c8a849 100644 --- a/lib/resources/verification.js +++ b/lib/resources/verification.js @@ -12,90 +12,6 @@ const addressVerificationAction = 'Verification/Address/'; const identityVerificationAction = 'Verification/Identity/'; const idField = 'id'; -/* ---------------Address method----------*/ -export class AddressVerification extends PlivoResource { - constructor(client, data = {}) { - super(addressVerificationAction, AddressVerification, idField, client); - this[clientKey] = client; - if (idField in data) { - this.id = data[idField]; - } - - extend(this, data); - } - delete_address(id) { - let errors = validate([ - { field: 'id', value: id, validators: ['isRequired'] } - ]); - - if (errors) { - return errors; - } - - return (new AddressVerification(this[clientKey], { id: id })).delete(id); - } - - update_address(dataToUpdate) { - - return (new AddressVerification(this[clientKey], { - id: dataToUpdate.address_id - })).update(dataToUpdate, this.id, { isMultipart: true }); - } - -} - - - - -export class AddressVerificationInterface extends PlivoResourceInterface { - constructor(client, data = {}) { - super(addressVerificationAction, AddressVerification, idField, client); - extend(this, data); - - this[clientKey] = client; - } - - retreive_address(id) { - let errors = validate([ - { field: 'id', value: id, validators: ['isRequired'] } - ]); - - if (errors) { - return errors; - } - - return super.get(id); - } - - list_all_addresses(params) { - return super.list(params, 'POST'); - } - - create_address(phone_number_country, number_type, salutation, first_name, last_name, address_line1, address_line2, city, region, postal_code, country_iso, callback_url, alias, file, proof_type, id_number, fiscal_identification_code, street_code, municipal_code) { - return super.create({ - phone_number_country: phone_number_country, - number_type: number_type, - salutation: salutation, - first_name: first_name, - last_name: last_name, - address_line1: address_line1, - address_line2: address_line2, - city: city, - region: region, - postal_code: postal_code, - country_iso: country_iso, - callback_url: callback_url, - alias: alias, - file: file, - proof_type: proof_type, - id_number: id_number, - fiscal_identification_code: fiscal_identification_code, - street_code: street_code, - municipal_code: municipal_code - }, { isMultipart: true }); - } -} - /* ---------------Identity method----------*/ export class IdentityVerification extends PlivoResource { diff --git a/lib/rest/client-test.js b/lib/rest/client-test.js index 9c00b576..e6dd0fb1 100644 --- a/lib/rest/client-test.js +++ b/lib/rest/client-test.js @@ -11,6 +11,7 @@ import { RecordingInterface } from '../resources/recordings.js'; import { camelCaseRequestWrapper } from './utils'; import { Verification } from "../resources/verification"; import { AddressInterface } from "../resources/addresses"; +import { IdentityInterface } from "../resources/identities"; export class Client { constructor(authId, authToken, proxy) { @@ -52,6 +53,6 @@ export class Client { this.recordings = new RecordingInterface(client); // this.verification = new Verification(client); this.addresses = new AddressInterface(client); - + this.identities = new IdentityInterface(client); } } diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 0e3ee36e..e982176e 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -16,7 +16,7 @@ export function Request(config) { // isMultipart, saying if request to be made is multipart return (method, action, params, requestConfig) => { - // console.log('request ==>', method, action, params, requestConfig); + // console.log('request ==>', method, action, requestConfig); // Build copy of original headers var currentHeaders = JSON.parse(JSON.stringify(headers)); @@ -1093,7 +1093,8 @@ export function Request(config) { }); } - // ============= Identity Verification =================== + // *************=================== Identity Verification *************=================== // + // List identities if (method == 'GET' && action == 'Verification/Identity/') { resolve({ @@ -1150,7 +1151,7 @@ export function Request(config) { } }); } - //GEt identity details + //Get identity details if (method == 'GET' && action == 'Verification/Identity/27658110766647/') { resolve({ response: {}, @@ -1194,28 +1195,14 @@ export function Request(config) { } }); } - // //Create identity - // if (method == 'POST' && action == 'Verification/Identity/') { - // resolve({ - // response: {}, - // body: - // { - // api_id: 'e731f42c-2443-11e9-8480-0242ac110004', - // message: 'Your request has been accepted.' - // } - // }); - // } - //Create Identity Detail By Document Id - Valid input data - // console.log("params first name==>",params, ); if (method == 'POST' && action == 'Verification/Identity/' && params.first_name == '') { var response = { error: 'first_name field is mandatory.', message: 'Could not complete identity verification.', status: 'error' } - throw new InvalidRequestError(JSON.stringify(response)); } @@ -1225,7 +1212,24 @@ export function Request(config) { response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } }); + } + + //Update Identity => - Invalid input data + if (method == 'POST' && action == 'Verification/Identity//' && params.first_name == '') { + var response = { + error: 'first_name field is mandatory.', + message: 'Could not complete Identity verification.', + status: 'error' + } + throw new InvalidRequestError(JSON.stringify(response)); + } + //Update Identity => Valid input data + if (method == 'POST' && action == 'Verification/Identity//') { + resolve({ + response: {}, + body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } + }); } // *************=================== Address Verification *************=================== // diff --git a/test/test.address.js b/test/test.address.js index 368c2f1f..c8f68fb1 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -8,130 +8,130 @@ let client = new Client(authId, authToken); describe('AddressVerification Interface', function () { - it('Get Address List', function (done) { - client.addresses.list().then(function (addressList) { - done(); - }).catch(function (err) { - done(new Error("Test Failed. - Failed to fetch address list")) - }) - }); + // it('Get Address List', function (done) { + // client.addresses.list().then(function (addressList) { + // done(); + // }).catch(function (err) { + // done(new Error("Test Failed. - Failed to fetch address list")) + // }) + // }); - it('Get Address Details', function (done) { - client.addresses.get(14632037725844).then(function (identityDetails) { - // console.log('identity detail is =>', JSON.stringify(identityDetails)); - done(); - }).catch(function (err) { - done(new Error("Test Failed. - Failed to fetch address details")) - }) - }); + // it('Get Address Details', function (done) { + // client.addresses.get(14632037725844).then(function (identityDetails) { + // // console.log('identity detail is =>', JSON.stringify(identityDetails)); + // done(); + // }).catch(function (err) { + // done(new Error("Test Failed. - Failed to fetch address details")) + // }) + // }); - it('Create Address - In-valid Fields', function (done) { + // it('Create Address - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(new Error("Invalid result. Create address should throw error with invalid data.")) - }) - .catch(function (Erroraddress) { - done(); - // console.log("address result==>", Erroraddress); - }) - }); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(new Error("Invalid result. Create address should throw error with invalid data.")) + // }) + // .catch(function (Erroraddress) { + // done(); + // // console.log("address result==>", Erroraddress); + // }) + // }); - it('Create Address - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(); - }) - .catch(function (Erroraddress) { - done(new Error("Invalid result. Create address should not throw error with valid data.")) - }) - }); + // it('Create Address - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(); + // }) + // .catch(function (Erroraddress) { + // done(new Error("Invalid result. Create address should not throw error with valid data.")) + // }) + // }); - it('Update Address', function (done) { - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var params = { - address_id: "73529957241107", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - salutation: "Mr", - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: addressProofPath, - // proof_type: proof_type, - // id_number: id_number, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.addresses.update(params).then(function (updateResult) { - done(); - }).catch((err) => { - done(err); - }); + // it('Update Address', function (done) { + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // var params = { + // address_id: "73529957241107", + // proof_type: "PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // salutation: "Mr", + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: addressProofPath, + // // proof_type: proof_type, + // // id_number: id_number, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + + + // client.addresses.update(params).then(function (updateResult) { + // done(); + // }).catch((err) => { + // done(err); + // }); - }); + // }); - it('Update Address', function (done) { - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var params = { - // address_id: "73529957241107", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - salutation: "Mr", - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: addressProofPath, - // proof_type: proof_type, - // id_number: id_number, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.addresses.update(params).then(function (updateResult) { - done(new Error("Invalid result. Update address should throw error when address_id not provided.")) - }).catch((err) => { - done(); - }); + // it('Update Address', function (done) { + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // var params = { + // // address_id: "73529957241107", + // proof_type: "PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // salutation: "Mr", + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: addressProofPath, + // // proof_type: proof_type, + // // id_number: id_number, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + + + // client.addresses.update(params).then(function (updateResult) { + // done(new Error("Invalid result. Update address should throw error when address_id not provided.")) + // }).catch((err) => { + // done(); + // }); - }); + // }); - // it('Delete Address', function () { - // client.addresses.delete(73529957241107).then(function (deleteResult) { - // console.log('address delete result =>', JSON.stringify(deleteResult)); - // }); - // }); + it('Delete Address', function () { + client.addresses.delete(73529957241107).then(function (deleteResult) { + console.log('address delete result =>', JSON.stringify(deleteResult)); + }); + }); }); diff --git a/test/test.identity.js b/test/test.identity.js index fc5eda9f..ecec8bdf 100644 --- a/test/test.identity.js +++ b/test/test.identity.js @@ -7,155 +7,138 @@ let authToken = 'auth_token'; let client = new Client(authId, authToken); -describe('IdentityVerification Interface', function () { - - it('Get Identity List', function () { - client.verification.list_all_identity().then(function (identityList) { - console.log('identity list is =>', JSON.stringify(identityList)); +describe('Identity Interface', function () { + + it('Get Identity List', function (done) { + client.identities.list().then(function (identityList) { + // console.log('identity list is =>', JSON.stringify(identityList)); + done() + }).catch(function (err) { + done(err); }); }); - it('Get Identity Details', function () { - client.verification.retreive_identity(27658110766647).then(function (identityDetails) { - console.log('identity detail is =>', JSON.stringify(identityDetails)); + it('Get Identity Details', function (done) { + client.identities.get(27658110766647).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + done() + }).catch(function (err) { + done(err); }); }); - // it('Create Identity - In-valid Fields', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(new Error("Invalid result. Create identity should throw error with invalid data.")) - // }) - // .catch(function (Erroridentity) { - // done(); - // // console.log("identity result==>", Erroridentity); - - // }) - // }); - - // it('Create Identity - Valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(); - // }) - // .catch(function (Erroridentity) { - // done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // // console.log("identity result==>", Erroridentity); - - // }) - // }); - - // it('Update Identity', function () { - - // var params = { - // identity_id: "40796989105693", - // proof_type: "PASSPORT", - // phone_number_country: "in", - // number_type: "9898989685", - // // salutation: salutation, - // // first_name: first_name, - // // last_name: last_name, - // // address_line1: address_line1, - // // address_line2: address_line2, - // // city: city, - // // region: region, - // // postal_code: postal_code, - // // country_iso: country_iso, - // // callback_url: callback_url, - // // alias: alias, - // // file: file, - // // proof_type: proof_type, - // // id_number: id_number, - // // nationality: nationality, - // // id_nationality: id_nationality, - // // birth_place: birth_place, - // // birth_date: birth_date, - // // id_issue_date: id_issue_date, - // // business_name: business_name, - // // fiscal_identification_code: fiscal_identification_code, - // // street_code: street_code, - // // municipal_code: municipal_code - // }; - - - // client.verification.update_identity(params).then(function (updateResult) { - // console.log('identity update result =>', JSON.stringify(updateResult)); - // }); - - // it('Create Identity - In-valid Fields', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_identity("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(new Error("Invalid result. Create identity should throw error with invalid data.")) - // }) - // .catch(function (Erroridentity) { - // done(); - // // console.log("identity result==>", Erroridentity); - - // }) - // }); - - // it('Create Identity - Valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + it('Create Identity - In-valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.verification.create_identity("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(); - // }) - // .catch(function (Erroridentity) { - // done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // // console.log("identity result==>", Erroridentity); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.identities.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(new Error("Invalid result. Create identity should throw error with invalid data.")) + }) + .catch(function (Erroridentity) { + done(); + // console.log("identity result==>", Erroridentity); - // }) - // }); - - // // it('Update Identity', function () { - - // // client.verification.update_identity(null, '9274222998', 'Mr', 'ABC', 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', null, null, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34').then(function (updateResult) { - // // console.log('identity update result =>', JSON.stringify(updateResult)); - // // }); - - - // it('Delete Identity', function () { - // client.verification.delete_identity(17117604461384).then(function (deleteResult) { - // console.log('identity delete result =>', JSON.stringify(deleteResult)); - // }); - // }); - - - // it('Dummy', function () { - // // await client.verification.retreive_address(5); - - // // let addressList = await client.verification.list_all_addresses(); - // // console.log('addreess list is =>', JSON.stringify(addressList)); - - // // let addressCreate = await client.verification.create_address('IN', '9274222998', 'Mr', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'fascal123', 'st12', 'mu34'); - // // console.log('address Create is=>',JSON.stringify(addressCreate)); - - // // await client.verification.delete_address(5); - - // // await client.verification.update_address('usa', '9274222998', 'Mrs', 'shweta', 'ravi', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', 'Null', 'passport', '123', 'fascal123', 'st12', 'mu34'); + }) + }); + it('Create Identity - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // // await client.verification.retreive_identity(5); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.identities.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(); + }) + .catch(function (Erroridentity) { + done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // console.log("identity result==>", Erroridentity); - // // Get identity list + }) + }); + it('Update Identity with valid fields', function (done) { + + var params = { + identity_id: "", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + // salutation: salutation, + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: file, + // proof_type: proof_type, + // id_number: id_number, + // nationality: nationality, + // id_nationality: id_nationality, + // birth_place: birth_place, + // birth_date: birth_date, + // id_issue_date: id_issue_date, + // business_name: business_name, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.identities.update(params).then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + done(); + }).catch(function (err) { + done(err); + }); - // // Get Identity Details + }); + it('Update Identity Without id', function (done) { + + var params = { + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + // salutation: salutation, + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: file, + // proof_type: proof_type, + // id_number: id_number, + // nationality: nationality, + // id_nationality: id_nationality, + // birth_place: birth_place, + // birth_date: birth_date, + // id_issue_date: id_issue_date, + // business_name: business_name, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + client.identities.update(params).then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + done(new Error("Invalid result. Update identity should throw error if identity_id not provided.")) + }).catch(function (err) { + done(); + }); + }); // // Delete identity From 5630ca9aced8a6bd7d54f8d43d5599b7b69df6a1 Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 18 Feb 2019 10:09:44 +0530 Subject: [PATCH 31/35] delete address --- gulpfile.js | 2 +- lib/rest/client.js | 4 +- test/test.address.js | 252 ++++++++++++++++++++++--------------------- 3 files changed, 131 insertions(+), 127 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bb7967c9..55f6dcf5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,7 +45,7 @@ gulp.task('test', ['pre-test'], function (cb) { console.log('Running tests with node version', process.version); - gulp.src('test/**/test.identity.js') + gulp.src('test/**/test.address.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { diff --git a/lib/rest/client.js b/lib/rest/client.js index d3313d4b..36b90945 100644 --- a/lib/rest/client.js +++ b/lib/rest/client.js @@ -67,8 +67,8 @@ export class Client { this.numbers = new NumberInterface(client); this.pricings = new PricingInterface(client); this.recordings = new RecordingInterface(client); - this.verification = new Verification(client); - // this.addresses = new AddressInterface(client); + // this.verification = new Verification(client); + this.addresses = new AddressInterface(client); } } diff --git a/test/test.address.js b/test/test.address.js index 368c2f1f..664fc077 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -1,137 +1,141 @@ -// import { Client } from '../lib/rest/client'; -import { Client } from '../lib/rest/client-test'; +import { Client } from '../lib/rest/client'; +// import { Client } from '../lib/rest/client-test'; -let authId = 'auth_id'; -let authToken = 'auth_token'; -let client = new Client(authId, authToken); - -describe('AddressVerification Interface', function () { - - it('Get Address List', function (done) { - client.addresses.list().then(function (addressList) { - done(); - }).catch(function (err) { - done(new Error("Test Failed. - Failed to fetch address list")) - }) - }); +let authId = 'MAMTI0ZWVIMDC5MMRIOT'; +let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; - it('Get Address Details', function (done) { - client.addresses.get(14632037725844).then(function (identityDetails) { - // console.log('identity detail is =>', JSON.stringify(identityDetails)); - done(); - }).catch(function (err) { - done(new Error("Test Failed. - Failed to fetch address details")) - }) - }); - - - it('Create Address - In-valid Fields', function (done) { +// let authId = 'auth_id'; +// let authToken = 'auth_token'; - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(new Error("Invalid result. Create address should throw error with invalid data.")) - }) - .catch(function (Erroraddress) { - done(); - // console.log("address result==>", Erroraddress); - }) - }); +let client = new Client(authId, authToken); - it('Create Address - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (addressDetails) { - // console.log('address Create result =>', JSON.stringify(addressDetails)); - done(); - }) - .catch(function (Erroraddress) { - done(new Error("Invalid result. Create address should not throw error with valid data.")) - }) - }); +describe('AddressVerification Interface', function () { +// it('Get Address List', function (done) { +// client.addresses.list().then(function (addressList) { +// done(); +// }).catch(function (err) { +// done(new Error("Test Failed. - Failed to fetch address list")) +// }) +// }); + +// it('Get Address Details', function (done) { +// client.addresses.get(14632037725844).then(function (identityDetails) { +// // console.log('identity detail is =>', JSON.stringify(identityDetails)); +// done(); +// }).catch(function (err) { +// done(new Error("Test Failed. - Failed to fetch address details")) +// }) +// }); + + + // it('Create Address - In-valid Fields', function (done) { + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(new Error("Invalid result. Create address should throw error with invalid data.")) + // }) + // .catch(function (Erroraddress) { + // done(); + // // console.log("address result==>", Erroraddress); + // }) + // }); - it('Update Address', function (done) { - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var params = { - address_id: "73529957241107", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - salutation: "Mr", - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: addressProofPath, - // proof_type: proof_type, - // id_number: id_number, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.addresses.update(params).then(function (updateResult) { - done(); - }).catch((err) => { - done(err); - }); + // it('Create Address - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (addressDetails) { + // // console.log('address Create result =>', JSON.stringify(addressDetails)); + // done(); + // }) + // .catch(function (Erroraddress) { + // done(new Error("Invalid result. Create address should not throw error with valid data.")) + // }) + // }); - }); - it('Update Address', function (done) { - - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var params = { - // address_id: "73529957241107", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - salutation: "Mr", - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: addressProofPath, - // proof_type: proof_type, - // id_number: id_number, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.addresses.update(params).then(function (updateResult) { - done(new Error("Invalid result. Update address should throw error when address_id not provided.")) - }).catch((err) => { - done(); +// it('Update Address', function (done) { + +// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; +// var params = { +// address_id: "73529957241107", +// proof_type: "PASSPORT", +// phone_number_country: "in", +// number_type: "9898989685", +// salutation: "Mr", +// // first_name: first_name, +// // last_name: last_name, +// // address_line1: address_line1, +// // address_line2: address_line2, +// // city: city, +// // region: region, +// // postal_code: postal_code, +// // country_iso: country_iso, +// // callback_url: callback_url, +// // alias: alias, +// // file: addressProofPath, +// // proof_type: proof_type, +// // id_number: id_number, +// // fiscal_identification_code: fiscal_identification_code, +// // street_code: street_code, +// // municipal_code: municipal_code +// }; + + +// client.addresses.update(params).then(function (updateResult) { +// done(); +// }).catch((err) => { +// done(err); +// }); + +// }); + +// it('Update Address', function (done) { + +// var addressProofPath = __dirname + '/api_uploads/address_proof.png'; +// var params = { +// // address_id: "73529957241107", +// proof_type: "PASSPORT", +// phone_number_country: "in", +// number_type: "9898989685", +// salutation: "Mr", +// // first_name: first_name, +// // last_name: last_name, +// // address_line1: address_line1, +// // address_line2: address_line2, +// // city: city, +// // region: region, +// // postal_code: postal_code, +// // country_iso: country_iso, +// // callback_url: callback_url, +// // alias: alias, +// // file: addressProofPath, +// // proof_type: proof_type, +// // id_number: id_number, +// // fiscal_identification_code: fiscal_identification_code, +// // street_code: street_code, +// // municipal_code: municipal_code +// }; + + +// client.addresses.update(params).then(function (updateResult) { +// done(new Error("Invalid result. Update address should throw error when address_id not provided.")) +// }).catch((err) => { +// done(); +// }); + +// }); + + + it('Delete Address', function () { + client.addresses.delete(99755439596980).then(function (deleteResult) { + console.log('address delete result =>', JSON.stringify(deleteResult)); }); - }); - - // it('Delete Address', function () { - // client.addresses.delete(73529957241107).then(function (deleteResult) { - // console.log('address delete result =>', JSON.stringify(deleteResult)); - // }); - // }); - }); From 7e7399e8dc04b030e656e446a64c231c954c125c Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 18 Feb 2019 12:18:07 +0530 Subject: [PATCH 32/35] delete test cases done --- lib/rest/request-test.js | 13 +++++++++++-- test/test.address.js | 6 +++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index e982176e..78cfd614 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1318,7 +1318,7 @@ export function Request(config) { } //Create Address - Valid input data - if (method == 'POST' && action == 'Verification/Address/') { + if (method == 'POST' && action == 'Verification/Address/23991395742603/ 23991395742603 ') { resolve({ response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } @@ -1336,13 +1336,22 @@ export function Request(config) { } //Update Address => Valid input data - if (method == 'POST' && action == 'Verification/Address/73529957241107/') { + if (method == 'POST' && action == 'Verification/Address/23991395742603/') { resolve({ response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } }); } + + //Delete Address => input data + if (method == 'DELETE' && action == 'Verification/Address/87928077747492/') { + resolve({ + response: {}, + body: undefined + }); + } + reject(new Error('not found')); }); }; diff --git a/test/test.address.js b/test/test.address.js index 40069a91..7f2adc30 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -1,5 +1,5 @@ -import { Client } from '../lib/rest/client'; -// import { Client } from '../lib/rest/client-test'; +// import { Client } from '../lib/rest/client'; +import { Client } from '../lib/rest/client-test'; @@ -134,7 +134,7 @@ describe('AddressVerification Interface', function () { it('Delete Address', function () { - client.addresses.delete(73529957241107).then(function (deleteResult) { + client.addresses.delete(87928077747492).then(function (deleteResult) { console.log('address delete result =>', JSON.stringify(deleteResult)); }); }); From 2b1e0c06b723d859b56379fa8a1bec9105deee3f Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 18 Feb 2019 13:23:33 +0530 Subject: [PATCH 33/35] delete identity added --- gulpfile.js | 2 +- lib/rest/request-test.js | 8 ++ test/test.address.js | 4 +- test/test.identity.js | 248 ++++++++++++++++++++------------------- 4 files changed, 137 insertions(+), 125 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 55f6dcf5..bb7967c9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,7 +45,7 @@ gulp.task('test', ['pre-test'], function (cb) { console.log('Running tests with node version', process.version); - gulp.src('test/**/test.address.js') + gulp.src('test/**/test.identity.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 78cfd614..6df03e55 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1232,6 +1232,14 @@ export function Request(config) { }); } + //Delete Identity => input data + if (method == 'DELETE' && action == 'Verification/Identity/18294047791076/') { + resolve({ + response: {}, + body: undefined + }); + } + // *************=================== Address Verification *************=================== // // List Addresses diff --git a/test/test.address.js b/test/test.address.js index 7f2adc30..ecbbc4fc 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -1,5 +1,5 @@ -// import { Client } from '../lib/rest/client'; -import { Client } from '../lib/rest/client-test'; +import { Client } from '../lib/rest/client'; +// import { Client } from '../lib/rest/client-test'; diff --git a/test/test.identity.js b/test/test.identity.js index ecec8bdf..21941eeb 100644 --- a/test/test.identity.js +++ b/test/test.identity.js @@ -1,8 +1,12 @@ -// import { Client } from '../lib/rest/client'; -import { Client } from '../lib/rest/client-test'; +import { Client } from '../lib/rest/client'; +// import { Client } from '../lib/rest/client-test'; -let authId = 'auth_id'; -let authToken = 'auth_token'; +let authId = 'MAMTI0ZWVIMDC5MMRIOT'; +let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; + + +// let authId = 'auth_id'; +// let authToken = 'auth_token'; let client = new Client(authId, authToken); @@ -11,146 +15,146 @@ describe('Identity Interface', function () { it('Get Identity List', function (done) { client.identities.list().then(function (identityList) { - // console.log('identity list is =>', JSON.stringify(identityList)); + console.log('identity list is =>', JSON.stringify(identityList)); done() }).catch(function (err) { done(err); }); }); - it('Get Identity Details', function (done) { - client.identities.get(27658110766647).then(function (identityDetails) { - // console.log('identity detail is =>', JSON.stringify(identityDetails)); - done() - }).catch(function (err) { - done(err); - }); - }); + // it('Get Identity Details', function (done) { + // client.identities.get(27658110766647).then(function (identityDetails) { + // // console.log('identity detail is =>', JSON.stringify(identityDetails)); + // done() + // }).catch(function (err) { + // done(err); + // }); + // }); - it('Create Identity - In-valid Fields', function (done) { + // it('Create Identity - In-valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.identities.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(new Error("Invalid result. Create identity should throw error with invalid data.")) - }) - .catch(function (Erroridentity) { - done(); - // console.log("identity result==>", Erroridentity); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.identities.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(new Error("Invalid result. Create identity should throw error with invalid data.")) + // }) + // .catch(function (Erroridentity) { + // done(); + // // console.log("identity result==>", Erroridentity); - }) - }); + // }) + // }); - it('Create Identity - Valid Fields', function (done) { - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // it('Create Identity - Valid Fields', function (done) { + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - client.identities.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - .then(function (identityDetails) { - // console.log('identity Create result =>', JSON.stringify(identityDetails)); - done(); - }) - .catch(function (Erroridentity) { - done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // console.log("identity result==>", Erroridentity); + // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + // client.identities.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + // .then(function (identityDetails) { + // // console.log('identity Create result =>', JSON.stringify(identityDetails)); + // done(); + // }) + // .catch(function (Erroridentity) { + // done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // // console.log("identity result==>", Erroridentity); - }) - }); + // }) + // }); - it('Update Identity with valid fields', function (done) { - - var params = { - identity_id: "", - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - // salutation: salutation, - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: file, - // proof_type: proof_type, - // id_number: id_number, - // nationality: nationality, - // id_nationality: id_nationality, - // birth_place: birth_place, - // birth_date: birth_date, - // id_issue_date: id_issue_date, - // business_name: business_name, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - - client.identities.update(params).then(function (updateResult) { - // console.log('identity update result =>', JSON.stringify(updateResult)); - done(); - }).catch(function (err) { - done(err); - }); + // it('Update Identity with valid fields', function (done) { + + // var params = { + // identity_id: "", + // proof_type: "PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // // salutation: salutation, + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: file, + // // proof_type: proof_type, + // // id_number: id_number, + // // nationality: nationality, + // // id_nationality: id_nationality, + // // birth_place: birth_place, + // // birth_date: birth_date, + // // id_issue_date: id_issue_date, + // // business_name: business_name, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + + + // client.identities.update(params).then(function (updateResult) { + // // console.log('identity update result =>', JSON.stringify(updateResult)); + // done(); + // }).catch(function (err) { + // done(err); + // }); - }); + // }); - it('Update Identity Without id', function (done) { - - var params = { - proof_type: "PASSPORT", - phone_number_country: "in", - number_type: "9898989685", - // salutation: salutation, - // first_name: first_name, - // last_name: last_name, - // address_line1: address_line1, - // address_line2: address_line2, - // city: city, - // region: region, - // postal_code: postal_code, - // country_iso: country_iso, - // callback_url: callback_url, - // alias: alias, - // file: file, - // proof_type: proof_type, - // id_number: id_number, - // nationality: nationality, - // id_nationality: id_nationality, - // birth_place: birth_place, - // birth_date: birth_date, - // id_issue_date: id_issue_date, - // business_name: business_name, - // fiscal_identification_code: fiscal_identification_code, - // street_code: street_code, - // municipal_code: municipal_code - }; - - client.identities.update(params).then(function (updateResult) { - // console.log('identity update result =>', JSON.stringify(updateResult)); - done(new Error("Invalid result. Update identity should throw error if identity_id not provided.")) - }).catch(function (err) { - done(); - }); + // it('Update Identity Without id', function (done) { + + // var params = { + // proof_type: "PASSPORT", + // phone_number_country: "in", + // number_type: "9898989685", + // // salutation: salutation, + // // first_name: first_name, + // // last_name: last_name, + // // address_line1: address_line1, + // // address_line2: address_line2, + // // city: city, + // // region: region, + // // postal_code: postal_code, + // // country_iso: country_iso, + // // callback_url: callback_url, + // // alias: alias, + // // file: file, + // // proof_type: proof_type, + // // id_number: id_number, + // // nationality: nationality, + // // id_nationality: id_nationality, + // // birth_place: birth_place, + // // birth_date: birth_date, + // // id_issue_date: id_issue_date, + // // business_name: business_name, + // // fiscal_identification_code: fiscal_identification_code, + // // street_code: street_code, + // // municipal_code: municipal_code + // }; + + // client.identities.update(params).then(function (updateResult) { + // // console.log('identity update result =>', JSON.stringify(updateResult)); + // done(new Error("Invalid result. Update identity should throw error if identity_id not provided.")) + // }).catch(function (err) { + // done(); + // }); - }); + // }); // // Delete identity - // // Delete https://api.numbers.plivodev.com/v1/Account/MAMTI0ZWVIMDC5MMRIOT/Verification/Identity/10962759733523/ - // // { api_id: 'dd3d0294-243f-11e9-b496-0242ac110002', error: 'failed' } - // // client.verification.delete_identity(20594710404052).then(function (identityDelete) { - // // console.log('identity Delete result =>', JSON.stringify(identityDelete)); - // // }); + it('Delete Identity', function () { + client.identities.delete(18294047791076).then(function (deleteResult) { + console.log('identity delete result =>', JSON.stringify(deleteResult)); + }); + }); + - // }); }); From 3ff75822bfde4ec3ae97492029fb5d1f12cf9360 Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 18 Feb 2019 13:39:08 +0530 Subject: [PATCH 34/35] Finished all test cases --- lib/rest/request-test.js | 4 +- test/test.address.js | 239 ++++++++++++++++++------------------ test/test.identity.js | 256 +++++++++++++++++++-------------------- 3 files changed, 250 insertions(+), 249 deletions(-) diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index 6df03e55..2e335c00 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1326,7 +1326,7 @@ export function Request(config) { } //Create Address - Valid input data - if (method == 'POST' && action == 'Verification/Address/23991395742603/ 23991395742603 ') { + if (method == 'POST' && action == 'Verification/Address/') { resolve({ response: {}, body: { "apiId": "3269e592-2478-11e9-b01f-0242ac110002", "message": "Your request has been accepted." } @@ -1351,7 +1351,7 @@ export function Request(config) { }); } - + //Delete Address => input data if (method == 'DELETE' && action == 'Verification/Address/87928077747492/') { resolve({ diff --git a/test/test.address.js b/test/test.address.js index ecbbc4fc..0313dfaa 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -1,5 +1,5 @@ -import { Client } from '../lib/rest/client'; -// import { Client } from '../lib/rest/client-test'; +// import { Client } from '../lib/rest/client'; +import { Client } from '../lib/rest/client-test'; @@ -14,123 +14,124 @@ let client = new Client(authId, authToken); describe('AddressVerification Interface', function () { - // it('Get Address List', function (done) { - // client.addresses.list().then(function (addressList) { - // done(); - // }).catch(function (err) { - // done(new Error("Test Failed. - Failed to fetch address list")) - // }) - // }); - - // it('Get Address Details', function (done) { - // client.addresses.get(14632037725844).then(function (identityDetails) { - // // console.log('identity detail is =>', JSON.stringify(identityDetails)); - // done(); - // }).catch(function (err) { - // done(new Error("Test Failed. - Failed to fetch address details")) - // }) - // }); - - - // it('Create Address - In-valid Fields', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (addressDetails) { - // // console.log('address Create result =>', JSON.stringify(addressDetails)); - // done(new Error("Invalid result. Create address should throw error with invalid data.")) - // }) - // .catch(function (Erroraddress) { - // done(); - // // console.log("address result==>", Erroraddress); - // }) - // }); - - // it('Create Address - Valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (addressDetails) { - // // console.log('address Create result =>', JSON.stringify(addressDetails)); - // done(); - // }) - // .catch(function (Erroraddress) { - // done(new Error("Invalid result. Create address should not throw error with valid data.")) - // }) - // }); - - // it('Update Address', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // var params = { - // address_id: "73529957241107", - // proof_type: "PASSPORT", - // phone_number_country: "in", - // number_type: "9898989685", - // salutation: "Mr", - // // first_name: first_name, - // // last_name: last_name, - // // address_line1: address_line1, - // // address_line2: address_line2, - // // city: city, - // // region: region, - // // postal_code: postal_code, - // // country_iso: country_iso, - // // callback_url: callback_url, - // // alias: alias, - // // file: addressProofPath, - // // proof_type: proof_type, - // // id_number: id_number, - // // fiscal_identification_code: fiscal_identification_code, - // // street_code: street_code, - // // municipal_code: municipal_code - // }; - - - // client.addresses.update(params).then(function (updateResult) { - // done(); - // }).catch((err) => { - // done(err); - // }); - - // }); - - // it('Update Address', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // var params = { - // // address_id: "73529957241107", - // proof_type: "PASSPORT", - // phone_number_country: "in", - // number_type: "9898989685", - // salutation: "Mr", - // // first_name: first_name, - // // last_name: last_name, - // // address_line1: address_line1, - // // address_line2: address_line2, - // // city: city, - // // region: region, - // // postal_code: postal_code, - // // country_iso: country_iso, - // // callback_url: callback_url, - // // alias: alias, - // // file: addressProofPath, - // // proof_type: proof_type, - // // id_number: id_number, - // // fiscal_identification_code: fiscal_identification_code, - // // street_code: street_code, - // // municipal_code: municipal_code - // }; - - - // client.addresses.update(params).then(function (updateResult) { - // done(new Error("Invalid result. Update address should throw error when address_id not provided.")) - // }).catch((err) => { - // done(); - // }); - - // }); + it('Get Address List', function (done) { + client.addresses.list().then(function (addressList) { + done(); + }).catch(function (err) { + done(new Error("Test Failed. - Failed to fetch address list")) + }) + }); + + it('Get Address Details', function (done) { + client.addresses.get(14632037725844).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + done(); + }).catch(function (err) { + done(new Error("Test Failed. - Failed to fetch address details")) + }) + }); + + + it('Create Address - In-valid Fields', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(new Error("Invalid result. Create address should throw error with invalid data.")) + }) + .catch(function (Erroraddress) { + done(); + // console.log("address result==>", Erroraddress); + }) + }); + + it('Create Address - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.addresses.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (addressDetails) { + // console.log('address Create result =>', JSON.stringify(addressDetails)); + done(); + }) + .catch(function (err) { + done(new Error("Invalid result. Create address should not throw error with valid data.")) + console.log(err); + }) + }); + + it('Update Address with valid data', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + var params = { + address_id: "23991395742603", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + salutation: "Mr", + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: addressProofPath, + // proof_type: proof_type, + // id_number: id_number, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.addresses.update(params).then(function (updateResult) { + done(); + }).catch((err) => { + done(err); + }); + + }); + + it('Update Address - Without address_id', function (done) { + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + var params = { + // address_id: "73529957241107", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + salutation: "Mr", + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: addressProofPath, + // proof_type: proof_type, + // id_number: id_number, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.addresses.update(params).then(function (updateResult) { + done(new Error("Invalid result. Update address should throw error when address_id not provided.")) + }).catch((err) => { + done(); + }); + + }); it('Delete Address', function () { diff --git a/test/test.identity.js b/test/test.identity.js index 21941eeb..0784ddad 100644 --- a/test/test.identity.js +++ b/test/test.identity.js @@ -1,5 +1,5 @@ -import { Client } from '../lib/rest/client'; -// import { Client } from '../lib/rest/client-test'; +// import { Client } from '../lib/rest/client'; +import { Client } from '../lib/rest/client-test'; let authId = 'MAMTI0ZWVIMDC5MMRIOT'; let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; @@ -15,145 +15,145 @@ describe('Identity Interface', function () { it('Get Identity List', function (done) { client.identities.list().then(function (identityList) { - console.log('identity list is =>', JSON.stringify(identityList)); + // console.log('identity list is =>', JSON.stringify(identityList)); done() }).catch(function (err) { done(err); }); }); - // it('Get Identity Details', function (done) { - // client.identities.get(27658110766647).then(function (identityDetails) { - // // console.log('identity detail is =>', JSON.stringify(identityDetails)); - // done() - // }).catch(function (err) { - // done(err); - // }); - // }); - - // it('Create Identity - In-valid Fields', function (done) { - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.identities.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(new Error("Invalid result. Create identity should throw error with invalid data.")) - // }) - // .catch(function (Erroridentity) { - // done(); - // // console.log("identity result==>", Erroridentity); - - // }) - // }); - - // it('Create Identity - Valid Fields', function (done) { - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - - // var addressProofPath = __dirname + '/api_uploads/address_proof.png'; - // client.identities.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') - // .then(function (identityDetails) { - // // console.log('identity Create result =>', JSON.stringify(identityDetails)); - // done(); - // }) - // .catch(function (Erroridentity) { - // done(new Error("Invalid result. Create identity should not throw error with valid data.")) - // // console.log("identity result==>", Erroridentity); - - // }) - // }); - - // it('Update Identity with valid fields', function (done) { - - // var params = { - // identity_id: "", - // proof_type: "PASSPORT", - // phone_number_country: "in", - // number_type: "9898989685", - // // salutation: salutation, - // // first_name: first_name, - // // last_name: last_name, - // // address_line1: address_line1, - // // address_line2: address_line2, - // // city: city, - // // region: region, - // // postal_code: postal_code, - // // country_iso: country_iso, - // // callback_url: callback_url, - // // alias: alias, - // // file: file, - // // proof_type: proof_type, - // // id_number: id_number, - // // nationality: nationality, - // // id_nationality: id_nationality, - // // birth_place: birth_place, - // // birth_date: birth_date, - // // id_issue_date: id_issue_date, - // // business_name: business_name, - // // fiscal_identification_code: fiscal_identification_code, - // // street_code: street_code, - // // municipal_code: municipal_code - // }; - - - // client.identities.update(params).then(function (updateResult) { - // // console.log('identity update result =>', JSON.stringify(updateResult)); - // done(); - // }).catch(function (err) { - // done(err); - // }); - - // }); - - // it('Update Identity Without id', function (done) { - - // var params = { - // proof_type: "PASSPORT", - // phone_number_country: "in", - // number_type: "9898989685", - // // salutation: salutation, - // // first_name: first_name, - // // last_name: last_name, - // // address_line1: address_line1, - // // address_line2: address_line2, - // // city: city, - // // region: region, - // // postal_code: postal_code, - // // country_iso: country_iso, - // // callback_url: callback_url, - // // alias: alias, - // // file: file, - // // proof_type: proof_type, - // // id_number: id_number, - // // nationality: nationality, - // // id_nationality: id_nationality, - // // birth_place: birth_place, - // // birth_date: birth_date, - // // id_issue_date: id_issue_date, - // // business_name: business_name, - // // fiscal_identification_code: fiscal_identification_code, - // // street_code: street_code, - // // municipal_code: municipal_code - // }; - - // client.identities.update(params).then(function (updateResult) { - // // console.log('identity update result =>', JSON.stringify(updateResult)); - // done(new Error("Invalid result. Update identity should throw error if identity_id not provided.")) - // }).catch(function (err) { - // done(); - // }); - - // }); + it('Get Identity Details', function (done) { + client.identities.get(27658110766647).then(function (identityDetails) { + // console.log('identity detail is =>', JSON.stringify(identityDetails)); + done() + }).catch(function (err) { + done(err); + }); + }); + it('Create Identity - In-valid Fields', function (done) { - // // Delete identity - it('Delete Identity', function () { - client.identities.delete(18294047791076).then(function (deleteResult) { - console.log('identity delete result =>', JSON.stringify(deleteResult)); + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.identities.create("in", "9898997510", 'Mr', null, 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(new Error("Invalid result. Create identity should throw error with invalid data.")) + }) + .catch(function (Erroridentity) { + done(); + // console.log("identity result==>", Erroridentity); + + }) + }); + + it('Create Identity - Valid Fields', function (done) { + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + + var addressProofPath = __dirname + '/api_uploads/address_proof.png'; + client.identities.create("in", "9898997510", 'Mr', "ABC", 'DEF', 'bhagwati heritage 1201', 'sector-21', 'mumbai', 'maharashtra', '410209', 'IN', 'https://www.google.com/', 'Null', addressProofPath, 'passport', '123', 'IN', 'ind-123', 'gujarat', '01-02-1991', 'id-date-12/10/2017', 'bus-plivo', 'fascal123', 'st12', 'mu34') + .then(function (identityDetails) { + // console.log('identity Create result =>', JSON.stringify(identityDetails)); + done(); + }) + .catch(function (Erroridentity) { + done(new Error("Invalid result. Create identity should not throw error with valid data.")) + // console.log("identity result==>", Erroridentity); + + }) + }); + + it('Update Identity with valid fields', function (done) { + + var params = { + identity_id: "", + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + // salutation: salutation, + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: file, + // proof_type: proof_type, + // id_number: id_number, + // nationality: nationality, + // id_nationality: id_nationality, + // birth_place: birth_place, + // birth_date: birth_date, + // id_issue_date: id_issue_date, + // business_name: business_name, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + + client.identities.update(params).then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + done(); + }).catch(function (err) { + done(err); }); + }); + it('Update Identity Without id', function (done) { + + var params = { + proof_type: "PASSPORT", + phone_number_country: "in", + number_type: "9898989685", + // salutation: salutation, + // first_name: first_name, + // last_name: last_name, + // address_line1: address_line1, + // address_line2: address_line2, + // city: city, + // region: region, + // postal_code: postal_code, + // country_iso: country_iso, + // callback_url: callback_url, + // alias: alias, + // file: file, + // proof_type: proof_type, + // id_number: id_number, + // nationality: nationality, + // id_nationality: id_nationality, + // birth_place: birth_place, + // birth_date: birth_date, + // id_issue_date: id_issue_date, + // business_name: business_name, + // fiscal_identification_code: fiscal_identification_code, + // street_code: street_code, + // municipal_code: municipal_code + }; + + client.identities.update(params).then(function (updateResult) { + // console.log('identity update result =>', JSON.stringify(updateResult)); + done(new Error("Invalid result. Update identity should throw error if identity_id not provided.")) + }).catch(function (err) { + done(); + }); + + }); + // // Delete identity + it('Delete Identity', function (done) { + client.identities.delete(18294047791076).then(function (deleteResult) { + // console.log('identity delete result =>', JSON.stringify(deleteResult)); + done(); + }).catch(function (err) { + done(err); + }); + }); }); From b0dd515cc3e59ad32a5922a44519274e6dd96dfc Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 18 Feb 2019 13:43:50 +0530 Subject: [PATCH 35/35] Removed auth tokens. --- gulpfile.js | 2 +- test/test.address.js | 18 ++++++++---------- test/test.identity.js | 8 ++------ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bb7967c9..f272484d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -45,7 +45,7 @@ gulp.task('test', ['pre-test'], function (cb) { console.log('Running tests with node version', process.version); - gulp.src('test/**/test.identity.js') + gulp.src('test/**/*.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { diff --git a/test/test.address.js b/test/test.address.js index 0313dfaa..d674fa09 100644 --- a/test/test.address.js +++ b/test/test.address.js @@ -1,18 +1,13 @@ // import { Client } from '../lib/rest/client'; import { Client } from '../lib/rest/client-test'; - - -let authId = 'MAMTI0ZWVIMDC5MMRIOT'; -let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; - -// let authId = 'auth_id'; -// let authToken = 'auth_token'; +let authId = 'auth_id'; +let authToken = 'auth_token'; let client = new Client(authId, authToken); -describe('AddressVerification Interface', function () { +describe('Address Interface', function () { it('Get Address List', function (done) { client.addresses.list().then(function (addressList) { @@ -134,9 +129,12 @@ describe('AddressVerification Interface', function () { }); - it('Delete Address', function () { + it('Delete Address', function (done) { client.addresses.delete(87928077747492).then(function (deleteResult) { - console.log('address delete result =>', JSON.stringify(deleteResult)); + // console.log('address delete result =>', JSON.stringify(deleteResult)); + done(); + }).catch(function (err) { + done(err); }); }); diff --git a/test/test.identity.js b/test/test.identity.js index 0784ddad..e9cadf59 100644 --- a/test/test.identity.js +++ b/test/test.identity.js @@ -1,12 +1,8 @@ // import { Client } from '../lib/rest/client'; import { Client } from '../lib/rest/client-test'; -let authId = 'MAMTI0ZWVIMDC5MMRIOT'; -let authToken = 'ZTRmNWUyMWJlYWMyNDc2NjliNzViODdmYjM1ZWNk'; - - -// let authId = 'auth_id'; -// let authToken = 'auth_token'; +let authId = 'auth_id'; +let authToken = 'auth_token'; let client = new Client(authId, authToken);