@lovrabet/dataset-mcp-server 1.0.9 → 1.0.11-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/dataset-analyzer.js +1 -1
- package/dist/api/cache.js +1 -1
- package/dist/api/dev-api-client.js +1 -1
- package/dist/auth/constants.js +1 -1
- package/dist/auth/cookie-manager.js +1 -1
- package/dist/auth/session-validator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/generate-sdk-code.js +1 -1
- package/dist/tools/get-dataset-detail.js +1 -1
- package/dist/tools/get-operation-detail.js +1 -1
- package/dist/tools/get-operations.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/list-datasets.js +1 -1
- package/dist/tools/list-sql-queries.js +1 -0
- package/dist/tools/login.js +1 -1
- package/dist/tools/search-datasets.js +1 -1
- package/package.json +2 -2
- package/dist/tools/generate-sql-code.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x52fa0d=a0_0x3232;(function(_0x44c683,_0x4625b8){const _0x5a90c3=a0_0x3232,_0x18b914=_0x44c683();while(!![]){try{const _0x502885=parseInt(_0x5a90c3(0x1f8))/0x1+parseInt(_0x5a90c3(0x1dc))/0x2+-parseInt(_0x5a90c3(0x1de))/0x3*(parseInt(_0x5a90c3(0x1d3))/0x4)+-parseInt(_0x5a90c3(0x1e9))/0x5+parseInt(_0x5a90c3(0x1e5))/0x6+parseInt(_0x5a90c3(0x1c1))/0x7+-parseInt(_0x5a90c3(0x1cf))/0x8;if(_0x502885===_0x4625b8)break;else _0x18b914['push'](_0x18b914['shift']());}catch(_0x3f49c3){_0x18b914['push'](_0x18b914['shift']());}}}(a0_0x2de5,0xd5ed4));function a0_0x2de5(){const _0xba55c4=['source','has','compareDatasets','getOperationDetail','getFieldList','datasetCode','join','isEnum','getTableName','7366849vgNllK','isRequired','**Dataset\x20Code:**\x20','sdkCall','Fields:\x20+','\x20|\x20','slice','analyzeDatasetDetail','usageExample','analyzeDatasetList','**Table\x20Key:**\x20','tableData','responseExample','getEnabledOperationAnalyses','8092024nFJtNR','getEnumMeta','filter','description','136pAWWwJ','data','analyzeDatasetItem','options','##\x20SDK\x20Usage\x0a\x0a','enumSource','all','getTableKey','length','3106790lvaHHu','map','132330lSEjTh','\x0a```\x0a','from','getOperationCount','toPascalCase','##\x20Fields\x0a\x0a','autoIncrement','5018880zGARXZ','getOperationAnalysis','toArray','toUpperCase','6192825mWBZXs','includes','##\x20Operations\x0a\x0a','toLowerCase','-\x20**Method:**\x20','operations','fullUrl','requestExample','fields','generateFullSDKExample','```\x0a','path','enumOptions','updateTime','values','1183770ipozoT','###\x20','generateSDKInitCode','tableName','added','-\x20**Full\x20URL:**\x20','name','\x20total)','selectItemsSource','enabled','isVirtualTable','Operations:\x20+','type','method','forEach','stringify','enumValues','getOperationDocMeta','getCount','\x20|\x0a','```typescript\x0a','requestFields','code','**Table\x20Name:**\x20','displayName'];a0_0x2de5=function(){return _0xba55c4;};return a0_0x2de5();}import{DatasetList,DrivenDataDetailPlus}from'@lovrabet/dsparser';function a0_0x3232(_0x165483,_0x4f6a47){const _0x2de5b6=a0_0x2de5();return a0_0x3232=function(_0x3232d1,_0x1949ab){_0x3232d1=_0x3232d1-0x1b5;let _0x894384=_0x2de5b6[_0x3232d1];return _0x894384;},a0_0x3232(_0x165483,_0x4f6a47);}export class DatasetAnalyzer{[a0_0x52fa0d(0x1ca)](_0xcd9db1){const _0x5923c8=a0_0x52fa0d,_0x5477b6=_0xcd9db1[_0x5923c8(0x1d4)]?.[_0x5923c8(0x1cc)]||_0xcd9db1['tableData']||_0xcd9db1,_0x5ddfc2=new DatasetList(_0x5477b6);return{'total':_0x5ddfc2[_0x5923c8(0x20a)](),'datasets':_0x5ddfc2[_0x5923c8(0x1e7)]()[_0x5923c8(0x1dd)](_0x183613=>this[_0x5923c8(0x1d5)](_0x183613))};}[a0_0x52fa0d(0x1d5)](_0x1e45de){const _0x135cb8=a0_0x52fa0d;return{'id':_0x1e45de['id']||0x0,'name':_0x1e45de['name']||'','code':_0x1e45de[_0x135cb8(0x1bd)]||'','tableName':_0x1e45de['getTableName']?.()||_0x1e45de[_0x135cb8(0x1fb)]||'','source':_0x1e45de[_0x135cb8(0x1b8)]||'','description':_0x1e45de[_0x135cb8(0x1d2)]||'','isVirtual':_0x1e45de[_0x135cb8(0x202)]?.()||![]};}[a0_0x52fa0d(0x1c8)](_0x393de2){const _0x347f2a=a0_0x52fa0d,_0x33907d=_0x393de2[_0x347f2a(0x1d4)]||_0x393de2,_0x3ff0f0=new DrivenDataDetailPlus(_0x33907d),_0x164e46={'name':_0x3ff0f0[_0x347f2a(0x1fe)],'code':_0x3ff0f0[_0x347f2a(0x1bd)],'tableName':_0x3ff0f0[_0x347f2a(0x1c0)](),'tableKey':_0x3ff0f0['getTableKey']()},_0x320c91=_0x3ff0f0[_0x347f2a(0x1bc)](),_0xac1459=_0x320c91[_0x347f2a(0x1d9)]()[_0x347f2a(0x1dd)](_0x2b1c22=>{const _0x1574c7=_0x347f2a,_0x23dd3f=_0x2b1c22['extend'],_0x2cff0d={'name':_0x2b1c22['name'],'type':_0x2b1c22[_0x1574c7(0x204)],'required':_0x2b1c22[_0x1574c7(0x1c2)](),'primaryKey':_0x2b1c22['isPrimaryKey'](),'description':_0x2b1c22[_0x1574c7(0x1d2)]||'','autoIncrement':Boolean(_0x23dd3f[_0x1574c7(0x1e4)]),'createTime':Boolean(_0x23dd3f['createTime']),'updateTime':Boolean(_0x23dd3f[_0x1574c7(0x1f6)])};if(_0x2b1c22[_0x1574c7(0x1bf)]()){const _0x1b747c=_0x2b1c22[_0x1574c7(0x1d0)]();if(_0x1b747c){_0x2cff0d['isEnum']=!![],_0x2cff0d[_0x1574c7(0x208)]=_0x1b747c[_0x1574c7(0x1f7)];if(_0x1b747c[_0x1574c7(0x1d6)]&&_0x1b747c['options'][_0x1574c7(0x1db)]>0x0)_0x2cff0d[_0x1574c7(0x1f5)]=_0x1b747c[_0x1574c7(0x1d6)];else _0x1b747c[_0x1574c7(0x200)]&&(_0x2cff0d[_0x1574c7(0x1d8)]=_0x1b747c[_0x1574c7(0x200)]);}}return _0x2cff0d;}),_0x3e3756=_0x3ff0f0[_0x347f2a(0x1ce)]()[_0x347f2a(0x1dd)](_0x89724e=>{const _0x29fe98=_0x347f2a,_0x1c628c={'name':_0x89724e[_0x29fe98(0x1fe)],'displayName':_0x89724e[_0x29fe98(0x1b7)],'type':_0x89724e['type'],'method':_0x89724e[_0x29fe98(0x205)],'path':_0x89724e['path'],'requestFields':_0x89724e[_0x29fe98(0x20d)],'requestFieldsCount':_0x89724e[_0x29fe98(0x20d)]['length'],'requestExample':_0x89724e[_0x29fe98(0x1f0)],'responseExample':_0x89724e[_0x29fe98(0x1cd)],'enabled':_0x89724e[_0x29fe98(0x201)],'fullUrl':_0x89724e['fullUrl']};return _0x1c628c;});return{'basic':_0x164e46,'fields':_0xac1459,'operations':_0x3e3756,'supportsCRUD':_0x3ff0f0['supportsCRUD'](),'fieldCount':_0x3ff0f0['getFieldCount'](),'operationCount':_0x3ff0f0[_0x347f2a(0x1e1)](),'enabledOperationCount':_0x3e3756['length']};}[a0_0x52fa0d(0x1bb)](_0x26a4a2,_0xa34ad5){const _0x1d8850=a0_0x52fa0d,_0x3989b4=_0x26a4a2['data']||_0x26a4a2,_0x4f5d36=new DrivenDataDetailPlus(_0x3989b4),_0x54c833=_0x4f5d36[_0x1d8850(0x1e6)](_0xa34ad5);if(!_0x54c833)return null;return{'name':_0x54c833['name'],'displayName':_0x54c833[_0x1d8850(0x1b7)],'type':_0x54c833[_0x1d8850(0x204)],'method':_0x54c833[_0x1d8850(0x205)],'path':_0x54c833[_0x1d8850(0x1f4)],'requestFields':_0x54c833['requestFields'],'requestFieldsCount':_0x54c833[_0x1d8850(0x20d)][_0x1d8850(0x1db)],'requestExample':_0x54c833[_0x1d8850(0x1f0)],'responseExample':_0x54c833['responseExample'],'enabled':_0x54c833[_0x1d8850(0x201)],'fullUrl':_0x54c833[_0x1d8850(0x1ef)]};}['generateSDKCode'](_0x4bb1ed,_0x344421,_0x4e35bf,_0x4c6942='online'){const _0x3f10af=a0_0x52fa0d,_0x30c674=_0x4bb1ed[_0x3f10af(0x1d4)]||_0x4bb1ed,_0x3b8b56=new DrivenDataDetailPlus(_0x30c674),_0x3e1c9b=_0x3b8b56[_0x3f10af(0x209)](_0x344421);if(!_0x3e1c9b)return null;const _0x3b093e=_0x3b8b56[_0x3f10af(0x1da)](),_0x2a6cde=_0x3b8b56[_0x3f10af(0x1c0)](),_0x5ac6c0=this[_0x3f10af(0x1e2)](_0x2a6cde),_0x26db7b=_0x3b8b56[_0x3f10af(0x1e6)](_0x344421),_0x277155=_0x3b8b56[_0x3f10af(0x1f2)](_0x344421,_0x4e35bf);return{'code':_0x3e1c9b[_0x3f10af(0x1c4)][_0x3f10af(0x1b5)],'sdkCallInfo':{'modelName':_0x5ac6c0,'tableName':_0x2a6cde,'tableKey':_0x3b093e,'datasetCode':_0x3b8b56['datasetCode'],'operationName':_0x344421},'requestExample':_0x26db7b?.['requestExample'],'responseExample':_0x26db7b?.[_0x3f10af(0x1cd)],'sdkInitCode':_0x3b8b56['generateSDKInitCode'](_0x3b093e),'usageExample':_0x3e1c9b[_0x3f10af(0x1c9)],'fullExample':_0x277155||undefined};}['generateApiDoc'](_0x120324){const _0x299b5c=a0_0x52fa0d,_0x173d42=_0x120324[_0x299b5c(0x1d4)]||_0x120324,_0x587fb9=new DrivenDataDetailPlus(_0x173d42),_0x380e61=_0x587fb9[_0x299b5c(0x1ce)]()['map'](_0x1ea4ea=>({'name':_0x1ea4ea['name'],'displayName':_0x1ea4ea[_0x299b5c(0x1b7)],'description':_0x1ea4ea[_0x299b5c(0x1b7)]+'\x20operation\x20for\x20'+_0x587fb9['name'],'method':_0x1ea4ea[_0x299b5c(0x205)],'path':_0x1ea4ea['path'],'requestParams':_0x1ea4ea['requestFields'],'requestExample':JSON['stringify'](_0x1ea4ea[_0x299b5c(0x1f0)],null,0x2),'responseExample':JSON[_0x299b5c(0x207)](_0x1ea4ea[_0x299b5c(0x1cd)],null,0x2)}));return{'datasetName':_0x587fb9[_0x299b5c(0x1fe)],'tableName':_0x587fb9['getTableName'](),'operations':_0x380e61};}['searchDatasets'](_0x4e7c2b,_0x62a3f){const _0x6c6f6e=a0_0x52fa0d,_0x49c8da=new DatasetList(_0x4e7c2b),_0x33bd67=_0x62a3f[_0x6c6f6e(0x1ec)]();return _0x49c8da[_0x6c6f6e(0x1e7)]()[_0x6c6f6e(0x1d1)](_0x18b756=>{const _0x2fe7bc=_0x6c6f6e,_0x5a3712=(_0x18b756['name']||'')[_0x2fe7bc(0x1ec)]()['includes'](_0x33bd67),_0x3fadcd=(_0x18b756['getTableName']?.()||_0x18b756['tableName']||'')[_0x2fe7bc(0x1ec)]()[_0x2fe7bc(0x1ea)](_0x33bd67),_0x1c1376=(_0x18b756[_0x2fe7bc(0x1bd)]||'')[_0x2fe7bc(0x1ec)]()['includes'](_0x33bd67),_0x3bc424=(_0x18b756[_0x2fe7bc(0x1d2)]||'')[_0x2fe7bc(0x1ec)]()[_0x2fe7bc(0x1ea)](_0x33bd67);return _0x5a3712||_0x3fadcd||_0x1c1376||_0x3bc424;})['map'](_0x37762d=>this['analyzeDatasetItem'](_0x37762d));}['generateMarkdownDoc'](_0x17448c){const _0x267e07=a0_0x52fa0d,_0x543d8b=_0x17448c[_0x267e07(0x1d4)]||_0x17448c,_0x31ae66=new DrivenDataDetailPlus(_0x543d8b);let _0x8bd26d='#\x20'+_0x31ae66['name']+'\x0a\x0a';_0x8bd26d+=_0x267e07(0x1c3)+_0x31ae66[_0x267e07(0x1bd)]+'\x0a',_0x8bd26d+=_0x267e07(0x1b6)+_0x31ae66[_0x267e07(0x1c0)]()+'\x0a',_0x8bd26d+=_0x267e07(0x1cb)+_0x31ae66[_0x267e07(0x1da)]()+'\x0a\x0a',_0x8bd26d+=_0x267e07(0x1e3);const _0xe49c4a=_0x31ae66[_0x267e07(0x1bc)]();_0xe49c4a[_0x267e07(0x1db)]>0x0&&(_0x8bd26d+='|\x20Field\x20Name\x20|\x20Code\x20|\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a',_0x8bd26d+='|------------|------|------|----------|-------------|-------------|-------------|\x0a',_0xe49c4a[_0x267e07(0x1d9)]()[_0x267e07(0x206)](_0x19d50b=>{const _0x2bdb92=_0x267e07;let _0xb4ecb5='';if(_0x19d50b['isEnum']()){const _0x44ffa4=_0x19d50b[_0x2bdb92(0x1d0)]();if(_0x44ffa4&&_0x44ffa4['values'][_0x2bdb92(0x1db)]>0x0){const _0xa088da=_0x44ffa4['values'][_0x2bdb92(0x1c7)](0x0,0x5);_0xb4ecb5=_0xa088da[_0x2bdb92(0x1be)](',\x20'),_0x44ffa4[_0x2bdb92(0x1f7)]['length']>0x5&&(_0xb4ecb5+='\x20...\x20('+_0x44ffa4[_0x2bdb92(0x1f7)][_0x2bdb92(0x1db)]+_0x2bdb92(0x1ff));}}_0x8bd26d+='|\x20'+_0x19d50b[_0x2bdb92(0x1fe)]+_0x2bdb92(0x1c6)+_0x19d50b['code']+'\x20|\x20'+_0x19d50b[_0x2bdb92(0x204)]+_0x2bdb92(0x1c6)+(_0x19d50b[_0x2bdb92(0x1c2)]()?'✅':'')+'\x20|\x20'+(_0x19d50b['isPrimaryKey']()?'🔑':'')+_0x2bdb92(0x1c6)+_0xb4ecb5+'\x20|\x20'+(_0x19d50b[_0x2bdb92(0x1d2)]||'')+_0x2bdb92(0x20b);}),_0x8bd26d+='\x0a');_0x8bd26d+=_0x267e07(0x1eb);const _0x4dbe4f=_0x31ae66['getEnabledOperationAnalyses']();_0x4dbe4f[_0x267e07(0x206)](_0x4a41f8=>{const _0x331592=_0x267e07;_0x8bd26d+=_0x331592(0x1f9)+_0x4a41f8[_0x331592(0x1b7)]+'\x20('+_0x4a41f8[_0x331592(0x1fe)]+')\x0a\x0a',_0x8bd26d+=_0x331592(0x1ed)+_0x4a41f8['method']+'\x0a',_0x8bd26d+='-\x20**Path:**\x20'+_0x4a41f8[_0x331592(0x1f4)]+'\x0a',_0x4a41f8[_0x331592(0x1ef)]&&(_0x8bd26d+=_0x331592(0x1fd)+_0x4a41f8['fullUrl']+'\x0a'),_0x4a41f8[_0x331592(0x20d)]&&_0x4a41f8['requestFields'][_0x331592(0x1db)]>0x0&&(_0x8bd26d+='-\x20**Request\x20Fields:**\x20'+_0x4a41f8[_0x331592(0x20d)][_0x331592(0x1be)](',\x20')+'\x0a'),_0x4a41f8[_0x331592(0x1f0)]&&(_0x8bd26d+='\x0a**Request\x20Example:**\x0a```json\x0a'+JSON[_0x331592(0x207)](_0x4a41f8[_0x331592(0x1f0)],null,0x2)+_0x331592(0x1df)),_0x4a41f8['responseExample']&&(_0x8bd26d+='\x0a**Response\x20Example:**\x0a```json\x0a'+JSON[_0x331592(0x207)](_0x4a41f8[_0x331592(0x1cd)],null,0x2)+_0x331592(0x1df)),_0x8bd26d+='\x0a';});const _0x1b8720=_0x31ae66[_0x267e07(0x1da)](),_0x32808d=_0x31ae66[_0x267e07(0x1fa)](_0x1b8720);return _0x32808d&&(_0x8bd26d+=_0x267e07(0x1d7),_0x8bd26d+=_0x267e07(0x20c),_0x8bd26d+=_0x32808d,_0x8bd26d+=_0x267e07(0x1f3)),_0x8bd26d;}[a0_0x52fa0d(0x1ba)](_0x265737,_0x3f3ec4){const _0x47f960=a0_0x52fa0d,_0x5eda3b=_0x265737[_0x47f960(0x1d4)]||_0x265737,_0x3a0e29=_0x3f3ec4[_0x47f960(0x1d4)]||_0x3f3ec4,_0x176296=new DrivenDataDetailPlus(_0x5eda3b),_0x43906d=new DrivenDataDetailPlus(_0x3a0e29),_0x3748ca=new Set(_0x176296[_0x47f960(0x1bc)]()[_0x47f960(0x1d9)]()[_0x47f960(0x1dd)](_0x4d1455=>_0x4d1455[_0x47f960(0x1fe)])),_0x56ed9a=new Set(_0x43906d[_0x47f960(0x1bc)]()[_0x47f960(0x1d9)]()[_0x47f960(0x1dd)](_0x10e256=>_0x10e256[_0x47f960(0x1fe)])),_0x4720e5=new Set(_0x176296['getEnabledOperationAnalyses']()[_0x47f960(0x1dd)](_0x430cf2=>_0x430cf2['name'])),_0x1453a0=new Set(_0x43906d[_0x47f960(0x1ce)]()[_0x47f960(0x1dd)](_0x356418=>_0x356418['name'])),_0x394130={'fields':{'added':Array[_0x47f960(0x1e0)](_0x56ed9a)[_0x47f960(0x1d1)](_0x351c4d=>!_0x3748ca[_0x47f960(0x1b9)](_0x351c4d)),'removed':Array[_0x47f960(0x1e0)](_0x3748ca)[_0x47f960(0x1d1)](_0x16cdec=>!_0x56ed9a[_0x47f960(0x1b9)](_0x16cdec)),'modified':[]},'operations':{'added':Array[_0x47f960(0x1e0)](_0x1453a0)[_0x47f960(0x1d1)](_0x2769d6=>!_0x4720e5[_0x47f960(0x1b9)](_0x2769d6)),'removed':Array[_0x47f960(0x1e0)](_0x4720e5)[_0x47f960(0x1d1)](_0x1f9703=>!_0x1453a0[_0x47f960(0x1b9)](_0x1f9703))}},_0x228efb=_0x47f960(0x1c5)+_0x394130[_0x47f960(0x1f1)][_0x47f960(0x1fc)][_0x47f960(0x1db)]+'/-'+_0x394130[_0x47f960(0x1f1)]['removed'][_0x47f960(0x1db)]+',\x20'+(_0x47f960(0x203)+_0x394130[_0x47f960(0x1ee)][_0x47f960(0x1fc)][_0x47f960(0x1db)]+'/-'+_0x394130[_0x47f960(0x1ee)]['removed'][_0x47f960(0x1db)]);return{'differences':_0x394130,'summary':_0x228efb};}[a0_0x52fa0d(0x1e2)](_0x223ede){const _0xe7f56f=a0_0x52fa0d;return _0x223ede['replace'](/[-_\s]+(.)?/g,(_0x1cfa71,_0x9f084d)=>_0x9f084d?_0x9f084d[_0xe7f56f(0x1e8)]():'')['replace'](/^(.)/,(_0x693d33,_0x5c5cd0)=>_0x5c5cd0[_0xe7f56f(0x1e8)]());}}
|
|
1
|
+
const a0_0x1f2736=a0_0x55ff;function a0_0x1c6f(){const _0x506dea=['enumOptions','609625tKyyXl','getOperationDocMeta','usageExample','removed','350283iOrbEp','join','fields','options','**Table\x20Key:**\x20','updateTime','Fields:\x20+','code','includes','from','filter','###\x20','-\x20**Full\x20URL:**\x20','4500090kywfnE','**Dataset\x20Code:**\x20','type','all','searchDatasets','description','name','replace','operations','forEach','generateMarkdownDoc','\x0a**Response\x20Example:**\x0a```json\x0a','-\x20**Request\x20Fields:**\x20','36ICessS','requestExample','sdkCall','responseExample','tableName','28FmPnvq','fullUrl','101186yzUfjM','|\x20Field\x20Name\x20|\x20Code\x20|\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a','##\x20SDK\x20Usage\x0a\x0a','selectItemsSource','getEnabledOperationAnalyses','requestFields','\x20|\x20','extend','9537930srBVfN','analyzeDatasetItem','generateFullSDKExample','getOperationAnalysis','isEnum','getFieldList','generateSDKInitCode','\x0a```\x0a','method','isVirtualTable','autoIncrement','analyzeDatasetList','added','supportsCRUD','enabled','7WxTEpY','generateApiDoc','isRequired','length','data','tableData','-\x20**Method:**\x20','getCount','##\x20Fields\x0a\x0a','897854JKHeZO','getFieldCount','\x20total)','has','stringify','toPascalCase','compareDatasets','toLowerCase','path','\x0a**Request\x20Example:**\x0a```json\x0a','getTableName','slice','Operations:\x20+','isPrimaryKey','toArray','```typescript\x0a','values','online','map','getOperationDetail','getEnumMeta','getOperationCount','createTime','getTableKey','6371984BIAKSg','toUpperCase','datasetCode','-\x20**Path:**\x20','\x20|\x0a','displayName','**Table\x20Name:**\x20'];a0_0x1c6f=function(){return _0x506dea;};return a0_0x1c6f();}(function(_0x2b836c,_0x250d45){const _0x8dc27d=a0_0x55ff,_0x4051d9=_0x2b836c();while(!![]){try{const _0x4bb171=-parseInt(_0x8dc27d(0xb8))/0x1+parseInt(_0x8dc27d(0x98))/0x2+parseInt(_0x8dc27d(0xdc))/0x3*(parseInt(_0x8dc27d(0x96))/0x4)+-parseInt(_0x8dc27d(0xd8))/0x5*(parseInt(_0x8dc27d(0xf6))/0x6)+parseInt(_0x8dc27d(0xaf))/0x7*(parseInt(_0x8dc27d(0xd0))/0x8)+-parseInt(_0x8dc27d(0xe9))/0x9+parseInt(_0x8dc27d(0xa0))/0xa;if(_0x4bb171===_0x250d45)break;else _0x4051d9['push'](_0x4051d9['shift']());}catch(_0x334283){_0x4051d9['push'](_0x4051d9['shift']());}}}(a0_0x1c6f,0x7755d));import{DatasetList,DrivenDataDetailPlus}from'@lovrabet/dsparser';function a0_0x55ff(_0x416b49,_0x418116){const _0x1c6fc8=a0_0x1c6f();return a0_0x55ff=function(_0x55ff01,_0x4bd412){_0x55ff01=_0x55ff01-0x92;let _0x18f50f=_0x1c6fc8[_0x55ff01];return _0x18f50f;},a0_0x55ff(_0x416b49,_0x418116);}export class DatasetAnalyzer{[a0_0x1f2736(0xab)](_0x37f1f1){const _0x1f7154=a0_0x1f2736,_0x8a9fc1=_0x37f1f1[_0x1f7154(0xb3)]?.['tableData']||_0x37f1f1[_0x1f7154(0xb4)]||_0x37f1f1,_0x3f317c=new DatasetList(_0x8a9fc1);return{'total':_0x3f317c[_0x1f7154(0xb6)](),'datasets':_0x3f317c[_0x1f7154(0xc6)]()[_0x1f7154(0xca)](_0x451a24=>this['analyzeDatasetItem'](_0x451a24))};}[a0_0x1f2736(0xa1)](_0x33fa28){const _0x4ac186=a0_0x1f2736;return{'id':_0x33fa28['id']||0x0,'name':_0x33fa28['name']||'','code':_0x33fa28[_0x4ac186(0xd2)]||'','tableName':_0x33fa28[_0x4ac186(0xc2)]?.()||_0x33fa28[_0x4ac186(0x95)]||'','source':_0x33fa28['source']||'','description':_0x33fa28[_0x4ac186(0xee)]||'','isVirtual':_0x33fa28[_0x4ac186(0xa9)]?.()||![]};}['analyzeDatasetDetail'](_0x42f0d8){const _0xc8da1b=a0_0x1f2736,_0x12e1f3=_0x42f0d8[_0xc8da1b(0xb3)]||_0x42f0d8,_0x5bfa64=new DrivenDataDetailPlus(_0x12e1f3),_0x551543={'name':_0x5bfa64[_0xc8da1b(0xef)],'code':_0x5bfa64[_0xc8da1b(0xd2)],'tableName':_0x5bfa64[_0xc8da1b(0xc2)](),'tableKey':_0x5bfa64[_0xc8da1b(0xcf)]()},_0x4d96e4=_0x5bfa64['getFieldList'](),_0xdd225b=_0x4d96e4[_0xc8da1b(0xec)]()[_0xc8da1b(0xca)](_0x5dad66=>{const _0x430b59=_0xc8da1b,_0x7d324c=_0x5dad66[_0x430b59(0x9f)],_0x531608={'name':_0x5dad66[_0x430b59(0xef)],'type':_0x5dad66[_0x430b59(0xeb)],'required':_0x5dad66[_0x430b59(0xb1)](),'primaryKey':_0x5dad66[_0x430b59(0xc5)](),'description':_0x5dad66[_0x430b59(0xee)]||'','autoIncrement':Boolean(_0x7d324c[_0x430b59(0xaa)]),'createTime':Boolean(_0x7d324c[_0x430b59(0xce)]),'updateTime':Boolean(_0x7d324c[_0x430b59(0xe1)])};if(_0x5dad66[_0x430b59(0xa4)]()){const _0x5f06be=_0x5dad66[_0x430b59(0xcc)]();if(_0x5f06be){_0x531608[_0x430b59(0xa4)]=!![],_0x531608['enumValues']=_0x5f06be[_0x430b59(0xc8)];if(_0x5f06be[_0x430b59(0xdf)]&&_0x5f06be[_0x430b59(0xdf)]['length']>0x0)_0x531608[_0x430b59(0xd7)]=_0x5f06be[_0x430b59(0xdf)];else _0x5f06be['selectItemsSource']&&(_0x531608['enumSource']=_0x5f06be[_0x430b59(0x9b)]);}}return _0x531608;}),_0x37e4ae=_0x5bfa64[_0xc8da1b(0x9c)]()[_0xc8da1b(0xca)](_0x452721=>{const _0xa2d582=_0xc8da1b,_0x216f22={'name':_0x452721['name'],'displayName':_0x452721[_0xa2d582(0xd5)],'type':_0x452721[_0xa2d582(0xeb)],'method':_0x452721['method'],'path':_0x452721[_0xa2d582(0xc0)],'requestFields':_0x452721[_0xa2d582(0x9d)],'requestFieldsCount':_0x452721['requestFields']['length'],'requestExample':_0x452721['requestExample'],'responseExample':_0x452721[_0xa2d582(0x94)],'enabled':_0x452721[_0xa2d582(0xae)],'fullUrl':_0x452721[_0xa2d582(0x97)]};return _0x216f22;});return{'basic':_0x551543,'fields':_0xdd225b,'operations':_0x37e4ae,'supportsCRUD':_0x5bfa64[_0xc8da1b(0xad)](),'fieldCount':_0x5bfa64[_0xc8da1b(0xb9)](),'operationCount':_0x5bfa64[_0xc8da1b(0xcd)](),'enabledOperationCount':_0x37e4ae[_0xc8da1b(0xb2)]};}[a0_0x1f2736(0xcb)](_0x295995,_0x5093ba){const _0x5b025a=a0_0x1f2736,_0x13cf8b=_0x295995[_0x5b025a(0xb3)]||_0x295995,_0x4d8bb9=new DrivenDataDetailPlus(_0x13cf8b),_0x383d52=_0x4d8bb9[_0x5b025a(0xa3)](_0x5093ba);if(!_0x383d52)return null;return{'name':_0x383d52[_0x5b025a(0xef)],'displayName':_0x383d52[_0x5b025a(0xd5)],'type':_0x383d52[_0x5b025a(0xeb)],'method':_0x383d52[_0x5b025a(0xa8)],'path':_0x383d52[_0x5b025a(0xc0)],'requestFields':_0x383d52['requestFields'],'requestFieldsCount':_0x383d52[_0x5b025a(0x9d)][_0x5b025a(0xb2)],'requestExample':_0x383d52['requestExample'],'responseExample':_0x383d52[_0x5b025a(0x94)],'enabled':_0x383d52[_0x5b025a(0xae)],'fullUrl':_0x383d52[_0x5b025a(0x97)]};}['generateSDKCode'](_0x2bed47,_0x41075f,_0x4c811e,_0xee4b2=a0_0x1f2736(0xc9)){const _0xdff818=a0_0x1f2736,_0x580c74=_0x2bed47[_0xdff818(0xb3)]||_0x2bed47,_0x34b74c=new DrivenDataDetailPlus(_0x580c74),_0x50da71=_0x34b74c[_0xdff818(0xd9)](_0x41075f);if(!_0x50da71)return null;const _0x37924b=_0x34b74c[_0xdff818(0xcf)](),_0x6d37c3=_0x34b74c[_0xdff818(0xc2)](),_0x16677c=this[_0xdff818(0xbd)](_0x6d37c3),_0x99a427=_0x34b74c[_0xdff818(0xa3)](_0x41075f),_0x25ba8e=_0x34b74c[_0xdff818(0xa2)](_0x41075f,_0x4c811e);return{'code':_0x50da71[_0xdff818(0x93)][_0xdff818(0xe3)],'sdkCallInfo':{'modelName':_0x16677c,'tableName':_0x6d37c3,'tableKey':_0x37924b,'datasetCode':_0x34b74c[_0xdff818(0xd2)],'operationName':_0x41075f},'requestExample':_0x99a427?.[_0xdff818(0x92)],'responseExample':_0x99a427?.[_0xdff818(0x94)],'sdkInitCode':_0x34b74c['generateSDKInitCode'](_0x37924b),'usageExample':_0x50da71[_0xdff818(0xda)],'fullExample':_0x25ba8e||undefined};}[a0_0x1f2736(0xb0)](_0x36e026){const _0x3825a5=a0_0x1f2736,_0x16c288=_0x36e026[_0x3825a5(0xb3)]||_0x36e026,_0x47eb39=new DrivenDataDetailPlus(_0x16c288),_0x4745d8=_0x47eb39[_0x3825a5(0x9c)]()[_0x3825a5(0xca)](_0x27b92f=>({'name':_0x27b92f[_0x3825a5(0xef)],'displayName':_0x27b92f[_0x3825a5(0xd5)],'description':_0x27b92f[_0x3825a5(0xd5)]+'\x20operation\x20for\x20'+_0x47eb39[_0x3825a5(0xef)],'method':_0x27b92f[_0x3825a5(0xa8)],'path':_0x27b92f['path'],'requestParams':_0x27b92f[_0x3825a5(0x9d)],'requestExample':JSON[_0x3825a5(0xbc)](_0x27b92f['requestExample'],null,0x2),'responseExample':JSON[_0x3825a5(0xbc)](_0x27b92f['responseExample'],null,0x2)}));return{'datasetName':_0x47eb39[_0x3825a5(0xef)],'tableName':_0x47eb39[_0x3825a5(0xc2)](),'operations':_0x4745d8};}[a0_0x1f2736(0xed)](_0x24c47c,_0x1be08b){const _0x35f703=a0_0x1f2736,_0xf08619=new DatasetList(_0x24c47c),_0x22eb1f=_0x1be08b[_0x35f703(0xbf)]();return _0xf08619[_0x35f703(0xc6)]()[_0x35f703(0xe6)](_0x4a746d=>{const _0x4eb76f=_0x35f703,_0x1a4a95=(_0x4a746d[_0x4eb76f(0xef)]||'')[_0x4eb76f(0xbf)]()[_0x4eb76f(0xe4)](_0x22eb1f),_0x4d2bb2=(_0x4a746d[_0x4eb76f(0xc2)]?.()||_0x4a746d[_0x4eb76f(0x95)]||'')[_0x4eb76f(0xbf)]()['includes'](_0x22eb1f),_0x1fbfa8=(_0x4a746d[_0x4eb76f(0xd2)]||'')[_0x4eb76f(0xbf)]()['includes'](_0x22eb1f),_0xabee9d=(_0x4a746d[_0x4eb76f(0xee)]||'')['toLowerCase']()['includes'](_0x22eb1f);return _0x1a4a95||_0x4d2bb2||_0x1fbfa8||_0xabee9d;})['map'](_0x18ba73=>this[_0x35f703(0xa1)](_0x18ba73));}[a0_0x1f2736(0xf3)](_0x4a641a){const _0x5194e2=a0_0x1f2736,_0x433a2a=_0x4a641a['data']||_0x4a641a,_0x2b081d=new DrivenDataDetailPlus(_0x433a2a);let _0x5c7e47='#\x20'+_0x2b081d['name']+'\x0a\x0a';_0x5c7e47+=_0x5194e2(0xea)+_0x2b081d[_0x5194e2(0xd2)]+'\x0a',_0x5c7e47+=_0x5194e2(0xd6)+_0x2b081d[_0x5194e2(0xc2)]()+'\x0a',_0x5c7e47+=_0x5194e2(0xe0)+_0x2b081d[_0x5194e2(0xcf)]()+'\x0a\x0a',_0x5c7e47+=_0x5194e2(0xb7);const _0x59a9cb=_0x2b081d[_0x5194e2(0xa5)]();_0x59a9cb[_0x5194e2(0xb2)]>0x0&&(_0x5c7e47+=_0x5194e2(0x99),_0x5c7e47+='|------------|------|------|----------|-------------|-------------|-------------|\x0a',_0x59a9cb[_0x5194e2(0xec)]()['forEach'](_0x301e94=>{const _0x4d5fbf=_0x5194e2;let _0x841ae2='';if(_0x301e94[_0x4d5fbf(0xa4)]()){const _0xa4486c=_0x301e94[_0x4d5fbf(0xcc)]();if(_0xa4486c&&_0xa4486c[_0x4d5fbf(0xc8)][_0x4d5fbf(0xb2)]>0x0){const _0x3b3961=_0xa4486c[_0x4d5fbf(0xc8)][_0x4d5fbf(0xc3)](0x0,0x5);_0x841ae2=_0x3b3961[_0x4d5fbf(0xdd)](',\x20'),_0xa4486c[_0x4d5fbf(0xc8)]['length']>0x5&&(_0x841ae2+='\x20...\x20('+_0xa4486c[_0x4d5fbf(0xc8)][_0x4d5fbf(0xb2)]+_0x4d5fbf(0xba));}}_0x5c7e47+='|\x20'+_0x301e94[_0x4d5fbf(0xef)]+_0x4d5fbf(0x9e)+_0x301e94['code']+'\x20|\x20'+_0x301e94[_0x4d5fbf(0xeb)]+_0x4d5fbf(0x9e)+(_0x301e94[_0x4d5fbf(0xb1)]()?'✅':'')+_0x4d5fbf(0x9e)+(_0x301e94[_0x4d5fbf(0xc5)]()?'🔑':'')+'\x20|\x20'+_0x841ae2+_0x4d5fbf(0x9e)+(_0x301e94[_0x4d5fbf(0xee)]||'')+_0x4d5fbf(0xd4);}),_0x5c7e47+='\x0a');_0x5c7e47+='##\x20Operations\x0a\x0a';const _0x30ae3f=_0x2b081d[_0x5194e2(0x9c)]();_0x30ae3f[_0x5194e2(0xf2)](_0x1d8983=>{const _0x647f95=_0x5194e2;_0x5c7e47+=_0x647f95(0xe7)+_0x1d8983['displayName']+'\x20('+_0x1d8983[_0x647f95(0xef)]+')\x0a\x0a',_0x5c7e47+=_0x647f95(0xb5)+_0x1d8983[_0x647f95(0xa8)]+'\x0a',_0x5c7e47+=_0x647f95(0xd3)+_0x1d8983[_0x647f95(0xc0)]+'\x0a',_0x1d8983[_0x647f95(0x97)]&&(_0x5c7e47+=_0x647f95(0xe8)+_0x1d8983[_0x647f95(0x97)]+'\x0a'),_0x1d8983[_0x647f95(0x9d)]&&_0x1d8983[_0x647f95(0x9d)][_0x647f95(0xb2)]>0x0&&(_0x5c7e47+=_0x647f95(0xf5)+_0x1d8983[_0x647f95(0x9d)]['join'](',\x20')+'\x0a'),_0x1d8983[_0x647f95(0x92)]&&(_0x5c7e47+=_0x647f95(0xc1)+JSON['stringify'](_0x1d8983[_0x647f95(0x92)],null,0x2)+'\x0a```\x0a'),_0x1d8983[_0x647f95(0x94)]&&(_0x5c7e47+=_0x647f95(0xf4)+JSON[_0x647f95(0xbc)](_0x1d8983[_0x647f95(0x94)],null,0x2)+_0x647f95(0xa7)),_0x5c7e47+='\x0a';});const _0x3530a0=_0x2b081d[_0x5194e2(0xcf)](),_0x435e42=_0x2b081d[_0x5194e2(0xa6)](_0x3530a0);return _0x435e42&&(_0x5c7e47+=_0x5194e2(0x9a),_0x5c7e47+=_0x5194e2(0xc7),_0x5c7e47+=_0x435e42,_0x5c7e47+='```\x0a'),_0x5c7e47;}[a0_0x1f2736(0xbe)](_0x2229f6,_0x597bcc){const _0x5e60fa=a0_0x1f2736,_0x440e52=_0x2229f6[_0x5e60fa(0xb3)]||_0x2229f6,_0x2780eb=_0x597bcc['data']||_0x597bcc,_0x3879f6=new DrivenDataDetailPlus(_0x440e52),_0x3ca774=new DrivenDataDetailPlus(_0x2780eb),_0x1fed4c=new Set(_0x3879f6[_0x5e60fa(0xa5)]()['all']()[_0x5e60fa(0xca)](_0x3b72b6=>_0x3b72b6[_0x5e60fa(0xef)])),_0x298eb1=new Set(_0x3ca774[_0x5e60fa(0xa5)]()['all']()[_0x5e60fa(0xca)](_0x328453=>_0x328453[_0x5e60fa(0xef)])),_0x1c0313=new Set(_0x3879f6[_0x5e60fa(0x9c)]()[_0x5e60fa(0xca)](_0x4c7ed3=>_0x4c7ed3[_0x5e60fa(0xef)])),_0x5f563a=new Set(_0x3ca774['getEnabledOperationAnalyses']()[_0x5e60fa(0xca)](_0x54f2ba=>_0x54f2ba['name'])),_0x59816c={'fields':{'added':Array[_0x5e60fa(0xe5)](_0x298eb1)[_0x5e60fa(0xe6)](_0x436fa1=>!_0x1fed4c[_0x5e60fa(0xbb)](_0x436fa1)),'removed':Array[_0x5e60fa(0xe5)](_0x1fed4c)[_0x5e60fa(0xe6)](_0xf259c1=>!_0x298eb1[_0x5e60fa(0xbb)](_0xf259c1)),'modified':[]},'operations':{'added':Array[_0x5e60fa(0xe5)](_0x5f563a)['filter'](_0x3c3614=>!_0x1c0313[_0x5e60fa(0xbb)](_0x3c3614)),'removed':Array[_0x5e60fa(0xe5)](_0x1c0313)[_0x5e60fa(0xe6)](_0x30c62a=>!_0x5f563a[_0x5e60fa(0xbb)](_0x30c62a))}},_0x14b79c=_0x5e60fa(0xe2)+_0x59816c['fields'][_0x5e60fa(0xac)][_0x5e60fa(0xb2)]+'/-'+_0x59816c[_0x5e60fa(0xde)]['removed'][_0x5e60fa(0xb2)]+',\x20'+(_0x5e60fa(0xc4)+_0x59816c[_0x5e60fa(0xf1)][_0x5e60fa(0xac)][_0x5e60fa(0xb2)]+'/-'+_0x59816c[_0x5e60fa(0xf1)][_0x5e60fa(0xdb)][_0x5e60fa(0xb2)]);return{'differences':_0x59816c,'summary':_0x14b79c};}[a0_0x1f2736(0xbd)](_0x36bb8c){const _0x5d9851=a0_0x1f2736;return _0x36bb8c[_0x5d9851(0xf0)](/[-_\s]+(.)?/g,(_0x1b41e1,_0x4a3196)=>_0x4a3196?_0x4a3196[_0x5d9851(0xd1)]():'')[_0x5d9851(0xf0)](/^(.)/,(_0x443193,_0x56304d)=>_0x56304d[_0x5d9851(0xd1)]());}}
|
package/dist/api/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x4a18b3=a1_0x6817;(function(_0x189e18,_0x3cc480){const _0x34b250=a1_0x6817,_0x4462b0=_0x189e18();while(!![]){try{const _0xc52809=-parseInt(_0x34b250(0xac))/0x1+-parseInt(_0x34b250(0xa8))/0x2+-parseInt(_0x34b250(0xad))/0x3*(-parseInt(_0x34b250(0xaa))/0x4)+parseInt(_0x34b250(0xb6))/0x5*(parseInt(_0x34b250(0xa9))/0x6)+parseInt(_0x34b250(0xaf))/0x7+parseInt(_0x34b250(0xb3))/0x8+-parseInt(_0x34b250(0xab))/0x9;if(_0xc52809===_0x3cc480)break;else _0x4462b0['push'](_0x4462b0['shift']());}catch(_0x2b42d6){_0x4462b0['push'](_0x4462b0['shift']());}}}(a1_0x3f92,0xaac6c));function a1_0x3f92(){const _0x335640=['get','585818ZTuoXf','6CNEott','4MuSvOB','14750658GbTSYc','1181221kFORPJ','2036823tpBWJw','size','8467144DWJwec','data','cache','keys','10011088oqpEiP','defaultTTL','now','3363365choqqb','floor','clear','from','getStats'];a1_0x3f92=function(){return _0x335640;};return a1_0x3f92();}export class SimpleCache{['cache']=new Map();[a1_0x4a18b3(0xb4)];constructor(_0x53ee74=0x5){const _0x4d000b=a1_0x4a18b3;this[_0x4d000b(0xb4)]=_0x53ee74*0x3c*0x3e8;}[a1_0x4a18b3(0xbb)](_0x1b7cfd){const _0x284106=a1_0x4a18b3,_0x2cc1e9=this[_0x284106(0xb1)][_0x284106(0xbb)](_0x1b7cfd);if(!_0x2cc1e9)return null;const _0x425df5=Date[_0x284106(0xb5)](),_0x25bec5=_0x425df5-_0x2cc1e9['timestamp'];if(_0x25bec5>this[_0x284106(0xb4)])return this[_0x284106(0xb1)]['delete'](_0x1b7cfd),null;const _0x1f2998=Math[_0x284106(0xb7)](_0x25bec5/0x3e8);return _0x2cc1e9[_0x284106(0xb0)];}['set'](_0x24f08a,_0x2a13bc){const _0x5e6af9=a1_0x4a18b3;this[_0x5e6af9(0xb1)]['set'](_0x24f08a,{'data':_0x2a13bc,'timestamp':Date['now']()});}[a1_0x4a18b3(0xb8)](_0x354486){const _0x6a2033=a1_0x4a18b3;_0x354486?this[_0x6a2033(0xb1)]['delete'](_0x354486):this['cache']['clear']();}[a1_0x4a18b3(0xba)](){const _0x19ca9b=a1_0x4a18b3;return{'size':this['cache'][_0x19ca9b(0xae)],'ttlMinutes':this[_0x19ca9b(0xb4)]/0xea60,'entries':Array[_0x19ca9b(0xb9)](this[_0x19ca9b(0xb1)][_0x19ca9b(0xb2)]())};}}function a1_0x6817(_0x5a6b71,_0x5af561){const _0x3f923d=a1_0x3f92();return a1_0x6817=function(_0x6817b,_0x1f86fe){_0x6817b=_0x6817b-0xa8;let _0x1cb738=_0x3f923d[_0x6817b];return _0x1cb738;},a1_0x6817(_0x5a6b71,_0x5af561);}export const apiCache=new SimpleCache(0x5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a2_0x355b(){const _0x1bcb63=['10nQQsLo','postRequest','json','getDatasetList','4028276iWAisC','/smartapi/custom/queryUserCustomSqlList','Authentication\x20failed.\x20Please\x20login\x20again.','searchDatasets','6DvOyuY','includes','dataset-detail:','¤tPage=','get','Unknown\x20error','apiDomain','dataset-list:','text','request','pageSize','cookie','stringify','3650bPqHCN','set','5698255ahKmth','sqlCode','4828992WpfrEN','length','toLowerCase','dbtableConfig','code','36141xNIJAa','tableData','status','241065SjAocT','currentPage','No\x20authentication\x20cookie\x20found.\x20Please\x20login\x20first.','/smartapi/dataset/getList?appCode=','/smartapi/dataset/get-driven-data?id=','params','online','application/json','8131617jmeySG','data','2480TdHKtZ','API\x20request\x20failed:\x20HTTP\x20','getDatasetDetail','message','success','API\x20error:\x20','filter','env','appCode','/api/custom/executeSql','163132zmtqXZ'];a2_0x355b=function(){return _0x1bcb63;};return a2_0x355b();}const a2_0x103e9c=a2_0x5e48;function a2_0x5e48(_0x5144e1,_0xbf4c26){const _0x355b8f=a2_0x355b();return a2_0x5e48=function(_0x5e48a5,_0x18032f){_0x5e48a5=_0x5e48a5-0x7c;let _0x545466=_0x355b8f[_0x5e48a5];return _0x545466;},a2_0x5e48(_0x5144e1,_0xbf4c26);}(function(_0x30348c,_0x473e4d){const _0x4f2242=a2_0x5e48,_0x9e7d24=_0x30348c();while(!![]){try{const _0x163d75=-parseInt(_0x4f2242(0x87))/0x1*(parseInt(_0x4f2242(0x88))/0x2)+-parseInt(_0x4f2242(0xa1))/0x3+-parseInt(_0x4f2242(0x8c))/0x4+parseInt(_0x4f2242(0x9f))/0x5*(-parseInt(_0x4f2242(0x90))/0x6)+-parseInt(_0x4f2242(0xa6))/0x7*(parseInt(_0x4f2242(0x7d))/0x8)+-parseInt(_0x4f2242(0xb1))/0x9+parseInt(_0x4f2242(0x9d))/0xa*(parseInt(_0x4f2242(0xa9))/0xb);if(_0x163d75===_0x473e4d)break;else _0x9e7d24['push'](_0x9e7d24['shift']());}catch(_0x348ff3){_0x9e7d24['push'](_0x9e7d24['shift']());}}}(a2_0x355b,0xe1508));import{getCookie}from'../auth/cookie-manager.js';import{getApiDomain}from'../auth/constants.js';import{apiCache}from'./cache.js';export class DevApiClient{[a2_0x103e9c(0x85)];[a2_0x103e9c(0x84)];[a2_0x103e9c(0x9b)];[a2_0x103e9c(0x96)];constructor(_0x458170){const _0x5b4df5=a2_0x103e9c;this[_0x5b4df5(0x85)]=_0x458170[_0x5b4df5(0x85)],this[_0x5b4df5(0x84)]=_0x458170[_0x5b4df5(0x84)]||_0x5b4df5(0xaf),this['cookie']=_0x458170[_0x5b4df5(0x9b)]||getCookie(),this[_0x5b4df5(0x96)]=getApiDomain(this[_0x5b4df5(0x84)]);if(!this['cookie'])throw new Error(_0x5b4df5(0xab));}async[a2_0x103e9c(0x99)](_0x2a01e0){const _0x1e622e=a2_0x103e9c,_0x8725f6=await fetch(_0x2a01e0,{'headers':{'Cookie':this[_0x1e622e(0x9b)]}});if(!_0x8725f6['ok']){if(_0x8725f6[_0x1e622e(0xa8)]===0x191)throw new Error(_0x1e622e(0x8e));let _0x471e49='';try{_0x471e49=await _0x8725f6['text']();}catch{}throw new Error(_0x1e622e(0x7e)+_0x8725f6[_0x1e622e(0xa8)]+(_0x471e49?'\x0a'+_0x471e49:''));}const _0x17e35a=await _0x8725f6[_0x1e622e(0x8a)]();if(_0x17e35a&&typeof _0x17e35a==='object'&&_0x1e622e(0x81)in _0x17e35a&&!_0x17e35a[_0x1e622e(0x81)]){const _0x2567d4=_0x17e35a;throw new Error(_0x1e622e(0x82)+(_0x2567d4['message']||_0x2567d4['errorMsg']||_0x1e622e(0x95)));}return _0x17e35a;}async[a2_0x103e9c(0x89)](_0x17ade2,_0x17e86f){const _0x57c340=a2_0x103e9c,_0x1653e9=await fetch(_0x17ade2,{'method':'POST','headers':{'Content-Type':_0x57c340(0xb0),'Cookie':this['cookie']},'body':JSON[_0x57c340(0x9c)](_0x17e86f)});if(!_0x1653e9['ok']){if(_0x1653e9[_0x57c340(0xa8)]===0x191)throw new Error('Authentication\x20failed.\x20Please\x20login\x20again.');let _0x5c3f74='';try{_0x5c3f74=await _0x1653e9[_0x57c340(0x98)]();}catch{}throw new Error(_0x57c340(0x7e)+_0x1653e9[_0x57c340(0xa8)]+(_0x5c3f74?'\x0a'+_0x5c3f74:''));}const _0x1e7177=await _0x1653e9['json']();if(_0x1e7177&&typeof _0x1e7177==='object'&&_0x57c340(0x81)in _0x1e7177&&!_0x1e7177[_0x57c340(0x81)]){const _0x4e8655=_0x1e7177;throw new Error('API\x20error:\x20'+(_0x4e8655[_0x57c340(0x80)]||_0x4e8655['errorMsg']||_0x57c340(0x95)));}return _0x1e7177;}async['getDatasetList'](_0x513ddb){const _0x115d25=a2_0x103e9c,_0x168cc1=_0x513ddb?.['pageSize']||0x3e7,_0x460b37=_0x513ddb?.[_0x115d25(0xaa)]||0x1,_0x1f47f2=_0x513ddb?.['forceRefresh']||![],_0x38dd95=_0x115d25(0x97)+this[_0x115d25(0x85)]+':'+this['env']+':'+_0x168cc1+':'+_0x460b37;if(!_0x1f47f2){const _0x292d24=apiCache[_0x115d25(0x94)](_0x38dd95);if(_0x292d24)return _0x292d24;}const _0x3cc666=this[_0x115d25(0x96)]+_0x115d25(0xac)+this['appCode']+'&pageSize='+_0x168cc1+_0x115d25(0x93)+_0x460b37,_0x50d4f6=await this[_0x115d25(0x99)](_0x3cc666);return apiCache[_0x115d25(0x9e)](_0x38dd95,_0x50d4f6),_0x50d4f6;}async[a2_0x103e9c(0x7f)](_0x50fed7,_0x89bb74=![]){const _0x416e46=a2_0x103e9c,_0x3172ef=_0x416e46(0x92)+this['appCode']+':'+this[_0x416e46(0x84)]+':'+_0x50fed7;if(!_0x89bb74){const _0x83afa6=apiCache[_0x416e46(0x94)](_0x3172ef);if(_0x83afa6)return _0x83afa6;}const _0x293df8=this[_0x416e46(0x96)]+_0x416e46(0xad)+_0x50fed7,_0x597d41=await this['request'](_0x293df8);return apiCache[_0x416e46(0x9e)](_0x3172ef,_0x597d41),_0x597d41;}async[a2_0x103e9c(0x8f)](_0x594558){const _0x3d8324=a2_0x103e9c,_0x4868ca=await this[_0x3d8324(0x8b)]({'pageSize':0x3e7});if(!_0x4868ca[_0x3d8324(0x81)]||!_0x4868ca[_0x3d8324(0x7c)]?.[_0x3d8324(0xa7)])return{'success':!![],'data':{'tableData':[]}};const _0x21a51d=_0x4868ca[_0x3d8324(0x7c)]['tableData'][_0x3d8324(0x83)](_0x695b3=>{const _0x134aed=_0x3d8324,_0x4349e2=_0x594558[_0x134aed(0xa3)]();return _0x695b3['name']?.[_0x134aed(0xa3)]()[_0x134aed(0x91)](_0x4349e2)||_0x695b3[_0x134aed(0xa5)]?.[_0x134aed(0xa3)]()[_0x134aed(0x91)](_0x4349e2)||_0x695b3[_0x134aed(0xa4)]?.['tableName']?.[_0x134aed(0xa3)]()['includes'](_0x4349e2)||_0x695b3['description']?.[_0x134aed(0xa3)]()[_0x134aed(0x91)](_0x4349e2);});return{'success':!![],'data':{'tableData':_0x21a51d,'paging':{'totalCount':_0x21a51d[_0x3d8324(0xa2)],'currentPage':0x1,'pageSize':0x3e7}}};}async['getCustomSqlList'](_0x13af6c){const _0x1ca0bf=a2_0x103e9c,_0x5b1a34=_0x13af6c?.[_0x1ca0bf(0xaa)]||0x1,_0x414a7a=_0x13af6c?.[_0x1ca0bf(0x9a)]||0x3e7,_0x56990b=this[_0x1ca0bf(0x96)]+_0x1ca0bf(0x8d),_0x43ff04={'appCode':this[_0x1ca0bf(0x85)],'currentPage':_0x5b1a34,'pageSize':_0x414a7a},_0x305325=await this[_0x1ca0bf(0x89)](_0x56990b,_0x43ff04);return _0x305325;}async['executeSql'](_0xf147b8){const _0x4df6a6=a2_0x103e9c,_0x516cdf=this[_0x4df6a6(0x96)]+_0x4df6a6(0x86),_0x40dca3={'sqlCode':_0xf147b8[_0x4df6a6(0xa0)],..._0xf147b8['params']&&{'params':_0xf147b8[_0x4df6a6(0xae)]}};return await this[_0x4df6a6(0x89)](_0x516cdf,_0x40dca3);}}
|
package/dist/auth/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a3_0x3fe8(_0xc3bdd8,_0x3fb597){const _0xd98fee=a3_0xd98f();return a3_0x3fe8=function(_0x3fe8ba,_0x333a98){_0x3fe8ba=_0x3fe8ba-0x179;let _0x8d1158=_0xd98fee[_0x3fe8ba];return _0x8d1158;},a3_0x3fe8(_0xc3bdd8,_0x3fb597);}const a3_0x234887=a3_0x3fe8;(function(_0x4b554f,_0x3e7346){const _0x3580d5=a3_0x3fe8,_0x30aa07=_0x4b554f();while(!![]){try{const _0x1897f6=parseInt(_0x3580d5(0x188))/0x1+parseInt(_0x3580d5(0x186))/0x2+parseInt(_0x3580d5(0x183))/0x3*(parseInt(_0x3580d5(0x179))/0x4)+parseInt(_0x3580d5(0x184))/0x5+-parseInt(_0x3580d5(0x17f))/0x6+parseInt(_0x3580d5(0x180))/0x7*(-parseInt(_0x3580d5(0x17b))/0x8)+-parseInt(_0x3580d5(0x185))/0x9*(parseInt(_0x3580d5(0x181))/0xa);if(_0x1897f6===_0x3e7346)break;else _0x30aa07['push'](_0x30aa07['shift']());}catch(_0x3d2b00){_0x30aa07['push'](_0x30aa07['shift']());}}}(a3_0xd98f,0xc495e));import{mkdirSync}from'node:fs';function a3_0xd98f(){const _0x439af1=['online','8YhKpse','/.lovrabet','/cookie','https://daily-api.lovrabet.com','5626938VUtSwM','1676563NjmzUU','10SdrPkT','https://api.lovrabet.com','2989263ccmxXX','4781140oEswAi','8522271CFGcEs','1774662fARLzZ','https://user.lovrabet.com','89485jeyJlD','4ElhDAr'];a3_0xd98f=function(){return _0x439af1;};return a3_0xd98f();}import{homedir}from'node:os';export const configDir=homedir()+a3_0x234887(0x17c);export const cookieFile=configDir+a3_0x234887(0x17d);mkdirSync(configDir,{'recursive':!![]});export const getApiDomain=(_0x4cc924=a3_0x234887(0x17a))=>_0x4cc924===a3_0x234887(0x17a)?a3_0x234887(0x182):a3_0x234887(0x17e);export const getUserDomain=(_0x46a8f2='online')=>_0x46a8f2===a3_0x234887(0x17a)?a3_0x234887(0x187):'https://user-daily.lovrabet.com';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x10dc49,_0x22d4bc){const _0x1edaa3=a4_0x51b3,_0x41e498=_0x10dc49();while(!![]){try{const _0x34a31b=parseInt(_0x1edaa3(0xc9))/0x1+parseInt(_0x1edaa3(0xc8))/0x2*(parseInt(_0x1edaa3(0xce))/0x3)+-parseInt(_0x1edaa3(0xc4))/0x4+-parseInt(_0x1edaa3(0xcd))/0x5*(parseInt(_0x1edaa3(0xc5))/0x6)+parseInt(_0x1edaa3(0xd1))/0x7*(parseInt(_0x1edaa3(0xc6))/0x8)+-parseInt(_0x1edaa3(0xca))/0x9+-parseInt(_0x1edaa3(0xcb))/0xa;if(_0x34a31b===_0x22d4bc)break;else _0x41e498['push'](_0x41e498['shift']());}catch(_0x23254f){_0x41e498['push'](_0x41e498['shift']());}}}(a4_0x17f4,0x4b302));import{readFileSync,writeFileSync}from'node:fs';import{cookieFile}from'./constants.js';export function getCookie(){const _0x5d58be=a4_0x51b3;try{return readFileSync(cookieFile,'utf-8')[_0x5d58be(0xcf)]();}catch{return'';}}export function saveCookie(_0x9d6e60){const _0x3d6be7=a4_0x51b3;try{writeFileSync(cookieFile,_0x9d6e60,_0x3d6be7(0xc7));}catch(_0x3a5b44){throw new Error(_0x3d6be7(0xcc)+cookieFile+':\x20'+_0x3a5b44['message']);}}export function hasCookie(){const _0x19774b=a4_0x51b3,_0xf851e9=getCookie();return _0xf851e9[_0x19774b(0xd0)]>0x0;}export function clearCookie(){const _0x34d40b=a4_0x51b3;try{writeFileSync(cookieFile,'',_0x34d40b(0xc7));}catch{}}function a4_0x51b3(_0xb3e7d9,_0x4d5aad){const _0x17f435=a4_0x17f4();return a4_0x51b3=function(_0x51b32d,_0x25ee5f){_0x51b32d=_0x51b32d-0xc4;let _0xbbbdc9=_0x17f435[_0x51b32d];return _0xbbbdc9;},a4_0x51b3(_0xb3e7d9,_0x4d5aad);}function a4_0x17f4(){const _0xd309c4=['1563318jEIdQv','2805430scrWLy','Failed\x20to\x20save\x20cookie\x20to\x20','730400uUnBau','1632849YpTCqb','trim','length','49ZWrjgX','298420wMtuJZ','12QWwesD','179576pcgMxr','utf-8','2BPNQuN','427568RyhhsN'];a4_0x17f4=function(){return _0xd309c4;};return a4_0x17f4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a5_0x138d08=a5_0x2fbe;(function(_0x14a806,_0x48cb87){const _0x447105=a5_0x2fbe,_0x538545=_0x14a806();while(!![]){try{const _0x4ac873=-parseInt(_0x447105(0x198))/0x1+-parseInt(_0x447105(0x18c))/0x2*(-parseInt(_0x447105(0x18d))/0x3)+-parseInt(_0x447105(0x193))/0x4*(-parseInt(_0x447105(0x18f))/0x5)+-parseInt(_0x447105(0x191))/0x6+-parseInt(_0x447105(0x18e))/0x7*(-parseInt(_0x447105(0x192))/0x8)+parseInt(_0x447105(0x194))/0x9+-parseInt(_0x447105(0x195))/0xa;if(_0x4ac873===_0x48cb87)break;else _0x538545['push'](_0x538545['shift']());}catch(_0x491be8){_0x538545['push'](_0x538545['shift']());}}}(a5_0x3280,0x90065));function a5_0x2fbe(_0x59f176,_0x249b78){const _0x328046=a5_0x3280();return a5_0x2fbe=function(_0x2fbeb8,_0x79f9c9){_0x2fbeb8=_0x2fbeb8-0x18c;let _0x585a80=_0x328046[_0x2fbeb8];return _0x585a80;},a5_0x2fbe(_0x59f176,_0x249b78);}import{getCookie}from'./cookie-manager.js';import{getUserDomain}from'./constants.js';function a5_0x3280(){const _0x6788bc=['7mJvvnT','985730jfZLlX','user','2268270JuAKmn','8976040uBitkj','16fHisaI','6394464pDWosY','23858890GNJcgP','json','online','365575Haolhs','session','51086mNrtBk','129oBfZSY'];a5_0x3280=function(){return _0x6788bc;};return a5_0x3280();}export async function isSessionValid(_0x2c9ee0=a5_0x138d08(0x197)){const _0x853b9a=a5_0x138d08,_0x5c2af1=getCookie();if(!_0x5c2af1)return![];try{const _0x219e59=await fetch(getUserDomain(_0x2c9ee0)+'/api/auth/get-session',{'headers':{'cookie':_0x5c2af1}});if(!_0x219e59['ok'])return![];const _0x37c1ca=await _0x219e59[_0x853b9a(0x196)]();return!!(_0x37c1ca?.[_0x853b9a(0x199)]&&_0x37c1ca?.[_0x853b9a(0x190)]);}catch{return![];}}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a6_0x283338=a6_0x4190;function a6_0x3466(){const _0x3be992=['4Kzflje','3581525BDAuSB','env','187337uLZGfV','SIGINT','catch','MCP_DEBUG','10lmtSHo','9KETaRi','349928iOYrTS','312396PmcpNv','1659570Zqcjvp','log','6408899JVAknB','exit','16619260tdDKQv','Shutting\x20down\x20Lovrabet\x20Dataset\x20MCP\x20Server...','logInfo','error','Failed\x20to\x20start\x20Lovrabet\x20Dataset\x20MCP\x20Server:'];a6_0x3466=function(){return _0x3be992;};return a6_0x3466();}(function(_0x242955,_0x386cdb){const _0x13e686=a6_0x4190,_0x3f7ef4=_0x242955();while(!![]){try{const _0x1e4aad=-parseInt(_0x13e686(0x9b))/0x1*(-parseInt(_0x13e686(0x9f))/0x2)+-parseInt(_0x13e686(0xa3))/0x3+-parseInt(_0x13e686(0x98))/0x4*(parseInt(_0x13e686(0x99))/0x5)+parseInt(_0x13e686(0xa2))/0x6+-parseInt(_0x13e686(0xa5))/0x7+parseInt(_0x13e686(0xa1))/0x8+-parseInt(_0x13e686(0xa0))/0x9*(-parseInt(_0x13e686(0xa7))/0xa);if(_0x1e4aad===_0x386cdb)break;else _0x3f7ef4['push'](_0x3f7ef4['shift']());}catch(_0x1c9ec8){_0x3f7ef4['push'](_0x3f7ef4['shift']());}}}(a6_0x3466,0x7c5b6));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createServer}from'./server.js';function a6_0x4190(_0x21b71c,_0x4787c1){const _0x3466d8=a6_0x3466();return a6_0x4190=function(_0x419046,_0x228054){_0x419046=_0x419046-0x97;let _0x3ee34c=_0x3466d8[_0x419046];return _0x3ee34c;},a6_0x4190(_0x21b71c,_0x4787c1);}async function main(){const _0x4ed31f=a6_0x4190;try{const _0xd5e598=createServer(),_0x119f52=new StdioServerTransport();_0xd5e598[_0x4ed31f(0xa9)](),await _0xd5e598['connect'](_0x119f52),process['on'](_0x4ed31f(0x9c),async()=>{const _0x5ae1ec=_0x4ed31f;process[_0x5ae1ec(0x9a)]['MCP_DEBUG']&&console['log'](_0x5ae1ec(0xa8)),process[_0x5ae1ec(0xa6)](0x0);}),process['on']('SIGTERM',async()=>{const _0x48e303=_0x4ed31f;process['env'][_0x48e303(0x9e)]&&console[_0x48e303(0xa4)](_0x48e303(0xa8)),process[_0x48e303(0xa6)](0x0);});}catch(_0x45545c){console[_0x4ed31f(0xaa)](_0x4ed31f(0x97),_0x45545c),process[_0x4ed31f(0xa6)](0x1);}}main()[a6_0x283338(0x9d)](_0x4f22cf=>{const _0x876ffd=a6_0x283338;console[_0x876ffd(0xaa)]('Unhandled\x20error:',_0x4f22cf),process['exit'](0x1);});
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x1b15ed=a7_0x5455;function a7_0x524e(){const _0x422539=['registerToolHandlers','get_operation_detail','version','Available\x20tools:','logInfo','stringify','🔐\x20Authentication:','text','\x20\x20This\x20server\x20uses\x20cookie-based\x20authentication.','log','setRequestHandler','forEach','description','26401177tvRYMk','list_datasets','7729504MSVqkX','connect','📌\x20Version:\x20','18805txOtVC','url','search_datasets','login','13030380hRqJJS','params','\x20\x20-\x20','866986qnbwAD','185223MlaAag','../package.json','10oMFaTG','MCP_DEBUG','846IlAvWx','message','get_dataset_operations','server','16bMCTdI','get_dataset_detail','name','1007637CZQbTT','7wuJOmE','🚀\x20Lovrabet\x20Dataset\x20MCP\x20Server\x20(Development\x20API)'];a7_0x524e=function(){return _0x422539;};return a7_0x524e();}(function(_0x215703,_0x254e1d){const _0x29331a=a7_0x5455,_0x1bfbf0=_0x215703();while(!![]){try{const _0x3aa40d=parseInt(_0x29331a(0xda))/0x1+-parseInt(_0x29331a(0xd9))/0x2+-parseInt(_0x29331a(0xe5))/0x3*(parseInt(_0x29331a(0xe2))/0x4)+parseInt(_0x29331a(0xfa))/0x5*(-parseInt(_0x29331a(0xde))/0x6)+-parseInt(_0x29331a(0xe6))/0x7*(parseInt(_0x29331a(0xf7))/0x8)+parseInt(_0x29331a(0xd6))/0x9+parseInt(_0x29331a(0xdc))/0xa*(parseInt(_0x29331a(0xf5))/0xb);if(_0x3aa40d===_0x254e1d)break;else _0x1bfbf0['push'](_0x1bfbf0['shift']());}catch(_0x73489b){_0x1bfbf0['push'](_0x1bfbf0['shift']());}}}(a7_0x524e,0xb9764));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{ListToolsRequestSchema,CallToolRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{TOOL_DEFINITIONS,listDatasets,getDatasetDetail,getDatasetOperations,getOperationDetail,generateSDKCode,searchDatasets,listSqlQueries}from'./tools/index.js';import{createRequire}from'module';const require=createRequire(import.meta[a7_0x1b15ed(0xfb)]),packageJson=require(a7_0x1b15ed(0xdb));import{login}from'./tools/login.js';export class LovrabetDatasetMCPServer{[a7_0x1b15ed(0xe1)];constructor(){const _0x24feb5=a7_0x1b15ed;this[_0x24feb5(0xe1)]=new Server({'name':'lovrabet-dataset-mcp','version':packageJson[_0x24feb5(0xea)]},{'capabilities':{'tools':{}}}),this[_0x24feb5(0xe8)]();}[a7_0x1b15ed(0xe8)](){const _0x215cca=a7_0x1b15ed;this[_0x215cca(0xe1)][_0x215cca(0xf2)](ListToolsRequestSchema,async()=>({'tools':TOOL_DEFINITIONS})),this[_0x215cca(0xe1)][_0x215cca(0xf2)](CallToolRequestSchema,async _0x23d7fd=>{const _0x2f8fbd=_0x215cca,{name:_0x382052,arguments:_0x10cacf}=_0x23d7fd[_0x2f8fbd(0xd7)];try{let _0xd01875;switch(_0x382052){case _0x2f8fbd(0xd5):_0xd01875=await login(_0x10cacf||{});break;case _0x2f8fbd(0xf6):_0xd01875=await listDatasets(_0x10cacf);break;case _0x2f8fbd(0xe3):_0xd01875=await getDatasetDetail(_0x10cacf);break;case _0x2f8fbd(0xe0):_0xd01875=await getDatasetOperations(_0x10cacf);break;case _0x2f8fbd(0xe9):_0xd01875=await getOperationDetail(_0x10cacf);break;case'generate_sdk_code':_0xd01875=await generateSDKCode(_0x10cacf);break;case _0x2f8fbd(0xd4):_0xd01875=await searchDatasets(_0x10cacf);break;case'list_sql_queries':_0xd01875=await listSqlQueries(_0x10cacf);break;default:throw new Error('Unknown\x20tool:\x20'+_0x382052);}return{'content':[{'type':_0x2f8fbd(0xef),'text':JSON[_0x2f8fbd(0xed)](_0xd01875,null,0x2)}]};}catch(_0x56edf0){return{'content':[{'type':_0x2f8fbd(0xef),'text':JSON[_0x2f8fbd(0xed)]({'error':!![],'message':_0x56edf0[_0x2f8fbd(0xdf)]||'Unknown\x20error\x20occurred','tool':_0x382052},null,0x2)}],'isError':!![]};}});}['getServer'](){const _0x2e5d8b=a7_0x1b15ed;return this[_0x2e5d8b(0xe1)];}async['connect'](_0x333d81){const _0x3e7146=a7_0x1b15ed;await this[_0x3e7146(0xe1)][_0x3e7146(0xf8)](_0x333d81);}[a7_0x1b15ed(0xec)](){const _0x34768f=a7_0x1b15ed;if(!process['env'][_0x34768f(0xdd)])return;console[_0x34768f(0xf1)](_0x34768f(0xe7)),console[_0x34768f(0xf1)](_0x34768f(0xf9)+packageJson[_0x34768f(0xea)]),console[_0x34768f(0xf1)]('✅\x20Server\x20started\x20successfully'),console['log'](''),console[_0x34768f(0xf1)](_0x34768f(0xee)),console[_0x34768f(0xf1)](_0x34768f(0xf0)),console[_0x34768f(0xf1)]('\x20\x20Use\x20the\x20\x22login\x22\x20tool\x20first\x20to\x20authenticate.'),console['log'](''),console['log'](_0x34768f(0xeb)),TOOL_DEFINITIONS[_0x34768f(0xf3)](_0x155d3b=>{const _0x1c75be=_0x34768f;console['log'](_0x1c75be(0xd8)+_0x155d3b[_0x1c75be(0xe4)]+':\x20'+_0x155d3b[_0x1c75be(0xf4)]);});}}function a7_0x5455(_0x3d2f14,_0x2e1f64){const _0x524e12=a7_0x524e();return a7_0x5455=function(_0x545549,_0x302be2){_0x545549=_0x545549-0xd4;let _0x53ac6e=_0x524e12[_0x545549];return _0x53ac6e;},a7_0x5455(_0x3d2f14,_0x2e1f64);}export function createServer(){return new LovrabetDatasetMCPServer();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x1e12(){const _0x3a307b=['2926488ipfMbT','\x27\x20in\x20dataset\x20\x27','analyzeDatasetDetail','find','12drxzRw','3348462rdpwnD','fullExample','test','LOVRABET_ENV','5473223sdqTFR','basic','2073750BElGKP','214142sNbGqx','11852028zoIrMA','getDatasetList','Returns\x20ONLY\x20the\x20\x27data\x27\x20field\x20content.\x20Full\x20API\x20response\x20is\x20{\x20success:\x20true,\x20data:\x20{...},\x20msg:\x20\x22\x22,\x20errorMsg:\x20\x22\x22,\x20errorCode:\x20\x220000\x22\x20},\x20but\x20SDK\x20returns\x20just\x20the\x20{...}\x20part\x20from\x20\x27data\x27.','CRITICAL:\x20Always\x20use\x20try-catch\x20when\x20calling\x20SDK\x20methods.\x20Success\x20case\x20returns\x20data\x20directly\x20(e.g.,\x20{\x20id:\x20123,\x20name:\x20\x22...\x22\x20}),\x20but\x20failure\x20case\x20throws\x20exception\x20instead\x20of\x20returning\x20error\x20info.','27882owNHoa','Cannot\x20generate\x20SDK\x20code\x20for\x20operation\x20\x27','8dobzvp','fields','getDatasetDetail','env','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','sdkInitCode','Throws\x20LovrabetError\x20exception\x20with\x20full\x20response.\x20The\x20error\x20object\x20contains:\x20{\x20message:\x20string,\x20status?:\x20number\x20(HTTP\x20code),\x20code?:\x20string\x20(business\x20error\x20code),\x20data?:\x20any\x20(full\x20error\x20response)\x20}','code','Dataset\x20not\x20found\x20with\x20code:\x20'];a8_0x1e12=function(){return _0x3a307b;};return a8_0x1e12();}function a8_0x4d6f(_0xb49a72,_0x4d8847){const _0x1e12e8=a8_0x1e12();return a8_0x4d6f=function(_0x4d6f72,_0x4e83d1){_0x4d6f72=_0x4d6f72-0x115;let _0x1fad9a=_0x1e12e8[_0x4d6f72];return _0x1fad9a;},a8_0x4d6f(_0xb49a72,_0x4d8847);}(function(_0x427721,_0x5eb2aa){const _0x4f7559=a8_0x4d6f,_0x5614a7=_0x427721();while(!![]){try{const _0x47e5f9=-parseInt(_0x4f7559(0x127))/0x1*(parseInt(_0x4f7559(0x12f))/0x2)+parseInt(_0x4f7559(0x128))/0x3+parseInt(_0x4f7559(0x123))/0x4+-parseInt(_0x4f7559(0x12e))/0x5+-parseInt(_0x4f7559(0x118))/0x6+-parseInt(_0x4f7559(0x12c))/0x7*(parseInt(_0x4f7559(0x11a))/0x8)+parseInt(_0x4f7559(0x130))/0x9;if(_0x47e5f9===_0x5eb2aa)break;else _0x5614a7['push'](_0x5614a7['shift']());}catch(_0x210b68){_0x5614a7['push'](_0x5614a7['shift']());}}}(a8_0x1e12,0xa5a82));import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function generateSDKCode(_0x4b4393){const _0x18d6d4=a8_0x4d6f,{appCode:appCode=process[_0x18d6d4(0x11d)]['LOVRABET_APP_CODE'],cookie:_0x39ee50,env:env=process[_0x18d6d4(0x11d)][_0x18d6d4(0x12b)]||'online',datasetCode:_0x24a704,operationName:_0x45561b,includeImports:includeImports=!![]}=_0x4b4393;if(!appCode)throw new Error(_0x18d6d4(0x11e));if(!_0x24a704)throw new Error('datasetCode\x20is\x20required');if(!_0x45561b)throw new Error('operationName\x20is\x20required');const _0x1e06cb=new DevApiClient({'appCode':appCode,'cookie':_0x39ee50,'env':env}),_0xb45af2=/^\d+$/[_0x18d6d4(0x12a)](_0x24a704);let _0x5635aa;if(_0xb45af2)_0x5635aa=_0x24a704;else{const _0xc36725=await _0x1e06cb[_0x18d6d4(0x115)]({'pageSize':0x3e7}),_0x17a718=_0xc36725['data']?.['tableData']||[],_0x2b5ef5=_0x17a718[_0x18d6d4(0x126)](_0x8aaec4=>_0x8aaec4[_0x18d6d4(0x121)]===_0x24a704);if(!_0x2b5ef5)throw new Error(_0x18d6d4(0x122)+_0x24a704);_0x5635aa=String(_0x2b5ef5['id']);}const _0x41fdfe=await _0x1e06cb[_0x18d6d4(0x11c)](_0x5635aa),_0x2a6afb=new DatasetAnalyzer(),_0x28f915=_0x2a6afb['generateSDKCode'](_0x41fdfe,_0x45561b,appCode,env);if(!_0x28f915)throw new Error(_0x18d6d4(0x119)+_0x45561b+_0x18d6d4(0x124)+_0x24a704+'\x27');const _0x23bc2f=_0x2a6afb[_0x18d6d4(0x125)](_0x41fdfe);return{'appCode':appCode,'env':env,'datasetName':_0x23bc2f[_0x18d6d4(0x12d)]['name'],'language':'typescript','code':_0x28f915[_0x18d6d4(0x121)],'fullExample':includeImports?_0x28f915[_0x18d6d4(0x129)]:undefined,'sdkCallInfo':_0x28f915['sdkCallInfo'],'fields':_0x23bc2f[_0x18d6d4(0x11b)],'requestExample':_0x28f915['requestExample'],'responseExample':_0x28f915['responseExample'],'sdkInitCode':_0x28f915[_0x18d6d4(0x11f)],'usageExample':_0x28f915['usageExample'],'sdkReturnValueBehavior':{'onSuccess':_0x18d6d4(0x116),'onError':_0x18d6d4(0x120),'note':_0x18d6d4(0x117)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8286e5,_0x51543a){const _0x2bfc6d=a9_0x5a36,_0x5ed34b=_0x8286e5();while(!![]){try{const _0x561bd8=parseInt(_0x2bfc6d(0x15c))/0x1+parseInt(_0x2bfc6d(0x16a))/0x2+-parseInt(_0x2bfc6d(0x155))/0x3*(parseInt(_0x2bfc6d(0x164))/0x4)+-parseInt(_0x2bfc6d(0x169))/0x5*(-parseInt(_0x2bfc6d(0x15f))/0x6)+parseInt(_0x2bfc6d(0x154))/0x7+parseInt(_0x2bfc6d(0x157))/0x8+parseInt(_0x2bfc6d(0x15d))/0x9;if(_0x561bd8===_0x51543a)break;else _0x5ed34b['push'](_0x5ed34b['shift']());}catch(_0x5965ac){_0x5ed34b['push'](_0x5ed34b['shift']());}}}(a9_0x3c49,0xaf760));function a9_0x5a36(_0x224f3c,_0x343d0f){const _0x3c4926=a9_0x3c49();return a9_0x5a36=function(_0x5a360e,_0x4b08f0){_0x5a360e=_0x5a360e-0x152;let _0x111d77=_0x3c4926[_0x5a360e];return _0x111d77;},a9_0x5a36(_0x224f3c,_0x343d0f);}function a9_0x3c49(){const _0x59a908=['500304oYklEx','511032rmrtGM','enabledOperationCount','79568rruoQk','fields','operations','env','getDatasetList','392499qJskcs','2645307WvqFFp','analyzeDatasetDetail','258EOrwag','datasetCode\x20is\x20required','getDatasetDetail','LOVRABET_ENV','code','32hdvLOQ','LOVRABET_APP_CODE','basic','data','operationCount','145495ekdYnU','124686fNNHnX','supportsCRUD','tableData'];a9_0x3c49=function(){return _0x59a908;};return a9_0x3c49();}import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getDatasetDetail(_0x497147){const _0x3289ca=a9_0x5a36,{appCode:appCode=process[_0x3289ca(0x15a)][_0x3289ca(0x165)],cookie:_0x22ed34,env:env=process[_0x3289ca(0x15a)][_0x3289ca(0x162)]||'online',datasetCode:_0x36c979,forceRefresh:forceRefresh=![]}=_0x497147;if(!appCode)throw new Error('appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.');if(!_0x36c979)throw new Error(_0x3289ca(0x160));const _0x32e33a=new DevApiClient({'appCode':appCode,'cookie':_0x22ed34,'env':env}),_0x1c0255=/^\d+$/['test'](_0x36c979);let _0x7c3b4a;if(_0x1c0255)_0x7c3b4a=_0x36c979;else{const _0x349aee=await _0x32e33a[_0x3289ca(0x15b)]({'pageSize':0x3e7,'forceRefresh':forceRefresh}),_0x5ee013=_0x349aee[_0x3289ca(0x167)]?.[_0x3289ca(0x153)]||[],_0x22b11a=_0x5ee013['find'](_0x5cd5c3=>_0x5cd5c3[_0x3289ca(0x163)]===_0x36c979);if(!_0x22b11a)throw new Error('Dataset\x20not\x20found\x20with\x20code:\x20'+_0x36c979);_0x7c3b4a=String(_0x22b11a['id']);}const _0x5429dd=await _0x32e33a[_0x3289ca(0x161)](_0x7c3b4a,forceRefresh),_0x4d0cfd=new DatasetAnalyzer(),_0x5bab04=_0x4d0cfd[_0x3289ca(0x15e)](_0x5429dd);return{'appCode':appCode,'env':env,'basic':_0x5bab04[_0x3289ca(0x166)],'fields':_0x5bab04[_0x3289ca(0x158)],'operations':_0x5bab04[_0x3289ca(0x159)],'stats':{'fieldCount':_0x5bab04['fieldCount'],'operationCount':_0x5bab04[_0x3289ca(0x168)],'enabledOperationCount':_0x5bab04[_0x3289ca(0x156)],'supportsCRUD':_0x5bab04[_0x3289ca(0x152)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a10_0x2de2(){const _0x23d942=['getOperationDetail','basic','Operation\x20\x27','642474TVyLRY','LOVRABET_ENV','779aJPBiR','Dataset\x20not\x20found\x20with\x20code:\x20','\x27\x20not\x20found\x20in\x20dataset\x20\x27','662MjfkEj','name','CRITICAL:\x20Always\x20use\x20try-catch\x20when\x20calling\x20SDK\x20methods.\x20Success\x20case\x20returns\x20data\x20directly\x20(e.g.,\x20{\x20id:\x20123,\x20name:\x20\x22...\x22\x20}),\x20but\x20failure\x20case\x20throws\x20exception\x20instead\x20of\x20returning\x20error\x20info.','online','getDatasetDetail','tableData','analyzeDatasetDetail','datasetCode\x20is\x20required','792729cNUeDp','276050opwVad','149300iAkNsJ','LOVRABET_APP_CODE','env','556710ullKhq','Throws\x20LovrabetError\x20exception\x20with\x20full\x20response.\x20The\x20error\x20object\x20contains:\x20{\x20message:\x20string,\x20status?:\x20number\x20(HTTP\x20code),\x20code?:\x20string\x20(business\x20error\x20code),\x20data?:\x20any\x20(full\x20error\x20response)\x20}','test','180280EYCsOi','operationName\x20is\x20required','code','find','27KbWMlP','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.'];a10_0x2de2=function(){return _0x23d942;};return a10_0x2de2();}function a10_0x2d54(_0x26eed1,_0x3f1bb2){const _0x2de21b=a10_0x2de2();return a10_0x2d54=function(_0x2d5484,_0x917040){_0x2d5484=_0x2d5484-0x173;let _0x2aa202=_0x2de21b[_0x2d5484];return _0x2aa202;},a10_0x2d54(_0x26eed1,_0x3f1bb2);}(function(_0x136022,_0x21ee32){const _0x3bf060=a10_0x2d54,_0x39272d=_0x136022();while(!![]){try{const _0xc3d7ee=-parseInt(_0x3bf060(0x18e))/0x1*(-parseInt(_0x3bf060(0x173))/0x2)+-parseInt(_0x3bf060(0x18c))/0x3+-parseInt(_0x3bf060(0x17d))/0x4+parseInt(_0x3bf060(0x17c))/0x5+-parseInt(_0x3bf060(0x180))/0x6+parseInt(_0x3bf060(0x17b))/0x7+parseInt(_0x3bf060(0x183))/0x8*(parseInt(_0x3bf060(0x187))/0x9);if(_0xc3d7ee===_0x21ee32)break;else _0x39272d['push'](_0x39272d['shift']());}catch(_0x4f1e60){_0x39272d['push'](_0x39272d['shift']());}}}(a10_0x2de2,0x2488b));import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getOperationDetail(_0x2add72){const _0x20a43f=a10_0x2d54,{appCode:appCode=process[_0x20a43f(0x17f)][_0x20a43f(0x17e)],cookie:_0x4e6ce1,env:env=process[_0x20a43f(0x17f)][_0x20a43f(0x18d)]||_0x20a43f(0x176),datasetCode:_0x401ac8,operationName:_0x4aa777}=_0x2add72;if(!appCode)throw new Error(_0x20a43f(0x188));if(!_0x401ac8)throw new Error(_0x20a43f(0x17a));if(!_0x4aa777)throw new Error(_0x20a43f(0x184));const _0x2224a7=new DevApiClient({'appCode':appCode,'cookie':_0x4e6ce1,'env':env}),_0x50a723=/^\d+$/[_0x20a43f(0x182)](_0x401ac8);let _0x16bff4;if(_0x50a723)_0x16bff4=_0x401ac8;else{const _0x478844=await _0x2224a7['getDatasetList']({'pageSize':0x3e7}),_0x3b4168=_0x478844['data']?.[_0x20a43f(0x178)]||[],_0x2059f1=_0x3b4168[_0x20a43f(0x186)](_0x12f029=>_0x12f029[_0x20a43f(0x185)]===_0x401ac8);if(!_0x2059f1)throw new Error(_0x20a43f(0x18f)+_0x401ac8);_0x16bff4=String(_0x2059f1['id']);}const _0x553636=await _0x2224a7[_0x20a43f(0x177)](_0x16bff4),_0x1f9e52=new DatasetAnalyzer(),_0x76f97d=_0x1f9e52[_0x20a43f(0x189)](_0x553636,_0x4aa777);if(!_0x76f97d)throw new Error(_0x20a43f(0x18b)+_0x4aa777+_0x20a43f(0x190)+_0x401ac8+'\x27');const _0x35d8c5=_0x1f9e52[_0x20a43f(0x179)](_0x553636);return{'appCode':appCode,'env':env,'datasetName':_0x35d8c5[_0x20a43f(0x18a)][_0x20a43f(0x174)],'operation':_0x76f97d,'sdkReturnValueBehavior':{'onSuccess':'Returns\x20ONLY\x20the\x20\x27data\x27\x20field\x20content.\x20Full\x20API\x20response\x20is\x20{\x20success:\x20true,\x20data:\x20{...},\x20msg:\x20\x22\x22,\x20errorMsg:\x20\x22\x22,\x20errorCode:\x20\x220000\x22\x20},\x20but\x20SDK\x20returns\x20just\x20the\x20{...}\x20part\x20from\x20\x27data\x27.','onError':_0x20a43f(0x181),'note':_0x20a43f(0x175)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb185db,_0x319d25){const _0x558cac=a11_0x1256,_0x1126f0=_0xb185db();while(!![]){try{const _0x457a0e=parseInt(_0x558cac(0x1ed))/0x1+parseInt(_0x558cac(0x1e4))/0x2+parseInt(_0x558cac(0x1dd))/0x3+parseInt(_0x558cac(0x1df))/0x4+parseInt(_0x558cac(0x1e5))/0x5*(-parseInt(_0x558cac(0x1de))/0x6)+-parseInt(_0x558cac(0x1d5))/0x7*(-parseInt(_0x558cac(0x1e0))/0x8)+-parseInt(_0x558cac(0x1ef))/0x9*(parseInt(_0x558cac(0x1dc))/0xa);if(_0x457a0e===_0x319d25)break;else _0x1126f0['push'](_0x1126f0['shift']());}catch(_0x3e4288){_0x1126f0['push'](_0x1126f0['shift']());}}}(a11_0x2dc2,0x69245));import{DevApiClient}from'../api/dev-api-client.js';function a11_0x1256(_0x14ccae,_0x367e29){const _0x2dc2e8=a11_0x2dc2();return a11_0x1256=function(_0x125627,_0x225a35){_0x125627=_0x125627-0x1d0;let _0x492130=_0x2dc2e8[_0x125627];return _0x492130;},a11_0x1256(_0x14ccae,_0x367e29);}import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getDatasetOperations(_0x301001){const _0x50c9dd=a11_0x1256,{appCode:appCode=process[_0x50c9dd(0x1d7)][_0x50c9dd(0x1f1)],cookie:_0x388908,env:env=process[_0x50c9dd(0x1d7)][_0x50c9dd(0x1e1)]||'online',datasetCode:_0x36e249}=_0x301001;if(!appCode)throw new Error(_0x50c9dd(0x1eb));if(!_0x36e249)throw new Error(_0x50c9dd(0x1ec));const _0x1add67=new DevApiClient({'appCode':appCode,'cookie':_0x388908,'env':env}),_0x486699=/^\d+$/[_0x50c9dd(0x1e7)](_0x36e249);let _0xf47907;if(_0x486699)_0xf47907=_0x36e249;else{const _0x43bebc=await _0x1add67[_0x50c9dd(0x1ea)]({'pageSize':0x3e7}),_0x5317d7=_0x43bebc[_0x50c9dd(0x1d1)]?.['tableData']||[],_0x44f517=_0x5317d7[_0x50c9dd(0x1e3)](_0x252724=>_0x252724[_0x50c9dd(0x1e6)]===_0x36e249);if(!_0x44f517)throw new Error('Dataset\x20not\x20found\x20with\x20code:\x20'+_0x36e249);_0xf47907=String(_0x44f517['id']);}const _0x129bb4=await _0x1add67['getDatasetDetail'](_0xf47907),_0x5953fc=new DatasetAnalyzer(),_0x1fb5c9=_0x5953fc['analyzeDatasetDetail'](_0x129bb4);return{'appCode':appCode,'env':env,'datasetName':_0x1fb5c9['basic'][_0x50c9dd(0x1d8)],'tableName':_0x1fb5c9[_0x50c9dd(0x1d2)][_0x50c9dd(0x1db)],'operations':_0x1fb5c9[_0x50c9dd(0x1ee)][_0x50c9dd(0x1f0)](_0x575d25=>({'name':_0x575d25[_0x50c9dd(0x1d8)],'displayName':_0x575d25[_0x50c9dd(0x1e2)],'type':_0x575d25[_0x50c9dd(0x1d0)],'method':_0x575d25[_0x50c9dd(0x1d6)],'path':_0x575d25[_0x50c9dd(0x1d9)],'requestFieldsCount':_0x575d25[_0x50c9dd(0x1da)],'enabled':_0x575d25[_0x50c9dd(0x1e9)]})),'stats':{'total':_0x1fb5c9[_0x50c9dd(0x1d3)],'enabled':_0x1fb5c9[_0x50c9dd(0x1d4)],'supportsCRUD':_0x1fb5c9[_0x50c9dd(0x1e8)]}};}function a11_0x2dc2(){const _0x495984=['1640868ngJTuq','2186428WCoVoi','815032CyDIeP','LOVRABET_ENV','displayName','find','516034odsPej','5SJuZJh','code','test','supportsCRUD','enabled','getDatasetList','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','datasetCode\x20is\x20required','40786vokusI','operations','1564065Vbiayz','map','LOVRABET_APP_CODE','type','data','basic','operationCount','enabledOperationCount','21ztxRXC','method','env','name','path','requestFieldsCount','tableName','70xXuZCL','2308761PtoRJy'];a11_0x2dc2=function(){return _0x495984;};return a11_0x2dc2();}
|
package/dist/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a13_0x118d(_0x3e6644,_0x734616){const _0x551d1a=a13_0x551d();return a13_0x118d=function(_0x118d16,_0x52c016){_0x118d16=_0x118d16-0xc5;let _0x48f2a6=_0x551d1a[_0x118d16];return _0x48f2a6;},a13_0x118d(_0x3e6644,_0x734616);}const a13_0x53b882=a13_0x118d;(function(_0x357fe0,_0x511e3e){const _0x357c56=a13_0x118d,_0x7f7b6f=_0x357fe0();while(!![]){try{const _0x484739=-parseInt(_0x357c56(0xd1))/0x1+-parseInt(_0x357c56(0xcd))/0x2+parseInt(_0x357c56(0xe1))/0x3+parseInt(_0x357c56(0xea))/0x4+parseInt(_0x357c56(0xd8))/0x5+parseInt(_0x357c56(0xdc))/0x6*(parseInt(_0x357c56(0xd9))/0x7)+-parseInt(_0x357c56(0xe4))/0x8*(parseInt(_0x357c56(0xca))/0x9);if(_0x484739===_0x511e3e)break;else _0x7f7b6f['push'](_0x7f7b6f['shift']());}catch(_0x22cfbe){_0x7f7b6f['push'](_0x7f7b6f['shift']());}}}(a13_0x551d,0xbbc52));function a13_0x551d(){const _0xdec8da=['9aYMrWK','object','search_datasets','1914674wYCkYo','login','number','get_dataset_operations','609208CzSlvs','string','Get\x20list\x20of\x20all\x20datasets\x20for\x20an\x20application','Search\x20keyword','list_datasets','Login\x20to\x20Lovrabet\x20to\x20authenticate\x20for\x20dataset\x20queries','Page\x20number\x20to\x20fetch\x20(default:\x201)','3067385LFHwbb','29449ddJtQd','Environment\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','datasetCode','1392WZbcJf','Authentication\x20cookie\x20(optional,\x20uses\x20stored\x20cookie\x20from\x20login\x20if\x20not\x20provided)','keyword','Number\x20of\x20datasets\x20per\x20page\x20(default:\x20999)','Get\x20list\x20of\x20all\x20API\x20operations\x20available\x20for\x20a\x20dataset','4182546CXjQkR','SQL\x20code\x20(format:\x20\x22appCode-sqlId\x22\x20or\x20numeric\x20sqlId\x20as\x20string)','operationName','6943736hsiwsJ','Search\x20datasets\x20by\x20keyword\x20(searches\x20in\x20name,\x20table\x20name,\x20code,\x20and\x20description)','Bypass\x20cache\x20and\x20fetch\x20fresh\x20data\x20from\x20API\x20(default:\x20false).\x20Set\x20to\x20true\x20when\x20you\x20need\x20the\x20latest\x20data.','Dataset\x20code/ID','get_operation_detail','Get\x20detailed\x20information\x20about\x20a\x20specific\x20operation\x20including\x20request/response\x20examples.\x0a\x0aNote:\x20SDK\x20methods\x20(create,\x20update,\x20getList,\x20etc.)\x20return\x20ONLY\x20the\x20\x27data\x27\x20field\x20on\x20success,\x20and\x20throw\x20LovrabetError\x20on\x20failure.\x20Always\x20use\x20try-catch.','879740bGsvmI','generate_sdk_code','boolean','Include\x20import\x20statements\x20and\x20full\x20example\x20(default:\x20true)','Operation\x20name\x20(e.g.,\x20getList,\x20create,\x20update)','online','Optional\x20SQL\x20parameters\x20(key-value\x20pairs,\x20values\x20should\x20be\x20strings\x20or\x20numbers)','Execute\x20SQL\x20to\x20get\x20sample\x20data\x20and\x20infer\x20types\x20(default:\x20true)','Environment\x20to\x20login\x20to\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)'];a13_0x551d=function(){return _0xdec8da;};return a13_0x551d();}export{login}from'./login.js';export{listDatasets}from'./list-datasets.js';export{getDatasetDetail}from'./get-dataset-detail.js';export{getDatasetOperations}from'./get-operations.js';export{getOperationDetail}from'./get-operation-detail.js';export{generateSDKCode}from'./generate-sdk-code.js';export{searchDatasets}from'./search-datasets.js';export{generateSqlCode}from'./generate-sql-code.js';const authProperties={'appCode':{'type':a13_0x53b882(0xd2),'description':'Application\x20code\x20(optional\x20if\x20LOVRABET_APP_CODE\x20env\x20var\x20is\x20set)'},'cookie':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xdd)},'env':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xda),'enum':[a13_0x53b882(0xc6),'daily']}};export const TOOL_DEFINITIONS=[{'name':a13_0x53b882(0xce),'description':a13_0x53b882(0xd6),'inputSchema':{'type':a13_0x53b882(0xcb),'properties':{'env':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xc9),'enum':[a13_0x53b882(0xc6),'daily']}},'required':[]}},{'name':a13_0x53b882(0xd5),'description':a13_0x53b882(0xd3),'inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'pageSize':{'type':a13_0x53b882(0xcf),'description':a13_0x53b882(0xdf)},'currentPage':{'type':a13_0x53b882(0xcf),'description':a13_0x53b882(0xd7)},'forceRefresh':{'type':'boolean','description':a13_0x53b882(0xe6)}},'required':[]}},{'name':'get_dataset_detail','description':'Get\x20detailed\x20information\x20about\x20a\x20specific\x20dataset\x20including\x20all\x20field\x20definitions','inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'datasetCode':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xe7)},'forceRefresh':{'type':a13_0x53b882(0xec),'description':a13_0x53b882(0xe6)}},'required':['datasetCode']}},{'name':a13_0x53b882(0xd0),'description':a13_0x53b882(0xe0),'inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a13_0x53b882(0xd2),'description':'Dataset\x20code/ID'}},'required':[a13_0x53b882(0xdb)]}},{'name':a13_0x53b882(0xe8),'description':a13_0x53b882(0xe9),'inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'datasetCode':{'type':a13_0x53b882(0xd2),'description':'Dataset\x20code/ID'},'operationName':{'type':'string','description':a13_0x53b882(0xc5)}},'required':[a13_0x53b882(0xdb),'operationName']}},{'name':a13_0x53b882(0xeb),'description':'Generate\x20SDK\x20code\x20example\x20for\x20calling\x20a\x20specific\x20operation,\x20including\x20complete\x20field\x20metadata\x20(required,\x20enum\x20values,\x20etc.).\x0a\x0aIMPORTANT\x20-\x20SDK\x20Return\x20Value\x20Behavior:\x0a•\x20On\x20Success:\x20Returns\x20ONLY\x20the\x20\x27data\x27\x20field\x20from\x20the\x20API\x20response\x20(not\x20the\x20full\x20JSON)\x0a\x20\x20Example:\x20create()\x20returns\x20{\x20id:\x20123,\x20name:\x20\x22...\x22\x20}\x20directly\x0a•\x20On\x20Error:\x20Throws\x20a\x20LovrabetError\x20exception\x20containing\x20the\x20full\x20response\x20JSON\x0a\x20\x20Error\x20has\x20properties:\x20message,\x20status\x20(HTTP\x20code),\x20code\x20(business\x20error\x20code),\x20data\x20(full\x20error\x20response)\x0a\x0aAlways\x20use\x20try-catch\x20when\x20calling\x20SDK\x20methods\x20like\x20create(),\x20update(),\x20getList(),\x20etc.','inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'datasetCode':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xe7)},'operationName':{'type':'string','description':a13_0x53b882(0xc5)},'includeImports':{'type':a13_0x53b882(0xec),'description':'Include\x20import\x20statements\x20and\x20full\x20example\x20(default:\x20true)'}},'required':[a13_0x53b882(0xdb),a13_0x53b882(0xe3)]}},{'name':a13_0x53b882(0xcc),'description':a13_0x53b882(0xe5),'inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'keyword':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xd4)}},'required':[a13_0x53b882(0xde)]}},{'name':'generate_sql_code','description':'Generate\x20SDK\x20code\x20example\x20for\x20calling\x20a\x20SQL\x20query.\x0a\x0aIMPORTANT\x20-\x20SDK\x20Return\x20Value\x20Behavior:\x0a•\x20SDK\x20returns\x20the\x20\x27data\x27\x20field:\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[]\x20}\x0a•\x20Application\x20layer\x20must\x20check\x20execSuccess\x20and\x20use\x20execResult\x0a•\x20Example:\x0a\x20\x20const\x20data\x20=\x20await\x20client.api.executeSql(\x27sqlCode\x27);\x0a\x20\x20if\x20(data.execSuccess\x20&&\x20data.execResult)\x20{\x0a\x20\x20\x20\x20data.execResult.forEach(row\x20=>\x20{\x20...\x20});\x0a\x20\x20}\x0a\x0aFeatures:\x0a•\x20Automatically\x20fetches\x20SQL\x20info\x20(name,\x20description,\x20raw\x20SQL\x20statement)\x20from\x20platform\x0a•\x20Automatically\x20executes\x20SQL\x20to\x20get\x20sample\x20data\x20(can\x20be\x20disabled)\x0a•\x20Infers\x20TypeScript\x20types\x20from\x20actual\x20data\x0a•\x20Generates\x20complete\x20example\x20with\x20error\x20handling','inputSchema':{'type':a13_0x53b882(0xcb),'properties':{...authProperties,'sqlCode':{'type':a13_0x53b882(0xd2),'description':a13_0x53b882(0xe2)},'sqlParams':{'type':a13_0x53b882(0xcb),'description':a13_0x53b882(0xc7),'additionalProperties':!![]},'executeExample':{'type':a13_0x53b882(0xec),'description':a13_0x53b882(0xc8)},'includeImports':{'type':a13_0x53b882(0xec),'description':a13_0x53b882(0xed)}},'required':['sqlCode']}}];
|
|
1
|
+
const a12_0x4f770e=a12_0x3c23;(function(_0x46aa61,_0x48fd9c){const _0x5ae139=a12_0x3c23,_0x178af1=_0x46aa61();while(!![]){try{const _0x3ce093=-parseInt(_0x5ae139(0x111))/0x1+parseInt(_0x5ae139(0x115))/0x2*(-parseInt(_0x5ae139(0x116))/0x3)+-parseInt(_0x5ae139(0x112))/0x4*(-parseInt(_0x5ae139(0x118))/0x5)+parseInt(_0x5ae139(0x122))/0x6*(parseInt(_0x5ae139(0x11d))/0x7)+parseInt(_0x5ae139(0x128))/0x8*(-parseInt(_0x5ae139(0x109))/0x9)+-parseInt(_0x5ae139(0x12e))/0xa*(-parseInt(_0x5ae139(0x108))/0xb)+-parseInt(_0x5ae139(0x10c))/0xc*(parseInt(_0x5ae139(0x124))/0xd);if(_0x3ce093===_0x48fd9c)break;else _0x178af1['push'](_0x178af1['shift']());}catch(_0x256232){_0x178af1['push'](_0x178af1['shift']());}}}(a12_0x5875,0x56f24));export{login}from'./login.js';export{listDatasets}from'./list-datasets.js';export{getDatasetDetail}from'./get-dataset-detail.js';export{getDatasetOperations}from'./get-operations.js';export{getOperationDetail}from'./get-operation-detail.js';export{generateSDKCode}from'./generate-sdk-code.js';export{searchDatasets}from'./search-datasets.js';function a12_0x3c23(_0x2262b5,_0x27d4b3){const _0x587580=a12_0x5875();return a12_0x3c23=function(_0x3c23b2,_0x25afe8){_0x3c23b2=_0x3c23b2-0x106;let _0x27ed7f=_0x587580[_0x3c23b2];return _0x27ed7f;},a12_0x3c23(_0x2262b5,_0x27d4b3);}export{listSqlQueries}from'./list-sql-queries.js';function a12_0x5875(){const _0x3621cf=['Login\x20to\x20Lovrabet\x20to\x20authenticate\x20for\x20dataset\x20queries','login','2HqIhEF','733239WfFnTp','Get\x20list\x20of\x20all\x20API\x20operations\x20available\x20for\x20a\x20dataset.\x0a\x0aCRITICAL\x20-\x20Data\x20Query\x20Best\x20Practices:\x0a•\x20ALWAYS\x20use\x20filter\x20operation\x20for\x20querying\x20data\x20(most\x20flexible,\x20supports\x20complex\x20conditions)\x0a•\x20ONLY\x20use\x20getOne\x20when\x20you\x20have\x20a\x20specific\x20primary\x20key\x20ID\x0a•\x20AVOID\x20using\x20getList\x20unless\x20the\x20requirement\x20explicitly\x20needs\x20simple\x20listing\x20without\x20conditions\x0a•\x20filter\x20supports:\x20complex\x20where\x20conditions,\x20pagination,\x20sorting,\x20field\x20selection\x0a•\x20getOne\x20is\x20for:\x20single\x20record\x20retrieval\x20by\x20ID\x20only\x0a•\x20getList\x20is\x20for:\x20simple\x20unfiltered\x20listing\x20(rarely\x20needed\x20in\x20practice)','227720TaSjcY','generate_sdk_code','string','daily','Authentication\x20cookie\x20(optional,\x20uses\x20stored\x20cookie\x20from\x20login\x20if\x20not\x20provided)','9506OpWDKc','get_dataset_operations','Get\x20detailed\x20information\x20about\x20a\x20specific\x20dataset\x20including\x20all\x20field\x20definitions','number','Environment\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','2046XbmNDo','list_sql_queries','65lqIfRy','Number\x20of\x20datasets\x20per\x20page\x20(default:\x20999)','operationName','Operation\x20name\x20(e.g.,\x20filter,\x20getOne,\x20create,\x20update).\x20Prefer\x20\x22filter\x22\x20for\x20queries.','3188312pCBYhY','Search\x20datasets\x20by\x20keyword\x20(searches\x20in\x20name,\x20table\x20name,\x20code,\x20and\x20description)','Get\x20detailed\x20information\x20about\x20a\x20specific\x20operation\x20including\x20request/response\x20examples.\x0a\x0aCRITICAL\x20-\x20Data\x20Query\x20Best\x20Practices:\x0a•\x20ALWAYS\x20use\x20filter\x20operation\x20for\x20querying\x20data\x20(most\x20flexible,\x20supports\x20complex\x20conditions)\x0a•\x20ONLY\x20use\x20getOne\x20when\x20you\x20have\x20a\x20specific\x20primary\x20key\x20ID\x0a•\x20AVOID\x20using\x20getList\x20unless\x20the\x20requirement\x20explicitly\x20needs\x20simple\x20listing\x20without\x20conditions\x0a•\x20filter\x20supports:\x20complex\x20where\x20conditions,\x20pagination,\x20sorting,\x20field\x20selection\x0a•\x20getOne\x20is\x20for:\x20single\x20record\x20retrieval\x20by\x20ID\x20only\x0a•\x20getList\x20is\x20for:\x20simple\x20unfiltered\x20listing\x20(rarely\x20needed\x20in\x20practice)\x0a\x0aNote:\x20SDK\x20methods\x20(create,\x20update,\x20getList,\x20filter,\x20etc.)\x20return\x20ONLY\x20the\x20\x27data\x27\x20field\x20on\x20success,\x20and\x20throw\x20LovrabetError\x20on\x20failure.\x20Always\x20use\x20try-catch.','get_dataset_detail','get_operation_detail','Dataset\x20code/ID','5538300rxhAfd','Search\x20keyword','Page\x20number\x20to\x20fetch\x20(default:\x201)','11iDemFX','9pQvInQ','Bypass\x20cache\x20and\x20fetch\x20fresh\x20data\x20from\x20API\x20(default:\x20false).\x20Set\x20to\x20true\x20when\x20you\x20need\x20the\x20latest\x20data.','boolean','951348LxBeEV','Environment\x20to\x20login\x20to\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','object','Get\x20list\x20of\x20all\x20datasets\x20for\x20an\x20application','datasetCode','213501SZJXsG','52VlmwbK'];a12_0x5875=function(){return _0x3621cf;};return a12_0x5875();}const authProperties={'appCode':{'type':a12_0x4f770e(0x11a),'description':'Application\x20code\x20(optional\x20if\x20LOVRABET_APP_CODE\x20env\x20var\x20is\x20set)'},'cookie':{'type':'string','description':a12_0x4f770e(0x11c)},'env':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x121),'enum':['online',a12_0x4f770e(0x11b)]}};export const TOOL_DEFINITIONS=[{'name':a12_0x4f770e(0x114),'description':a12_0x4f770e(0x113),'inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{'env':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x10d),'enum':['online','daily']}},'required':[]}},{'name':'list_datasets','description':a12_0x4f770e(0x10f),'inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{...authProperties,'pageSize':{'type':a12_0x4f770e(0x120),'description':a12_0x4f770e(0x125)},'currentPage':{'type':a12_0x4f770e(0x120),'description':a12_0x4f770e(0x107)},'forceRefresh':{'type':a12_0x4f770e(0x10b),'description':'Bypass\x20cache\x20and\x20fetch\x20fresh\x20data\x20from\x20API\x20(default:\x20false).\x20Set\x20to\x20true\x20when\x20you\x20need\x20the\x20latest\x20data.'}},'required':[]}},{'name':a12_0x4f770e(0x12b),'description':a12_0x4f770e(0x11f),'inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{...authProperties,'datasetCode':{'type':a12_0x4f770e(0x11a),'description':'Dataset\x20code/ID'},'forceRefresh':{'type':'boolean','description':a12_0x4f770e(0x10a)}},'required':[a12_0x4f770e(0x110)]}},{'name':a12_0x4f770e(0x11e),'description':a12_0x4f770e(0x117),'inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x12d)}},'required':[a12_0x4f770e(0x110)]}},{'name':a12_0x4f770e(0x12c),'description':a12_0x4f770e(0x12a),'inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{...authProperties,'datasetCode':{'type':a12_0x4f770e(0x11a),'description':'Dataset\x20code/ID'},'operationName':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x127)}},'required':[a12_0x4f770e(0x110),a12_0x4f770e(0x126)]}},{'name':a12_0x4f770e(0x119),'description':'Generate\x20SDK\x20code\x20example\x20for\x20calling\x20a\x20specific\x20operation,\x20including\x20complete\x20field\x20metadata\x20(required,\x20enum\x20values,\x20etc.).\x0a\x0aCRITICAL\x20-\x20Data\x20Query\x20Best\x20Practices:\x0a•\x20ALWAYS\x20use\x20filter\x20operation\x20for\x20querying\x20data\x20(most\x20flexible,\x20supports\x20complex\x20conditions)\x0a•\x20ONLY\x20use\x20getOne\x20when\x20you\x20have\x20a\x20specific\x20primary\x20key\x20ID\x0a•\x20AVOID\x20using\x20getList\x20unless\x20the\x20requirement\x20explicitly\x20needs\x20simple\x20listing\x20without\x20conditions\x0a•\x20filter\x20supports:\x20complex\x20where\x20conditions,\x20pagination,\x20sorting,\x20field\x20selection\x0a•\x20getOne\x20is\x20for:\x20single\x20record\x20retrieval\x20by\x20ID\x20only\x0a•\x20getList\x20is\x20for:\x20simple\x20unfiltered\x20listing\x20(rarely\x20needed\x20in\x20practice)\x0a\x0aIMPORTANT\x20-\x20SDK\x20Return\x20Value\x20Behavior:\x0a•\x20On\x20Success:\x20Returns\x20ONLY\x20the\x20\x27data\x27\x20field\x20from\x20the\x20API\x20response\x20(not\x20the\x20full\x20JSON)\x0a\x20\x20Example:\x20create()\x20returns\x20{\x20id:\x20123,\x20name:\x20\x22...\x22\x20}\x20directly\x0a•\x20On\x20Error:\x20Throws\x20a\x20LovrabetError\x20exception\x20containing\x20the\x20full\x20response\x20JSON\x0a\x20\x20Error\x20has\x20properties:\x20message,\x20status\x20(HTTP\x20code),\x20code\x20(business\x20error\x20code),\x20data\x20(full\x20error\x20response)\x0a\x0aAlways\x20use\x20try-catch\x20when\x20calling\x20SDK\x20methods\x20like\x20create(),\x20update(),\x20filter(),\x20etc.','inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{...authProperties,'datasetCode':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x12d)},'operationName':{'type':a12_0x4f770e(0x11a),'description':'Operation\x20name\x20(e.g.,\x20filter,\x20getOne,\x20create,\x20update).\x20Prefer\x20\x22filter\x22\x20for\x20queries.'},'includeImports':{'type':a12_0x4f770e(0x10b),'description':'Include\x20import\x20statements\x20and\x20full\x20example\x20(default:\x20true)'}},'required':[a12_0x4f770e(0x110),a12_0x4f770e(0x126)]}},{'name':'search_datasets','description':a12_0x4f770e(0x129),'inputSchema':{'type':a12_0x4f770e(0x10e),'properties':{...authProperties,'keyword':{'type':a12_0x4f770e(0x11a),'description':a12_0x4f770e(0x106)}},'required':['keyword']}},{'name':a12_0x4f770e(0x123),'description':'List\x20all\x20available\x20SQL\x20queries\x20with\x20complete,\x20ready-to-use\x20code\x20examples.\x0a\x0aThis\x20is\x20the\x20ONLY\x20tool\x20needed\x20for\x20SQL\x20queries.\x20It\x20provides\x20EVERYTHING:\x0a•\x20Complete\x20list\x20of\x20available\x20SQL\x20queries\x20for\x20the\x20application\x0a•\x20Each\x20SQL\x20includes\x20full\x20executable\x20TypeScript\x20code\x20in\x20codeExample\x20field\x0a•\x20Parameters\x20with\x20example\x20values\x0a•\x20Important\x20usage\x20notes\x20and\x20error\x20handling\x20patterns\x0a\x0aIMPORTANT:\x20The\x20execution\x20pattern\x20is\x20ALWAYS\x20the\x20same\x20for\x20ALL\x20SQLs:\x0aconst\x20data\x20=\x20await\x20client.api.executeSql(sqlCode,\x20params);\x0aif\x20(!data.execSuccess)\x20{\x0a\x20\x20throw\x20new\x20Error(data.execError\x20||\x20\x27SQL\x20execution\x20failed\x27);\x0a}\x0aconst\x20results\x20=\x20data.execResult\x20||\x20[];\x0a\x0aKey\x20points\x20emphasized\x20in\x20each\x20SQL\x27s\x20code\x20example:\x0a•\x20SDK\x20returns\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[],\x20execError?:\x20string\x20}\x0a•\x20Always\x20check\x20execSuccess\x20before\x20using\x20execResult\x0a•\x20Use\x20try-catch\x20for\x20HTTP\x20errors\x20(network,\x20auth)\x0a•\x20Business\x20errors\x20are\x20in\x20data.execError\x20(not\x20thrown)\x0a\x0aYou\x20do\x20NOT\x20need\x20to\x20execute\x20SQLs\x20-\x20just\x20show\x20users\x20the\x20provided\x20code\x20examples.','inputSchema':{'type':'object','properties':{...authProperties,'keyword':{'type':a12_0x4f770e(0x11a),'description':'Optional:\x20search\x20SQL\x20queries\x20by\x20name,\x20description,\x20or\x20SQL\x20content'},'category':{'type':'string','description':'Optional:\x20filter\x20by\x20category\x20(report,\x20analysis,\x20export,\x20etc.)'},'pageSize':{'type':a12_0x4f770e(0x120),'description':'Number\x20of\x20items\x20per\x20page\x20(default:\x20999)'},'currentPage':{'type':a12_0x4f770e(0x120),'description':'Page\x20number\x20to\x20fetch\x20(default:\x201)'}},'required':[]}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x186131,_0x3f6a3c){const _0x590c47=a13_0x3e22,_0x13f238=_0x186131();while(!![]){try{const _0x3878e7=-parseInt(_0x590c47(0x164))/0x1*(parseInt(_0x590c47(0x15c))/0x2)+parseInt(_0x590c47(0x16a))/0x3+parseInt(_0x590c47(0x169))/0x4*(parseInt(_0x590c47(0x16b))/0x5)+-parseInt(_0x590c47(0x162))/0x6*(parseInt(_0x590c47(0x15f))/0x7)+-parseInt(_0x590c47(0x16c))/0x8+parseInt(_0x590c47(0x15e))/0x9*(-parseInt(_0x590c47(0x163))/0xa)+parseInt(_0x590c47(0x166))/0xb;if(_0x3878e7===_0x3f6a3c)break;else _0x13f238['push'](_0x13f238['shift']());}catch(_0x28993e){_0x13f238['push'](_0x13f238['shift']());}}}(a13_0x1ea2,0x58729));function a13_0x1ea2(){const _0x11c191=['datasets','env','918cjVUJJ','20uuvSPM','1225rXzQTu','analyzeDatasetList','8197739pZeWsT','online','total','236rtgvGd','1571118vxYlpl','43005uGBSih','3142144NYsVOo','170cvhNnA','getDatasetList','1898217lCQHxq','22666wDHJil'];a13_0x1ea2=function(){return _0x11c191;};return a13_0x1ea2();}import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';function a13_0x3e22(_0x16cfec,_0x3d9b39){const _0x1ea275=a13_0x1ea2();return a13_0x3e22=function(_0x3e22,_0x55ce16){_0x3e22=_0x3e22-0x15c;let _0x197a4f=_0x1ea275[_0x3e22];return _0x197a4f;},a13_0x3e22(_0x16cfec,_0x3d9b39);}export async function listDatasets(_0x19a2c5={}){const _0x32520f=a13_0x3e22,{appCode:appCode=process[_0x32520f(0x161)]['LOVRABET_APP_CODE'],env:env=process[_0x32520f(0x161)]['LOVRABET_ENV']||_0x32520f(0x167),cookie:_0x4d511e,pageSize:pageSize=0x3e7,currentPage:currentPage=0x1,forceRefresh:forceRefresh=![]}=_0x19a2c5;if(!appCode)throw new Error('appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.');const _0x545bb2=new DevApiClient({'appCode':appCode,'env':env,'cookie':_0x4d511e}),_0x25794b=await _0x545bb2[_0x32520f(0x15d)]({'pageSize':pageSize,'currentPage':currentPage,'forceRefresh':forceRefresh}),_0x5b64e7=new DatasetAnalyzer(),_0x383b43=_0x5b64e7[_0x32520f(0x165)](_0x25794b);return{'appCode':appCode,'env':env,'total':_0x383b43[_0x32520f(0x168)],'datasets':_0x383b43[_0x32520f(0x160)]};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4fdf99,_0x36af54){const _0x2f7420=a14_0x3db5,_0x2d7a7a=_0x4fdf99();while(!![]){try{const _0x5eee85=-parseInt(_0x2f7420(0xb3))/0x1*(-parseInt(_0x2f7420(0x90))/0x2)+-parseInt(_0x2f7420(0xa6))/0x3+-parseInt(_0x2f7420(0x9c))/0x4*(parseInt(_0x2f7420(0xa3))/0x5)+parseInt(_0x2f7420(0xa2))/0x6*(-parseInt(_0x2f7420(0x95))/0x7)+parseInt(_0x2f7420(0x7f))/0x8+parseInt(_0x2f7420(0xb0))/0x9*(-parseInt(_0x2f7420(0xc1))/0xa)+parseInt(_0x2f7420(0x8c))/0xb;if(_0x5eee85===_0x36af54)break;else _0x2d7a7a['push'](_0x2d7a7a['shift']());}catch(_0x1e1991){_0x2d7a7a['push'](_0x2d7a7a['shift']());}}}(a14_0x6731,0xaead7));function a14_0x6731(){const _0x7b2040=['\x27,\x0a\x20\x20env:\x20\x27','description','17909826xfeNJd','map','ceil','slice','1258214elNabQ','\x22\x0aconst\x20data\x20=\x20await\x20client.api.executeSql(\x27','limit','sql','The\x20executeSql\x20method\x20accepts\x20two\x20parameters:\x20sqlCode\x20(string)\x20and\x20optional\x20params\x20(object)','35oxllpw','other','category','No\x20SQL\x20queries\x20found.\x20Check\x20your\x20appCode\x20and\x20authentication.','Each\x20SQL\x20query\x20above\x20includes\x20a\x20codeExample\x20field\x20with\x20complete\x20TypeScript\x20code\x20ready\x20to\x20use','type','string','208meMdhS','IMPORTANT:\x20Always\x20check\x20data.execSuccess\x20before\x20using\x20data.execResult','all','includes','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','\x0a//\x20Example:\x20Using\x20SQL\x20\x22','949236EZmdpS','80895yKDdHY','length','The\x20execResult\x20contains\x20an\x20array\x20of\x20row\x20objects\x20matching\x20your\x20SQL\x20query\x20structure','223548VJCmVW','from','name','createTime','sqlId','IMPORTANT:\x20Business\x20logic\x20errors\x20(SQL\x20failures)\x20are\x20returned\x20in\x20data.execError,\x20not\x20thrown','data','filter','Found\x20','LOVRABET_APP_CODE','3753SunaiC','This\x20SQL\x20does\x20not\x20require\x20any\x20parameters','\x20SQL\x20queries\x20for\x20application\x20','1AhJXJL','reduce','getCustomSqlList','toLowerCase','Parameter:\x20','IMPORTANT:\x20Use\x20try-catch\x20to\x20handle\x20HTTP\x20errors\x20(network\x20issues,\x20auth\x20failures)','SQL\x20Query','count','join','Custom\x20SQL','sqlName','.\x20Each\x20SQL\x20includes\x20a\x20complete\x20code\x20example\x20showing\x20how\x20to\x20execute\x20it\x20using\x20the\x20SDK.','This\x20SQL\x20requires\x20parameters:\x20','sql_list','20810hxkdWO','total','createdTime','IMPORTANT:\x20The\x20SDK\x20returns\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[],\x20execError?:\x20string\x20}','sqlContent',');\x0a\x0a//\x20IMPORTANT:\x20Check\x20execution\x20status\x20before\x20using\x20results\x0aif\x20(!data.execSuccess)\x20{\x0a\x20\x20throw\x20new\x20Error(`SQL\x20execution\x20failed:\x20${data.execError\x20||\x20\x27Unknown\x20error\x27}`);\x0a}\x0a\x0a//\x20Process\x20the\x20results\x0aconst\x20results\x20=\x20data.execResult\x20||\x20[];\x0aconsole.log(`Retrieved\x20${results.length}\x20rows`);\x0a\x0a//\x20Use\x20the\x20data\x0aresults.forEach(row\x20=>\x20{\x0a\x20\x20console.log(row);\x0a});','SQL-','match','tableData','time','online','8262696NfNEbt','replace','env','IMPORTANT:\x20All\x20SQL\x20queries\x20use\x20the\x20same\x20execution\x20pattern\x20-\x20client.api.executeSql(sqlCode,\x20params)','\x27,\x0a});\x0a\x0a//\x20Execute\x20the\x20SQL\x20query:\x20','sqlCode','On\x20HTTP\x20error,\x20SDK\x20throws\x20LovrabetError\x20exception\x20-\x20use\x20try-catch\x20for\x20error\x20handling','\x27);\x0aif\x20(!data.execSuccess)\x20{\x0a\x20\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);\x0a}\x0aconst\x20results\x20=\x20data.execResult\x20||\x20[];','LOVRABET_ENV','example','message'];a14_0x6731=function(){return _0x7b2040;};return a14_0x6731();}import{DevApiClient}from'../api/dev-api-client.js';function a14_0x3db5(_0x356f8d,_0x1df9d6){const _0x6731fa=a14_0x6731();return a14_0x3db5=function(_0x3db538,_0x3a89d9){_0x3db538=_0x3db538-0x77;let _0xfb4506=_0x6731fa[_0x3db538];return _0xfb4506;},a14_0x3db5(_0x356f8d,_0x1df9d6);}export async function listSqlQueries(_0x2a99fe={}){const _0x4b3359=a14_0x3db5,{appCode:appCode=process['env'][_0x4b3359(0xaf)],cookie:_0x27eeee,env:env=process[_0x4b3359(0x81)][_0x4b3359(0x87)]||_0x4b3359(0x7e),keyword:_0x52c79d,category:_0x3769f4,pageSize:pageSize=0x3e7,currentPage:currentPage=0x1}=_0x2a99fe;if(!appCode)throw new Error(_0x4b3359(0xa0));const _0x21074e=new DevApiClient({'appCode':appCode,'cookie':_0x27eeee,'env':env});try{const _0x3e6a68=await _0x21074e[_0x4b3359(0xb5)]({'pageSize':pageSize,'currentPage':currentPage}),_0x55c38c=_0x3e6a68[_0x4b3359(0xac)]||_0x3e6a68,_0x3ff65a=_0x55c38c[_0x4b3359(0x7c)]||[],_0x295a4f=_0x55c38c[_0x4b3359(0xc2)]||_0x3ff65a[_0x4b3359(0xa4)];let _0x30f05a=_0x3ff65a[_0x4b3359(0x8d)](_0x16a034=>{const _0x2bb847=_0x4b3359,_0x46897e=_0x16a034[_0x2bb847(0x84)]||appCode+'-'+(_0x16a034[_0x2bb847(0xaa)]||_0x16a034['id']),_0x4fd1c1=_0x16a034[_0x2bb847(0xaa)]||_0x16a034['id'];let _0x4b59f5;if(_0x16a034['sqlContent']||_0x16a034[_0x2bb847(0x93)]){const _0x4b574c=_0x16a034[_0x2bb847(0x78)]||_0x16a034['sql'],_0x3072d3=_0x4b574c[_0x2bb847(0x7b)](/[:$]\{?(\w+)\}?/g);if(_0x3072d3){const _0x2704b6=Array[_0x2bb847(0xa7)](new Set(_0x3072d3['map'](_0x41abad=>_0x41abad[_0x2bb847(0x80)](/[:${}]/g,''))));_0x4b59f5=_0x2704b6[_0x2bb847(0x8d)](_0x495391=>{const _0x5bd44d=_0x2bb847;let _0x308e9f='value';if(_0x495391['toLowerCase']()['includes']('date')||_0x495391[_0x5bd44d(0xb6)]()['includes'](_0x5bd44d(0x7d)))_0x308e9f='2024-01-01';else{if(_0x495391[_0x5bd44d(0xb6)]()['includes']('id'))_0x308e9f=0x7b;else(_0x495391['toLowerCase']()[_0x5bd44d(0x9f)](_0x5bd44d(0x92))||_0x495391[_0x5bd44d(0xb6)]()[_0x5bd44d(0x9f)](_0x5bd44d(0xba)))&&(_0x308e9f=0xa);}return{'name':_0x495391,'type':_0x5bd44d(0x9b),'required':!![],'description':_0x5bd44d(0xb7)+_0x495391,'example':_0x308e9f};});}}const _0x55c89f=_0x4b59f5&&_0x4b59f5[_0x2bb847(0xa4)]>0x0,_0x54ae9d=_0x55c89f?_0x4b59f5[_0x2bb847(0xb4)]((_0xd067ba,_0x3fc9e5)=>({..._0xd067ba,[_0x3fc9e5[_0x2bb847(0xa8)]]:_0x3fc9e5[_0x2bb847(0x88)]}),{}):undefined,_0x1fadbf={'typescript':'import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;\x0a\x0a//\x20Initialize\x20the\x20SDK\x20client\x0aconst\x20client\x20=\x20new\x20LovrabetClient({\x0a\x20\x20appCode:\x20\x27'+appCode+_0x2bb847(0x8a)+(env||'online')+_0x2bb847(0x83)+(_0x16a034['sqlName']||_0x16a034['name']||_0x2bb847(0xb9))+'\x0aconst\x20data\x20=\x20await\x20client.api.executeSql(\x27'+_0x46897e+'\x27'+(_0x55c89f?',\x20'+JSON['stringify'](_0x54ae9d,null,0x2):'')+_0x2bb847(0x79),'description':'Execute\x20SQL\x20query:\x20'+(_0x16a034[_0x2bb847(0xbd)]||_0x16a034[_0x2bb847(0xa8)]||_0x2bb847(0xbc)),'important':['SDK\x20returns\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[]\x20}\x20-\x20Always\x20check\x20execSuccess\x20before\x20using\x20execResult',_0x2bb847(0x94),_0x55c89f?_0x2bb847(0xbf)+_0x4b59f5[_0x2bb847(0x8d)](_0x4e2613=>_0x4e2613[_0x2bb847(0xa8)]+'\x20('+_0x4e2613[_0x2bb847(0x9a)]+')')[_0x2bb847(0xbb)](',\x20'):_0x2bb847(0xb1),_0x2bb847(0x85),_0x2bb847(0xa5)]},_0x24fb21={'sqlCode':_0x46897e,'sqlId':_0x4fd1c1,'name':_0x16a034['sqlName']||_0x16a034[_0x2bb847(0xa8)]||_0x2bb847(0x7a)+_0x4fd1c1,'description':_0x16a034['sqlDesc']||_0x16a034[_0x2bb847(0x8b)],'category':_0x16a034[_0x2bb847(0x97)]||_0x16a034['sqlType']||_0x2bb847(0x96),'sqlContent':_0x16a034[_0x2bb847(0x78)]||_0x16a034[_0x2bb847(0x93)],'parameters':_0x4b59f5,'createdTime':_0x16a034[_0x2bb847(0xc3)]||_0x16a034[_0x2bb847(0xa9)],'updatedTime':_0x16a034['updatedTime']||_0x16a034['updateTime'],'codeExample':_0x1fadbf};return _0x24fb21;});if(_0x52c79d){const _0x43b9b9=_0x52c79d[_0x4b3359(0xb6)]();_0x30f05a=_0x30f05a[_0x4b3359(0xad)](_0x25a751=>_0x25a751[_0x4b3359(0xa8)][_0x4b3359(0xb6)]()[_0x4b3359(0x9f)](_0x43b9b9)||_0x25a751['description']&&_0x25a751['description'][_0x4b3359(0xb6)]()[_0x4b3359(0x9f)](_0x43b9b9)||_0x25a751['sqlCode'][_0x4b3359(0xb6)]()[_0x4b3359(0x9f)](_0x43b9b9)||_0x25a751[_0x4b3359(0x78)]&&_0x25a751[_0x4b3359(0x78)][_0x4b3359(0xb6)]()['includes'](_0x43b9b9));}_0x3769f4&&_0x3769f4!==_0x4b3359(0x9e)&&(_0x30f05a=_0x30f05a['filter'](_0x3a3470=>_0x3a3470[_0x4b3359(0x97)]&&_0x3a3470[_0x4b3359(0x97)][_0x4b3359(0xb6)]()===_0x3769f4['toLowerCase']()));const _0x171b7d=Math[_0x4b3359(0x8e)](_0x30f05a[_0x4b3359(0xa4)]/pageSize),_0x4bc34d=_0x30f05a[_0x4b3359(0x8f)]((currentPage-0x1)*pageSize,currentPage*pageSize),_0x3865fb=_0x4bc34d[_0x4b3359(0xa4)]>0x0?_0x4bc34d[0x0]:null,_0x487c77=_0x3865fb?_0x4b3359(0xa1)+_0x3865fb[_0x4b3359(0xa8)]+_0x4b3359(0x91)+_0x3865fb[_0x4b3359(0x84)]+_0x4b3359(0x86):'';return{'type':_0x4b3359(0xc0),'total':_0x30f05a['length'],'sqls':_0x4bc34d,'pagination':{'currentPage':currentPage,'pageSize':pageSize,'totalPages':_0x171b7d},'usage':{'description':_0x4b3359(0xae)+_0x30f05a[_0x4b3359(0xa4)]+_0x4b3359(0xb2)+appCode+_0x4b3359(0xbe),'important':[_0x4b3359(0x82),_0x4b3359(0x9d),_0x4b3359(0x77),_0x4b3359(0xb8),_0x4b3359(0xab),_0x4b3359(0x99),'For\x20more\x20customization,\x20use\x20generate_sql_code\x20tool\x20to\x20get\x20code\x20with\x20type\x20inference'],'example':_0x487c77||_0x4b3359(0x98)}};}catch(_0x18c0f2){throw new Error('Failed\x20to\x20list\x20SQL\x20queries:\x20'+_0x18c0f2[_0x4b3359(0x89)]);}}
|
package/dist/tools/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d28ba,_0xbc72b7){const _0x2e5218=a15_0x46ad,_0x3676df=_0x4d28ba();while(!![]){try{const _0x326729=-parseInt(_0x2e5218(0x1df))/0x1*(-parseInt(_0x2e5218(0x1de))/0x2)+parseInt(_0x2e5218(0x1d1))/0x3*(parseInt(_0x2e5218(0x1e0))/0x4)+parseInt(_0x2e5218(0x1c3))/0x5+parseInt(_0x2e5218(0x1dd))/0x6+-parseInt(_0x2e5218(0x1c4))/0x7+parseInt(_0x2e5218(0x1c7))/0x8*(parseInt(_0x2e5218(0x1d2))/0x9)+-parseInt(_0x2e5218(0x1d5))/0xa;if(_0x326729===_0xbc72b7)break;else _0x3676df['push'](_0x3676df['shift']());}catch(_0x52f4f0){_0x3676df['push'](_0x3676df['shift']());}}}(a15_0x37d4,0x90284));import*as a15_0x38a78e from'node:https';import{saveCookie}from'../auth/cookie-manager.js';import{isSessionValid}from'../auth/session-validator.js';function a15_0x37d4(){const _0x93ccc0=['close','writeHead','Login\x20server\x20error','Successfully\x20logged\x20in\x20to\x20','387UcwBle','382221QBUpRd','Login\x20server\x20error:\x20','https://dev.lovrabet.com:','13801480OCSgXU','address','end','https://g.yuntooai.com/cert/lovrabet-dev.json','Please\x20open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20login:\x20','session','message','object','4070028jCAoCl','514KqyqoC','1154hWjGyx','18192nDvoGm','user','Login\x20timeout\x20-\x20no\x20response\x20received\x20within\x205\x20minutes','\x20environment','</p>\x0a\x20\x20\x20\x20<p>Please\x20check\x20file\x20permissions\x20for\x20~/.lovrabet/cookie</p>\x0a\x20\x20</div>\x0a</body>\x0a</html>','error','createServer','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>Login\x20Successful</title></head>\x0a<body>\x0a\x20\x20<div>Login\x20successful!\x20You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20your\x20vibe\x20editor.</div>\x0a\x20\x20<script>\x0a\x20\x20\x20\x20setTimeout(()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20},\x202000);\x0a\x20\x20</script>\x0a</body>\x0a</html>','1928665xIVGXi','6377301auddHt','headers','127.0.0.1','176YGFaEZ','Login\x20successful\x20but\x20failed\x20to\x20save\x20cookie:\x20','text/html;\x20charset=utf-8','listen','env','text/plain'];a15_0x37d4=function(){return _0x93ccc0;};return a15_0x37d4();}function a15_0x46ad(_0x5f1a76,_0x345468){const _0x37d492=a15_0x37d4();return a15_0x46ad=function(_0x46ad4d,_0x45ed23){_0x46ad4d=_0x46ad4d-0x1c0;let _0x401ca2=_0x37d492[_0x46ad4d];return _0x401ca2;},a15_0x46ad(_0x5f1a76,_0x345468);}import{getUserDomain}from'../auth/constants.js';export async function login(_0x2fe3da={}){const _0x459998=a15_0x46ad,_0xa55f76=_0x2fe3da[_0x459998(0x1cb)]||'online';if(await isSessionValid(_0xa55f76))return{'success':!![],'message':'Already\x20logged\x20in\x20to\x20'+_0xa55f76+_0x459998(0x1e3),'env':_0xa55f76};let _0x575e81;try{const _0x1ebb36=await fetch(_0x459998(0x1d8));_0x575e81=await _0x1ebb36['json']();}catch(_0x8128e0){return{'success':![],'message':'Failed\x20to\x20fetch\x20SSL\x20certificates\x20for\x20login\x20server','env':_0xa55f76};}return new Promise(_0x75825b=>{const _0x2cc760=_0x459998;let _0x2e8321=0x0;const _0x387283=a15_0x38a78e[_0x2cc760(0x1c1)](_0x575e81,async(_0x17d2be,_0x1cb97f)=>{const _0x1a39c7=_0x2cc760,_0x489c90=getUserDomain(_0xa55f76),_0x3e9e0b=_0x17d2be[_0x1a39c7(0x1c5)]['cookie']||'';try{const _0x37bf18=await fetch(_0x489c90+'/api/auth/get-session',{'headers':{'cookie':_0x3e9e0b}}),_0x587cf8=await _0x37bf18['json'](),_0x2c442a=_0x587cf8&&_0x587cf8[_0x1a39c7(0x1da)]&&_0x587cf8[_0x1a39c7(0x1e1)];if(_0x2c442a){try{saveCookie(_0x3e9e0b);}catch(_0xc1fc4e){const _0x573369='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>Login\x20Failed</title></head>\x0a<body>\x0a\x20\x20<div\x20style=\x22color:\x20red;\x22>\x0a\x20\x20\x20\x20<h2>Login\x20Successful,\x20but\x20Failed\x20to\x20Save\x20Cookie</h2>\x0a\x20\x20\x20\x20<p>Error:\x20'+_0xc1fc4e[_0x1a39c7(0x1db)]+_0x1a39c7(0x1e4);_0x1cb97f[_0x1a39c7(0x1ce)](0x1f4,{'Content-Type':_0x1a39c7(0x1c9)}),_0x1cb97f[_0x1a39c7(0x1d7)](_0x573369),_0x387283[_0x1a39c7(0x1cd)](),_0x75825b({'success':![],'message':_0x1a39c7(0x1c8)+_0xc1fc4e[_0x1a39c7(0x1db)],'env':_0xa55f76});return;}const _0x1f3ea5=_0x1a39c7(0x1c2);_0x1cb97f[_0x1a39c7(0x1ce)](0xc8,{'Content-Type':_0x1a39c7(0x1c9)}),_0x1cb97f[_0x1a39c7(0x1d7)](_0x1f3ea5),_0x387283[_0x1a39c7(0x1cd)](),_0x75825b({'success':!![],'message':_0x1a39c7(0x1d0)+_0xa55f76+_0x1a39c7(0x1e3),'env':_0xa55f76});}else{const _0x254f00=encodeURIComponent(_0x1a39c7(0x1d4)+_0x2e8321);_0x1cb97f[_0x1a39c7(0x1ce)](0x12e,{'location':_0x489c90+'/sign-in?redirect='+_0x254f00}),_0x1cb97f[_0x1a39c7(0x1d7)]();}}catch(_0x5a6898){_0x1cb97f[_0x1a39c7(0x1ce)](0x1f4,{'Content-Type':_0x1a39c7(0x1cc)}),_0x1cb97f['end']('Internal\x20server\x20error'),_0x387283[_0x1a39c7(0x1cd)](),_0x75825b({'success':![],'message':_0x1a39c7(0x1cf),'env':_0xa55f76});}});_0x387283[_0x2cc760(0x1ca)](0x0,_0x2cc760(0x1c6),()=>{const _0x1d3cfd=_0x2cc760,_0x175a25=_0x387283[_0x1d3cfd(0x1d6)]();_0x2e8321=typeof _0x175a25===_0x1d3cfd(0x1dc)&&_0x175a25?_0x175a25['port']:0x0;const _0x35a7ca=_0x1d3cfd(0x1d4)+_0x2e8321;_0x75825b({'success':![],'message':_0x1d3cfd(0x1d9)+_0x35a7ca,'loginUrl':_0x35a7ca,'env':_0xa55f76});}),_0x387283['on'](_0x2cc760(0x1c0),_0x1fbb90=>{const _0x9180f=_0x2cc760;_0x75825b({'success':![],'message':_0x9180f(0x1d3)+_0x1fbb90[_0x9180f(0x1db)],'env':_0xa55f76});}),setTimeout(()=>{const _0x574e4e=_0x2cc760;_0x387283[_0x574e4e(0x1cd)](),_0x75825b({'success':![],'message':_0x574e4e(0x1e2),'env':_0xa55f76});},0x5*0x3c*0x3e8);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e47c6,_0x460fdf){const _0x5e433f=a16_0x29b9,_0x6be0b4=_0x3e47c6();while(!![]){try{const _0x3cf624=parseInt(_0x5e433f(0x9b))/0x1+parseInt(_0x5e433f(0xa1))/0x2+-parseInt(_0x5e433f(0xa6))/0x3+-parseInt(_0x5e433f(0xab))/0x4*(parseInt(_0x5e433f(0x9d))/0x5)+parseInt(_0x5e433f(0xa3))/0x6*(-parseInt(_0x5e433f(0xaa))/0x7)+-parseInt(_0x5e433f(0xb0))/0x8+parseInt(_0x5e433f(0xa0))/0x9;if(_0x3cf624===_0x460fdf)break;else _0x6be0b4['push'](_0x6be0b4['shift']());}catch(_0xb44cc1){_0x6be0b4['push'](_0x6be0b4['shift']());}}}(a16_0x45b8,0x28d8d));function a16_0x45b8(){const _0x2088d4=['1258885fbdtmT','description','searchDatasets','4892697ETovON','253150DQQwos','LOVRABET_ENV','6SPaZjy','online','total','395193FFtnii','name','map','code','164423RVYqtN','4gPRqGP','keyword\x20is\x20required','LOVRABET_APP_CODE','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','tableName','1361208AvPFzA','74249qTCtig','env'];a16_0x45b8=function(){return _0x2088d4;};return a16_0x45b8();}import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';function a16_0x29b9(_0x400e9e,_0x31499b){const _0x45b8f0=a16_0x45b8();return a16_0x29b9=function(_0x29b98c,_0x3aa482){_0x29b98c=_0x29b98c-0x9b;let _0x50a879=_0x45b8f0[_0x29b98c];return _0x50a879;},a16_0x29b9(_0x400e9e,_0x31499b);}export async function searchDatasets(_0x573741){const _0x26cb67=a16_0x29b9,{appCode:appCode=process['env'][_0x26cb67(0xad)],cookie:_0x57c879,env:env=process[_0x26cb67(0x9c)][_0x26cb67(0xa2)]||_0x26cb67(0xa4),keyword:_0x5d9fa6}=_0x573741;if(!appCode)throw new Error(_0x26cb67(0xae));if(!_0x5d9fa6)throw new Error(_0x26cb67(0xac));const _0x549cdd=new DevApiClient({'appCode':appCode,'cookie':_0x57c879,'env':env}),_0x171efd=await _0x549cdd[_0x26cb67(0x9f)](_0x5d9fa6),_0x1b33e5=new DatasetAnalyzer(),_0x502bb1=_0x1b33e5['analyzeDatasetList'](_0x171efd);return{'appCode':appCode,'env':env,'keyword':_0x5d9fa6,'total':_0x502bb1[_0x26cb67(0xa5)],'datasets':_0x502bb1['datasets'][_0x26cb67(0xa8)](_0xf180b9=>({'id':_0xf180b9['id'],'name':_0xf180b9[_0x26cb67(0xa7)],'code':_0xf180b9[_0x26cb67(0xa9)],'tableName':_0xf180b9[_0x26cb67(0xaf)],'description':_0xf180b9[_0x26cb67(0x9e)]}))};}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/dataset-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11-beta.0",
|
|
4
4
|
"description": "MCP server for Lovrabet Dataset access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"examples": "npm run example:basic && npm run example:sdk && npm run example:compare"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lovrabet/dsparser": "^1.0.
|
|
33
|
+
"@lovrabet/dsparser": "^1.0.16-beta.0",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
35
35
|
"axios": "^1.6.2",
|
|
36
36
|
"dotenv": "^16.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a9_0x28ba(){const _0x253ce3=['Record<string,\x20any>','LOVRABET_APP_CODE','1574155rzKCQG','executeSql','6LUnQyj','4ejhVwt','online','sqlCode','entries','863140dFNZUM','const\x20data\x20=\x20await\x20client.api.executeSql','Returns\x20the\x20\x27data\x27\x20field:\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[]\x20}.\x20Application\x20should\x20check\x20execSuccess\x20and\x20use\x20execResult.','746913tPrJeb','\x27,\x0a});','sqlCode\x20is\x20required','5715376KGaYwE','getCustomSqlList','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;\x0a\x0aconst\x20client\x20=\x20new\x20LovrabetClient({\x0a\x20\x20appCode:\x20\x27','\x0a\x0a//\x20Use\x20results\x0aresults.forEach(row\x20=>\x20{\x0a\x20\x20console.log(row);\x0a});','sqlName','description','sqlId','isArray','execResult','data','tableData','name','object','typescript','6705810RpAxUv','map','\x27,\x0a});\x0a\x0a//\x20Execute\x20SQL\x0a','any[]','\x0a}\x20catch\x20(error)\x20{\x0a\x20\x20console.error(\x27SQL执行失败:\x27,\x20error);\x0a}','any','number','string','\x27,\x0a\x20\x20env:\x20\x27','sql','join','slice',');\x0a\x0aif\x20(!data.execSuccess)\x20{\x0a\x20\x20throw\x20new\x20Error(\x27SQL执行失败\x27);\x0a}\x0a\x0aconst\x20results\x20=\x20data.execResult\x20||\x20[];','3353602vTllkA','859566RNjkjR','Throws\x20LovrabetError\x20exception\x20when\x20HTTP\x20request\x20fails.\x20Business\x20logic\x20errors\x20(execSuccess:\x20false)\x20are\x20returned\x20in\x20data,\x20not\x20thrown.','LOVRABET_ENV','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;\x0a\x0a//\x20Initialize\x20client\x0aconst\x20client\x20=\x20new\x20LovrabetClient({\x0a\x20\x20appCode:\x20\x27','length','IMPORTANT:\x20For\x20SQL\x20API,\x20SDK\x20returns\x20data\x20object\x20{\x20execSuccess,\x20execResult\x20}.\x20Application\x20layer\x20must\x20check\x20execSuccess\x20before\x20using\x20execResult.','boolean','env','isInteger'];a9_0x28ba=function(){return _0x253ce3;};return a9_0x28ba();}function a9_0xcb7b(_0x253511,_0xbe33e1){const _0x28bab7=a9_0x28ba();return a9_0xcb7b=function(_0xcb7bda,_0x26b408){_0xcb7bda=_0xcb7bda-0x1e8;let _0x5c87d7=_0x28bab7[_0xcb7bda];return _0x5c87d7;},a9_0xcb7b(_0x253511,_0xbe33e1);}(function(_0x884444,_0x2877b7){const _0x399889=a9_0xcb7b,_0x54565d=_0x884444();while(!![]){try{const _0x4d75d6=-parseInt(_0x399889(0x1ef))/0x1+parseInt(_0x399889(0x1ea))/0x2*(-parseInt(_0x399889(0x1f2))/0x3)+parseInt(_0x399889(0x1eb))/0x4*(parseInt(_0x399889(0x1e8))/0x5)+-parseInt(_0x399889(0x211))/0x6+parseInt(_0x399889(0x210))/0x7+parseInt(_0x399889(0x1f5))/0x8+parseInt(_0x399889(0x203))/0x9;if(_0x4d75d6===_0x2877b7)break;else _0x54565d['push'](_0x54565d['shift']());}catch(_0x335eff){_0x54565d['push'](_0x54565d['shift']());}}}(a9_0x28ba,0x7a193));import{DevApiClient}from'../api/dev-api-client.js';export async function generateSqlCode(_0x1eb609){const _0xb03548=a9_0xcb7b,{appCode:appCode=process['env'][_0xb03548(0x21b)],cookie:_0x273290,env:env=process[_0xb03548(0x218)][_0xb03548(0x213)]||_0xb03548(0x1ec),sqlCode:_0x8e55cb,sqlParams:_0x59425d,executeExample:executeExample=!![],includeImports:includeImports=!![]}=_0x1eb609;if(!appCode)throw new Error('appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.');if(!_0x8e55cb&&_0x8e55cb!==0x0)throw new Error(_0xb03548(0x1f4));const _0x480be0=new DevApiClient({'appCode':appCode,'cookie':_0x273290,'env':env});let _0x25f1ca;try{const _0x5b678d=await _0x480be0[_0xb03548(0x1f6)]({'pageSize':0x3e7}),_0x3dd8cf=_0x5b678d['data']||_0x5b678d,_0x1c0779=_0x3dd8cf[_0xb03548(0x1ff)]||[],_0x1db578=_0x1c0779['find'](_0x3ff927=>{const _0x1b747b=_0xb03548,_0x4da383=_0x3ff927[_0x1b747b(0x1ed)]||appCode+'-'+_0x3ff927[_0x1b747b(0x1fb)];return _0x4da383===_0x8e55cb||_0x3ff927[_0x1b747b(0x1fb)]===_0x8e55cb||_0x3ff927['id']===_0x8e55cb;});_0x1db578&&(_0x25f1ca={'sqlId':_0x1db578[_0xb03548(0x1fb)],'sqlName':_0x1db578[_0xb03548(0x1f9)]||_0x1db578[_0xb03548(0x200)],'sqlDesc':_0x1db578['sqlDesc']||_0x1db578[_0xb03548(0x1fa)],'sqlContent':_0x1db578['sqlContent']||_0x1db578[_0xb03548(0x20c)]});}catch(_0x3f1aab){}let _0x8c7190,_0x267eb9,_0x4ad1d8;if(executeExample)try{const _0x1a2586=await _0x480be0[_0xb03548(0x1e9)]({'sqlCode':_0x8e55cb,'params':_0x59425d}),_0x5509f0=_0x1a2586[_0xb03548(0x1fe)]||_0x1a2586;if(_0x5509f0['execSuccess']&&_0x5509f0['execResult']){const _0x68b321=_0x5509f0[_0xb03548(0x1fd)];_0x267eb9=_0x68b321[_0xb03548(0x215)],_0x8c7190=_0x68b321[_0xb03548(0x20e)](0x0,0x3),_0x68b321['length']>0x0&&(_0x4ad1d8=inferTypesFromData(_0x68b321[0x0]));}}catch(_0x13c7bd){}const _0x35e50c=_0x4ad1d8?generateTypeDefinition(_0x4ad1d8):_0xb03548(0x21a),_0x42f04e=_0x59425d?',\x20'+JSON['stringify'](_0x59425d,null,0x2):'',_0xea38a0=typeof _0x8e55cb===_0xb03548(0x20a)?'\x27'+_0x8e55cb+'\x27':String(_0x8e55cb),_0x58c549=_0xb03548(0x1f0)+(_0x4ad1d8?'<'+_0x35e50c+'>':'')+'('+_0xea38a0+_0x42f04e+_0xb03548(0x20f),_0xfb0c20=includeImports?_0xb03548(0x214)+appCode+_0xb03548(0x20b)+env+_0xb03548(0x205)+_0x58c549+_0xb03548(0x1f8):undefined;return{'appCode':appCode,'env':env,'language':_0xb03548(0x202),'code':_0x58c549,'fullExample':_0xfb0c20,'sqlCode':_0x8e55cb,'sqlInfo':_0x25f1ca,'sqlParams':_0x59425d,'sampleData':_0x8c7190,'resultCount':_0x267eb9,'inferredTypes':_0x4ad1d8,'sdkInitCode':_0xb03548(0x1f7)+appCode+_0xb03548(0x20b)+env+_0xb03548(0x1f3),'usageExample':{'successCode':_0x58c549,'errorCode':'try\x20{\x0a\x20\x20'+_0x58c549+_0xb03548(0x207)},'sdkReturnValueBehavior':{'onSuccess':_0xb03548(0x1f1),'onError':_0xb03548(0x212),'note':_0xb03548(0x216)}};}function inferTypesFromData(_0x3c8724){const _0x554e03=a9_0xcb7b,_0x2d210e={};for(const [_0xf25ac2,_0x3b5128]of Object[_0x554e03(0x1ee)](_0x3c8724)){if(_0x3b5128===null||_0x3b5128===undefined)_0x2d210e[_0xf25ac2]='any';else{if(typeof _0x3b5128===_0x554e03(0x20a))_0x2d210e[_0xf25ac2]=_0x554e03(0x20a);else{if(typeof _0x3b5128===_0x554e03(0x209))_0x2d210e[_0xf25ac2]=Number[_0x554e03(0x219)](_0x3b5128)?_0x554e03(0x209):_0x554e03(0x209);else{if(typeof _0x3b5128===_0x554e03(0x217))_0x2d210e[_0xf25ac2]=_0x554e03(0x217);else{if(Array[_0x554e03(0x1fc)](_0x3b5128))_0x2d210e[_0xf25ac2]=_0x554e03(0x206);else typeof _0x3b5128===_0x554e03(0x201)?_0x2d210e[_0xf25ac2]=_0x554e03(0x21a):_0x2d210e[_0xf25ac2]=_0x554e03(0x208);}}}}}return _0x2d210e;}function generateTypeDefinition(_0x3ec2cd){const _0x3d2bd2=a9_0xcb7b,_0x59dd1b=Object[_0x3d2bd2(0x1ee)](_0x3ec2cd)[_0x3d2bd2(0x204)](([_0x21ac37,_0x1cdf83])=>'\x20\x20'+_0x21ac37+':\x20'+_0x1cdf83+';')[_0x3d2bd2(0x20d)]('\x0a');return'{\x0a'+_0x59dd1b+'\x0a}';}
|