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 1.1.0 to 1.2.0

7

CHANGELOG.md
## [1.2.0](https://github.com/memori-ai/memori-api-client/compare/v1.1.0...v1.2.0) (2023-03-09)
### Features
* update import apis ([1e924ef](https://github.com/memori-ai/memori-api-client/commit/1e924ef54c3ce38312a0e7d169fd60702c43f3f8))
## [1.1.0](https://github.com/memori-ai/memori-api-client/compare/v1.0.0...v1.1.0) (2023-02-16)

@@ -4,0 +11,0 @@

25

dist/engine/importExport.d.ts

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

import { ResponseSpec, ImportReponse, ImportCSVParams, ExportCSVParams } from '../types';
import { ResponseSpec, ImportReponse, ExportCSVParams, ImportParams } from '../types';
declare const _default: (apiUrl: string) => {

@@ -6,7 +6,24 @@ /**

* @param {string} sessionId The session ID
* @param {string[]} csvRows Rows of the CSV file.
* @param {ImportCSVParams} params The specifications and content of the CSV file
* @param {string[]} rows Rows of the CSV file.
* @param {ImportParams} params The specifications and content of the CSV file
*/
importCSV: (sessionId: string, csvRows: string[], params: ImportCSVParams) => Promise<ResponseSpec & ImportReponse>;
importCSV: (sessionId: string, rows: string[], params: ImportParams) => Promise<ResponseSpec & ImportReponse>;
/**
* Gets the status of an ongoing Import process.
* @param {string} importID The import process ID
*/
importStatus: (importID: string) => Promise<ResponseSpec & ImportReponse>;
/**
* Interrupts an ongoing Import process.
* @param {string} importID The import process ID
*/
stopImport: (importID: string) => Promise<ResponseSpec & ImportReponse>;
/**
* Imports memories from a TXT file.
* @param {string} sessionId The session ID
* @param {string[]} rows Rows of the TXT file.
* @param {ImportCSVParams} params The specifications and content of the TXT file
*/
importTXT: (sessionId: string, rows: string[], params: Omit<ImportParams, 'csvSpecs'>) => Promise<ResponseSpec & ImportReponse>;
/**
* Exports memories to a CSV file.

@@ -13,0 +30,0 @@ * @param {string} sessionID The session ID

2

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

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,r=(t=require("cross-fetch"))&&"object"==typeof t&&"default"in t?t.default:t;function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=Object.create((r&&r.prototype instanceof l?r:l).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){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(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=b(a,e);if(u){if(u===f)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=p(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,i),o}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function l(){}function d(){}function h(){}var m={};c(m,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==r&&n.call(y,i)&&(m=y);var w=h.prototype=l.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function U(t,r){var e;this._invoke=function(o,i){function a(){return new r((function(e,a){!function e(o,i,a,u){var c=p(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}(o,i,e,a)}))}return e=e?e.then(a,a):a()}}function b(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,b(t,r),"throw"===r.method))return f;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=h,c(w,"constructor",h),c(h,"constructor",d),d.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},g(U.prototype),c(U.prototype,a,(function(){return this})),t.AsyncIterator=U,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new U(s(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(w),c(w,u,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,E.prototype={constructor:E,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 r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.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 e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,r){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&&r&&(this.next=r),f},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),f}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:P(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise((function(o,i){var a=t.apply(r,e);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}function i(){return(i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}var a=function(t,e){return r(""+e.apiUrl+t,i({},e,{body:null!=e&&e.body?JSON.stringify(e.body):void 0,mode:"cors",credentials:"include",headers:i({"Content-Type":"application/json"},null==e?void 0:e.headers)})).then((function(t){return null!=e&&e.text?t.text():t.json()}))},u=function(t){return{getTenantPublicMemoriList:function(r){return a("/TenantPublicMemori/"+encodeURI(r),{apiUrl:t})},getTenantMetaverseMemoriList:function(r){return a("/TenantMetaverseMemori/"+encodeURI(r),{apiUrl:t})},getPublicMemoriList:function(r){return a("/PublicMemori/"+r,{apiUrl:t})},getAllMemori:function(r){return a("/AllMemori/"+r,{apiUrl:t})},getUserByIDMemoriList:function(r,e,n){return a("/UserMemoriByID/"+r+"/"+e+(n?"/"+n:""),{apiUrl:t})},getUserMemoriList:function(r,e,n){return a("/UserMemori/"+r+"/"+e+(n?"/"+n:""),{apiUrl:t})},getMemoriList:function(r){return a("/Memori/"+r,{apiUrl:t})},getSharedMemoriList:function(r){return a("/SharedMemori/"+r,{apiUrl:t})},getTenantCategories:function(r){return a("/TenantMemoriCategories/"+encodeURI(r),{apiUrl:t})},getMemoriConfigs:function(r){return a("/MemoriConfigs/"+r,{apiUrl:t})},createMemori:function(r,e){return a("/Memori/"+r,{apiUrl:t,body:e,method:"POST"})},updateMemori:function(r,e){return a("/Memori/"+r+"/"+e.memoriID,{apiUrl:t,body:e,method:"PATCH"})},deleteMemori:function(r,e){return a("/Memori/"+r,{apiUrl:t,body:e,method:"DELETE"})},getMemoriById:function(r,e){return a("/Memori/"+r+"/"+e,{apiUrl:t})},getMemoriByUserAndId:function(r,e,n,o){return a("/MemoriById/"+r+"/"+e+"/"+n+(o?"/"+o:""),{apiUrl:t})},getMemori:function(r,e,n,o){return a("/Memori/"+encodeURI(r)+"/"+encodeURI(e)+"/"+encodeURI(n)+"/"+(null!=o?o:""),{apiUrl:t})},getMemoriSessions:function(r,e,n,o){return a("/MemoriSessions/"+r+"/"+e+(n?"/"+n:"")+(n&&o?"/"+o:""),{apiUrl:t})},transferMemori:function(r,e){return a("/TransferMemori/"+r,{apiUrl:t,body:e,method:"POST"})},memoriContentUpdated:function(r,e){return a("/MemoriContentUpdated/"+r+"/"+e,{apiUrl:t,method:"POST"})}}},c=function(t){return{userSignUp:function(r){return a("/User",{apiUrl:t,body:r,method:"POST"})},userConfirmSignUp:function(r){return a("/UserConfirm",{apiUrl:t,body:r,method:"POST"})},userLogin:function(r){return a("/Login",{apiUrl:t,body:r,method:"POST"})},userLogout:function(r){return a("/Logout/"+r,{apiUrl:t,method:"POST"})},getUser:function(r,e){return a("/User/"+r+"/"+e,{apiUrl:t})},getUsersList:function(r){return a("/Users/"+r,{apiUrl:t})},deleteUser:function(r,e){return a("/User/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},updateUser:function(r,e,n){return a("/User/"+r+"/"+e,{apiUrl:t,method:"PATCH",body:n})},resetPassword:function(r){return a("/ResetPassword",{apiUrl:t,body:r,method:"POST"})},resetConfirm:function(r){return a("/ResetConfirm",{apiUrl:t,body:r,method:"POST"})},recoverUsername:function(r){return a("/RecoverUsername",{apiUrl:t,body:r,method:"POST"})},getTenantConfig:function(r){return a("/Tenant/"+r,{apiUrl:t})},resendVerificationCode:function(r){return a("/ResendVerificationCode",{apiUrl:t,body:r,method:"POST"})},createUser:function(r,e){return a("/User/"+r,{apiUrl:t,body:e,method:"POST"})}}},s=function(t){return{getMemoriIntegrationsList:function(r,e){return a("/Integrations/"+r+"/"+e,{apiUrl:t})},getAllIntegrationsList:function(r){return a("/AllIntegrations/"+r,{apiUrl:t})},getIntegration:function(r,e){return a("/Integration/"+r+"/"+e,{apiUrl:t})},deleteIntegration:function(r,e){return a("/Integration/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},createIntegration:function(r,e){return a("/Integration/"+r,{apiUrl:t,method:"POST",body:e})},updateIntegration:function(r,e,n){return a("/Integration/"+r+"/"+e,{apiUrl:t,method:"PATCH",body:n})}}},p=function(t){return{getUploadAssetURL:function(r,e,n){return t+"/Asset/"+r+"/"+e+(n?"/"+n:"")},uploadAsset:(r=o(e().mark((function r(n,o,i,a,u){var c,s,p;return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=new FormData,r.next=3,fetch(o);case 3:return s=r.sent,r.next=6,s.blob();case 6:return c.append(n,r.sent,n),r.next=10,fetch(t+"/Asset/"+i+"/"+a+(u?"/"+u:""),{method:"POST",body:c});case 10:return p=r.sent,r.next=13,p.json();case 13:return r.abrupt("return",r.sent);case 14:case"end":return r.stop()}}),r)}))),function(t,e,n,o,i){return r.apply(this,arguments)}),getAsset:function(r,e){return a("/Asset/"+r+"/"+e,{apiUrl:t,method:"GET"})},updateAsset:function(r,e,n){return a("/Asset/"+r+"/"+e.split("/").reverse()[0],{apiUrl:t,method:"PATCH",body:n})},deleteAsset:function(r,e){return a("/Asset/"+r+"/"+e.split("/").reverse()[0],{apiUrl:t,method:"DELETE"})}};var r},f=function(t){return{getSentInvitations:function(r){return a("/SentInvitations/"+r,{apiUrl:t})},getMemoriInvitations:function(r,e){return a("/MemoriInvitations/"+r+"/"+e,{apiUrl:t})},getReceivedInvitations:function(r){return a("/ReceivedInvitations/"+r,{apiUrl:t})},getAllInvitations:function(r){return a("/AllInvitations/"+r,{apiUrl:t})},getInvitation:function(r,e){return a("/Invitation/"+r+"/"+e,{apiUrl:t})},updateInvitation:function(r,e){return a("/Invitation/"+r+"/"+e.invitationID,{apiUrl:t,method:"PATCH",body:e})},deleteInvitation:function(r,e){return a("/Invitation/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},acceptInvitation:function(r,e){return a("/AcceptInvitation/"+r+"/"+e,{apiUrl:t,method:"POST"})},rejectInvitation:function(r,e){return a("/RejectInvitation/"+r+"/"+e,{apiUrl:t,method:"POST"})},sendInvitation:function(r,e){return a("/SendInvitation/"+r,{apiUrl:t,method:"POST",body:e})}}},l=function(t){return{getTenantConsumptionLogs:function(r,e,n,o,i){return a("/TenantConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getUserConsumptionLogs:function(r,e,n,o,i){return a("/UserConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getMemoriConsumptionLogs:function(r,e,n,o,i){return a("/MemoriConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})}}},d=function(t){return{getTenantNotifications:function(r){return a("/TenantNotifications/"+r,{apiUrl:t})},getUserNotifications:function(r){return a("/UserNotifications/"+r,{apiUrl:t})}}},h=function(t){return i({asset:p(t),memori:u(t),user:c(t),integration:s(t),invitation:f(t),consumptionLogs:l(t),notifications:d(t)},p(t),u(t),c(t),s(t),f(t),l(t),d(t))},m=function(t){return{getCorrelationPairs:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPairs/"+n+(o?"/"+o+(i?"/"+i:""):""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),postCorrelationPair:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPair/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),deleteCorrelationPair:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPair/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i},v=function(t){return{postTextEnteredEvent:(l=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TextEnteredEvent/"+n.sessionId,{method:"POST",apiUrl:t,body:{text:n.text}}));case 2:case"end":return r.stop()}}),r)}))),function(t){return l.apply(this,arguments)}),postPlaceChangedEvent:(f=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PlaceChangedEvent/"+n.sessionId,{method:"POST",apiUrl:t,body:{placeName:n.placeName,latitude:n.latitude,longitude:n.longitude,uncertaintyKm:n.uncertaintyKm}}));case 2:case"end":return r.stop()}}),r)}))),function(t){return f.apply(this,arguments)}),postDateChangedEvent:(p=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/DateChangedEvent/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return p.apply(this,arguments)}),postTagChangedEvent:(s=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TagChangedEvent/"+n,{method:"POST",apiUrl:t,body:{tag:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return s.apply(this,arguments)}),postTimeoutEvent:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TimeoutEvent/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),postMediumSelectedEvent:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/MediumSelectedEvent/"+n,{method:"POST",apiUrl:t,body:{medium:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),postDateSelectedEvent:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/DateSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),postPlaceSelectedEvent:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PlaceSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),postTagSelectedEvent:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TagSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i,u,c,s,p,f,l},y=function(t){return{importCSV:(n=o(e().mark((function r(n,o,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ImportCSV/"+n,{method:"POST",apiUrl:t,body:i({csvRows:o},u)}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),exportCSV:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ExportCSV/"+n,{method:"POST",apiUrl:t,body:o,text:!0}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n},w=function(t){return{getIntents:(d=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intents/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return d.apply(this,arguments)}),getIntent:(l=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return l.apply(this,arguments)}),patchIntent:(f=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o.intentID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return f.apply(this,arguments)}),deleteIntent:(p=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return p.apply(this,arguments)}),createIntent:(s=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return s.apply(this,arguments)}),getIntentSlots:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlots/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getIntentSlot:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchIntentSlot:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o.intentSlotID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deleteIntentSlot:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),createIntentSlot:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c,s,p,f,l,d},g=function(t){return{getLocalizationKeys:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKeys/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getLocalizationKey:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteLocalizationKey:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postLocalizationKey:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),patchLocalizationKey:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},U=function(t){return{getMedia:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Media/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),deleteMedia:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Media/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),getMedium:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),patchMedium:(n=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),deleteMedium:function(r,e,n){return a("/Medium/"+r+"/"+e+"/"+n,{method:"GET",apiUrl:t})},postMedium:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},b=function(t){return{getMemories:(p=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memories/"+n+(o?"/"+o:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return p.apply(this,arguments)}),getMemoriesPaginated:(s=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memories/"+n+"/"+o+"/"+i+(u?"/"+u:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,n){return s.apply(this,arguments)}),getMemory:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),patchMemory:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o.memoryID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteMemory:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postMemory:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),getMemoryAccess:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/MemoryAccess/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c,s,p},x=function(t){return{getWordVector:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/WordVector/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),getSimilarWords:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/SimilarWords/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),guessLanguage:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/GuessLanguage/"+n,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),computeSimilarity:(n=o(e().mark((function r(n,o,i,u,c){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ComputeSimilarity/"+n,{method:"POST",apiUrl:t,body:{referenceText:o,referenceTextType:i,comparisonText:u,comparisonTextType:c}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,o,i){return n.apply(this,arguments)}),checkWords:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CheckWords/"+n,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},T=function(t){return{getPeople:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/People/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getPerson:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchPerson:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o.personID,{method:"PATCH",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deletePerson:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),postPerson:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},E=function(t){return{getPromptedQuestions:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestions/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getPromptedQuestion:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchPromptedQuestion:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deletePromptedQuestion:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),postPromptedQuestion:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i,u,c},P=function(t){return{searchMemory:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Search/"+n,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postRandom:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Random/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),postHints:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Hints/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i},k=function(t){return{initSession:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session",{method:"POST",body:n,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),getSession:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),deleteSession:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session/"+n,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i},L=function(t){return{getStatistics:(s=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Statistics/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return s.apply(this,arguments)}),getContentQualityIndexes:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContentQualityIndexes/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getTextQualityIndexes:(u=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TextQualityIndexes/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return u.apply(this,arguments)}),getEventLogs:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),getMemoryEventLogs:(n=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i+"/"+u,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,o){return n.apply(this,arguments)}),getIntentEventLogs:(r=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i+"/"+u,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e,n,o){return r.apply(this,arguments)})};var r,n,i,u,c,s},S=function(t){return{getUnansweredQuestions:(u=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestions/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return u.apply(this,arguments)}),getUnansweredQuestionsPaginated:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestions/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),postUnansweredQuestion:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestion/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),deleteUnansweredQuestion:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestion/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u},I=function(t){return{getContextVars:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVars/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),getContextVarNames:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVarNames/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),getContextVarValues:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVarValues/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i},C=function(t){return{getCustomWords:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWords/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getCustomWord:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteCustomWord:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postCustomWord:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),patchCustomWord:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o.customWordID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},M=function(t){return{getChatLogs:(u=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLogs/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return u.apply(this,arguments)}),getSessionChatLogs:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/SessionChatLogs/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deleteChatLogs:(n=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLogs/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),deleteChatLog:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLog/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u},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:"👤"},G=function(t){return{getResourceUrl:function(r){var e=r.resourceURI,n=r.sessionID,o=r.baseURL,i=void 0===o?"https://app.twincreator.com":o,a="cover"===r.type?i+"/images/memoriCover.png":i+"/images/memoriAvatar.png";return e&&0!==e.length?e.includes("memoriai/memory")?e+"?memori-ai-session-id="+n:e.startsWith("https://")||e.startsWith("http://")?e+(n?"/"+n:""):e.startsWith("cloud://")?t.replace(/v2/,"v1")+"/CloudAsset/"+e.replace("cloud://",""):e.startsWith("guid://")?t.replace(/v2/,"v1")+"/GuidAsset/"+e.replace("guid://",""):a:a}}};exports.default=function(t){var r=function(t){return t?new URL(t.startsWith("http")?t:"https://"+t).origin:"https://backend.memori.ai"}(t);return i({backend:h(r+"/api/v2")},function(t){return i({correlationPairs:m(t)},m(t),{dialog:v(t)},v(t),{importExport:y(t)},y(t),{intents:w(t)},w(t),{localizationKeys:g(t)},g(t),{media:U(t)},U(t),{memories:b(t)},b(t),{nlp:x(t)},x(t),{people:T(t)},T(t),{promptedQuestions:E(t)},E(t),{search:P(t)},P(t),{session:k(t)},k(t),{stats:L(t)},L(t),{unansweredQuestions:S(t)},S(t),{contextVars:I(t)},I(t),{customDictionary:C(t)},C(t),{chatLogs:M(t)},M(t))}(r+"/memori/v2"),{constants:O,asset:G(r+"/api/v2")})};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,r=(t=require("cross-fetch"))&&"object"==typeof t&&"default"in t?t.default:t;function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=Object.create((r&&r.prototype instanceof d?r:d).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){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(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=b(a,e);if(u){if(u===f)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=p(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,i),o}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function d(){}function l(){}function h(){}var m={};c(m,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==r&&n.call(y,i)&&(m=y);var w=h.prototype=d.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function U(t,r){var e;this._invoke=function(o,i){function a(){return new r((function(e,a){!function e(o,i,a,u){var c=p(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}(o,i,e,a)}))}return e=e?e.then(a,a):a()}}function b(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,b(t,r),"throw"===r.method))return f;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return l.prototype=h,c(w,"constructor",h),c(h,"constructor",l),l.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===l||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},g(U.prototype),c(U.prototype,a,(function(){return this})),t.AsyncIterator=U,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new U(s(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(w),c(w,u,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,E.prototype={constructor:E,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 r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.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 e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,r){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&&r&&(this.next=r),f},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),f}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:P(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise((function(o,i){var a=t.apply(r,e);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}function i(){return(i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}var a=function(t,e){return r(""+e.apiUrl+t,i({},e,{body:null!=e&&e.body?JSON.stringify(e.body):void 0,mode:"cors",credentials:"include",headers:i({"Content-Type":"application/json"},null==e?void 0:e.headers)})).then((function(t){return null!=e&&e.text?t.text():t.json()}))},u=function(t){return{getTenantPublicMemoriList:function(r){return a("/TenantPublicMemori/"+encodeURI(r),{apiUrl:t})},getTenantMetaverseMemoriList:function(r){return a("/TenantMetaverseMemori/"+encodeURI(r),{apiUrl:t})},getPublicMemoriList:function(r){return a("/PublicMemori/"+r,{apiUrl:t})},getAllMemori:function(r){return a("/AllMemori/"+r,{apiUrl:t})},getUserByIDMemoriList:function(r,e,n){return a("/UserMemoriByID/"+r+"/"+e+(n?"/"+n:""),{apiUrl:t})},getUserMemoriList:function(r,e,n){return a("/UserMemori/"+r+"/"+e+(n?"/"+n:""),{apiUrl:t})},getMemoriList:function(r){return a("/Memori/"+r,{apiUrl:t})},getSharedMemoriList:function(r){return a("/SharedMemori/"+r,{apiUrl:t})},getTenantCategories:function(r){return a("/TenantMemoriCategories/"+encodeURI(r),{apiUrl:t})},getMemoriConfigs:function(r){return a("/MemoriConfigs/"+r,{apiUrl:t})},createMemori:function(r,e){return a("/Memori/"+r,{apiUrl:t,body:e,method:"POST"})},updateMemori:function(r,e){return a("/Memori/"+r+"/"+e.memoriID,{apiUrl:t,body:e,method:"PATCH"})},deleteMemori:function(r,e){return a("/Memori/"+r,{apiUrl:t,body:e,method:"DELETE"})},getMemoriById:function(r,e){return a("/Memori/"+r+"/"+e,{apiUrl:t})},getMemoriByUserAndId:function(r,e,n,o){return a("/MemoriById/"+r+"/"+e+"/"+n+(o?"/"+o:""),{apiUrl:t})},getMemori:function(r,e,n,o){return a("/Memori/"+encodeURI(r)+"/"+encodeURI(e)+"/"+encodeURI(n)+"/"+(null!=o?o:""),{apiUrl:t})},getMemoriSessions:function(r,e,n,o){return a("/MemoriSessions/"+r+"/"+e+(n?"/"+n:"")+(n&&o?"/"+o:""),{apiUrl:t})},transferMemori:function(r,e){return a("/TransferMemori/"+r,{apiUrl:t,body:e,method:"POST"})},memoriContentUpdated:function(r,e){return a("/MemoriContentUpdated/"+r+"/"+e,{apiUrl:t,method:"POST"})}}},c=function(t){return{userSignUp:function(r){return a("/User",{apiUrl:t,body:r,method:"POST"})},userConfirmSignUp:function(r){return a("/UserConfirm",{apiUrl:t,body:r,method:"POST"})},userLogin:function(r){return a("/Login",{apiUrl:t,body:r,method:"POST"})},userLogout:function(r){return a("/Logout/"+r,{apiUrl:t,method:"POST"})},getUser:function(r,e){return a("/User/"+r+"/"+e,{apiUrl:t})},getUsersList:function(r){return a("/Users/"+r,{apiUrl:t})},deleteUser:function(r,e){return a("/User/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},updateUser:function(r,e,n){return a("/User/"+r+"/"+e,{apiUrl:t,method:"PATCH",body:n})},resetPassword:function(r){return a("/ResetPassword",{apiUrl:t,body:r,method:"POST"})},resetConfirm:function(r){return a("/ResetConfirm",{apiUrl:t,body:r,method:"POST"})},recoverUsername:function(r){return a("/RecoverUsername",{apiUrl:t,body:r,method:"POST"})},getTenantConfig:function(r){return a("/Tenant/"+r,{apiUrl:t})},resendVerificationCode:function(r){return a("/ResendVerificationCode",{apiUrl:t,body:r,method:"POST"})},createUser:function(r,e){return a("/User/"+r,{apiUrl:t,body:e,method:"POST"})}}},s=function(t){return{getMemoriIntegrationsList:function(r,e){return a("/Integrations/"+r+"/"+e,{apiUrl:t})},getAllIntegrationsList:function(r){return a("/AllIntegrations/"+r,{apiUrl:t})},getIntegration:function(r,e){return a("/Integration/"+r+"/"+e,{apiUrl:t})},deleteIntegration:function(r,e){return a("/Integration/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},createIntegration:function(r,e){return a("/Integration/"+r,{apiUrl:t,method:"POST",body:e})},updateIntegration:function(r,e,n){return a("/Integration/"+r+"/"+e,{apiUrl:t,method:"PATCH",body:n})}}},p=function(t){return{getUploadAssetURL:function(r,e,n){return t+"/Asset/"+r+"/"+e+(n?"/"+n:"")},uploadAsset:(r=o(e().mark((function r(n,o,i,a,u){var c,s,p;return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=new FormData,r.next=3,fetch(o);case 3:return s=r.sent,r.next=6,s.blob();case 6:return c.append(n,r.sent,n),r.next=10,fetch(t+"/Asset/"+i+"/"+a+(u?"/"+u:""),{method:"POST",body:c});case 10:return p=r.sent,r.next=13,p.json();case 13:return r.abrupt("return",r.sent);case 14:case"end":return r.stop()}}),r)}))),function(t,e,n,o,i){return r.apply(this,arguments)}),getAsset:function(r,e){return a("/Asset/"+r+"/"+e,{apiUrl:t,method:"GET"})},updateAsset:function(r,e,n){return a("/Asset/"+r+"/"+e.split("/").reverse()[0],{apiUrl:t,method:"PATCH",body:n})},deleteAsset:function(r,e){return a("/Asset/"+r+"/"+e.split("/").reverse()[0],{apiUrl:t,method:"DELETE"})}};var r},f=function(t){return{getSentInvitations:function(r){return a("/SentInvitations/"+r,{apiUrl:t})},getMemoriInvitations:function(r,e){return a("/MemoriInvitations/"+r+"/"+e,{apiUrl:t})},getReceivedInvitations:function(r){return a("/ReceivedInvitations/"+r,{apiUrl:t})},getAllInvitations:function(r){return a("/AllInvitations/"+r,{apiUrl:t})},getInvitation:function(r,e){return a("/Invitation/"+r+"/"+e,{apiUrl:t})},updateInvitation:function(r,e){return a("/Invitation/"+r+"/"+e.invitationID,{apiUrl:t,method:"PATCH",body:e})},deleteInvitation:function(r,e){return a("/Invitation/"+r+"/"+e,{apiUrl:t,method:"DELETE"})},acceptInvitation:function(r,e){return a("/AcceptInvitation/"+r+"/"+e,{apiUrl:t,method:"POST"})},rejectInvitation:function(r,e){return a("/RejectInvitation/"+r+"/"+e,{apiUrl:t,method:"POST"})},sendInvitation:function(r,e){return a("/SendInvitation/"+r,{apiUrl:t,method:"POST",body:e})}}},d=function(t){return{getTenantConsumptionLogs:function(r,e,n,o,i){return a("/TenantConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getUserConsumptionLogs:function(r,e,n,o,i){return a("/UserConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})},getMemoriConsumptionLogs:function(r,e,n,o,i){return a("/MemoriConsumptionLogs/"+r+"/"+e+"/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{apiUrl:t})}}},l=function(t){return{getTenantNotifications:function(r){return a("/TenantNotifications/"+r,{apiUrl:t})},getUserNotifications:function(r){return a("/UserNotifications/"+r,{apiUrl:t})}}},h=function(t){return i({asset:p(t),memori:u(t),user:c(t),integration:s(t),invitation:f(t),consumptionLogs:d(t),notifications:l(t)},p(t),u(t),c(t),s(t),f(t),d(t),l(t))},m=function(t){return{getCorrelationPairs:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPairs/"+n+(o?"/"+o+(i?"/"+i:""):""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),postCorrelationPair:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPair/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),deleteCorrelationPair:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CorrelationPair/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i},v=function(t){return{postTextEnteredEvent:(d=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TextEnteredEvent/"+n.sessionId,{method:"POST",apiUrl:t,body:{text:n.text}}));case 2:case"end":return r.stop()}}),r)}))),function(t){return d.apply(this,arguments)}),postPlaceChangedEvent:(f=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PlaceChangedEvent/"+n.sessionId,{method:"POST",apiUrl:t,body:{placeName:n.placeName,latitude:n.latitude,longitude:n.longitude,uncertaintyKm:n.uncertaintyKm}}));case 2:case"end":return r.stop()}}),r)}))),function(t){return f.apply(this,arguments)}),postDateChangedEvent:(p=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/DateChangedEvent/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return p.apply(this,arguments)}),postTagChangedEvent:(s=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TagChangedEvent/"+n,{method:"POST",apiUrl:t,body:{tag:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return s.apply(this,arguments)}),postTimeoutEvent:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TimeoutEvent/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),postMediumSelectedEvent:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/MediumSelectedEvent/"+n,{method:"POST",apiUrl:t,body:{medium:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),postDateSelectedEvent:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/DateSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),postPlaceSelectedEvent:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PlaceSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),postTagSelectedEvent:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TagSelectedEvent/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i,u,c,s,p,f,d},y=function(t){return{importCSV:(s=o(e().mark((function r(n,o,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ImportCSV/"+n,{method:"POST",apiUrl:t,body:i({rows:o},u)}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return s.apply(this,arguments)}),importStatus:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ImportStatus/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),stopImport:(u=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/StopImport/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return u.apply(this,arguments)}),importTXT:(n=o(e().mark((function r(n,o,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ImportTXT/"+n,{method:"POST",apiUrl:t,body:i({rows:o},u)}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),exportCSV:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ImportExport/ExportCSV/"+n,{method:"POST",apiUrl:t,body:o,text:!0}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,u,c,s},w=function(t){return{getIntents:(l=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intents/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return l.apply(this,arguments)}),getIntent:(d=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return d.apply(this,arguments)}),patchIntent:(f=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o.intentID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return f.apply(this,arguments)}),deleteIntent:(p=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return p.apply(this,arguments)}),createIntent:(s=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Intent/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return s.apply(this,arguments)}),getIntentSlots:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlots/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getIntentSlot:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchIntentSlot:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o.intentSlotID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deleteIntentSlot:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),createIntentSlot:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/IntentSlot/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c,s,p,f,d,l},g=function(t){return{getLocalizationKeys:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKeys/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getLocalizationKey:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteLocalizationKey:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postLocalizationKey:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),patchLocalizationKey:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/LocalizationKey/"+n,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},U=function(t){return{getMedia:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Media/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),deleteMedia:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Media/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),getMedium:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),patchMedium:(n=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),deleteMedium:function(r,e,n){return a("/Medium/"+r+"/"+e+"/"+n,{method:"GET",apiUrl:t})},postMedium:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Medium/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},b=function(t){return{getMemories:(p=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memories/"+n+(o?"/"+o:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return p.apply(this,arguments)}),getMemoriesPaginated:(s=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memories/"+n+"/"+o+"/"+i+(u?"/"+u:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,n){return s.apply(this,arguments)}),getMemory:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),patchMemory:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o.memoryID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteMemory:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postMemory:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Memory/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),getMemoryAccess:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/MemoryAccess/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c,s,p},x=function(t){return{getWordVector:(c=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/WordVector/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return c.apply(this,arguments)}),getSimilarWords:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/SimilarWords/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),guessLanguage:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/GuessLanguage/"+n,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),computeSimilarity:(n=o(e().mark((function r(n,o,i,u,c){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ComputeSimilarity/"+n,{method:"POST",apiUrl:t,body:{referenceText:o,referenceTextType:i,comparisonText:u,comparisonTextType:c}}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,o,i){return n.apply(this,arguments)}),checkWords:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CheckWords/"+n,{method:"POST",apiUrl:t,body:{text:o}}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},T=function(t){return{getPeople:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/People/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getPerson:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchPerson:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o.personID,{method:"PATCH",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deletePerson:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),postPerson:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Person/"+n,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},E=function(t){return{getPromptedQuestions:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestions/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getPromptedQuestion:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),patchPromptedQuestion:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deletePromptedQuestion:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),postPromptedQuestion:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/PromptedQuestion/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i,u,c},P=function(t){return{searchMemory:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Search/"+n,{method:"POST",body:o,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postRandom:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Random/"+n,{method:"POST",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),postHints:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Hints/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i},k=function(t){return{initSession:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session",{method:"POST",body:n,apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),getSession:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),deleteSession:(r=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Session/"+n,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return r.apply(this,arguments)})};var r,n,i},S=function(t){return{getStatistics:(s=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/Statistics/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return s.apply(this,arguments)}),getContentQualityIndexes:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContentQualityIndexes/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getTextQualityIndexes:(u=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/TextQualityIndexes/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return u.apply(this,arguments)}),getEventLogs:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),getMemoryEventLogs:(n=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i+"/"+u,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e,o){return n.apply(this,arguments)}),getIntentEventLogs:(r=o(e().mark((function r(n,o,i,u){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/EventLogs/"+n+"/"+o+"/"+i+"/"+u,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e,n,o){return r.apply(this,arguments)})};var r,n,i,u,c,s},L=function(t){return{getUnansweredQuestions:(u=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestions/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return u.apply(this,arguments)}),getUnansweredQuestionsPaginated:(i=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestions/"+n+"/"+o+"/"+i,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return i.apply(this,arguments)}),postUnansweredQuestion:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestion/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),deleteUnansweredQuestion:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/UnansweredQuestion/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u},I=function(t){return{getContextVars:(i=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVars/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return i.apply(this,arguments)}),getContextVarNames:(n=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVarNames/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return n.apply(this,arguments)}),getContextVarValues:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ContextVarValues/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i},C=function(t){return{getCustomWords:(c=o(e().mark((function r(n){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWords/"+n,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t){return c.apply(this,arguments)}),getCustomWord:(u=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return u.apply(this,arguments)}),deleteCustomWord:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),postCustomWord:(n=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n,{method:"POST",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return n.apply(this,arguments)}),patchCustomWord:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/CustomWord/"+n+"/"+o.customWordID,{method:"PATCH",apiUrl:t,body:o}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u,c},M=function(t){return{getChatLogs:(u=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLogs/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return u.apply(this,arguments)}),getSessionChatLogs:(i=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/SessionChatLogs/"+n+"/"+o,{method:"GET",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r){return i.apply(this,arguments)}),deleteChatLogs:(n=o(e().mark((function r(n,o,i){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLogs/"+n+(o?"/"+o:"")+(o&&i?"/"+i:""),{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,r,e){return n.apply(this,arguments)}),deleteChatLog:(r=o(e().mark((function r(n,o){return e().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",a("/ChatLog/"+n+"/"+o,{method:"DELETE",apiUrl:t}));case 1:case"end":return r.stop()}}),r)}))),function(t,e){return r.apply(this,arguments)})};var r,n,i,u},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:"👤"},G=function(t){return{getResourceUrl:function(r){var e=r.resourceURI,n=r.sessionID,o=r.baseURL,i=void 0===o?"https://app.twincreator.com":o,a="cover"===r.type?i+"/images/memoriCover.png":i+"/images/memoriAvatar.png";return e&&0!==e.length?e.includes("memoriai/memory")?e+"?memori-ai-session-id="+n:e.startsWith("https://")||e.startsWith("http://")?e+(n?"/"+n:""):e.startsWith("cloud://")?t.replace(/v2/,"v1")+"/CloudAsset/"+e.replace("cloud://",""):e.startsWith("guid://")?t.replace(/v2/,"v1")+"/GuidAsset/"+e.replace("guid://",""):a:a}}};exports.default=function(t){var r=function(t){return t?new URL(t.startsWith("http")?t:"https://"+t).origin:"https://backend.memori.ai"}(t);return i({backend:h(r+"/api/v2")},function(t){return i({correlationPairs:m(t)},m(t),{dialog:v(t)},v(t),{importExport:y(t)},y(t),{intents:w(t)},w(t),{localizationKeys:g(t)},g(t),{media:U(t)},U(t),{memories:b(t)},b(t),{nlp:x(t)},x(t),{people:T(t)},T(t),{promptedQuestions:E(t)},E(t),{search:P(t)},P(t),{session:k(t)},k(t),{stats:S(t)},S(t),{unansweredQuestions:L(t)},L(t),{contextVars:I(t)},I(t),{customDictionary:C(t)},C(t),{chatLogs:M(t)},M(t))}(r+"/memori/v2"),{constants:O,asset:G(r+"/api/v2")})};
//# sourceMappingURL=memori-api-client.cjs.production.min.js.map

@@ -808,22 +808,5 @@ export declare type Error = {

};
export declare type ImportWarning = {
warningType: 'Existing Similar Memory' | 'Internal Error';
rowNumber?: number;
csvRow: string;
text?: string;
similarTexts?: {
text: string;
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
}[];
};
export declare type ImportReponse = {
importID: string;
importedMemories?: number;
importWarnings?: ImportWarning[];
};
export declare type ImportCSVParams = {
includedRows?: number[];
export interface ImportCSVParams {
hasHeaders?: boolean;
headerNames?: string[];
forceImport?: boolean;
questionColumnName: string;

@@ -835,4 +818,13 @@ answerColumnName: string;

questionTitleVariantsSeparator?: string;
};
export declare type ExportCSVParams = {
}
export interface ImportTxtParams {
newLinesPerParagraphs?: number;
}
export interface ImportParams {
includedRows?: number[];
forceImport?: boolean;
csvSpecs?: ImportCSVParams;
txtSpecs?: ImportTxtParams;
}
export interface ExportCSVParams {
newLine: '\n' | '\r\n';

@@ -846,2 +838,63 @@ hasHeaders?: boolean;

questionTitleVariantsSeparator?: string;
};
}
export interface ImportWarning {
warningType: 'Existing Similar Memory' | 'Internal Error';
rowNumber?: number;
row: string;
text?: string;
similarTexts?: {
text: string;
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
}[];
}
export interface ImportReponse {
importID: string;
status: {
/**
* @type {string}
* minLength: 1
* Current status of the Import process (starting, running etc.).
* May be one of the following:
* - Starting: the Import process is preparing to start, but has not started yet. Will advance to Running automatically.
* - Running: the Import process has been started and is actively processing Memory objects.
* - Stopped: the Import process has been stopped manually, not all Memory objects may have been processed.
* - Completed: the Import process finished successfully, all the Memory objects have been processed.
* - Failed: the Import process terminated due to an unexpected error, not all Memory objects may have been processed.
*/
status: 'Starting' | 'Running' | 'Stopped' | 'Completed' | 'Failed';
/**
* @type {string=}
* If the Status is Failed, reports the error that caused the Import process to fail. Null otherwise.
*/
error?: string;
/**
* @type {number}
* Progress of the Import process as a fraction of 1.
*/
progress: number;
/**
* @type {string=}
* Timestamp of start of the Import process. Null until the Import process is in Starting status.
*/
begin?: string;
/**
* @type {string=}
* Timestamp of end of the Import process. Null until the Import process is in Starting or Running status.
*/
end?: string;
/**
* @type {number=}
* Estimated time required to complete the Import process, in seconds.
*/
eta?: number;
/**
* @type {number=}
* Number of Imported Memory objects so far.
*/
importedMemories?: number;
/**
* List of Import Warning objects. May be empty.
*/
importWarnings?: ImportWarning[];
};
}
{
"version": "1.1.0",
"version": "1.2.0",
"name": "@memori.ai/memori-api-client",

@@ -4,0 +4,0 @@ "description": "React library to integrate a Memori in your app or website",

import {
ResponseSpec,
ImportReponse,
ImportCSVParams,
ExportCSVParams,
ImportParams,
} from '../types';

@@ -19,15 +19,51 @@ import { apiFetcher } from '../apiFetcher';

* @param {string} sessionId The session ID
* @param {string[]} csvRows Rows of the CSV file.
* @param {ImportCSVParams} params The specifications and content of the CSV file
* @param {string[]} rows Rows of the CSV file.
* @param {ImportParams} params The specifications and content of the CSV file
*/
importCSV: async (
importCSV: async (sessionId: string, rows: string[], params: ImportParams) =>
apiFetcher(`/ImportExport/ImportCSV/${sessionId}`, {
method: 'POST',
apiUrl,
body: {
rows,
...params,
},
}) as Promise<ResponseSpec & ImportReponse>,
/**
* Gets the status of an ongoing Import process.
* @param {string} importID The import process ID
*/
importStatus: async (importID: string) =>
apiFetcher(`/ImportExport/ImportStatus/${importID}`, {
method: 'GET',
apiUrl,
}) as Promise<ResponseSpec & ImportReponse>,
/**
* Interrupts an ongoing Import process.
* @param {string} importID The import process ID
*/
stopImport: async (importID: string) =>
apiFetcher(`/ImportExport/StopImport/${importID}`, {
method: 'POST',
apiUrl,
}) as Promise<ResponseSpec & ImportReponse>,
/**
* Imports memories from a TXT file.
* @param {string} sessionId The session ID
* @param {string[]} rows Rows of the TXT file.
* @param {ImportCSVParams} params The specifications and content of the TXT file
*/
importTXT: async (
sessionId: string,
csvRows: string[],
params: ImportCSVParams
rows: string[],
params: Omit<ImportParams, 'csvSpecs'>
) =>
apiFetcher(`/ImportExport/ImportCSV/${sessionId}`, {
apiFetcher(`/ImportExport/ImportTXT/${sessionId}`, {
method: 'POST',
apiUrl,
body: {
csvRows,
rows,
...params,

@@ -34,0 +70,0 @@ },

@@ -847,24 +847,5 @@ export declare type Error = {

export type ImportWarning = {
warningType: 'Existing Similar Memory' | 'Internal Error';
rowNumber?: number;
csvRow: string;
text?: string;
similarTexts?: {
text: string;
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
}[];
};
export type ImportReponse = {
importID: string;
importedMemories?: number;
importWarnings?: ImportWarning[];
};
export type ImportCSVParams = {
includedRows?: number[];
export interface ImportCSVParams {
hasHeaders?: boolean;
headerNames?: string[];
forceImport?: boolean;
questionColumnName: string;

@@ -876,5 +857,15 @@ answerColumnName: string;

questionTitleVariantsSeparator?: string;
};
}
export type ExportCSVParams = {
export interface ImportTxtParams {
newLinesPerParagraphs?: number;
}
export interface ImportParams {
includedRows?: number[];
forceImport?: boolean;
csvSpecs?: ImportCSVParams;
txtSpecs?: ImportTxtParams;
}
export interface ExportCSVParams {
newLine: '\n' | '\r\n';

@@ -888,2 +879,66 @@ hasHeaders?: boolean;

questionTitleVariantsSeparator?: string;
};
}
export interface ImportWarning {
warningType: 'Existing Similar Memory' | 'Internal Error';
rowNumber?: number;
row: string;
text?: string;
similarTexts?: {
text: string;
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
}[];
}
export interface ImportReponse {
importID: string;
status: {
/**
* @type {string}
* minLength: 1
* Current status of the Import process (starting, running etc.).
* May be one of the following:
* - Starting: the Import process is preparing to start, but has not started yet. Will advance to Running automatically.
* - Running: the Import process has been started and is actively processing Memory objects.
* - Stopped: the Import process has been stopped manually, not all Memory objects may have been processed.
* - Completed: the Import process finished successfully, all the Memory objects have been processed.
* - Failed: the Import process terminated due to an unexpected error, not all Memory objects may have been processed.
*/
status: 'Starting' | 'Running' | 'Stopped' | 'Completed' | 'Failed';
/**
* @type {string=}
* If the Status is Failed, reports the error that caused the Import process to fail. Null otherwise.
*/
error?: string;
/**
* @type {number}
* Progress of the Import process as a fraction of 1.
*/
progress: number;
/**
* @type {string=}
* Timestamp of start of the Import process. Null until the Import process is in Starting status.
*/
begin?: string;
/**
* @type {string=}
* Timestamp of end of the Import process. Null until the Import process is in Starting or Running status.
*/
end?: string;
/**
* @type {number=}
* Estimated time required to complete the Import process, in seconds.
*/
eta?: number;
/**
* @type {number=}
* Number of Imported Memory objects so far.
*/
importedMemories?: number;
/**
* List of Import Warning objects. May be empty.
*/
importWarnings?: ImportWarning[];
};
}

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