"use strict";exports.ids=["778"],exports.modules={39495:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createEntry=void 0;var i=n(92431);t.createEntry=e=>{let{table:t,entityName:n}=e;return(0,i.createEntity)({name:n,table:t,attributes:{PK:{type:"string",partitionKey:!0},SK:{type:"string",sortKey:!0},index:{type:"string"},data:{type:"map"},TYPE:{type:"string"}}})}},92959:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i={getDocumentClient:!0};Object.defineProperty(t,"getDocumentClient",{enumerable:!0,get:function(){return r.getDocumentClient}});var r=n(56333),s=n(20649);Object.keys(s).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(i,e))&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))})},20649:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createTable=void 0;var i=n(31472);t.createTable=({documentClient:e})=>{let t={name:process.env.DB_TABLE_ELASTICSEARCH,partitionKey:"PK",sortKey:"SK",DocumentClient:e,autoExecute:!0,autoParse:!0};return new i.Table(t)}},64196:function(e,t,n){t.Manager=void 0;var i=n(56333),r=n(41764),s=n(92959),a=n(39495),o=n(92431);t.Manager=class{entities={};constructor(e){this.context=e.context,this.documentClient=e?.documentClient||(0,i.getDocumentClient)(),this.elasticsearch=e?.elasticsearchClient||e.context.elasticsearch||(0,r.createElasticsearchClient)({endpoint:`https://${process.env.ELASTIC_SEARCH_ENDPOINT}`}),this.table=(0,s.createTable)({documentClient:this.documentClient}),this.isCloseToTimeout=()=>e.isCloseToTimeout(),this.isAborted=()=>e.isAborted(),this.response=e.response,this.store=e.store,this.timer=e.timer}getEntity(e){return this.entities[e]?this.entities[e]:this.entities[e]=(0,a.createEntry)({table:this.table,entityName:e})}async read(e){return await (0,o.batchReadAll)({table:this.table,items:e})}}}};
//# sourceMappingURL=Manager.584f4f81.chunk.js.map