blob: e8b4129d923a67a27b9309a18734e2c6cfaf1436 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{148:function(t,e,n){"use strict";var l={props:{collapsed:{type:Boolean,default:!1}},data:function(){return{expanded:!this.collapsed,transitioning:!1}},watch:{collapsed:function(t){this.expanded=!t}},methods:{beforeenter:function(t){this.transitioning=!0,t.style.height=0},enter:function(t){t.style.height=t.scrollHeight+"px"},afterenter:function(t){t.style.height="",this.transitioning=!1},beforeleave:function(t){this.transitioning=!0,t.style.height=t.offsetHeight+"px",t.offsetHeight},leave:function(t){t.style.height=0,t.offsetHeight},afterleave:function(t){this.transitioning=!1},toggle:function(){this.transitioning||(this.expanded=!this.expanded,this.$emit(this.expanded?"expanding":"collapsing",this.id))}}},r=(n(172),n(2)),component=Object(r.a)(l,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card collapsibleCard",class:{collapsed:!t.expanded}},[t.$slots.header?n("header",{staticClass:"card-header",on:{click:function(e){return e.preventDefault(),t.toggle()}}},[n("p",{staticClass:"card-header-title"},[!t.$slots.headerCollapsed||t.expanded?t._t("header"):t._t("headerCollapsed")],2),t._v(" "),n("a",{staticClass:"card-header-icon"},[n("span",{staticClass:"icon"},[n("i",{staticClass:"fa",class:{"fa-angle-down":t.expanded,"fa-angle-up":!t.expanded}})])])]):t._e(),t._v(" "),n("transition",{attrs:{name:"rollup","leave-active-class":"collapsing","enter-active-class":"collapsing"},on:{"before-leave":t.beforeleave,leave:t.leave,"after-leave":t.afterleave,"before-enter":t.beforeenter,enter:t.enter,"after-enter":t.afterenter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.expanded,expression:"expanded"}]},[n("div",{staticClass:"card-content"},[t._t("default")],2)])])],1)},[],!1,null,null,null);e.a=component.exports},153:function(t,e,n){},159:function(t,e,n){"use strict";n(63);var l=n(357),r=(n(281),n(152)),c=(n(149),n(21),n(148)),o=n(155),f=n.n(o),d=n(282),h=n.n(d),v=n(154),m=n.n(v),_=(n(64),n(309)),y=n(310),C=n(311),O=n.n(C),k=n(334),$=n.n(k),j=n(335),x=n.n(j),P=function(){function t(e,n,l){Object(_.a)(this,t),this.$id=t.idx++,this.$step=e+"&#8203",this.$parent=n,l&&this.parseFrom(l)}return Object(y.a)(t,[{key:"toJSON",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;return $()(n,function(n,l,c,o){if(n instanceof t)return Object.entries(n).filter(function(t){var e=Object(r.a)(t,2),n=e[0];e[1];return["$id","$step","$parent"].indexOf(n)<0}).reduce(function(t,n){var l=Object(r.a)(n,2),c=l[0],o=l[1];return t[c]=e.toJSON(o),t},{})})}},{key:"getPath",value:function(){var path="";return this.$parent&&(path+=this.$parent.schema.getPath(),"object"===this.$parent.schema.type&&(path+=".")),path+=this.$step,this.getPath=function(){return path},path}},{key:"parseFrom",value:function(e){var n=this;return!0===e?e={}:!1===e&&(e={not:!0}),Object.assign(this,x()(O()(e),["$step","$id","$parent","items","properties","patternProperties","additionalItems","additionalProperties","contains","propertyNames","not","allOf","anyOf","oneOf"])),e.items&&(e.items instanceof Array?this.items=e.items.map(function(l,r){return new t("[".concat(r,"]"),{schema:n,path:"items[".concat(r,"]")},e.items[r])}):this.items=new t("[*]",{schema:this,path:"items"},e.items)),["properties","patternProperties"].filter(function(t){return e.hasOwnProperty(t)}).forEach(function(l){return Object.entries(e[l]).forEach(function(e,c){var o=Object(r.a)(e,2),f=o[0],d=o[1];n[l]=n[l]||{},n[l][f]=new t("patternProperties"===l?"&lt;field&gt;":f,{schema:n,path:"".concat(l,'["').concat(f,'"]')},d)})}),["additionalItems","additionalProperties","contains","propertyNames","not"].filter(function(t){return e.hasOwnProperty(t)}).forEach(function(path){n[path]=new t("+",{schema:n,path:path},e[path])}),["allOf","anyOf","oneOf"].filter(function(t){return e.hasOwnProperty(t)}).forEach(function(l){return e[l].forEach(function(e,r){n[l]=n[l]||[],n[l].push(new t("(".concat(r,")").concat("anyOf"===l?"?":"+"),{schema:n,path:"".concat(l,"[").concat(r,"]")},e))})}),this}}]),t}();P.idx=0;var E=P,w={props:{link:{required:!0}},methods:{isSchema:function(t){return t instanceof E}}},L=n(2),S=Object(L.a)(w,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._t("default"),t._v(" "),!0===t.link?[t._v("\n yes\n ")]:!1===t.link?[t._v("\n no\n ")]:t.isSchema(t.link)?[n("nuxt-link",{attrs:{to:"#p-"+t.link.$id}},[n("span",{domProps:{innerHTML:t._s(t.link.getPath())}})])]:t.link instanceof Array?n("ul",t._l(t.link,function(e){return n("li",{key:e.$id},[n("nuxt-link",{attrs:{to:"#p-"+e.$id}},[n("span",{domProps:{innerHTML:t._s(e.getPath())}})])],1)}),0):t.link instanceof Object?n("ul",t._l(t.link,function(e,l){return n("li",{key:l},[n("nuxt-link",{attrs:{to:"#p-"+e.$id}},[t._v("\n "+t._s(l)+"\n ")])],1)}),0):t._e()],2)},[],!1,null,null,null).exports,z={name:"schemaToc",props:{tag:{type:String,default:"li"},schema:{type:Object,required:!0}}},T=(n(345),Object(L.a)(z,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component"},[n("nuxt-link",{attrs:{to:"#p-"+t.schema.$id}},[n("span",{domProps:{innerHTML:t._s(t.schema.$step)}})]),t._v(" "),t.schema.properties||t.schema.patternProperties||t.schema.items?n("ul",[t._l(t.schema.properties,function(t,e){return n("schemaToc",{key:e,attrs:{schema:t}})}),t._v(" "),t._l(t.schema.patternProperties,function(t,e){return n("schemaToc",{key:e,attrs:{schema:t}})}),t._v(" "),t.schema.items?[t.schema.items instanceof Array?t._l(t.schema.items,function(t,e){return n("schemaToc",{key:e,attrs:{schema:t}})}):n("schemaToc",{attrs:{schema:t.schema.items}})]:t._e()],2):t._e()],1)},[],!1,null,null,null).exports),F=n(346),M=n.n(F),N={props:{type:{type:String,required:!0},examples:{type:Object,required:!1,default:function(){return{}}}},data:function(){return{masterSchema:null,loading:!0}},created:function(){var t=this,e={date:{link:"https://tools.ietf.org/html/rfc3339#section-5.6",name:"RFC3339, 5.6"},email:{link:"https://tools.ietf.org/html/rfc5322#section-3.4.1",name:"RFC5322, 3.4.1"}};n(348)("./".concat(this.type,"_schema.json")).then(function(e){return t.masterSchema=new E("$",null,e.default),Object.entries(t.examples).forEach(function(e){var n=Object(r.a)(e,2),path=n[0],l=n[1];f()(t.masterSchema,path)?M()(t.masterSchema,"".concat(path,".examples"),l):console.error("schema path not found in ".concat(t.type,": ").concat(path))}),t.loading=!1,e.default}).catch(function(t){throw t}),this.$static={formats:{"date-time":e.date,date:e.date,time:e.date,email:e.email}}},methods:{traverse:function(t,e){var n=this;t instanceof E?(e(t),Object.entries(t).filter(function(t){var e=Object(r.a)(t,2),n=e[0];e[1];return"$parent"!==n}).forEach(function(t){var l=Object(r.a)(t,2),c=(l[0],l[1]);return n.traverse(c,e)})):t instanceof Array?t.forEach(function(t){return n.traverse(t,e)}):t instanceof Object&&Object.values(t).forEach(function(t){return n.traverse(t,e)})},simplifySchema:function(t){var e=function(t){return t.anyOf&&t.anyOf.indexOf(!0)>=0?[t,!0]:t.allOf&&t.allOf.indexOf(!1)>=0?[t,!1]:t.allOf&&t.allOf.length?[t,new E(t.$step,t.$parent,h.a.apply(void 0,[{}].concat(Object(l.a)(t.allOf.map(function(t){return t.toJSON()})))))]:!0===t.not?[t,!1]:0===Object.keys(t).filter(function(t){return"$"!==t[0]}).length?[t,!0]:null};return this.traverse(t,function(n){!function n(l){if(l){var c=Object(r.a)(l,2),o=c[0],f=c[1],d=o.$parent;d&&M()(d.schema,d.path,f),t.$parent=null,n(e(d.schema))}}(e(n))}),t}},computed:{schemas:function(){if(!this.masterSchema)return null;var t={};return this.traverse(this.simplifySchema(this.masterSchema),function(e){t[e.$id]=e}),t}},filters:{stringify:function(t){return JSON.stringify(t," ",2)},capitalize:function(t,e){return t?(t instanceof Array||(t=[t]),t.map(function(i){return"".concat(i[0].toUpperCase()).concat(i.slice(1))}).join(", ")):""}},components:{card:c.a,prism:m.a,schemaToc:T,schemaLink:S}},H=(n(349),Object(L.a)(N,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"schemaDetail",class:{"is-loading":t.loading},attrs:{id:"schema-detail"}},[n("div",{staticClass:"accordion"},[null!==t.masterSchema?n("card",{attrs:{collapsed:!0}},[n("template",{slot:"header"},[t._v("\n Structure of the payload\n ")]),t._v(" "),n("ul",t._l(t.masterSchema.properties,function(t,e){return n("schemaToc",{key:e,attrs:{schema:t}})}),1)],2):t._e(),t._v(" "),t._t("default")],2),t._v(" "),n("h1",[n("a",{attrs:{id:t.type+"-schema-detail",title:t.type+" Fields definition"}}),t._v("\n Fields definition\n ")]),t._v(" "),t._l(t.schemas,function(e){return n("div",{key:e.$id,staticClass:"card property"},[n("header",{staticClass:"card-header"},[n("a",{attrs:{id:"p-"+e.$id}}),t._v(" "),n("p",{staticClass:"card-header-title"},[n("span",{domProps:{innerHTML:t._s(e.getPath())}})]),t._v(" "),n("nuxt-link",{staticClass:"card-header-icon",attrs:{to:"#schema-detail",title:"go up"}},[n("span",{staticClass:"icon"},[n("i",{staticClass:"fa fa-angle-up"})])])],1),t._v(" "),n("div",{staticClass:"card-content"},[e.description||e.type?n("div",{staticClass:"field is-horizontal"},[t._m(0,!0),t._v(" "),e.description?n("div",{staticClass:"field-body"},[t._v("\n "+t._s(e.description)+"\n ")]):e.type?n("div",{staticClass:"field-body"},[t._v("\n A simple "+t._s(t._f("capitalize")(e.type))+"\n ")]):t._e()]):t._e(),t._v(" "),e.$parent?n("div",{staticClass:"field is-horizontal"},[t._m(1,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("nuxt-link",{attrs:{to:"#p-"+e.$parent.schema.$id}},[n("span",{domProps:{innerHTML:t._s(e.$parent.schema.getPath())}})])],1)]):t._e(),t._v(" "),e.type?n("div",{staticClass:"field is-horizontal"},[t._m(2,!0),t._v(" "),n("div",{staticClass:"field-body"},[t._v("\n "+t._s(t._f("capitalize")(e.type,e))+"\n ")])]):t._e(),t._v(" "),e.format?n("div",{staticClass:"field is-horizontal"},[t._m(3,!0),t._v(" "),n("div",{staticClass:"field-body"},[t._v("\n "+t._s(e.format)+"\n "),t.$static.formats[e.format]?n("a",{attrs:{href:t.$static.formats[e.format].link}},[t._v(" ("+t._s(t.$static.formats[e.format].name)+")")]):t._e()])]):t._e(),t._v(" "),e.enum&&e.enum.length?n("div",{staticClass:"field is-horizontal"},[t._m(4,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("div",[t._v("\n "+t._s(e.enum.join(", "))+"\n ")])])]):t._e(),t._v(" "),e.hasOwnProperty("default")?n("div",{staticClass:"field is-horizontal"},[t._m(5,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("div",[t._v("\n "+t._s(e.default)+"\n ")])])]):t._e(),t._v(" "),e.maxLength?n("div",{staticClass:"field is-horizontal"},[t._m(6,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("div",[t._v("\n "+t._s(e.maxLength)+"\n ")])])]):t._e(),t._v(" "),e.properties||e.patternProperties||e.items?n("div",{staticClass:"field is-horizontal"},[t._m(7,!0),t._v(" "),n("div",{staticClass:"field-body"},[Object.keys(e.properties||{}).length>0?n("schemaLink",{attrs:{link:e.properties}}):t._e(),t._v(" "),Object.keys(e.patternProperties||{}).length>0?n("schemaLink",{attrs:{link:e.patternProperties}},[n("div",[t._v("Matching regular expressions:")])]):t._e(),t._v(" "),!e.items||e.items instanceof Array?e.items?n("schemaLink",{attrs:{link:e.items}},[n("div",[t._v("Ordered items of type:")])]):t._e():n("schemaLink",{attrs:{link:e.items}}),t._v(" "),Object.keys(e.properties||{}).length+Object.keys(e.patternProperties||{}).length!==0||e.items?t._e():[t._v("none")]],2)]):t._e(),t._v(" "),e.minProperties?n("div",{staticClass:"field is-horizontal"},[t._m(8,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("div",[t._v("\n "+t._s(e.minProperties)+"\n ")])])]):t._e(),t._v(" "),e.minItems?n("div",{staticClass:"field is-horizontal"},[t._m(9,!0),t._v(" "),n("div",{staticClass:"field-body"},[n("div",[t._v("\n "+t._s(e.minItems)+"\n ")])])]):t._e(),t._v(" "),e.hasOwnProperty("additionalProperties")?n("div",{staticClass:"field is-horizontal"},[t._m(10,!0),t._v(" "),"boolean"==typeof e.additionalProperties?n("schemaLink",{staticClass:"field-body",attrs:{link:e.additionalProperties}}):n("div",{staticClass:"field-body"},[t._v("\n if fulfilling "),n("schemaLink",{staticClass:"field-body",attrs:{link:e.additionalProperties}})],1)],1):t._e(),t._v(" "),e.not||e.oneOf||e.allOf||e.anyOf?n("div",{staticClass:"field is-horizontal"},[t._m(11,!0),t._v(" "),n("div",{staticClass:"field-body"},[e.not?n("schemaLink",{attrs:{link:e.not}},[t._v("\n Not fulfilling \n ")]):t._e(),t._v(" "),e.oneOf?n("schemaLink",{attrs:{link:e.oneOf}},[n("div",[t._v("Fulfilling exactly one of:")])]):t._e(),t._v(" "),e.allOf?n("schemaLink",{attrs:{link:e.allOf}},[n("div",[t._v("Fulfilling all of:")])]):t._e(),t._v(" "),e.anyOf?n("schemaLink",{attrs:{link:e.anyOf}},[n("div",[t._v("Fulfilling one of:")])]):t._e()],1)]):t._e(),t._v(" "),e.required&&e.required.length?n("div",{staticClass:"field is-horizontal"},[t._m(12,!0),t._v(" "),n("div",{staticClass:"field-body"},[t._v("\n "+t._s(e.required.join(", "))+"\n ")])]):t._e(),t._v(" "),e.examples?n("div",{staticClass:"field is-horizontal"},[t._m(13,!0),t._v(" "),n("div",{staticClass:"field-body"},t._l(e.examples,function(e,l){return n("prism",{key:l,attrs:{language:"json"}},[t._v(t._s(t._f("stringify")(e)))])}),1)]):t._e()])])})],2)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Description:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Parent:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Type:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Format:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Possible values:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Defaults to:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Maximum length:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Restriction on subfields:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Minimum amount of subfields:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Minimum amount of items:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Allows additional fields:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Restriction with boolean logic:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Required fields:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"field-label"},[e("label",{staticClass:"label"},[this._v("Example:")])])}],!1,null,null,null));e.a=H.exports},172:function(t,e,n){"use strict";var l=n(153);n.n(l).a},195:function(t,e,n){},196:function(t,e,n){},345:function(t,e,n){"use strict";var l=n(195);n.n(l).a},348:function(t,e,n){var map={"./v2/measurement_schema.json":[351,19],"./v2/message_schema.json":[352,20],"./v2/process_schema.json":[353,21],"./v3/measurement_schema.json":[354,22],"./v3/message_schema.json":[355,23],"./v3/process_schema.json":[356,24]};function l(t){if(!n.o(map,t))return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=map[t],l=e[0];return n.e(e[1]).then(function(){return n.t(l,7)})}l.keys=function(){return Object.keys(map)},l.id=348,t.exports=l},349:function(t,e,n){"use strict";var l=n(196);n.n(l).a}}]);