@lovrabet/dataset-mcp-server 1.0.12 → 1.0.16
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 -1
- package/dist/tools/login.js +1 -1
- package/dist/tools/search-datasets.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x257182=a0_0x1815;(function(_0x15faf7,_0x548c72){const _0x5107a6=a0_0x1815,_0x304d71=_0x15faf7();while(!![]){try{const _0x5b5a=parseInt(_0x5107a6(0x127))/0x1*(-parseInt(_0x5107a6(0x141))/0x2)+-parseInt(_0x5107a6(0x100))/0x3*(-parseInt(_0x5107a6(0x13c))/0x4)+parseInt(_0x5107a6(0xf8))/0x5*(-parseInt(_0x5107a6(0x109))/0x6)+parseInt(_0x5107a6(0xea))/0x7+parseInt(_0x5107a6(0x131))/0x8*(parseInt(_0x5107a6(0x129))/0x9)+-parseInt(_0x5107a6(0x11f))/0xa+parseInt(_0x5107a6(0x123))/0xb;if(_0x5b5a===_0x548c72)break;else _0x304d71['push'](_0x304d71['shift']());}catch(_0x31e65f){_0x304d71['push'](_0x304d71['shift']());}}}(a0_0x16d8,0xc3d58));import{DatasetList,DrivenDataDetailPlus}from'@lovrabet/dsparser';function a0_0x1815(_0x7386dc,_0x2913db){const _0x16d8b5=a0_0x16d8();return a0_0x1815=function(_0x18156e,_0x59555c){_0x18156e=_0x18156e-0xe5;let _0x23bd16=_0x16d8b5[_0x18156e];return _0x23bd16;},a0_0x1815(_0x7386dc,_0x2913db);}function a0_0x16d8(){const _0x1b4cf2=['all','stringify','7909610mIZqdN','enumValues','map','slice','16968435QFRoKh','tableData','\x20|\x0a','requestFields','1nfzANT','length','27ZrTiSs','getTableName','name','isPrimaryKey','removed','\x20|\x20','getCount','getOperationAnalysis','1299064niJoPt','toPascalCase','tableName','fullUrl','\x20total)','toUpperCase','**Table\x20Name:**\x20','datasetCode','-\x20**Full\x20URL:**\x20','compareDatasets','getOperationDetail','21448YuJzgE','operations','online','data','enumSource','3151642RnEzsR','forEach','generateFullSDKExample','generateSDKInitCode','|------------|------|------|----------|-------------|-------------|-------------|\x0a','##\x20Operations\x0a\x0a','isRequired','updateTime','code','type','generateApiDoc','4531205TIJdcr','path','displayName','analyzeDatasetItem','sdkCall','-\x20**Path:**\x20','responseExample','**Dataset\x20Code:**\x20','isEnum','method','enabled','createTime',')\x0a\x0a','from','5JnujeP','```\x0a','generateMarkdownDoc','\x0a```\x0a','\x20operation\x20for\x20','options','getEnumMeta','getFieldCount','873AATzAt','##\x20Fields\x0a\x0a','usageExample','requestExample','```typescript\x0a','toLowerCase','selectItemsSource','Operations:\x20+','analyzeDatasetDetail','6410838HuvrUn','includes','toArray','getTableKey','-\x20**Method:**\x20','supportsCRUD','replace','generateSDKCode','getOperationCount','getEnabledOperationAnalyses','getFieldList','\x0a**Response\x20Example:**\x0a```json\x0a','filter','join','has','description','getOperationDocMeta','\x0a**Request\x20Example:**\x0a```json\x0a','**Table\x20Key:**\x20','values'];a0_0x16d8=function(){return _0x1b4cf2;};return a0_0x16d8();}export class DatasetAnalyzer{['analyzeDatasetList'](_0x521f89){const _0x5a18cf=a0_0x1815,_0x3d4151=_0x521f89[_0x5a18cf(0x13f)]?.[_0x5a18cf(0x124)]||_0x521f89[_0x5a18cf(0x124)]||_0x521f89,_0x3c65d9=new DatasetList(_0x3d4151);return{'total':_0x3c65d9[_0x5a18cf(0x12f)](),'datasets':_0x3c65d9[_0x5a18cf(0x10b)]()[_0x5a18cf(0x121)](_0xbd80eb=>this['analyzeDatasetItem'](_0xbd80eb))};}[a0_0x257182(0xed)](_0x2b4fbb){const _0x1e7dca=a0_0x257182;return{'id':_0x2b4fbb['id']||0x0,'name':_0x2b4fbb[_0x1e7dca(0x12b)]||'','code':_0x2b4fbb['datasetCode']||'','tableName':_0x2b4fbb['getTableName']?.()||_0x2b4fbb[_0x1e7dca(0x133)]||'','source':_0x2b4fbb['source']||'','description':_0x2b4fbb[_0x1e7dca(0x118)]||'','isVirtual':_0x2b4fbb['isVirtualTable']?.()||![]};}[a0_0x257182(0x108)](_0xcdb52c){const _0x5a0e6e=a0_0x257182,_0x28fb39=_0xcdb52c[_0x5a0e6e(0x13f)]||_0xcdb52c,_0x4eec03=new DrivenDataDetailPlus(_0x28fb39),_0xe261c0={'name':_0x4eec03[_0x5a0e6e(0x12b)],'code':_0x4eec03[_0x5a0e6e(0x138)],'tableName':_0x4eec03['getTableName'](),'tableKey':_0x4eec03[_0x5a0e6e(0x10c)]()},_0x1cfa81=_0x4eec03[_0x5a0e6e(0x113)](),_0x3cc9a3=_0x1cfa81[_0x5a0e6e(0x11d)]()[_0x5a0e6e(0x121)](_0x55bcb1=>{const _0x596f3b=_0x5a0e6e,_0x454e55=_0x55bcb1['extend'],_0x111354={'name':_0x55bcb1[_0x596f3b(0x12b)],'type':_0x55bcb1[_0x596f3b(0xe8)],'required':_0x55bcb1[_0x596f3b(0xe5)](),'primaryKey':_0x55bcb1['isPrimaryKey'](),'description':_0x55bcb1[_0x596f3b(0x118)]||'','autoIncrement':Boolean(_0x454e55['autoIncrement']),'createTime':Boolean(_0x454e55[_0x596f3b(0xf5)]),'updateTime':Boolean(_0x454e55[_0x596f3b(0xe6)])};if(_0x55bcb1[_0x596f3b(0xf2)]()){const _0x47ef46=_0x55bcb1[_0x596f3b(0xfe)]();if(_0x47ef46){_0x111354['isEnum']=!![],_0x111354[_0x596f3b(0x120)]=_0x47ef46[_0x596f3b(0x11c)];if(_0x47ef46[_0x596f3b(0xfd)]&&_0x47ef46[_0x596f3b(0xfd)][_0x596f3b(0x128)]>0x0)_0x111354['enumOptions']=_0x47ef46[_0x596f3b(0xfd)];else _0x47ef46['selectItemsSource']&&(_0x111354[_0x596f3b(0x140)]=_0x47ef46[_0x596f3b(0x106)]);}}return _0x111354;}),_0x1d22a8=_0x4eec03[_0x5a0e6e(0x112)]()[_0x5a0e6e(0x121)](_0x381338=>{const _0x29f0ea=_0x5a0e6e,_0x19363c={'name':_0x381338[_0x29f0ea(0x12b)],'displayName':_0x381338['displayName'],'type':_0x381338['type'],'method':_0x381338[_0x29f0ea(0xf3)],'path':_0x381338[_0x29f0ea(0xeb)],'requestFields':_0x381338[_0x29f0ea(0x126)],'requestFieldsCount':_0x381338[_0x29f0ea(0x126)][_0x29f0ea(0x128)],'requestExample':_0x381338[_0x29f0ea(0x103)],'responseExample':_0x381338[_0x29f0ea(0xf0)],'enabled':_0x381338[_0x29f0ea(0xf4)],'fullUrl':_0x381338[_0x29f0ea(0x134)]};return _0x19363c;});return{'basic':_0xe261c0,'fields':_0x3cc9a3,'operations':_0x1d22a8,'supportsCRUD':_0x4eec03[_0x5a0e6e(0x10e)](),'fieldCount':_0x4eec03[_0x5a0e6e(0xff)](),'operationCount':_0x4eec03[_0x5a0e6e(0x111)](),'enabledOperationCount':_0x1d22a8['length']};}[a0_0x257182(0x13b)](_0x3e33d5,_0x42d7b4){const _0x5baef6=a0_0x257182,_0x31ded6=_0x3e33d5[_0x5baef6(0x13f)]||_0x3e33d5,_0x31457a=new DrivenDataDetailPlus(_0x31ded6),_0x520390=_0x31457a[_0x5baef6(0x130)](_0x42d7b4);if(!_0x520390)return null;return{'name':_0x520390[_0x5baef6(0x12b)],'displayName':_0x520390[_0x5baef6(0xec)],'type':_0x520390[_0x5baef6(0xe8)],'method':_0x520390[_0x5baef6(0xf3)],'path':_0x520390['path'],'requestFields':_0x520390['requestFields'],'requestFieldsCount':_0x520390[_0x5baef6(0x126)][_0x5baef6(0x128)],'requestExample':_0x520390['requestExample'],'responseExample':_0x520390[_0x5baef6(0xf0)],'enabled':_0x520390['enabled'],'fullUrl':_0x520390[_0x5baef6(0x134)]};}[a0_0x257182(0x110)](_0x454da9,_0x4d7b7c,_0x12bbfc,_0x527e45=a0_0x257182(0x13e)){const _0x38f380=a0_0x257182,_0x8deba3=_0x454da9[_0x38f380(0x13f)]||_0x454da9,_0x3afa1f=new DrivenDataDetailPlus(_0x8deba3),_0x4e0838=_0x3afa1f[_0x38f380(0x119)](_0x4d7b7c);if(!_0x4e0838)return null;const _0x4ad53b=_0x3afa1f[_0x38f380(0x10c)](),_0x276fbd=_0x3afa1f[_0x38f380(0x12a)](),_0x45a68a=this[_0x38f380(0x132)](_0x276fbd),_0x49a88b=_0x3afa1f[_0x38f380(0x130)](_0x4d7b7c),_0xfe7837=_0x3afa1f[_0x38f380(0x143)](_0x4d7b7c,_0x12bbfc);return{'code':_0x4e0838[_0x38f380(0xee)][_0x38f380(0xe7)],'sdkCallInfo':{'modelName':_0x45a68a,'tableName':_0x276fbd,'tableKey':_0x4ad53b,'datasetCode':_0x3afa1f[_0x38f380(0x138)],'operationName':_0x4d7b7c},'requestExample':_0x49a88b?.[_0x38f380(0x103)],'responseExample':_0x49a88b?.[_0x38f380(0xf0)],'sdkInitCode':_0x3afa1f[_0x38f380(0x144)](_0x4ad53b),'usageExample':_0x4e0838[_0x38f380(0x102)],'fullExample':_0xfe7837||undefined};}[a0_0x257182(0xe9)](_0x35ad91){const _0x1910a3=a0_0x257182,_0x587379=_0x35ad91[_0x1910a3(0x13f)]||_0x35ad91,_0x2316c3=new DrivenDataDetailPlus(_0x587379),_0x26275b=_0x2316c3[_0x1910a3(0x112)]()['map'](_0x287e9a=>({'name':_0x287e9a[_0x1910a3(0x12b)],'displayName':_0x287e9a[_0x1910a3(0xec)],'description':_0x287e9a[_0x1910a3(0xec)]+_0x1910a3(0xfc)+_0x2316c3[_0x1910a3(0x12b)],'method':_0x287e9a[_0x1910a3(0xf3)],'path':_0x287e9a[_0x1910a3(0xeb)],'requestParams':_0x287e9a[_0x1910a3(0x126)],'requestExample':JSON['stringify'](_0x287e9a[_0x1910a3(0x103)],null,0x2),'responseExample':JSON['stringify'](_0x287e9a[_0x1910a3(0xf0)],null,0x2)}));return{'datasetName':_0x2316c3[_0x1910a3(0x12b)],'tableName':_0x2316c3[_0x1910a3(0x12a)](),'operations':_0x26275b};}['searchDatasets'](_0x12e2a7,_0x5ab51c){const _0x396085=a0_0x257182,_0x322353=new DatasetList(_0x12e2a7),_0x5702ce=_0x5ab51c['toLowerCase']();return _0x322353[_0x396085(0x10b)]()[_0x396085(0x115)](_0x22f020=>{const _0x3554bd=_0x396085,_0xc6a4e8=(_0x22f020[_0x3554bd(0x12b)]||'')['toLowerCase']()[_0x3554bd(0x10a)](_0x5702ce),_0x449b7f=(_0x22f020['getTableName']?.()||_0x22f020[_0x3554bd(0x133)]||'')[_0x3554bd(0x105)]()[_0x3554bd(0x10a)](_0x5702ce),_0x2668f3=(_0x22f020['datasetCode']||'')['toLowerCase']()[_0x3554bd(0x10a)](_0x5702ce),_0x20c076=(_0x22f020['description']||'')[_0x3554bd(0x105)]()['includes'](_0x5702ce);return _0xc6a4e8||_0x449b7f||_0x2668f3||_0x20c076;})[_0x396085(0x121)](_0x3c6986=>this[_0x396085(0xed)](_0x3c6986));}[a0_0x257182(0xfa)](_0x13b643){const _0x2d7cae=a0_0x257182,_0x186e25=_0x13b643[_0x2d7cae(0x13f)]||_0x13b643,_0x105565=new DrivenDataDetailPlus(_0x186e25);let _0x1537b0='#\x20'+_0x105565['name']+'\x0a\x0a';_0x1537b0+=_0x2d7cae(0xf1)+_0x105565[_0x2d7cae(0x138)]+'\x0a',_0x1537b0+=_0x2d7cae(0x137)+_0x105565[_0x2d7cae(0x12a)]()+'\x0a',_0x1537b0+=_0x2d7cae(0x11b)+_0x105565[_0x2d7cae(0x10c)]()+'\x0a\x0a',_0x1537b0+=_0x2d7cae(0x101);const _0x4ae89f=_0x105565['getFieldList']();_0x4ae89f['length']>0x0&&(_0x1537b0+='|\x20Field\x20Name\x20|\x20Code\x20|\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a',_0x1537b0+=_0x2d7cae(0x145),_0x4ae89f[_0x2d7cae(0x11d)]()[_0x2d7cae(0x142)](_0x59c5e3=>{const _0x4328ad=_0x2d7cae;let _0x17c4f8='';if(_0x59c5e3[_0x4328ad(0xf2)]()){const _0x5a9d00=_0x59c5e3['getEnumMeta']();if(_0x5a9d00&&_0x5a9d00[_0x4328ad(0x11c)]['length']>0x0){const _0x243c00=_0x5a9d00[_0x4328ad(0x11c)][_0x4328ad(0x122)](0x0,0x5);_0x17c4f8=_0x243c00[_0x4328ad(0x116)](',\x20'),_0x5a9d00[_0x4328ad(0x11c)][_0x4328ad(0x128)]>0x5&&(_0x17c4f8+='\x20...\x20('+_0x5a9d00[_0x4328ad(0x11c)][_0x4328ad(0x128)]+_0x4328ad(0x135));}}_0x1537b0+='|\x20'+_0x59c5e3[_0x4328ad(0x12b)]+_0x4328ad(0x12e)+_0x59c5e3['code']+'\x20|\x20'+_0x59c5e3[_0x4328ad(0xe8)]+'\x20|\x20'+(_0x59c5e3[_0x4328ad(0xe5)]()?'✅':'')+_0x4328ad(0x12e)+(_0x59c5e3[_0x4328ad(0x12c)]()?'🔑':'')+_0x4328ad(0x12e)+_0x17c4f8+_0x4328ad(0x12e)+(_0x59c5e3[_0x4328ad(0x118)]||'')+_0x4328ad(0x125);}),_0x1537b0+='\x0a');_0x1537b0+=_0x2d7cae(0x146);const _0xf1effc=_0x105565[_0x2d7cae(0x112)]();_0xf1effc[_0x2d7cae(0x142)](_0x48d160=>{const _0x326b82=_0x2d7cae;_0x1537b0+='###\x20'+_0x48d160['displayName']+'\x20('+_0x48d160[_0x326b82(0x12b)]+_0x326b82(0xf6),_0x1537b0+=_0x326b82(0x10d)+_0x48d160[_0x326b82(0xf3)]+'\x0a',_0x1537b0+=_0x326b82(0xef)+_0x48d160[_0x326b82(0xeb)]+'\x0a',_0x48d160[_0x326b82(0x134)]&&(_0x1537b0+=_0x326b82(0x139)+_0x48d160[_0x326b82(0x134)]+'\x0a'),_0x48d160[_0x326b82(0x126)]&&_0x48d160[_0x326b82(0x126)][_0x326b82(0x128)]>0x0&&(_0x1537b0+='-\x20**Request\x20Fields:**\x20'+_0x48d160[_0x326b82(0x126)][_0x326b82(0x116)](',\x20')+'\x0a'),_0x48d160[_0x326b82(0x103)]&&(_0x1537b0+=_0x326b82(0x11a)+JSON[_0x326b82(0x11e)](_0x48d160[_0x326b82(0x103)],null,0x2)+'\x0a```\x0a'),_0x48d160[_0x326b82(0xf0)]&&(_0x1537b0+=_0x326b82(0x114)+JSON[_0x326b82(0x11e)](_0x48d160['responseExample'],null,0x2)+_0x326b82(0xfb)),_0x1537b0+='\x0a';});const _0x324361=_0x105565['getTableKey'](),_0x39a393=_0x105565['generateSDKInitCode'](_0x324361);return _0x39a393&&(_0x1537b0+='##\x20SDK\x20Usage\x0a\x0a',_0x1537b0+=_0x2d7cae(0x104),_0x1537b0+=_0x39a393,_0x1537b0+=_0x2d7cae(0xf9)),_0x1537b0;}[a0_0x257182(0x13a)](_0x119d0e,_0x40df05){const _0xa562d=a0_0x257182,_0x2d1978=_0x119d0e['data']||_0x119d0e,_0x918f58=_0x40df05[_0xa562d(0x13f)]||_0x40df05,_0x3dab23=new DrivenDataDetailPlus(_0x2d1978),_0x591d14=new DrivenDataDetailPlus(_0x918f58),_0x5ee6c5=new Set(_0x3dab23['getFieldList']()[_0xa562d(0x11d)]()['map'](_0x56c620=>_0x56c620['name'])),_0x4425cd=new Set(_0x591d14[_0xa562d(0x113)]()[_0xa562d(0x11d)]()[_0xa562d(0x121)](_0x8484a8=>_0x8484a8[_0xa562d(0x12b)])),_0x58bf27=new Set(_0x3dab23[_0xa562d(0x112)]()['map'](_0x1bd312=>_0x1bd312['name'])),_0x575622=new Set(_0x591d14[_0xa562d(0x112)]()[_0xa562d(0x121)](_0x34104c=>_0x34104c[_0xa562d(0x12b)])),_0x2caa08={'fields':{'added':Array[_0xa562d(0xf7)](_0x4425cd)[_0xa562d(0x115)](_0x53aab6=>!_0x5ee6c5[_0xa562d(0x117)](_0x53aab6)),'removed':Array['from'](_0x5ee6c5)[_0xa562d(0x115)](_0x178c4a=>!_0x4425cd[_0xa562d(0x117)](_0x178c4a)),'modified':[]},'operations':{'added':Array[_0xa562d(0xf7)](_0x575622)[_0xa562d(0x115)](_0x942818=>!_0x58bf27[_0xa562d(0x117)](_0x942818)),'removed':Array[_0xa562d(0xf7)](_0x58bf27)['filter'](_0x128991=>!_0x575622['has'](_0x128991))}},_0x262df1='Fields:\x20+'+_0x2caa08['fields']['added']['length']+'/-'+_0x2caa08['fields']['removed'][_0xa562d(0x128)]+',\x20'+(_0xa562d(0x107)+_0x2caa08[_0xa562d(0x13d)]['added'][_0xa562d(0x128)]+'/-'+_0x2caa08[_0xa562d(0x13d)][_0xa562d(0x12d)][_0xa562d(0x128)]);return{'differences':_0x2caa08,'summary':_0x262df1};}['toPascalCase'](_0x381188){const _0x572b3a=a0_0x257182;return _0x381188['replace'](/[-_\s]+(.)?/g,(_0x39edab,_0x26bf86)=>_0x26bf86?_0x26bf86[_0x572b3a(0x136)]():'')[_0x572b3a(0x10f)](/^(.)/,(_0x12f274,_0x5746e8)=>_0x5746e8[_0x572b3a(0x136)]());}}
|
|
1
|
+
const a0_0x355ef0=a0_0x5eec;(function(_0x1d5bcf,_0x404ce1){const _0x9f58d5=a0_0x5eec,_0xb572d=_0x1d5bcf();while(!![]){try{const _0x413b24=parseInt(_0x9f58d5(0xeb))/0x1+parseInt(_0x9f58d5(0xc8))/0x2+parseInt(_0x9f58d5(0xd9))/0x3+-parseInt(_0x9f58d5(0x11c))/0x4*(-parseInt(_0x9f58d5(0x128))/0x5)+-parseInt(_0x9f58d5(0x118))/0x6*(-parseInt(_0x9f58d5(0x119))/0x7)+-parseInt(_0x9f58d5(0xc5))/0x8+-parseInt(_0x9f58d5(0x12a))/0x9;if(_0x413b24===_0x404ce1)break;else _0xb572d['push'](_0xb572d['shift']());}catch(_0xc29fe4){_0xb572d['push'](_0xb572d['shift']());}}}(a0_0x37dc,0xce9df));function a0_0x37dc(){const _0xbee950=['99129BnFBTY','displayName','join','-\x20**Full\x20URL:**\x20','isPrimaryKey','-\x20**Method:**\x20','compareDatasets','enabled','number','analyzeDatasetItem','-\x20**Request\x20Fields:**\x20','raw','\x0a```\x0a',')\x0a\x0a','\x20operation\x20for\x20','Fields:\x20+','has','replace','getOperationAnalysis','includes','fullUrl','dbTypeLen','requestFields','getFieldList','-\x20**Path:**\x20','**Table\x20Name:**\x20','all','analyzeDatasetList','searchDatasets','source','extend','###\x20','name','dbType','##\x20Fields\x0a\x0a','code','removed','getTableKey','tableName','online','generateSDKInitCode','isEnum','createTime','getEnumMeta','responseExample','821946SvVyMZ','77VdLsYR','getOperationDocMeta','enumSource','4ZtVqHM','supportsCRUD','\x20total)','##\x20Operations\x0a\x0a','description','sdkCall','data','\x20...\x20(','datasetCode','from','method','usageExample','5108570HGllDo','tableData','32668713PrEPqe','fields','generateFullSDKExample','forEach','4166248fHbwuX','enumOptions','selectItemsSource','1663736rADCVf','string','updateTime','enumValues','generateSDKCode','slice','stringify','type','options','map','path','toLowerCase','**Table\x20Key:**\x20','values','getOperationCount','toArray','operations','4611987aviMPD','toPascalCase','\x0a**Response\x20Example:**\x0a```json\x0a','added','```typescript\x0a','generateApiDoc','filter','autoIncrement','isRequired','getTableName','length','getEnabledOperationAnalyses','getCount','\x20|\x20','requestExample','toUpperCase','\x0a**Request\x20Example:**\x0a```json\x0a','Operations:\x20+'];a0_0x37dc=function(){return _0xbee950;};return a0_0x37dc();}function a0_0x5eec(_0x35985d,_0x13bf07){const _0x37dc63=a0_0x37dc();return a0_0x5eec=function(_0x5eeccf,_0x45b982){_0x5eeccf=_0x5eeccf-0xc4;let _0x3046cb=_0x37dc63[_0x5eeccf];return _0x3046cb;},a0_0x5eec(_0x35985d,_0x13bf07);}import{DatasetList,DrivenDataDetailPlus,formatDbType}from'@lovrabet/dsparser';export class DatasetAnalyzer{[a0_0x355ef0(0x106)](_0x112ffc){const _0xe56c1d=a0_0x355ef0,_0x591cba=_0x112ffc[_0xe56c1d(0x122)]?.[_0xe56c1d(0x129)]||_0x112ffc[_0xe56c1d(0x129)]||_0x112ffc,_0x35f37f=new DatasetList(_0x591cba);return{'total':_0x35f37f[_0xe56c1d(0xe5)](),'datasets':_0x35f37f[_0xe56c1d(0xd7)]()[_0xe56c1d(0xd1)](_0x6c2d5a=>this[_0xe56c1d(0xf4)](_0x6c2d5a))};}[a0_0x355ef0(0xf4)](_0x263633){const _0x336ab8=a0_0x355ef0;return{'id':_0x263633['id']||0x0,'name':_0x263633['name']||'','code':_0x263633[_0x336ab8(0x124)]||'','tableName':_0x263633[_0x336ab8(0xe2)]?.()||_0x263633[_0x336ab8(0x111)]||'','source':_0x263633[_0x336ab8(0x108)]||'','description':_0x263633[_0x336ab8(0x120)]||'','isVirtual':_0x263633['isVirtualTable']?.()||![]};}['analyzeDatasetDetail'](_0xa2e303){const _0x1e706c=a0_0x355ef0,_0x1ccdf1=_0xa2e303[_0x1e706c(0x122)]||_0xa2e303,_0x16e838=new DrivenDataDetailPlus(_0x1ccdf1),_0x2ebc7c={'name':_0x16e838[_0x1e706c(0x10b)],'code':_0x16e838[_0x1e706c(0x124)],'tableName':_0x16e838[_0x1e706c(0xe2)](),'tableKey':_0x16e838['getTableKey']()},_0x41bdee=_0x16e838[_0x1e706c(0x102)](),_0x4682d2=_0x41bdee[_0x1e706c(0x105)]()[_0x1e706c(0xd1)](_0x2d5696=>{const _0x2a8f7a=_0x1e706c,_0x21341d=_0x2d5696[_0x2a8f7a(0x109)],_0x1b616f=_0x2d5696[_0x2a8f7a(0xf6)],_0x1e182f={'name':_0x2d5696[_0x2a8f7a(0x10b)],'type':_0x2d5696['type'],'required':_0x2d5696[_0x2a8f7a(0xe1)](),'primaryKey':_0x2d5696[_0x2a8f7a(0xef)](),'description':_0x2d5696[_0x2a8f7a(0x120)]||'','autoIncrement':Boolean(_0x21341d[_0x2a8f7a(0xe0)]),'createTime':Boolean(_0x21341d[_0x2a8f7a(0x115)]),'updateTime':Boolean(_0x21341d[_0x2a8f7a(0xca)]),'dbType':typeof _0x1b616f['dbType']===_0x2a8f7a(0xc9)?_0x1b616f[_0x2a8f7a(0x10c)]:undefined,'dbTypeLen':typeof _0x1b616f[_0x2a8f7a(0x100)]==='number'?_0x1b616f[_0x2a8f7a(0x100)]:undefined};if(_0x2d5696[_0x2a8f7a(0x114)]()){const _0x16d614=_0x2d5696[_0x2a8f7a(0x116)]();if(_0x16d614){_0x1e182f[_0x2a8f7a(0x114)]=!![],_0x1e182f[_0x2a8f7a(0xcb)]=_0x16d614['values'];if(_0x16d614[_0x2a8f7a(0xd0)]&&_0x16d614[_0x2a8f7a(0xd0)]['length']>0x0)_0x1e182f[_0x2a8f7a(0xc6)]=_0x16d614['options'];else _0x16d614[_0x2a8f7a(0xc7)]&&(_0x1e182f[_0x2a8f7a(0x11b)]=_0x16d614[_0x2a8f7a(0xc7)]);}}return _0x1e182f;}),_0x50f1d4=_0x16e838[_0x1e706c(0xe4)]()[_0x1e706c(0xd1)](_0x17f151=>{const _0x1d23e2=_0x1e706c,_0x1085b7={'name':_0x17f151['name'],'displayName':_0x17f151[_0x1d23e2(0xec)],'type':_0x17f151['type'],'method':_0x17f151[_0x1d23e2(0x126)],'path':_0x17f151[_0x1d23e2(0xd2)],'requestFields':_0x17f151[_0x1d23e2(0x101)],'requestFieldsCount':_0x17f151['requestFields']['length'],'requestExample':_0x17f151[_0x1d23e2(0xe7)],'responseExample':_0x17f151[_0x1d23e2(0x117)],'enabled':_0x17f151['enabled'],'fullUrl':_0x17f151[_0x1d23e2(0xff)]};return _0x1085b7;});return{'basic':_0x2ebc7c,'fields':_0x4682d2,'operations':_0x50f1d4,'supportsCRUD':_0x16e838[_0x1e706c(0x11d)](),'fieldCount':_0x16e838['getFieldCount'](),'operationCount':_0x16e838[_0x1e706c(0xd6)](),'enabledOperationCount':_0x50f1d4['length']};}['getOperationDetail'](_0x450545,_0x3c5c5c){const _0x54f270=a0_0x355ef0,_0x567712=_0x450545['data']||_0x450545,_0x4e6a81=new DrivenDataDetailPlus(_0x567712),_0x1a4318=_0x4e6a81[_0x54f270(0xfd)](_0x3c5c5c);if(!_0x1a4318)return null;return{'name':_0x1a4318['name'],'displayName':_0x1a4318[_0x54f270(0xec)],'type':_0x1a4318[_0x54f270(0xcf)],'method':_0x1a4318[_0x54f270(0x126)],'path':_0x1a4318[_0x54f270(0xd2)],'requestFields':_0x1a4318[_0x54f270(0x101)],'requestFieldsCount':_0x1a4318[_0x54f270(0x101)][_0x54f270(0xe3)],'requestExample':_0x1a4318[_0x54f270(0xe7)],'responseExample':_0x1a4318[_0x54f270(0x117)],'enabled':_0x1a4318[_0x54f270(0xf2)],'fullUrl':_0x1a4318[_0x54f270(0xff)]};}[a0_0x355ef0(0xcc)](_0x3c8e1c,_0xe1bcab,_0x200a37,_0x5747e0=a0_0x355ef0(0x112)){const _0x53276b=a0_0x355ef0,_0x4a642b=_0x3c8e1c[_0x53276b(0x122)]||_0x3c8e1c,_0x4bf1e1=new DrivenDataDetailPlus(_0x4a642b),_0x3eaae9=_0x4bf1e1[_0x53276b(0x11a)](_0xe1bcab);if(!_0x3eaae9)return null;const _0x230863=_0x4bf1e1['getTableKey'](),_0x44ea4f=_0x4bf1e1[_0x53276b(0xe2)](),_0x35c112=this[_0x53276b(0xda)](_0x44ea4f),_0x2829e5=_0x4bf1e1['getOperationAnalysis'](_0xe1bcab),_0x1d29b8=_0x4bf1e1[_0x53276b(0x12c)](_0xe1bcab,_0x200a37);return{'code':_0x3eaae9[_0x53276b(0x121)][_0x53276b(0x10e)],'sdkCallInfo':{'modelName':_0x35c112,'tableName':_0x44ea4f,'tableKey':_0x230863,'datasetCode':_0x4bf1e1['datasetCode'],'operationName':_0xe1bcab},'requestExample':_0x2829e5?.[_0x53276b(0xe7)],'responseExample':_0x2829e5?.[_0x53276b(0x117)],'sdkInitCode':_0x4bf1e1[_0x53276b(0x113)](_0x230863),'usageExample':_0x3eaae9[_0x53276b(0x127)],'fullExample':_0x1d29b8||undefined};}[a0_0x355ef0(0xde)](_0x463491){const _0x745cb8=a0_0x355ef0,_0x2b4d39=_0x463491[_0x745cb8(0x122)]||_0x463491,_0x4c48bd=new DrivenDataDetailPlus(_0x2b4d39),_0x1e5468=_0x4c48bd[_0x745cb8(0xe4)]()[_0x745cb8(0xd1)](_0x1e27f9=>({'name':_0x1e27f9['name'],'displayName':_0x1e27f9['displayName'],'description':_0x1e27f9[_0x745cb8(0xec)]+_0x745cb8(0xf9)+_0x4c48bd[_0x745cb8(0x10b)],'method':_0x1e27f9[_0x745cb8(0x126)],'path':_0x1e27f9[_0x745cb8(0xd2)],'requestParams':_0x1e27f9[_0x745cb8(0x101)],'requestExample':JSON['stringify'](_0x1e27f9['requestExample'],null,0x2),'responseExample':JSON[_0x745cb8(0xce)](_0x1e27f9[_0x745cb8(0x117)],null,0x2)}));return{'datasetName':_0x4c48bd['name'],'tableName':_0x4c48bd[_0x745cb8(0xe2)](),'operations':_0x1e5468};}[a0_0x355ef0(0x107)](_0x287611,_0xcddefc){const _0x315ae3=a0_0x355ef0,_0x2926e4=new DatasetList(_0x287611),_0x534562=_0xcddefc[_0x315ae3(0xd3)]();return _0x2926e4[_0x315ae3(0xd7)]()[_0x315ae3(0xdf)](_0x2a1bc0=>{const _0x113619=_0x315ae3,_0x11b4b1=(_0x2a1bc0[_0x113619(0x10b)]||'')[_0x113619(0xd3)]()[_0x113619(0xfe)](_0x534562),_0x24655b=(_0x2a1bc0[_0x113619(0xe2)]?.()||_0x2a1bc0[_0x113619(0x111)]||'')[_0x113619(0xd3)]()[_0x113619(0xfe)](_0x534562),_0x5deaf1=(_0x2a1bc0[_0x113619(0x124)]||'')[_0x113619(0xd3)]()[_0x113619(0xfe)](_0x534562),_0x2a382d=(_0x2a1bc0[_0x113619(0x120)]||'')['toLowerCase']()['includes'](_0x534562);return _0x11b4b1||_0x24655b||_0x5deaf1||_0x2a382d;})[_0x315ae3(0xd1)](_0x5e9fca=>this[_0x315ae3(0xf4)](_0x5e9fca));}['generateMarkdownDoc'](_0xedcc23){const _0x25e1fa=a0_0x355ef0,_0x4d1e4c=_0xedcc23[_0x25e1fa(0x122)]||_0xedcc23,_0xf67493=new DrivenDataDetailPlus(_0x4d1e4c);let _0x26d73a='#\x20'+_0xf67493['name']+'\x0a\x0a';_0x26d73a+='**Dataset\x20Code:**\x20'+_0xf67493[_0x25e1fa(0x124)]+'\x0a',_0x26d73a+=_0x25e1fa(0x104)+_0xf67493[_0x25e1fa(0xe2)]()+'\x0a',_0x26d73a+=_0x25e1fa(0xd4)+_0xf67493[_0x25e1fa(0x110)]()+'\x0a\x0a',_0x26d73a+=_0x25e1fa(0x10d);const _0x233007=_0xf67493[_0x25e1fa(0x102)]();_0x233007[_0x25e1fa(0xe3)]>0x0&&(_0x26d73a+='|\x20Field\x20Name\x20|\x20Code\x20|\x20DB\x20Type\x20|\x20UI\x20Type\x20|\x20Required\x20|\x20Primary\x20Key\x20|\x20Enum\x20Values\x20|\x20Description\x20|\x0a',_0x26d73a+='|------------|------|---------|---------|----------|-------------|-------------|-------------|\x0a',_0x233007[_0x25e1fa(0x105)]()[_0x25e1fa(0xc4)](_0x3f20f7=>{const _0x3665c3=_0x25e1fa,_0x175432=_0x3f20f7[_0x3665c3(0xf6)],_0x3eaaa0=formatDbType(typeof _0x175432[_0x3665c3(0x10c)]===_0x3665c3(0xc9)?_0x175432[_0x3665c3(0x10c)]:undefined,typeof _0x175432[_0x3665c3(0x100)]===_0x3665c3(0xf3)?_0x175432[_0x3665c3(0x100)]:undefined);let _0x3be4c7='';if(_0x3f20f7[_0x3665c3(0x114)]()){const _0x3f7f10=_0x3f20f7['getEnumMeta']();if(_0x3f7f10&&_0x3f7f10['values']['length']>0x0){const _0x2e8ce1=_0x3f7f10['values'][_0x3665c3(0xcd)](0x0,0x5);_0x3be4c7=_0x2e8ce1[_0x3665c3(0xed)](',\x20'),_0x3f7f10[_0x3665c3(0xd5)][_0x3665c3(0xe3)]>0x5&&(_0x3be4c7+=_0x3665c3(0x123)+_0x3f7f10[_0x3665c3(0xd5)][_0x3665c3(0xe3)]+_0x3665c3(0x11e));}}_0x26d73a+='|\x20'+_0x3f20f7[_0x3665c3(0x10b)]+_0x3665c3(0xe6)+_0x3f20f7[_0x3665c3(0x10e)]+'\x20|\x20'+_0x3eaaa0+'\x20|\x20'+_0x3f20f7['type']+_0x3665c3(0xe6)+(_0x3f20f7[_0x3665c3(0xe1)]()?'✅':'')+_0x3665c3(0xe6)+(_0x3f20f7[_0x3665c3(0xef)]()?'🔑':'')+_0x3665c3(0xe6)+_0x3be4c7+_0x3665c3(0xe6)+(_0x3f20f7['description']||'')+'\x20|\x0a';}),_0x26d73a+='\x0a');_0x26d73a+=_0x25e1fa(0x11f);const _0x2e680c=_0xf67493[_0x25e1fa(0xe4)]();_0x2e680c['forEach'](_0x1d1783=>{const _0x46c791=_0x25e1fa;_0x26d73a+=_0x46c791(0x10a)+_0x1d1783['displayName']+'\x20('+_0x1d1783[_0x46c791(0x10b)]+_0x46c791(0xf8),_0x26d73a+=_0x46c791(0xf0)+_0x1d1783[_0x46c791(0x126)]+'\x0a',_0x26d73a+=_0x46c791(0x103)+_0x1d1783['path']+'\x0a',_0x1d1783[_0x46c791(0xff)]&&(_0x26d73a+=_0x46c791(0xee)+_0x1d1783[_0x46c791(0xff)]+'\x0a'),_0x1d1783[_0x46c791(0x101)]&&_0x1d1783[_0x46c791(0x101)][_0x46c791(0xe3)]>0x0&&(_0x26d73a+=_0x46c791(0xf5)+_0x1d1783[_0x46c791(0x101)]['join'](',\x20')+'\x0a'),_0x1d1783[_0x46c791(0xe7)]&&(_0x26d73a+=_0x46c791(0xe9)+JSON[_0x46c791(0xce)](_0x1d1783[_0x46c791(0xe7)],null,0x2)+_0x46c791(0xf7)),_0x1d1783['responseExample']&&(_0x26d73a+=_0x46c791(0xdb)+JSON[_0x46c791(0xce)](_0x1d1783[_0x46c791(0x117)],null,0x2)+'\x0a```\x0a'),_0x26d73a+='\x0a';});const _0x1fa4e3=_0xf67493[_0x25e1fa(0x110)](),_0x46abf3=_0xf67493[_0x25e1fa(0x113)](_0x1fa4e3);return _0x46abf3&&(_0x26d73a+='##\x20SDK\x20Usage\x0a\x0a',_0x26d73a+=_0x25e1fa(0xdd),_0x26d73a+=_0x46abf3,_0x26d73a+='```\x0a'),_0x26d73a;}[a0_0x355ef0(0xf1)](_0x57a918,_0x78613c){const _0x1bb780=a0_0x355ef0,_0xbe1b1=_0x57a918[_0x1bb780(0x122)]||_0x57a918,_0x1b063f=_0x78613c[_0x1bb780(0x122)]||_0x78613c,_0x2a7c49=new DrivenDataDetailPlus(_0xbe1b1),_0x5c1f1d=new DrivenDataDetailPlus(_0x1b063f),_0x2c109e=new Set(_0x2a7c49[_0x1bb780(0x102)]()[_0x1bb780(0x105)]()[_0x1bb780(0xd1)](_0x1f21a0=>_0x1f21a0[_0x1bb780(0x10b)])),_0x669613=new Set(_0x5c1f1d[_0x1bb780(0x102)]()[_0x1bb780(0x105)]()[_0x1bb780(0xd1)](_0x4e1aa2=>_0x4e1aa2[_0x1bb780(0x10b)])),_0x33d3a9=new Set(_0x2a7c49[_0x1bb780(0xe4)]()['map'](_0x3464a1=>_0x3464a1[_0x1bb780(0x10b)])),_0x55cad1=new Set(_0x5c1f1d[_0x1bb780(0xe4)]()[_0x1bb780(0xd1)](_0x7ddf77=>_0x7ddf77['name'])),_0x29dd58={'fields':{'added':Array['from'](_0x669613)['filter'](_0x2d80b0=>!_0x2c109e[_0x1bb780(0xfb)](_0x2d80b0)),'removed':Array[_0x1bb780(0x125)](_0x2c109e)[_0x1bb780(0xdf)](_0x1b5663=>!_0x669613[_0x1bb780(0xfb)](_0x1b5663)),'modified':[]},'operations':{'added':Array[_0x1bb780(0x125)](_0x55cad1)[_0x1bb780(0xdf)](_0x35e2a9=>!_0x33d3a9[_0x1bb780(0xfb)](_0x35e2a9)),'removed':Array[_0x1bb780(0x125)](_0x33d3a9)['filter'](_0x5a8b68=>!_0x55cad1['has'](_0x5a8b68))}},_0x527533=_0x1bb780(0xfa)+_0x29dd58[_0x1bb780(0x12b)]['added'][_0x1bb780(0xe3)]+'/-'+_0x29dd58[_0x1bb780(0x12b)][_0x1bb780(0x10f)][_0x1bb780(0xe3)]+',\x20'+(_0x1bb780(0xea)+_0x29dd58[_0x1bb780(0xd8)][_0x1bb780(0xdc)][_0x1bb780(0xe3)]+'/-'+_0x29dd58['operations'][_0x1bb780(0x10f)][_0x1bb780(0xe3)]);return{'differences':_0x29dd58,'summary':_0x527533};}[a0_0x355ef0(0xda)](_0x10361e){const _0x34af06=a0_0x355ef0;return _0x10361e[_0x34af06(0xfc)](/[-_\s]+(.)?/g,(_0x28623c,_0x592ed1)=>_0x592ed1?_0x592ed1[_0x34af06(0xe8)]():'')['replace'](/^(.)/,(_0x9eb32a,_0x1436da)=>_0x1436da[_0x34af06(0xe8)]());}}
|
package/dist/api/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a1_0x5b1f(_0x5ce0d7,_0x4692b2){const _0x3e8fa9=a1_0x3e8f();return a1_0x5b1f=function(_0x5b1f8a,_0x2d299e){_0x5b1f8a=_0x5b1f8a-0x1df;let _0xb29711=_0x3e8fa9[_0x5b1f8a];return _0xb29711;},a1_0x5b1f(_0x5ce0d7,_0x4692b2);}function a1_0x3e8f(){const _0x176183=['48muhcCK','15642TJPiCS','data','8hPhnTc','67534gdwGug','152090wgCpxW','delete','3863511UHHQWP','6841352dAhTdP','set','clear','floor','cache','30fcqUth','get','16YRkUnO','getStats','size','keys','now','469986jdZQKx','788YSxAfB','45598620wPqbvw','defaultTTL','from'];a1_0x3e8f=function(){return _0x176183;};return a1_0x3e8f();}const a1_0x5532ee=a1_0x5b1f;(function(_0x202561,_0x13919b){const _0x3df350=a1_0x5b1f,_0x29d8ac=_0x202561();while(!![]){try{const _0x5f229c=-parseInt(_0x3df350(0x1f2))/0x1*(parseInt(_0x3df350(0x1f1))/0x2)+-parseInt(_0x3df350(0x1ef))/0x3*(parseInt(_0x3df350(0x1ea))/0x4)+parseInt(_0x3df350(0x1f3))/0x5*(-parseInt(_0x3df350(0x1ee))/0x6)+-parseInt(_0x3df350(0x1f6))/0x7+parseInt(_0x3df350(0x1e4))/0x8*(-parseInt(_0x3df350(0x1f5))/0x9)+-parseInt(_0x3df350(0x1e2))/0xa*(-parseInt(_0x3df350(0x1e9))/0xb)+parseInt(_0x3df350(0x1eb))/0xc;if(_0x5f229c===_0x13919b)break;else _0x29d8ac['push'](_0x29d8ac['shift']());}catch(_0x5fcbc9){_0x29d8ac['push'](_0x29d8ac['shift']());}}}(a1_0x3e8f,0x86a6b));export class SimpleCache{[a1_0x5532ee(0x1e1)]=new Map();['defaultTTL'];constructor(_0x346f9b=0x5){const _0x51d42c=a1_0x5532ee;this[_0x51d42c(0x1ec)]=_0x346f9b*0x3c*0x3e8;}['get'](_0x55cde9){const _0x481a66=a1_0x5532ee,_0x56025b=this[_0x481a66(0x1e1)][_0x481a66(0x1e3)](_0x55cde9);if(!_0x56025b)return null;const _0x7b3c55=Date[_0x481a66(0x1e8)](),_0x312d9e=_0x7b3c55-_0x56025b['timestamp'];if(_0x312d9e>this[_0x481a66(0x1ec)])return this[_0x481a66(0x1e1)]['delete'](_0x55cde9),null;const _0x130d67=Math[_0x481a66(0x1e0)](_0x312d9e/0x3e8);return _0x56025b[_0x481a66(0x1f0)];}['set'](_0x31e2cd,_0x2a5df3){const _0x104979=a1_0x5532ee;this[_0x104979(0x1e1)][_0x104979(0x1f7)](_0x31e2cd,{'data':_0x2a5df3,'timestamp':Date['now']()});}[a1_0x5532ee(0x1df)](_0x21419a){const _0x2234d8=a1_0x5532ee;_0x21419a?this[_0x2234d8(0x1e1)][_0x2234d8(0x1f4)](_0x21419a):this[_0x2234d8(0x1e1)][_0x2234d8(0x1df)]();}[a1_0x5532ee(0x1e5)](){const _0x3c4157=a1_0x5532ee;return{'size':this[_0x3c4157(0x1e1)][_0x3c4157(0x1e6)],'ttlMinutes':this[_0x3c4157(0x1ec)]/0xea60,'entries':Array[_0x3c4157(0x1ed)](this['cache'][_0x3c4157(0x1e7)]())};}}export const apiCache=new SimpleCache(0x5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a2_0xed3d8a=a2_0x5e4c;function a2_0x5e4c(_0xab6ef9,_0x3a2233){const _0x5b7b3f=a2_0x5b7b();return a2_0x5e4c=function(_0x5e4cf3,_0x4d58a2){_0x5e4cf3=_0x5e4cf3-0x158;let _0x5d97d5=_0x5b7b3f[_0x5e4cf3];return _0x5d97d5;},a2_0x5e4c(_0xab6ef9,_0x3a2233);}(function(_0x380338,_0x525757){const _0x5e1c04=a2_0x5e4c,_0xca4838=_0x380338();while(!![]){try{const _0x5166ee=parseInt(_0x5e1c04(0x16e))/0x1+-parseInt(_0x5e1c04(0x176))/0x2*(-parseInt(_0x5e1c04(0x163))/0x3)+parseInt(_0x5e1c04(0x17a))/0x4+parseInt(_0x5e1c04(0x190))/0x5*(-parseInt(_0x5e1c04(0x185))/0x6)+parseInt(_0x5e1c04(0x169))/0x7*(parseInt(_0x5e1c04(0x15a))/0x8)+parseInt(_0x5e1c04(0x17e))/0x9*(-parseInt(_0x5e1c04(0x17f))/0xa)+parseInt(_0x5e1c04(0x15c))/0xb*(-parseInt(_0x5e1c04(0x15f))/0xc);if(_0x5166ee===_0x525757)break;else _0xca4838['push'](_0xca4838['shift']());}catch(_0x350793){_0xca4838['push'](_0xca4838['shift']());}}}(a2_0x5b7b,0xab397));import{getCookie}from'../auth/cookie-manager.js';import{getApiDomain}from'../auth/constants.js';import{apiCache}from'./cache.js';function a2_0x5b7b(){const _0x4de418=['appCode','658488DDZbRw','toLowerCase','93137QCVQdz','application/json','API\x20error:\x20','3324McnvDo','env','text','getDatasetList','1366941PQjSuG','API\x20request\x20failed:\x20HTTP\x20','cookie','Unknown\x20error','forceRefresh','object','28NfjPEv','/api/custom/executeSql','params','tableData','/smartapi/dataset/get-driven-data?id=','1231598yZuOlD','postRequest','code','pageSize','status','currentPage','includes','executeSql','4TDLFxA','name','set','length','4570256LKWgWl','getCustomSqlList','getDatasetDetail','request','8766aPWOMv','1090GDOPng','message','online','apiDomain','dataset-detail:','tableName','12ZHmFXx','¤tPage=','data','get','json','/smartapi/custom/queryUserCustomSqlList','Authentication\x20failed.\x20Please\x20login\x20again.','searchDatasets','filter','stringify','success','1154600uQiNUi','&pageSize='];a2_0x5b7b=function(){return _0x4de418;};return a2_0x5b7b();}export class DevApiClient{[a2_0xed3d8a(0x159)];[a2_0xed3d8a(0x160)];[a2_0xed3d8a(0x165)];[a2_0xed3d8a(0x182)];constructor(_0x489d71){const _0x1c1584=a2_0xed3d8a;this['appCode']=_0x489d71[_0x1c1584(0x159)],this['env']=_0x489d71['env']||_0x1c1584(0x181),this[_0x1c1584(0x165)]=_0x489d71[_0x1c1584(0x165)]||getCookie(),this[_0x1c1584(0x182)]=getApiDomain(this[_0x1c1584(0x160)]);if(!this['cookie'])throw new Error('No\x20authentication\x20cookie\x20found.\x20Please\x20login\x20first.');}async[a2_0xed3d8a(0x17d)](_0x2f4462){const _0x4037e8=a2_0xed3d8a,_0x4d5225=await fetch(_0x2f4462,{'headers':{'Cookie':this['cookie']}});if(!_0x4d5225['ok']){if(_0x4d5225[_0x4037e8(0x172)]===0x191)throw new Error(_0x4037e8(0x18b));let _0xb51a3f='';try{_0xb51a3f=await _0x4d5225[_0x4037e8(0x161)]();}catch{}throw new Error(_0x4037e8(0x164)+_0x4d5225['status']+(_0xb51a3f?'\x0a'+_0xb51a3f:''));}const _0x12e33b=await _0x4d5225[_0x4037e8(0x189)]();if(_0x12e33b&&typeof _0x12e33b===_0x4037e8(0x168)&&_0x4037e8(0x18f)in _0x12e33b&&!_0x12e33b[_0x4037e8(0x18f)]){const _0x500ebb=_0x12e33b;throw new Error('API\x20error:\x20'+(_0x500ebb[_0x4037e8(0x180)]||_0x500ebb['errorMsg']||_0x4037e8(0x166)));}return _0x12e33b;}async[a2_0xed3d8a(0x16f)](_0x4189de,_0xb0e7db){const _0x252e07=a2_0xed3d8a,_0x2456c8=await fetch(_0x4189de,{'method':'POST','headers':{'Content-Type':_0x252e07(0x15d),'Cookie':this[_0x252e07(0x165)]},'body':JSON[_0x252e07(0x18e)](_0xb0e7db)});if(!_0x2456c8['ok']){if(_0x2456c8[_0x252e07(0x172)]===0x191)throw new Error(_0x252e07(0x18b));let _0x69bf30='';try{_0x69bf30=await _0x2456c8[_0x252e07(0x161)]();}catch{}throw new Error(_0x252e07(0x164)+_0x2456c8[_0x252e07(0x172)]+(_0x69bf30?'\x0a'+_0x69bf30:''));}const _0x5973ab=await _0x2456c8[_0x252e07(0x189)]();if(_0x5973ab&&typeof _0x5973ab==='object'&&_0x252e07(0x18f)in _0x5973ab&&!_0x5973ab[_0x252e07(0x18f)]){const _0x47138f=_0x5973ab;throw new Error(_0x252e07(0x15e)+(_0x47138f[_0x252e07(0x180)]||_0x47138f['errorMsg']||_0x252e07(0x166)));}return _0x5973ab;}async[a2_0xed3d8a(0x162)](_0x4fe532){const _0x18e906=a2_0xed3d8a,_0x12a138=_0x4fe532?.[_0x18e906(0x171)]||0x3e7,_0x1d0491=_0x4fe532?.[_0x18e906(0x173)]||0x1,_0x37f570=_0x4fe532?.[_0x18e906(0x167)]||![],_0x319e0e='dataset-list:'+this[_0x18e906(0x159)]+':'+this[_0x18e906(0x160)]+':'+_0x12a138+':'+_0x1d0491;if(!_0x37f570){const _0x35e6f2=apiCache[_0x18e906(0x188)](_0x319e0e);if(_0x35e6f2)return _0x35e6f2;}const _0x1deeab=this[_0x18e906(0x182)]+'/smartapi/dataset/getList?appCode='+this['appCode']+_0x18e906(0x158)+_0x12a138+_0x18e906(0x186)+_0x1d0491,_0x57bf6c=await this[_0x18e906(0x17d)](_0x1deeab);return apiCache[_0x18e906(0x178)](_0x319e0e,_0x57bf6c),_0x57bf6c;}async[a2_0xed3d8a(0x17c)](_0x51879b,_0x31bfb6=![]){const _0x4477a3=a2_0xed3d8a,_0x33e25d=_0x4477a3(0x183)+this[_0x4477a3(0x159)]+':'+this['env']+':'+_0x51879b;if(!_0x31bfb6){const _0x213ad8=apiCache['get'](_0x33e25d);if(_0x213ad8)return _0x213ad8;}const _0x5b3c4a=this[_0x4477a3(0x182)]+_0x4477a3(0x16d)+_0x51879b,_0x32bf2d=await this[_0x4477a3(0x17d)](_0x5b3c4a);return apiCache['set'](_0x33e25d,_0x32bf2d),_0x32bf2d;}async[a2_0xed3d8a(0x18c)](_0xab23af){const _0x4b408c=a2_0xed3d8a,_0x3dfca1=await this[_0x4b408c(0x162)]({'pageSize':0x3e7});if(!_0x3dfca1[_0x4b408c(0x18f)]||!_0x3dfca1[_0x4b408c(0x187)]?.[_0x4b408c(0x16c)])return{'success':!![],'data':{'tableData':[]}};const _0x4b7439=_0x3dfca1[_0x4b408c(0x187)][_0x4b408c(0x16c)][_0x4b408c(0x18d)](_0x36d9c7=>{const _0x2c9c73=_0x4b408c,_0x289a26=_0xab23af[_0x2c9c73(0x15b)]();return _0x36d9c7[_0x2c9c73(0x177)]?.[_0x2c9c73(0x15b)]()[_0x2c9c73(0x174)](_0x289a26)||_0x36d9c7[_0x2c9c73(0x170)]?.['toLowerCase']()[_0x2c9c73(0x174)](_0x289a26)||_0x36d9c7['dbtableConfig']?.[_0x2c9c73(0x184)]?.[_0x2c9c73(0x15b)]()[_0x2c9c73(0x174)](_0x289a26)||_0x36d9c7['description']?.[_0x2c9c73(0x15b)]()[_0x2c9c73(0x174)](_0x289a26);});return{'success':!![],'data':{'tableData':_0x4b7439,'paging':{'totalCount':_0x4b7439[_0x4b408c(0x179)],'currentPage':0x1,'pageSize':0x3e7}}};}async[a2_0xed3d8a(0x17b)](_0x5c696d){const _0x1973f0=a2_0xed3d8a,_0x2bf36d=_0x5c696d?.[_0x1973f0(0x173)]||0x1,_0x61467d=_0x5c696d?.[_0x1973f0(0x171)]||0x3e7,_0xc2389f=this['apiDomain']+_0x1973f0(0x18a),_0x316bbb={'appCode':this[_0x1973f0(0x159)],'currentPage':_0x2bf36d,'pageSize':_0x61467d},_0x188ad4=await this[_0x1973f0(0x16f)](_0xc2389f,_0x316bbb);return _0x188ad4;}async[a2_0xed3d8a(0x175)](_0x10f06e){const _0x779d2f=a2_0xed3d8a,_0x1ebf51=this['apiDomain']+_0x779d2f(0x16a),_0xe72e6f={'sqlCode':_0x10f06e['sqlCode'],..._0x10f06e[_0x779d2f(0x16b)]&&{'params':_0x10f06e[_0x779d2f(0x16b)]}};return await this[_0x779d2f(0x16f)](_0x1ebf51,_0xe72e6f);}}
|
package/dist/auth/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x488dc0=a3_0x15d9;(function(_0x5817cb,_0x4ec63f){const _0x4db7d5=a3_0x15d9,_0x369c31=_0x5817cb();while(!![]){try{const _0x598288=-parseInt(_0x4db7d5(0x1d7))/0x1+-parseInt(_0x4db7d5(0x1e0))/0x2*(parseInt(_0x4db7d5(0x1d8))/0x3)+parseInt(_0x4db7d5(0x1e2))/0x4*(-parseInt(_0x4db7d5(0x1d9))/0x5)+parseInt(_0x4db7d5(0x1dc))/0x6+parseInt(_0x4db7d5(0x1da))/0x7*(parseInt(_0x4db7d5(0x1de))/0x8)+-parseInt(_0x4db7d5(0x1d6))/0x9*(parseInt(_0x4db7d5(0x1dd))/0xa)+-parseInt(_0x4db7d5(0x1e3))/0xb*(-parseInt(_0x4db7d5(0x1e6))/0xc);if(_0x598288===_0x4ec63f)break;else _0x369c31['push'](_0x369c31['shift']());}catch(_0x230d7c){_0x369c31['push'](_0x369c31['shift']());}}}(a3_0x12f6,0x93be3));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';function a3_0x12f6(){const _0x531ea8=['891khizMP','1048125fQAgNT','18orNFyn','5XOVjzi','966TKxmaj','https://user.lovrabet.com','3545718WySjWS','45190kQYLqz','5760bmKkxz','/cookie','196532hAWhZp','https://api.lovrabet.com','4285376NMagrh','2057VsyJmK','online','https://user-daily.lovrabet.com','197088lSCiVs'];a3_0x12f6=function(){return _0x531ea8;};return a3_0x12f6();}function a3_0x15d9(_0x476122,_0x523540){const _0x12f668=a3_0x12f6();return a3_0x15d9=function(_0x15d9b8,_0x40e6e7){_0x15d9b8=_0x15d9b8-0x1d6;let _0x136929=_0x12f668[_0x15d9b8];return _0x136929;},a3_0x15d9(_0x476122,_0x523540);}export const cookieFile=configDir+a3_0x488dc0(0x1df);mkdirSync(configDir,{'recursive':!![]});export const getApiDomain=(_0x281535=a3_0x488dc0(0x1e4))=>_0x281535===a3_0x488dc0(0x1e4)?a3_0x488dc0(0x1e1):'https://daily-api.lovrabet.com';export const getUserDomain=(_0x1fe64b=a3_0x488dc0(0x1e4))=>_0x1fe64b===a3_0x488dc0(0x1e4)?a3_0x488dc0(0x1db):a3_0x488dc0(0x1e5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28bfd3,_0x5dd727){const _0x7e569a=a4_0x8193,_0x12c289=_0x28bfd3();while(!![]){try{const _0x576de7=parseInt(_0x7e569a(0x133))/0x1+-parseInt(_0x7e569a(0x132))/0x2*(parseInt(_0x7e569a(0x127))/0x3)+parseInt(_0x7e569a(0x12a))/0x4*(parseInt(_0x7e569a(0x12c))/0x5)+-parseInt(_0x7e569a(0x128))/0x6+-parseInt(_0x7e569a(0x131))/0x7*(-parseInt(_0x7e569a(0x12f))/0x8)+parseInt(_0x7e569a(0x134))/0x9*(-parseInt(_0x7e569a(0x130))/0xa)+-parseInt(_0x7e569a(0x12e))/0xb*(parseInt(_0x7e569a(0x135))/0xc);if(_0x576de7===_0x5dd727)break;else _0x12c289['push'](_0x12c289['shift']());}catch(_0x5ed2c5){_0x12c289['push'](_0x12c289['shift']());}}}(a4_0xfd77,0x78b0b));import{readFileSync,writeFileSync}from'node:fs';import{cookieFile}from'./constants.js';export function getCookie(){const _0x34ca24=a4_0x8193;try{return readFileSync(cookieFile,_0x34ca24(0x12d))[_0x34ca24(0x12b)]();}catch{return'';}}function a4_0x8193(_0x539af1,_0x313533){const _0xfd77d7=a4_0xfd77();return a4_0x8193=function(_0x819376,_0x5a5f1b){_0x819376=_0x819376-0x127;let _0x17a0f7=_0xfd77d7[_0x819376];return _0x17a0f7;},a4_0x8193(_0x539af1,_0x313533);}function a4_0xfd77(){const _0x1ebbc6=['150VzEuKy','259150YTyIbG','45hciXzZ','45468diogpa','Failed\x20to\x20save\x20cookie\x20to\x20','25113kXNeDK','1737840HCPCQg','length','1306692RHWQSu','trim','15CJbGFj','utf-8','110omaCXW','144ZNoesW','1211930myayJA','317527nhDFyo'];a4_0xfd77=function(){return _0x1ebbc6;};return a4_0xfd77();}export function saveCookie(_0x305acd){const _0x56e3c=a4_0x8193;try{writeFileSync(cookieFile,_0x305acd,'utf-8');}catch(_0x203548){throw new Error(_0x56e3c(0x136)+cookieFile+':\x20'+_0x203548['message']);}}export function hasCookie(){const _0x235877=a4_0x8193,_0x45c815=getCookie();return _0x45c815[_0x235877(0x129)]>0x0;}export function clearCookie(){const _0x695445=a4_0x8193;try{writeFileSync(cookieFile,'',_0x695445(0x12d));}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a79a9,_0xcc1522){const _0x165eba=a5_0x5207,_0x137a25=_0x4a79a9();while(!![]){try{const _0x35b12e=-parseInt(_0x165eba(0x129))/0x1*(parseInt(_0x165eba(0x12c))/0x2)+parseInt(_0x165eba(0x126))/0x3*(-parseInt(_0x165eba(0x133))/0x4)+-parseInt(_0x165eba(0x127))/0x5+-parseInt(_0x165eba(0x12b))/0x6*(-parseInt(_0x165eba(0x12d))/0x7)+-parseInt(_0x165eba(0x130))/0x8+-parseInt(_0x165eba(0x12f))/0x9*(parseInt(_0x165eba(0x135))/0xa)+parseInt(_0x165eba(0x134))/0xb*(parseInt(_0x165eba(0x12a))/0xc);if(_0x35b12e===_0xcc1522)break;else _0x137a25['push'](_0x137a25['shift']());}catch(_0xb4afed){_0x137a25['push'](_0x137a25['shift']());}}}(a5_0xe2d1,0xeb969));import{getCookie}from'./cookie-manager.js';import{getUserDomain}from'./constants.js';export async function isSessionValid(_0x449ac9='online'){const _0x5c73fc=a5_0x5207,_0xde6c9e=getCookie();if(!_0xde6c9e)return![];try{const _0x18d04c=await fetch(getUserDomain(_0x449ac9)+_0x5c73fc(0x12e),{'headers':{'cookie':_0xde6c9e}});if(!_0x18d04c['ok'])return![];const _0x3a49e9=await _0x18d04c[_0x5c73fc(0x131)]();return!!(_0x3a49e9?.[_0x5c73fc(0x128)]&&_0x3a49e9?.[_0x5c73fc(0x132)]);}catch{return![];}}function a5_0x5207(_0x3ee9e5,_0x459d03){const _0xe2d1e5=a5_0xe2d1();return a5_0x5207=function(_0x52077e,_0x3d0bf1){_0x52077e=_0x52077e-0x126;let _0x1edb59=_0xe2d1e5[_0x52077e];return _0x1edb59;},a5_0x5207(_0x3ee9e5,_0x459d03);}function a5_0xe2d1(){const _0x56ec1f=['8932ZjdKfy','1474zawCwg','11250LkNQAK','543nDKZtp','9399500DERcXI','session','127829lJSHkd','662652KDLMjg','6qmXdvB','30pKsbFd','353927GvEJpl','/api/auth/get-session','9549NXnHRl','8720584hytWYZ','json','user'];a5_0xe2d1=function(){return _0x56ec1f;};return a5_0xe2d1();}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0x1b6744,_0x212970){const _0x3192c8=a6_0x71d9,_0x27a84c=_0x1b6744();while(!![]){try{const _0x51759e=-parseInt(_0x3192c8(0xc8))/0x1*(parseInt(_0x3192c8(0xbf))/0x2)+-parseInt(_0x3192c8(0xc6))/0x3+-parseInt(_0x3192c8(0xc2))/0x4+parseInt(_0x3192c8(0xca))/0x5+-parseInt(_0x3192c8(0xc4))/0x6+-parseInt(_0x3192c8(0xc3))/0x7*(parseInt(_0x3192c8(0xc1))/0x8)+parseInt(_0x3192c8(0xc5))/0x9;if(_0x51759e===_0x212970)break;else _0x27a84c['push'](_0x27a84c['shift']());}catch(_0x5e8c6e){_0x27a84c['push'](_0x27a84c['shift']());}}}(a6_0x17ca,0xb5956));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createServer}from'./server.js';function a6_0x17ca(){const _0x174d38=['Unhandled\x20error:','32KMLYmz','3650720ByPFoq','1702274AhtCll','8045934YouUkH','37251045brgint','3348609ZtHfnG','exit','11yPNByT','log','5191050TGJlxA','SIGINT','env','SIGTERM','Shutting\x20down\x20Lovrabet\x20Dataset\x20MCP\x20Server...','MCP_DEBUG','Failed\x20to\x20start\x20Lovrabet\x20Dataset\x20MCP\x20Server:','16518aduMqO'];a6_0x17ca=function(){return _0x174d38;};return a6_0x17ca();}function a6_0x71d9(_0x22b1e5,_0x5c8224){const _0x17ca0f=a6_0x17ca();return a6_0x71d9=function(_0x71d96,_0x18ee4f){_0x71d96=_0x71d96-0xb9;let _0x366639=_0x17ca0f[_0x71d96];return _0x366639;},a6_0x71d9(_0x22b1e5,_0x5c8224);}async function main(){const _0xcc381b=a6_0x71d9;try{const _0x1b3dd1=createServer(),_0x9412cd=new StdioServerTransport();_0x1b3dd1['logInfo'](),await _0x1b3dd1['connect'](_0x9412cd),process['on'](_0xcc381b(0xb9),async()=>{const _0x530700=_0xcc381b;process[_0x530700(0xba)][_0x530700(0xbd)]&&console[_0x530700(0xc9)](_0x530700(0xbc)),process[_0x530700(0xc7)](0x0);}),process['on'](_0xcc381b(0xbb),async()=>{const _0xa54c44=_0xcc381b;process[_0xa54c44(0xba)][_0xa54c44(0xbd)]&&console['log'](_0xa54c44(0xbc)),process[_0xa54c44(0xc7)](0x0);});}catch(_0x3d9192){console['error'](_0xcc381b(0xbe),_0x3d9192),process[_0xcc381b(0xc7)](0x1);}}main()['catch'](_0x126ff1=>{const _0xa36749=a6_0x71d9;console['error'](_0xa36749(0xc0),_0x126ff1),process[_0xa36749(0xc7)](0x1);});
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x222461=a7_0x1c42;(function(_0x499345,_0x5b077d){const _0x328b1d=a7_0x1c42,_0x66e87d=_0x499345();while(!![]){try{const _0x180fb4=-parseInt(_0x328b1d(0xef))/0x1+-parseInt(_0x328b1d(0xe1))/0x2*(parseInt(_0x328b1d(0xf5))/0x3)+parseInt(_0x328b1d(0xf2))/0x4+-parseInt(_0x328b1d(0xd7))/0x5+-parseInt(_0x328b1d(0xe8))/0x6+-parseInt(_0x328b1d(0xe4))/0x7+-parseInt(_0x328b1d(0xe9))/0x8*(-parseInt(_0x328b1d(0xdd))/0x9);if(_0x180fb4===_0x5b077d)break;else _0x66e87d['push'](_0x66e87d['shift']());}catch(_0x16245b){_0x66e87d['push'](_0x66e87d['shift']());}}}(a7_0x1d9c,0x591da));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{ListToolsRequestSchema,CallToolRequestSchema}from'@modelcontextprotocol/sdk/types.js';function a7_0x1c42(_0x2df10f,_0xd731fb){const _0x1d9cc8=a7_0x1d9c();return a7_0x1c42=function(_0x1c4223,_0x5f441d){_0x1c4223=_0x1c4223-0xd3;let _0x3ae984=_0x1d9cc8[_0x1c4223];return _0x3ae984;},a7_0x1c42(_0x2df10f,_0xd731fb);}import{TOOL_DEFINITIONS,listDatasets,getDatasetDetail,getDatasetOperations,getOperationDetail,generateSDKCode,searchDatasets,listSqlQueries}from'./tools/index.js';import{createRequire}from'module';const require=createRequire(import.meta[a7_0x222461(0xe2)]),packageJson=require('../package.json');import{login}from'./tools/login.js';function a7_0x1d9c(){const _0x3162f4=['description','get_dataset_operations','✅\x20Server\x20started\x20successfully','849900xXAjzC','1095064uSRsQZ','version','connect','search_datasets','params','forEach','476498cnuMFy','\x20\x20Use\x20the\x20\x22login\x22\x20tool\x20first\x20to\x20authenticate.','🔐\x20Authentication:','1597000SGMrsA','env','server','6057PPfXXi','Unknown\x20error\x20occurred','\x20\x20This\x20server\x20uses\x20cookie-based\x20authentication.','logInfo','registerToolHandlers','message','generate_sdk_code','login','stringify','3067245vfLMEg','lovrabet-dataset-mcp','list_sql_queries','🚀\x20Lovrabet\x20Dataset\x20MCP\x20Server\x20(Development\x20API)','\x20\x20-\x20','log','153Qbqksg','setRequestHandler','📌\x20Version:\x20','MCP_DEBUG','474oUhKwd','url','get_dataset_detail','4558001OswaiL'];a7_0x1d9c=function(){return _0x3162f4;};return a7_0x1d9c();}export class LovrabetDatasetMCPServer{[a7_0x222461(0xf4)];constructor(){const _0x50652b=a7_0x222461;this['server']=new Server({'name':_0x50652b(0xd8),'version':packageJson[_0x50652b(0xea)]},{'capabilities':{'tools':{}}}),this[_0x50652b(0xf9)]();}[a7_0x222461(0xf9)](){const _0xa0890c=a7_0x222461;this[_0xa0890c(0xf4)][_0xa0890c(0xde)](ListToolsRequestSchema,async()=>({'tools':TOOL_DEFINITIONS})),this[_0xa0890c(0xf4)][_0xa0890c(0xde)](CallToolRequestSchema,async _0x3966df=>{const _0x51e448=_0xa0890c,{name:_0x4dda85,arguments:_0x43422f}=_0x3966df[_0x51e448(0xed)];try{let _0x56467e;switch(_0x4dda85){case _0x51e448(0xd5):_0x56467e=await login(_0x43422f||{});break;case'list_datasets':_0x56467e=await listDatasets(_0x43422f);break;case _0x51e448(0xe3):_0x56467e=await getDatasetDetail(_0x43422f);break;case _0x51e448(0xe6):_0x56467e=await getDatasetOperations(_0x43422f);break;case'get_operation_detail':_0x56467e=await getOperationDetail(_0x43422f);break;case _0x51e448(0xd4):_0x56467e=await generateSDKCode(_0x43422f);break;case _0x51e448(0xec):_0x56467e=await searchDatasets(_0x43422f);break;case _0x51e448(0xd9):_0x56467e=await listSqlQueries(_0x43422f);break;default:throw new Error('Unknown\x20tool:\x20'+_0x4dda85);}return{'content':[{'type':'text','text':JSON['stringify'](_0x56467e,null,0x2)}]};}catch(_0x26aa05){return{'content':[{'type':'text','text':JSON[_0x51e448(0xd6)]({'error':!![],'message':_0x26aa05[_0x51e448(0xd3)]||_0x51e448(0xf6),'tool':_0x4dda85},null,0x2)}],'isError':!![]};}});}['getServer'](){const _0x15b8d1=a7_0x222461;return this[_0x15b8d1(0xf4)];}async[a7_0x222461(0xeb)](_0x2fff96){const _0x1a2d9f=a7_0x222461;await this[_0x1a2d9f(0xf4)]['connect'](_0x2fff96);}[a7_0x222461(0xf8)](){const _0x39f70b=a7_0x222461;if(!process[_0x39f70b(0xf3)][_0x39f70b(0xe0)])return;console['log'](_0x39f70b(0xda)),console[_0x39f70b(0xdc)](_0x39f70b(0xdf)+packageJson['version']),console[_0x39f70b(0xdc)](_0x39f70b(0xe7)),console['log'](''),console[_0x39f70b(0xdc)](_0x39f70b(0xf1)),console[_0x39f70b(0xdc)](_0x39f70b(0xf7)),console[_0x39f70b(0xdc)](_0x39f70b(0xf0)),console[_0x39f70b(0xdc)](''),console[_0x39f70b(0xdc)]('Available\x20tools:'),TOOL_DEFINITIONS[_0x39f70b(0xee)](_0x5ef5e7=>{const _0x20381d=_0x39f70b;console['log'](_0x20381d(0xdb)+_0x5ef5e7['name']+':\x20'+_0x5ef5e7[_0x20381d(0xe5)]);});}}export function createServer(){return new LovrabetDatasetMCPServer();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa12ff1,_0x4b1ac8){const _0x5692b0=a8_0x28e2,_0x4a3b05=_0xa12ff1();while(!![]){try{const _0x32aaa3=-parseInt(_0x5692b0(0xea))/0x1+parseInt(_0x5692b0(0x10b))/0x2+parseInt(_0x5692b0(0xfe))/0x3*(-parseInt(_0x5692b0(0xf7))/0x4)+parseInt(_0x5692b0(0x100))/0x5*(parseInt(_0x5692b0(0xf0))/0x6)+parseInt(_0x5692b0(0x108))/0x7*(-parseInt(_0x5692b0(0xfc))/0x8)+-parseInt(_0x5692b0(0x102))/0x9+parseInt(_0x5692b0(0x101))/0xa;if(_0x32aaa3===_0x4b1ac8)break;else _0x4a3b05['push'](_0x4a3b05['shift']());}catch(_0x4dd573){_0x4a3b05['push'](_0x4a3b05['shift']());}}}(a8_0xb802,0x9b8d1));import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';function a8_0x28e2(_0x42e374,_0x492774){const _0xb8028=a8_0xb802();return a8_0x28e2=function(_0x28e2d1,_0x2b76e1){_0x28e2d1=_0x28e2d1-0xea;let _0x5ad83c=_0xb8028[_0x28e2d1];return _0x5ad83c;},a8_0x28e2(_0x42e374,_0x492774);}function a8_0xb802(){const _0xfd0621=['fields','210IvPOZl','datasetCode\x20is\x20required','getDatasetList','fullExample','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','name','typescript','1156SVwHCv','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.','online','analyzeDatasetDetail','operationName\x20is\x20required','1576KxaGZF','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.','7515eYwWyT','generateSDKCode','88025WlMRaO','9470400WaWwyL','1314855wzSqOM','LOVRABET_APP_CODE','Dataset\x20not\x20found\x20with\x20code:\x20','\x27\x20in\x20dataset\x20\x27','basic','env','91BJaeSt','getDatasetDetail','test','313266WhIMah','tableData','Cannot\x20generate\x20SDK\x20code\x20for\x20operation\x20\x27','210110HpUwQz','requestExample','usageExample','code','find'];a8_0xb802=function(){return _0xfd0621;};return a8_0xb802();}export async function generateSDKCode(_0x434ca5){const _0x2b8308=a8_0x28e2,{appCode:appCode=process[_0x2b8308(0x107)][_0x2b8308(0x103)],cookie:_0x5a4dec,env:env=process[_0x2b8308(0x107)]['LOVRABET_ENV']||_0x2b8308(0xf9),datasetCode:_0x3317ee,operationName:_0x16a3e5,includeImports:includeImports=!![]}=_0x434ca5;if(!appCode)throw new Error(_0x2b8308(0xf4));if(!_0x3317ee)throw new Error(_0x2b8308(0xf1));if(!_0x16a3e5)throw new Error(_0x2b8308(0xfb));const _0x55cb24=new DevApiClient({'appCode':appCode,'cookie':_0x5a4dec,'env':env}),_0x3fa577=/^\d+$/[_0x2b8308(0x10a)](_0x3317ee);let _0x115ad1;if(_0x3fa577)_0x115ad1=_0x3317ee;else{const _0x5851b9=await _0x55cb24[_0x2b8308(0xf2)]({'pageSize':0x3e7}),_0x24f145=_0x5851b9['data']?.[_0x2b8308(0x10c)]||[],_0x3956d5=_0x24f145[_0x2b8308(0xee)](_0x4688dc=>_0x4688dc['code']===_0x3317ee);if(!_0x3956d5)throw new Error(_0x2b8308(0x104)+_0x3317ee);_0x115ad1=String(_0x3956d5['id']);}const _0x5b859e=await _0x55cb24[_0x2b8308(0x109)](_0x115ad1),_0x41028e=new DatasetAnalyzer(),_0xda448e=_0x41028e[_0x2b8308(0xff)](_0x5b859e,_0x16a3e5,appCode,env);if(!_0xda448e)throw new Error(_0x2b8308(0x10d)+_0x16a3e5+_0x2b8308(0x105)+_0x3317ee+'\x27');const _0x5c0e3f=_0x41028e[_0x2b8308(0xfa)](_0x5b859e);return{'appCode':appCode,'env':env,'datasetName':_0x5c0e3f[_0x2b8308(0x106)][_0x2b8308(0xf5)],'language':_0x2b8308(0xf6),'code':_0xda448e[_0x2b8308(0xed)],'fullExample':includeImports?_0xda448e[_0x2b8308(0xf3)]:undefined,'sdkCallInfo':_0xda448e['sdkCallInfo'],'fields':_0x5c0e3f[_0x2b8308(0xef)],'requestExample':_0xda448e[_0x2b8308(0xeb)],'responseExample':_0xda448e['responseExample'],'sdkInitCode':_0xda448e['sdkInitCode'],'usageExample':_0xda448e[_0x2b8308(0xec)],'sdkReturnValueBehavior':{'onSuccess':_0x2b8308(0xf8),'onError':'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}','note':_0x2b8308(0xfd)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50a175,_0x35fd28){const _0x51c27d=a9_0x19f6,_0x2f15e4=_0x50a175();while(!![]){try{const _0x22d8eb=parseInt(_0x51c27d(0x12e))/0x1+-parseInt(_0x51c27d(0x129))/0x2+-parseInt(_0x51c27d(0x135))/0x3+-parseInt(_0x51c27d(0x134))/0x4*(-parseInt(_0x51c27d(0x12d))/0x5)+parseInt(_0x51c27d(0x131))/0x6*(parseInt(_0x51c27d(0x130))/0x7)+-parseInt(_0x51c27d(0x12b))/0x8*(-parseInt(_0x51c27d(0x12a))/0x9)+-parseInt(_0x51c27d(0x13f))/0xa;if(_0x22d8eb===_0x35fd28)break;else _0x2f15e4['push'](_0x2f15e4['shift']());}catch(_0x19a7f2){_0x2f15e4['push'](_0x2f15e4['shift']());}}}(a9_0x16a2,0x27231));import{DevApiClient}from'../api/dev-api-client.js';function a9_0x19f6(_0x35f617,_0x2c5722){const _0x16a239=a9_0x16a2();return a9_0x19f6=function(_0x19f6a9,_0x5c5f71){_0x19f6a9=_0x19f6a9-0x128;let _0x427aa7=_0x16a239[_0x19f6a9];return _0x427aa7;},a9_0x19f6(_0x35f617,_0x2c5722);}import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getDatasetDetail(_0x11ac49){const _0x74e678=a9_0x19f6,{appCode:appCode=process['env'][_0x74e678(0x13e)],cookie:_0x243dea,env:env=process[_0x74e678(0x13d)][_0x74e678(0x140)]||_0x74e678(0x141),datasetCode:_0x4f86ff,forceRefresh:forceRefresh=![]}=_0x11ac49;if(!appCode)throw new Error('appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.');if(!_0x4f86ff)throw new Error(_0x74e678(0x12c));const _0x5f2994=new DevApiClient({'appCode':appCode,'cookie':_0x243dea,'env':env}),_0x572979=/^\d+$/[_0x74e678(0x143)](_0x4f86ff);let _0x4580d2;if(_0x572979)_0x4580d2=_0x4f86ff;else{const _0x1c8358=await _0x5f2994[_0x74e678(0x142)]({'pageSize':0x3e7,'forceRefresh':forceRefresh}),_0x4defea=_0x1c8358[_0x74e678(0x13c)]?.[_0x74e678(0x132)]||[],_0xcfa477=_0x4defea[_0x74e678(0x128)](_0x5dbf46=>_0x5dbf46[_0x74e678(0x13b)]===_0x4f86ff);if(!_0xcfa477)throw new Error('Dataset\x20not\x20found\x20with\x20code:\x20'+_0x4f86ff);_0x4580d2=String(_0xcfa477['id']);}const _0x36893f=await _0x5f2994[_0x74e678(0x13a)](_0x4580d2,forceRefresh),_0x3c975e=new DatasetAnalyzer(),_0x4c69aa=_0x3c975e[_0x74e678(0x136)](_0x36893f);return{'appCode':appCode,'env':env,'basic':_0x4c69aa[_0x74e678(0x12f)],'fields':_0x4c69aa[_0x74e678(0x133)],'operations':_0x4c69aa[_0x74e678(0x139)],'stats':{'fieldCount':_0x4c69aa['fieldCount'],'operationCount':_0x4c69aa['operationCount'],'enabledOperationCount':_0x4c69aa[_0x74e678(0x137)],'supportsCRUD':_0x4c69aa[_0x74e678(0x138)]}};}function a9_0x16a2(){const _0x157a11=['data','env','LOVRABET_APP_CODE','2417430SHVExX','LOVRABET_ENV','online','getDatasetList','test','find','357226GLblti','70830HsehFz','224pRmsyj','datasetCode\x20is\x20required','20bmRRJc','294368AvgFdL','basic','75467RlXkec','138wAvKJB','tableData','fields','54980zcTSUG','711030peCaul','analyzeDatasetDetail','enabledOperationCount','supportsCRUD','operations','getDatasetDetail','code'];a9_0x16a2=function(){return _0x157a11;};return a9_0x16a2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x45da1a,_0x4f682e){const _0x56acdc=a10_0x1297,_0xc310fb=_0x45da1a();while(!![]){try{const _0x4aa228=-parseInt(_0x56acdc(0x100))/0x1*(-parseInt(_0x56acdc(0x104))/0x2)+parseInt(_0x56acdc(0xfb))/0x3*(-parseInt(_0x56acdc(0x102))/0x4)+-parseInt(_0x56acdc(0x10c))/0x5+parseInt(_0x56acdc(0x105))/0x6+-parseInt(_0x56acdc(0x10b))/0x7+parseInt(_0x56acdc(0xf7))/0x8*(-parseInt(_0x56acdc(0xfc))/0x9)+parseInt(_0x56acdc(0xf2))/0xa*(parseInt(_0x56acdc(0x10f))/0xb);if(_0x4aa228===_0x4f682e)break;else _0xc310fb['push'](_0xc310fb['shift']());}catch(_0x1b6706){_0xc310fb['push'](_0xc310fb['shift']());}}}(a10_0x7e99,0x65060));function a10_0x7e99(){const _0x5f02ac=['110024xMMXuR','basic','code','find','9gwzlAc','99ohlmnB','operationName\x20is\x20required','Dataset\x20not\x20found\x20with\x20code:\x20','getDatasetList','32pvAokd','name','863784VYMCbR','LOVRABET_ENV','7882QSFNYZ','1897830YVKnqA','env','getOperationDetail','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.','test','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.','3236261JVpkIA','2571970vVCPfk','online','\x27\x20not\x20found\x20in\x20dataset\x20\x27','1478411ibMqdn','analyzeDatasetDetail','datasetCode\x20is\x20required','130WYyWzZ','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}','Operation\x20\x27','LOVRABET_APP_CODE','tableData'];a10_0x7e99=function(){return _0x5f02ac;};return a10_0x7e99();}function a10_0x1297(_0x36ea4b,_0x35cea1){const _0x7e997=a10_0x7e99();return a10_0x1297=function(_0x129787,_0x41e58a){_0x129787=_0x129787-0xf0;let _0x76d5d2=_0x7e997[_0x129787];return _0x76d5d2;},a10_0x1297(_0x36ea4b,_0x35cea1);}import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getOperationDetail(_0x322df6){const _0xb26c0d=a10_0x1297,{appCode:appCode=process[_0xb26c0d(0x106)][_0xb26c0d(0xf5)],cookie:_0x5b2505,env:env=process['env'][_0xb26c0d(0x103)]||_0xb26c0d(0x10d),datasetCode:_0x28e19d,operationName:_0x4e4037}=_0x322df6;if(!appCode)throw new Error('appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.');if(!_0x28e19d)throw new Error(_0xb26c0d(0xf1));if(!_0x4e4037)throw new Error(_0xb26c0d(0xfd));const _0xb71b08=new DevApiClient({'appCode':appCode,'cookie':_0x5b2505,'env':env}),_0x3c713e=/^\d+$/[_0xb26c0d(0x109)](_0x28e19d);let _0x5c0b3a;if(_0x3c713e)_0x5c0b3a=_0x28e19d;else{const _0x34b1fa=await _0xb71b08[_0xb26c0d(0xff)]({'pageSize':0x3e7}),_0x398ecc=_0x34b1fa['data']?.[_0xb26c0d(0xf6)]||[],_0x255e2e=_0x398ecc[_0xb26c0d(0xfa)](_0x39d460=>_0x39d460[_0xb26c0d(0xf9)]===_0x28e19d);if(!_0x255e2e)throw new Error(_0xb26c0d(0xfe)+_0x28e19d);_0x5c0b3a=String(_0x255e2e['id']);}const _0x3fb4d1=await _0xb71b08['getDatasetDetail'](_0x5c0b3a),_0x4372b7=new DatasetAnalyzer(),_0x240eca=_0x4372b7[_0xb26c0d(0x107)](_0x3fb4d1,_0x4e4037);if(!_0x240eca)throw new Error(_0xb26c0d(0xf4)+_0x4e4037+_0xb26c0d(0x10e)+_0x28e19d+'\x27');const _0x1f1c87=_0x4372b7[_0xb26c0d(0xf0)](_0x3fb4d1);return{'appCode':appCode,'env':env,'datasetName':_0x1f1c87[_0xb26c0d(0xf8)][_0xb26c0d(0x101)],'operation':_0x240eca,'sdkReturnValueBehavior':{'onSuccess':_0xb26c0d(0x10a),'onError':_0xb26c0d(0xf3),'note':_0xb26c0d(0x108)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x13a9(_0x55c033,_0x238273){const _0x29f8bd=a11_0x29f8();return a11_0x13a9=function(_0x13a964,_0x453734){_0x13a964=_0x13a964-0xe9;let _0x49ac9b=_0x29f8bd[_0x13a964];return _0x49ac9b;},a11_0x13a9(_0x55c033,_0x238273);}(function(_0x478516,_0xea6b8){const _0x32862c=a11_0x13a9,_0x18a122=_0x478516();while(!![]){try{const _0x1ee580=-parseInt(_0x32862c(0x106))/0x1*(-parseInt(_0x32862c(0x101))/0x2)+-parseInt(_0x32862c(0xfc))/0x3*(-parseInt(_0x32862c(0xf1))/0x4)+parseInt(_0x32862c(0x108))/0x5*(-parseInt(_0x32862c(0xed))/0x6)+-parseInt(_0x32862c(0xf0))/0x7+-parseInt(_0x32862c(0xef))/0x8+-parseInt(_0x32862c(0xf5))/0x9*(parseInt(_0x32862c(0x102))/0xa)+parseInt(_0x32862c(0x104))/0xb;if(_0x1ee580===_0xea6b8)break;else _0x18a122['push'](_0x18a122['shift']());}catch(_0x289e3c){_0x18a122['push'](_0x18a122['shift']());}}}(a11_0x29f8,0xb92ff));function a11_0x29f8(){const _0x194b38=['35301959gkasKP','operationCount','311393FDxcYl','test','435xMNOdH','getDatasetDetail','path','data','supportsCRUD','LOVRABET_ENV','env','37824erJedv','displayName','6697592NDmUlX','8487150xOUjli','6780RWnwBg','operations','find','code','9081kKBqQp','basic','datasetCode\x20is\x20required','requestFieldsCount','tableData','Dataset\x20not\x20found\x20with\x20code:\x20','LOVRABET_APP_CODE','1773dnkZoN','name','enabledOperationCount','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','analyzeDatasetDetail','4LFZvuf','14640SgYvqd','tableName'];a11_0x29f8=function(){return _0x194b38;};return a11_0x29f8();}import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function getDatasetOperations(_0x4505db){const _0x4f7bc4=a11_0x13a9,{appCode:appCode=process[_0x4f7bc4(0xec)][_0x4f7bc4(0xfb)],cookie:_0x50caf4,env:env=process[_0x4f7bc4(0xec)][_0x4f7bc4(0xeb)]||'online',datasetCode:_0x3cca17}=_0x4505db;if(!appCode)throw new Error(_0x4f7bc4(0xff));if(!_0x3cca17)throw new Error(_0x4f7bc4(0xf7));const _0x5506de=new DevApiClient({'appCode':appCode,'cookie':_0x50caf4,'env':env}),_0x4f8f22=/^\d+$/[_0x4f7bc4(0x107)](_0x3cca17);let _0x1caf43;if(_0x4f8f22)_0x1caf43=_0x3cca17;else{const _0x506a91=await _0x5506de['getDatasetList']({'pageSize':0x3e7}),_0x1ac5b1=_0x506a91[_0x4f7bc4(0xe9)]?.[_0x4f7bc4(0xf9)]||[],_0x59817b=_0x1ac5b1[_0x4f7bc4(0xf3)](_0x4240cb=>_0x4240cb[_0x4f7bc4(0xf4)]===_0x3cca17);if(!_0x59817b)throw new Error(_0x4f7bc4(0xfa)+_0x3cca17);_0x1caf43=String(_0x59817b['id']);}const _0x291d47=await _0x5506de[_0x4f7bc4(0x109)](_0x1caf43),_0x1d5864=new DatasetAnalyzer(),_0x191767=_0x1d5864[_0x4f7bc4(0x100)](_0x291d47);return{'appCode':appCode,'env':env,'datasetName':_0x191767[_0x4f7bc4(0xf6)][_0x4f7bc4(0xfd)],'tableName':_0x191767[_0x4f7bc4(0xf6)][_0x4f7bc4(0x103)],'operations':_0x191767[_0x4f7bc4(0xf2)]['map'](_0x19b86f=>({'name':_0x19b86f[_0x4f7bc4(0xfd)],'displayName':_0x19b86f[_0x4f7bc4(0xee)],'type':_0x19b86f['type'],'method':_0x19b86f['method'],'path':_0x19b86f[_0x4f7bc4(0x10a)],'requestFieldsCount':_0x19b86f[_0x4f7bc4(0xf8)],'enabled':_0x19b86f['enabled']})),'stats':{'total':_0x191767[_0x4f7bc4(0x105)],'enabled':_0x191767[_0x4f7bc4(0xfe)],'supportsCRUD':_0x191767[_0x4f7bc4(0xea)]}};}
|
package/dist/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x2df388=a12_0x456e;(function(_0x242f00,_0x470f18){const _0x57abd6=a12_0x456e,_0x40f576=_0x242f00();while(!![]){try{const _0xc02eb6=-parseInt(_0x57abd6(0xbc))/0x1+-parseInt(_0x57abd6(0xb1))/0x2+-parseInt(_0x57abd6(0xc2))/0x3*(-parseInt(_0x57abd6(0xbd))/0x4)+parseInt(_0x57abd6(0xbe))/0x5+-parseInt(_0x57abd6(0xbb))/0x6*(-parseInt(_0x57abd6(0xa9))/0x7)+parseInt(_0x57abd6(0xb6))/0x8*(parseInt(_0x57abd6(0xa5))/0x9)+-parseInt(_0x57abd6(0xa2))/0xa*(parseInt(_0x57abd6(0xa6))/0xb);if(_0xc02eb6===_0x470f18)break;else _0x40f576['push'](_0x40f576['shift']());}catch(_0x53995f){_0x40f576['push'](_0x40f576['shift']());}}}(a12_0x373f,0x4cfda));export{login}from'./login.js';export{listDatasets}from'./list-datasets.js';function a12_0x373f(){const _0x2290ae=['number','Bypass\x20cache\x20and\x20fetch\x20fresh\x20data\x20from\x20API\x20(default:\x20false).\x20Set\x20to\x20true\x20when\x20you\x20need\x20the\x20latest\x20data.','1899llayOD','627lzDznt','keyword','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)','14iqrvpA','Number\x20of\x20datasets\x20per\x20page\x20(default:\x20999)','Number\x20of\x20items\x20per\x20page\x20(default:\x20999)','Environment\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','Environment\x20to\x20login\x20to\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','Page\x20number\x20to\x20fetch\x20(default:\x201)','string','Application\x20code\x20(optional\x20if\x20LOVRABET_APP_CODE\x20env\x20var\x20is\x20set)','413866xXDPYR','list_datasets','Include\x20import\x20statements\x20and\x20full\x20example\x20(default:\x20true)','generate_sdk_code','datasetCode','15368YdzzZR','get_operation_detail','login','list_sql_queries','boolean','1234962FsviKC','430645OUfoIA','1556NiMFTW','2179620dyNqaV','Optional:\x20filter\x20by\x20category\x20(report,\x20analysis,\x20export,\x20etc.)','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.','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.','1227pAaENH','object','get_dataset_operations','Operation\x20name\x20(e.g.,\x20filter,\x20getOne,\x20create,\x20update).\x20Prefer\x20\x22filter\x22\x20for\x20queries.','Search\x20keyword','Optional:\x20search\x20SQL\x20queries\x20by\x20name,\x20description,\x20or\x20SQL\x20content','operationName','online','Get\x20detailed\x20information\x20about\x20a\x20specific\x20dataset\x20including\x20all\x20field\x20definitions','Dataset\x20code/ID','Get\x20list\x20of\x20all\x20datasets\x20for\x20an\x20application','80540eWpRkj'];a12_0x373f=function(){return _0x2290ae;};return a12_0x373f();}export{getDatasetDetail}from'./get-dataset-detail.js';function a12_0x456e(_0x4c266d,_0x4ff5f2){const _0x373f5a=a12_0x373f();return a12_0x456e=function(_0x456e45,_0x44f24f){_0x456e45=_0x456e45-0x9c;let _0x2aa6ca=_0x373f5a[_0x456e45];return _0x2aa6ca;},a12_0x456e(_0x4c266d,_0x4ff5f2);}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{listSqlQueries}from'./list-sql-queries.js';const authProperties={'appCode':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xb0)},'cookie':{'type':a12_0x2df388(0xaf),'description':'Authentication\x20cookie\x20(optional,\x20uses\x20stored\x20cookie\x20from\x20login\x20if\x20not\x20provided)'},'env':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xac),'enum':[a12_0x2df388(0x9e),'daily']}};export const TOOL_DEFINITIONS=[{'name':a12_0x2df388(0xb8),'description':'Login\x20to\x20Lovrabet\x20to\x20authenticate\x20for\x20dataset\x20queries','inputSchema':{'type':a12_0x2df388(0xc3),'properties':{'env':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xad),'enum':[a12_0x2df388(0x9e),'daily']}},'required':[]}},{'name':a12_0x2df388(0xb2),'description':a12_0x2df388(0xa1),'inputSchema':{'type':a12_0x2df388(0xc3),'properties':{...authProperties,'pageSize':{'type':a12_0x2df388(0xa3),'description':a12_0x2df388(0xaa)},'currentPage':{'type':'number','description':a12_0x2df388(0xae)},'forceRefresh':{'type':a12_0x2df388(0xba),'description':a12_0x2df388(0xa4)}},'required':[]}},{'name':'get_dataset_detail','description':a12_0x2df388(0x9f),'inputSchema':{'type':a12_0x2df388(0xc3),'properties':{...authProperties,'datasetCode':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xa0)},'forceRefresh':{'type':a12_0x2df388(0xba),'description':a12_0x2df388(0xa4)}},'required':[a12_0x2df388(0xb5)]}},{'name':a12_0x2df388(0xc4),'description':a12_0x2df388(0xa8),'inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xa0)}},'required':[a12_0x2df388(0xb5)]}},{'name':a12_0x2df388(0xb7),'description':'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.','inputSchema':{'type':a12_0x2df388(0xc3),'properties':{...authProperties,'datasetCode':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xa0)},'operationName':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xc5)}},'required':[a12_0x2df388(0xb5),a12_0x2df388(0x9d)]}},{'name':a12_0x2df388(0xb4),'description':a12_0x2df388(0xc0),'inputSchema':{'type':a12_0x2df388(0xc3),'properties':{...authProperties,'datasetCode':{'type':'string','description':'Dataset\x20code/ID'},'operationName':{'type':a12_0x2df388(0xaf),'description':'Operation\x20name\x20(e.g.,\x20filter,\x20getOne,\x20create,\x20update).\x20Prefer\x20\x22filter\x22\x20for\x20queries.'},'includeImports':{'type':a12_0x2df388(0xba),'description':a12_0x2df388(0xb3)}},'required':['datasetCode',a12_0x2df388(0x9d)]}},{'name':'search_datasets','description':'Search\x20datasets\x20by\x20keyword\x20(searches\x20in\x20name,\x20table\x20name,\x20code,\x20and\x20description)','inputSchema':{'type':a12_0x2df388(0xc3),'properties':{...authProperties,'keyword':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xc6)}},'required':[a12_0x2df388(0xa7)]}},{'name':a12_0x2df388(0xb9),'description':a12_0x2df388(0xc1),'inputSchema':{'type':'object','properties':{...authProperties,'keyword':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0x9c)},'category':{'type':a12_0x2df388(0xaf),'description':a12_0x2df388(0xbf)},'pageSize':{'type':a12_0x2df388(0xa3),'description':a12_0x2df388(0xab)},'currentPage':{'type':'number','description':a12_0x2df388(0xae)}},'required':[]}}];
|
|
1
|
+
const a12_0x51c42d=a12_0x552a;(function(_0xa5cd44,_0x7bba62){const _0x3c3f10=a12_0x552a,_0x566d39=_0xa5cd44();while(!![]){try{const _0x2095f5=parseInt(_0x3c3f10(0xa0))/0x1*(-parseInt(_0x3c3f10(0x93))/0x2)+parseInt(_0x3c3f10(0xa1))/0x3+-parseInt(_0x3c3f10(0xa8))/0x4*(-parseInt(_0x3c3f10(0x90))/0x5)+parseInt(_0x3c3f10(0x9b))/0x6*(-parseInt(_0x3c3f10(0x8d))/0x7)+-parseInt(_0x3c3f10(0x97))/0x8*(parseInt(_0x3c3f10(0x8a))/0x9)+parseInt(_0x3c3f10(0x9a))/0xa*(-parseInt(_0x3c3f10(0x9e))/0xb)+parseInt(_0x3c3f10(0x94))/0xc;if(_0x2095f5===_0x7bba62)break;else _0x566d39['push'](_0x566d39['shift']());}catch(_0x4fe0dc){_0x566d39['push'](_0x566d39['shift']());}}}(a12_0x3fbb,0xd86f0));export{login}from'./login.js';export{listDatasets}from'./list-datasets.js';function a12_0x3fbb(){const _0x37e3ee=['85203HtJliF','Search\x20keyword','login','123753EhLvKd','Operation\x20name\x20(e.g.,\x20filter,\x20getOne,\x20create,\x20update).\x20Prefer\x20\x22filter\x22\x20for\x20queries.','number','15DBTmYU','Login\x20to\x20Lovrabet\x20to\x20authenticate\x20for\x20dataset\x20queries','Get\x20list\x20of\x20all\x20datasets\x20for\x20an\x20application','500026zJhHRi','36526116xxxsuo','search_datasets','string','1016JkqtSy','Bypass\x20cache\x20and\x20fetch\x20fresh\x20data\x20from\x20API\x20(default:\x20false).\x20Set\x20to\x20true\x20when\x20you\x20need\x20the\x20latest\x20data.','Search\x20datasets\x20by\x20keyword\x20(searches\x20in\x20name,\x20table\x20name,\x20code,\x20and\x20description)','77170QTSyCA','18NrzDXm','datasetCode','Authentication\x20cookie\x20(optional,\x20uses\x20stored\x20cookie\x20from\x20login\x20if\x20not\x20provided)','275TLamuX','generate_sdk_code','5qCHdiv','1423269ouWtZO','Application\x20code\x20(optional\x20if\x20LOVRABET_APP_CODE\x20env\x20var\x20is\x20set)','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.','online','Dataset\x20code/ID','daily','Optional:\x20filter\x20by\x20category\x20(report,\x20analysis,\x20export,\x20etc.)','88776BNwSpf','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.','Include\x20import\x20statements\x20and\x20full\x20example\x20(default:\x20true)','get_dataset_operations','operationName','object','Get\x20detailed\x20information\x20about\x20a\x20specific\x20dataset\x20including\x20all\x20field\x20definitions','get_dataset_detail','list_sql_queries','get_operation_detail','Page\x20number\x20to\x20fetch\x20(default:\x201)','boolean','Environment\x20to\x20login\x20to\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)'];a12_0x3fbb=function(){return _0x37e3ee;};return a12_0x3fbb();}export{getDatasetDetail}from'./get-dataset-detail.js';function a12_0x552a(_0x32079d,_0x5dea65){const _0x3fbb63=a12_0x3fbb();return a12_0x552a=function(_0x552aea,_0x1fbafe){_0x552aea=_0x552aea-0x89;let _0x5b9080=_0x3fbb63[_0x552aea];return _0x5b9080;},a12_0x552a(_0x32079d,_0x5dea65);}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{listSqlQueries}from'./list-sql-queries.js';const authProperties={'appCode':{'type':'string','description':a12_0x51c42d(0xa2)},'cookie':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0x9d)},'env':{'type':a12_0x51c42d(0x96),'description':'Environment\x20(optional,\x20uses\x20LOVRABET_ENV\x20env\x20var\x20or\x20defaults\x20to\x20online)','enum':[a12_0x51c42d(0xa4),a12_0x51c42d(0xa6)]}};export const TOOL_DEFINITIONS=[{'name':a12_0x51c42d(0x8c),'description':a12_0x51c42d(0x91),'inputSchema':{'type':a12_0x51c42d(0xad),'properties':{'env':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0x89),'enum':[a12_0x51c42d(0xa4),a12_0x51c42d(0xa6)]}},'required':[]}},{'name':'list_datasets','description':a12_0x51c42d(0x92),'inputSchema':{'type':'object','properties':{...authProperties,'pageSize':{'type':a12_0x51c42d(0x8f),'description':'Number\x20of\x20datasets\x20per\x20page\x20(default:\x20999)'},'currentPage':{'type':a12_0x51c42d(0x8f),'description':a12_0x51c42d(0xb2)},'forceRefresh':{'type':a12_0x51c42d(0xb3),'description':a12_0x51c42d(0x98)}},'required':[]}},{'name':a12_0x51c42d(0xaf),'description':a12_0x51c42d(0xae),'inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0xa5)},'forceRefresh':{'type':a12_0x51c42d(0xb3),'description':a12_0x51c42d(0x98)}},'required':['datasetCode']}},{'name':a12_0x51c42d(0xab),'description':'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)','inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0xa5)}},'required':[a12_0x51c42d(0x9c)]}},{'name':a12_0x51c42d(0xb1),'description':a12_0x51c42d(0xa3),'inputSchema':{'type':a12_0x51c42d(0xad),'properties':{...authProperties,'datasetCode':{'type':a12_0x51c42d(0x96),'description':'Dataset\x20code/ID'},'operationName':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0x8e)}},'required':[a12_0x51c42d(0x9c),'operationName']}},{'name':a12_0x51c42d(0x9f),'description':a12_0x51c42d(0xa9),'inputSchema':{'type':'object','properties':{...authProperties,'datasetCode':{'type':a12_0x51c42d(0x96),'description':'Dataset\x20code/ID'},'operationName':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0x8e)},'includeImports':{'type':'boolean','description':a12_0x51c42d(0xaa)}},'required':[a12_0x51c42d(0x9c),a12_0x51c42d(0xac)]}},{'name':a12_0x51c42d(0x95),'description':a12_0x51c42d(0x99),'inputSchema':{'type':a12_0x51c42d(0xad),'properties':{...authProperties,'keyword':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0x8b)}},'required':['keyword']}},{'name':a12_0x51c42d(0xb0),'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':a12_0x51c42d(0xad),'properties':{...authProperties,'keyword':{'type':a12_0x51c42d(0x96),'description':'Optional:\x20search\x20SQL\x20queries\x20by\x20name,\x20description,\x20or\x20SQL\x20content'},'category':{'type':a12_0x51c42d(0x96),'description':a12_0x51c42d(0xa7)},'pageSize':{'type':'number','description':'Number\x20of\x20items\x20per\x20page\x20(default:\x20999)'},'currentPage':{'type':a12_0x51c42d(0x8f),'description':'Page\x20number\x20to\x20fetch\x20(default:\x201)'}},'required':[]}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x242aed,_0x366203){const _0x5ee32c=a13_0x3490,_0x134e0e=_0x242aed();while(!![]){try{const _0x796857=-parseInt(_0x5ee32c(0x9f))/0x1+parseInt(_0x5ee32c(0x98))/0x2*(-parseInt(_0x5ee32c(0x97))/0x3)+-parseInt(_0x5ee32c(0x9a))/0x4+-parseInt(_0x5ee32c(0x94))/0x5*(parseInt(_0x5ee32c(0xa1))/0x6)+-parseInt(_0x5ee32c(0xa2))/0x7+parseInt(_0x5ee32c(0x96))/0x8+parseInt(_0x5ee32c(0x9e))/0x9;if(_0x796857===_0x366203)break;else _0x134e0e['push'](_0x134e0e['shift']());}catch(_0x2bad38){_0x134e0e['push'](_0x134e0e['shift']());}}}(a13_0x3ec9,0x87661));import{DevApiClient}from'../api/dev-api-client.js';function a13_0x3ec9(){const _0x2223c7=['LOVRABET_APP_CODE','env','26526366aCdIRv','740133lfcwfc','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','318gfdmNN','3299422FuVimo','21795gLMKXn','online','7714296iXAPLW','1045587HRPTrW','6ByrCCx','analyzeDatasetList','3475900tGBhMy','total'];a13_0x3ec9=function(){return _0x2223c7;};return a13_0x3ec9();}function a13_0x3490(_0x42e83d,_0x35955a){const _0x3ec951=a13_0x3ec9();return a13_0x3490=function(_0x3490de,_0x21cfb0){_0x3490de=_0x3490de-0x94;let _0x5dc515=_0x3ec951[_0x3490de];return _0x5dc515;},a13_0x3490(_0x42e83d,_0x35955a);}import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function listDatasets(_0x22afaa={}){const _0x1a0565=a13_0x3490,{appCode:appCode=process['env'][_0x1a0565(0x9c)],env:env=process[_0x1a0565(0x9d)]['LOVRABET_ENV']||_0x1a0565(0x95),cookie:_0x3d0ea2,pageSize:pageSize=0x3e7,currentPage:currentPage=0x1,forceRefresh:forceRefresh=![]}=_0x22afaa;if(!appCode)throw new Error(_0x1a0565(0xa0));const _0x13374a=new DevApiClient({'appCode':appCode,'env':env,'cookie':_0x3d0ea2}),_0x298488=await _0x13374a['getDatasetList']({'pageSize':pageSize,'currentPage':currentPage,'forceRefresh':forceRefresh}),_0x2b679e=new DatasetAnalyzer(),_0x1cd303=_0x2b679e[_0x1a0565(0x99)](_0x298488);return{'appCode':appCode,'env':env,'total':_0x1cd303[_0x1a0565(0x9b)],'datasets':_0x1cd303['datasets']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x52e8(){const _0x389490=['count','name','This\x20SQL\x20does\x20not\x20require\x20any\x20parameters','online','length','IMPORTANT:\x20Use\x20try-catch\x20to\x20handle\x20HTTP\x20errors\x20(network\x20issues,\x20auth\x20failures)','env','322017NWMKDu','sqlContent','5270625SRIbuv','sqlCode','10825fakWkv','\x27,\x0a});\x0a\x0a//\x20Execute\x20the\x20SQL\x20query:\x20','LOVRABET_APP_CODE','472580rRtTua','updatedTime','replace','\x22\x0aconst\x20data\x20=\x20await\x20client.api.executeSql(\x27','includes','The\x20execResult\x20contains\x20an\x20array\x20of\x20row\x20objects\x20matching\x20your\x20SQL\x20query\x20structure','23fQBBFA','value','date','sqlDesc','other','2208mufKmL','stringify','Parameter:\x20','toLowerCase','744BwvEIz','\x27,\x0a\x20\x20env:\x20\x27','filter','40zHwepA',');\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});','Found\x20','time','Custom\x20SQL','map','IMPORTANT:\x20All\x20SQL\x20queries\x20use\x20the\x20same\x20execution\x20pattern\x20-\x20client.api.executeSql(sqlCode,\x20params)','2024-01-01','message','The\x20executeSql\x20method\x20accepts\x20two\x20parameters:\x20sqlCode\x20(string)\x20and\x20optional\x20params\x20(object)','\x20SQL\x20queries\x20for\x20application\x20','sqlName','string','Failed\x20to\x20list\x20SQL\x20queries:\x20','IMPORTANT:\x20Always\x20check\x20data.execSuccess\x20before\x20using\x20data.execResult','Execute\x20SQL\x20query:\x20','IMPORTANT:\x20The\x20SDK\x20returns\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[],\x20execError?:\x20string\x20}','type','match','This\x20SQL\x20requires\x20parameters:\x20','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','68306XEHvJH','.\x20Each\x20SQL\x20includes\x20a\x20complete\x20code\x20example\x20showing\x20how\x20to\x20execute\x20it\x20using\x20the\x20SDK.','description','19138qPnbhZ','sql','total','15140235yAYPRl','category','ceil','\x0aconst\x20data\x20=\x20await\x20client.api.executeSql(\x27','sql_list','example','For\x20more\x20customization,\x20use\x20generate_sql_code\x20tool\x20to\x20get\x20code\x20with\x20type\x20inference','all','sqlId','slice','SQL-','limit','No\x20SQL\x20queries\x20found.\x20Check\x20your\x20appCode\x20and\x20authentication.','Each\x20SQL\x20query\x20above\x20includes\x20a\x20codeExample\x20field\x20with\x20complete\x20TypeScript\x20code\x20ready\x20to\x20use'];a14_0x52e8=function(){return _0x389490;};return a14_0x52e8();}(function(_0x19d112,_0xff459e){const _0x27bf20=a14_0x200f,_0x9ce7a8=_0x19d112();while(!![]){try{const _0x40238b=parseInt(_0x27bf20(0x8a))/0x1*(-parseInt(_0x27bf20(0xab))/0x2)+parseInt(_0x27bf20(0xc6))/0x3*(parseInt(_0x27bf20(0x96))/0x4)+parseInt(_0x27bf20(0xca))/0x5*(parseInt(_0x27bf20(0x93))/0x6)+parseInt(_0x27bf20(0xae))/0x7*(-parseInt(_0x27bf20(0x8f))/0x8)+-parseInt(_0x27bf20(0xc8))/0x9+-parseInt(_0x27bf20(0x84))/0xa+parseInt(_0x27bf20(0xb1))/0xb;if(_0x40238b===_0xff459e)break;else _0x9ce7a8['push'](_0x9ce7a8['shift']());}catch(_0x27fc0b){_0x9ce7a8['push'](_0x9ce7a8['shift']());}}}(a14_0x52e8,0x851e1));function a14_0x200f(_0x1f5a28,_0x511254){const _0x52e838=a14_0x52e8();return a14_0x200f=function(_0x200fff,_0xecf27a){_0x200fff=_0x200fff-0x82;let _0xc129d0=_0x52e838[_0x200fff];return _0xc129d0;},a14_0x200f(_0x1f5a28,_0x511254);}import{DevApiClient}from'../api/dev-api-client.js';export async function listSqlQueries(_0x23bb9={}){const _0x19c630=a14_0x200f,{appCode:appCode=process[_0x19c630(0xc5)][_0x19c630(0x83)],cookie:_0x538b6c,env:env=process[_0x19c630(0xc5)]['LOVRABET_ENV']||'online',keyword:_0xc4e383,category:_0x563eda,pageSize:pageSize=0x3e7,currentPage:currentPage=0x1}=_0x23bb9;if(!appCode)throw new Error(_0x19c630(0xaa));const _0x3ffde7=new DevApiClient({'appCode':appCode,'cookie':_0x538b6c,'env':env});try{const _0x806400=await _0x3ffde7['getCustomSqlList']({'pageSize':pageSize,'currentPage':currentPage}),_0x42e8c8=_0x806400['data']||_0x806400,_0x3b13e6=_0x42e8c8['tableData']||[],_0x1547f8=_0x42e8c8[_0x19c630(0xb0)]||_0x3b13e6[_0x19c630(0xc3)];let _0x27cec8=_0x3b13e6[_0x19c630(0x9b)](_0x2f3be2=>{const _0x1012b6=_0x19c630,_0x1cf356=_0x2f3be2[_0x1012b6(0xc9)]||appCode+'-'+(_0x2f3be2[_0x1012b6(0xb9)]||_0x2f3be2['id']),_0x58ffd4=_0x2f3be2['sqlId']||_0x2f3be2['id'];let _0x2c2641;if(_0x2f3be2[_0x1012b6(0xc7)]||_0x2f3be2[_0x1012b6(0xaf)]){const _0x970d2f=_0x2f3be2[_0x1012b6(0xc7)]||_0x2f3be2[_0x1012b6(0xaf)],_0x567ad2=_0x970d2f[_0x1012b6(0xa8)](/[:$]\{?(\w+)\}?/g);if(_0x567ad2){const _0x592b0f=Array['from'](new Set(_0x567ad2[_0x1012b6(0x9b)](_0x3b1ef0=>_0x3b1ef0[_0x1012b6(0x86)](/[:${}]/g,''))));_0x2c2641=_0x592b0f[_0x1012b6(0x9b)](_0x14808d=>{const _0x1cecb5=_0x1012b6;let _0x5478fd=_0x1cecb5(0x8b);if(_0x14808d[_0x1cecb5(0x92)]()[_0x1cecb5(0x88)](_0x1cecb5(0x8c))||_0x14808d['toLowerCase']()[_0x1cecb5(0x88)](_0x1cecb5(0x99)))_0x5478fd=_0x1cecb5(0x9d);else{if(_0x14808d['toLowerCase']()[_0x1cecb5(0x88)]('id'))_0x5478fd=0x7b;else(_0x14808d[_0x1cecb5(0x92)]()[_0x1cecb5(0x88)](_0x1cecb5(0xbc))||_0x14808d['toLowerCase']()[_0x1cecb5(0x88)](_0x1cecb5(0xbf)))&&(_0x5478fd=0xa);}return{'name':_0x14808d,'type':_0x1cecb5(0xa2),'required':!![],'description':_0x1cecb5(0x91)+_0x14808d,'example':_0x5478fd};});}}const _0x5e3528=_0x2c2641&&_0x2c2641['length']>0x0,_0x21df73=_0x5e3528?_0x2c2641['reduce']((_0x5404f9,_0x2e7119)=>({..._0x5404f9,[_0x2e7119['name']]:_0x2e7119[_0x1012b6(0xb6)]}),{}):undefined,_0x423e04={'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+_0x1012b6(0x94)+(env||_0x1012b6(0xc2))+_0x1012b6(0x82)+(_0x2f3be2[_0x1012b6(0xa1)]||_0x2f3be2[_0x1012b6(0xc0)]||'SQL\x20Query')+_0x1012b6(0xb4)+_0x1cf356+'\x27'+(_0x5e3528?',\x20'+JSON[_0x1012b6(0x90)](_0x21df73,null,0x2):'')+_0x1012b6(0x97),'description':_0x1012b6(0xa5)+(_0x2f3be2[_0x1012b6(0xa1)]||_0x2f3be2[_0x1012b6(0xc0)]||_0x1012b6(0x9a)),'important':['SDK\x20returns\x20{\x20execSuccess:\x20boolean,\x20execResult?:\x20any[]\x20}\x20-\x20Always\x20check\x20execSuccess\x20before\x20using\x20execResult',_0x1012b6(0x9f),_0x5e3528?_0x1012b6(0xa9)+_0x2c2641[_0x1012b6(0x9b)](_0x44c275=>_0x44c275[_0x1012b6(0xc0)]+'\x20('+_0x44c275[_0x1012b6(0xa7)]+')')['join'](',\x20'):_0x1012b6(0xc1),'On\x20HTTP\x20error,\x20SDK\x20throws\x20LovrabetError\x20exception\x20-\x20use\x20try-catch\x20for\x20error\x20handling',_0x1012b6(0x89)]},_0x53ec77={'sqlCode':_0x1cf356,'sqlId':_0x58ffd4,'name':_0x2f3be2[_0x1012b6(0xa1)]||_0x2f3be2[_0x1012b6(0xc0)]||_0x1012b6(0xbb)+_0x58ffd4,'description':_0x2f3be2[_0x1012b6(0x8d)]||_0x2f3be2[_0x1012b6(0xad)],'category':_0x2f3be2[_0x1012b6(0xb2)]||_0x2f3be2['sqlType']||_0x1012b6(0x8e),'sqlContent':_0x2f3be2[_0x1012b6(0xc7)]||_0x2f3be2[_0x1012b6(0xaf)],'parameters':_0x2c2641,'createdTime':_0x2f3be2['createdTime']||_0x2f3be2['createTime'],'updatedTime':_0x2f3be2[_0x1012b6(0x85)]||_0x2f3be2['updateTime'],'codeExample':_0x423e04};return _0x53ec77;});if(_0xc4e383){const _0x2759f2=_0xc4e383[_0x19c630(0x92)]();_0x27cec8=_0x27cec8[_0x19c630(0x95)](_0x3cc57c=>_0x3cc57c[_0x19c630(0xc0)][_0x19c630(0x92)]()[_0x19c630(0x88)](_0x2759f2)||_0x3cc57c[_0x19c630(0xad)]&&_0x3cc57c[_0x19c630(0xad)][_0x19c630(0x92)]()['includes'](_0x2759f2)||_0x3cc57c[_0x19c630(0xc9)]['toLowerCase']()[_0x19c630(0x88)](_0x2759f2)||_0x3cc57c[_0x19c630(0xc7)]&&_0x3cc57c[_0x19c630(0xc7)][_0x19c630(0x92)]()[_0x19c630(0x88)](_0x2759f2));}_0x563eda&&_0x563eda!==_0x19c630(0xb8)&&(_0x27cec8=_0x27cec8[_0x19c630(0x95)](_0x43921b=>_0x43921b[_0x19c630(0xb2)]&&_0x43921b[_0x19c630(0xb2)]['toLowerCase']()===_0x563eda[_0x19c630(0x92)]()));const _0x5b5c81=Math[_0x19c630(0xb3)](_0x27cec8[_0x19c630(0xc3)]/pageSize),_0x5cb9e6=_0x27cec8[_0x19c630(0xba)]((currentPage-0x1)*pageSize,currentPage*pageSize),_0x173a78=_0x5cb9e6[_0x19c630(0xc3)]>0x0?_0x5cb9e6[0x0]:null,_0x1905fd=_0x173a78?'\x0a//\x20Example:\x20Using\x20SQL\x20\x22'+_0x173a78['name']+_0x19c630(0x87)+_0x173a78[_0x19c630(0xc9)]+'\x27);\x0aif\x20(!data.execSuccess)\x20{\x0a\x20\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);\x0a}\x0aconst\x20results\x20=\x20data.execResult\x20||\x20[];':'';return{'type':_0x19c630(0xb5),'total':_0x27cec8[_0x19c630(0xc3)],'sqls':_0x5cb9e6,'pagination':{'currentPage':currentPage,'pageSize':pageSize,'totalPages':_0x5b5c81},'usage':{'description':_0x19c630(0x98)+_0x27cec8[_0x19c630(0xc3)]+_0x19c630(0xa0)+appCode+_0x19c630(0xac),'important':[_0x19c630(0x9c),_0x19c630(0xa4),_0x19c630(0xa6),_0x19c630(0xc4),'IMPORTANT:\x20Business\x20logic\x20errors\x20(SQL\x20failures)\x20are\x20returned\x20in\x20data.execError,\x20not\x20thrown',_0x19c630(0xbe),_0x19c630(0xb7)],'example':_0x1905fd||_0x19c630(0xbd)}};}catch(_0x206021){throw new Error(_0x19c630(0xa3)+_0x206021[_0x19c630(0x9e)]);}}
|
package/dist/tools/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a15_0x44d3(_0x1e4b36,_0x5e4462){const _0xbc31e9=a15_0xbc31();return a15_0x44d3=function(_0x44d3c5,_0x383e59){_0x44d3c5=_0x44d3c5-0x1e0;let _0x5d4e4b=_0xbc31e9[_0x44d3c5];return _0x5d4e4b;},a15_0x44d3(_0x1e4b36,_0x5e4462);}(function(_0x354550,_0x5b9440){const _0x3b6b1c=a15_0x44d3,_0x2e7300=_0x354550();while(!![]){try{const _0x1597b3=-parseInt(_0x3b6b1c(0x1ef))/0x1+-parseInt(_0x3b6b1c(0x1e5))/0x2+parseInt(_0x3b6b1c(0x1fd))/0x3+-parseInt(_0x3b6b1c(0x1f7))/0x4+parseInt(_0x3b6b1c(0x1e6))/0x5+parseInt(_0x3b6b1c(0x1fb))/0x6+parseInt(_0x3b6b1c(0x1f5))/0x7;if(_0x1597b3===_0x5b9440)break;else _0x2e7300['push'](_0x2e7300['shift']());}catch(_0xac2f66){_0x2e7300['push'](_0x2e7300['shift']());}}}(a15_0xbc31,0x23733));import*as a15_0x545efe from'node:https';import{saveCookie}from'../auth/cookie-manager.js';import{isSessionValid}from'../auth/session-validator.js';import{getUserDomain}from'../auth/constants.js';export async function login(_0x527301={}){const _0x1f7cb2=a15_0x44d3,_0x46b200=_0x527301['env']||_0x1f7cb2(0x1e4);if(await isSessionValid(_0x46b200))return{'success':!![],'message':'Already\x20logged\x20in\x20to\x20'+_0x46b200+_0x1f7cb2(0x1f1),'env':_0x46b200};let _0x5d9691;try{const _0x7c7f3f=await fetch(_0x1f7cb2(0x1f0));_0x5d9691=await _0x7c7f3f[_0x1f7cb2(0x1f2)]();}catch(_0x2d50dc){return{'success':![],'message':'Failed\x20to\x20fetch\x20SSL\x20certificates\x20for\x20login\x20server','env':_0x46b200};}return new Promise(_0x5cda87=>{const _0x13eaeb=_0x1f7cb2;let _0x36674f=0x0;const _0x5dcf83=a15_0x545efe[_0x13eaeb(0x1e0)](_0x5d9691,async(_0x1b09b0,_0x1af12b)=>{const _0x5462ad=_0x13eaeb,_0x3b3fdf=getUserDomain(_0x46b200),_0x5997be=_0x1b09b0['headers']['cookie']||'';try{const _0x1b3ac2=await fetch(_0x3b3fdf+'/api/auth/get-session',{'headers':{'cookie':_0x5997be}}),_0x2e8e9b=await _0x1b3ac2[_0x5462ad(0x1f2)](),_0x41ddef=_0x2e8e9b&&_0x2e8e9b[_0x5462ad(0x1e3)]&&_0x2e8e9b[_0x5462ad(0x1ff)];if(_0x41ddef){try{saveCookie(_0x5997be);}catch(_0x3da50b){const _0x2f5f75=_0x5462ad(0x1e7)+_0x3da50b['message']+'</p>\x0a\x20\x20\x20\x20<p>Please\x20check\x20file\x20permissions\x20for\x20~/.lovrabet/cookie</p>\x0a\x20\x20</div>\x0a</body>\x0a</html>';_0x1af12b[_0x5462ad(0x1ec)](0x1f4,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x1af12b[_0x5462ad(0x1ed)](_0x2f5f75),_0x5dcf83[_0x5462ad(0x1f3)](),_0x5cda87({'success':![],'message':_0x5462ad(0x1fe)+_0x3da50b[_0x5462ad(0x1f8)],'env':_0x46b200});return;}const _0x290ded='<!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>';_0x1af12b['writeHead'](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x1af12b[_0x5462ad(0x1ed)](_0x290ded),_0x5dcf83[_0x5462ad(0x1f3)](),_0x5cda87({'success':!![],'message':'Successfully\x20logged\x20in\x20to\x20'+_0x46b200+_0x5462ad(0x1f1),'env':_0x46b200});}else{const _0x7627ec=encodeURIComponent(_0x5462ad(0x1f4)+_0x36674f);_0x1af12b[_0x5462ad(0x1ec)](0x12e,{'location':_0x3b3fdf+_0x5462ad(0x1e9)+_0x7627ec}),_0x1af12b[_0x5462ad(0x1ed)]();}}catch(_0x1808f5){_0x1af12b[_0x5462ad(0x1ec)](0x1f4,{'Content-Type':_0x5462ad(0x1e1)}),_0x1af12b[_0x5462ad(0x1ed)](_0x5462ad(0x1ee)),_0x5dcf83['close'](),_0x5cda87({'success':![],'message':_0x5462ad(0x1ea),'env':_0x46b200});}});_0x5dcf83[_0x13eaeb(0x1fc)](0x0,'127.0.0.1',()=>{const _0x380113=_0x13eaeb,_0xf1e590=_0x5dcf83[_0x380113(0x1e8)]();_0x36674f=typeof _0xf1e590===_0x380113(0x1e2)&&_0xf1e590?_0xf1e590[_0x380113(0x1f6)]:0x0;const _0x3ca6ec='https://dev.lovrabet.com:'+_0x36674f;_0x5cda87({'success':![],'message':_0x380113(0x1fa)+_0x3ca6ec,'loginUrl':_0x3ca6ec,'env':_0x46b200});}),_0x5dcf83['on']('error',_0x202f40=>{const _0x453046=_0x13eaeb;_0x5cda87({'success':![],'message':_0x453046(0x1f9)+_0x202f40[_0x453046(0x1f8)],'env':_0x46b200});}),setTimeout(()=>{const _0x2afa4c=_0x13eaeb;_0x5dcf83[_0x2afa4c(0x1f3)](),_0x5cda87({'success':![],'message':_0x2afa4c(0x1eb),'env':_0x46b200});},0x5*0x3c*0x3e8);});}function a15_0xbc31(){const _0x4f3c06=['object','session','online','69434vPvujm','420530LUfCaO','<!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','address','/sign-in?redirect=','Login\x20server\x20error','Login\x20timeout\x20-\x20no\x20response\x20received\x20within\x205\x20minutes','writeHead','end','Internal\x20server\x20error','158255OxHFUC','https://g.yuntooai.com/cert/lovrabet-dev.json','\x20environment','json','close','https://dev.lovrabet.com:','1274259eFbCUn','port','385028FXPoOs','message','Login\x20server\x20error:\x20','Please\x20open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20login:\x20','260322qKMphN','listen','374706ZfoDSn','Login\x20successful\x20but\x20failed\x20to\x20save\x20cookie:\x20','user','createServer','text/plain'];a15_0xbc31=function(){return _0x4f3c06;};return a15_0xbc31();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x20bca7,_0x1bcac9){const _0x368819=a16_0x5b6d,_0x3d1685=_0x20bca7();while(!![]){try{const _0x335111=-parseInt(_0x368819(0xdf))/0x1*(-parseInt(_0x368819(0xe5))/0x2)+-parseInt(_0x368819(0xd9))/0x3+-parseInt(_0x368819(0xe9))/0x4+parseInt(_0x368819(0xe6))/0x5*(parseInt(_0x368819(0xdb))/0x6)+-parseInt(_0x368819(0xe8))/0x7*(parseInt(_0x368819(0xe4))/0x8)+-parseInt(_0x368819(0xe7))/0x9+parseInt(_0x368819(0xdc))/0xa;if(_0x335111===_0x1bcac9)break;else _0x3d1685['push'](_0x3d1685['shift']());}catch(_0x1e91aa){_0x3d1685['push'](_0x3d1685['shift']());}}}(a16_0x41c5,0xbe995));import{DevApiClient}from'../api/dev-api-client.js';import{DatasetAnalyzer}from'../analyzer/dataset-analyzer.js';export async function searchDatasets(_0x52d6f3){const _0x180791=a16_0x5b6d,{appCode:appCode=process[_0x180791(0xdd)]['LOVRABET_APP_CODE'],cookie:_0x39b513,env:env=process[_0x180791(0xdd)][_0x180791(0xde)]||_0x180791(0xe3),keyword:_0x3b275f}=_0x52d6f3;if(!appCode)throw new Error(_0x180791(0xd6));if(!_0x3b275f)throw new Error(_0x180791(0xe2));const _0x2b761e=new DevApiClient({'appCode':appCode,'cookie':_0x39b513,'env':env}),_0x182623=await _0x2b761e['searchDatasets'](_0x3b275f),_0x763500=new DatasetAnalyzer(),_0x4c87ed=_0x763500[_0x180791(0xe1)](_0x182623);return{'appCode':appCode,'env':env,'keyword':_0x3b275f,'total':_0x4c87ed[_0x180791(0xd8)],'datasets':_0x4c87ed[_0x180791(0xe0)]['map'](_0x338c79=>({'id':_0x338c79['id'],'name':_0x338c79[_0x180791(0xd7)],'code':_0x338c79[_0x180791(0xda)],'tableName':_0x338c79[_0x180791(0xea)],'description':_0x338c79['description']}))};}function a16_0x5b6d(_0x4efa6b,_0xc18f88){const _0x41c560=a16_0x41c5();return a16_0x5b6d=function(_0x5b6dd4,_0x5930cb){_0x5b6dd4=_0x5b6dd4-0xd6;let _0xe257c=_0x41c560[_0x5b6dd4];return _0xe257c;},a16_0x5b6d(_0x4efa6b,_0xc18f88);}function a16_0x41c5(){const _0x5d4cfe=['7TljxBD','493792BvFIbV','tableName','appCode\x20is\x20required.\x20Provide\x20it\x20as\x20parameter\x20or\x20set\x20LOVRABET_APP_CODE\x20environment\x20variable.','name','total','2941620PBVzgG','code','6VtNcBb','17144620uGdBXQ','env','LOVRABET_ENV','15IrbJMF','datasets','analyzeDatasetList','keyword\x20is\x20required','online','6869600pDQSpV','100424WpeWuL','2133620JBpcht','1358865kEYFZV'];a16_0x41c5=function(){return _0x5d4cfe;};return a16_0x41c5();}
|
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.16",
|
|
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.22",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
35
35
|
"axios": "^1.6.2",
|
|
36
36
|
"dotenv": "^16.3.1",
|