UNPKG

claire-agent

Version:

A Dialogflow agent for Claire Global

24 lines (22 loc) 12.2 kB
// Compiled by ClojureScript 1.10.520 {:target :nodejs} goog.provide('claire_agent.intents.purchase_bid'); goog.require('cljs.core'); goog.require('claire_common.utils'); goog.require('claire_common.dialogflow'); claire_agent.intents.purchase_bid.purchase_choose_bidder = (function claire_agent$intents$purchase_bid$purchase_choose_bidder(intent,query,env,pars){ return claire_common.utils.make_reply.call(null,claire_common.utils.make_env.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"merge?","merge?",-2004416151),false),new cljs.core.Keyword(null,"say","say",504378016),((cljs.core._EQ_.call(null,"Known",cljs.core.get.call(null,pars,"knownUnknown")))?"The best offer I found is: XYZ. Make a bid?":"The best offer I found is: ABC. Make a bid?")); }); claire_agent.intents.purchase_bid.purchase_gather_bid = (function claire_agent$intents$purchase_bid$purchase_gather_bid(intent,query,env,pars){ return claire_common.utils.make_reply.call(null,claire_common.utils.make_env.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"merge?","merge?",-2004416151),false),new cljs.core.Keyword(null,"say","say",504378016),((cljs.core._EQ_.call(null,"Known",cljs.core.get.call(null,new cljs.core.Keyword(null,"state","state",-1988618099).cljs$core$IFn$_invoke$arity$1(env),"knownUnknown")))?"What's your bid XYZ?":"What's your bid ABC?")); }); claire_agent.intents.purchase_bid.purchase_bid_confirmation = (function claire_agent$intents$purchase_bid$purchase_bid_confirmation(intent,query,env,pars){ return claire_common.utils.make_reply.call(null,claire_common.utils.make_env.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"merge?","merge?",-2004416151),false),new cljs.core.Keyword(null,"say","say",504378016),"Confirm bid and send it?"); }); claire_agent.intents.purchase_bid.purchase_make_bid = (function claire_agent$intents$purchase_bid$purchase_make_bid(intent,query,env,pars){ return claire_common.utils.make_reply.call(null,claire_common.utils.make_env.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"merge?","merge?",-2004416151),false),new cljs.core.Keyword(null,"say","say",504378016),"Bid sent"); }); claire_agent.intents.purchase_bid.purchase_accept_bid = (function claire_agent$intents$purchase_bid$purchase_accept_bid(intent,query,env,pars){ return claire_common.utils.make_reply.call(null,claire_common.utils.make_env.call(null,cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"merge?","merge?",-2004416151),false),new cljs.core.Keyword(null,"say","say",504378016),"Bid sent"); }); claire_agent.intents.purchase_bid.intent = claire_common.dialogflow.intent.call(null,"purchase-choose-bidder",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Review bids from $knowUnknown suppliers","Choose $knownUnknow bid"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["This is the best bidder. Shall I make a new offer?"], null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"events","events",1792552201),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["purchase-choose-bidder"], null),new cljs.core.Keyword(null,"parameters","parameters",-1229919748),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null,"displayName","displayName",-809144601),"knownUnknown",new cljs.core.Keyword(null,"value","value",305978217),"$knownUnknown",new cljs.core.Keyword(null,"defaultValue","defaultValue",-586131910),"",new cljs.core.Keyword(null,"entityTypeDisplayName","entityTypeDisplayName",-627308751),"@claire_knownUnknown",new cljs.core.Keyword(null,"mandatory","mandatory",542802336),true,new cljs.core.Keyword(null,"prompts","prompts",15471501),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Ok. Shall I consider known or also unknown bidders?"], null),"isList",false], null)], null),new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"purchase-choose-bidder-purchase-gather-bid",cljs.core.PersistentVector.fromArray(["yes","sure","okay","sounds correct","that works","yep that's ok","yes that's right","I think so","yes I agree","I don't mind","I agree","yes I do","for sure","ok","yes that's ok","that one works","yes you can do it","perfect","why not","of course","okay I will","exactly","sure why not","absolutely","it's okay","it's fine","go ahead","confirm","sounds good","alright","yeah","yup","yes please","do it","yes I can","it looks perfect","that's correct","right","alright why not"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["What is your bid?"], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"events","events",1792552201),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["purchase-gather-bid"], null),new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"purchase-gather-bid-purchase-bid-confirmation",cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Confirm bid and send it?"], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"purchase-bid-confirmation-purchase-make-bid",cljs.core.PersistentVector.fromArray(["yes","sure","okay","sounds correct","that works","yep that's ok","yes that's right","I think so","yes I agree","I don't mind","I agree","yes I do","for sure","ok","yes that's ok","that one works","yes you can do it","perfect","why not","of course","okay I will","exactly","sure why not","absolutely","it's okay","it's fine","go ahead","confirm","sounds good","alright","yeah","yup","yes please","do it","yes I can","it looks perfect","that's correct","right","alright why not"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Bid made. Will notify."], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_agent.intents.purchase_bid.purchase_make_bid], null)),claire_common.dialogflow.intent.call(null,"purchase-bid-confirmation-purchase-gather-bid-redirect",cljs.core.PersistentVector.fromArray(["don't","nope not really","no that's be all","not right now","thanks but no","not","no we are good","nothing else","not interested","nah I'm good","definitely not","no never","never","nah","nothing","no maybe next time","I don't want that","no not really","no that's ok","no no don't","na","no way no","I can't","no thanks","not at all","not really","I don't","no I cannot","no that's okay","nope","I don't think so","no it isn't","thanks but not this time","no that's fine thank you","no don't","don't do it","I don't want","not today","I'm not","no way","no","I disagree","not this time","nothing else thanks"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Should have been redirected"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_common.dialogflow.redirector.call(null,"purchase-gather-bid",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["purchase-choose-bidder-followup"], null))], null)),claire_common.dialogflow.intent.call(null,"purchase-bid-confirmation-purchase-choose-bidder-redirect",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["change bidder"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Should have been redirected"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_common.dialogflow.redirector.call(null,"purchase-choose-bidder",null)], null))], null),new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_agent.intents.purchase_bid.purchase_bid_confirmation], null))], null),new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_agent.intents.purchase_bid.purchase_gather_bid], null)),claire_common.dialogflow.intent.call(null,"purchase-choose-bidder-purchase-ask-choose-bidder",cljs.core.PersistentVector.fromArray(["don't","nope not really","no that's be all","not right now","thanks but no","not","no we are good","nothing else","not interested","nah I'm good","definitely not","no never","never","nah","nothing","no maybe next time","I don't want that","no not really","no that's ok","no no don't","na","no way no","I can't","no thanks","not at all","not really","I don't","no I cannot","no that's okay","nope","I don't think so","no it isn't","thanks but not this time","no that's fine thank you","no don't","don't do it","I don't want","not today","I'm not","no way","no","I disagree","not this time","nothing else thanks"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Would you like choose a different bidder?"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"followups","followups",2057499244),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [claire_common.dialogflow.intent.call(null,"purchase-ask-choose-bidder-purchase-choose-bidder-redirect",cljs.core.PersistentVector.fromArray(["yes","sure","okay","sounds correct","that works","yep that's ok","yes that's right","I think so","yes I agree","I don't mind","I agree","yes I do","for sure","ok","yes that's ok","that one works","yes you can do it","perfect","why not","of course","okay I will","exactly","sure why not","absolutely","it's okay","it's fine","go ahead","confirm","sounds good","alright","yeah","yup","yes please","do it","yes I can","it looks perfect","that's correct","right","alright why not"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Should have been redirected"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_common.dialogflow.redirector.call(null,"purchase-choose-bidder",null)], null)),claire_common.dialogflow.intent.call(null,"purchase-ask-choose-bidder-purchase-choose-bid-end",cljs.core.PersistentVector.fromArray(["don't","nope not really","no that's be all","not right now","thanks but no","not","no we are good","nothing else","not interested","nah I'm good","definitely not","no never","never","nah","nothing","no maybe next time","I don't want that","no not really","no that's ok","no no don't","na","no way no","I can't","no thanks","not at all","not really","I don't","no I cannot","no that's okay","nope","I don't think so","no it isn't","thanks but not this time","no that's fine thank you","no don't","don't do it","I don't want","not today","I'm not","no way","no","I disagree","not this time","nothing else thanks"], true),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Let me know how else can I help you!"], null),cljs.core.PersistentArrayMap.EMPTY)], null)], null)),claire_common.dialogflow.intent.call(null,"purchase-choose-bidder-purchase-accept-bid",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, ["accept","accept bid","accept current offer"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["Bid sent"], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_agent.intents.purchase_bid.purchase_accept_bid], null))], null),new cljs.core.Keyword(null,"webhook","webhook",-860093016),claire_agent.intents.purchase_bid.purchase_choose_bidder], null)); //# sourceMappingURL=purchase_bid.js.map?rel=1571758970186