@ballerine/common
Advanced tools
Comparing version 0.4.4 to 0.5.0
@@ -26,2 +26,5 @@ /** | ||
var uniqueArray = require('./utils/unique-array/unique-array.js'); | ||
var utils = require('./schemas/documents/workflow/documents/utils.js'); | ||
var GH = require('./schemas/documents/workflow/documents/schemas/GH.js'); | ||
var index = require('./schemas/documents/workflow/documents/schemas/index.js'); | ||
@@ -41,2 +44,6 @@ | ||
exports.uniqueArray = uniqueArray.uniqueArray; | ||
exports.getDocumentId = utils.getDocumentId; | ||
exports.certificateOfResidenceGH = GH.certificateOfResidenceGH; | ||
exports.ghanaDocuments = GH.ghanaDocuments; | ||
exports.getDocumentsByCountry = index.getDocumentsByCountry; | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var i=r&&r.prototype instanceof p?r:p,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:L(t,e,u)}),a}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function p(){}function v(){}function y(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(k([])));m&&m!==e&&n.call(m,a)&&(d=m);var w=y.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){function e(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"==typeof s&&n.call(s,"__await")?r.resolve(s.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new r((function(r,o){e(t,n,r,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=E(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=l(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}function E(t,r){var e=r.method,n=t.iterator[e];if(void 0===n)return r.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void 0,E(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),h;var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return v.prototype=y,o(w,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,f(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,c,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:k(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},t}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}var o=function(){var t=n(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(r){return t.apply(this,arguments)}}(),i=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},a=function(){var t=n(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();t.handlePromise=o,t.isEmptyObject=function(t){return i(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return i(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return i(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return i(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=i,t.noNullish=function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return t.reduce((function(t,r,n){var o,i=null!=(o=e[n])?o:"";return t+r+String(i)}),"").replace(/\s+/g," ")},t.sleep=a,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(H([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=N(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function N(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function H(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=H,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:H(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],y={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(c)};t.certificateOfResidenceGH={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=y[t];return e||{}},t.ghanaDocuments=c,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
@@ -346,5 +346,39 @@ /** | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) o = it; | ||
var i = 0; | ||
return function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
exports.arrayLikeToArray = _arrayLikeToArray; | ||
exports.asyncToGenerator = _asyncToGenerator; | ||
exports.createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose; | ||
exports.regeneratorRuntime = _regeneratorRuntime; | ||
exports.unsupportedIterableToArray = _unsupportedIterableToArray; | ||
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map |
@@ -26,2 +26,5 @@ /** | ||
var uniqueArray = require('./utils/unique-array/unique-array.js'); | ||
var utils = require('./schemas/documents/workflow/documents/utils.js'); | ||
var GH = require('./schemas/documents/workflow/documents/schemas/GH.js'); | ||
var index = require('./schemas/documents/workflow/documents/schemas/index.js'); | ||
@@ -41,2 +44,6 @@ | ||
exports.uniqueArray = uniqueArray.uniqueArray; | ||
exports.getDocumentId = utils.getDocumentId; | ||
exports.certificateOfResidenceGH = GH.certificateOfResidenceGH; | ||
exports.ghanaDocuments = GH.ghanaDocuments; | ||
exports.getDocumentsByCountry = index.getDocumentsByCountry; | ||
//# sourceMappingURL=index.js.map |
@@ -342,4 +342,35 @@ /** | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) o = it; | ||
var i = 0; | ||
return function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
export { _asyncToGenerator as asyncToGenerator, _regeneratorRuntime as regeneratorRuntime }; | ||
export { _arrayLikeToArray as arrayLikeToArray, _asyncToGenerator as asyncToGenerator, _createForOfIteratorHelperLoose as createForOfIteratorHelperLoose, _regeneratorRuntime as regeneratorRuntime, _unsupportedIterableToArray as unsupportedIterableToArray }; | ||
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map |
@@ -22,2 +22,5 @@ /** | ||
export { uniqueArray } from './utils/unique-array/unique-array.js'; | ||
export { getDocumentId } from './schemas/documents/workflow/documents/utils.js'; | ||
export { certificateOfResidenceGH, ghanaDocuments } from './schemas/documents/workflow/documents/schemas/GH.js'; | ||
export { getDocumentsByCountry } from './schemas/documents/workflow/documents/schemas/index.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -13,2 +13,8 @@ /** | ||
import { IErrorWithCode } from '@/utils/is-error-with-code/interfaces'; | ||
export { getDocumentId } from '@/schemas/documents/workflow/documents/utils'; | ||
export { DefaultContextSchema } from '@/schemas/documents/context'; | ||
export { TDefaultSchemaDocumentPage } from '@/schemas/documents/default-context-page-schema'; | ||
export { certificateOfResidenceGH, ghanaDocuments } from '@/schemas/documents/workflow/documents/schemas/GH'; | ||
export { getDocumentsByCountry } from '@/schemas/documents/workflow/documents/schemas/index'; | ||
export { TDocument } from '@/schemas/documents/workflow/documents/types'; | ||
@@ -15,0 +21,0 @@ declare const handlePromise: <TResult>(promise: Promise<TResult>) => Promise<[TResult, undefined] | [undefined, unknown]>; |
@@ -348,2 +348,33 @@ /** | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) o = it; | ||
var i = 0; | ||
return function () { | ||
if (i >= o.length) return { | ||
done: true | ||
}; | ||
return { | ||
done: false, | ||
value: o[i++] | ||
}; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
@@ -445,2 +476,496 @@ var handlePromise = /*#__PURE__*/function () { | ||
var getDocumentId = function getDocumentId(document) { | ||
var _document$issuer; | ||
var id = (document == null ? void 0 : document.category) + "-" + (document == null ? void 0 : document.type) + "-" + (document == null ? void 0 : (_document$issuer = document.issuer) == null ? void 0 : _document$issuer.country); | ||
if (document.version) { | ||
id = id + "-v" + document.version; | ||
} | ||
return id.toLowerCase(); | ||
}; | ||
var certificateOfResidenceGH = { | ||
category: 'proof_of_address', | ||
type: 'water_bill', | ||
issuer: { | ||
type: 'local_authority', | ||
city: 'Accra', | ||
name: 'Accra Metropolitan Assembly', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
amountDue: { | ||
type: 'number' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}; | ||
var ghanaDocuments = [{ | ||
category: 'proof_of_address', | ||
type: 'water_bill', | ||
issuer: { | ||
type: 'local_authority', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
amountDue: { | ||
type: 'number' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'electricity_bill', | ||
issuer: { | ||
type: 'local_authority', | ||
city: 'Accra', | ||
name: 'Electricity Company of Ghana', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
amountDue: { | ||
type: 'number' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'tenancy_agreement', | ||
issuer: { | ||
type: 'private', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
rentalAmount: { | ||
type: 'number' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_employment', | ||
type: 'payslip', | ||
issuer: { | ||
type: 'private', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
employeeName: { | ||
type: 'string' | ||
}, | ||
position: { | ||
type: 'string' | ||
}, | ||
salaryAmount: { | ||
type: 'number' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_employment', | ||
type: 'appointment_letter', | ||
issuer: { | ||
type: 'private', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
employeeName: { | ||
type: 'string' | ||
}, | ||
position: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'bank_statement', | ||
issuer: { | ||
type: 'bank', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'mortgage_statement', | ||
issuer: { | ||
type: 'bank', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'property_rate', | ||
issuer: { | ||
type: 'local_authority', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'birth_certificate', | ||
issuer: { | ||
type: 'government', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
birthPlace: { | ||
type: 'string' | ||
}, | ||
dateOfBirth: { | ||
type: 'string', | ||
format: 'date' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_employment', | ||
type: 'ssnit_pension_statement', | ||
issuer: { | ||
type: 'government', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
employeeName: { | ||
type: 'string' | ||
}, | ||
employerName: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_employment', | ||
type: 'introductory_letter', | ||
issuer: { | ||
type: 'private', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
employeeName: { | ||
type: 'string' | ||
}, | ||
position: { | ||
type: 'string' | ||
}, | ||
employerName: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'form_a', | ||
issuer: { | ||
type: 'government', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}, { | ||
category: 'proof_of_address', | ||
type: 'form_3', | ||
issuer: { | ||
type: 'government', | ||
country: 'GH' | ||
}, | ||
issuingVersion: 1, | ||
version: 1, | ||
propertiesSchema: { | ||
type: 'object', | ||
properties: { | ||
nationalIdNumber: { | ||
type: 'string', | ||
pattern: '^GHA-\\d{9}-\\d{1}$' | ||
}, | ||
docNumber: { | ||
type: 'number' | ||
}, | ||
userAddress: { | ||
type: 'string' | ||
}, | ||
physicalAddress: { | ||
type: 'string' | ||
}, | ||
issuingDate: { | ||
type: 'string', | ||
format: 'date' | ||
} | ||
} | ||
} | ||
}]; | ||
var createDocumentIdToDocumentMap = function createDocumentIdToDocumentMap(documents) { | ||
var result = {}; | ||
for (var _iterator = _createForOfIteratorHelperLoose(documents), _step; !(_step = _iterator()).done;) { | ||
var document = _step.value; | ||
var id = getDocumentId(document); | ||
result[id] = document; | ||
} | ||
return result; | ||
}; | ||
var documentIdsByCountry = { | ||
GH: createDocumentIdToDocumentMap(ghanaDocuments) | ||
}; | ||
var getDocumentsByCountry = function getDocumentsByCountry(countryCode) { | ||
var documents = documentIdsByCountry[countryCode]; | ||
if (!documents) return {}; | ||
return documents; | ||
}; | ||
exports.certificateOfResidenceGH = certificateOfResidenceGH; | ||
exports.getDocumentId = getDocumentId; | ||
exports.getDocumentsByCountry = getDocumentsByCountry; | ||
exports.ghanaDocuments = ghanaDocuments; | ||
exports.handlePromise = handlePromise; | ||
@@ -447,0 +972,0 @@ exports.isEmptyObject = isEmptyObject; |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var i=r&&r.prototype instanceof p?r:p,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:L(t,e,u)}),a}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function p(){}function v(){}function y(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(k([])));m&&m!==e&&n.call(m,a)&&(d=m);var w=y.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){function e(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"==typeof s&&n.call(s,"__await")?r.resolve(s.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new r((function(r,o){e(t,n,r,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=E(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=l(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}function E(t,r){var e=r.method,n=t.iterator[e];if(void 0===n)return r.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void 0,E(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),h;var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return v.prototype=y,o(w,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:v,configurable:!0}),v.displayName=f(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,f(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,c,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:k(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},t}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}var o=function(){var t=n(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(r){return t.apply(this,arguments)}}(),i=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},a=function(){var t=n(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();t.handlePromise=o,t.isEmptyObject=function(t){return i(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return i(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return i(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return i(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=i,t.noNullish=function(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];return t.reduce((function(t,r,n){var o,i=null!=(o=e[n])?o:"";return t+r+String(i)}),"").replace(/\s+/g," ")},t.sleep=a,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(H([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=N(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function N(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function H(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=H,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:H(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],y={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(c)};t.certificateOfResidenceGH={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=y[t];return e||{}},t.ghanaDocuments=c,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
@@ -5,3 +5,3 @@ { | ||
"author": "Ballerine <dev@ballerine.com>", | ||
"version": "0.4.4", | ||
"version": "0.5.0", | ||
"description": "common", | ||
@@ -8,0 +8,0 @@ "module": "./dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
372836
79
3576