UNPKG

bigml-nodered-core

Version:
54 lines (48 loc) 6.38 kB
// Compiled by ClojureScript 1.10.520 {:target :nodejs} goog.provide('bigml_nodered_core.reify'); goog.require('cljs.core'); goog.require('bigml_nodered_core.wz'); goog.require('bigml_nodered_core.wz.tasks'); goog.require('bigml_nodered_core.wz.marshal'); goog.require('bigml_nodered_core.utils'); bigml_nodered_core.reify.create_node = (function bigml_nodered_core$reify$create_node(){ bigml_nodered_core.reify.reify_opts_fun = (function bigml_nodered_core$reify$create_node_$_reify_opts_fun(config__2062__auto__,payload__2063__auto__){ var config__2062__auto____$1 = cljs.core.merge.call(null,config__2062__auto__,payload__2063__auto__); return cljs.core.into.call(null,cljs.core.PersistentArrayMap.EMPTY,cljs.core.map.call(null,((function (config__2062__auto____$1){ return (function (p__2651){ var vec__2652 = p__2651; var field__2064__auto__ = cljs.core.nth.call(null,vec__2652,(0),null); var def__2065__auto__ = cljs.core.nth.call(null,vec__2652,(1),null); var k__2066__auto__ = bigml_nodered_core.utils.escape_api_name.call(null,field__2064__auto__); var f__2067__auto__ = (function (){var or__4131__auto__ = new cljs.core.Keyword(null,"query-key","query-key",773371971).cljs$core$IFn$_invoke$arity$1(def__2065__auto__); if(cljs.core.truth_(or__4131__auto__)){ return or__4131__auto__; } else { return k__2066__auto__; } })(); var v__2068__auto__ = bigml_nodered_core.utils.cast_config_type.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(def__2065__auto__),cljs.core.get.call(null,config__2062__auto____$1,k__2066__auto__)); return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f__2067__auto__,v__2068__auto__], null); });})(config__2062__auto____$1)) ,cljs.core.filter.call(null,((function (config__2062__auto____$1){ return (function (p__2655){ var vec__2656 = p__2655; var field__2064__auto__ = cljs.core.nth.call(null,vec__2656,(0),null); var def__2065__auto__ = cljs.core.nth.call(null,vec__2656,(1),null); var k__2066__auto__ = bigml_nodered_core.utils.escape_api_name.call(null,field__2064__auto__); var void_val__2069__auto__ = new cljs.core.Keyword(null,"void-if","void-if",-625004048).cljs$core$IFn$_invoke$arity$1(def__2065__auto__); var config_val__2070__auto__ = cljs.core.get.call(null,config__2062__auto____$1,k__2066__auto__); return ((cljs.core.not.call(null,new cljs.core.Keyword(null,"internal","internal",-854870097).cljs$core$IFn$_invoke$arity$1(def__2065__auto__))) && ((!((config_val__2070__auto__ == null)))) && (cljs.core.not_EQ_.call(null,config_val__2070__auto__,"")) && (cljs.core.not_EQ_.call(null,void_val__2069__auto__,config_val__2070__auto__))); });})(config__2062__auto____$1)) ,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Name",new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"text","text",-1790561697),new cljs.core.Keyword(null,"value","value",305978217),"Reify",new cljs.core.Keyword(null,"required","required",1807647006),true,new cljs.core.Keyword(null,"internal","internal",-854870097),true], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Input keypath",new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"text","text",-1790561697),new cljs.core.Keyword(null,"value","value",305978217),"",new cljs.core.Keyword(null,"help","help",-439233446),"A keypath used to extract a BigML resource ID from the\n incoming payload. The corresonding resource will be fetched\n from BigML."], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Output keypath",new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"text","text",-1790561697),new cljs.core.Keyword(null,"value","value",305978217),"",new cljs.core.Keyword(null,"help","help",-439233446),"A keypath used to filter in only a property of the retrieved resource JSON."], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Reify",new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"boolean","boolean",-1919418404),new cljs.core.Keyword(null,"value","value",305978217),true,new cljs.core.Keyword(null,"internal","internal",-854870097),true,new cljs.core.Keyword(null,"help","help",-439233446),"This node will GET the resource specified via\n its <code>Input keypath</code> input and will output\n the <code>Output keypath</code> from the resource\n JSON. In addition, this node will execute the WhizzML\n code generated at this (and upstream) node(s). You need\n to enable this option if you want to get a result from\n your flow that you can pass to a non-BigML node."], null)], null)], null)))); }); bigml_nodered_core.reify.reify_io_fun = (function bigml_nodered_core$reify$create_node_$_reify_io_fun(){ return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["json"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["result"], null)], null); }); bigml_nodered_core.reify.reify_node_fun = (function bigml_nodered_core$reify$create_node_$_reify_node_fun(node__2071__auto__,config__2062__auto__,red__2072__auto__){ return bigml_nodered_core.wz.node_fun.call(null,bigml_nodered_core.wz.tasks.wz_get,bigml_nodered_core.reify.reify_opts_fun,bigml_nodered_core.reify.reify_io_fun,node__2071__auto__,config__2062__auto__,red__2072__auto__); }); return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [bigml_nodered_core.reify.reify_node_fun,bigml_nodered_core.reify.reify_opts_fun,bigml_nodered_core.reify.reify_io_fun], null); }); module.exports = bigml_nodered_core.utils.export_nodes.call(null,new cljs.core.PersistentArrayMap(null, 1, ["reify",bigml_nodered_core.reify.create_node.call(null)], null)); //# sourceMappingURL=reify.js.map?rel=1628192450708