@asksuite/askflow-app-sdk 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/default-fields.d.ts +44 -5
- package/dist/index.js +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/default-fields.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export declare enum DefaultFieldEnum {
|
|
|
35
35
|
/** Lead arrival date <Date> */
|
|
36
36
|
arrivalDate = "arrivalDate",
|
|
37
37
|
/** @member {string} */
|
|
38
|
+
/** Reservation arrival date <Date> */
|
|
39
|
+
reservationCheckin = "reservationCheckin",
|
|
40
|
+
/** @member {string} */
|
|
41
|
+
/** Reservation checkout date <Date> */
|
|
42
|
+
reservationCheckout = "reservationCheckout",
|
|
43
|
+
/** @member {string} */
|
|
38
44
|
/** Lead departure date <Date> */
|
|
39
45
|
departureDate = "departureDate",
|
|
40
46
|
/** @member {string} */
|
|
@@ -80,24 +86,30 @@ export declare enum DefaultFieldEnum {
|
|
|
80
86
|
/** Finished a reservation <boolean> */
|
|
81
87
|
hasReservation = "hasReservation",
|
|
82
88
|
/** @member {string} */
|
|
83
|
-
/** Total reservation value <
|
|
89
|
+
/** Total reservation value <Numeric> */
|
|
84
90
|
totalReservation = "totalReservation",
|
|
85
91
|
/** @member {string} */
|
|
86
|
-
/** Price quote total value (Minimum) <
|
|
92
|
+
/** Price quote total value (Minimum) <Number> */
|
|
87
93
|
minTotalValuePriceQuote = "minTotalValuePriceQuote",
|
|
88
94
|
/** @member {string} */
|
|
89
|
-
/** Price quote total value (Maximum) <
|
|
95
|
+
/** Price quote total value (Maximum) <Number> */
|
|
90
96
|
maxTotalValuePriceQuote = "maxTotalValuePriceQuote",
|
|
91
97
|
/** @member {string} */
|
|
92
98
|
/** Price quote currency (Maximum) <string> */
|
|
93
99
|
currencyPriceQuote = "currencyPriceQuote",
|
|
94
100
|
/** @member {string} */
|
|
101
|
+
/** Reservation currency <string> */
|
|
102
|
+
reservationCurrency = "reservationCurrency",
|
|
103
|
+
/** @member {string} */
|
|
95
104
|
/** Name of the person who answered the conversation <string> */
|
|
96
105
|
attendant = "attendant",
|
|
97
106
|
/** @member {string} */
|
|
98
107
|
/** Email of the person who answered the conversation <string> */
|
|
99
108
|
attendantEmail = "attendantEmail",
|
|
100
109
|
/** @member {string} */
|
|
110
|
+
/** Id of the person who answered the conversation <Integer> */
|
|
111
|
+
attendantUserId = "attendantUserId",
|
|
112
|
+
/** @member {string} */
|
|
101
113
|
/** Company name <string> */
|
|
102
114
|
companyName = "companyName",
|
|
103
115
|
/** @member {string} */
|
|
@@ -107,9 +119,36 @@ export declare enum DefaultFieldEnum {
|
|
|
107
119
|
/** Conversation ID <string> */
|
|
108
120
|
conversationId = "conversationId",
|
|
109
121
|
/** @member {string} */
|
|
110
|
-
/**
|
|
122
|
+
/** Conversation Status <string> */
|
|
123
|
+
conversationStatus = "conversationStatus",
|
|
124
|
+
/** @member {string} */
|
|
125
|
+
/** Reservation code <string> */
|
|
111
126
|
hotelReservationId = "hotelReservationId",
|
|
112
127
|
/** @member {string} */
|
|
113
128
|
/** Date of the last missed call <Date> */
|
|
114
|
-
lastMissedCallAt = "lastMissedCallAt"
|
|
129
|
+
lastMissedCallAt = "lastMissedCallAt",
|
|
130
|
+
/** @member {string} */
|
|
131
|
+
/** Last link quotation opened date <Date> */
|
|
132
|
+
lastLinkQuotationOpenedDate = "lastLinkQuotationOpenedDate",
|
|
133
|
+
/** @member {string} */
|
|
134
|
+
/** Last quotation date <Date> */
|
|
135
|
+
lastPriceQuoteDate = "lastPriceQuoteDate",
|
|
136
|
+
/** @member {string} */
|
|
137
|
+
/** Last reservation date <Date> */
|
|
138
|
+
lastReservationDate = "lastReservationDate",
|
|
139
|
+
/** @member {string} */
|
|
140
|
+
/** Robot active on attendance <Boolean> */
|
|
141
|
+
conversationBotEnabled = "conversationBotEnabled",
|
|
142
|
+
/** @member {string} */
|
|
143
|
+
/** Quotation user id <Integer> */
|
|
144
|
+
priceQuoteUserId = "priceQuoteUserId",
|
|
145
|
+
/** @member {string} */
|
|
146
|
+
/** Reservation user id <Integer> */
|
|
147
|
+
reservationUserId = "reservationUserId",
|
|
148
|
+
/** @member {string} */
|
|
149
|
+
/** Reservation total price <Integer> */
|
|
150
|
+
reservationTotalPrice = "reservationTotalPrice",
|
|
151
|
+
/** @member {string} */
|
|
152
|
+
/** Reservation attendant name <String> */
|
|
153
|
+
reservationUserName = "reservationUserName"
|
|
115
154
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,r,n,
|
|
1
|
+
var e,t,r,n,a=require("libphonenumber-js"),o=/*#__PURE__*/function(){function e(){}return e.parsePhoneNumber=function(e,t){try{return Promise.resolve(function(e,t){try{if(e){var r,n=e.replace(/[^\d+]/g,"");try{var o=a.parsePhoneNumber("+"+n);o&&o.country&&(t=o.country)}catch(e){t=t||"BR"}return t?r=a.parsePhoneNumberFromString(n,{defaultCountry:t}):(r=a.parsePhoneNumberFromString(n))||(r=a.parsePhoneNumberFromString("+"+n)),Promise.resolve(r?r.formatInternational().replace(/[^\d]/g,""):e.replace(/[^\d]/g,""))}return Promise.resolve(e)}catch(e){return Promise.reject(e)}}(e,t))}catch(e){return Promise.reject(e)}},e}();exports.ArgumentTypeEnum=void 0,(e=exports.ArgumentTypeEnum||(exports.ArgumentTypeEnum={})).string="string",e.url="url",e.email="email",e.phone="phone",e.number="number",e.boolean="boolean",e.select="select",e.selectItem="selectItem",e.multiselect="multiselect",e.date="date",e.timestamp="timestamp",exports.EventTriggerEnum=void 0,(t=exports.EventTriggerEnum||(exports.EventTriggerEnum={})).webhook="webhook",t.polling="polling",t.step="step",exports.EventTypeEnum=void 0,(r=exports.EventTypeEnum||(exports.EventTypeEnum={})).action="action",r.query="query",exports.DefaultFieldEnum=void 0,(n=exports.DefaultFieldEnum||(exports.DefaultFieldEnum={})).name="name",n.email="email",n.tags="tags",n.tagsString="tagsString",n.platform="platform",n.phone="phone",n.city="city",n.state="state",n.country="country",n.arrivalDate="arrivalDate",n.reservationCheckin="reservationCheckin",n.reservationCheckout="reservationCheckout",n.departureDate="departureDate",n.language="language",n.adults="adults",n.children="children",n.updatedAt="updatedAt",n.requestPrice="requestPrice",n.eventQuote="eventQuote",n.groupQuote="groupQuote",n.linkQuotationOpened="linkQuotationOpened",n.utmSource="utmSource",n.utmMedium="utmMedium",n.utmCampaign="utmCampaign",n.page="page",n.linkToLiveChat="linkToLiveChat",n.hasReservation="hasReservation",n.totalReservation="totalReservation",n.minTotalValuePriceQuote="minTotalValuePriceQuote",n.maxTotalValuePriceQuote="maxTotalValuePriceQuote",n.currencyPriceQuote="currencyPriceQuote",n.reservationCurrency="reservationCurrency",n.attendant="attendant",n.attendantEmail="attendantEmail",n.attendantUserId="attendantUserId",n.companyName="companyName",n.companyId="companyId",n.conversationId="conversationId",n.conversationStatus="conversationStatus",n.hotelReservationId="hotelReservationId",n.lastMissedCallAt="lastMissedCallAt",n.lastLinkQuotationOpenedDate="lastLinkQuotationOpenedDate",n.lastPriceQuoteDate="lastPriceQuoteDate",n.lastReservationDate="lastReservationDate",n.conversationBotEnabled="conversationBotEnabled",n.priceQuoteUserId="priceQuoteUserId",n.reservationUserId="reservationUserId",n.reservationTotalPrice="reservationTotalPrice",n.reservationUserName="reservationUserName",exports.AppFlow=/*#__PURE__*/function(){function e(e){this.context=void 0,this.events=[],this.eventsByKey=void 0,this.executors=new Map,this.dynamicDataExecutors=new Map,this.context=e,this.eventsByKey=new Map}var t=e.prototype;return t.registerEvent=function(e,t){this.events.push(e),this.eventsByKey.set(e.key,e),this.executors.set(e,t)},t.registerDynamicData=function(e,t){this.dynamicDataExecutors.set(e,t)},t.listEvents=function(){return this.events},t.getEvent=function(e){return this.eventsByKey.get(e)},t.executeEvent=function(e){try{var t,r,n=this,a=(r="string"==typeof e||e instanceof String?n.getEvent(String(e)):e)?n.executors.get(r):void 0;if(a)return Promise.resolve(a(n.context));throw new Error("Event "+((null==(t=r)?void 0:t.label)||e)+" not found")}catch(e){return Promise.reject(e)}},t.getDynamicData=function(e){try{var t=this.dynamicDataExecutors.get(e);if(t)return Promise.resolve(t(this.context));throw new Error("Dynamic data executor "+e+" not found")}catch(e){return Promise.reject(e)}},e}(),exports.AskflowUtils=o;
|
package/dist/index.m.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parsePhoneNumber as e,parsePhoneNumberFromString as t}from"libphonenumber-js";var n,r,a,o,i=/*#__PURE__*/function(){function n(){}return n.parsePhoneNumber=function(n,r){try{return Promise.resolve(function(n,r){try{if(n){var a,o=n.replace(/[^\d+]/g,"");try{var i=e("+"+o);i&&i.country&&(r=i.country)}catch(e){r=r||"BR"}return r?a=t(o,{defaultCountry:r}):(a=t(o))||(a=t("+"+o)),Promise.resolve(a?a.formatInternational().replace(/[^\d]/g,""):n.replace(/[^\d]/g,""))}return Promise.resolve(n)}catch(e){return Promise.reject(e)}}(n,r))}catch(e){return Promise.reject(e)}},n}();!function(e){e.string="string",e.url="url",e.email="email",e.phone="phone",e.number="number",e.boolean="boolean",e.select="select",e.selectItem="selectItem",e.multiselect="multiselect",e.date="date",e.timestamp="timestamp"}(n||(n={})),function(e){e.webhook="webhook",e.polling="polling",e.step="step"}(r||(r={})),function(e){e.action="action",e.query="query"}(a||(a={})),function(e){e.name="name",e.email="email",e.tags="tags",e.tagsString="tagsString",e.platform="platform",e.phone="phone",e.city="city",e.state="state",e.country="country",e.arrivalDate="arrivalDate",e.departureDate="departureDate",e.language="language",e.adults="adults",e.children="children",e.updatedAt="updatedAt",e.requestPrice="requestPrice",e.eventQuote="eventQuote",e.groupQuote="groupQuote",e.linkQuotationOpened="linkQuotationOpened",e.utmSource="utmSource",e.utmMedium="utmMedium",e.utmCampaign="utmCampaign",e.page="page",e.linkToLiveChat="linkToLiveChat",e.hasReservation="hasReservation",e.totalReservation="totalReservation",e.minTotalValuePriceQuote="minTotalValuePriceQuote",e.maxTotalValuePriceQuote="maxTotalValuePriceQuote",e.currencyPriceQuote="currencyPriceQuote",e.attendant="attendant",e.attendantEmail="attendantEmail",e.companyName="companyName",e.companyId="companyId",e.conversationId="conversationId",e.hotelReservationId="hotelReservationId",e.lastMissedCallAt="lastMissedCallAt"}(o||(o={}));var
|
|
1
|
+
import{parsePhoneNumber as e,parsePhoneNumberFromString as t}from"libphonenumber-js";var n,r,a,o,i=/*#__PURE__*/function(){function n(){}return n.parsePhoneNumber=function(n,r){try{return Promise.resolve(function(n,r){try{if(n){var a,o=n.replace(/[^\d+]/g,"");try{var i=e("+"+o);i&&i.country&&(r=i.country)}catch(e){r=r||"BR"}return r?a=t(o,{defaultCountry:r}):(a=t(o))||(a=t("+"+o)),Promise.resolve(a?a.formatInternational().replace(/[^\d]/g,""):n.replace(/[^\d]/g,""))}return Promise.resolve(n)}catch(e){return Promise.reject(e)}}(n,r))}catch(e){return Promise.reject(e)}},n}();!function(e){e.string="string",e.url="url",e.email="email",e.phone="phone",e.number="number",e.boolean="boolean",e.select="select",e.selectItem="selectItem",e.multiselect="multiselect",e.date="date",e.timestamp="timestamp"}(n||(n={})),function(e){e.webhook="webhook",e.polling="polling",e.step="step"}(r||(r={})),function(e){e.action="action",e.query="query"}(a||(a={})),function(e){e.name="name",e.email="email",e.tags="tags",e.tagsString="tagsString",e.platform="platform",e.phone="phone",e.city="city",e.state="state",e.country="country",e.arrivalDate="arrivalDate",e.reservationCheckin="reservationCheckin",e.reservationCheckout="reservationCheckout",e.departureDate="departureDate",e.language="language",e.adults="adults",e.children="children",e.updatedAt="updatedAt",e.requestPrice="requestPrice",e.eventQuote="eventQuote",e.groupQuote="groupQuote",e.linkQuotationOpened="linkQuotationOpened",e.utmSource="utmSource",e.utmMedium="utmMedium",e.utmCampaign="utmCampaign",e.page="page",e.linkToLiveChat="linkToLiveChat",e.hasReservation="hasReservation",e.totalReservation="totalReservation",e.minTotalValuePriceQuote="minTotalValuePriceQuote",e.maxTotalValuePriceQuote="maxTotalValuePriceQuote",e.currencyPriceQuote="currencyPriceQuote",e.reservationCurrency="reservationCurrency",e.attendant="attendant",e.attendantEmail="attendantEmail",e.attendantUserId="attendantUserId",e.companyName="companyName",e.companyId="companyId",e.conversationId="conversationId",e.conversationStatus="conversationStatus",e.hotelReservationId="hotelReservationId",e.lastMissedCallAt="lastMissedCallAt",e.lastLinkQuotationOpenedDate="lastLinkQuotationOpenedDate",e.lastPriceQuoteDate="lastPriceQuoteDate",e.lastReservationDate="lastReservationDate",e.conversationBotEnabled="conversationBotEnabled",e.priceQuoteUserId="priceQuoteUserId",e.reservationUserId="reservationUserId",e.reservationTotalPrice="reservationTotalPrice",e.reservationUserName="reservationUserName"}(o||(o={}));var s=/*#__PURE__*/function(){function e(e){this.context=void 0,this.events=[],this.eventsByKey=void 0,this.executors=new Map,this.dynamicDataExecutors=new Map,this.context=e,this.eventsByKey=new Map}var t=e.prototype;return t.registerEvent=function(e,t){this.events.push(e),this.eventsByKey.set(e.key,e),this.executors.set(e,t)},t.registerDynamicData=function(e,t){this.dynamicDataExecutors.set(e,t)},t.listEvents=function(){return this.events},t.getEvent=function(e){return this.eventsByKey.get(e)},t.executeEvent=function(e){try{var t,n,r=this,a=(n="string"==typeof e||e instanceof String?r.getEvent(String(e)):e)?r.executors.get(n):void 0;if(a)return Promise.resolve(a(r.context));throw new Error("Event "+((null==(t=n)?void 0:t.label)||e)+" not found")}catch(e){return Promise.reject(e)}},t.getDynamicData=function(e){try{var t=this.dynamicDataExecutors.get(e);if(t)return Promise.resolve(t(this.context));throw new Error("Dynamic data executor "+e+" not found")}catch(e){return Promise.reject(e)}},e}();export{s as AppFlow,n as ArgumentTypeEnum,i as AskflowUtils,o as DefaultFieldEnum,r as EventTriggerEnum,a as EventTypeEnum};
|
package/dist/index.modern.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parsePhoneNumber as
|
|
1
|
+
import{parsePhoneNumber as e,parsePhoneNumberFromString as t}from"libphonenumber-js";class a{static async parsePhoneNumber(a,n){return async function(a,n){if(a){let r,o=a.replace(/[^\d+]/g,"");try{const t=e(`+${o}`);t&&t.country&&(n=t.country)}catch(e){n=n||"BR"}return n?r=t(o,{defaultCountry:n}):(r=t(o),r||(r=t("+"+o))),r?r.formatInternational().replace(/[^\d]/g,""):a.replace(/[^\d]/g,"")}return a}(a,n)}}var n,r,o,i;!function(e){e.string="string",e.url="url",e.email="email",e.phone="phone",e.number="number",e.boolean="boolean",e.select="select",e.selectItem="selectItem",e.multiselect="multiselect",e.date="date",e.timestamp="timestamp"}(n||(n={})),function(e){e.webhook="webhook",e.polling="polling",e.step="step"}(r||(r={})),function(e){e.action="action",e.query="query"}(o||(o={})),function(e){e.name="name",e.email="email",e.tags="tags",e.tagsString="tagsString",e.platform="platform",e.phone="phone",e.city="city",e.state="state",e.country="country",e.arrivalDate="arrivalDate",e.reservationCheckin="reservationCheckin",e.reservationCheckout="reservationCheckout",e.departureDate="departureDate",e.language="language",e.adults="adults",e.children="children",e.updatedAt="updatedAt",e.requestPrice="requestPrice",e.eventQuote="eventQuote",e.groupQuote="groupQuote",e.linkQuotationOpened="linkQuotationOpened",e.utmSource="utmSource",e.utmMedium="utmMedium",e.utmCampaign="utmCampaign",e.page="page",e.linkToLiveChat="linkToLiveChat",e.hasReservation="hasReservation",e.totalReservation="totalReservation",e.minTotalValuePriceQuote="minTotalValuePriceQuote",e.maxTotalValuePriceQuote="maxTotalValuePriceQuote",e.currencyPriceQuote="currencyPriceQuote",e.reservationCurrency="reservationCurrency",e.attendant="attendant",e.attendantEmail="attendantEmail",e.attendantUserId="attendantUserId",e.companyName="companyName",e.companyId="companyId",e.conversationId="conversationId",e.conversationStatus="conversationStatus",e.hotelReservationId="hotelReservationId",e.lastMissedCallAt="lastMissedCallAt",e.lastLinkQuotationOpenedDate="lastLinkQuotationOpenedDate",e.lastPriceQuoteDate="lastPriceQuoteDate",e.lastReservationDate="lastReservationDate",e.conversationBotEnabled="conversationBotEnabled",e.priceQuoteUserId="priceQuoteUserId",e.reservationUserId="reservationUserId",e.reservationTotalPrice="reservationTotalPrice",e.reservationUserName="reservationUserName"}(i||(i={}));class s{constructor(e){this.context=void 0,this.events=[],this.eventsByKey=void 0,this.executors=new Map,this.dynamicDataExecutors=new Map,this.context=e,this.eventsByKey=new Map}registerEvent(e,t){this.events.push(e),this.eventsByKey.set(e.key,e),this.executors.set(e,t)}registerDynamicData(e,t){this.dynamicDataExecutors.set(e,t)}listEvents(){return this.events}getEvent(e){return this.eventsByKey.get(e)}async executeEvent(e){var t;let a;a="string"==typeof e||e instanceof String?this.getEvent(String(e)):e;const n=a?this.executors.get(a):void 0;if(n)return n(this.context);throw new Error(`Event ${(null==(t=a)?void 0:t.label)||e} not found`)}async getDynamicData(e){const t=this.dynamicDataExecutors.get(e);if(t)return t(this.context);throw new Error(`Dynamic data executor ${e} not found`)}}export{s as AppFlow,n as ArgumentTypeEnum,a as AskflowUtils,i as DefaultFieldEnum,r as EventTriggerEnum,o as EventTypeEnum};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("libphonenumber-js")):"function"==typeof define&&define.amd?define(["exports","libphonenumber-js"],t):t((e||self).askflowAppSdk={},e.libphonenumberJs)}(this,function(e,t){var n,r,o,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("libphonenumber-js")):"function"==typeof define&&define.amd?define(["exports","libphonenumber-js"],t):t((e||self).askflowAppSdk={},e.libphonenumberJs)}(this,function(e,t){var n,r,a,o,i=/*#__PURE__*/function(){function e(){}return e.parsePhoneNumber=function(e,n){try{return Promise.resolve(function(e,n){try{if(e){var r,a=e.replace(/[^\d+]/g,"");try{var o=t.parsePhoneNumber("+"+a);o&&o.country&&(n=o.country)}catch(e){n=n||"BR"}return n?r=t.parsePhoneNumberFromString(a,{defaultCountry:n}):(r=t.parsePhoneNumberFromString(a))||(r=t.parsePhoneNumberFromString("+"+a)),Promise.resolve(r?r.formatInternational().replace(/[^\d]/g,""):e.replace(/[^\d]/g,""))}return Promise.resolve(e)}catch(e){return Promise.reject(e)}}(e,n))}catch(e){return Promise.reject(e)}},e}();e.ArgumentTypeEnum=void 0,(n=e.ArgumentTypeEnum||(e.ArgumentTypeEnum={})).string="string",n.url="url",n.email="email",n.phone="phone",n.number="number",n.boolean="boolean",n.select="select",n.selectItem="selectItem",n.multiselect="multiselect",n.date="date",n.timestamp="timestamp",e.EventTriggerEnum=void 0,(r=e.EventTriggerEnum||(e.EventTriggerEnum={})).webhook="webhook",r.polling="polling",r.step="step",e.EventTypeEnum=void 0,(a=e.EventTypeEnum||(e.EventTypeEnum={})).action="action",a.query="query",e.DefaultFieldEnum=void 0,(o=e.DefaultFieldEnum||(e.DefaultFieldEnum={})).name="name",o.email="email",o.tags="tags",o.tagsString="tagsString",o.platform="platform",o.phone="phone",o.city="city",o.state="state",o.country="country",o.arrivalDate="arrivalDate",o.reservationCheckin="reservationCheckin",o.reservationCheckout="reservationCheckout",o.departureDate="departureDate",o.language="language",o.adults="adults",o.children="children",o.updatedAt="updatedAt",o.requestPrice="requestPrice",o.eventQuote="eventQuote",o.groupQuote="groupQuote",o.linkQuotationOpened="linkQuotationOpened",o.utmSource="utmSource",o.utmMedium="utmMedium",o.utmCampaign="utmCampaign",o.page="page",o.linkToLiveChat="linkToLiveChat",o.hasReservation="hasReservation",o.totalReservation="totalReservation",o.minTotalValuePriceQuote="minTotalValuePriceQuote",o.maxTotalValuePriceQuote="maxTotalValuePriceQuote",o.currencyPriceQuote="currencyPriceQuote",o.reservationCurrency="reservationCurrency",o.attendant="attendant",o.attendantEmail="attendantEmail",o.attendantUserId="attendantUserId",o.companyName="companyName",o.companyId="companyId",o.conversationId="conversationId",o.conversationStatus="conversationStatus",o.hotelReservationId="hotelReservationId",o.lastMissedCallAt="lastMissedCallAt",o.lastLinkQuotationOpenedDate="lastLinkQuotationOpenedDate",o.lastPriceQuoteDate="lastPriceQuoteDate",o.lastReservationDate="lastReservationDate",o.conversationBotEnabled="conversationBotEnabled",o.priceQuoteUserId="priceQuoteUserId",o.reservationUserId="reservationUserId",o.reservationTotalPrice="reservationTotalPrice",o.reservationUserName="reservationUserName",e.AppFlow=/*#__PURE__*/function(){function e(e){this.context=void 0,this.events=[],this.eventsByKey=void 0,this.executors=new Map,this.dynamicDataExecutors=new Map,this.context=e,this.eventsByKey=new Map}var t=e.prototype;return t.registerEvent=function(e,t){this.events.push(e),this.eventsByKey.set(e.key,e),this.executors.set(e,t)},t.registerDynamicData=function(e,t){this.dynamicDataExecutors.set(e,t)},t.listEvents=function(){return this.events},t.getEvent=function(e){return this.eventsByKey.get(e)},t.executeEvent=function(e){try{var t,n,r=this,a=(n="string"==typeof e||e instanceof String?r.getEvent(String(e)):e)?r.executors.get(n):void 0;if(a)return Promise.resolve(a(r.context));throw new Error("Event "+((null==(t=n)?void 0:t.label)||e)+" not found")}catch(e){return Promise.reject(e)}},t.getDynamicData=function(e){try{var t=this.dynamicDataExecutors.get(e);if(t)return Promise.resolve(t(this.context));throw new Error("Dynamic data executor "+e+" not found")}catch(e){return Promise.reject(e)}},e}(),e.AskflowUtils=i});
|