Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@memori.ai/memori-api-client

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memori.ai/memori-api-client - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

5

dist/engine/memories.d.ts

@@ -13,4 +13,7 @@ import { Memory, ResponseSpec } from '../types';

* @param {string} sessionId The session ID
* @param {number} from The starting index
* @param {number} howMany The number of items to return
* @param {string=} type Optional type of the Memory objects to list: ALL, CONTENTS, DEFAULTS
*/
getMemoriesPaginated: (sessionId: string, from: number, howMany: number) => Promise<ResponseSpec & {
getMemoriesPaginated: (sessionId: string, from: number, howMany: number, type?: "ALL" | "CONTENTS" | "DEFAULTS" | undefined) => Promise<ResponseSpec & {
count: number;

@@ -17,0 +20,0 @@ memories: Memory[];

2

dist/memori-api-client.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=(t=require("cross-fetch"))&&"object"==typeof t&&"default"in t?t.default:t,r=require("microsoft-cognitiveservices-speech-sdk");function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new x(n||[]);return o._invoke=function(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{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=b(a,r);if(u){if(u===f)continue;return u}}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 s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function p(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 h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(k([])));y&&y!==e&&r.call(y,i)&&(m=y);var g=h.prototype=l.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=p(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function U(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=h,s(g,"constructor",h),s(h,"constructor",d),d.displayName=s(h,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,h):(t.__proto__=h,s(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),s(g,u,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,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(T),!t)for(var e in this)"t"===e.charAt(0)&&r.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 n(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 n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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),T(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;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,s,"next",t)}function s(t){o(a,n,i,u,s,"throw",t)}u(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var u=function(t,r){return e(""+r.apiUrl+t,a({},r,{body:null!=r&&r.body?JSON.stringify(r.body):void 0,mode:"cors",credentials:"include",headers:a({"Content-Type":"application/json"},null==r?void 0:r.headers)})).then((function(t){return null!=r&&r.text?t.text():t.json()}))},s=function(t){return{getTenantPublicMemoriList:function(e){return u("/TenantPublicMemori/"+encodeURI(e),{apiUrl:t})},getPublicMemoriList:function(e){return u("/PublicMemori/"+e,{apiUrl:t})},getAllMemori:function(e){return u("/AllMemori/"+e,{apiUrl:t})},getUserMemoriList:function(e){return u("/Memori/"+e,{apiUrl:t})},getSharedMemoriList:function(e){return u("/SharedMemori/"+e,{apiUrl:t})},getTenantCategories:function(e){return u("/TenantMemoriCategories/"+encodeURI(e),{apiUrl:t})},getMemoriConfigs:function(e){return u("/MemoriConfigs/"+e,{apiUrl:t})},createMemori:function(e,r){return u("/Memori/"+e,{apiUrl:t,body:r,method:"POST"})},updateMemori:function(e,r){return u("/Memori/"+e+"/"+r.memoriID,{apiUrl:t,body:r,method:"PATCH"})},deleteMemori:function(e,r){return u("/Memori/"+e,{apiUrl:t,body:r,method:"DELETE"})},getMemoriById:function(e,r){return u("/Memori/"+e+"/"+r,{apiUrl:t})},getMemoriByUserAndId:function(e,r,n,o){return u("/MemoriById/"+e+"/"+r+"/"+n+(o?"/"+o:""),{apiUrl:t})},getMemori:function(e,r,n,o){return u("/Memori/"+encodeURI(e)+"/"+encodeURI(r)+"/"+encodeURI(n)+"/"+(null!=o?o:""),{apiUrl:t})},getMemoriSessions:function(e,r,n,o){return u("/MemoriSessions/"+e+"/"+r+(n?"/"+n:"")+(n&&o?"/"+o:""),{apiUrl:t})},transferMemori:function(e,r){return u("/TransferMemori/"+e,{apiUrl:t,body:r,method:"POST"})}}},c=function(t){return{userSignIn:function(e){return u("/User",{apiUrl:t,body:e,method:"POST"})},userConfirmSignIn:function(e){return u("/UserConfirm",{apiUrl:t,body:e,method:"POST"})},userLogin:function(e){return u("/Login",{apiUrl:t,body:e,method:"POST"})},userLogout:function(e){return u("/Logout/"+e,{apiUrl:t,method:"POST"})},getUser:function(e,r){return u("/User/"+e+"/"+r,{apiUrl:t})},getUsersList:function(e){return u("/Users/"+e,{apiUrl:t})},deleteUser:function(e,r){return u("/User/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},updateUser:function(e,r,n){return u("/User/"+e+"/"+r,{apiUrl:t,method:"PATCH",body:n})},resetPassword:function(e){return u("/ResetPassword",{apiUrl:t,body:e,method:"POST"})},resetConfirm:function(e){return u("/ResetConfirm",{apiUrl:t,body:e,method:"POST"})},recoverUsername:function(e){return u("/RecoverUsername",{apiUrl:t,body:e,method:"POST"})},getTenantConfig:function(e){return u("/Tenant/"+e,{apiUrl:t})},resendVerificationCode:function(e){return u("/ResendVerificationCode",{apiUrl:t,body:e,method:"POST"})},createUser:function(e,r){return u("/User/"+e,{apiUrl:t,body:r,method:"POST"})}}},p=function(t){return{getMemoriIntegrationsList:function(e,r){return u("/Integrations/"+e+"/"+r,{apiUrl:t})},getAllIntegrationsList:function(e){return u("/AllIntegrations/"+e,{apiUrl:t})},getIntegration:function(e,r){return u("/Integration/"+e+"/"+r,{apiUrl:t})},deleteIntegration:function(e,r){return u("/Integration/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},createIntegration:function(e,r){return u("/Integration/"+e,{apiUrl:t,method:"POST",body:r})},updateIntegration:function(e,r,n){return u("/Integration/"+e+"/"+r,{apiUrl:t,method:"PATCH",body:n})}}},f=function(t){return{getUploadAssetURL:function(e,r,n){return t+"/Asset/"+e+"/"+r+(n?"/"+n:"")},uploadAsset:(e=i(n().mark((function e(r,o,i,a,u){var s,c,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new FormData,e.next=3,fetch(o);case 3:return c=e.sent,e.next=6,c.blob();case 6:return s.append(r,e.sent,r),e.next=10,fetch(t+"/Asset/"+i+"/"+a+(u?"/"+u:""),{method:"POST",body:s});case 10:return p=e.sent,e.next=13,p.json();case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e)}))),function(t,r,n,o,i){return e.apply(this,arguments)}),getAsset:function(e,r){return u("/Asset/"+e+"/"+r,{apiUrl:t,method:"GET"})},updateAsset:function(e,r,n){return u("/Asset/"+e+"/"+r.split("/").reverse()[0],{apiUrl:t,method:"PATCH",body:n})},deleteAsset:function(e,r){return u("/Asset/"+e+"/"+r.split("/").reverse()[0],{apiUrl:t,method:"DELETE"})}};var e},l=function(t){return{getSentInvitations:function(e){return u("/SentInvitations/"+e,{apiUrl:t})},getReceivedInvitations:function(e){return u("/ReceivedInvitations/"+e,{apiUrl:t})},getAllInvitations:function(e){return u("/AllInvitations/"+e,{apiUrl:t})},getInvitation:function(e,r){return u("/Invitation/"+e+"/"+r,{apiUrl:t})},updateInvitation:function(e,r){return u("/Invitation/"+e+"/"+r.invitationID,{apiUrl:t,method:"PATCH",body:r})},deleteInvitation:function(e,r){return u("/Invitation/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},acceptInvitation:function(e,r){return u("/AcceptInvitation/"+e+"/"+r,{apiUrl:t,method:"POST"})},rejectInvitation:function(e,r){return u("/RejectInvitation/"+e+"/"+r,{apiUrl:t,method:"POST"})},sendInvitation:function(e,r){return u("/SendInvitation/"+e,{apiUrl:t,method:"POST",body:r})}}},d=function(t){return{getTenantConsumptionLogs:function(e,r,n,o,i){return u("/TenantConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getUserConsumptionLogs:function(e,r,n,o,i){return u("/UserConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getMemoriConsumptionLogs:function(e,r,n,o,i){return u("/MemoriConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})}}},h=function(t){return{getTenantNotifications:function(e){return u("/TenantNotifications/"+e,{apiUrl:t})},getUserNotifications:function(e){return u("/UserNotifications/"+e,{apiUrl:t})}}},m=function(t){return a({asset:f(t),memori:s(t),user:c(t),integration:p(t),invitation:l(t),consumptionLogs:d(t),notifications:h(t)},f(t),s(t),c(t),p(t),l(t),d(t),h(t))},v=function(t){return{getCorrelationPairs:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CorrelationPairs/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),deleteCorrelationPair:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CorrelationPair/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r},y=function(t){return{postTextEnteredEvent:(l=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TextEnteredEvent/"+r.sessionId,{method:"POST",apiUrl:t,body:{text:r.text}}));case 2:case"end":return e.stop()}}),e)}))),function(t){return l.apply(this,arguments)}),postPlaceChangedEvent:(f=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PlaceChangedEvent/"+r.sessionId,{method:"POST",apiUrl:t,body:{placeName:r.placeName,latitude:r.latitude,longitude:r.longitude,uncertaintyKm:r.uncertaintyKm}}));case 2:case"end":return e.stop()}}),e)}))),function(t){return f.apply(this,arguments)}),postDateChangedEvent:(p=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/DateChangedEvent/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return p.apply(this,arguments)}),postTagChangedEvent:(c=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TagChangedEvent/"+r,{method:"POST",apiUrl:t,body:{tag:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return c.apply(this,arguments)}),postTimeoutEvent:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TimeoutEvent/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),postMediumSelectedEvent:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/MediumSelectedEvent/"+r,{method:"POST",apiUrl:t,body:{medium:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),postDateSelectedEvent:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/DateSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),postPlaceSelectedEvent:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PlaceSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),postTagSelectedEvent:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TagSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o,a,s,c,p,f,l},g=function(t){return{importCSV:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ImportExport/ImportCSV/"+r,{method:"POST",apiUrl:t,body:a({csvRows:o},i)}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),exportCSV:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ImportExport/ExportCSV/"+r,{method:"POST",apiUrl:t,body:o,text:!0}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r},w=function(t){return{getIntents:(d=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intents/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return d.apply(this,arguments)}),getIntent:(l=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return l.apply(this,arguments)}),patchIntent:(f=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o.intentID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return f.apply(this,arguments)}),deleteIntent:(p=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return p.apply(this,arguments)}),createIntent:(c=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return c.apply(this,arguments)}),getIntentSlots:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlots/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getIntentSlot:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchIntentSlot:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o.intentSlotID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deleteIntentSlot:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),createIntentSlot:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s,c,p,f,l,d},E=function(t){return{getLocalizationKeys:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKeys/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getLocalizationKey:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteLocalizationKey:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postLocalizationKey:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),patchLocalizationKey:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},b=function(t){return{getMedia:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Media/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),deleteMedia:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Media/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),getMedium:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),patchMedium:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteMedium:function(e,r,n){return u("/Medium/"+e+"/"+r+"/"+n,{method:"GET",apiUrl:t})},postMedium:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},U=function(t){return{getMemories:(p=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memories/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return p.apply(this,arguments)}),getMemoriesPaginated:(c=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memories/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return c.apply(this,arguments)}),getMemory:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),patchMemory:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o.memoryID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteMemory:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postMemory:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),getMemoryAccess:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/MemoryAccess/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s,c,p},T=function(t){return{getWordVector:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/WordVector/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),getSimilarWords:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/SimilarWords/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),guessLanguage:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/GuessLanguage/"+r,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),computeSimilarity:(r=i(n().mark((function e(r,o,i,a,s){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ComputeSimilarity/"+r,{method:"POST",apiUrl:t,body:{referenceText:o,referenceTextType:i,comparisonText:a,comparisonTextType:s}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n,o,i){return r.apply(this,arguments)}),checkWords:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CheckWords/"+r,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},x=function(t){return{getPeople:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/People/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getPerson:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchPerson:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o.personID,{method:"PATCH",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deletePerson:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),postPerson:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},k=function(t){return{getPromptedQuestions:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestions/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getPromptedQuestion:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchPromptedQuestion:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deletePromptedQuestion:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),postPromptedQuestion:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o,a,s},S=function(t){return{searchMemory:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Search/"+r,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postRandom:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Random/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),postHints:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Hints/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o},L=function(t){return{initSession:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session",{method:"POST",body:r,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getSession:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),deleteSession:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session/"+r,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o},P=function(t){return{getStatistics:(c=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Statistics/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return c.apply(this,arguments)}),getContentQualityIndexes:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContentQualityIndexes/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getTextQualityIndexes:(a=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TextQualityIndexes/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return a.apply(this,arguments)}),getEventLogs:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),getMemoryEventLogs:(r=i(n().mark((function e(r,o,i,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i+"/"+a,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n,o){return r.apply(this,arguments)}),getIntentEventLogs:(e=i(n().mark((function e(r,o,i,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i+"/"+a,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r,n,o){return e.apply(this,arguments)})};var e,r,o,a,s,c},I=function(t){return{getUnansweredQuestions:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestions/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getUnansweredQuestionsPaginated:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestions/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteUnansweredQuestion:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestion/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},C=function(t){return{getContextVars:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVars/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getContextVarNames:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVarNames/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),getContextVarValues:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVarValues/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},M=function(t){return{getCustomWords:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWords/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getCustomWord:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteCustomWord:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postCustomWord:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),patchCustomWord:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o.customWordID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},G=function(t){return{getChatLogs:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLogs/"+r+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),deleteChatLogs:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLogs/"+r+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteChatLog:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLog/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},O={__proto__:null,allowedMediaTypes:["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],anonTag:"👤"},A=function(t,e){return void 0===e&&(e=!1),function(n,o){var i,a,u=r.SpeechConfig.fromSubscription(t,"eastus");a=new r.SpeakerAudioDestination;var s=r.AudioConfig.fromSpeakerOutput(a);u.speechSynthesisVoiceName=function(t,e){var r="";switch(t.toUpperCase()){case"IT":r="MALE"===e?"it-IT-DiegoNeural":"it-IT-ElsaNeural";break;case"DE":r="MALE"===e?"de-DE-ConradNeural":"de-DE-KatjaNeural";break;case"EN":r="MALE"===e?"en-GB-RyanNeural":"en-GB-SoniaNeural";break;case"ES":r="MALE"===e?"es-ES-AlvaroNeural":"es-ES-ElviraNeural";break;case"FR":r="MALE"===e?"fr-FR-HenriNeural":"fr-FR-DeniseNeural";break;case"PT":r="MALE"===e?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural";break;default:r="MALE"===e?"it-IT-DiegoNeural":"it-IT-IsabellaNeural"}return r}(n,o);var c=function(t){var e="";switch(t.toUpperCase()){case"IT":e="it-IT";break;case"DE":e="de-DE";break;case"EN":e="en-US";break;case"ES":e="es-ES";break;case"FR":e="fr-FR";break;case"PT":e="pt-PT";break;default:e="it-IT"}return e}(n);u.speechSynthesisLanguage=c,u.speechRecognitionLanguage=c;var p,f=function(){a&&a.pause(),i&&(i.close(),i=null)},l=r.AudioConfig.fromDefaultMicrophoneInput(),d=function(t){p&&(p.stopContinuousRecognitionAsync(),p.close(),p=null,t&&t())};return{speak:function(t,n){f(),i=new r.SpeechSynthesizer(u,s),n&&(a.onAudioEnd=n),i.speakTextAsync(t,(function(r){if(r)try{e&&console.log("speak result",r),i&&(i.close(),i=null)}catch(e){console.error("speak error: ",e),window.speechSynthesis.speak(new SpeechSynthesisUtterance(t))}else e&&console.log("speak no result",r)}),(function(e){console.error("speak:",e),window.speechSynthesis.speak(new SpeechSynthesisUtterance(t))}))},isSpeaking:function(){return!!i},stopSpeaking:f,recognize:function(t){(p=new r.SpeechRecognizer(u,l)).recognizing=function(t,r){e&&console.log("RECOGNIZING: Text="+r.result.text)},p.recognized=function(n,o){var i;o.result.reason===r.ResultReason.RecognizedSpeech?(e&&console.log("RECOGNIZED: Text="+o.result.text),t(null!=(i=o.result.text)?i:"")):o.result.reason===r.ResultReason.NoMatch&&e&&console.log("NOMATCH: Speech could not be recognized.")},p.canceled=function(t,n){e&&console.log("CANCELED: Reason="+n.reason),n.reason===r.CancellationReason.Error&&e&&(console.log('"CANCELED: ErrorCode='+n.errorCode),console.log('"CANCELED: ErrorDetails='+n.errorDetails),console.log("CANCELED: Did you set the speech resource key and region values?")),d()},p.sessionStopped=function(t,r){e&&console.log("\n Session stopped event."),p&&p.stopContinuousRecognitionAsync()},p.startContinuousRecognitionAsync()},isRecognizing:function(){return!!p},stopRecognizing:d}}},D=function(t){return{getResourceUrl:function(e){var r=e.resourceURI,n=e.sessionID,o=e.baseURL,i=void 0===o?"https://app.twincreator.com":o,a="cover"===e.type?i+"/images/memoriCover.png":i+"/images/memoriAvatar.png";return r&&0!==r.length?r.includes("memoriai/memory")?r+"?memori-ai-session-id="+n:r.startsWith("https://")||r.startsWith("http://")?r+(n?"/"+n:""):r.startsWith("cloud://")?t.replace(/v2/,"v1")+"/CloudAsset/"+r.replace("cloud://",""):r.startsWith("guid://")?t.replace(/v2/,"v1")+"/GuidAsset/"+r.replace("guid://",""):a:a}}};exports.default=function(t){var e=function(t){return t?new URL(t.startsWith("http")?t:"https://"+t).origin.replace("http://","https://"):"https://backend.memori.ai"}(t);return a({backend:m(e+"/api/v2")},function(t){return a({correlationPairs:v(t)},v(t),{dialog:y(t)},y(t),{importExport:g(t)},g(t),{intents:w(t)},w(t),{localizationKeys:E(t)},E(t),{media:b(t)},b(t),{memories:U(t)},U(t),{nlp:T(t)},T(t),{people:x(t)},x(t),{promptedQuestions:k(t)},k(t),{search:S(t)},S(t),{session:L(t)},L(t),{stats:P(t)},P(t),{unansweredQuestions:I(t)},I(t),{contextVars:C(t)},C(t),{customDictionary:M(t)},M(t),{chatLogs:G(t)},G(t))}(e+"/memori/v2"),{speech:A,constants:O,asset:D(e+"/api/v2")})};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=(t=require("cross-fetch"))&&"object"==typeof t&&"default"in t?t.default:t,r=require("microsoft-cognitiveservices-speech-sdk");function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new x(n||[]);return o._invoke=function(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{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=b(a,r);if(u){if(u===f)continue;return u}}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 s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function p(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 h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(k([])));y&&y!==e&&r.call(y,i)&&(m=y);var g=h.prototype=l.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=p(t[o],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function U(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=h,s(g,"constructor",h),s(h,"constructor",d),d.displayName=s(h,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,h):(t.__proto__=h,s(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(E.prototype),s(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),s(g,u,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,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(T),!t)for(var e in this)"t"===e.charAt(0)&&r.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 n(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 n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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),T(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;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,s,"next",t)}function s(t){o(a,n,i,u,s,"throw",t)}u(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var u=function(t,r){return e(""+r.apiUrl+t,a({},r,{body:null!=r&&r.body?JSON.stringify(r.body):void 0,mode:"cors",credentials:"include",headers:a({"Content-Type":"application/json"},null==r?void 0:r.headers)})).then((function(t){return null!=r&&r.text?t.text():t.json()}))},s=function(t){return{getTenantPublicMemoriList:function(e){return u("/TenantPublicMemori/"+encodeURI(e),{apiUrl:t})},getPublicMemoriList:function(e){return u("/PublicMemori/"+e,{apiUrl:t})},getAllMemori:function(e){return u("/AllMemori/"+e,{apiUrl:t})},getUserMemoriList:function(e){return u("/Memori/"+e,{apiUrl:t})},getSharedMemoriList:function(e){return u("/SharedMemori/"+e,{apiUrl:t})},getTenantCategories:function(e){return u("/TenantMemoriCategories/"+encodeURI(e),{apiUrl:t})},getMemoriConfigs:function(e){return u("/MemoriConfigs/"+e,{apiUrl:t})},createMemori:function(e,r){return u("/Memori/"+e,{apiUrl:t,body:r,method:"POST"})},updateMemori:function(e,r){return u("/Memori/"+e+"/"+r.memoriID,{apiUrl:t,body:r,method:"PATCH"})},deleteMemori:function(e,r){return u("/Memori/"+e,{apiUrl:t,body:r,method:"DELETE"})},getMemoriById:function(e,r){return u("/Memori/"+e+"/"+r,{apiUrl:t})},getMemoriByUserAndId:function(e,r,n,o){return u("/MemoriById/"+e+"/"+r+"/"+n+(o?"/"+o:""),{apiUrl:t})},getMemori:function(e,r,n,o){return u("/Memori/"+encodeURI(e)+"/"+encodeURI(r)+"/"+encodeURI(n)+"/"+(null!=o?o:""),{apiUrl:t})},getMemoriSessions:function(e,r,n,o){return u("/MemoriSessions/"+e+"/"+r+(n?"/"+n:"")+(n&&o?"/"+o:""),{apiUrl:t})},transferMemori:function(e,r){return u("/TransferMemori/"+e,{apiUrl:t,body:r,method:"POST"})}}},c=function(t){return{userSignIn:function(e){return u("/User",{apiUrl:t,body:e,method:"POST"})},userConfirmSignIn:function(e){return u("/UserConfirm",{apiUrl:t,body:e,method:"POST"})},userLogin:function(e){return u("/Login",{apiUrl:t,body:e,method:"POST"})},userLogout:function(e){return u("/Logout/"+e,{apiUrl:t,method:"POST"})},getUser:function(e,r){return u("/User/"+e+"/"+r,{apiUrl:t})},getUsersList:function(e){return u("/Users/"+e,{apiUrl:t})},deleteUser:function(e,r){return u("/User/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},updateUser:function(e,r,n){return u("/User/"+e+"/"+r,{apiUrl:t,method:"PATCH",body:n})},resetPassword:function(e){return u("/ResetPassword",{apiUrl:t,body:e,method:"POST"})},resetConfirm:function(e){return u("/ResetConfirm",{apiUrl:t,body:e,method:"POST"})},recoverUsername:function(e){return u("/RecoverUsername",{apiUrl:t,body:e,method:"POST"})},getTenantConfig:function(e){return u("/Tenant/"+e,{apiUrl:t})},resendVerificationCode:function(e){return u("/ResendVerificationCode",{apiUrl:t,body:e,method:"POST"})},createUser:function(e,r){return u("/User/"+e,{apiUrl:t,body:r,method:"POST"})}}},p=function(t){return{getMemoriIntegrationsList:function(e,r){return u("/Integrations/"+e+"/"+r,{apiUrl:t})},getAllIntegrationsList:function(e){return u("/AllIntegrations/"+e,{apiUrl:t})},getIntegration:function(e,r){return u("/Integration/"+e+"/"+r,{apiUrl:t})},deleteIntegration:function(e,r){return u("/Integration/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},createIntegration:function(e,r){return u("/Integration/"+e,{apiUrl:t,method:"POST",body:r})},updateIntegration:function(e,r,n){return u("/Integration/"+e+"/"+r,{apiUrl:t,method:"PATCH",body:n})}}},f=function(t){return{getUploadAssetURL:function(e,r,n){return t+"/Asset/"+e+"/"+r+(n?"/"+n:"")},uploadAsset:(e=i(n().mark((function e(r,o,i,a,u){var s,c,p;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new FormData,e.next=3,fetch(o);case 3:return c=e.sent,e.next=6,c.blob();case 6:return s.append(r,e.sent,r),e.next=10,fetch(t+"/Asset/"+i+"/"+a+(u?"/"+u:""),{method:"POST",body:s});case 10:return p=e.sent,e.next=13,p.json();case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e)}))),function(t,r,n,o,i){return e.apply(this,arguments)}),getAsset:function(e,r){return u("/Asset/"+e+"/"+r,{apiUrl:t,method:"GET"})},updateAsset:function(e,r,n){return u("/Asset/"+e+"/"+r.split("/").reverse()[0],{apiUrl:t,method:"PATCH",body:n})},deleteAsset:function(e,r){return u("/Asset/"+e+"/"+r.split("/").reverse()[0],{apiUrl:t,method:"DELETE"})}};var e},l=function(t){return{getSentInvitations:function(e){return u("/SentInvitations/"+e,{apiUrl:t})},getReceivedInvitations:function(e){return u("/ReceivedInvitations/"+e,{apiUrl:t})},getAllInvitations:function(e){return u("/AllInvitations/"+e,{apiUrl:t})},getInvitation:function(e,r){return u("/Invitation/"+e+"/"+r,{apiUrl:t})},updateInvitation:function(e,r){return u("/Invitation/"+e+"/"+r.invitationID,{apiUrl:t,method:"PATCH",body:r})},deleteInvitation:function(e,r){return u("/Invitation/"+e+"/"+r,{apiUrl:t,method:"DELETE"})},acceptInvitation:function(e,r){return u("/AcceptInvitation/"+e+"/"+r,{apiUrl:t,method:"POST"})},rejectInvitation:function(e,r){return u("/RejectInvitation/"+e+"/"+r,{apiUrl:t,method:"POST"})},sendInvitation:function(e,r){return u("/SendInvitation/"+e,{apiUrl:t,method:"POST",body:r})}}},d=function(t){return{getTenantConsumptionLogs:function(e,r,n,o,i){return u("/TenantConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getUserConsumptionLogs:function(e,r,n,o,i){return u("/UserConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getMemoriConsumptionLogs:function(e,r,n,o,i){return u("/MemoriConsumptionLogs/"+e+"/"+r+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})}}},h=function(t){return{getTenantNotifications:function(e){return u("/TenantNotifications/"+e,{apiUrl:t})},getUserNotifications:function(e){return u("/UserNotifications/"+e,{apiUrl:t})}}},m=function(t){return a({asset:f(t),memori:s(t),user:c(t),integration:p(t),invitation:l(t),consumptionLogs:d(t),notifications:h(t)},f(t),s(t),c(t),p(t),l(t),d(t),h(t))},v=function(t){return{getCorrelationPairs:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CorrelationPairs/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),deleteCorrelationPair:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CorrelationPair/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r},y=function(t){return{postTextEnteredEvent:(l=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TextEnteredEvent/"+r.sessionId,{method:"POST",apiUrl:t,body:{text:r.text}}));case 2:case"end":return e.stop()}}),e)}))),function(t){return l.apply(this,arguments)}),postPlaceChangedEvent:(f=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PlaceChangedEvent/"+r.sessionId,{method:"POST",apiUrl:t,body:{placeName:r.placeName,latitude:r.latitude,longitude:r.longitude,uncertaintyKm:r.uncertaintyKm}}));case 2:case"end":return e.stop()}}),e)}))),function(t){return f.apply(this,arguments)}),postDateChangedEvent:(p=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/DateChangedEvent/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return p.apply(this,arguments)}),postTagChangedEvent:(c=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TagChangedEvent/"+r,{method:"POST",apiUrl:t,body:{tag:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return c.apply(this,arguments)}),postTimeoutEvent:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TimeoutEvent/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),postMediumSelectedEvent:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/MediumSelectedEvent/"+r,{method:"POST",apiUrl:t,body:{medium:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),postDateSelectedEvent:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/DateSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),postPlaceSelectedEvent:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PlaceSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),postTagSelectedEvent:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TagSelectedEvent/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o,a,s,c,p,f,l},g=function(t){return{importCSV:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ImportExport/ImportCSV/"+r,{method:"POST",apiUrl:t,body:a({csvRows:o},i)}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),exportCSV:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ImportExport/ExportCSV/"+r,{method:"POST",apiUrl:t,body:o,text:!0}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r},w=function(t){return{getIntents:(d=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intents/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return d.apply(this,arguments)}),getIntent:(l=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return l.apply(this,arguments)}),patchIntent:(f=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o.intentID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return f.apply(this,arguments)}),deleteIntent:(p=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return p.apply(this,arguments)}),createIntent:(c=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Intent/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return c.apply(this,arguments)}),getIntentSlots:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlots/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getIntentSlot:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchIntentSlot:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o.intentSlotID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deleteIntentSlot:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),createIntentSlot:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/IntentSlot/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s,c,p,f,l,d},E=function(t){return{getLocalizationKeys:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKeys/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getLocalizationKey:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteLocalizationKey:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postLocalizationKey:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),patchLocalizationKey:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/LocalizationKey/"+r,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},b=function(t){return{getMedia:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Media/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),deleteMedia:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Media/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),getMedium:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),patchMedium:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteMedium:function(e,r,n){return u("/Medium/"+e+"/"+r+"/"+n,{method:"GET",apiUrl:t})},postMedium:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Medium/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},U=function(t){return{getMemories:(p=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memories/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return p.apply(this,arguments)}),getMemoriesPaginated:(c=i(n().mark((function e(r,o,i,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memories/"+r+"/"+o+"/"+i+(a?"/"+a:""),{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r,n){return c.apply(this,arguments)}),getMemory:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),patchMemory:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o.memoryID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteMemory:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postMemory:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Memory/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),getMemoryAccess:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/MemoryAccess/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s,c,p},T=function(t){return{getWordVector:(s=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/WordVector/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return s.apply(this,arguments)}),getSimilarWords:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/SimilarWords/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),guessLanguage:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/GuessLanguage/"+r,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),computeSimilarity:(r=i(n().mark((function e(r,o,i,a,s){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ComputeSimilarity/"+r,{method:"POST",apiUrl:t,body:{referenceText:o,referenceTextType:i,comparisonText:a,comparisonTextType:s}}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n,o,i){return r.apply(this,arguments)}),checkWords:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CheckWords/"+r,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},x=function(t){return{getPeople:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/People/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getPerson:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchPerson:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o.personID,{method:"PATCH",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deletePerson:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),postPerson:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Person/"+r,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},k=function(t){return{getPromptedQuestions:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestions/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getPromptedQuestion:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),patchPromptedQuestion:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),deletePromptedQuestion:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),postPromptedQuestion:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/PromptedQuestion/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o,a,s},S=function(t){return{searchMemory:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Search/"+r,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postRandom:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Random/"+r,{method:"POST",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),postHints:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Hints/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o},L=function(t){return{initSession:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session",{method:"POST",body:r,apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getSession:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),deleteSession:(e=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Session/"+r,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e,r,o},P=function(t){return{getStatistics:(c=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/Statistics/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return c.apply(this,arguments)}),getContentQualityIndexes:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContentQualityIndexes/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getTextQualityIndexes:(a=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/TextQualityIndexes/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return a.apply(this,arguments)}),getEventLogs:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),getMemoryEventLogs:(r=i(n().mark((function e(r,o,i,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i+"/"+a,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n,o){return r.apply(this,arguments)}),getIntentEventLogs:(e=i(n().mark((function e(r,o,i,a){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/EventLogs/"+r+"/"+o+"/"+i+"/"+a,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r,n,o){return e.apply(this,arguments)})};var e,r,o,a,s,c},I=function(t){return{getUnansweredQuestions:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestions/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getUnansweredQuestionsPaginated:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestions/"+r+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteUnansweredQuestion:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/UnansweredQuestion/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},C=function(t){return{getContextVars:(o=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVars/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return o.apply(this,arguments)}),getContextVarNames:(r=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVarNames/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return r.apply(this,arguments)}),getContextVarValues:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ContextVarValues/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},M=function(t){return{getCustomWords:(s=i(n().mark((function e(r){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWords/"+r,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)}),getCustomWord:(a=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return a.apply(this,arguments)}),deleteCustomWord:(o=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return o.apply(this,arguments)}),postCustomWord:(r=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,e){return r.apply(this,arguments)}),patchCustomWord:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/CustomWord/"+r+"/"+o.customWordID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o,a,s},G=function(t){return{getChatLogs:(o=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLogs/"+r+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"GET",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,r){return o.apply(this,arguments)}),deleteChatLogs:(r=i(n().mark((function e(r,o,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLogs/"+r+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,e,n){return r.apply(this,arguments)}),deleteChatLog:(e=i(n().mark((function e(r,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",u("/ChatLog/"+r+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})};var e,r,o},O={__proto__:null,allowedMediaTypes:["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],anonTag:"👤"},A=function(t,e){return void 0===e&&(e=!1),function(n,o){var i,a,u=r.SpeechConfig.fromSubscription(t,"eastus");a=new r.SpeakerAudioDestination;var s=r.AudioConfig.fromSpeakerOutput(a);u.speechSynthesisVoiceName=function(t,e){var r="";switch(t.toUpperCase()){case"IT":r="MALE"===e?"it-IT-DiegoNeural":"it-IT-ElsaNeural";break;case"DE":r="MALE"===e?"de-DE-ConradNeural":"de-DE-KatjaNeural";break;case"EN":r="MALE"===e?"en-GB-RyanNeural":"en-GB-SoniaNeural";break;case"ES":r="MALE"===e?"es-ES-AlvaroNeural":"es-ES-ElviraNeural";break;case"FR":r="MALE"===e?"fr-FR-HenriNeural":"fr-FR-DeniseNeural";break;case"PT":r="MALE"===e?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural";break;default:r="MALE"===e?"it-IT-DiegoNeural":"it-IT-IsabellaNeural"}return r}(n,o);var c=function(t){var e="";switch(t.toUpperCase()){case"IT":e="it-IT";break;case"DE":e="de-DE";break;case"EN":e="en-US";break;case"ES":e="es-ES";break;case"FR":e="fr-FR";break;case"PT":e="pt-PT";break;default:e="it-IT"}return e}(n);u.speechSynthesisLanguage=c,u.speechRecognitionLanguage=c;var p,f=function(){a&&a.pause(),i&&(i.close(),i=null)},l=r.AudioConfig.fromDefaultMicrophoneInput(),d=function(t){p&&(p.stopContinuousRecognitionAsync(),p.close(),p=null,t&&t())};return{speak:function(t,n){f(),i=new r.SpeechSynthesizer(u,s),n&&(a.onAudioEnd=n),i.speakTextAsync(t,(function(r){if(r)try{e&&console.log("speak result",r),i&&(i.close(),i=null)}catch(e){console.error("speak error: ",e),window.speechSynthesis.speak(new SpeechSynthesisUtterance(t))}else e&&console.log("speak no result",r)}),(function(e){console.error("speak:",e),window.speechSynthesis.speak(new SpeechSynthesisUtterance(t))}))},isSpeaking:function(){return!!i},stopSpeaking:f,recognize:function(t){(p=new r.SpeechRecognizer(u,l)).recognizing=function(t,r){e&&console.log("RECOGNIZING: Text="+r.result.text)},p.recognized=function(n,o){var i;o.result.reason===r.ResultReason.RecognizedSpeech?(e&&console.log("RECOGNIZED: Text="+o.result.text),t(null!=(i=o.result.text)?i:"")):o.result.reason===r.ResultReason.NoMatch&&e&&console.log("NOMATCH: Speech could not be recognized.")},p.canceled=function(t,n){e&&console.log("CANCELED: Reason="+n.reason),n.reason===r.CancellationReason.Error&&e&&(console.log('"CANCELED: ErrorCode='+n.errorCode),console.log('"CANCELED: ErrorDetails='+n.errorDetails),console.log("CANCELED: Did you set the speech resource key and region values?")),d()},p.sessionStopped=function(t,r){e&&console.log("\n Session stopped event."),p&&p.stopContinuousRecognitionAsync()},p.startContinuousRecognitionAsync()},isRecognizing:function(){return!!p},stopRecognizing:d}}},D=function(t){return{getResourceUrl:function(e){var r=e.resourceURI,n=e.sessionID,o=e.baseURL,i=void 0===o?"https://app.twincreator.com":o,a="cover"===e.type?i+"/images/memoriCover.png":i+"/images/memoriAvatar.png";return r&&0!==r.length?r.includes("memoriai/memory")?r+"?memori-ai-session-id="+n:r.startsWith("https://")||r.startsWith("http://")?r+(n?"/"+n:""):r.startsWith("cloud://")?t.replace(/v2/,"v1")+"/CloudAsset/"+r.replace("cloud://",""):r.startsWith("guid://")?t.replace(/v2/,"v1")+"/GuidAsset/"+r.replace("guid://",""):a:a}}};exports.default=function(t){var e=function(t){return t?new URL(t.startsWith("http")?t:"https://"+t).origin.replace("http://","https://"):"https://backend.memori.ai"}(t);return a({backend:m(e+"/api/v2")},function(t){return a({correlationPairs:v(t)},v(t),{dialog:y(t)},y(t),{importExport:g(t)},g(t),{intents:w(t)},w(t),{localizationKeys:E(t)},E(t),{media:b(t)},b(t),{memories:U(t)},U(t),{nlp:T(t)},T(t),{people:x(t)},x(t),{promptedQuestions:k(t)},k(t),{search:S(t)},S(t),{session:L(t)},L(t),{stats:P(t)},P(t),{unansweredQuestions:I(t)},I(t),{contextVars:C(t)},C(t),{customDictionary:M(t)},M(t),{chatLogs:G(t)},G(t))}(e+"/memori/v2"),{speech:A,constants:O,asset:D(e+"/api/v2")})};
//# sourceMappingURL=memori-api-client.cjs.production.min.js.map
{
"version": "0.4.2",
"version": "0.4.3",
"main": "dist/index.js",

@@ -4,0 +4,0 @@ "typings": "dist/index.d.ts",

@@ -28,2 +28,5 @@ import { Memory, ResponseSpec } from '../types';

* @param {string} sessionId The session ID
* @param {number} from The starting index
* @param {number} howMany The number of items to return
* @param {string=} type Optional type of the Memory objects to list: ALL, CONTENTS, DEFAULTS
*/

@@ -33,8 +36,12 @@ getMemoriesPaginated: async (

from: number,
howMany: number
howMany: number,
type?: 'ALL' | 'CONTENTS' | 'DEFAULTS'
) =>
apiFetcher(`/Memories/${sessionId}/${from}/${howMany}`, {
method: 'GET',
apiUrl,
}) as Promise<
apiFetcher(
`/Memories/${sessionId}/${from}/${howMany}${type ? `/${type}` : ''}`,
{
method: 'GET',
apiUrl,
}
) as Promise<
ResponseSpec & {

@@ -41,0 +48,0 @@ count: number;

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc