@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.3-beta.1
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/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +83 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x4ddc1c=a99_0x37d1;(function(_0xd7fef2,_0x2b221b){const _0x122629=a99_0x37d1,_0x1bd42d=_0xd7fef2();while(!![]){try{const _0x32c9b0=parseInt(_0x122629(0x19f))/0x1+-parseInt(_0x122629(0x19e))/0x2+-parseInt(_0x122629(0x196))/0x3+-parseInt(_0x122629(0x195))/0x4*(parseInt(_0x122629(0x1a6))/0x5)+parseInt(_0x122629(0x1ac))/0x6*(parseInt(_0x122629(0x1aa))/0x7)+parseInt(_0x122629(0x1ab))/0x8*(parseInt(_0x122629(0x19d))/0x9)+parseInt(_0x122629(0x1a5))/0xa;if(_0x32c9b0===_0x2b221b)break;else _0x1bd42d['push'](_0x1bd42d['shift']());}catch(_0xd88dc1){_0x1bd42d['push'](_0x1bd42d['shift']());}}}(a99_0x427d,0x64d59));function a99_0x37d1(_0x35a1b9,_0x4dc52b){_0x35a1b9=_0x35a1b9-0x195;const _0x427d2e=a99_0x427d();let _0x37d198=_0x427d2e[_0x35a1b9];return _0x37d198;}export const PRODUCT_CONFIG={'cliBinName':a99_0x4ddc1c(0x199),'cliDisplayName':a99_0x4ddc1c(0x1a0),'npmPackageName':a99_0x4ddc1c(0x19a),'skillSource':a99_0x4ddc1c(0x1a7),'internalSkillSource':a99_0x4ddc1c(0x1ad),'globalSkillName':a99_0x4ddc1c(0x199),'npmRegistryBaseUrl':a99_0x4ddc1c(0x198),'cliCdnBaseUrl':a99_0x4ddc1c(0x1a3),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a99_0x4ddc1c(0x1af)],'configFileNames':[a99_0x4ddc1c(0x1a1)],'newConfigFileName':a99_0x4ddc1c(0x1a1),'homeDirName':'.lovrabet','logFileName':a99_0x4ddc1c(0x1ae),'invokeSource':a99_0x4ddc1c(0x19c),'userCenterDisplayName':a99_0x4ddc1c(0x1a8),'skipNpxSkillsEnvSuffix':a99_0x4ddc1c(0x197),'accessKeyCreatePath':a99_0x4ddc1c(0x1a9)};export function productEnvName(_0x5448c6){const _0x1674a4=a99_0x4ddc1c;return PRODUCT_CONFIG[_0x1674a4(0x19b)]+'_'+_0x5448c6;}function a99_0x427d(){const _0x4709c5=['lovrabet/lovrabet-cli','Lovrabet\x20User\x20Center','/user/ak','10976RwNjRE','2585864cUHBgV','456hezRfP','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','.lovrabet-runtime.log','RABETBASE','54832mOwAUg','2137290hgEtBb','SKIP_NPX_SKILLS','https://registry.npmjs.org','lovrabet','@lovrabet/lovrabet-cli','envPrefix','cli:lovrabet-runtime','18uSCGZa','943888OVAGVD','640781TxNJmC','Lovrabet\x20Runtime\x20CLI','.lovrabet.json','legacyEnvPrefixes','https://g.lovrabet.com','map','4788440jefana','105lKJzXz'];a99_0x427d=function(){return _0x4709c5;};return a99_0x427d();}export function productEnvNames(_0x4f69c9){const _0x264cd4=a99_0x4ddc1c;return[productEnvName(_0x4f69c9),...PRODUCT_CONFIG[_0x264cd4(0x1a2)][_0x264cd4(0x1a4)](_0x5663a1=>_0x5663a1+'_'+_0x4f69c9)];}export function productEnv(_0x5b4436){for(const _0x1a559d of productEnvNames(_0x5b4436)){const _0x5069b5=process.env[_0x1a559d];if(_0x5069b5!==undefined)return _0x5069b5;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bb949,_0x811a09){const _0x5f5933=a100_0x16af,_0x4d1752=_0x1bb949();while(!![]){try{const _0x5507c5=-parseInt(_0x5f5933(0xeb))/0x1+parseInt(_0x5f5933(0xec))/0x2+parseInt(_0x5f5933(0xee))/0x3*(parseInt(_0x5f5933(0xf8))/0x4)+-parseInt(_0x5f5933(0xf0))/0x5+parseInt(_0x5f5933(0xf9))/0x6*(-parseInt(_0x5f5933(0xf4))/0x7)+-parseInt(_0x5f5933(0xfb))/0x8+parseInt(_0x5f5933(0xfc))/0x9*(parseInt(_0x5f5933(0xf7))/0xa);if(_0x5507c5===_0x811a09)break;else _0x4d1752['push'](_0x4d1752['shift']());}catch(_0x2f79e8){_0x4d1752['push'](_0x4d1752['shift']());}}}(a100_0x512c,0x64b1b));import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';function a100_0x512c(){const _0x4d68f6=['5632352aQyeri','25848WJHjwt','673524VdLrts','107400lvYxwu','Available\x20regions:\x20','633bnAcrw','string','3226045goqwwM','includes','Region\x20\x22','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','98NESGDR','join','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','6230JXCsmz','13304reNdHe','46938qwuGHB','\x22\x20is\x20not\x20currently\x20available.'];a100_0x512c=function(){return _0x4d68f6;};return a100_0x512c();}function a100_0x16af(_0xa6cf79,_0x5cfb29){_0xa6cf79=_0xa6cf79-0xeb;const _0x512cb6=a100_0x512c();let _0x16af6e=_0x512cb6[_0xa6cf79];return _0x16af6e;}export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x19a1f1){const _0x5a878f=a100_0x16af;return typeof _0x19a1f1===_0x5a878f(0xef)&&LOVRABET_REGION_VALUES['includes'](_0x19a1f1);}export function isEnabledLovrabetRegion(_0x29f592){const _0x3e6e15=a100_0x16af;return typeof _0x29f592===_0x3e6e15(0xef)&&ENABLED_LOVRABET_REGION_VALUES[_0x3e6e15(0xf1)](_0x29f592);}export function normalizeLovrabetRegion(_0x4ff3a6){const _0x48443f=a100_0x16af;if(_0x4ff3a6===undefined||_0x4ff3a6===null||_0x4ff3a6==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x4ff3a6!=='string')throw CliErrors['validation'](_0x48443f(0xf3)+typeof _0x4ff3a6+'.',_0x48443f(0xf6));const _0x342b17=REGION_ALIASES[_0x4ff3a6]??_0x4ff3a6;if(isEnabledLovrabetRegion(_0x342b17))return _0x342b17;throw CliErrors['validation'](_0x48443f(0xf2)+_0x4ff3a6+_0x48443f(0xfa),_0x48443f(0xed)+ENABLED_LOVRABET_REGION_VALUES[_0x48443f(0xf5)](',\x20')+'.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.');}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x43c40f=a101_0x1159;function a101_0xb104(){const _0x4ed3df=['2424094IePxiM','read','14623788fhPGTy','4MyOywi','6246bskdqC','1wbZREn','3504880kxlmGO','754293YeEYOj','4135mHoDPj','high-risk-write','5942363vBjxJP','9LMiqdE','33MvwAdq','6529120Ndzhdh','write'];a101_0xb104=function(){return _0x4ed3df;};return a101_0xb104();}function a101_0x1159(_0x391fe0,_0x3c3306){_0x391fe0=_0x391fe0-0x184;const _0xb1040a=a101_0xb104();let _0x115979=_0xb1040a[_0x391fe0];return _0x115979;}(function(_0x37928d,_0x22d0a2){const _0x900a9f=a101_0x1159,_0x2df4e5=_0x37928d();while(!![]){try{const _0xf5bc6f=-parseInt(_0x900a9f(0x18b))/0x1*(-parseInt(_0x900a9f(0x186))/0x2)+-parseInt(_0x900a9f(0x18d))/0x3*(-parseInt(_0x900a9f(0x189))/0x4)+parseInt(_0x900a9f(0x18e))/0x5*(parseInt(_0x900a9f(0x18a))/0x6)+parseInt(_0x900a9f(0x190))/0x7+parseInt(_0x900a9f(0x184))/0x8+-parseInt(_0x900a9f(0x191))/0x9*(-parseInt(_0x900a9f(0x18c))/0xa)+-parseInt(_0x900a9f(0x192))/0xb*(parseInt(_0x900a9f(0x188))/0xc);if(_0xf5bc6f===_0x22d0a2)break;else _0x2df4e5['push'](_0x2df4e5['shift']());}catch(_0x3b9603){_0x2df4e5['push'](_0x2df4e5['shift']());}}}(a101_0xb104,0xa6fc7));export const RISK_LEVEL_VALUES=[a101_0x43c40f(0x187),a101_0x43c40f(0x185),a101_0x43c40f(0x18f)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2993db,_0x19f32e){const _0x16caa2=a102_0x306f,_0x329619=_0x2993db();while(!![]){try{const _0x39814a=-parseInt(_0x16caa2(0x126))/0x1+parseInt(_0x16caa2(0x12b))/0x2*(-parseInt(_0x16caa2(0x131))/0x3)+parseInt(_0x16caa2(0x129))/0x4+-parseInt(_0x16caa2(0x12c))/0x5+-parseInt(_0x16caa2(0x128))/0x6*(-parseInt(_0x16caa2(0x12e))/0x7)+parseInt(_0x16caa2(0x127))/0x8*(parseInt(_0x16caa2(0x130))/0x9)+-parseInt(_0x16caa2(0x12a))/0xa*(-parseInt(_0x16caa2(0x12f))/0xb);if(_0x39814a===_0x19f32e)break;else _0x329619['push'](_0x329619['shift']());}catch(_0x52fb24){_0x329619['push'](_0x329619['shift']());}}}(a102_0x2948,0x64dda));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';function a102_0x306f(_0x15d148,_0x317a68){_0x15d148=_0x15d148-0x126;const _0x2948e9=a102_0x2948();let _0x306f66=_0x2948e9[_0x15d148];return _0x306f66;}import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a102_0x2948(){const _0x31818a=['1384IuKeME','11442pFDqvx','2134784xYEEVR','10ONPTrg','1105880hTyYwc','2788270UwcPzQ','serviceDomains','2863RTiznU','4649887WhueBE','28143IMKpNb','3LSYsaK','user','753607uVZfyR'];a102_0x2948=function(){return _0x31818a;};return a102_0x2948();}export function getUserAccessKeyCreateUrl(_0x21d14d=DEFAULT_LOVRABET_REGION){const _0x1e6888=a102_0x306f,_0x520675=OFFICIAL_ROUTING_PROFILES[_0x21d14d][_0x1e6888(0x12d)]['production'][_0x1e6888(0x132)];return''+_0x520675+PRODUCT_CONFIG['accessKeyCreatePath'];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x53b9f7=a102_0x5559;(function(_0x2ce312,_0x50e44b){const _0x3e4d6a=a102_0x5559,_0x41b84a=_0x2ce312();while(!![]){try{const _0x180922=-parseInt(_0x3e4d6a(0xb0))/0x1+parseInt(_0x3e4d6a(0x7f))/0x2+parseInt(_0x3e4d6a(0x82))/0x3+parseInt(_0x3e4d6a(0xb8))/0x4+-parseInt(_0x3e4d6a(0xb1))/0x5*(parseInt(_0x3e4d6a(0xb9))/0x6)+-parseInt(_0x3e4d6a(0x90))/0x7*(-parseInt(_0x3e4d6a(0xc3))/0x8)+parseInt(_0x3e4d6a(0x96))/0x9*(parseInt(_0x3e4d6a(0xc1))/0xa);if(_0x180922===_0x50e44b)break;else _0x41b84a['push'](_0x41b84a['shift']());}catch(_0x114f18){_0x41b84a['push'](_0x41b84a['shift']());}}}(a102_0x3ce9,0xb6f09));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a102_0x53b9f7(0x8b)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a102_0x53b9f7(0xa4)];function resolveConfigPath(_0x47a4ec){for(const _0x29adfc of CONFIG_NAMES){const _0x3ced7a=resolve(_0x47a4ec,_0x29adfc);if(existsSync(_0x3ced7a))return _0x3ced7a;}return undefined;}export function resolveWriteConfigPath(_0xf7f702){const _0x543fef=a102_0x53b9f7,_0x31ba3b=_0xf7f702===_0x543fef(0x9d)?process['cwd']():homedir(),_0x4308e2=resolveConfigPath(_0x31ba3b);return _0x4308e2??resolve(_0x31ba3b,NEW_CONFIG_NAME);}export function readConfigFile(_0x2d20e4){const _0x577722=a102_0x53b9f7;try{if(existsSync(_0x2d20e4)){const _0x1b7a28=readFileSync(_0x2d20e4,{'encoding':_0x577722(0x89)});if(_0x1b7a28){const _0x34b158=JSON['parse'](_0x1b7a28);return migrateOnlineEnv(_0x2d20e4,_0x34b158),_0x34b158;}}}catch{}return{};}function migrateOnlineEnv(_0x37cfc4,_0x4727c9){const _0x59e5ad=a102_0x53b9f7;let _0x268073=![];_0x4727c9[_0x59e5ad(0xbe)]===_0x59e5ad(0xb7)&&(_0x4727c9[_0x59e5ad(0xbe)]=_0x59e5ad(0xba),_0x268073=!![]);if(_0x4727c9[_0x59e5ad(0x92)]&&typeof _0x4727c9[_0x59e5ad(0x92)]===_0x59e5ad(0x86))for(const _0x5a5418 of Object['values'](_0x4727c9[_0x59e5ad(0x92)])){_0x5a5418&&_0x5a5418['env']===_0x59e5ad(0xb7)&&(_0x5a5418[_0x59e5ad(0xbe)]='production',_0x268073=!![]);}if(_0x268073)try{writeConfigFile(_0x37cfc4,_0x4727c9);}catch{}}export function writeConfigFile(_0x19d45b,_0x5c1076){const _0x23930c=a102_0x53b9f7,_0x45672c=dirname(_0x19d45b);!existsSync(_0x45672c)&&mkdirSync(_0x45672c,{'recursive':!![]});const _0x437b02=_0x19d45b+'.tmp';try{writeFileSync(_0x437b02,JSON[_0x23930c(0xac)](_0x5c1076,null,0x2)+'\x0a',{'encoding':_0x23930c(0x89),'mode':0x180});try{renameSync(_0x437b02,_0x19d45b);}catch(_0x4f011a){if(_0x4f011a[_0x23930c(0x97)]===_0x23930c(0x84)||_0x4f011a[_0x23930c(0x97)]===_0x23930c(0xc4)||_0x4f011a[_0x23930c(0x97)]===_0x23930c(0xa9)){writeFileSync(_0x19d45b,JSON[_0x23930c(0xac)](_0x5c1076,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x437b02);}catch{}}else throw _0x4f011a;}}catch(_0x1a5746){try{unlinkSync(_0x437b02);}catch{}throw _0x1a5746;}}export function isNonInteractiveMode(_0x33c117){const _0x22f1b3=a102_0x53b9f7;return!!(_0x33c117['nonInteractive']||_0x33c117['ci']||productEnvNames('CI')['some'](_0x13b118=>process.env[_0x13b118]===_0x22f1b3(0xa5))||process.env.CI===_0x22f1b3(0xa5)||!process[_0x22f1b3(0xc0)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5c9800=a102_0x53b9f7;if(!process[_0x5c9800(0xb5)]['isTTY'])return![];try{const _0x579b3f=process[_0x5c9800(0xb5)][_0x5c9800(0xb2)];return process[_0x5c9800(0xb5)][_0x5c9800(0xa8)](!![]),process[_0x5c9800(0xb5)][_0x5c9800(0xa8)](_0x579b3f??![]),!![];}catch{return![];}}export async function createContext(_0x4eaf4c){const _0x18eb20=a102_0x53b9f7,_0x5d2d67=readRawConfig(),_0x2de909=buildConfig(_0x5d2d67,_0x4eaf4c);await initGlobalEnvironment(_0x2de909);const {getUserDomain:_0x1fa253,getApiDomain:_0x57b4c2}=await import('./constant/domain.js'),_0xa8224f={'apiDomain':_0x57b4c2(),'userDomain':_0x1fa253()},_0x1bf362=await buildAuth(_0x2de909);logger[_0x18eb20(0xa6)](process['cwd']());const _0x593a64=(CLI_BIN_NAME+'\x20'+process['argv'][_0x18eb20(0x83)](0x2)[_0x18eb20(0xa0)]('\x20'))[_0x18eb20(0x9c)]();logger[_0x18eb20(0x9f)](_0x593a64);const _0x875bf7=isNonInteractiveMode(_0x4eaf4c);return{'config':_0x2de909,'auth':_0x1bf362,'logger':logger,'env':_0xa8224f,'nonInteractive':_0x875bf7};}export function buildConfigFromFlags(_0x1fa7f6){return buildConfig(readRawConfig(),_0x1fa7f6);}function a102_0x3ce9(){const _0x101494=['setLogPath','nativeToolAvailable','setRawMode','EACCES','apiDomain','globalConfig','stringify','skillDomain','host','write','1217415ToBHJz','882505VGazVt','isRaw','accessKey','./constant/domain.js','stdin','values','online','2986548ZPEByD','42qzMSXh','production','local-alias','VERBOSE','riskLevel','env','string','stdout','70UGFSkq','app','627592TwzGYU','EXDEV','projectConfig','1538466JFGBxc','raw','agentDomain','1272630SCkEVX','slice','EPERM','./constant/env.js','object','authRequired','runtimeDomain','utf8','top-level','configFileNames','region','global','routing','daily','70wFkidA','format','apps','pageSize','skillHubDomain','platformDomain','614151KcEuTC','code','locale','development','FORMAT','defaultApp','trim','project','parse','setRawCommand','join','APPCODE','message','appcode','newConfigFileName','true'];a102_0x3ce9=function(){return _0x101494;};return a102_0x3ce9();}export function getLocalAppAliases(_0x42c188){const _0x4fbfe9=a102_0x53b9f7;return _0x42c188[_0x4fbfe9(0x92)]&&typeof _0x42c188['apps']==='object'?_0x42c188[_0x4fbfe9(0x92)]:{};}export function resolveLocalAppAliasCode(_0x158211,_0x4d78ae){const _0x1d5972=a102_0x53b9f7;if(!_0x4d78ae)return undefined;const _0x9f0cf3=getLocalAppAliases(_0x158211)[_0x4d78ae],_0x25a838=_0x9f0cf3?.[_0x1d5972(0xa3)];return typeof _0x25a838===_0x1d5972(0xbf)&&_0x25a838[_0x1d5972(0x9c)]()?_0x25a838['trim']():undefined;}export function readAppCodeFromConfig(){const _0x4f311c=a102_0x53b9f7,_0xfe43ad=readRawConfig(),_0x46ee5c=_0xfe43ad['appcode']??_0xfe43ad[_0x4f311c(0xc2)];if(typeof _0x46ee5c===_0x4f311c(0xbf)&&_0x46ee5c[_0x4f311c(0x9c)]())return _0x46ee5c['trim']();const _0x361e22=resolveLocalAppAliasCode(_0xfe43ad,typeof _0xfe43ad[_0x4f311c(0x9b)]===_0x4f311c(0xbf)?_0xfe43ad['defaultApp']:undefined);if(_0x361e22)return _0x361e22;const _0x412860=normalizeEnv(String(_0xfe43ad[_0x4f311c(0xbe)]||_0x4f311c(0xba))),_0x5ca572=isDaily(_0x412860)?'daily':isDev(_0x412860)?_0x4f311c(0x99):'production',_0x5805de=resolveCachedAppCode(typeof _0xfe43ad[_0x4f311c(0x9b)]==='string'?_0xfe43ad[_0x4f311c(0x9b)]:undefined,_0x5ca572,typeof _0xfe43ad[_0x4f311c(0xb3)]===_0x4f311c(0xbf)?_0xfe43ad[_0x4f311c(0xb3)]:undefined);if(_0x5805de)return _0x5805de;const _0x270c95=Object[_0x4f311c(0xb6)](getLocalAppAliases(_0xfe43ad))['find'](_0x4404dd=>_0x4404dd?.['appcode']);return typeof _0x270c95?.['appcode']===_0x4f311c(0xbf)&&_0x270c95[_0x4f311c(0xa3)][_0x4f311c(0x9c)]()?_0x270c95['appcode'][_0x4f311c(0x9c)]():undefined;}export function readScopedConfig(_0x1cdb43){const _0x474809=a102_0x53b9f7,_0x50a9f2=_0x1cdb43[_0x474809(0x8d)]?_0x474809(0x8d):'project';return readConfigFile(resolveWriteConfigPath(_0x50a9f2));}export function writeScopedConfig(_0x549c8c,_0x16f4ba){const _0x24a618=a102_0x53b9f7,_0x1d03f0=_0x16f4ba[_0x24a618(0x8d)]?_0x24a618(0x8d):_0x24a618(0x9d);writeConfigFile(resolveWriteConfigPath(_0x1d03f0),_0x549c8c);}export async function initGlobalEnvironment(_0x536e09){const _0x37aa69=a102_0x53b9f7,{initEnv:_0x2fec18}=await import(_0x37aa69(0x85));_0x2fec18(_0x536e09[_0x37aa69(0xbe)]);const {initDomains:_0x2afbeb}=await import(_0x37aa69(0xb4)),_0x5a1c92=resolveEnterpriseRoutingConfig(_0x536e09[_0x37aa69(0x80)][_0x37aa69(0x8e)]);_0x2afbeb({'apiDomain':_0x5a1c92?_0x5a1c92[_0x37aa69(0xaa)]:_0x536e09[_0x37aa69(0x80)][_0x37aa69(0xaa)]||_0x536e09[_0x37aa69(0x80)][_0x37aa69(0xae)]||undefined,'userDomain':_0x5a1c92?_0x5a1c92['userDomain']:_0x536e09[_0x37aa69(0x80)]['userDomain']||undefined,'runtimeDomain':_0x5a1c92?_0x5a1c92['runtimeDomain']:_0x536e09[_0x37aa69(0x80)][_0x37aa69(0x88)]||undefined,'skillDomain':_0x5a1c92?_0x5a1c92[_0x37aa69(0xad)]:_0x536e09[_0x37aa69(0x80)][_0x37aa69(0xad)]||_0x536e09[_0x37aa69(0x80)][_0x37aa69(0x94)]||_0x536e09['raw'][_0x37aa69(0x81)]||_0x536e09[_0x37aa69(0x80)][_0x37aa69(0x95)]||undefined,'region':normalizeLovrabetRegion(_0x536e09['raw'][_0x37aa69(0x8c)])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x22cb2c){const _0x5f269d=a102_0x53b9f7;if(!existsSync(_0x22cb2c))return{'status':'missing'};try{const _0x42b791=readFileSync(_0x22cb2c,{'encoding':_0x5f269d(0x89)});if(!_0x42b791?.[_0x5f269d(0x9c)]())return{'status':'empty'};const _0x49191d=JSON[_0x5f269d(0x9e)](_0x42b791);return{'status':'ok','data':_0x49191d};}catch(_0x31cb3f){return{'status':'error','message':_0x31cb3f instanceof Error?_0x31cb3f[_0x5f269d(0xa2)]:String(_0x31cb3f)};}}export function loadRawConfigLayers(_0x449a1b){const _0x4e9382=a102_0x53b9f7;let _0x25f06a={},_0x5b23f8={},_0xbb6a6f,_0x16c6ea;try{_0xbb6a6f=resolveConfigPath(homedir());if(_0xbb6a6f){const _0x94aea0=readFileSync(_0xbb6a6f,{'encoding':_0x4e9382(0x89)});if(_0x94aea0)_0x25f06a=JSON[_0x4e9382(0x9e)](_0x94aea0);}}catch{}try{const _0x148699=_0x449a1b||process['cwd']();_0x16c6ea=resolveConfigPath(_0x148699);if(_0x16c6ea){const _0x5267dd=readFileSync(_0x16c6ea,{'encoding':_0x4e9382(0x89)});if(_0x5267dd)_0x5b23f8=JSON['parse'](_0x5267dd);}}catch{}return{'globalPath':_0xbb6a6f,'projectPath':_0x16c6ea,'globalConfig':_0x25f06a,'projectConfig':_0x5b23f8};}function mergeRawConfigLayers(_0x211365){const _0x2b9424=a102_0x53b9f7,{globalConfig:_0x49f45e,projectConfig:_0x3c763d}=_0x211365,_0x317688={..._0x49f45e,..._0x3c763d};delete _0x317688['inherit'];if('defaultApp'in _0x3c763d)_0x317688[_0x2b9424(0x9b)]=_0x3c763d[_0x2b9424(0x9b)];else _0x49f45e[_0x2b9424(0x9b)]&&(_0x317688[_0x2b9424(0x9b)]=_0x49f45e[_0x2b9424(0x9b)]);return _0x317688;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x57ed98){return mergeRawConfigLayers(loadRawConfigLayers(_0x57ed98));}export function readRawConfigWithLayers(_0x5dc7f8){const _0x4f911a=loadRawConfigLayers(_0x5dc7f8);return{'config':mergeRawConfigLayers(_0x4f911a),'layers':_0x4f911a};}export function resolveDefaultAppSource(_0x2d5a84){const _0x8de4b8=a102_0x53b9f7;if(_0x8de4b8(0x9b)in _0x2d5a84[_0x8de4b8(0x7e)])return'project';if(_0x2d5a84[_0x8de4b8(0xab)][_0x8de4b8(0x9b)])return _0x8de4b8(0x8d);return null;}function buildConfig(_0x4f2ada,_0x514952){const _0x2da844=a102_0x53b9f7,_0x370c16=_0x4f2ada['defaultApp']||undefined,_0x9deb87=_0x514952[_0x2da844(0xc2)]||env('APP')||undefined,_0x144b81=_0x9deb87||_0x370c16||undefined,_0x57f8f8=env('ACCESS_KEY')||_0x4f2ada[_0x2da844(0xb3)]||undefined,_0x583fce=_0x514952[_0x2da844(0xbe)]||env('ENV')||_0x4f2ada[_0x2da844(0xbe)]||DEFAULT_CONFIG_VALUES[_0x2da844(0xbe)],_0x3ea2be=normalizeEnv(String(_0x583fce)),_0x24f96c=isDaily(_0x3ea2be)?_0x2da844(0x8f):isDev(_0x3ea2be)?_0x2da844(0x99):'production',_0x10db0e=typeof _0x514952[_0x2da844(0xa3)]===_0x2da844(0xbf)?_0x514952[_0x2da844(0xa3)]:undefined,_0x6de362=env(_0x2da844(0xa1)),_0x237f84=_0x9deb87?undefined:_0x4f2ada[_0x2da844(0xa3)]||_0x4f2ada[_0x2da844(0xc2)]||undefined,_0x470f70=_0x9deb87||(_0x237f84?undefined:_0x370c16),_0x4d78ac=resolveLocalAppAliasCode(_0x4f2ada,_0x470f70),_0x4ed1ce=resolveCachedAppCode(_0x470f70,_0x24f96c,_0x57f8f8),_0x550e2f=_0x10db0e||_0x6de362||_0x237f84||_0x4d78ac||_0x4ed1ce||undefined,_0x3603fb=_0x10db0e?'explicit':_0x6de362?_0x2da844(0xbe):_0x237f84?_0x2da844(0x8a):_0x4d78ac?_0x2da844(0xbb):_0x4ed1ce?'cache':undefined,_0x4d9360=_0x4f2ada[_0x2da844(0x98)]||DEFAULT_CONFIG_VALUES['locale'],_0xea6119=undefined,_0x75aaba=_0x514952[_0x2da844(0x91)]||env(_0x2da844(0x9a))||_0x4f2ada[_0x2da844(0x91)],_0xf560f9=normalizeLegacyOutputFormat(_0x75aaba),_0x4a2070=env('PAGE_SIZE')||_0x4f2ada[_0x2da844(0x93)],_0xbf0f3f=_0x4a2070?Number(_0x4a2070)||undefined:undefined,_0x2c612c=_0x4f2ada[_0x2da844(0xbd)],_0x13a131=_0x2c612c==='read'||_0x2c612c===_0x2da844(0xaf)||_0x2c612c==='high-risk-write'?_0x2c612c:DEFAULT_CONFIG_VALUES['riskLevel'],_0x91437b=_0x4f2ada[_0x2da844(0xa7)]===!![],_0x400d47=env(_0x2da844(0xbc)),_0x267c3b=_0x400d47==='1'||_0x400d47===_0x2da844(0xa5);return{'appCode':typeof _0x550e2f===_0x2da844(0xbf)&&_0x550e2f[_0x2da844(0x9c)]()?_0x550e2f[_0x2da844(0x9c)]():undefined,'appCodeSource':_0x3603fb,'env':_0x24f96c,'locale':_0x4d9360,'cookie':_0xea6119,'accessKey':_0x57f8f8,'format':_0xf560f9,'pageSize':_0xbf0f3f,'riskLevel':_0x13a131,'nativeToolAvailable':_0x91437b,'verbose':_0x267c3b,'defaultApp':_0x370c16,'currentApp':typeof _0x144b81===_0x2da844(0xbf)?_0x144b81:undefined,'raw':_0x4f2ada};}function a102_0x5559(_0x113bcb,_0x271219){_0x113bcb=_0x113bcb-0x7e;const _0x3ce9f6=a102_0x3ce9();let _0x555965=_0x3ce9f6[_0x113bcb];return _0x555965;}function env(_0x252fed){return productEnv(_0x252fed);}async function buildAuth(_0x74d9ff){const _0x536077=a102_0x53b9f7,_0x2380f3='',_0x120f12=!!_0x74d9ff[_0x536077(0xb3)];return{'cookie':_0x2380f3,'isLoggedIn':_0x120f12,async 'getOrLogin'(){const _0x59b6dc=_0x536077;if(_0x120f12)return _0x2380f3;throw CliErrors[_0x59b6dc(0x87)]();}};}
|
|
1
|
+
const a103_0x30d6b2=a103_0x5b8d;(function(_0x3f0611,_0x5d0727){const _0x318c57=a103_0x5b8d,_0x3bd16a=_0x3f0611();while(!![]){try{const _0x3aa9c3=parseInt(_0x318c57(0x1fa))/0x1+parseInt(_0x318c57(0x1cf))/0x2*(-parseInt(_0x318c57(0x212))/0x3)+parseInt(_0x318c57(0x201))/0x4+parseInt(_0x318c57(0x206))/0x5+parseInt(_0x318c57(0x1ec))/0x6+-parseInt(_0x318c57(0x1e5))/0x7+parseInt(_0x318c57(0x1e2))/0x8*(-parseInt(_0x318c57(0x214))/0x9);if(_0x3aa9c3===_0x5d0727)break;else _0x3bd16a['push'](_0x3bd16a['shift']());}catch(_0x26ac0b){_0x3bd16a['push'](_0x3bd16a['shift']());}}}(a103_0x5da3,0x9e038));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{redactCommandArgv}from'./utils/redaction.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a103_0x30d6b2(0x1f7)];function resolveConfigPath(_0x4b7322){for(const _0x213d70 of CONFIG_NAMES){const _0x48b26d=resolve(_0x4b7322,_0x213d70);if(existsSync(_0x48b26d))return _0x48b26d;}return undefined;}export function resolveWriteConfigPath(_0x11a6d1){const _0x36933f=a103_0x30d6b2,_0x25b674=_0x11a6d1===_0x36933f(0x1f1)?process[_0x36933f(0x1e0)]():homedir(),_0x39b2bc=resolveConfigPath(_0x25b674);return _0x39b2bc??resolve(_0x25b674,NEW_CONFIG_NAME);}export function readConfigFile(_0x1859d0){const _0x42d1db=a103_0x30d6b2;try{if(existsSync(_0x1859d0)){const _0x4210f6=readFileSync(_0x1859d0,{'encoding':_0x42d1db(0x1d6)});if(_0x4210f6){const _0x4645bb=JSON[_0x42d1db(0x20c)](_0x4210f6);return migrateOnlineEnv(_0x1859d0,_0x4645bb),_0x4645bb;}}}catch{}return{};}function migrateOnlineEnv(_0x438a06,_0x2da461){const _0x4ba3b3=a103_0x30d6b2;let _0x3ce776=![];_0x2da461[_0x4ba3b3(0x1f6)]===_0x4ba3b3(0x1f2)&&(_0x2da461[_0x4ba3b3(0x1f6)]=_0x4ba3b3(0x1da),_0x3ce776=!![]);if(_0x2da461[_0x4ba3b3(0x1d0)]&&typeof _0x2da461[_0x4ba3b3(0x1d0)]==='object')for(const _0x1ff7fb of Object[_0x4ba3b3(0x1f8)](_0x2da461[_0x4ba3b3(0x1d0)])){_0x1ff7fb&&_0x1ff7fb['env']===_0x4ba3b3(0x1f2)&&(_0x1ff7fb[_0x4ba3b3(0x1f6)]=_0x4ba3b3(0x1da),_0x3ce776=!![]);}if(_0x3ce776)try{writeConfigFile(_0x438a06,_0x2da461);}catch{}}export function writeConfigFile(_0x448616,_0xf7e719){const _0x317d0b=a103_0x30d6b2,_0x24cc50=dirname(_0x448616);!existsSync(_0x24cc50)&&mkdirSync(_0x24cc50,{'recursive':!![]});const _0x569e35=_0x448616+'.tmp';try{writeFileSync(_0x569e35,JSON[_0x317d0b(0x1e6)](_0xf7e719,null,0x2)+'\x0a',{'encoding':_0x317d0b(0x1d6),'mode':0x180});try{renameSync(_0x569e35,_0x448616);}catch(_0x5a4d64){if(_0x5a4d64[_0x317d0b(0x1ff)]===_0x317d0b(0x1ce)||_0x5a4d64['code']===_0x317d0b(0x1cb)||_0x5a4d64[_0x317d0b(0x1ff)]==='EACCES'){writeFileSync(_0x448616,JSON[_0x317d0b(0x1e6)](_0xf7e719,null,0x2)+'\x0a',{'encoding':_0x317d0b(0x1d6)});try{unlinkSync(_0x569e35);}catch{}}else throw _0x5a4d64;}}catch(_0x3173fa){try{unlinkSync(_0x569e35);}catch{}throw _0x3173fa;}}export function isNonInteractiveMode(_0x1771c1){const _0x592ea6=a103_0x30d6b2;return!!(_0x1771c1[_0x592ea6(0x209)]||_0x1771c1['ci']||productEnvNames('CI')[_0x592ea6(0x1cd)](_0xb907c2=>process.env[_0xb907c2]==='true')||process.env.CI==='true'||!process[_0x592ea6(0x1de)][_0x592ea6(0x1e3)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xc8ae84=a103_0x30d6b2;if(!process[_0xc8ae84(0x1db)][_0xc8ae84(0x1e3)])return![];try{const _0x59f487=process[_0xc8ae84(0x1db)]['isRaw'];return process[_0xc8ae84(0x1db)][_0xc8ae84(0x1c8)](!![]),process[_0xc8ae84(0x1db)][_0xc8ae84(0x1c8)](_0x59f487??![]),!![];}catch{return![];}}export async function createContext(_0x54f204){const _0x5b5a74=a103_0x30d6b2,_0x1bd642=readRawConfig(),_0x282d7c=buildConfig(_0x1bd642,_0x54f204);await initGlobalEnvironment(_0x282d7c);const {getUserDomain:_0x521668,getApiDomain:_0x246536}=await import(_0x5b5a74(0x1cc)),_0x433a1c={'apiDomain':_0x246536(),'userDomain':_0x521668()},_0x5b4f7b=await buildAuth(_0x282d7c);logger[_0x5b5a74(0x205)](process[_0x5b5a74(0x1e0)]());const _0x23f1b1=(CLI_BIN_NAME+'\x20'+redactCommandArgv(process[_0x5b5a74(0x1fe)][_0x5b5a74(0x204)](0x2))['join']('\x20'))[_0x5b5a74(0x208)]();logger[_0x5b5a74(0x1c9)](_0x23f1b1);const _0x188ee5=isNonInteractiveMode(_0x54f204);return{'config':_0x282d7c,'auth':_0x5b4f7b,'logger':logger,'env':_0x433a1c,'nonInteractive':_0x188ee5};}export function buildConfigFromFlags(_0x1e666c){return buildConfig(readRawConfig(),_0x1e666c);}export function getLocalAppAliases(_0x497cd3){const _0x2ab67d=a103_0x30d6b2;return _0x497cd3[_0x2ab67d(0x1d0)]&&typeof _0x497cd3[_0x2ab67d(0x1d0)]===_0x2ab67d(0x1f0)?_0x497cd3[_0x2ab67d(0x1d0)]:{};}export function resolveLocalAppAliasCode(_0x5a1998,_0x365662){const _0x3c1f41=a103_0x30d6b2;if(!_0x365662)return undefined;const _0x217cb5=getLocalAppAliases(_0x5a1998)[_0x365662],_0x5cbb97=_0x217cb5?.[_0x3c1f41(0x1fd)];return typeof _0x5cbb97==='string'&&_0x5cbb97[_0x3c1f41(0x208)]()?_0x5cbb97[_0x3c1f41(0x208)]():undefined;}export function readAppCodeFromConfig(){const _0x6915c8=a103_0x30d6b2,_0x6a2540=readRawConfig(),_0x55fae9=_0x6a2540[_0x6915c8(0x1fd)]??_0x6a2540[_0x6915c8(0x20a)];if(typeof _0x55fae9===_0x6915c8(0x1e8)&&_0x55fae9[_0x6915c8(0x208)]())return _0x55fae9[_0x6915c8(0x208)]();const _0x1382ac=resolveLocalAppAliasCode(_0x6a2540,typeof _0x6a2540[_0x6915c8(0x1f3)]===_0x6915c8(0x1e8)?_0x6a2540[_0x6915c8(0x1f3)]:undefined);if(_0x1382ac)return _0x1382ac;const _0x4ba8ff=normalizeEnv(String(_0x6a2540['env']||'production')),_0x25de08=isDaily(_0x4ba8ff)?_0x6915c8(0x1d8):isDev(_0x4ba8ff)?_0x6915c8(0x1ee):'production',_0x4a4e7b=resolveCachedAppCode(typeof _0x6a2540[_0x6915c8(0x1f3)]===_0x6915c8(0x1e8)?_0x6a2540['defaultApp']:undefined,_0x25de08,typeof _0x6a2540[_0x6915c8(0x20f)]===_0x6915c8(0x1e8)?_0x6a2540[_0x6915c8(0x20f)]:undefined);if(_0x4a4e7b)return _0x4a4e7b;const _0x361d7c=Object['values'](getLocalAppAliases(_0x6a2540))[_0x6915c8(0x1ef)](_0x370a0c=>_0x370a0c?.['appcode']);return typeof _0x361d7c?.['appcode']==='string'&&_0x361d7c[_0x6915c8(0x1fd)][_0x6915c8(0x208)]()?_0x361d7c['appcode']['trim']():undefined;}export function readScopedConfig(_0xa75e47){const _0x1f2cec=a103_0x30d6b2,_0x417564=_0xa75e47[_0x1f2cec(0x1d5)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x417564));}export function writeScopedConfig(_0x277d09,_0x39eafd){const _0x2d2929=_0x39eafd['global']?'global':'project';writeConfigFile(resolveWriteConfigPath(_0x2d2929),_0x277d09);}export async function initGlobalEnvironment(_0x14e376){const _0x18f326=a103_0x30d6b2,{initEnv:_0x1f1ae9}=await import(_0x18f326(0x1fb));_0x1f1ae9(_0x14e376['env']);const {initDomains:_0x3ca85c}=await import(_0x18f326(0x1cc)),_0x3cce7d=resolveEnterpriseRoutingConfig(_0x14e376[_0x18f326(0x203)]['routing']);_0x3ca85c({'apiDomain':_0x3cce7d?_0x3cce7d[_0x18f326(0x1ed)]:_0x14e376[_0x18f326(0x203)][_0x18f326(0x1ed)]||_0x14e376['raw'][_0x18f326(0x20e)]||undefined,'userDomain':_0x3cce7d?_0x3cce7d[_0x18f326(0x1f5)]:_0x14e376[_0x18f326(0x203)]['userDomain']||undefined,'runtimeDomain':_0x3cce7d?_0x3cce7d[_0x18f326(0x1d1)]:_0x14e376[_0x18f326(0x203)][_0x18f326(0x1d1)]||undefined,'skillDomain':_0x3cce7d?_0x3cce7d[_0x18f326(0x20b)]:_0x14e376[_0x18f326(0x203)][_0x18f326(0x20b)]||_0x14e376[_0x18f326(0x203)]['skillHubDomain']||_0x14e376['raw'][_0x18f326(0x1e4)]||_0x14e376[_0x18f326(0x203)][_0x18f326(0x1e1)]||undefined,'region':normalizeLovrabetRegion(_0x14e376[_0x18f326(0x203)][_0x18f326(0x1f4)])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}function a103_0x5da3(){const _0x1484fc=['nativeToolAvailable','empty','stdout','cache','cwd','platformDomain','652216JomvMX','isTTY','agentDomain','3081281TrUEsV','stringify','top-level','string','authRequired','high-risk-write','FORMAT','7270632aFqkDl','apiDomain','development','find','object','project','online','defaultApp','region','userDomain','env','newConfigFileName','values','pageSize','1158847uPudHt','./constant/env.js','message','appcode','argv','code','error','581916OpcDWx','globalConfig','raw','slice','setLogPath','687020HMmXjo','ACCESS_KEY','trim','nonInteractive','app','skillDomain','parse','read','host','accessKey','true','APPCODE','66jVzMKa','locale','153tzYnPQ','setRawMode','setRawCommand','riskLevel','EXDEV','./constant/domain.js','some','EPERM','16376mILnhD','apps','runtimeDomain','VERBOSE','local-alias','inherit','global','utf8','PAGE_SIZE','daily','format','production','stdin'];a103_0x5da3=function(){return _0x1484fc;};return a103_0x5da3();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x25ccf4){const _0xad2271=a103_0x30d6b2;if(!existsSync(_0x25ccf4))return{'status':'missing'};try{const _0x3ec827=readFileSync(_0x25ccf4,{'encoding':_0xad2271(0x1d6)});if(!_0x3ec827?.[_0xad2271(0x208)]())return{'status':_0xad2271(0x1dd)};const _0x20665c=JSON[_0xad2271(0x20c)](_0x3ec827);return{'status':'ok','data':_0x20665c};}catch(_0x3de795){return{'status':_0xad2271(0x200),'message':_0x3de795 instanceof Error?_0x3de795[_0xad2271(0x1fc)]:String(_0x3de795)};}}export function loadRawConfigLayers(_0x473fd4){const _0x2957cf=a103_0x30d6b2;let _0x428f0f={},_0x108b80={},_0x2a4740,_0x26e399;try{_0x2a4740=resolveConfigPath(homedir());if(_0x2a4740){const _0x19b198=readFileSync(_0x2a4740,{'encoding':_0x2957cf(0x1d6)});if(_0x19b198)_0x428f0f=JSON[_0x2957cf(0x20c)](_0x19b198);}}catch{}try{const _0x2aa971=_0x473fd4||process['cwd']();_0x26e399=resolveConfigPath(_0x2aa971);if(_0x26e399){const _0x2445d6=readFileSync(_0x26e399,{'encoding':_0x2957cf(0x1d6)});if(_0x2445d6)_0x108b80=JSON[_0x2957cf(0x20c)](_0x2445d6);}}catch{}return{'globalPath':_0x2a4740,'projectPath':_0x26e399,'globalConfig':_0x428f0f,'projectConfig':_0x108b80};}function mergeRawConfigLayers(_0x45455f){const _0x2d1442=a103_0x30d6b2,{globalConfig:_0x43c1d1,projectConfig:_0x50f346}=_0x45455f,_0x5511ea={..._0x43c1d1,..._0x50f346};delete _0x5511ea[_0x2d1442(0x1d4)];if('defaultApp'in _0x50f346)_0x5511ea[_0x2d1442(0x1f3)]=_0x50f346[_0x2d1442(0x1f3)];else _0x43c1d1['defaultApp']&&(_0x5511ea['defaultApp']=_0x43c1d1[_0x2d1442(0x1f3)]);return _0x5511ea;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x268295){return mergeRawConfigLayers(loadRawConfigLayers(_0x268295));}export function readRawConfigWithLayers(_0x205dbe){const _0x1d4e33=loadRawConfigLayers(_0x205dbe);return{'config':mergeRawConfigLayers(_0x1d4e33),'layers':_0x1d4e33};}export function resolveDefaultAppSource(_0x5b20d1){const _0x11ddda=a103_0x30d6b2;if(_0x11ddda(0x1f3)in _0x5b20d1['projectConfig'])return _0x11ddda(0x1f1);if(_0x5b20d1[_0x11ddda(0x202)][_0x11ddda(0x1f3)])return _0x11ddda(0x1d5);return null;}function buildConfig(_0x3d0a96,_0x5ea204){const _0x322c60=a103_0x30d6b2,_0x463bcb=_0x3d0a96[_0x322c60(0x1f3)]||undefined,_0x5db61a=_0x5ea204['app']||env('APP')||undefined,_0x43d2b2=_0x5db61a||_0x463bcb||undefined,_0x36e62c=env(_0x322c60(0x207))||_0x3d0a96['accessKey']||undefined,_0x2649bc=_0x5ea204[_0x322c60(0x1f6)]||env('ENV')||_0x3d0a96[_0x322c60(0x1f6)]||DEFAULT_CONFIG_VALUES[_0x322c60(0x1f6)],_0x3b87c7=normalizeEnv(String(_0x2649bc)),_0x568126=isDaily(_0x3b87c7)?_0x322c60(0x1d8):isDev(_0x3b87c7)?_0x322c60(0x1ee):_0x322c60(0x1da),_0x24b946=typeof _0x5ea204[_0x322c60(0x1fd)]===_0x322c60(0x1e8)?_0x5ea204[_0x322c60(0x1fd)]:undefined,_0x240945=env(_0x322c60(0x211)),_0x4dc0df=_0x5db61a?undefined:_0x3d0a96[_0x322c60(0x1fd)]||_0x3d0a96['app']||undefined,_0x535a47=_0x5db61a||(_0x4dc0df?undefined:_0x463bcb),_0x8ba700=resolveLocalAppAliasCode(_0x3d0a96,_0x535a47),_0x1b9809=resolveCachedAppCode(_0x535a47,_0x568126,_0x36e62c),_0x11b2a6=_0x24b946||_0x240945||_0x4dc0df||_0x8ba700||_0x1b9809||undefined,_0x504820=_0x24b946?'explicit':_0x240945?_0x322c60(0x1f6):_0x4dc0df?_0x322c60(0x1e7):_0x8ba700?_0x322c60(0x1d3):_0x1b9809?_0x322c60(0x1df):undefined,_0x4109e3=_0x3d0a96[_0x322c60(0x213)]||DEFAULT_CONFIG_VALUES[_0x322c60(0x213)],_0x376928=undefined,_0x54dd12=_0x5ea204[_0x322c60(0x1d9)]||env(_0x322c60(0x1eb))||_0x3d0a96['format'],_0x5a7ae4=normalizeLegacyOutputFormat(_0x54dd12),_0x420d33=env(_0x322c60(0x1d7))||_0x3d0a96[_0x322c60(0x1f9)],_0x58965d=_0x420d33?Number(_0x420d33)||undefined:undefined,_0x1124fe=_0x3d0a96[_0x322c60(0x1ca)],_0x3c7a72=_0x1124fe===_0x322c60(0x20d)||_0x1124fe==='write'||_0x1124fe===_0x322c60(0x1ea)?_0x1124fe:DEFAULT_CONFIG_VALUES[_0x322c60(0x1ca)],_0x18c2c0=_0x3d0a96[_0x322c60(0x1dc)]===!![],_0x4a2eaf=env(_0x322c60(0x1d2)),_0x1f21fe=_0x4a2eaf==='1'||_0x4a2eaf===_0x322c60(0x210);return{'appCode':typeof _0x11b2a6==='string'&&_0x11b2a6['trim']()?_0x11b2a6[_0x322c60(0x208)]():undefined,'appCodeSource':_0x504820,'env':_0x568126,'locale':_0x4109e3,'cookie':_0x376928,'accessKey':_0x36e62c,'format':_0x5a7ae4,'pageSize':_0x58965d,'riskLevel':_0x3c7a72,'nativeToolAvailable':_0x18c2c0,'verbose':_0x1f21fe,'defaultApp':_0x463bcb,'currentApp':typeof _0x43d2b2==='string'?_0x43d2b2:undefined,'raw':_0x3d0a96};}function a103_0x5b8d(_0x30d39a,_0x2d444b){_0x30d39a=_0x30d39a-0x1c8;const _0x5da311=a103_0x5da3();let _0x5b8d05=_0x5da311[_0x30d39a];return _0x5b8d05;}function env(_0x105dbd){return productEnv(_0x105dbd);}async function buildAuth(_0x14677f){const _0x2dbf69=a103_0x30d6b2,_0x3a722e='',_0xf66cd4=!!_0x14677f[_0x2dbf69(0x20f)];return{'cookie':_0x3a722e,'isLoggedIn':_0xf66cd4,async 'getOrLogin'(){const _0x51d03f=_0x2dbf69;if(_0xf66cd4)return _0x3a722e;throw CliErrors[_0x51d03f(0x1e9)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -339,6 +339,81 @@ export interface LoginUserInfo {
|
|
|
339
339
|
email?: string | null;
|
|
340
340
|
[key: string]: unknown;
|
|
341
341
|
}
|
|
342
|
+
/** Runtime approval task returned by the current task APIs. */
|
|
343
|
+
export interface ApprovalFlowTaskItem {
|
|
344
|
+
id?: string;
|
|
345
|
+
name?: string;
|
|
346
|
+
taskDefinitionKey?: string;
|
|
347
|
+
assignee?: string;
|
|
348
|
+
assigneeName?: string;
|
|
349
|
+
transferCandidates?: Array<{
|
|
350
|
+
userId?: string;
|
|
351
|
+
userName?: string;
|
|
352
|
+
}>;
|
|
353
|
+
processInstanceId?: string;
|
|
354
|
+
flowCode?: string;
|
|
355
|
+
flowName?: string;
|
|
356
|
+
appCode?: string;
|
|
357
|
+
initiatorUserId?: string;
|
|
358
|
+
initiatorUsername?: string;
|
|
359
|
+
datasetCode?: string;
|
|
360
|
+
pageId?: number;
|
|
361
|
+
operationType?: string;
|
|
362
|
+
dataId?: unknown;
|
|
363
|
+
detailUrl?: string;
|
|
364
|
+
taskStatus?: string;
|
|
365
|
+
processStatus?: string;
|
|
366
|
+
createTime?: number;
|
|
367
|
+
endTime?: number;
|
|
368
|
+
processStartTime?: number;
|
|
369
|
+
[key: string]: unknown;
|
|
370
|
+
}
|
|
371
|
+
/** Page envelope returned by `GET /api/approve/todo`. */
|
|
372
|
+
export interface ApprovalFlowTodoPage {
|
|
373
|
+
records: ApprovalFlowTaskItem[];
|
|
374
|
+
currentPage?: number;
|
|
375
|
+
pageSize?: number;
|
|
376
|
+
totalCount?: number;
|
|
377
|
+
totalPages?: number;
|
|
378
|
+
[key: string]: unknown;
|
|
379
|
+
}
|
|
380
|
+
/** Task detail returned by `GET /api/flow/task/{taskId}`. */
|
|
381
|
+
export interface ApprovalFlowTaskDetail {
|
|
382
|
+
id?: string;
|
|
383
|
+
name?: string;
|
|
384
|
+
taskDefinitionKey?: string;
|
|
385
|
+
assignee?: string;
|
|
386
|
+
assigneeName?: string;
|
|
387
|
+
processInstanceId?: string;
|
|
388
|
+
appCode?: string;
|
|
389
|
+
dataId?: unknown;
|
|
390
|
+
createTime?: number;
|
|
391
|
+
endTime?: number;
|
|
392
|
+
status?: string;
|
|
393
|
+
canHandle?: boolean;
|
|
394
|
+
canCancel?: boolean;
|
|
395
|
+
transferCandidates?: Array<{
|
|
396
|
+
userId?: string;
|
|
397
|
+
userName?: string;
|
|
398
|
+
}>;
|
|
399
|
+
formData?: Record<string, unknown>;
|
|
400
|
+
identityLinks?: Array<Record<string, unknown>>;
|
|
401
|
+
timeline?: Record<string, unknown>;
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
}
|
|
404
|
+
/** Request body accepted by `POST /api/flow/approve`. */
|
|
405
|
+
export interface ApprovalFlowApproveInput {
|
|
406
|
+
taskId: string;
|
|
407
|
+
approved: boolean;
|
|
408
|
+
comment?: string;
|
|
409
|
+
variables?: Record<string, unknown>;
|
|
410
|
+
}
|
|
411
|
+
/** Request body accepted by `POST /api/flow/task/transfer`. */
|
|
412
|
+
export interface ApprovalFlowTransferInput {
|
|
413
|
+
taskId: string;
|
|
414
|
+
targetUserId: string;
|
|
415
|
+
comment?: string;
|
|
416
|
+
}
|
|
342
417
|
export type RuntimeScheduleKind = "CRON" | "ONCE";
|
|
343
418
|
export type RuntimeScheduleModel = "kimi/k3" | "deepseek-v4-flash-0731" | "deepseek-v4-pro-0813";
|
|
344
419
|
export type RuntimeScheduleTaskStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
@@ -377,6 +452,14 @@ export interface RuntimeScheduleRun {
|
|
|
377
452
|
taskId: string;
|
|
378
453
|
status: "QUEUED";
|
|
379
454
|
}
|
|
455
|
+
/** Lists the current user's approval tasks. */
|
|
456
|
+
export declare function listApprovalTodo(appCode: string, currentPage?: number, pageSize?: number): Promise<ApprovalFlowTodoPage>;
|
|
457
|
+
/** Fetches one approval task detail for the AccessKey-authenticated user. */
|
|
458
|
+
export declare function getApprovalTaskDetail(taskId: string): Promise<ApprovalFlowTaskDetail>;
|
|
459
|
+
/** Approves or rejects one approval task. */
|
|
460
|
+
export declare function approveApprovalTask(input: ApprovalFlowApproveInput): Promise<unknown>;
|
|
461
|
+
/** Transfers one approval task to a Runtime-authorized target user. */
|
|
462
|
+
export declare function transferApprovalTask(input: ApprovalFlowTransferInput): Promise<unknown>;
|
|
380
463
|
/** Fetches the current user's app list from the remote API. */
|
|
381
464
|
export declare function getMyApps(): Promise<RemoteAppItem[]>;
|
|
382
465
|
/**
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xb21472,_0x221f80){const _0x4d4832=a103_0x114a,_0x3d78d1=_0xb21472();while(!![]){try{const _0x2e3847=-parseInt(_0x4d4832(0x131))/0x1+parseInt(_0x4d4832(0x138))/0x2*(-parseInt(_0x4d4832(0xae))/0x3)+-parseInt(_0x4d4832(0x159))/0x4*(parseInt(_0x4d4832(0x161))/0x5)+parseInt(_0x4d4832(0xd9))/0x6+parseInt(_0x4d4832(0xea))/0x7+-parseInt(_0x4d4832(0xd7))/0x8+-parseInt(_0x4d4832(0x141))/0x9*(-parseInt(_0x4d4832(0xc0))/0xa);if(_0x2e3847===_0x221f80)break;else _0x3d78d1['push'](_0x3d78d1['shift']());}catch(_0x2cee1e){_0x3d78d1['push'](_0x3d78d1['shift']());}}}(a103_0x55e4,0xc61ef));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x5bb0c6){_activeAK=_0x5bb0c6||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x55e7f8){const _0x40f2c7=a103_0x114a;for(const _0x4c2e43 of _0x55e7f8){if(typeof _0x4c2e43==='string'&&_0x4c2e43[_0x40f2c7(0x120)]())return _0x4c2e43[_0x40f2c7(0x120)]();}return undefined;}async function decodeResponseBody(_0xd16730){const _0x3b4714=a103_0x114a;if(typeof _0xd16730['text']===_0x3b4714(0xfc))try{const _0xdc5761=await _0xd16730[_0x3b4714(0x11a)]();try{return{'isJson':!![],'data':parseLosslessJson(_0xdc5761),'text':_0xdc5761};}catch{return{'isJson':![],'text':_0xdc5761[_0x3b4714(0x120)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0xd16730['json']()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x41ccb5,_0x3034cd,_0x8a053f){const _0x4aa952=a103_0x114a,_0x10b58d=_0x3034cd&&typeof _0x3034cd==='object'?_0x3034cd:{},_0x3de21b=[_0x10b58d[_0x4aa952(0xad)],_0x10b58d[_0x4aa952(0x10e)]][_0x4aa952(0x109)](_0x261732=>Number(_0x261732)===0x1ad),_0x3f633d=createRateLimitError({'status':_0x41ccb5[_0x4aa952(0xad)]===0x1ad?_0x41ccb5[_0x4aa952(0xad)]:_0x3de21b??_0x41ccb5['status'],'errorCode':firstString(_0x10b58d[_0x4aa952(0x146)],typeof _0x10b58d[_0x4aa952(0x10e)]===_0x4aa952(0xd1)?_0x10b58d[_0x4aa952(0x10e)]:undefined),'message':firstString(_0x10b58d[_0x4aa952(0xf9)],_0x10b58d[_0x4aa952(0x152)],_0x10b58d[_0x4aa952(0x135)],_0x8a053f),'retryAfter':readRetryAfter(_0x41ccb5[_0x4aa952(0xf5)])??readRetryAfterSeconds(_0x3034cd)});if(_0x3f633d)throw _0x3f633d;}async function apiRequest(_0x4185c1,_0x81348b={}){const _0x528e7c=a103_0x114a,{method:method=_0x528e7c(0xe2),body:_0x8a6e03,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x528e7c(0x10a)}=_0x81348b,_0x1a95f8=_activeAK,_0x177d26=domain==='api'?getApiDomain():getRuntimeDomain();if(!_0x1a95f8)throw CliErrors[_0x528e7c(0x112)](_0x528e7c(0x130)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4b0845=''+_0x177d26+_0x4185c1,_0x3ccb3c={'X-User-AK':_0x1a95f8},_0x30a936=new AbortController(),_0x14242c=setTimeout(()=>_0x30a936[_0x528e7c(0x14a)](),timeout);try{const _0x2bd75e=await fetch(_0x4b0845,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x528e7c(0x118)],..._0x3ccb3c,...headers},'body':_0x8a6e03?JSON[_0x528e7c(0x13a)](_0x8a6e03):undefined,'signal':_0x30a936[_0x528e7c(0xdd)]}),_0x15b771=await decodeResponseBody(_0x2bd75e);if(!_0x15b771[_0x528e7c(0x114)]){throwIfRateLimited(_0x2bd75e,undefined,_0x15b771[_0x528e7c(0x11a)]);throw CliErrors[_0x528e7c(0xdf)](_0x528e7c(0x10c)+_0x2bd75e[_0x528e7c(0xad)]+')',_0x2bd75e[_0x528e7c(0xad)]>=0x190?_0x528e7c(0xd0):undefined);}const _0x44daeb=_0x15b771[_0x528e7c(0x14e)];throwIfRateLimited(_0x2bd75e,_0x44daeb);if(!_0x2bd75e['ok']||_0x44daeb[_0x528e7c(0xc4)]===![])throw CliErrors[_0x528e7c(0xdf)](_0x44daeb[_0x528e7c(0xf9)]||_0x44daeb[_0x528e7c(0x152)]||_0x528e7c(0xf7)+_0x2bd75e['status'],_0x44daeb[_0x528e7c(0x146)]?_0x528e7c(0xfb)+_0x44daeb[_0x528e7c(0x146)]:undefined);return _0x44daeb;}catch(_0x18f166){if(_0x18f166 instanceof Error&&_0x18f166[_0x528e7c(0x154)]===_0x528e7c(0x10d))throw CliErrors[_0x528e7c(0xdf)](_0x528e7c(0xcb)+_0x4b0845);throw _0x18f166;}finally{clearTimeout(_0x14242c);}}async function apiBinaryRequest(_0x281424,_0x4d4729={}){const _0x89ee89=a103_0x114a,{method:method=_0x89ee89(0xe2),headers:headers={},timeout:timeout=0x7530}=_0x4d4729,_0x5a681b=_activeAK,_0x2572c0=getRuntimeDomain();if(!_0x5a681b)throw CliErrors[_0x89ee89(0x112)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x89ee89(0xb1)]+'.');const _0x2056c7=''+_0x2572c0+_0x281424,_0x5eb734=new AbortController(),_0x8a5ae3=setTimeout(()=>_0x5eb734['abort'](),timeout);try{const _0x253766=await fetch(_0x2056c7,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x89ee89(0x118)],'X-User-AK':_0x5a681b,...headers},'signal':_0x5eb734[_0x89ee89(0xdd)]});if(!_0x253766['ok']){const _0x56baa4=await decodeResponseBody(_0x253766),_0x2d5c9a=_0x56baa4[_0x89ee89(0x14e)]&&typeof _0x56baa4[_0x89ee89(0x14e)]===_0x89ee89(0x132)?_0x56baa4[_0x89ee89(0x14e)]:{},_0x2999bb=firstString(_0x2d5c9a[_0x89ee89(0xf9)],_0x2d5c9a[_0x89ee89(0x152)],_0x2d5c9a[_0x89ee89(0x146)],_0x56baa4['text']);throwIfRateLimited(_0x253766,_0x56baa4[_0x89ee89(0x14e)],_0x2999bb);throw CliErrors['apiError'](_0x2999bb||_0x89ee89(0xf7)+_0x253766[_0x89ee89(0xad)],_0x89ee89(0xdb)+_0x2056c7);}return Buffer[_0x89ee89(0xd3)](await _0x253766[_0x89ee89(0xd2)]());}catch(_0x11e472){if(_0x11e472 instanceof Error&&_0x11e472[_0x89ee89(0x154)]===_0x89ee89(0x10d))throw CliErrors[_0x89ee89(0xdf)](_0x89ee89(0xcb)+_0x2056c7);throw _0x11e472;}finally{clearTimeout(_0x8a5ae3);}}async function apiFormRequest(_0x1938e0,_0x505e2a,_0x4601c3={}){const _0x368cd7=a103_0x114a,{timeout:timeout=0x7530}=_0x4601c3,_0x577769=_activeAK,_0x2f2a5b=getRuntimeDomain();if(!_0x577769)throw CliErrors['authRequired'](_0x368cd7(0x130)+PRODUCT_CONFIG[_0x368cd7(0xb1)]+'.');const _0x336a80=''+_0x2f2a5b+_0x1938e0,_0x4d5e45=new AbortController(),_0x5a1cb9=setTimeout(()=>_0x4d5e45['abort'](),timeout);try{const _0x394cd8=await fetch(_0x336a80,{'method':_0x368cd7(0xe6),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x577769},'body':_0x505e2a,'signal':_0x4d5e45[_0x368cd7(0xdd)]}),_0x33a4d4=await decodeResponseBody(_0x394cd8);if(!_0x33a4d4[_0x368cd7(0x114)]){throwIfRateLimited(_0x394cd8,undefined,_0x33a4d4[_0x368cd7(0x11a)]);throw CliErrors[_0x368cd7(0xdf)](_0x368cd7(0x10c)+_0x394cd8[_0x368cd7(0xad)]+')',_0x394cd8[_0x368cd7(0xad)]>=0x190?_0x368cd7(0xd0):undefined);}const _0x5305ca=_0x33a4d4[_0x368cd7(0x14e)];throwIfRateLimited(_0x394cd8,_0x5305ca);if(!_0x394cd8['ok']||_0x5305ca[_0x368cd7(0xc4)]===![])throw CliErrors['apiError'](_0x5305ca['errorMsg']||_0x5305ca[_0x368cd7(0x152)]||_0x368cd7(0xf7)+_0x394cd8[_0x368cd7(0xad)],_0x5305ca[_0x368cd7(0x146)]?_0x368cd7(0xfb)+_0x5305ca[_0x368cd7(0x146)]:undefined);return _0x5305ca;}catch(_0x30e315){if(_0x30e315 instanceof Error&&_0x30e315[_0x368cd7(0x154)]===_0x368cd7(0x10d))throw CliErrors[_0x368cd7(0xdf)](_0x368cd7(0xcb)+_0x336a80);throw _0x30e315;}finally{clearTimeout(_0x5a1cb9);}}async function toolboxRequest(_0x145fce,_0x5ade31,_0x5b8656={}){const _0x2db4c5=a103_0x114a,{method:method=_0x2db4c5(0xe2),headers:headers={},timeout:timeout=0x7530}=_0x5b8656,_0x82be0a=_activeAK;if(!_0x82be0a)throw CliErrors['authRequired'](_0x2db4c5(0x130)+PRODUCT_CONFIG[_0x2db4c5(0xb1)]+'.');const _0x1030d3=getApiDomain()[_0x2db4c5(0x12e)](/\/$/,''),_0x5aef9b=new URL(_0x145fce,_0x1030d3+_0x2db4c5(0xc5));if(_0x5ade31)for(const [_0x36553f,_0x55c35c]of Object[_0x2db4c5(0x140)](_0x5ade31)){_0x55c35c!==undefined&&_0x55c35c!==null&&_0x5aef9b[_0x2db4c5(0x148)]['set'](_0x36553f,String(_0x55c35c));}const _0x83ebc7=new AbortController(),_0x443f5c=setTimeout(()=>_0x83ebc7[_0x2db4c5(0x14a)](),timeout);try{const _0x12f7c6=await fetch(_0x5aef9b,{'method':method,'headers':{'Content-Type':_0x2db4c5(0xf8),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x82be0a,...headers},'signal':_0x83ebc7[_0x2db4c5(0xdd)]}),_0x2f4172=await decodeResponseBody(_0x12f7c6);if(!_0x2f4172[_0x2db4c5(0x114)]){throwIfRateLimited(_0x12f7c6,undefined,_0x2f4172[_0x2db4c5(0x11a)]);throw CliErrors[_0x2db4c5(0xdf)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x12f7c6[_0x2db4c5(0xad)]+')',_0x12f7c6[_0x2db4c5(0xad)]>=0x190?_0x2db4c5(0xd0):undefined);}const _0x2abe69=_0x2f4172['data'];throwIfRateLimited(_0x12f7c6,_0x2abe69);if(!_0x12f7c6['ok']){const _0x499c79=_0x2abe69&&typeof _0x2abe69===_0x2db4c5(0x132)?_0x2abe69:{};throw CliErrors[_0x2db4c5(0xdf)](_0x499c79[_0x2db4c5(0xf9)]||_0x499c79[_0x2db4c5(0x152)]||_0x2db4c5(0x105)+_0x12f7c6[_0x2db4c5(0xad)],_0x499c79[_0x2db4c5(0x146)]?'Toolbox\x20error\x20code:\x20'+_0x499c79[_0x2db4c5(0x146)]:undefined);}if(_0x2abe69&&typeof _0x2abe69===_0x2db4c5(0x132)&&'success'in _0x2abe69&&typeof _0x2abe69[_0x2db4c5(0xc4)]===_0x2db4c5(0x162)){const _0x1c8aff=_0x2abe69;if(!_0x1c8aff[_0x2db4c5(0xc4)])throw CliErrors['apiError'](_0x1c8aff['errorMsg']||_0x1c8aff[_0x2db4c5(0x152)]||_0x2db4c5(0x158),_0x1c8aff[_0x2db4c5(0x146)]?'Toolbox\x20error\x20code:\x20'+_0x1c8aff['errorCode']:undefined);return _0x1c8aff[_0x2db4c5(0x14e)];}return _0x2abe69;}catch(_0xb6675e){if(_0xb6675e instanceof Error&&_0xb6675e['name']===_0x2db4c5(0x10d))throw CliErrors[_0x2db4c5(0xdf)](_0x2db4c5(0xcb)+_0x5aef9b[_0x2db4c5(0x143)]());throw _0xb6675e;}finally{clearTimeout(_0x443f5c);}}async function skillHubJsonRequest(_0x40f3c8,_0x206e0e={}){const _0x184549=a103_0x114a,{method:method='GET',query:_0x4992e0,body:_0x35b753,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x206e0e,_0x541089=_activeAK;if(!_0x541089)throw CliErrors[_0x184549(0x112)](_0x184549(0x130)+PRODUCT_CONFIG[_0x184549(0xb1)]+'.');const _0x584589=getSkillDomain()['replace'](/\/$/,''),_0x250101=new URL(_0x40f3c8,_0x584589+'/');if(_0x4992e0)for(const [_0x561606,_0x10161f]of Object[_0x184549(0x140)](_0x4992e0)){_0x10161f!==undefined&&_0x10161f!==null&&_0x250101[_0x184549(0x148)][_0x184549(0x14d)](_0x561606,String(_0x10161f));}const _0x85a245=new AbortController(),_0x174b33=setTimeout(()=>_0x85a245[_0x184549(0x14a)](),timeout);try{const _0x198c91=await fetch(_0x250101[_0x184549(0x143)](),{'method':method,'headers':{'Accept':_0x184549(0xf8),'X-Invoke-Source':PRODUCT_CONFIG[_0x184549(0x118)],'X-User-AK':_0x541089,...headers},'body':_0x35b753,'signal':_0x85a245[_0x184549(0xdd)]}),_0xbca95c=await decodeResponseBody(_0x198c91);if(!_0xbca95c[_0x184549(0x114)]){if(allowNotFound&&_0x198c91[_0x184549(0xad)]===0x194)return undefined;throwIfRateLimited(_0x198c91,undefined,_0xbca95c[_0x184549(0x11a)]);throw CliErrors[_0x184549(0xdf)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x198c91[_0x184549(0xad)]+')',_0x198c91['status']>=0x190?_0x184549(0xd0):undefined);}const _0x41d336=_0xbca95c[_0x184549(0x14e)];throwIfRateLimited(_0x198c91,_0x41d336);if(allowNotFound&&isSkillHubNotFoundResponse(_0x198c91[_0x184549(0xad)],_0x41d336))return undefined;const _0x4830f3=!_0x198c91['ok']||_0x41d336?.[_0x184549(0xc4)]===![]||typeof _0x41d336?.[_0x184549(0x10e)]===_0x184549(0xda)&&_0x41d336[_0x184549(0x10e)]>=0x190;if(_0x4830f3)throw CliErrors[_0x184549(0xdf)](_0x41d336?.[_0x184549(0xf9)]||_0x41d336?.[_0x184549(0x152)]||_0x41d336?.[_0x184549(0x135)]||_0x184549(0xeb)+_0x198c91[_0x184549(0xad)],_0x41d336?.['errorCode']?_0x184549(0xba)+_0x41d336['errorCode']:undefined);return _0x41d336?.[_0x184549(0x14e)]??_0x41d336;}catch(_0x205b0f){if(_0x205b0f instanceof Error&&_0x205b0f['name']==='AbortError')throw CliErrors[_0x184549(0xdf)]('Request\x20timeout:\x20'+_0x250101['toString']());throw _0x205b0f;}finally{clearTimeout(_0x174b33);}}function isSkillHubNotFoundResponse(_0x3e96d8,_0x3e53d4){const _0x374599=a103_0x114a;if(_0x3e96d8===0x194||_0x3e53d4?.[_0x374599(0x10e)]===0x194)return!![];if(_0x3e96d8!==0x190&&_0x3e53d4?.[_0x374599(0x10e)]!==0x190)return![];const _0x5cc22a=[_0x3e53d4?.[_0x374599(0x135)],_0x3e53d4?.[_0x374599(0x152)],_0x3e53d4?.['errorMsg'],_0x3e53d4?.[_0x374599(0x144)]][_0x374599(0x128)](_0x340990=>typeof _0x340990===_0x374599(0xd1))[_0x374599(0x139)]('\x20');return/skill not found\b/i['test'](_0x5cc22a);}async function skillHubBinaryRequest(_0x587572,_0x4c4cff={}){const _0x3e9c87=a103_0x114a,{query:_0x2e88e4,headers:headers={},timeout:timeout=0x7530}=_0x4c4cff,_0x2c2245=_activeAK;if(!_0x2c2245)throw CliErrors[_0x3e9c87(0x112)](_0x3e9c87(0x130)+PRODUCT_CONFIG[_0x3e9c87(0xb1)]+'.');const _0x529c06=getSkillDomain()['replace'](/\/$/,''),_0x3ce17f=new URL(_0x587572,_0x529c06+'/');if(_0x2e88e4)for(const [_0x18d7c6,_0x99950e]of Object[_0x3e9c87(0x140)](_0x2e88e4)){_0x99950e!==undefined&&_0x99950e!==null&&_0x3ce17f[_0x3e9c87(0x148)][_0x3e9c87(0x14d)](_0x18d7c6,String(_0x99950e));}const _0x155a64=new AbortController(),_0xd729a6=setTimeout(()=>_0x155a64['abort'](),timeout);try{const _0x51ffc8=await fetch(_0x3ce17f['toString'](),{'method':_0x3e9c87(0xe2),'headers':{'Accept':_0x3e9c87(0xe8),'X-Invoke-Source':PRODUCT_CONFIG[_0x3e9c87(0x118)],'X-User-AK':_0x2c2245,...headers},'signal':_0x155a64[_0x3e9c87(0xdd)]});if(!_0x51ffc8['ok']){const _0x367c2b=await decodeResponseBody(_0x51ffc8),_0x23796a=_0x367c2b[_0x3e9c87(0x14e)]&&typeof _0x367c2b['data']===_0x3e9c87(0x132)?_0x367c2b[_0x3e9c87(0x14e)]:{},_0x15e40f=firstString(_0x23796a[_0x3e9c87(0xf9)],_0x23796a[_0x3e9c87(0x152)],_0x23796a[_0x3e9c87(0x135)],_0x23796a[_0x3e9c87(0x146)],_0x367c2b[_0x3e9c87(0x11a)]);throwIfRateLimited(_0x51ffc8,_0x367c2b[_0x3e9c87(0x14e)],_0x15e40f);throw CliErrors[_0x3e9c87(0xdf)](_0x15e40f||'SkillHub\x20API\x20error:\x20'+_0x51ffc8[_0x3e9c87(0xad)],_0x3e9c87(0xdb)+_0x3ce17f[_0x3e9c87(0x143)]());}return Buffer['from'](await _0x51ffc8[_0x3e9c87(0xd2)]());}catch(_0xb44703){if(_0xb44703 instanceof Error&&_0xb44703[_0x3e9c87(0x154)]===_0x3e9c87(0x10d))throw CliErrors[_0x3e9c87(0xdf)](_0x3e9c87(0xcb)+_0x3ce17f[_0x3e9c87(0x143)]());throw _0xb44703;}finally{clearTimeout(_0xd729a6);}}export async function getBffEndpointContract(_0xddfca2,_0x513c21){const _0x48b2af=a103_0x114a;if(_0x513c21===_0x48b2af(0xfe))throw CliErrors[_0x48b2af(0x101)](_0x48b2af(0x11d)+_0xddfca2+_0x48b2af(0xf1)+_0x513c21);const _0x141a27=await apiRequest('/client/bff/endpoint/'+encodeURIComponent(_0xddfca2)+'/'+encodeURIComponent(_0x513c21)),_0x30f1ad=_0x141a27[_0x48b2af(0x14e)];if(!_0x30f1ad||typeof _0x30f1ad!==_0x48b2af(0x132)||Array[_0x48b2af(0x155)](_0x30f1ad)||_0x30f1ad[_0x48b2af(0x12d)]!==_0xddfca2||_0x30f1ad['functionName']!==_0x513c21)throw CliErrors[_0x48b2af(0x101)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0xddfca2+_0x48b2af(0xf1)+_0x513c21);return{'appCode':_0x30f1ad[_0x48b2af(0x12d)],'functionName':_0x30f1ad[_0x48b2af(0x166)],'description':_0x30f1ad[_0x48b2af(0x111)],'version':_0x30f1ad[_0x48b2af(0x151)],'gmtModified':_0x30f1ad[_0x48b2af(0x122)]};}export async function getSqlQueryInfo(_0x467646,_0x518078){const _0x46b209=a103_0x114a,_0x1c6bee=await apiRequest(_0x46b209(0xb6),{'method':'POST','body':{'appCode':_0x467646,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x518078}}),_0x13b14c=_0x1c6bee['data'],_0x13b3da=_0x13b14c&&typeof _0x13b14c===_0x46b209(0x132)&&_0x46b209(0x12f)in _0x13b14c?_0x13b14c[_0x46b209(0x12f)]?.[0x0]:_0x13b14c&&typeof _0x13b14c===_0x46b209(0x132)&&_0x46b209(0xb4)in _0x13b14c?_0x13b14c:undefined;if(!_0x13b3da)throw CliErrors[_0x46b209(0x101)](_0x46b209(0xe0)+_0x518078);return _0x13b3da;}function isRemoteAppItem(_0xb45073){const _0x212e27=a103_0x114a;return!!_0xb45073&&typeof _0xb45073===_0x212e27(0x132)&&typeof _0xb45073[_0x212e27(0x12d)]==='string'&&typeof _0xb45073[_0x212e27(0x15f)]===_0x212e27(0xd1);}function extractRemoteAppItems(_0x3cf0db){const _0x44863d=a103_0x114a;if(Array[_0x44863d(0x155)](_0x3cf0db))return _0x3cf0db[_0x44863d(0x128)](isRemoteAppItem);if(!_0x3cf0db||typeof _0x3cf0db!==_0x44863d(0x132))throw CliErrors[_0x44863d(0xdf)](_0x44863d(0x14f));const _0x5b1fa2=_0x3cf0db;if(Array[_0x44863d(0x155)](_0x5b1fa2[_0x44863d(0x12f)]))return _0x5b1fa2[_0x44863d(0x12f)][_0x44863d(0x128)](isRemoteAppItem);if(_0x5b1fa2[_0x44863d(0x14e)]&&typeof _0x5b1fa2[_0x44863d(0x14e)]===_0x44863d(0x132)){const _0x17233a=_0x5b1fa2[_0x44863d(0x14e)];if(Array[_0x44863d(0x155)](_0x17233a[_0x44863d(0x12f)]))return _0x17233a['tableData'][_0x44863d(0x128)](isRemoteAppItem);}throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x597e4b=a103_0x114a,_0x128546=await apiRequest(_0x597e4b(0x121));return extractRemoteAppItems(_0x128546[_0x597e4b(0x14e)]);}export async function getLoginUserInfo(){const _0x5b0cfc=a103_0x114a,_0x261bf9=await apiRequest(_0x5b0cfc(0x160));if(!_0x261bf9['data']||typeof _0x261bf9[_0x5b0cfc(0x14e)]!==_0x5b0cfc(0x132)||Array[_0x5b0cfc(0x155)](_0x261bf9[_0x5b0cfc(0x14e)]))throw CliErrors[_0x5b0cfc(0xdf)](_0x5b0cfc(0x124));return _0x261bf9[_0x5b0cfc(0x14e)];}export const USER_ACCOUNT_BIND_PATH='/client/user-accounts/bind';export async function bindExternalUserAccount(_0x2e58c5,_0x50110c){const _0x29fa36=a103_0x114a,_0x16ff1e=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':_0x29fa36(0xe6),'body':{'provider':_0x2e58c5,'accountId':_0x50110c}});return _0x16ff1e[_0x29fa36(0x14e)];}function runtimeSchedulePath(_0x3b3e9d,_0xb5e823=''){const _0xc25b6b=a103_0x114a;return _0xc25b6b(0x13b)+encodeURIComponent(_0x3b3e9d)+'/schedules'+_0xb5e823;}export async function validateRuntimeSchedule(_0x576474,_0x14ea8c){const _0x36d92a=a103_0x114a,_0x3e9b85=await apiRequest(runtimeSchedulePath(_0x576474,'/validate'),{'method':_0x36d92a(0xe6),'body':_0x14ea8c});return _0x3e9b85[_0x36d92a(0x14e)];}export async function createRuntimeSchedule(_0x3ce736,_0x2dc1c0){const _0x1397bf=a103_0x114a,_0x1a255d=await apiRequest(runtimeSchedulePath(_0x3ce736),{'method':_0x1397bf(0xe6),'body':_0x2dc1c0});return _0x1a255d[_0x1397bf(0x14e)];}export async function listRuntimeSchedules(_0x26c36c,_0x597a13){const _0x158009=a103_0x114a,_0x44f42e=new URLSearchParams();_0x44f42e[_0x158009(0x14d)](_0x158009(0xaf),_0x597a13['kind']);if(_0x597a13['limit']!==undefined)_0x44f42e[_0x158009(0x14d)]('limit',String(_0x597a13[_0x158009(0x164)]));if(_0x597a13[_0x158009(0x119)])_0x44f42e[_0x158009(0x14d)]('cursor',_0x597a13['cursor']);const _0x2b2f89=_0x44f42e[_0x158009(0xe7)]>0x0?'?'+_0x44f42e[_0x158009(0x143)]():'',_0x114198=await apiRequest(''+runtimeSchedulePath(_0x26c36c)+_0x2b2f89);return _0x114198[_0x158009(0x14e)];}export async function getRuntimeSchedule(_0x1720fa,_0x529691){const _0x4ac786=a103_0x114a,_0x454152=await apiRequest(runtimeSchedulePath(_0x1720fa,'/'+encodeURIComponent(_0x529691)));return _0x454152[_0x4ac786(0x14e)];}export async function deleteRuntimeSchedule(_0x404874,_0x38df4a){const _0x4818e1=a103_0x114a,_0x35f7a2=await apiRequest(runtimeSchedulePath(_0x404874,'/'+encodeURIComponent(_0x38df4a)),{'method':_0x4818e1(0xb8)});return _0x35f7a2[_0x4818e1(0x14e)];}export async function runRuntimeSchedule(_0x151c89,_0xad969){const _0x497bd5=a103_0x114a,_0x4a476e=await apiRequest(runtimeSchedulePath(_0x151c89,'/'+encodeURIComponent(_0xad969)+'/run'),{'method':_0x497bd5(0xe6)});return _0x4a476e[_0x497bd5(0x14e)];}export async function listDatasets(_0x28873f,_0x51a6a0){const _0x2c8ff6=a103_0x114a,_0x46223e=await apiRequest(_0x2c8ff6(0x11f),{'method':_0x2c8ff6(0xe6),'body':{'appCode':_0x28873f,..._0x51a6a0?.[_0x2c8ff6(0x10e)]&&{'code':_0x51a6a0[_0x2c8ff6(0x10e)]},..._0x51a6a0?.[_0x2c8ff6(0x154)]&&{'name':_0x51a6a0[_0x2c8ff6(0x154)]}}});return extractList(_0x46223e['data']);}export async function getDatasetDetail(_0x47eda4){const _0x822386=a103_0x114a,_0x37b1ed=await apiRequest(_0x822386(0x137)+encodeURIComponent(_0x47eda4));return _0x37b1ed[_0x822386(0x14e)];}export async function getDatasetSdkUsageDoc(_0x35a18d,_0x308fb8){const _0x297a40=a103_0x114a,_0x4c0e42=await toolboxRequest('api-doc-generator',{'datasetCode':_0x35a18d,'appCode':_0x308fb8});return typeof _0x4c0e42?.[_0x297a40(0xd6)]===_0x297a40(0xd1)?_0x4c0e42[_0x297a40(0xd6)]:'';}export async function uploadRuntimeFile(_0x425798,_0x132c0d){const _0x2b4b3e=a103_0x114a,_0x21ca40=await readFile(_0x132c0d),_0x112e70=new FormData();_0x112e70['append'](_0x2b4b3e(0x12d),_0x425798),_0x112e70['append'](_0x2b4b3e(0xdc),new Blob([new Uint8Array(_0x21ca40)]),basename(_0x132c0d));const _0x5215b6=await apiFormRequest(_0x2b4b3e(0xcf),_0x112e70);return _0x5215b6[_0x2b4b3e(0x14e)];}export async function queryRuntimeFileUrl(_0x4d2c66,_0x57811e={}){const _0x4d17c5=a103_0x114a,_0x1358cf=await apiRequest(_0x4d17c5(0xcd),{'method':_0x4d17c5(0xe6),'body':{'filePath':_0x4d2c66,'downloadFlag':_0x57811e[_0x4d17c5(0xed)]??![],..._0x57811e[_0x4d17c5(0x149)]?{'longTerm':!![]}:{}}});return _0x1358cf['data'];}export async function recognizeRuntimeOcr(_0x1c3a2b,_0xc38278){const _0x365ecb=a103_0x114a,_0x4d9e4e=await apiRequest(_0x365ecb(0x165),{'method':'POST','body':{'appCode':_0x1c3a2b,'url':_0xc38278[_0x365ecb(0xbf)],'type':_0xc38278[_0x365ecb(0xd5)]}});return _0x4d9e4e[_0x365ecb(0x14e)];}export async function getRuntimeAppConfigByKey(_0x36146f,_0x91744f){const _0x55cd79=a103_0x114a,_0x442b2a=new URLSearchParams({'appCode':_0x36146f,'key':_0x91744f}),_0x54a4cf=await apiRequest(_0x55cd79(0xbb)+_0x442b2a[_0x55cd79(0x143)]());if(typeof _0x54a4cf[_0x55cd79(0x14e)]!==_0x55cd79(0xd1))throw CliErrors[_0x55cd79(0x101)](_0x55cd79(0x10b)+_0x91744f);return _0x54a4cf[_0x55cd79(0x14e)];}export async function listNotificationChannelConfigs(_0x2c939d,_0x34caac){const _0x180580=a103_0x114a,_0x477040=new URLSearchParams({'appCode':_0x2c939d,'channelType':_0x34caac}),_0x505f5c=await apiRequest(_0x180580(0x153)+_0x477040['toString']());if(!Array[_0x180580(0x155)](_0x505f5c['data']))throw CliErrors[_0x180580(0xdf)](_0x180580(0xc2),_0x180580(0xf0));return _0x505f5c[_0x180580(0x14e)];}export async function listRuntimeArtifacts(_0x3ad215,_0x12889c){const _0x2b3767=a103_0x114a,_0xe325b7=new URLSearchParams({'appCode':_0x3ad215});if(_0x12889c?.[_0x2b3767(0xaa)])_0xe325b7['set'](_0x2b3767(0xaa),_0x12889c[_0x2b3767(0xaa)]);if(_0x12889c?.[_0x2b3767(0x108)])_0xe325b7[_0x2b3767(0x14d)](_0x2b3767(0x108),_0x12889c[_0x2b3767(0x108)]);if(_0x12889c?.[_0x2b3767(0x11c)]!==undefined)_0xe325b7[_0x2b3767(0x14d)]('favorite',String(_0x12889c[_0x2b3767(0x11c)]));const _0xece138=await apiRequest(_0x2b3767(0xff)+_0xe325b7[_0x2b3767(0x143)]());return Array[_0x2b3767(0x155)](_0xece138[_0x2b3767(0x14e)])?_0xece138[_0x2b3767(0x14e)]:[];}export async function getRuntimeArtifact(_0x56c38a,_0x2c8de4){const _0x3d7442=a103_0x114a,_0x48bf0b=await apiRequest(_0x3d7442(0xf2)+_0x56c38a+_0x3d7442(0x147)+encodeURIComponent(_0x2c8de4));if(!_0x48bf0b['data'])throw CliErrors[_0x3d7442(0x101)](_0x3d7442(0xcc)+_0x56c38a);return _0x48bf0b[_0x3d7442(0x14e)];}export async function createRuntimeArtifact(_0x47dd22,_0x55451e){const _0x2cb9f1=a103_0x114a,_0x26dd50=await apiRequest(_0x2cb9f1(0x115),{'method':_0x2cb9f1(0xe6),'body':{'appCode':_0x47dd22,..._0x55451e}});return _0x26dd50['data'];}export async function updateRuntimeArtifact(_0xa0225c,_0x3623b6,_0xb38a96){const _0x2f90d5=a103_0x114a,_0x4b9d29=await apiRequest(_0x2f90d5(0xf2)+_0xa0225c+_0x2f90d5(0x14b),{'method':_0x2f90d5(0xe6),'body':{'appCode':_0x3623b6,..._0xb38a96}});return _0x4b9d29[_0x2f90d5(0x14e)];}export async function listPersonalBffs(_0x4051a9){const _0x5a227f=a103_0x114a,_0x4e4133=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x4051a9));return Array[_0x5a227f(0x155)](_0x4e4133[_0x5a227f(0x14e)])?_0x4e4133[_0x5a227f(0x14e)]:[];}export async function getPersonalBff(_0x1dc6a7,_0x50a4de){const _0x1bf00d=a103_0x114a,_0x24945f=await apiRequest('/client/runtime-bff/personal/'+_0x1dc6a7+_0x1bf00d(0x147)+encodeURIComponent(_0x50a4de));if(!_0x24945f[_0x1bf00d(0x14e)])throw CliErrors['validation'](_0x1bf00d(0xfd)+_0x1dc6a7);return _0x24945f[_0x1bf00d(0x14e)];}export async function createPersonalBff(_0x2a4ab1,_0x22a524){const _0x1d28f8=a103_0x114a,_0xc38c3d=await apiRequest(_0x1d28f8(0xd4),{'method':_0x1d28f8(0xe6),'body':{'appCode':_0x2a4ab1,..._0x22a524}});return _0xc38c3d[_0x1d28f8(0x14e)];}function a103_0x114a(_0x2c67f8,_0x5c9151){_0x2c67f8=_0x2c67f8-0xa7;const _0x55e4f0=a103_0x55e4();let _0x114acd=_0x55e4f0[_0x2c67f8];return _0x114acd;}export async function updatePersonalBff(_0xf21533,_0x59e351,_0x5bdb22){const _0x3a7fbf=a103_0x114a,_0x5bfef0=await apiRequest(_0x3a7fbf(0x14c)+_0xf21533+_0x3a7fbf(0x14b),{'method':'POST','body':{'appCode':_0x59e351,..._0x5bdb22}});return _0x5bfef0[_0x3a7fbf(0x14e)];}export async function executePersonalBff(_0x360120,_0x1e6c37,_0x2d8cdf){const _0x499aa7=a103_0x114a,_0x1e22ed=await apiRequest(_0x499aa7(0x14c)+_0x360120+_0x499aa7(0x123)+encodeURIComponent(_0x1e6c37),{'method':_0x499aa7(0xe6),'body':_0x2d8cdf});return _0x1e22ed['data'];}export async function listPersonalKnowledgeBaseItems(_0xf98fc6){const _0xf4a3a6=a103_0x114a,_0x14b978=await apiRequest(_0xf4a3a6(0xe1)+encodeURIComponent(_0xf98fc6));return Array['isArray'](_0x14b978['data'])?_0x14b978[_0xf4a3a6(0x14e)]:[];}export async function getPersonalKnowledgeBaseItem(_0x453582,_0x5e4d2c){const _0x4eaaa9=a103_0x114a,_0x54ebf5=await apiRequest(_0x4eaaa9(0xf4)+_0x453582+_0x4eaaa9(0x147)+encodeURIComponent(_0x5e4d2c));if(!_0x54ebf5[_0x4eaaa9(0x14e)])throw CliErrors[_0x4eaaa9(0x101)](_0x4eaaa9(0xbd)+_0x453582);return _0x54ebf5[_0x4eaaa9(0x14e)];}export async function createPersonalKnowledgeBaseItem(_0x6fc6d8,_0x5ce4d9){const _0x2b1e92=a103_0x114a,_0x4e751a=await apiRequest(_0x2b1e92(0xec),{'method':_0x2b1e92(0xe6),'body':{'appCode':_0x6fc6d8,..._0x5ce4d9}});return _0x4e751a[_0x2b1e92(0x14e)];}export async function updatePersonalKnowledgeBaseItem(_0x13653d,_0x1e73db,_0x23f015){const _0x38deb6=a103_0x114a,_0x5d58b5=await apiRequest(_0x38deb6(0xf4)+_0x13653d+_0x38deb6(0x14b),{'method':_0x38deb6(0xe6),'body':{'appCode':_0x1e73db,..._0x23f015}});return _0x5d58b5[_0x38deb6(0x14e)];}export async function getRuntimeSkillByCode(_0x3b1daa,_0x2992d4){const _0x1fdffa=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x3b1daa)+'/'+encodeURIComponent(_0x2992d4),{'allowNotFound':!![]});return _0x1fdffa?skillHubRuntimeDetailToRuntimeSkill(_0x1fdffa):undefined;}export async function listRuntimeSkills(_0x4abe95){const _0x5405be=a103_0x114a,_0x1a5c3f=await skillHubJsonRequest(_0x5405be(0x163)+encodeURIComponent(_0x4abe95[_0x5405be(0x12d)])+_0x5405be(0xa9),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x4abe95[_0x5405be(0x12d)],_0x1a5c3f,_0x4abe95[_0x5405be(0xc8)]??_0x5405be(0x13e),_0x4abe95[_0x5405be(0x10e)]);}export async function listPersonalRuntimeSkills(_0x4c6aa2){const _0x20fd31=a103_0x114a;return(await listRuntimeSkills({'appCode':_0x4c6aa2,'scope':'personal'}))[_0x20fd31(0x12a)];}export async function listCompanyRuntimeSkills(_0x37abce){return(await listRuntimeSkills({'appCode':_0x37abce,'scope':'company'}))['company'];}export async function listVisibleRuntimeSkills(_0x16c06f){const _0xcd5809=a103_0x114a;return(await listRuntimeSkills({'appCode':_0x16c06f,'scope':_0xcd5809(0x13e)}))[_0xcd5809(0x125)];}export async function createPersonalRuntimeSkill(_0x43ddad,_0x2fb36d,_0x1a12a7={}){const _0x4f7776=a103_0x114a;return publishRuntimeSkill(_0x43ddad,_0x2fb36d,{'visibility':'PRIVATE','confirmWarnings':_0x1a12a7[_0x4f7776(0x103)]});}export async function updatePersonalRuntimeSkill(_0x5643e1,_0x1d0a62,_0x2a1a05,_0x4ad202={}){const _0x2e5abf=a103_0x114a;return publishRuntimeSkill(_0x1d0a62,{..._0x2a1a05,'skillCode':_0x2a1a05[_0x2e5abf(0x145)]??_0x5643e1},{'visibility':_0x2e5abf(0xb9),'confirmWarnings':_0x4ad202[_0x2e5abf(0x103)]});}export async function publishCompanyRuntimeSkill(_0x1135b9,_0xe546c9,_0x32a5be={}){const _0x1f2178=a103_0x114a;return publishRuntimeSkill(_0x1135b9,_0xe546c9,{'visibility':_0x1f2178(0x113),'confirmWarnings':_0x32a5be[_0x1f2178(0x103)]});}export async function validateRuntimeSkillPublish(_0x4e8182,_0x3a300c,_0x611085){const _0x5c781f=a103_0x114a,_0x1d3e91=buildRuntimeSkillPublishForm(_0x3a300c,_0x611085['visibility']),_0x26f440=await skillHubJsonRequest(_0x5c781f(0xee)+encodeURIComponent(_0x4e8182)+'/publish/validate',{'method':_0x5c781f(0xe6),'body':_0x1d3e91});return assertJointDiagramAcknowledged(_0x3a300c[_0x5c781f(0x116)],_0x26f440[_0x5c781f(0x15a)],_0x5c781f(0x101)),{'valid':_0x26f440[_0x5c781f(0xe4)]===!![],'errors':Array['isArray'](_0x26f440[_0x5c781f(0x13d)])?_0x26f440[_0x5c781f(0x13d)]:[],'warnings':Array['isArray'](_0x26f440[_0x5c781f(0x15b)])?_0x26f440[_0x5c781f(0x15b)]:[],'resolvedSlug':_0x26f440[_0x5c781f(0xf6)],'resolvedVersion':_0x26f440[_0x5c781f(0xbe)],'diagramValidated':_0x26f440[_0x5c781f(0x15a)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x38b747,_0x5b01a2,_0x2be528,_0xd0de4d,_0xe12e1e){const _0x227636=a103_0x114a;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x38b747,_0x5b01a2,_0x2be528,_0x227636(0xc9)),{'method':_0x227636(0xe6),'query':{'scope':_0xd0de4d},'headers':{'Content-Type':_0x227636(0xf8)},'body':JSON[_0x227636(0x13a)](_0xe12e1e)});}export async function putRuntimeSkillVersionDiagram(_0x5e4a26,_0x3187a6,_0x2a20c7,_0x4c1ade,_0x5a0c3a){const _0x5433cd=a103_0x114a;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x5e4a26,_0x3187a6,_0x2a20c7),{'method':_0x5433cd(0x167),'query':{'scope':_0x4c1ade},'headers':{'Content-Type':_0x5433cd(0xf8)},'body':JSON[_0x5433cd(0x13a)](_0x5a0c3a)});}export async function getRuntimeSkillVersionDiagram(_0x2a23bc,_0x2abd4c,_0xe1bf12,_0x2fdd42){const _0x5cdec4=a103_0x114a,_0x3f6681=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x2a23bc,_0x2abd4c,_0xe1bf12),{'query':{'scope':_0x2fdd42}});if(typeof _0x3f6681['found']!==_0x5cdec4(0x162))throw CliErrors[_0x5cdec4(0xdf)]('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.');const _0x2c7c05=_0x3f6681[_0x5cdec4(0xa8)];if(typeof _0x2c7c05!==_0x5cdec4(0xd1)||!/^sha256:[0-9a-f]{64}$/['test'](_0x2c7c05))throw CliErrors[_0x5cdec4(0xdf)]('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.',_0x5cdec4(0xe9));const _0x35504e=_0x3f6681[_0x5cdec4(0xac)];if(_0x3f6681[_0x5cdec4(0xbc)]&&(!Number[_0x5cdec4(0xc3)](_0x35504e)||Number(_0x35504e)<0x1))throw CliErrors['apiError'](_0x5cdec4(0x168));if(!_0x3f6681[_0x5cdec4(0xbc)]&&_0x35504e!==undefined&&_0x35504e!==null)throw CliErrors[_0x5cdec4(0xdf)](_0x5cdec4(0x102));const _0xf02422=_0x3f6681[_0x5cdec4(0xbc)]?Number(_0x35504e):null;return{..._0x3f6681,'sourceFingerprint':_0x2c7c05,'diagramRevision':_0xf02422,'expectedDiagramRevision':_0xf02422??0x0};}export async function downloadRuntimeSkillPackage(_0xf808f4,_0xe9c14e,_0x2cfc89,_0x379df9){const _0x53be41=a103_0x114a;void _0xf808f4;const _0x4a624d=_0x379df9?_0x53be41(0xee)+encodeURIComponent(_0x2cfc89)+'/'+encodeURIComponent(_0xe9c14e)+_0x53be41(0xe5)+encodeURIComponent(_0x379df9)+_0x53be41(0x12b):'/api/cli/v1/skills/'+encodeURIComponent(_0x2cfc89)+'/'+encodeURIComponent(_0xe9c14e)+_0x53be41(0x12b);return skillHubBinaryRequest(_0x4a624d);}async function publishRuntimeSkill(_0x5c054b,_0x12c256,_0x50815a){const _0x3f3673=a103_0x114a,_0x5d1f6d=buildRuntimeSkillPublishForm(_0x12c256,_0x50815a['visibility']),_0x14b3fe=await skillHubJsonRequest(_0x3f3673(0xee)+encodeURIComponent(_0x5c054b)+'/publish',{'method':_0x3f3673(0xe6),'query':{'confirmWarnings':_0x50815a[_0x3f3673(0x103)]===!![]?!![]:undefined},'body':_0x5d1f6d});return assertJointDiagramAcknowledged(_0x12c256[_0x3f3673(0x116)],_0x14b3fe[_0x3f3673(0xce)],_0x3f3673(0xf3)),{'appCode':_0x14b3fe['namespace']??_0x5c054b,'skillCode':_0x14b3fe[_0x3f3673(0x134)]??_0x12c256['skillCode']??'','skillName':_0x12c256['skillName']??_0x14b3fe['slug']??_0x12c256[_0x3f3673(0x145)],'description':_0x12c256['description'],'scope':skillHubVisibilityToScope(_0x14b3fe[_0x3f3673(0x15d)]??_0x50815a[_0x3f3673(0x15d)])??_0x3f3673(0x12a),'version':_0x14b3fe[_0x3f3673(0x151)]??_0x12c256[_0x3f3673(0x151)],'tags':_0x12c256[_0x3f3673(0x136)],'content':_0x12c256[_0x3f3673(0xc1)],'diagramBound':_0x14b3fe['diagramBound']===!![]};}function assertJointDiagramAcknowledged(_0xc1e28d,_0x1130db,_0xd51046){const _0x24084a=a103_0x114a;if(!_0xc1e28d||_0x1130db===!![])return;throw CliErrors[_0x24084a(0xdf)]('SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20'+_0xd51046+'.',_0x24084a(0x15c));}function buildRuntimeSkillPublishForm(_0x4814ce,_0x22539c){const _0x4979c2=a103_0x114a,_0x21e068=new FormData();return _0x21e068[_0x4979c2(0x14d)](_0x4979c2(0xdc),runtimeSkillPackageFile(_0x4814ce)),_0x4814ce[_0x4979c2(0xb5)]?.['trim']()&&_0x21e068[_0x4979c2(0x14d)](_0x4979c2(0xc7),_0x4814ce[_0x4979c2(0xb5)][_0x4979c2(0x120)]()),_0x21e068['set'](_0x4979c2(0x15d),_0x22539c),_0x4814ce[_0x4979c2(0x116)]&&_0x21e068[_0x4979c2(0x14d)](_0x4979c2(0x116),new Blob([JSON[_0x4979c2(0x13a)](_0x4814ce[_0x4979c2(0x116)])],{'type':'application/json'})),_0x21e068;}function runtimeSkillVersionDiagramPath(_0xc3eea,_0x23e734,_0x4f6c79,_0x289358=''){const _0x3b28a8=a103_0x114a;return _0x3b28a8(0xee)+encodeURIComponent(_0xc3eea)+'/'+encodeURIComponent(_0x23e734)+'/versions/'+encodeURIComponent(_0x4f6c79)+_0x3b28a8(0xfa)+_0x289358;}function a103_0x55e4(){const _0x15f20f=['skill','Toolbox\x20API\x20error:\x20','min','company','source','find','runtime','Invalid\x20app\x20config\x20value:\x20key=','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','AbortError','code','packageBase64','.zip','description','authRequired','NAMESPACE_ONLY','isJson','/client/artifact/create','diagram','/client/permit/role/delete','invokeSource','cursor','text','example','favorite','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/client/permit/dataset/list','/client/dataset/list','trim','/client/app/my-apps','gmtModified','/execute?appCode=','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','effective','/client/permit/resource/batch-save-dataset','namespace','filter','/client/permit/resource/batch-save-menu','personal','/download','/client/permit/dataset/permit-list','appCode','replace','tableData','Configure\x20accessKey\x20in\x20','1083432ntUhWF','object','currentPage','slug','msg','tags','/client/dataset/get-driven-data?code=','30816vSGGWk','join','stringify','/api/harness/apps/','CUSTOM','errors','all','/client/permit/role/update','entries','10714203HmpjPE','permitList','toString','error','skillCode','errorCode','?appCode=','searchParams','longTerm','abort','/update','/client/runtime-bff/personal/','set','data','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/client/menu/permit-list','version','message','/client/notification/channel-config/list?','name','isArray','roleName','/client/permit/user-role/update-user-list','Toolbox\x20API\x20error','8TrqvAy','diagramValidated','warnings','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','visibility','/client/dept/queryAppUser','appName','/client/user/loginUserInfo','1289830OEBcDR','boolean','/api/runtime/v1/namespaces/','limit','/client/ocr','functionName','PUT','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','headlineVersion','sourceFingerprint','/skills','artifactType','summary','diagramRevision','status','219cjiuCr','kind','items','newConfigFileName','/client/permit/page/save','ownerPreviewVersion','sqlCode','skillName','/client/sql/query','map','DELETE','PRIVATE','SkillHub\x20error\x20code:\x20','/client/app-config/getByKey?','found','Knowledge-base\x20entry\x20not\x20found:\x20id=','resolvedVersion','url','30FnxCaB','content','Invalid\x20notification\x20config\x20list\x20response.','isInteger','success','/api/node-toolbox/','base64','displayName','scope','/validate','/client/permit/resource/get-menu-list','Request\x20timeout:\x20','Artifact\x20not\x20found:\x20id=','/client/queryFileUrl','diagramBound','/client/uploadFile','Check\x20your\x20credentials\x20and\x20try\x20again.','string','arrayBuffer','from','/client/runtime-bff/personal/create','type','markdown','8274752oLmJcj','/client/permit/role/get-permit-list','4597332EnNUTO','number','Download\x20failed:\x20','file','signal','application/zip','apiError','SQL\x20query\x20not\x20found:\x20','/client/knowledge-base/personal/list?appCode=','GET','values','valid','/versions/','POST','size','application/octet-stream','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','1626604TpwIAr','SkillHub\x20API\x20error:\x20','/client/knowledge-base/personal/create','download','/api/cli/v1/skills/','Missing\x20Skill\x20package\x20payload.','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.',',\x20name=','/client/artifact/','publish','/client/knowledge-base/personal/','headers','resolvedSlug','API\x20error:\x20','application/json','errorMsg','/diagram','API\x20error\x20code:\x20','function','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','functions','/client/artifact/list?','/client/permit/user-role/get-user-list','validation','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','confirmWarnings'];a103_0x55e4=function(){return _0x15f20f;};return a103_0x55e4();}function runtimeSkillPackageFile(_0x36586c){const _0x586f73=a103_0x114a;if(!_0x36586c[_0x586f73(0x10f)])throw CliErrors['validation'](_0x586f73(0xef));const _0x5b5b34=Buffer[_0x586f73(0xd3)](_0x36586c['packageBase64'],_0x586f73(0xc6)),_0x316c86=new Blob([_0x5b5b34],{'type':_0x586f73(0xde)}),_0x46a33a=(_0x36586c['skillCode']||_0x586f73(0x104))+_0x586f73(0x110);if(typeof File!=='undefined')return new File([_0x316c86],_0x46a33a,{'type':_0x586f73(0xde)});return _0x316c86;}function normalizeSkillHubRuntimeListResponse(_0x48e7cd,_0x2d167a,_0x4a3db6,_0x2453d7){const _0x34b817=a103_0x114a,_0x3f17af=Array[_0x34b817(0x155)](_0x2d167a)?_0x2d167a:Array[_0x34b817(0x155)](_0x2d167a?.[_0x34b817(0xb0)])?_0x2d167a[_0x34b817(0xb0)]:[],_0xffd677=_0x2453d7?.[_0x34b817(0x120)](),_0x1138bf=_0x3f17af['filter'](_0x39dcf8=>!_0xffd677||_0x39dcf8[_0x34b817(0x134)]===_0xffd677)[_0x34b817(0xb7)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x412c58=>Boolean(_0x412c58)),_0x22dac5=_0x1138bf['filter'](_0x4f3f3a=>_0x4f3f3a['scope']===_0x34b817(0x12a)),_0x3704e9=_0x1138bf[_0x34b817(0x128)](_0x417320=>_0x417320[_0x34b817(0xc8)]===_0x34b817(0x107));return{'appCode':_0x48e7cd,'personal':_0x4a3db6===_0x34b817(0x107)?[]:_0x22dac5,'company':_0x4a3db6==='personal'?[]:_0x3704e9,'effective':buildEffectiveRuntimeSkills(_0x22dac5,_0x3704e9,_0x4a3db6)};}function skillHubRuntimeItemToRuntimeSkill(_0x1acb2c){const _0x391077=a103_0x114a,_0x3d3eaa=_0x1acb2c[_0x391077(0x134)]?.['trim'](),_0x3821ee=skillHubVisibilityToScope(_0x1acb2c[_0x391077(0x15d)]);if(!_0x3d3eaa||!_0x3821ee)return undefined;return{'id':_0x1acb2c['id'],'appCode':_0x1acb2c[_0x391077(0x127)],'skillCode':_0x3d3eaa,'skillName':_0x1acb2c[_0x391077(0xc7)]??_0x3d3eaa,'description':_0x1acb2c[_0x391077(0xab)],'example':_0x1acb2c[_0x391077(0x11b)],'scope':_0x3821ee,'version':skillHubRuntimeItemVersion(_0x1acb2c),'status':_0x1acb2c[_0x391077(0xad)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x30b6b8){const _0x5b450a=a103_0x114a,_0x4b0742=_0x30b6b8['slug']?.['trim']();if(!_0x4b0742)return undefined;return{'id':_0x30b6b8['id'],'appCode':_0x30b6b8['namespace'],'skillCode':_0x4b0742,'skillName':_0x30b6b8[_0x5b450a(0xc7)]??_0x4b0742,'description':_0x30b6b8[_0x5b450a(0xab)],'example':_0x30b6b8['example'],'scope':skillHubVisibilityToScope(_0x30b6b8[_0x5b450a(0x15d)])??_0x30b6b8[_0x5b450a(0x15d)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x30b6b8),'status':_0x30b6b8['status']};}function skillHubVisibilityToScope(_0x4dc3e0){const _0x1f6fe6=a103_0x114a;if(_0x4dc3e0===_0x1f6fe6(0xb9))return _0x1f6fe6(0x12a);if(_0x4dc3e0===_0x1f6fe6(0x113))return _0x1f6fe6(0x107);return undefined;}function skillHubRuntimeItemVersion(_0x1efad4){const _0x381275=a103_0x114a;return _0x1efad4['publishedVersion']?.[_0x381275(0x151)]??_0x1efad4[_0x381275(0xa7)]?.[_0x381275(0x151)]??_0x1efad4[_0x381275(0xb3)]?.[_0x381275(0x151)];}function buildEffectiveRuntimeSkills(_0x24c27e,_0xec6121,_0xa0b466){const _0x326dd2=a103_0x114a;if(_0xa0b466===_0x326dd2(0x12a))return _0x24c27e;if(_0xa0b466==='company')return _0xec6121;const _0x3d26ab=new Map();for(const _0x1a4a2f of _0xec6121){_0x3d26ab[_0x326dd2(0x14d)](_0x1a4a2f[_0x326dd2(0x145)],_0x1a4a2f);}for(const _0xb7b043 of _0x24c27e){_0x3d26ab[_0x326dd2(0x14d)](_0xb7b043['skillCode'],_0xb7b043);}return Array[_0x326dd2(0xd3)](_0x3d26ab[_0x326dd2(0xe3)]());}function normalizeRuntimeSkillListResponse(_0x1183dd,_0x1fda35){const _0x1cdfff=a103_0x114a;if(Array[_0x1cdfff(0x155)](_0x1fda35)){const _0x328fc3=_0x1fda35[_0x1cdfff(0x128)](_0x224a36=>_0x224a36['scope']===_0x1cdfff(0x12a)),_0x1a0cc2=_0x1fda35[_0x1cdfff(0x128)](_0xe17eef=>_0xe17eef[_0x1cdfff(0xc8)]==='company');return{'appCode':_0x1183dd,'personal':_0x328fc3,'company':_0x1a0cc2,'effective':[..._0x1a0cc2,..._0x328fc3]};}return{'appCode':_0x1fda35?.[_0x1cdfff(0x12d)]??_0x1183dd,'personal':Array[_0x1cdfff(0x155)](_0x1fda35?.['personal'])?_0x1fda35['personal']:[],'company':Array[_0x1cdfff(0x155)](_0x1fda35?.['company'])?_0x1fda35[_0x1cdfff(0x107)]:[],'effective':Array['isArray'](_0x1fda35?.['effective'])?_0x1fda35[_0x1cdfff(0x125)]:[]};}export async function listRuntimeAppRoles(_0x1fb280,_0x179704={}){const _0x9cd05b=a103_0x114a,_0x419092=_0x179704[_0x9cd05b(0x133)]??0x1,_0xcccb5d=Math[_0x9cd05b(0x106)](Math['max'](_0x179704['pageSize']??0x64,0x1),0x64),_0x57b9a7=await apiRequest('/client/permit/role/get-list',{'method':'POST','body':{'appCode':_0x1fb280,..._0x179704[_0x9cd05b(0x156)]?{'roleName':_0x179704[_0x9cd05b(0x156)]}:{},'currentPage':_0x419092,'pageSize':_0xcccb5d}});return{'items':extractList(_0x57b9a7[_0x9cd05b(0x14e)]),'paging':extractPaging(_0x57b9a7[_0x9cd05b(0x14e)])};}export async function createRuntimeAppRole(_0x48441c){const _0x7b95ad=a103_0x114a,_0x256b96=await apiRequest('/client/permit/role/create',{'method':'POST','body':{'roleType':_0x7b95ad(0x13c),..._0x48441c}});return _0x256b96[_0x7b95ad(0x14e)];}export async function updateRuntimeAppRole(_0x4554f9){const _0x319d04=a103_0x114a,_0x2d5038=await apiRequest(_0x319d04(0x13f),{'method':_0x319d04(0xe6),'body':_0x4554f9});return _0x2d5038[_0x319d04(0x14e)];}export async function deleteRuntimeAppRole(_0x1fcb8c){const _0x57a580=a103_0x114a,_0xed7318=await apiRequest(_0x57a580(0x117),{'method':'POST','body':{'id':_0x1fcb8c}});return _0xed7318[_0x57a580(0x14e)];}export async function listRuntimeRoleUsers(_0x120948){const _0x25d0d6=a103_0x114a,_0x603157=await apiRequest(_0x25d0d6(0x100),{'method':'POST','body':{'appCode':_0x120948}});return extractList(_0x603157[_0x25d0d6(0x14e)]);}export async function updateRuntimeRoleUsers(_0xed56a4,_0x21ef8c){const _0x2f3d71=a103_0x114a,_0x3b888b=await apiRequest(_0x2f3d71(0x157),{'method':_0x2f3d71(0xe6),'body':{'appCode':_0xed56a4,'roleList':_0x21ef8c}});return _0x3b888b[_0x2f3d71(0x14e)];}export async function listRuntimeAppUsers(_0x238818){const _0x109c9e=a103_0x114a,_0x1b2091=await apiRequest(_0x109c9e(0x15e)+runtimePermitQuery({'appCode':_0x238818}));return extractList(_0x1b2091[_0x109c9e(0x14e)]);}function runtimePermitQuery(_0x203c1b){const _0x5bac6a=a103_0x114a,_0x103b71=new URLSearchParams();for(const [_0x1c4224,_0x4d7bd5]of Object[_0x5bac6a(0x140)](_0x203c1b))_0x103b71['set'](_0x1c4224,String(_0x4d7bd5));return'?'+_0x103b71[_0x5bac6a(0x143)]();}export async function listRuntimePermitRoles(_0x45e6b9,_0x11adbc={}){const _0x9063fa=a103_0x114a,_0x15090c=await apiRequest(_0x9063fa(0xd8),{'method':'POST','body':{'appCode':_0x45e6b9,..._0x11adbc}});return extractList(_0x15090c[_0x9063fa(0x14e)]);}export async function getRuntimePagePermit(_0x507557){const _0x9dcf95=a103_0x114a,_0x28e8af=await apiRequest('/client/permit/page/get-one'+runtimePermitQuery({'menuId':_0x507557}));return _0x28e8af[_0x9dcf95(0x14e)];}export async function saveRuntimePagePermit(_0x4cec3f){const _0xd80263=a103_0x114a,_0x47ec2a=await apiRequest(_0xd80263(0xb2),{'method':_0xd80263(0xe6),'body':_0x4cec3f});return _0x47ec2a[_0xd80263(0x14e)];}export async function getRuntimeRoleMenuResources(_0x44e1b2,_0x3afda9){const _0x5137e8=a103_0x114a,_0x437677=await apiRequest(_0x5137e8(0xca),{'method':_0x5137e8(0xe6),'body':{'appCode':_0x44e1b2,'roleId':_0x3afda9}});return extractList(_0x437677['data']);}export async function listRuntimeMenuRolePermits(_0x297b4d){const _0x446750=a103_0x114a,_0x3508ff=await apiRequest(_0x446750(0x150)+runtimePermitQuery({'appCode':_0x297b4d}));return Array[_0x446750(0x155)](_0x3508ff[_0x446750(0x14e)]?.[_0x446750(0x142)])?_0x3508ff[_0x446750(0x14e)][_0x446750(0x142)]:[];}export async function saveRuntimeMenuRolePermits(_0xb0b4da,_0x19ec37){const _0x1a16e0=a103_0x114a,_0x302fa1=await apiRequest(_0x1a16e0(0x129),{'method':_0x1a16e0(0xe6),'body':{'appCode':_0xb0b4da,'permitList':_0x19ec37}});return _0x302fa1[_0x1a16e0(0x14e)];}export async function listRuntimeDatasetPermits(_0x5623d3,_0xf4138e){const _0x145d84=a103_0x114a,_0x2c64bb=await apiRequest(_0x145d84(0x11e)+runtimePermitQuery({'appCode':_0x5623d3,'roleId':_0xf4138e}));return Array[_0x145d84(0x155)](_0x2c64bb[_0x145d84(0x14e)]?.[_0x145d84(0x142)])?_0x2c64bb['data']['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x41ce08){const _0x36a48c=a103_0x114a,_0x4c3c22=await apiRequest(_0x36a48c(0x12c)+runtimePermitQuery({'appCode':_0x41ce08}));return Array[_0x36a48c(0x155)](_0x4c3c22[_0x36a48c(0x14e)]?.['permitList'])?_0x4c3c22[_0x36a48c(0x14e)][_0x36a48c(0x142)]:[];}export async function saveRuntimeDatasetRolePermits(_0x122ebb,_0x2e7189){const _0x523908=a103_0x114a,_0x3a74b5=await apiRequest(_0x523908(0x126),{'method':_0x523908(0xe6),'body':{'appCode':_0x122ebb,'permitList':_0x2e7189}});return _0x3a74b5[_0x523908(0x14e)];}
|
|
1
|
+
const a104_0x117372=a104_0x296f;(function(_0x1ab9fb,_0x173647){const _0xb4009b=a104_0x296f,_0x5d37b0=_0x1ab9fb();while(!![]){try{const _0x299e36=-parseInt(_0xb4009b(0x1bd))/0x1+parseInt(_0xb4009b(0x208))/0x2*(-parseInt(_0xb4009b(0x1d9))/0x3)+parseInt(_0xb4009b(0x1ce))/0x4*(parseInt(_0xb4009b(0x1e4))/0x5)+parseInt(_0xb4009b(0x14f))/0x6+-parseInt(_0xb4009b(0x155))/0x7*(-parseInt(_0xb4009b(0x178))/0x8)+-parseInt(_0xb4009b(0x166))/0x9*(-parseInt(_0xb4009b(0x1d5))/0xa)+-parseInt(_0xb4009b(0x191))/0xb;if(_0x299e36===_0x173647)break;else _0x5d37b0['push'](_0x5d37b0['shift']());}catch(_0x5a4bde){_0x5d37b0['push'](_0x5d37b0['shift']());}}}(a104_0x1315,0x68825));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a104_0x1315(){const _0x5b443b=['API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/artifact/list?','/publish/validate','API\x20error:\x20','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','longTerm','Invalid\x20approval\x20task\x20detail\x20response.','Invalid\x20runtime\x20role\x20members\x20response:\x20roleList[','ownerPreviewVersion','Invalid\x20app\x20config\x20value:\x20key=','/api/runtime/v1/namespaces/','/client/permit/page/get-one','Toolbox\x20error\x20code:\x20','application/zip','skill','stringify','1661028ttBqMA','gmtModified','toLowerCase','displayName','roleList[','Download\x20failed:\x20','6461zuuTAy','/client/permit/resource/batch-save-menu','sqlCode','\x20must\x20be\x20an\x20array.','/client/user-accounts/bind','error','Check\x20your\x20credentials\x20and\x20try\x20again.','application/json','abort','namespace','functionName','example','/client/runtime-bff/personal/','version','records','/client/ocr','source','571707sWNpJy','isArray','Invalid\x20notification\x20config\x20list\x20response.','/run','message','diagramRevision',',\x20name=','PRIVATE','kind','Knowledge-base\x20entry\x20not\x20found:\x20id=','join','DELETE','download','/client/permit/role/get-list','signal','Toolbox\x20API\x20error:\x20','CUSTOM','/client/bff/endpoint/','4568hbEYIj','/api/approve/todo?','Invalid\x20approval\x20todo\x20response:\x20missing\x20records.','permitList','from','sourceFingerprint','/validate','/client/dataset/list','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','base64','effective','filter','/client/permit/role/get-permit-list','diagramBound','all','personal','/client/artifact/','/api/flow/approve','/client/sql/query','applyUserList','test','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','newConfigFileName','type','/client/app-config/getByKey?','7400635AxCqmS','/api/flow/task/','?appCode=','].userId\x20must\x20be\x20a\x20positive\x20safe\x20integer\x20or\x20numeric\x20string.','errorMsg','/client/permit/role/create','/publish','status','cursor','/client/permit/role/delete','/schedules','errors','/api/harness/apps/','SQL\x20query\x20not\x20found:\x20','diagram','text','/update','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','url','userList','data','GET','validation','pageSize','apiError','Artifact\x20not\x20found:\x20id=','packageBase64','/client/permit/role/update','content','/api/cli/v1/skills/','resolvedSlug','isJson','visibility','string','markdown','min','appCode','company','headlineVersion','description','file','warnings','undefined','userId','377190VhVNcB','tags','scope','invokeSource','.zip','entries','valid','api','tableData','isInteger','Request\x20timeout:\x20','map','Invalid\x20runtime\x20role\x20members\x20response:\x20','authRequired','favorite','name','summary','18380aMjrIW','arrayBuffer','/client/knowledge-base/personal/create','items','skillName','/skills','/client/knowledge-base/personal/list?appCode=','30fAzycb','/client/knowledge-base/personal/','success','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','1044273GWoqlA','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','set','searchParams','values','api-doc-generator','diagramValidated','msg','runtime','replace','NAMESPACE_ONLY','905nKNUlf','artifactType','find','object','/download','trim','headers','found','/client/notification/channel-config/list?','Configure\x20accessKey\x20in\x20','SkillHub\x20error\x20code:\x20','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','roleName','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','/api/flow/task/transfer','/api/v1/skills/','size','/api/node-toolbox/','AbortError','/diagram','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','code','functions','append','/client/runtime-bff/personal/list?appCode=','confirmWarnings','slug','SkillHub\x20API\x20error:\x20','/client/permit/resource/get-menu-list','toString','API\x20error\x20code:\x20','resolvedVersion','POST','boolean','PUT','errorCode','2ZrSbzA','number','limit','max','/client/dataset/get-driven-data?code=','skillCode','].userList','/client/dept/queryAppUser','Toolbox\x20API\x20error'];a104_0x1315=function(){return _0x5b443b;};return a104_0x1315();}import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';import{normalizePositiveSafeInteger}from'../utils/positive-safe-integer.js';let _activeAK;export function setActiveAK(_0xcffc18){_activeAK=_0xcffc18||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0xe5eb96){const _0x14272b=a104_0x296f;for(const _0x4fb441 of _0xe5eb96){if(typeof _0x4fb441===_0x14272b(0x1b2)&&_0x4fb441[_0x14272b(0x1e9)]())return _0x4fb441['trim']();}return undefined;}async function decodeResponseBody(_0x105bf5){const _0x83802e=a104_0x296f;if(typeof _0x105bf5[_0x83802e(0x1a0)]==='function')try{const _0x2dcd42=await _0x105bf5[_0x83802e(0x1a0)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x2dcd42),'text':_0x2dcd42};}catch{return{'isJson':![],'text':_0x2dcd42['trim']()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x105bf5['json']()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x45f6fc,_0x957115,_0xc9a32d){const _0x53bb0b=a104_0x296f,_0x28640d=_0x957115&&typeof _0x957115===_0x53bb0b(0x1e7)?_0x957115:{},_0x24ea54=[_0x28640d[_0x53bb0b(0x198)],_0x28640d[_0x53bb0b(0x1f9)]][_0x53bb0b(0x1e6)](_0x1f4df0=>Number(_0x1f4df0)===0x1ad),_0x547556=createRateLimitError({'status':_0x45f6fc[_0x53bb0b(0x198)]===0x1ad?_0x45f6fc[_0x53bb0b(0x198)]:_0x24ea54??_0x45f6fc['status'],'errorCode':firstString(_0x28640d[_0x53bb0b(0x207)],typeof _0x28640d[_0x53bb0b(0x1f9)]===_0x53bb0b(0x1b2)?_0x28640d[_0x53bb0b(0x1f9)]:undefined),'message':firstString(_0x28640d[_0x53bb0b(0x195)],_0x28640d[_0x53bb0b(0x16a)],_0x28640d['msg'],_0xc9a32d),'retryAfter':readRetryAfter(_0x45f6fc[_0x53bb0b(0x1ea)])??readRetryAfterSeconds(_0x957115)});if(_0x547556)throw _0x547556;}async function apiRequest(_0x6926f4,_0x5a27c0={}){const _0x28184f=a104_0x296f,{method:method=_0x28184f(0x1a6),body:_0x9cbd7a,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x28184f(0x1e1)}=_0x5a27c0,_0x129dd2=_activeAK,_0x16fcb9=domain===_0x28184f(0x1c4)?getApiDomain():getRuntimeDomain();if(!_0x129dd2)throw CliErrors[_0x28184f(0x1ca)](_0x28184f(0x1ed)+PRODUCT_CONFIG[_0x28184f(0x18e)]+'.');const _0x5a2303=''+_0x16fcb9+_0x6926f4,_0x4e2929={'X-User-AK':_0x129dd2},_0x17caea=new AbortController(),_0x34255e=setTimeout(()=>_0x17caea['abort'](),timeout);try{const _0x235a51=await fetch(_0x5a2303,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x28184f(0x1c0)],..._0x4e2929,...headers},'body':_0x9cbd7a?JSON['stringify'](_0x9cbd7a):undefined,'signal':_0x17caea[_0x28184f(0x174)]}),_0x11a9ab=await decodeResponseBody(_0x235a51);if(!_0x11a9ab[_0x28184f(0x1b0)]){throwIfRateLimited(_0x235a51,undefined,_0x11a9ab[_0x28184f(0x1a0)]);throw CliErrors[_0x28184f(0x1a9)](_0x28184f(0x13f)+_0x235a51['status']+')',_0x235a51[_0x28184f(0x198)]>=0x190?_0x28184f(0x15b):undefined);}const _0x34dbf6=_0x11a9ab['data'];throwIfRateLimited(_0x235a51,_0x34dbf6);if(!_0x235a51['ok']||_0x34dbf6[_0x28184f(0x1d7)]===![])throw CliErrors[_0x28184f(0x1a9)](_0x34dbf6[_0x28184f(0x195)]||_0x34dbf6[_0x28184f(0x16a)]||_0x34dbf6['msg']||_0x28184f(0x142)+_0x235a51[_0x28184f(0x198)],_0x34dbf6['errorCode']?_0x28184f(0x202)+_0x34dbf6['errorCode']:undefined);return _0x34dbf6;}catch(_0x4525aa){if(_0x4525aa instanceof Error&&_0x4525aa[_0x28184f(0x1cc)]==='AbortError')throw CliErrors[_0x28184f(0x1a9)](_0x28184f(0x1c7)+_0x5a2303);throw _0x4525aa;}finally{clearTimeout(_0x34255e);}}async function apiBinaryRequest(_0x47102f,_0x44a11a={}){const _0x47e53b=a104_0x296f,{method:method=_0x47e53b(0x1a6),headers:headers={},timeout:timeout=0x7530}=_0x44a11a,_0x333875=_activeAK,_0x6d6fb5=getRuntimeDomain();if(!_0x333875)throw CliErrors['authRequired'](_0x47e53b(0x1ed)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x446f15=''+_0x6d6fb5+_0x47102f,_0x4021b0=new AbortController(),_0x1fe705=setTimeout(()=>_0x4021b0[_0x47e53b(0x15d)](),timeout);try{const _0x5fedc3=await fetch(_0x446f15,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x47e53b(0x1c0)],'X-User-AK':_0x333875,...headers},'signal':_0x4021b0[_0x47e53b(0x174)]});if(!_0x5fedc3['ok']){const _0x38f1f9=await decodeResponseBody(_0x5fedc3),_0x246f06=_0x38f1f9[_0x47e53b(0x1a5)]&&typeof _0x38f1f9[_0x47e53b(0x1a5)]===_0x47e53b(0x1e7)?_0x38f1f9[_0x47e53b(0x1a5)]:{},_0x2d0675=firstString(_0x246f06[_0x47e53b(0x195)],_0x246f06['message'],_0x246f06[_0x47e53b(0x207)],_0x38f1f9[_0x47e53b(0x1a0)]);throwIfRateLimited(_0x5fedc3,_0x38f1f9['data'],_0x2d0675);throw CliErrors['apiError'](_0x2d0675||_0x47e53b(0x142)+_0x5fedc3['status'],_0x47e53b(0x154)+_0x446f15);}return Buffer['from'](await _0x5fedc3[_0x47e53b(0x1cf)]());}catch(_0x51332b){if(_0x51332b instanceof Error&&_0x51332b['name']===_0x47e53b(0x1f6))throw CliErrors['apiError'](_0x47e53b(0x1c7)+_0x446f15);throw _0x51332b;}finally{clearTimeout(_0x1fe705);}}async function apiFormRequest(_0xa79635,_0x1a517d,_0x13c1f0={}){const _0xdf1778=a104_0x296f,{timeout:timeout=0x7530}=_0x13c1f0,_0x45f3ed=_activeAK,_0x4f7381=getRuntimeDomain();if(!_0x45f3ed)throw CliErrors['authRequired'](_0xdf1778(0x1ed)+PRODUCT_CONFIG[_0xdf1778(0x18e)]+'.');const _0x5cb4de=''+_0x4f7381+_0xa79635,_0x5e37ea=new AbortController(),_0x20ed30=setTimeout(()=>_0x5e37ea[_0xdf1778(0x15d)](),timeout);try{const _0x3ce94a=await fetch(_0x5cb4de,{'method':_0xdf1778(0x204),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0xdf1778(0x1c0)],'X-User-AK':_0x45f3ed},'body':_0x1a517d,'signal':_0x5e37ea[_0xdf1778(0x174)]}),_0xe66223=await decodeResponseBody(_0x3ce94a);if(!_0xe66223['isJson']){throwIfRateLimited(_0x3ce94a,undefined,_0xe66223[_0xdf1778(0x1a0)]);throw CliErrors[_0xdf1778(0x1a9)](_0xdf1778(0x13f)+_0x3ce94a[_0xdf1778(0x198)]+')',_0x3ce94a['status']>=0x190?_0xdf1778(0x15b):undefined);}const _0x56ace6=_0xe66223['data'];throwIfRateLimited(_0x3ce94a,_0x56ace6);if(!_0x3ce94a['ok']||_0x56ace6[_0xdf1778(0x1d7)]===![])throw CliErrors['apiError'](_0x56ace6['errorMsg']||_0x56ace6[_0xdf1778(0x16a)]||_0xdf1778(0x142)+_0x3ce94a[_0xdf1778(0x198)],_0x56ace6[_0xdf1778(0x207)]?_0xdf1778(0x202)+_0x56ace6[_0xdf1778(0x207)]:undefined);return _0x56ace6;}catch(_0x52c061){if(_0x52c061 instanceof Error&&_0x52c061[_0xdf1778(0x1cc)]===_0xdf1778(0x1f6))throw CliErrors[_0xdf1778(0x1a9)]('Request\x20timeout:\x20'+_0x5cb4de);throw _0x52c061;}finally{clearTimeout(_0x20ed30);}}async function toolboxRequest(_0x3c5d0a,_0x2b9fae,_0x3b165a={}){const _0x24b2c8=a104_0x296f,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x3b165a,_0x21633e=_activeAK;if(!_0x21633e)throw CliErrors[_0x24b2c8(0x1ca)](_0x24b2c8(0x1ed)+PRODUCT_CONFIG[_0x24b2c8(0x18e)]+'.');const _0xc40dff=getApiDomain()[_0x24b2c8(0x1e2)](/\/$/,''),_0x3817a6=new URL(_0x3c5d0a,_0xc40dff+_0x24b2c8(0x1f5));if(_0x2b9fae)for(const [_0x4dd4b4,_0x28d5ca]of Object[_0x24b2c8(0x1c2)](_0x2b9fae)){_0x28d5ca!==undefined&&_0x28d5ca!==null&&_0x3817a6[_0x24b2c8(0x1dc)][_0x24b2c8(0x1db)](_0x4dd4b4,String(_0x28d5ca));}const _0x584241=new AbortController(),_0x380367=setTimeout(()=>_0x584241['abort'](),timeout);try{const _0x586de2=await fetch(_0x3817a6,{'method':method,'headers':{'Content-Type':_0x24b2c8(0x15c),'X-Invoke-Source':PRODUCT_CONFIG[_0x24b2c8(0x1c0)],'X-User-AK':_0x21633e,...headers},'signal':_0x584241[_0x24b2c8(0x174)]}),_0x2aaa0a=await decodeResponseBody(_0x586de2);if(!_0x2aaa0a[_0x24b2c8(0x1b0)]){throwIfRateLimited(_0x586de2,undefined,_0x2aaa0a[_0x24b2c8(0x1a0)]);throw CliErrors[_0x24b2c8(0x1a9)](_0x24b2c8(0x1d8)+_0x586de2[_0x24b2c8(0x198)]+')',_0x586de2['status']>=0x190?_0x24b2c8(0x15b):undefined);}const _0x402120=_0x2aaa0a['data'];throwIfRateLimited(_0x586de2,_0x402120);if(!_0x586de2['ok']){const _0x8ca428=_0x402120&&typeof _0x402120===_0x24b2c8(0x1e7)?_0x402120:{};throw CliErrors[_0x24b2c8(0x1a9)](_0x8ca428[_0x24b2c8(0x195)]||_0x8ca428[_0x24b2c8(0x16a)]||_0x24b2c8(0x175)+_0x586de2[_0x24b2c8(0x198)],_0x8ca428[_0x24b2c8(0x207)]?_0x24b2c8(0x14b)+_0x8ca428['errorCode']:undefined);}if(_0x402120&&typeof _0x402120==='object'&&_0x24b2c8(0x1d7)in _0x402120&&typeof _0x402120[_0x24b2c8(0x1d7)]===_0x24b2c8(0x205)){const _0x49cce9=_0x402120;if(!_0x49cce9[_0x24b2c8(0x1d7)])throw CliErrors[_0x24b2c8(0x1a9)](_0x49cce9[_0x24b2c8(0x195)]||_0x49cce9[_0x24b2c8(0x16a)]||_0x24b2c8(0x13e),_0x49cce9[_0x24b2c8(0x207)]?_0x24b2c8(0x14b)+_0x49cce9['errorCode']:undefined);return _0x49cce9[_0x24b2c8(0x1a5)];}return _0x402120;}catch(_0x2a7ade){if(_0x2a7ade instanceof Error&&_0x2a7ade['name']==='AbortError')throw CliErrors[_0x24b2c8(0x1a9)](_0x24b2c8(0x1c7)+_0x3817a6[_0x24b2c8(0x201)]());throw _0x2a7ade;}finally{clearTimeout(_0x380367);}}async function skillHubJsonRequest(_0x3da2d5,_0x244240={}){const _0x36190a=a104_0x296f,{method:method='GET',query:_0x4624fb,body:_0x3a450d,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x244240,_0x549d63=_activeAK;if(!_0x549d63)throw CliErrors['authRequired'](_0x36190a(0x1ed)+PRODUCT_CONFIG[_0x36190a(0x18e)]+'.');const _0x32caea=getSkillDomain()[_0x36190a(0x1e2)](/\/$/,''),_0x19d285=new URL(_0x3da2d5,_0x32caea+'/');if(_0x4624fb)for(const [_0x4bd068,_0x418c1a]of Object['entries'](_0x4624fb)){_0x418c1a!==undefined&&_0x418c1a!==null&&_0x19d285['searchParams'][_0x36190a(0x1db)](_0x4bd068,String(_0x418c1a));}const _0x447179=new AbortController(),_0x1348d2=setTimeout(()=>_0x447179[_0x36190a(0x15d)](),timeout);try{const _0x353e99=await fetch(_0x19d285[_0x36190a(0x201)](),{'method':method,'headers':{'Accept':_0x36190a(0x15c),'X-Invoke-Source':PRODUCT_CONFIG[_0x36190a(0x1c0)],'X-User-AK':_0x549d63,...headers},'body':_0x3a450d,'signal':_0x447179[_0x36190a(0x174)]}),_0x12c447=await decodeResponseBody(_0x353e99);if(!_0x12c447['isJson']){if(allowNotFound&&_0x353e99[_0x36190a(0x198)]===0x194)return undefined;throwIfRateLimited(_0x353e99,undefined,_0x12c447[_0x36190a(0x1a0)]);throw CliErrors['apiError'](_0x36190a(0x1da)+_0x353e99[_0x36190a(0x198)]+')',_0x353e99[_0x36190a(0x198)]>=0x190?_0x36190a(0x15b):undefined);}const _0x209f7b=_0x12c447[_0x36190a(0x1a5)];throwIfRateLimited(_0x353e99,_0x209f7b);if(allowNotFound&&isSkillHubNotFoundResponse(_0x353e99[_0x36190a(0x198)],_0x209f7b))return undefined;const _0x4317a6=!_0x353e99['ok']||_0x209f7b?.['success']===![]||typeof _0x209f7b?.[_0x36190a(0x1f9)]===_0x36190a(0x209)&&_0x209f7b[_0x36190a(0x1f9)]>=0x190;if(_0x4317a6)throw CliErrors[_0x36190a(0x1a9)](_0x209f7b?.['errorMsg']||_0x209f7b?.[_0x36190a(0x16a)]||_0x209f7b?.['msg']||_0x36190a(0x1ff)+_0x353e99[_0x36190a(0x198)],_0x209f7b?.['errorCode']?_0x36190a(0x1ee)+_0x209f7b[_0x36190a(0x207)]:undefined);return _0x209f7b?.[_0x36190a(0x1a5)]??_0x209f7b;}catch(_0x5d9ada){if(_0x5d9ada instanceof Error&&_0x5d9ada[_0x36190a(0x1cc)]===_0x36190a(0x1f6))throw CliErrors[_0x36190a(0x1a9)](_0x36190a(0x1c7)+_0x19d285[_0x36190a(0x201)]());throw _0x5d9ada;}finally{clearTimeout(_0x1348d2);}}function isSkillHubNotFoundResponse(_0xcd2286,_0x345be5){const _0x1b4450=a104_0x296f;if(_0xcd2286===0x194||_0x345be5?.[_0x1b4450(0x1f9)]===0x194)return!![];if(_0xcd2286!==0x190&&_0x345be5?.[_0x1b4450(0x1f9)]!==0x190)return![];const _0x3aa330=[_0x345be5?.[_0x1b4450(0x1e0)],_0x345be5?.[_0x1b4450(0x16a)],_0x345be5?.[_0x1b4450(0x195)],_0x345be5?.[_0x1b4450(0x15a)]][_0x1b4450(0x183)](_0x5d3ec2=>typeof _0x5d3ec2===_0x1b4450(0x1b2))[_0x1b4450(0x170)]('\x20');return/skill not found\b/i[_0x1b4450(0x18c)](_0x3aa330);}async function skillHubBinaryRequest(_0x3efa05,_0x88fa4f={}){const _0x5c7f6b=a104_0x296f,{query:_0x4d4b5c,headers:headers={},timeout:timeout=0x7530}=_0x88fa4f,_0x1d18a2=_activeAK;if(!_0x1d18a2)throw CliErrors[_0x5c7f6b(0x1ca)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5c7f6b(0x18e)]+'.');const _0x179800=getSkillDomain()[_0x5c7f6b(0x1e2)](/\/$/,''),_0x56dfd8=new URL(_0x3efa05,_0x179800+'/');if(_0x4d4b5c)for(const [_0x50a45d,_0x3b4b2f]of Object[_0x5c7f6b(0x1c2)](_0x4d4b5c)){_0x3b4b2f!==undefined&&_0x3b4b2f!==null&&_0x56dfd8[_0x5c7f6b(0x1dc)][_0x5c7f6b(0x1db)](_0x50a45d,String(_0x3b4b2f));}const _0x5cc6b0=new AbortController(),_0x3fde4e=setTimeout(()=>_0x5cc6b0[_0x5c7f6b(0x15d)](),timeout);try{const _0x509b0c=await fetch(_0x56dfd8[_0x5c7f6b(0x201)](),{'method':_0x5c7f6b(0x1a6),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x5c7f6b(0x1c0)],'X-User-AK':_0x1d18a2,...headers},'signal':_0x5cc6b0[_0x5c7f6b(0x174)]});if(!_0x509b0c['ok']){const _0x42ae0e=await decodeResponseBody(_0x509b0c),_0x453804=_0x42ae0e[_0x5c7f6b(0x1a5)]&&typeof _0x42ae0e[_0x5c7f6b(0x1a5)]===_0x5c7f6b(0x1e7)?_0x42ae0e[_0x5c7f6b(0x1a5)]:{},_0x4be054=firstString(_0x453804[_0x5c7f6b(0x195)],_0x453804['message'],_0x453804[_0x5c7f6b(0x1e0)],_0x453804[_0x5c7f6b(0x207)],_0x42ae0e[_0x5c7f6b(0x1a0)]);throwIfRateLimited(_0x509b0c,_0x42ae0e['data'],_0x4be054);throw CliErrors['apiError'](_0x4be054||_0x5c7f6b(0x1ff)+_0x509b0c[_0x5c7f6b(0x198)],_0x5c7f6b(0x154)+_0x56dfd8[_0x5c7f6b(0x201)]());}return Buffer[_0x5c7f6b(0x17c)](await _0x509b0c['arrayBuffer']());}catch(_0x6a4997){if(_0x6a4997 instanceof Error&&_0x6a4997[_0x5c7f6b(0x1cc)]===_0x5c7f6b(0x1f6))throw CliErrors['apiError'](_0x5c7f6b(0x1c7)+_0x56dfd8[_0x5c7f6b(0x201)]());throw _0x6a4997;}finally{clearTimeout(_0x3fde4e);}}export async function getBffEndpointContract(_0x482407,_0x80677b){const _0x31b14a=a104_0x296f;if(_0x80677b===_0x31b14a(0x1fa))throw CliErrors[_0x31b14a(0x1a7)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x482407+_0x31b14a(0x16c)+_0x80677b);const _0x502402=await apiRequest(_0x31b14a(0x177)+encodeURIComponent(_0x482407)+'/'+encodeURIComponent(_0x80677b)),_0x3c04b2=_0x502402[_0x31b14a(0x1a5)];if(!_0x3c04b2||typeof _0x3c04b2!==_0x31b14a(0x1e7)||Array[_0x31b14a(0x167)](_0x3c04b2)||_0x3c04b2[_0x31b14a(0x1b5)]!==_0x482407||_0x3c04b2[_0x31b14a(0x15f)]!==_0x80677b)throw CliErrors[_0x31b14a(0x1a7)](_0x31b14a(0x1a2)+_0x482407+_0x31b14a(0x16c)+_0x80677b);return{'appCode':_0x3c04b2[_0x31b14a(0x1b5)],'functionName':_0x3c04b2[_0x31b14a(0x15f)],'description':_0x3c04b2[_0x31b14a(0x1b8)],'version':_0x3c04b2[_0x31b14a(0x162)],'gmtModified':_0x3c04b2[_0x31b14a(0x150)]};}export async function getSqlQueryInfo(_0x881a61,_0x31d135){const _0x5612a8=a104_0x296f,_0x5a2187=await apiRequest(_0x5612a8(0x18a),{'method':_0x5612a8(0x204),'body':{'appCode':_0x881a61,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x31d135}}),_0x10dbab=_0x5a2187[_0x5612a8(0x1a5)],_0x1fd6ff=_0x10dbab&&typeof _0x10dbab==='object'&&_0x5612a8(0x1c5)in _0x10dbab?_0x10dbab[_0x5612a8(0x1c5)]?.[0x0]:_0x10dbab&&typeof _0x10dbab===_0x5612a8(0x1e7)&&_0x5612a8(0x157)in _0x10dbab?_0x10dbab:undefined;if(!_0x1fd6ff)throw CliErrors[_0x5612a8(0x1a7)](_0x5612a8(0x19e)+_0x31d135);return _0x1fd6ff;}export async function listApprovalTodo(_0x3a66c9,_0x53d2b2=0x1,_0x2c93ba=0x14){const _0x2fe7a8=a104_0x296f,_0x2bfb3d=new URLSearchParams({'appCode':_0x3a66c9,'currentPage':String(_0x53d2b2),'pageSize':String(_0x2c93ba)}),_0x25c23a=await apiRequest(_0x2fe7a8(0x179)+_0x2bfb3d['toString']());if(!_0x25c23a['data']||typeof _0x25c23a[_0x2fe7a8(0x1a5)]!==_0x2fe7a8(0x1e7)||!Array[_0x2fe7a8(0x167)](_0x25c23a[_0x2fe7a8(0x1a5)][_0x2fe7a8(0x163)]))throw CliErrors[_0x2fe7a8(0x1a9)](_0x2fe7a8(0x17a));return _0x25c23a[_0x2fe7a8(0x1a5)];}export async function getApprovalTaskDetail(_0xfedc7e){const _0x5adc59=a104_0x296f,_0x517f6a=await apiRequest(_0x5adc59(0x192)+encodeURIComponent(_0xfedc7e));if(!_0x517f6a[_0x5adc59(0x1a5)]||typeof _0x517f6a[_0x5adc59(0x1a5)]!==_0x5adc59(0x1e7)||Array[_0x5adc59(0x167)](_0x517f6a[_0x5adc59(0x1a5)]))throw CliErrors[_0x5adc59(0x1a9)](_0x5adc59(0x145));return _0x517f6a[_0x5adc59(0x1a5)];}export async function approveApprovalTask(_0x20f3e0){const _0x3e9e05=a104_0x296f,_0x415f1c=await apiRequest(_0x3e9e05(0x189),{'method':_0x3e9e05(0x204),'body':_0x20f3e0});return _0x415f1c['data'];}export async function transferApprovalTask(_0x41aaf1){const _0x21d4c4=a104_0x296f,_0xc404a4=await apiRequest(_0x21d4c4(0x1f2),{'method':_0x21d4c4(0x204),'body':_0x41aaf1});return _0xc404a4['data'];}function isRemoteAppItem(_0x128074){const _0x53b073=a104_0x296f;return!!_0x128074&&typeof _0x128074==='object'&&typeof _0x128074[_0x53b073(0x1b5)]==='string'&&typeof _0x128074['appName']==='string';}function extractRemoteAppItems(_0x4517d4){const _0x2b4fd3=a104_0x296f;if(Array[_0x2b4fd3(0x167)](_0x4517d4))return _0x4517d4[_0x2b4fd3(0x183)](isRemoteAppItem);if(!_0x4517d4||typeof _0x4517d4!==_0x2b4fd3(0x1e7))throw CliErrors[_0x2b4fd3(0x1a9)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x5b8596=_0x4517d4;if(Array[_0x2b4fd3(0x167)](_0x5b8596[_0x2b4fd3(0x1c5)]))return _0x5b8596[_0x2b4fd3(0x1c5)][_0x2b4fd3(0x183)](isRemoteAppItem);if(_0x5b8596[_0x2b4fd3(0x1a5)]&&typeof _0x5b8596['data']===_0x2b4fd3(0x1e7)){const _0x35513f=_0x5b8596['data'];if(Array[_0x2b4fd3(0x167)](_0x35513f[_0x2b4fd3(0x1c5)]))return _0x35513f[_0x2b4fd3(0x1c5)][_0x2b4fd3(0x183)](isRemoteAppItem);}throw CliErrors['apiError'](_0x2b4fd3(0x18d));}export async function getMyApps(){const _0x185934=a104_0x296f,_0x29542b=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x29542b[_0x185934(0x1a5)]);}export async function getLoginUserInfo(){const _0x33f0c5=a104_0x296f,_0x127438=await apiRequest('/client/user/loginUserInfo');if(!_0x127438['data']||typeof _0x127438[_0x33f0c5(0x1a5)]!==_0x33f0c5(0x1e7)||Array['isArray'](_0x127438[_0x33f0c5(0x1a5)]))throw CliErrors[_0x33f0c5(0x1a9)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x127438[_0x33f0c5(0x1a5)];}export const USER_ACCOUNT_BIND_PATH=a104_0x117372(0x159);export async function bindExternalUserAccount(_0x53c8a2,_0x5efe43){const _0x347cdd=a104_0x117372,_0x36aa1c=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':_0x347cdd(0x204),'body':{'provider':_0x53c8a2,'accountId':_0x5efe43}});return _0x36aa1c[_0x347cdd(0x1a5)];}function runtimeSchedulePath(_0xa96956,_0x5e18b2=''){const _0x19dac6=a104_0x117372;return _0x19dac6(0x19d)+encodeURIComponent(_0xa96956)+_0x19dac6(0x19b)+_0x5e18b2;}export async function validateRuntimeSchedule(_0x5ddff6,_0x471c31){const _0x5f17b3=a104_0x117372,_0xabf110=await apiRequest(runtimeSchedulePath(_0x5ddff6,_0x5f17b3(0x17e)),{'method':'POST','body':_0x471c31});return _0xabf110[_0x5f17b3(0x1a5)];}export async function createRuntimeSchedule(_0x1a8b40,_0x27f964){const _0x3f2d5f=a104_0x117372,_0x5da9e7=await apiRequest(runtimeSchedulePath(_0x1a8b40),{'method':_0x3f2d5f(0x204),'body':_0x27f964});return _0x5da9e7[_0x3f2d5f(0x1a5)];}export async function listRuntimeSchedules(_0x29f780,_0x3deaf0){const _0x5129b3=a104_0x117372,_0x58fb5c=new URLSearchParams();_0x58fb5c[_0x5129b3(0x1db)](_0x5129b3(0x16e),_0x3deaf0[_0x5129b3(0x16e)]);if(_0x3deaf0[_0x5129b3(0x20a)]!==undefined)_0x58fb5c[_0x5129b3(0x1db)](_0x5129b3(0x20a),String(_0x3deaf0['limit']));if(_0x3deaf0['cursor'])_0x58fb5c[_0x5129b3(0x1db)](_0x5129b3(0x199),_0x3deaf0['cursor']);const _0x2cdd0b=_0x58fb5c[_0x5129b3(0x1f4)]>0x0?'?'+_0x58fb5c[_0x5129b3(0x201)]():'',_0x323f29=await apiRequest(''+runtimeSchedulePath(_0x29f780)+_0x2cdd0b);return _0x323f29[_0x5129b3(0x1a5)];}export async function getRuntimeSchedule(_0x5db223,_0x20cfb0){const _0x36741f=await apiRequest(runtimeSchedulePath(_0x5db223,'/'+encodeURIComponent(_0x20cfb0)));return _0x36741f['data'];}export async function deleteRuntimeSchedule(_0x20ceb6,_0x554777){const _0x4c2e37=a104_0x117372,_0x174391=await apiRequest(runtimeSchedulePath(_0x20ceb6,'/'+encodeURIComponent(_0x554777)),{'method':_0x4c2e37(0x171)});return _0x174391['data'];}export async function runRuntimeSchedule(_0x217066,_0xcd44dd){const _0x40975d=a104_0x117372,_0x367bee=await apiRequest(runtimeSchedulePath(_0x217066,'/'+encodeURIComponent(_0xcd44dd)+_0x40975d(0x169)),{'method':_0x40975d(0x204)});return _0x367bee[_0x40975d(0x1a5)];}export async function listDatasets(_0x969e1,_0x586cf9){const _0xadb7ea=a104_0x117372,_0x580e3e=await apiRequest(_0xadb7ea(0x17f),{'method':'POST','body':{'appCode':_0x969e1,..._0x586cf9?.['code']&&{'code':_0x586cf9[_0xadb7ea(0x1f9)]},..._0x586cf9?.[_0xadb7ea(0x1cc)]&&{'name':_0x586cf9['name']}}});return extractList(_0x580e3e[_0xadb7ea(0x1a5)]);}export async function getDatasetDetail(_0x245704){const _0x18169c=a104_0x117372,_0x1cf5b9=await apiRequest(_0x18169c(0x13a)+encodeURIComponent(_0x245704));return _0x1cf5b9[_0x18169c(0x1a5)];}export async function getDatasetSdkUsageDoc(_0x3100eb,_0x36fb82){const _0xa15f2b=a104_0x117372,_0x3a0462=await toolboxRequest(_0xa15f2b(0x1de),{'datasetCode':_0x3100eb,'appCode':_0x36fb82});return typeof _0x3a0462?.[_0xa15f2b(0x1b3)]===_0xa15f2b(0x1b2)?_0x3a0462[_0xa15f2b(0x1b3)]:'';}export async function uploadRuntimeFile(_0x34b2bb,_0x2e9f5c){const _0x438a4b=a104_0x117372,_0x41b868=await readFile(_0x2e9f5c),_0x29c5a2=new FormData();_0x29c5a2[_0x438a4b(0x1fb)](_0x438a4b(0x1b5),_0x34b2bb),_0x29c5a2['append']('file',new Blob([new Uint8Array(_0x41b868)]),basename(_0x2e9f5c));const _0x59faf6=await apiFormRequest('/client/uploadFile',_0x29c5a2);return _0x59faf6[_0x438a4b(0x1a5)];}export async function queryRuntimeFileUrl(_0x58e22a,_0x4b5e7b={}){const _0x149a56=a104_0x117372,_0x3a60f0=await apiRequest('/client/queryFileUrl',{'method':_0x149a56(0x204),'body':{'filePath':_0x58e22a,'downloadFlag':_0x4b5e7b[_0x149a56(0x172)]??![],..._0x4b5e7b[_0x149a56(0x144)]?{'longTerm':!![]}:{}}});return _0x3a60f0[_0x149a56(0x1a5)];}export async function recognizeRuntimeOcr(_0x5d5b9b,_0x43419a){const _0x2618d9=a104_0x117372,_0x48353f=await apiRequest(_0x2618d9(0x164),{'method':_0x2618d9(0x204),'body':{'appCode':_0x5d5b9b,'url':_0x43419a[_0x2618d9(0x1a3)],'type':_0x43419a[_0x2618d9(0x18f)]}});return _0x48353f[_0x2618d9(0x1a5)];}export async function getRuntimeAppConfigByKey(_0x1839e6,_0x1fc8ce){const _0x4131ea=a104_0x117372,_0x36038c=new URLSearchParams({'appCode':_0x1839e6,'key':_0x1fc8ce}),_0x2b91d1=await apiRequest(_0x4131ea(0x190)+_0x36038c[_0x4131ea(0x201)]());if(typeof _0x2b91d1['data']!==_0x4131ea(0x1b2))throw CliErrors['validation'](_0x4131ea(0x148)+_0x1fc8ce);return _0x2b91d1[_0x4131ea(0x1a5)];}export async function listNotificationChannelConfigs(_0x546f54,_0x57d9e8){const _0x1a0615=a104_0x117372,_0x530b66=new URLSearchParams({'appCode':_0x546f54,'channelType':_0x57d9e8}),_0xf8db47=await apiRequest(_0x1a0615(0x1ec)+_0x530b66[_0x1a0615(0x201)]());if(!Array[_0x1a0615(0x167)](_0xf8db47[_0x1a0615(0x1a5)]))throw CliErrors[_0x1a0615(0x1a9)](_0x1a0615(0x168),'Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.');return _0xf8db47[_0x1a0615(0x1a5)];}export async function listRuntimeArtifacts(_0x2d5eaf,_0x2a0bbd){const _0x2c0584=a104_0x117372,_0x1586e2=new URLSearchParams({'appCode':_0x2d5eaf});if(_0x2a0bbd?.[_0x2c0584(0x1e5)])_0x1586e2[_0x2c0584(0x1db)](_0x2c0584(0x1e5),_0x2a0bbd['artifactType']);if(_0x2a0bbd?.[_0x2c0584(0x165)])_0x1586e2[_0x2c0584(0x1db)](_0x2c0584(0x165),_0x2a0bbd['source']);if(_0x2a0bbd?.['favorite']!==undefined)_0x1586e2[_0x2c0584(0x1db)](_0x2c0584(0x1cb),String(_0x2a0bbd['favorite']));const _0x2aa3ac=await apiRequest(_0x2c0584(0x140)+_0x1586e2['toString']());return Array[_0x2c0584(0x167)](_0x2aa3ac['data'])?_0x2aa3ac[_0x2c0584(0x1a5)]:[];}export async function getRuntimeArtifact(_0x556ffb,_0x2cbc99){const _0x11e27d=a104_0x117372,_0x2ebbd8=await apiRequest(_0x11e27d(0x188)+_0x556ffb+_0x11e27d(0x193)+encodeURIComponent(_0x2cbc99));if(!_0x2ebbd8['data'])throw CliErrors['validation'](_0x11e27d(0x1aa)+_0x556ffb);return _0x2ebbd8['data'];}export async function createRuntimeArtifact(_0x3f26a8,_0x10e164){const _0x2fb06b=a104_0x117372,_0x34fd54=await apiRequest('/client/artifact/create',{'method':_0x2fb06b(0x204),'body':{'appCode':_0x3f26a8,..._0x10e164}});return _0x34fd54[_0x2fb06b(0x1a5)];}export async function updateRuntimeArtifact(_0x477f4e,_0x568643,_0x1bdc8e){const _0x127c9c=a104_0x117372,_0x40ed6d=await apiRequest(_0x127c9c(0x188)+_0x477f4e+_0x127c9c(0x1a1),{'method':'POST','body':{'appCode':_0x568643,..._0x1bdc8e}});return _0x40ed6d[_0x127c9c(0x1a5)];}export async function listPersonalBffs(_0x257093){const _0x111373=a104_0x117372,_0x234077=await apiRequest(_0x111373(0x1fc)+encodeURIComponent(_0x257093));return Array[_0x111373(0x167)](_0x234077[_0x111373(0x1a5)])?_0x234077['data']:[];}export async function getPersonalBff(_0x505bd1,_0x2d66ef){const _0x4e47fc=a104_0x117372,_0x9353ca=await apiRequest(_0x4e47fc(0x161)+_0x505bd1+'?appCode='+encodeURIComponent(_0x2d66ef));if(!_0x9353ca[_0x4e47fc(0x1a5)])throw CliErrors[_0x4e47fc(0x1a7)](_0x4e47fc(0x1ef)+_0x505bd1);return _0x9353ca[_0x4e47fc(0x1a5)];}export async function createPersonalBff(_0x40d0a7,_0x365b57){const _0x2446b6=a104_0x117372,_0x37283b=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x2446b6(0x204),'body':{'appCode':_0x40d0a7,..._0x365b57}});return _0x37283b[_0x2446b6(0x1a5)];}export async function updatePersonalBff(_0x2de987,_0x260238,_0x4727f6){const _0x96f857=a104_0x117372,_0x373f4b=await apiRequest(_0x96f857(0x161)+_0x2de987+'/update',{'method':_0x96f857(0x204),'body':{'appCode':_0x260238,..._0x4727f6}});return _0x373f4b[_0x96f857(0x1a5)];}export async function executePersonalBff(_0x1bb3a9,_0x1db419,_0x2b4067){const _0x24310f=a104_0x117372,_0x494462=await apiRequest(_0x24310f(0x161)+_0x1bb3a9+'/execute?appCode='+encodeURIComponent(_0x1db419),{'method':'POST','body':_0x2b4067});return _0x494462['data'];}export async function listPersonalKnowledgeBaseItems(_0x262050){const _0xecee92=a104_0x117372,_0x4b0d20=await apiRequest(_0xecee92(0x1d4)+encodeURIComponent(_0x262050));return Array[_0xecee92(0x167)](_0x4b0d20[_0xecee92(0x1a5)])?_0x4b0d20[_0xecee92(0x1a5)]:[];}export async function getPersonalKnowledgeBaseItem(_0x510d83,_0x5248de){const _0x39e74f=a104_0x117372,_0x52457c=await apiRequest(_0x39e74f(0x1d6)+_0x510d83+_0x39e74f(0x193)+encodeURIComponent(_0x5248de));if(!_0x52457c[_0x39e74f(0x1a5)])throw CliErrors[_0x39e74f(0x1a7)](_0x39e74f(0x16f)+_0x510d83);return _0x52457c[_0x39e74f(0x1a5)];}export async function createPersonalKnowledgeBaseItem(_0x2031ff,_0x1ef58d){const _0x5898b2=a104_0x117372,_0x1056ef=await apiRequest(_0x5898b2(0x1d0),{'method':_0x5898b2(0x204),'body':{'appCode':_0x2031ff,..._0x1ef58d}});return _0x1056ef[_0x5898b2(0x1a5)];}export async function updatePersonalKnowledgeBaseItem(_0x2ee099,_0x4e5648,_0x209a1b){const _0x203adf=a104_0x117372,_0x3e271c=await apiRequest(_0x203adf(0x1d6)+_0x2ee099+_0x203adf(0x1a1),{'method':_0x203adf(0x204),'body':{'appCode':_0x4e5648,..._0x209a1b}});return _0x3e271c['data'];}export async function getRuntimeSkillByCode(_0x214a52,_0x161b89){const _0xaa16f3=a104_0x117372,_0x52e55f=await skillHubJsonRequest(_0xaa16f3(0x1f3)+encodeURIComponent(_0x214a52)+'/'+encodeURIComponent(_0x161b89),{'allowNotFound':!![]});return _0x52e55f?skillHubRuntimeDetailToRuntimeSkill(_0x52e55f):undefined;}export async function listRuntimeSkills(_0x7d2f09){const _0xdb6648=a104_0x117372,_0x59b9cf=await skillHubJsonRequest(_0xdb6648(0x149)+encodeURIComponent(_0x7d2f09[_0xdb6648(0x1b5)])+_0xdb6648(0x1d3),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x7d2f09[_0xdb6648(0x1b5)],_0x59b9cf,_0x7d2f09[_0xdb6648(0x1bf)]??'all',_0x7d2f09[_0xdb6648(0x1f9)]);}export async function listPersonalRuntimeSkills(_0x5b368f){const _0x3e5dfd=a104_0x117372;return(await listRuntimeSkills({'appCode':_0x5b368f,'scope':'personal'}))[_0x3e5dfd(0x187)];}export async function listCompanyRuntimeSkills(_0x5e3356){const _0x44cd3f=a104_0x117372;return(await listRuntimeSkills({'appCode':_0x5e3356,'scope':_0x44cd3f(0x1b6)}))[_0x44cd3f(0x1b6)];}export async function listVisibleRuntimeSkills(_0x352ac4){const _0x16343b=a104_0x117372;return(await listRuntimeSkills({'appCode':_0x352ac4,'scope':_0x16343b(0x186)}))[_0x16343b(0x182)];}export async function createPersonalRuntimeSkill(_0x2ff2fe,_0x2b49d3,_0x45bf17={}){const _0xa0ed57=a104_0x117372;return publishRuntimeSkill(_0x2ff2fe,_0x2b49d3,{'visibility':'PRIVATE','confirmWarnings':_0x45bf17[_0xa0ed57(0x1fd)]});}export async function updatePersonalRuntimeSkill(_0x585451,_0x5ddf15,_0x50d47e,_0x24381e={}){const _0x276e40=a104_0x117372;return publishRuntimeSkill(_0x5ddf15,{..._0x50d47e,'skillCode':_0x50d47e[_0x276e40(0x13b)]??_0x585451},{'visibility':'PRIVATE','confirmWarnings':_0x24381e[_0x276e40(0x1fd)]});}export async function publishCompanyRuntimeSkill(_0x372420,_0x1b7006,_0x21a706={}){const _0x3cfe6f=a104_0x117372;return publishRuntimeSkill(_0x372420,_0x1b7006,{'visibility':_0x3cfe6f(0x1e3),'confirmWarnings':_0x21a706[_0x3cfe6f(0x1fd)]});}export async function validateRuntimeSkillPublish(_0x135ad1,_0x2ab979,_0x37b75d){const _0x2b1d86=a104_0x117372,_0x457d19=buildRuntimeSkillPublishForm(_0x2ab979,_0x37b75d['visibility']),_0x1e39e8=await skillHubJsonRequest(_0x2b1d86(0x1ae)+encodeURIComponent(_0x135ad1)+_0x2b1d86(0x141),{'method':_0x2b1d86(0x204),'body':_0x457d19});return assertJointDiagramAcknowledged(_0x2ab979['diagram'],_0x1e39e8[_0x2b1d86(0x1df)],_0x2b1d86(0x1a7)),{'valid':_0x1e39e8[_0x2b1d86(0x1c3)]===!![],'errors':Array[_0x2b1d86(0x167)](_0x1e39e8[_0x2b1d86(0x19c)])?_0x1e39e8[_0x2b1d86(0x19c)]:[],'warnings':Array['isArray'](_0x1e39e8[_0x2b1d86(0x1ba)])?_0x1e39e8[_0x2b1d86(0x1ba)]:[],'resolvedSlug':_0x1e39e8[_0x2b1d86(0x1af)],'resolvedVersion':_0x1e39e8[_0x2b1d86(0x203)],'diagramValidated':_0x1e39e8[_0x2b1d86(0x1df)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x137dc9,_0x294d28,_0x6359cc,_0x1604fb,_0x294bbc){const _0x3a3f99=a104_0x117372;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x137dc9,_0x294d28,_0x6359cc,_0x3a3f99(0x17e)),{'method':_0x3a3f99(0x204),'query':{'scope':_0x1604fb},'headers':{'Content-Type':_0x3a3f99(0x15c)},'body':JSON[_0x3a3f99(0x14e)](_0x294bbc)});}export async function putRuntimeSkillVersionDiagram(_0x15d7b1,_0x58601f,_0x18e985,_0x645f71,_0x1e513b){const _0x4a0842=a104_0x117372;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x15d7b1,_0x58601f,_0x18e985),{'method':_0x4a0842(0x206),'query':{'scope':_0x645f71},'headers':{'Content-Type':_0x4a0842(0x15c)},'body':JSON['stringify'](_0x1e513b)});}export async function getRuntimeSkillVersionDiagram(_0x1bf001,_0x5d6f89,_0x240ee8,_0x56ff7a){const _0x11e9e3=a104_0x117372,_0x49757a=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x1bf001,_0x5d6f89,_0x240ee8),{'query':{'scope':_0x56ff7a}});if(typeof _0x49757a['found']!==_0x11e9e3(0x205))throw CliErrors['apiError']('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.');const _0x218d65=_0x49757a[_0x11e9e3(0x17d)];if(typeof _0x218d65!==_0x11e9e3(0x1b2)||!/^sha256:[0-9a-f]{64}$/[_0x11e9e3(0x18c)](_0x218d65))throw CliErrors[_0x11e9e3(0x1a9)]('Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.');const _0x3d3199=_0x49757a[_0x11e9e3(0x16b)];if(_0x49757a['found']&&(!Number[_0x11e9e3(0x1c6)](_0x3d3199)||Number(_0x3d3199)<0x1))throw CliErrors[_0x11e9e3(0x1a9)](_0x11e9e3(0x143));if(!_0x49757a['found']&&_0x3d3199!==undefined&&_0x3d3199!==null)throw CliErrors[_0x11e9e3(0x1a9)](_0x11e9e3(0x1f1));const _0x1497ee=_0x49757a[_0x11e9e3(0x1eb)]?Number(_0x3d3199):null;return{..._0x49757a,'sourceFingerprint':_0x218d65,'diagramRevision':_0x1497ee,'expectedDiagramRevision':_0x1497ee??0x0};}export async function downloadRuntimeSkillPackage(_0x4728df,_0x4409b1,_0x42bee7,_0x5c82c6){const _0x113e8a=a104_0x117372;void _0x4728df;const _0x3a8c1b=_0x5c82c6?_0x113e8a(0x1ae)+encodeURIComponent(_0x42bee7)+'/'+encodeURIComponent(_0x4409b1)+'/versions/'+encodeURIComponent(_0x5c82c6)+_0x113e8a(0x1e8):'/api/cli/v1/skills/'+encodeURIComponent(_0x42bee7)+'/'+encodeURIComponent(_0x4409b1)+_0x113e8a(0x1e8);return skillHubBinaryRequest(_0x3a8c1b);}async function publishRuntimeSkill(_0x52548d,_0x27c76b,_0x103eaf){const _0x547bfb=a104_0x117372,_0x5b0adf=buildRuntimeSkillPublishForm(_0x27c76b,_0x103eaf[_0x547bfb(0x1b1)]),_0xbd8e0d=await skillHubJsonRequest(_0x547bfb(0x1ae)+encodeURIComponent(_0x52548d)+_0x547bfb(0x197),{'method':_0x547bfb(0x204),'query':{'confirmWarnings':_0x103eaf[_0x547bfb(0x1fd)]===!![]?!![]:undefined},'body':_0x5b0adf});return assertJointDiagramAcknowledged(_0x27c76b[_0x547bfb(0x19f)],_0xbd8e0d[_0x547bfb(0x185)],'publish'),{'appCode':_0xbd8e0d[_0x547bfb(0x15e)]??_0x52548d,'skillCode':_0xbd8e0d[_0x547bfb(0x1fe)]??_0x27c76b[_0x547bfb(0x13b)]??'','skillName':_0x27c76b[_0x547bfb(0x1d2)]??_0xbd8e0d[_0x547bfb(0x1fe)]??_0x27c76b[_0x547bfb(0x13b)],'description':_0x27c76b[_0x547bfb(0x1b8)],'scope':skillHubVisibilityToScope(_0xbd8e0d[_0x547bfb(0x1b1)]??_0x103eaf[_0x547bfb(0x1b1)])??_0x547bfb(0x187),'version':_0xbd8e0d[_0x547bfb(0x162)]??_0x27c76b['version'],'tags':_0x27c76b[_0x547bfb(0x1be)],'content':_0x27c76b[_0x547bfb(0x1ad)],'diagramBound':_0xbd8e0d[_0x547bfb(0x185)]===!![]};}function a104_0x296f(_0xd08b1a,_0x340d93){_0xd08b1a=_0xd08b1a-0x13a;const _0x1315c3=a104_0x1315();let _0x296f98=_0x1315c3[_0xd08b1a];return _0x296f98;}function assertJointDiagramAcknowledged(_0x1dcc11,_0x458868,_0x50e6c4){const _0x5b134e=a104_0x117372;if(!_0x1dcc11||_0x458868===!![])return;throw CliErrors[_0x5b134e(0x1a9)](_0x5b134e(0x180)+_0x50e6c4+'.',_0x5b134e(0x1f8));}function buildRuntimeSkillPublishForm(_0x292812,_0x317fc6){const _0x3216f6=a104_0x117372,_0x40d48e=new FormData();return _0x40d48e[_0x3216f6(0x1db)](_0x3216f6(0x1b9),runtimeSkillPackageFile(_0x292812)),_0x292812['skillName']?.[_0x3216f6(0x1e9)]()&&_0x40d48e[_0x3216f6(0x1db)](_0x3216f6(0x152),_0x292812[_0x3216f6(0x1d2)][_0x3216f6(0x1e9)]()),_0x40d48e[_0x3216f6(0x1db)]('visibility',_0x317fc6),_0x292812[_0x3216f6(0x19f)]&&_0x40d48e[_0x3216f6(0x1db)](_0x3216f6(0x19f),new Blob([JSON[_0x3216f6(0x14e)](_0x292812[_0x3216f6(0x19f)])],{'type':_0x3216f6(0x15c)})),_0x40d48e;}function runtimeSkillVersionDiagramPath(_0x1495fd,_0x241fc1,_0x324ce7,_0x509805=''){const _0x4e01bc=a104_0x117372;return _0x4e01bc(0x1ae)+encodeURIComponent(_0x1495fd)+'/'+encodeURIComponent(_0x241fc1)+'/versions/'+encodeURIComponent(_0x324ce7)+_0x4e01bc(0x1f7)+_0x509805;}function runtimeSkillPackageFile(_0x3f7fc5){const _0x564dfd=a104_0x117372;if(!_0x3f7fc5[_0x564dfd(0x1ab)])throw CliErrors[_0x564dfd(0x1a7)]('Missing\x20Skill\x20package\x20payload.');const _0x56d5a1=Buffer[_0x564dfd(0x17c)](_0x3f7fc5[_0x564dfd(0x1ab)],_0x564dfd(0x181)),_0x2cf6ae=new Blob([_0x56d5a1],{'type':_0x564dfd(0x14c)}),_0x1a6aa5=(_0x3f7fc5[_0x564dfd(0x13b)]||_0x564dfd(0x14d))+_0x564dfd(0x1c1);if(typeof File!==_0x564dfd(0x1bb))return new File([_0x2cf6ae],_0x1a6aa5,{'type':'application/zip'});return _0x2cf6ae;}function normalizeSkillHubRuntimeListResponse(_0x4f08a7,_0x532eef,_0x5036a8,_0x540f93){const _0x5822f2=a104_0x117372,_0x323c1d=Array[_0x5822f2(0x167)](_0x532eef)?_0x532eef:Array['isArray'](_0x532eef?.[_0x5822f2(0x1d1)])?_0x532eef['items']:[],_0x55aee0=_0x540f93?.[_0x5822f2(0x1e9)](),_0x33b8e6=_0x323c1d['filter'](_0xcece1=>!_0x55aee0||_0xcece1['slug']===_0x55aee0)['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x245349=>Boolean(_0x245349)),_0x19bca1=_0x33b8e6[_0x5822f2(0x183)](_0x9683dc=>_0x9683dc['scope']===_0x5822f2(0x187)),_0x3f48a3=_0x33b8e6[_0x5822f2(0x183)](_0x474d9b=>_0x474d9b[_0x5822f2(0x1bf)]===_0x5822f2(0x1b6));return{'appCode':_0x4f08a7,'personal':_0x5036a8===_0x5822f2(0x1b6)?[]:_0x19bca1,'company':_0x5036a8==='personal'?[]:_0x3f48a3,'effective':buildEffectiveRuntimeSkills(_0x19bca1,_0x3f48a3,_0x5036a8)};}function skillHubRuntimeItemToRuntimeSkill(_0x572223){const _0x1a7579=a104_0x117372,_0x2443b6=_0x572223[_0x1a7579(0x1fe)]?.['trim'](),_0x250359=skillHubVisibilityToScope(_0x572223[_0x1a7579(0x1b1)]);if(!_0x2443b6||!_0x250359)return undefined;return{'id':_0x572223['id'],'appCode':_0x572223['namespace'],'skillCode':_0x2443b6,'skillName':_0x572223['displayName']??_0x2443b6,'description':_0x572223[_0x1a7579(0x1cd)],'example':_0x572223[_0x1a7579(0x160)],'scope':_0x250359,'version':skillHubRuntimeItemVersion(_0x572223),'status':_0x572223[_0x1a7579(0x198)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x43fdfe){const _0x18c440=a104_0x117372,_0x2ab672=_0x43fdfe[_0x18c440(0x1fe)]?.[_0x18c440(0x1e9)]();if(!_0x2ab672)return undefined;return{'id':_0x43fdfe['id'],'appCode':_0x43fdfe[_0x18c440(0x15e)],'skillCode':_0x2ab672,'skillName':_0x43fdfe[_0x18c440(0x152)]??_0x2ab672,'description':_0x43fdfe['summary'],'example':_0x43fdfe['example'],'scope':skillHubVisibilityToScope(_0x43fdfe[_0x18c440(0x1b1)])??_0x43fdfe['visibility']?.[_0x18c440(0x151)](),'version':skillHubRuntimeItemVersion(_0x43fdfe),'status':_0x43fdfe[_0x18c440(0x198)]};}function skillHubVisibilityToScope(_0x79ab8b){const _0x40e62a=a104_0x117372;if(_0x79ab8b===_0x40e62a(0x16d))return _0x40e62a(0x187);if(_0x79ab8b==='NAMESPACE_ONLY')return _0x40e62a(0x1b6);return undefined;}function skillHubRuntimeItemVersion(_0xcdd16b){const _0x39a794=a104_0x117372;return _0xcdd16b['publishedVersion']?.[_0x39a794(0x162)]??_0xcdd16b[_0x39a794(0x1b7)]?.[_0x39a794(0x162)]??_0xcdd16b[_0x39a794(0x147)]?.['version'];}function buildEffectiveRuntimeSkills(_0xfb8234,_0xe84c8e,_0x5174ef){const _0x55e40b=a104_0x117372;if(_0x5174ef===_0x55e40b(0x187))return _0xfb8234;if(_0x5174ef===_0x55e40b(0x1b6))return _0xe84c8e;const _0x4badbd=new Map();for(const _0x1c7e5d of _0xe84c8e){_0x4badbd[_0x55e40b(0x1db)](_0x1c7e5d[_0x55e40b(0x13b)],_0x1c7e5d);}for(const _0x465aef of _0xfb8234){_0x4badbd['set'](_0x465aef[_0x55e40b(0x13b)],_0x465aef);}return Array['from'](_0x4badbd[_0x55e40b(0x1dd)]());}function normalizeRuntimeSkillListResponse(_0x33b119,_0x2c54bb){const _0x4ccaf2=a104_0x117372;if(Array[_0x4ccaf2(0x167)](_0x2c54bb)){const _0x46752f=_0x2c54bb[_0x4ccaf2(0x183)](_0xcda818=>_0xcda818['scope']===_0x4ccaf2(0x187)),_0x590fc8=_0x2c54bb[_0x4ccaf2(0x183)](_0x5797e0=>_0x5797e0['scope']===_0x4ccaf2(0x1b6));return{'appCode':_0x33b119,'personal':_0x46752f,'company':_0x590fc8,'effective':[..._0x590fc8,..._0x46752f]};}return{'appCode':_0x2c54bb?.[_0x4ccaf2(0x1b5)]??_0x33b119,'personal':Array[_0x4ccaf2(0x167)](_0x2c54bb?.['personal'])?_0x2c54bb[_0x4ccaf2(0x187)]:[],'company':Array[_0x4ccaf2(0x167)](_0x2c54bb?.[_0x4ccaf2(0x1b6)])?_0x2c54bb['company']:[],'effective':Array[_0x4ccaf2(0x167)](_0x2c54bb?.['effective'])?_0x2c54bb[_0x4ccaf2(0x182)]:[]};}function normalizeRuntimeRoleUserList(_0x5710a7,_0x4bebdf){const _0x2707f2=a104_0x117372;if(!Array['isArray'](_0x5710a7))throw CliErrors['apiError']('Invalid\x20runtime\x20role\x20members\x20response:\x20'+_0x4bebdf+_0x2707f2(0x158));return _0x5710a7[_0x2707f2(0x1c8)]((_0x99e032,_0x33fc93)=>{const _0x24362c=_0x2707f2;if(!_0x99e032||typeof _0x99e032!==_0x24362c(0x1e7)||Array[_0x24362c(0x167)](_0x99e032))throw CliErrors[_0x24362c(0x1a9)](_0x24362c(0x1c9)+_0x4bebdf+'['+_0x33fc93+']\x20must\x20be\x20an\x20object.');const _0x46d87b=_0x99e032,_0x243dab=normalizePositiveSafeInteger(_0x46d87b[_0x24362c(0x1bc)]);if(_0x243dab===undefined)throw CliErrors['apiError'](_0x24362c(0x1c9)+_0x4bebdf+'['+_0x33fc93+_0x24362c(0x194));return{..._0x46d87b,'userId':_0x243dab};});}function normalizeRuntimeRoleUsersResponse(_0x3d9b0f){const _0x247d37=a104_0x117372;return extractList(_0x3d9b0f)[_0x247d37(0x1c8)]((_0x41c5f7,_0x11acf2)=>{const _0x169ec3=_0x247d37;if(!_0x41c5f7||typeof _0x41c5f7!=='object'||Array[_0x169ec3(0x167)](_0x41c5f7))throw CliErrors['apiError'](_0x169ec3(0x146)+_0x11acf2+']\x20must\x20be\x20an\x20object.');const _0x4a6d8b=_0x41c5f7;return{..._0x4a6d8b,'userList':normalizeRuntimeRoleUserList(_0x4a6d8b[_0x169ec3(0x1a4)],_0x169ec3(0x153)+_0x11acf2+_0x169ec3(0x13c)),..._0x4a6d8b[_0x169ec3(0x18b)]===undefined?{}:{'applyUserList':normalizeRuntimeRoleUserList(_0x4a6d8b[_0x169ec3(0x18b)],'roleList['+_0x11acf2+'].applyUserList')}};});}export async function listRuntimeAppRoles(_0x3f9b96,_0x242425={}){const _0x536e3d=a104_0x117372,_0x1d5d76=_0x242425['currentPage']??0x1,_0x2c561e=Math[_0x536e3d(0x1b4)](Math[_0x536e3d(0x20b)](_0x242425[_0x536e3d(0x1a8)]??0x64,0x1),0x64),_0x1d7559=await apiRequest(_0x536e3d(0x173),{'method':_0x536e3d(0x204),'body':{'appCode':_0x3f9b96,..._0x242425[_0x536e3d(0x1f0)]?{'roleName':_0x242425[_0x536e3d(0x1f0)]}:{},'currentPage':_0x1d5d76,'pageSize':_0x2c561e}});return{'items':extractList(_0x1d7559['data']),'paging':extractPaging(_0x1d7559[_0x536e3d(0x1a5)])};}export async function createRuntimeAppRole(_0x5e37e3){const _0x14ead0=a104_0x117372,_0x2ac645=await apiRequest(_0x14ead0(0x196),{'method':_0x14ead0(0x204),'body':{'roleType':_0x14ead0(0x176),..._0x5e37e3}});return _0x2ac645[_0x14ead0(0x1a5)];}export async function updateRuntimeAppRole(_0x3da7ab){const _0x4c25d4=a104_0x117372,_0x25ba01=await apiRequest(_0x4c25d4(0x1ac),{'method':_0x4c25d4(0x204),'body':_0x3da7ab});return _0x25ba01['data'];}export async function deleteRuntimeAppRole(_0x35e365){const _0x11e942=a104_0x117372,_0x708ac9=await apiRequest(_0x11e942(0x19a),{'method':_0x11e942(0x204),'body':{'id':_0x35e365}});return _0x708ac9[_0x11e942(0x1a5)];}export async function listRuntimeRoleUsers(_0x599889){const _0x37ffc5=a104_0x117372,_0x565253=await apiRequest('/client/permit/user-role/get-user-list',{'method':_0x37ffc5(0x204),'body':{'appCode':_0x599889}});return normalizeRuntimeRoleUsersResponse(_0x565253[_0x37ffc5(0x1a5)]);}export async function updateRuntimeRoleUsers(_0x1f350f,_0x1449fb){const _0x4bb00a=a104_0x117372,_0x212ebf=await apiRequest('/client/permit/user-role/update-user-list',{'method':_0x4bb00a(0x204),'body':{'appCode':_0x1f350f,'roleList':_0x1449fb}});return _0x212ebf['data'];}export async function listRuntimeAppUsers(_0x5c8535){const _0x94c61c=a104_0x117372,_0x25459a=await apiRequest(_0x94c61c(0x13d)+runtimePermitQuery({'appCode':_0x5c8535}));return extractList(_0x25459a[_0x94c61c(0x1a5)]);}function runtimePermitQuery(_0x31b13c){const _0x555ea8=a104_0x117372,_0x311199=new URLSearchParams();for(const [_0x49e83f,_0x17deec]of Object[_0x555ea8(0x1c2)](_0x31b13c))_0x311199[_0x555ea8(0x1db)](_0x49e83f,String(_0x17deec));return'?'+_0x311199[_0x555ea8(0x201)]();}export async function listRuntimePermitRoles(_0x28158f,_0x132c36={}){const _0x51e657=a104_0x117372,_0x13d7ca=await apiRequest(_0x51e657(0x184),{'method':_0x51e657(0x204),'body':{'appCode':_0x28158f,..._0x132c36}});return extractList(_0x13d7ca['data']);}export async function getRuntimePagePermit(_0x28bfb8){const _0xf9923f=a104_0x117372,_0x333d73=await apiRequest(_0xf9923f(0x14a)+runtimePermitQuery({'menuId':_0x28bfb8}));return _0x333d73[_0xf9923f(0x1a5)];}export async function saveRuntimePagePermit(_0xc67258){const _0x18cc81=a104_0x117372,_0x1ed6f8=await apiRequest('/client/permit/page/save',{'method':_0x18cc81(0x204),'body':_0xc67258});return _0x1ed6f8[_0x18cc81(0x1a5)];}export async function getRuntimeRoleMenuResources(_0xc03585,_0xfff2e0){const _0xbf4b5a=a104_0x117372,_0x12ccbe=await apiRequest(_0xbf4b5a(0x200),{'method':_0xbf4b5a(0x204),'body':{'appCode':_0xc03585,'roleId':_0xfff2e0}});return extractList(_0x12ccbe[_0xbf4b5a(0x1a5)]);}export async function listRuntimeMenuRolePermits(_0x1a195a){const _0x19ef95=a104_0x117372,_0x365c0d=await apiRequest('/client/menu/permit-list'+runtimePermitQuery({'appCode':_0x1a195a}));return Array[_0x19ef95(0x167)](_0x365c0d[_0x19ef95(0x1a5)]?.[_0x19ef95(0x17b)])?_0x365c0d['data']['permitList']:[];}export async function saveRuntimeMenuRolePermits(_0x412ddf,_0x50182f){const _0x89e947=a104_0x117372,_0x46ff15=await apiRequest(_0x89e947(0x156),{'method':_0x89e947(0x204),'body':{'appCode':_0x412ddf,'permitList':_0x50182f}});return _0x46ff15['data'];}export async function listRuntimeDatasetPermits(_0x4130eb,_0x3471b2){const _0x5e82c2=a104_0x117372,_0x460de7=await apiRequest('/client/permit/dataset/list'+runtimePermitQuery({'appCode':_0x4130eb,'roleId':_0x3471b2}));return Array[_0x5e82c2(0x167)](_0x460de7[_0x5e82c2(0x1a5)]?.[_0x5e82c2(0x17b)])?_0x460de7[_0x5e82c2(0x1a5)][_0x5e82c2(0x17b)]:[];}export async function listRuntimeDatasetRolePermits(_0x2da9e8){const _0x57ccba=a104_0x117372,_0x4ecb74=await apiRequest('/client/permit/dataset/permit-list'+runtimePermitQuery({'appCode':_0x2da9e8}));return Array[_0x57ccba(0x167)](_0x4ecb74['data']?.[_0x57ccba(0x17b)])?_0x4ecb74[_0x57ccba(0x1a5)][_0x57ccba(0x17b)]:[];}export async function saveRuntimeDatasetRolePermits(_0x46d91b,_0x2a7649){const _0x91531c=a104_0x117372,_0x5c090d=await apiRequest('/client/permit/resource/batch-save-dataset',{'method':_0x91531c(0x204),'body':{'appCode':_0x46d91b,'permitList':_0x2a7649}});return _0x5c090d[_0x91531c(0x1a5)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1088ba,_0x5c4543){const _0x371d08=a105_0x19c0,_0x6fdde3=_0x1088ba();while(!![]){try{const _0x34e6b3=-parseInt(_0x371d08(0x174))/0x1*(parseInt(_0x371d08(0x16a))/0x2)+parseInt(_0x371d08(0x163))/0x3+-parseInt(_0x371d08(0x167))/0x4*(parseInt(_0x371d08(0x171))/0x5)+-parseInt(_0x371d08(0x16e))/0x6+parseInt(_0x371d08(0x172))/0x7*(-parseInt(_0x371d08(0x166))/0x8)+parseInt(_0x371d08(0x16d))/0x9*(parseInt(_0x371d08(0x173))/0xa)+parseInt(_0x371d08(0x16f))/0xb*(parseInt(_0x371d08(0x164))/0xc);if(_0x34e6b3===_0x5c4543)break;else _0x6fdde3['push'](_0x6fdde3['shift']());}catch(_0x25488c){_0x6fdde3['push'](_0x6fdde3['shift']());}}}(a105_0x4f3e,0x7a15d));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a105_0x19c0(_0x373644,_0x3cbf95){_0x373644=_0x373644-0x161;const _0x4f3e71=a105_0x4f3e();let _0x19c099=_0x4f3e71[_0x373644];return _0x19c099;}export async function listDatabases(_0x6d1990){const _0x2519de=a105_0x19c0;if(cache[_0x2519de(0x161)](_0x6d1990))return cache[_0x2519de(0x165)](_0x6d1990);const _0x44cf86=await listDatasets(_0x6d1990),_0xff4496=new Map();for(const _0x2ee37a of _0x44cf86){const _0x35edc8=_0x2ee37a['dbtableConfig'];_0x35edc8?.[_0x2519de(0x170)]!=null&&_0xff4496[_0x2519de(0x16b)](_0x35edc8['dbId'],_0x35edc8[_0x2519de(0x162)]??_0x2519de(0x168)+_0x35edc8['dbId']);}const _0x288832=[..._0xff4496[_0x2519de(0x169)]()]['map'](([_0x12fba0,_0x1a144c])=>({'dbId':_0x12fba0,'dbName':_0x1a144c}));return cache['set'](_0x6d1990,_0x288832),_0x288832;}function a105_0x4f3e(){const _0x44b5c5=['48twuupk','2904848sAbksy','db-','entries','1890858dwzxsL','set','find','9HLGIdQ','5730330VPlbqb','77ZaUXwV','dbId','5YsebdH','565019MJifSJ','7685630IQLQXt','1SbCpID','has','dbName','2567037OGLzfc','3405972mbjeEU','get'];a105_0x4f3e=function(){return _0x44b5c5;};return a105_0x4f3e();}export async function getDbName(_0x5c5c5a,_0x2cda69){const _0x883d9c=a105_0x19c0;try{const _0x59519c=await listDatabases(_0x5c5c5a);return _0x59519c[_0x883d9c(0x16c)](_0x183c1e=>_0x183c1e[_0x883d9c(0x170)]===_0x2cda69)?.[_0x883d9c(0x162)];}catch{return undefined;}}
|