UNPKG

wuying-agentbay-sdk-inner-test

Version:

TypeScript SDK for interacting with the Wuying AgentBay cloud runtime environment

1,678 lines (1,592 loc) 291 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // node_modules/tsup/assets/cjs_shims.js var init_cjs_shims = __esm({ "node_modules/tsup/assets/cjs_shims.js"() { "use strict"; } }); // node_modules/dotenv/package.json var require_package = __commonJS({ "node_modules/dotenv/package.json"(exports, module) { module.exports = { name: "dotenv", version: "16.6.1", description: "Loads environment variables from .env file", main: "lib/main.js", types: "lib/main.d.ts", exports: { ".": { types: "./lib/main.d.ts", require: "./lib/main.js", default: "./lib/main.js" }, "./config": "./config.js", "./config.js": "./config.js", "./lib/env-options": "./lib/env-options.js", "./lib/env-options.js": "./lib/env-options.js", "./lib/cli-options": "./lib/cli-options.js", "./lib/cli-options.js": "./lib/cli-options.js", "./package.json": "./package.json" }, scripts: { "dts-check": "tsc --project tests/types/tsconfig.json", lint: "standard", pretest: "npm run lint && npm run dts-check", test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000", "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov", prerelease: "npm test", release: "standard-version" }, repository: { type: "git", url: "git://github.com/motdotla/dotenv.git" }, homepage: "https://github.com/motdotla/dotenv#readme", funding: "https://dotenvx.com", keywords: [ "dotenv", "env", ".env", "environment", "variables", "config", "settings" ], readmeFilename: "README.md", license: "BSD-2-Clause", devDependencies: { "@types/node": "^18.11.3", decache: "^4.6.2", sinon: "^14.0.1", standard: "^17.0.0", "standard-version": "^9.5.0", tap: "^19.2.0", typescript: "^4.8.4" }, engines: { node: ">=12" }, browser: { fs: false } }; } }); // node_modules/dotenv/lib/main.js var require_main = __commonJS({ "node_modules/dotenv/lib/main.js"(exports, module) { "use strict"; init_cjs_shims(); var fs3 = __require("fs"); var path3 = __require("path"); var os = __require("os"); var crypto2 = __require("crypto"); var packageJson = require_package(); var version = packageJson.version; var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; function parse2(src) { const obj = {}; let lines = src.toString(); lines = lines.replace(/\r\n?/mg, "\n"); let match; while ((match = LINE.exec(lines)) != null) { const key = match[1]; let value = match[2] || ""; value = value.trim(); const maybeQuote = value[0]; value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"); if (maybeQuote === '"') { value = value.replace(/\\n/g, "\n"); value = value.replace(/\\r/g, "\r"); } obj[key] = value; } return obj; } __name(parse2, "parse"); function _parseVault(options) { options = options || {}; const vaultPath = _vaultPath(options); options.path = vaultPath; const result = DotenvModule.configDotenv(options); if (!result.parsed) { const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); err.code = "MISSING_DATA"; throw err; } const keys = _dotenvKey(options).split(","); const length = keys.length; let decrypted; for (let i = 0; i < length; i++) { try { const key = keys[i].trim(); const attrs = _instructions(result, key); decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); break; } catch (error) { if (i + 1 >= length) { throw error; } } } return DotenvModule.parse(decrypted); } __name(_parseVault, "_parseVault"); function _warn(message) { console.log(`[dotenv@${version}][WARN] ${message}`); } __name(_warn, "_warn"); function _debug(message) { console.log(`[dotenv@${version}][DEBUG] ${message}`); } __name(_debug, "_debug"); function _log(message) { console.log(`[dotenv@${version}] ${message}`); } __name(_log, "_log"); function _dotenvKey(options) { if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { return options.DOTENV_KEY; } if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { return process.env.DOTENV_KEY; } return ""; } __name(_dotenvKey, "_dotenvKey"); function _instructions(result, dotenvKey) { let uri; try { uri = new URL(dotenvKey); } catch (error) { if (error.code === "ERR_INVALID_URL") { const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); err.code = "INVALID_DOTENV_KEY"; throw err; } throw error; } const key = uri.password; if (!key) { const err = new Error("INVALID_DOTENV_KEY: Missing key part"); err.code = "INVALID_DOTENV_KEY"; throw err; } const environment = uri.searchParams.get("environment"); if (!environment) { const err = new Error("INVALID_DOTENV_KEY: Missing environment part"); err.code = "INVALID_DOTENV_KEY"; throw err; } const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; const ciphertext = result.parsed[environmentKey]; if (!ciphertext) { const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); err.code = "NOT_FOUND_DOTENV_ENVIRONMENT"; throw err; } return { ciphertext, key }; } __name(_instructions, "_instructions"); function _vaultPath(options) { let possibleVaultPath = null; if (options && options.path && options.path.length > 0) { if (Array.isArray(options.path)) { for (const filepath of options.path) { if (fs3.existsSync(filepath)) { possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`; } } } else { possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`; } } else { possibleVaultPath = path3.resolve(process.cwd(), ".env.vault"); } if (fs3.existsSync(possibleVaultPath)) { return possibleVaultPath; } return null; } __name(_vaultPath, "_vaultPath"); function _resolveHome(envPath) { return envPath[0] === "~" ? path3.join(os.homedir(), envPath.slice(1)) : envPath; } __name(_resolveHome, "_resolveHome"); function _configVault(options) { const debug = Boolean(options && options.debug); const quiet = options && "quiet" in options ? options.quiet : true; if (debug || !quiet) { _log("Loading env from encrypted .env.vault"); } const parsed = DotenvModule._parseVault(options); let processEnv = process.env; if (options && options.processEnv != null) { processEnv = options.processEnv; } DotenvModule.populate(processEnv, parsed, options); return { parsed }; } __name(_configVault, "_configVault"); function configDotenv(options) { const dotenvPath = path3.resolve(process.cwd(), ".env"); let encoding = "utf8"; const debug = Boolean(options && options.debug); const quiet = options && "quiet" in options ? options.quiet : true; if (options && options.encoding) { encoding = options.encoding; } else { if (debug) { _debug("No encoding is specified. UTF-8 is used by default"); } } let optionPaths = [dotenvPath]; if (options && options.path) { if (!Array.isArray(options.path)) { optionPaths = [_resolveHome(options.path)]; } else { optionPaths = []; for (const filepath of options.path) { optionPaths.push(_resolveHome(filepath)); } } } let lastError; const parsedAll = {}; for (const path4 of optionPaths) { try { const parsed = DotenvModule.parse(fs3.readFileSync(path4, { encoding })); DotenvModule.populate(parsedAll, parsed, options); } catch (e) { if (debug) { _debug(`Failed to load ${path4} ${e.message}`); } lastError = e; } } let processEnv = process.env; if (options && options.processEnv != null) { processEnv = options.processEnv; } DotenvModule.populate(processEnv, parsedAll, options); if (debug || !quiet) { const keysCount = Object.keys(parsedAll).length; const shortPaths = []; for (const filePath of optionPaths) { try { const relative = path3.relative(process.cwd(), filePath); shortPaths.push(relative); } catch (e) { if (debug) { _debug(`Failed to load ${filePath} ${e.message}`); } lastError = e; } } _log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`); } if (lastError) { return { parsed: parsedAll, error: lastError }; } else { return { parsed: parsedAll }; } } __name(configDotenv, "configDotenv"); function config(options) { if (_dotenvKey(options).length === 0) { return DotenvModule.configDotenv(options); } const vaultPath = _vaultPath(options); if (!vaultPath) { _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); return DotenvModule.configDotenv(options); } return DotenvModule._configVault(options); } __name(config, "config"); function decrypt(encrypted, keyStr) { const key = Buffer.from(keyStr.slice(-64), "hex"); let ciphertext = Buffer.from(encrypted, "base64"); const nonce = ciphertext.subarray(0, 12); const authTag = ciphertext.subarray(-16); ciphertext = ciphertext.subarray(12, -16); try { const aesgcm = crypto2.createDecipheriv("aes-256-gcm", key, nonce); aesgcm.setAuthTag(authTag); return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; } catch (error) { const isRange = error instanceof RangeError; const invalidKeyLength = error.message === "Invalid key length"; const decryptionFailed = error.message === "Unsupported state or unable to authenticate data"; if (isRange || invalidKeyLength) { const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); err.code = "INVALID_DOTENV_KEY"; throw err; } else if (decryptionFailed) { const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY"); err.code = "DECRYPTION_FAILED"; throw err; } else { throw error; } } } __name(decrypt, "decrypt"); function populate(processEnv, parsed, options = {}) { const debug = Boolean(options && options.debug); const override = Boolean(options && options.override); if (typeof parsed !== "object") { const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate"); err.code = "OBJECT_REQUIRED"; throw err; } for (const key of Object.keys(parsed)) { if (Object.prototype.hasOwnProperty.call(processEnv, key)) { if (override === true) { processEnv[key] = parsed[key]; } if (debug) { if (override === true) { _debug(`"${key}" is already defined and WAS overwritten`); } else { _debug(`"${key}" is already defined and was NOT overwritten`); } } } else { processEnv[key] = parsed[key]; } } } __name(populate, "populate"); var DotenvModule = { configDotenv, _configVault, _parseVault, config, decrypt, parse: parse2, populate }; module.exports.configDotenv = DotenvModule.configDotenv; module.exports._configVault = DotenvModule._configVault; module.exports._parseVault = DotenvModule._parseVault; module.exports.config = DotenvModule.config; module.exports.decrypt = DotenvModule.decrypt; module.exports.parse = DotenvModule.parse; module.exports.populate = DotenvModule.populate; module.exports = DotenvModule; } }); // node_modules/dotenv/lib/env-options.js var require_env_options = __commonJS({ "node_modules/dotenv/lib/env-options.js"(exports, module) { "use strict"; init_cjs_shims(); var options = {}; if (process.env.DOTENV_CONFIG_ENCODING != null) { options.encoding = process.env.DOTENV_CONFIG_ENCODING; } if (process.env.DOTENV_CONFIG_PATH != null) { options.path = process.env.DOTENV_CONFIG_PATH; } if (process.env.DOTENV_CONFIG_QUIET != null) { options.quiet = process.env.DOTENV_CONFIG_QUIET; } if (process.env.DOTENV_CONFIG_DEBUG != null) { options.debug = process.env.DOTENV_CONFIG_DEBUG; } if (process.env.DOTENV_CONFIG_OVERRIDE != null) { options.override = process.env.DOTENV_CONFIG_OVERRIDE; } if (process.env.DOTENV_CONFIG_DOTENV_KEY != null) { options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY; } module.exports = options; } }); // node_modules/dotenv/lib/cli-options.js var require_cli_options = __commonJS({ "node_modules/dotenv/lib/cli-options.js"(exports, module) { "use strict"; init_cjs_shims(); var re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/; module.exports = /* @__PURE__ */ __name(function optionMatcher(args) { const options = args.reduce(function(acc, cur) { const matches = cur.match(re); if (matches) { acc[matches[1]] = matches[2]; } return acc; }, {}); if (!("quiet" in options)) { options.quiet = "true"; } return options; }, "optionMatcher"); } }); // src/index.ts init_cjs_shims(); // src/agent-bay.ts init_cjs_shims(); var _openapicore = require('@alicloud/openapi-core'); var _openapicore2 = _interopRequireDefault(_openapicore); // node_modules/dotenv/config.js init_cjs_shims(); (function() { require_main().config( Object.assign( {}, require_env_options(), require_cli_options()(process.argv) ) ); })(); // src/api/index.ts init_cjs_shims(); // src/api/client.ts init_cjs_shims(); var _typescript = require('@darabonba/typescript'); var $dara77 = _interopRequireWildcard(_typescript); var $dara = _interopRequireWildcard(_typescript); var $dara2 = _interopRequireWildcard(_typescript); var $dara3 = _interopRequireWildcard(_typescript); var $dara4 = _interopRequireWildcard(_typescript); var $dara5 = _interopRequireWildcard(_typescript); var $dara6 = _interopRequireWildcard(_typescript); var $dara7 = _interopRequireWildcard(_typescript); var $dara8 = _interopRequireWildcard(_typescript); var $dara9 = _interopRequireWildcard(_typescript); var $dara10 = _interopRequireWildcard(_typescript); var $dara11 = _interopRequireWildcard(_typescript); var $dara12 = _interopRequireWildcard(_typescript); var $dara13 = _interopRequireWildcard(_typescript); var $dara14 = _interopRequireWildcard(_typescript); var $dara15 = _interopRequireWildcard(_typescript); var $dara16 = _interopRequireWildcard(_typescript); var $dara17 = _interopRequireWildcard(_typescript); var $dara18 = _interopRequireWildcard(_typescript); var $dara19 = _interopRequireWildcard(_typescript); var $dara20 = _interopRequireWildcard(_typescript); var $dara21 = _interopRequireWildcard(_typescript); var $dara22 = _interopRequireWildcard(_typescript); var $dara23 = _interopRequireWildcard(_typescript); var $dara24 = _interopRequireWildcard(_typescript); var $dara25 = _interopRequireWildcard(_typescript); var $dara26 = _interopRequireWildcard(_typescript); var $dara27 = _interopRequireWildcard(_typescript); var $dara28 = _interopRequireWildcard(_typescript); var $dara29 = _interopRequireWildcard(_typescript); var $dara30 = _interopRequireWildcard(_typescript); var $dara31 = _interopRequireWildcard(_typescript); var $dara32 = _interopRequireWildcard(_typescript); var $dara33 = _interopRequireWildcard(_typescript); var $dara34 = _interopRequireWildcard(_typescript); var $dara35 = _interopRequireWildcard(_typescript); var $dara36 = _interopRequireWildcard(_typescript); var $dara37 = _interopRequireWildcard(_typescript); var $dara38 = _interopRequireWildcard(_typescript); var $dara39 = _interopRequireWildcard(_typescript); var $dara40 = _interopRequireWildcard(_typescript); var $dara42 = _interopRequireWildcard(_typescript); var $dara41 = _interopRequireWildcard(_typescript); var $dara43 = _interopRequireWildcard(_typescript); var $dara44 = _interopRequireWildcard(_typescript); var $dara45 = _interopRequireWildcard(_typescript); var $dara46 = _interopRequireWildcard(_typescript); var $dara47 = _interopRequireWildcard(_typescript); var $dara48 = _interopRequireWildcard(_typescript); var $dara49 = _interopRequireWildcard(_typescript); var $dara50 = _interopRequireWildcard(_typescript); var $dara51 = _interopRequireWildcard(_typescript); var $dara52 = _interopRequireWildcard(_typescript); var $dara53 = _interopRequireWildcard(_typescript); var $dara54 = _interopRequireWildcard(_typescript); var $dara55 = _interopRequireWildcard(_typescript); var $dara56 = _interopRequireWildcard(_typescript); var $dara57 = _interopRequireWildcard(_typescript); var $dara58 = _interopRequireWildcard(_typescript); var $dara59 = _interopRequireWildcard(_typescript); var $dara60 = _interopRequireWildcard(_typescript); var $dara61 = _interopRequireWildcard(_typescript); var $dara62 = _interopRequireWildcard(_typescript); var $dara63 = _interopRequireWildcard(_typescript); var $dara64 = _interopRequireWildcard(_typescript); var $dara65 = _interopRequireWildcard(_typescript); var $dara66 = _interopRequireWildcard(_typescript); var $dara67 = _interopRequireWildcard(_typescript); var $dara68 = _interopRequireWildcard(_typescript); var $dara69 = _interopRequireWildcard(_typescript); var $dara70 = _interopRequireWildcard(_typescript); var $dara71 = _interopRequireWildcard(_typescript); var $dara72 = _interopRequireWildcard(_typescript); var $dara73 = _interopRequireWildcard(_typescript); var $dara74 = _interopRequireWildcard(_typescript); var $dara75 = _interopRequireWildcard(_typescript); var $dara76 = _interopRequireWildcard(_typescript); // src/api/models/model.ts init_cjs_shims(); // src/api/models/ApplyMqttTokenResponseBodyData.ts init_cjs_shims(); var _ApplyMqttTokenResponseBodyData = class _ApplyMqttTokenResponseBodyData extends $dara.Model { static names() { return { accessKeyId: "AccessKeyId", clientId: "ClientId", expiration: "Expiration", instanceId: "InstanceId", regionId: "RegionId", securityToken: "SecurityToken" }; } static types() { return { accessKeyId: "string", clientId: "string", expiration: "string", instanceId: "string", regionId: "string", securityToken: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_ApplyMqttTokenResponseBodyData, "ApplyMqttTokenResponseBodyData"); var ApplyMqttTokenResponseBodyData = _ApplyMqttTokenResponseBodyData; // src/api/models/CreateMcpSessionRequestPersistenceDataList.ts init_cjs_shims(); var _CreateMcpSessionRequestPersistenceDataList = class _CreateMcpSessionRequestPersistenceDataList extends $dara2.Model { static names() { return { contextId: "ContextId", path: "Path", policy: "Policy" }; } static types() { return { contextId: "string", path: "string", policy: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionRequestPersistenceDataList, "CreateMcpSessionRequestPersistenceDataList"); var CreateMcpSessionRequestPersistenceDataList = _CreateMcpSessionRequestPersistenceDataList; // src/api/models/CreateMcpSessionResponseBodyData.ts init_cjs_shims(); var _CreateMcpSessionResponseBodyData = class _CreateMcpSessionResponseBodyData extends $dara3.Model { static names() { return { appInstanceId: "AppInstanceId", errMsg: "ErrMsg", httpPort: "HttpPort", networkInterfaceIp: "NetworkInterfaceIp", resourceId: "ResourceId", resourceUrl: "ResourceUrl", sessionId: "SessionId", success: "Success", token: "Token", vpcResource: "VpcResource" }; } static types() { return { appInstanceId: "string", errMsg: "string", httpPort: "string", networkInterfaceIp: "string", resourceId: "string", resourceUrl: "string", sessionId: "string", success: "boolean", token: "string", vpcResource: "boolean" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionResponseBodyData, "CreateMcpSessionResponseBodyData"); var CreateMcpSessionResponseBodyData = _CreateMcpSessionResponseBodyData; // src/api/models/GetContextResponseBodyData.ts init_cjs_shims(); var _GetContextResponseBodyData = class _GetContextResponseBodyData extends $dara4.Model { static names() { return { createTime: "CreateTime", id: "Id", lastUsedTime: "LastUsedTime", name: "Name", osType: "OsType", state: "State" }; } static types() { return { createTime: "string", id: "string", lastUsedTime: "string", name: "string", osType: "string", state: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetContextResponseBodyData, "GetContextResponseBodyData"); var GetContextResponseBodyData = _GetContextResponseBodyData; // src/api/models/GetContextInfoResponseBodyData.ts init_cjs_shims(); var _GetContextInfoResponseBodyData = class _GetContextInfoResponseBodyData extends $dara5.Model { static names() { return { contextStatus: "ContextStatus" }; } static types() { return { contextStatus: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetContextInfoResponseBodyData, "GetContextInfoResponseBodyData"); var GetContextInfoResponseBodyData = _GetContextInfoResponseBodyData; // src/api/models/GetLabelResponseBodyData.ts init_cjs_shims(); var _GetLabelResponseBodyData = class _GetLabelResponseBodyData extends $dara6.Model { static names() { return { labels: "Labels" }; } static types() { return { labels: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetLabelResponseBodyData, "GetLabelResponseBodyData"); var GetLabelResponseBodyData = _GetLabelResponseBodyData; // src/api/models/GetLinkResponseBodyData.ts init_cjs_shims(); var _GetLinkResponseBodyData = class _GetLinkResponseBodyData extends $dara7.Model { static names() { return { url: "Url" }; } static types() { return { url: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetLinkResponseBodyData, "GetLinkResponseBodyData"); var GetLinkResponseBodyData = _GetLinkResponseBodyData; // src/api/models/GetMcpResourceResponseBodyDataDesktopInfo.ts init_cjs_shims(); var _GetMcpResourceResponseBodyDataDesktopInfo = class _GetMcpResourceResponseBodyDataDesktopInfo extends $dara8.Model { static names() { return { appId: "AppId", authCode: "AuthCode", connectionProperties: "ConnectionProperties", resourceId: "ResourceId", resourceType: "ResourceType", ticket: "Ticket" }; } static types() { return { appId: "string", authCode: "string", connectionProperties: "string", resourceId: "string", resourceType: "string", ticket: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetMcpResourceResponseBodyDataDesktopInfo, "GetMcpResourceResponseBodyDataDesktopInfo"); var GetMcpResourceResponseBodyDataDesktopInfo = _GetMcpResourceResponseBodyDataDesktopInfo; // src/api/models/GetMcpResourceResponseBodyData.ts init_cjs_shims(); var _GetMcpResourceResponseBodyData = class _GetMcpResourceResponseBodyData extends $dara9.Model { static names() { return { desktopInfo: "DesktopInfo", resourceUrl: "ResourceUrl", sessionId: "SessionId" }; } static types() { return { desktopInfo: GetMcpResourceResponseBodyDataDesktopInfo, resourceUrl: "string", sessionId: "string" }; } validate() { if (this.desktopInfo && typeof this.desktopInfo.validate === "function") { this.desktopInfo.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetMcpResourceResponseBodyData, "GetMcpResourceResponseBodyData"); var GetMcpResourceResponseBodyData = _GetMcpResourceResponseBodyData; // src/api/models/ListContextsResponseBodyData.ts init_cjs_shims(); var _ListContextsResponseBodyData = class _ListContextsResponseBodyData extends $dara10.Model { static names() { return { createTime: "CreateTime", id: "Id", lastUsedTime: "LastUsedTime", name: "Name", osType: "OsType", state: "State" }; } static types() { return { createTime: "string", id: "string", lastUsedTime: "string", name: "string", osType: "string", state: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_ListContextsResponseBodyData, "ListContextsResponseBodyData"); var ListContextsResponseBodyData = _ListContextsResponseBodyData; // src/api/models/ListSessionResponseBodyData.ts init_cjs_shims(); var _ListSessionResponseBodyData = class _ListSessionResponseBodyData extends $dara11.Model { static names() { return { sessionId: "SessionId" }; } static types() { return { sessionId: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_ListSessionResponseBodyData, "ListSessionResponseBodyData"); var ListSessionResponseBodyData = _ListSessionResponseBodyData; // src/api/models/ApplyMqttTokenRequest.ts init_cjs_shims(); var _ApplyMqttTokenRequest = class _ApplyMqttTokenRequest extends $dara12.Model { static names() { return { desktopId: "DesktopId", sessionToken: "SessionToken" }; } static types() { return { desktopId: "string", sessionToken: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_ApplyMqttTokenRequest, "ApplyMqttTokenRequest"); var ApplyMqttTokenRequest = _ApplyMqttTokenRequest; // src/api/models/ApplyMqttTokenResponseBody.ts init_cjs_shims(); var _ApplyMqttTokenResponseBody = class _ApplyMqttTokenResponseBody extends $dara13.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: ApplyMqttTokenResponseBodyData, httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_ApplyMqttTokenResponseBody, "ApplyMqttTokenResponseBody"); var ApplyMqttTokenResponseBody = _ApplyMqttTokenResponseBody; // src/api/models/ApplyMqttTokenResponse.ts init_cjs_shims(); var _ApplyMqttTokenResponse = class _ApplyMqttTokenResponse extends $dara14.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: ApplyMqttTokenResponseBody }; } validate() { if (this.headers) { $dara14.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_ApplyMqttTokenResponse, "ApplyMqttTokenResponse"); var ApplyMqttTokenResponse = _ApplyMqttTokenResponse; // src/api/models/CallMcpToolRequest.ts init_cjs_shims(); var _CallMcpToolRequest = class _CallMcpToolRequest extends $dara15.Model { static names() { return { args: "Args", authorization: "Authorization", externalUserId: "ExternalUserId", imageId: "ImageId", name: "Name", server: "Server", sessionId: "SessionId", tool: "Tool" }; } static types() { return { args: "string", authorization: "string", externalUserId: "string", imageId: "string", name: "string", server: "string", sessionId: "string", tool: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_CallMcpToolRequest, "CallMcpToolRequest"); var CallMcpToolRequest = _CallMcpToolRequest; // src/api/models/CallMcpToolResponseBody.ts init_cjs_shims(); var _CallMcpToolResponseBody = class _CallMcpToolResponseBody extends $dara16.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: "any", httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_CallMcpToolResponseBody, "CallMcpToolResponseBody"); var CallMcpToolResponseBody = _CallMcpToolResponseBody; // src/api/models/CallMcpToolResponse.ts init_cjs_shims(); var _CallMcpToolResponse = class _CallMcpToolResponse extends $dara17.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: CallMcpToolResponseBody }; } validate() { if (this.headers) { $dara17.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_CallMcpToolResponse, "CallMcpToolResponse"); var CallMcpToolResponse = _CallMcpToolResponse; // src/api/models/CreateMcpSessionRequest.ts init_cjs_shims(); var _CreateMcpSessionRequest = class _CreateMcpSessionRequest extends $dara18.Model { static names() { return { authorization: "Authorization", contextId: "ContextId", externalUserId: "ExternalUserId", imageId: "ImageId", labels: "Labels", mcpPolicyId: "McpPolicyId", persistenceDataList: "PersistenceDataList", sessionId: "SessionId", vpcResource: "VpcResource" }; } static types() { return { authorization: "string", contextId: "string", externalUserId: "string", imageId: "string", labels: "string", mcpPolicyId: "string", persistenceDataList: { "type": "array", "itemType": CreateMcpSessionRequestPersistenceDataList }, sessionId: "string", vpcResource: "boolean" }; } validate() { if (Array.isArray(this.persistenceDataList)) { $dara18.Model.validateArray(this.persistenceDataList); } super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionRequest, "CreateMcpSessionRequest"); var CreateMcpSessionRequest = _CreateMcpSessionRequest; // src/api/models/CreateMcpSessionShrinkRequest.ts init_cjs_shims(); var _CreateMcpSessionShrinkRequest = class _CreateMcpSessionShrinkRequest extends $dara19.Model { static names() { return { authorization: "Authorization", contextId: "ContextId", externalUserId: "ExternalUserId", imageId: "ImageId", labels: "Labels", mcpPolicyId: "McpPolicyId", persistenceDataListShrink: "PersistenceDataList", sessionId: "SessionId", vpcResource: "VpcResource" }; } static types() { return { authorization: "string", contextId: "string", externalUserId: "string", imageId: "string", labels: "string", mcpPolicyId: "string", persistenceDataListShrink: "string", sessionId: "string", vpcResource: "boolean" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionShrinkRequest, "CreateMcpSessionShrinkRequest"); var CreateMcpSessionShrinkRequest = _CreateMcpSessionShrinkRequest; // src/api/models/CreateMcpSessionResponseBody.ts init_cjs_shims(); var _CreateMcpSessionResponseBody = class _CreateMcpSessionResponseBody extends $dara20.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: CreateMcpSessionResponseBodyData, httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionResponseBody, "CreateMcpSessionResponseBody"); var CreateMcpSessionResponseBody = _CreateMcpSessionResponseBody; // src/api/models/CreateMcpSessionResponse.ts init_cjs_shims(); var _CreateMcpSessionResponse = class _CreateMcpSessionResponse extends $dara21.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: CreateMcpSessionResponseBody }; } validate() { if (this.headers) { $dara21.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_CreateMcpSessionResponse, "CreateMcpSessionResponse"); var CreateMcpSessionResponse = _CreateMcpSessionResponse; // src/api/models/DeleteContextRequest.ts init_cjs_shims(); var _DeleteContextRequest = class _DeleteContextRequest extends $dara22.Model { static names() { return { authorization: "Authorization", id: "Id" }; } static types() { return { authorization: "string", id: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_DeleteContextRequest, "DeleteContextRequest"); var DeleteContextRequest = _DeleteContextRequest; // src/api/models/DeleteContextResponseBody.ts init_cjs_shims(); var _DeleteContextResponseBody = class _DeleteContextResponseBody extends $dara23.Model { static names() { return { code: "Code", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_DeleteContextResponseBody, "DeleteContextResponseBody"); var DeleteContextResponseBody = _DeleteContextResponseBody; // src/api/models/DeleteContextResponse.ts init_cjs_shims(); var _DeleteContextResponse = class _DeleteContextResponse extends $dara24.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: DeleteContextResponseBody }; } validate() { if (this.headers) { $dara24.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_DeleteContextResponse, "DeleteContextResponse"); var DeleteContextResponse = _DeleteContextResponse; // src/api/models/GetContextRequest.ts init_cjs_shims(); var _GetContextRequest = class _GetContextRequest extends $dara25.Model { static names() { return { allowCreate: "AllowCreate", authorization: "Authorization", name: "Name" }; } static types() { return { allowCreate: "boolean", authorization: "string", name: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetContextRequest, "GetContextRequest"); var GetContextRequest = _GetContextRequest; // src/api/models/GetContextResponseBody.ts init_cjs_shims(); var _GetContextResponseBody = class _GetContextResponseBody extends $dara26.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: GetContextResponseBodyData, httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetContextResponseBody, "GetContextResponseBody"); var GetContextResponseBody = _GetContextResponseBody; // src/api/models/GetContextResponse.ts init_cjs_shims(); var _GetContextResponse = class _GetContextResponse extends $dara27.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: GetContextResponseBody }; } validate() { if (this.headers) { $dara27.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetContextResponse, "GetContextResponse"); var GetContextResponse = _GetContextResponse; // src/api/models/GetContextInfoRequest.ts init_cjs_shims(); var _GetContextInfoRequest = class _GetContextInfoRequest extends $dara28.Model { static names() { return { authorization: "Authorization", contextId: "ContextId", path: "Path", sessionId: "SessionId", taskType: "TaskType" }; } static types() { return { authorization: "string", contextId: "string", path: "string", sessionId: "string", taskType: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetContextInfoRequest, "GetContextInfoRequest"); var GetContextInfoRequest = _GetContextInfoRequest; // src/api/models/GetContextInfoResponseBody.ts init_cjs_shims(); var _GetContextInfoResponseBody = class _GetContextInfoResponseBody extends $dara29.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: GetContextInfoResponseBodyData, httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetContextInfoResponseBody, "GetContextInfoResponseBody"); var GetContextInfoResponseBody = _GetContextInfoResponseBody; // src/api/models/GetContextInfoResponse.ts init_cjs_shims(); var _GetContextInfoResponse = class _GetContextInfoResponse extends $dara30.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: GetContextInfoResponseBody }; } validate() { if (this.headers) { $dara30.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetContextInfoResponse, "GetContextInfoResponse"); var GetContextInfoResponse = _GetContextInfoResponse; // src/api/models/GetLabelRequest.ts init_cjs_shims(); var _GetLabelRequest = class _GetLabelRequest extends $dara31.Model { static names() { return { authorization: "Authorization", maxResults: "MaxResults", nextToken: "NextToken", sessionId: "SessionId" }; } static types() { return { authorization: "string", maxResults: "number", nextToken: "string", sessionId: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetLabelRequest, "GetLabelRequest"); var GetLabelRequest = _GetLabelRequest; // src/api/models/GetLabelResponseBody.ts init_cjs_shims(); var _GetLabelResponseBody = class _GetLabelResponseBody extends $dara32.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", maxResults: "MaxResults", message: "Message", nextToken: "NextToken", requestId: "RequestId", success: "Success", totalCount: "TotalCount" }; } static types() { return { code: "string", data: GetLabelResponseBodyData, httpStatusCode: "number", maxResults: "number", message: "string", nextToken: "string", requestId: "string", success: "boolean", totalCount: "number" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetLabelResponseBody, "GetLabelResponseBody"); var GetLabelResponseBody = _GetLabelResponseBody; // src/api/models/GetLabelResponse.ts init_cjs_shims(); var _GetLabelResponse = class _GetLabelResponse extends $dara33.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: GetLabelResponseBody }; } validate() { if (this.headers) { $dara33.Model.validateMap(this.headers); } if (this.body && typeof this.body.validate === "function") { this.body.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetLabelResponse, "GetLabelResponse"); var GetLabelResponse = _GetLabelResponse; // src/api/models/GetLinkRequest.ts init_cjs_shims(); var _GetLinkRequest = class _GetLinkRequest extends $dara34.Model { static names() { return { authorization: "Authorization", port: "Port", protocolType: "ProtocolType", sessionId: "SessionId" }; } static types() { return { authorization: "string", port: "number", protocolType: "string", sessionId: "string" }; } validate() { super.validate(); } constructor(map) { super(map); } }; __name(_GetLinkRequest, "GetLinkRequest"); var GetLinkRequest = _GetLinkRequest; // src/api/models/GetLinkResponseBody.ts init_cjs_shims(); var _GetLinkResponseBody = class _GetLinkResponseBody extends $dara35.Model { static names() { return { code: "Code", data: "Data", httpStatusCode: "HttpStatusCode", message: "Message", requestId: "RequestId", success: "Success" }; } static types() { return { code: "string", data: GetLinkResponseBodyData, httpStatusCode: "number", message: "string", requestId: "string", success: "boolean" }; } validate() { if (this.data && typeof this.data.validate === "function") { this.data.validate(); } super.validate(); } constructor(map) { super(map); } }; __name(_GetLinkResponseBody, "GetLinkResponseBody"); var GetLinkResponseBody = _GetLinkResponseBody; // src/api/models/GetLinkResponse.ts init_cjs_shims(); var _GetLinkResponse = class _GetLinkResponse extends $dara36.Model { static names() { return { headers: "headers", statusCode: "statusCode", body: "body" }; } static types() { return { headers: { "type": "map", "keyType": "string", "valueType": "string" }, statusCode: "number", body: GetLinkResponseBody }; } validate() { if (this.headers) { $dara36.Model.validateMap(this.headers);