From 3770a27a9d28aa418fb70976f30fdfa4db0d41b0 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 19 Sep 2024 11:15:26 -0600 Subject: [PATCH] Consistent Location for LayerStyles --- api/lib/types.ts | 2 +- api/web/package-lock.json | 146 +-- .../CloudTAK/Menu/OverlayExplorer.vue | 2 - api/web/src/derived-types.d.ts | 911 ++++++++++-------- api/web/src/stores/map.ts | 3 +- api/web/src/stores/overlays/base.ts | 57 +- 6 files changed, 595 insertions(+), 526 deletions(-) diff --git a/api/lib/types.ts b/api/lib/types.ts index caa8b2a04..5e11855b1 100644 --- a/api/lib/types.ts +++ b/api/lib/types.ts @@ -95,7 +95,7 @@ export const ProfileOverlayResponse = createSelectSchema(schemas.ProfileOverlay, pos: Type.Integer(), opacity: Type.Number(), visible: Type.Boolean(), - styles: Type.Unknown() + styles: Type.Array(Type.Unknown()) }); export const LayerAlertResponse = createSelectSchema(schemas.LayerAlert, { diff --git a/api/web/package-lock.json b/api/web/package-lock.json index e99d2fc1a..f70a48944 100644 --- a/api/web/package-lock.json +++ b/api/web/package-lock.json @@ -2825,9 +2825,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz", - "integrity": "sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.0.tgz", + "integrity": "sha512-/IZQvg6ZR0tAkEi4tdXOraQoWeJy9gbQ/cx4I7k9dJaCk9qrXEcdouxRVz5kZXt5C2bQ9pILoAA+KB4C/d3pfw==", "cpu": [ "arm" ], @@ -2839,9 +2839,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz", - "integrity": "sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.0.tgz", + "integrity": "sha512-ETHi4bxrYnvOtXeM7d4V4kZWixib2jddFacJjsOjwbgYSRsyXYtZHC4ht134OsslPIcnkqT+TKV4eU8rNBKyyQ==", "cpu": [ "arm64" ], @@ -2853,9 +2853,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz", - "integrity": "sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.0.tgz", + "integrity": "sha512-ZWgARzhSKE+gVUX7QWaECoRQsPwaD8ZR0Oxb3aUpzdErTvlEadfQpORPXkKSdKbFci9v8MJfkTtoEHnnW9Ulng==", "cpu": [ "arm64" ], @@ -2867,9 +2867,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz", - "integrity": "sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.0.tgz", + "integrity": "sha512-h0ZAtOfHyio8Az6cwIGS+nHUfRMWBDO5jXB8PQCARVF6Na/G6XS2SFxDl8Oem+S5ZsHQgtsI7RT4JQnI1qrlaw==", "cpu": [ "x64" ], @@ -2881,9 +2881,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz", - "integrity": "sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.0.tgz", + "integrity": "sha512-9pxQJSPwFsVi0ttOmqLY4JJ9pg9t1gKhK0JDbV1yUEETSx55fdyCjt39eBQ54OQCzAF0nVGO6LfEH1KnCPvelA==", "cpu": [ "arm" ], @@ -2895,9 +2895,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz", - "integrity": "sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.0.tgz", + "integrity": "sha512-YJ5Ku5BmNJZb58A4qSEo3JlIG4d3G2lWyBi13ABlXzO41SsdnUKi3HQHe83VpwBVG4jHFTW65jOQb8qyoR+qzg==", "cpu": [ "arm" ], @@ -2909,9 +2909,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz", - "integrity": "sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.0.tgz", + "integrity": "sha512-U4G4u7f+QCqHlVg1Nlx+qapZy+QoG+NV6ux+upo/T7arNGwKvKP2kmGM4W5QTbdewWFgudQxi3kDNST9GT1/mg==", "cpu": [ "arm64" ], @@ -2923,9 +2923,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz", - "integrity": "sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.0.tgz", + "integrity": "sha512-aQpNlKmx3amwkA3a5J6nlXSahE1ijl0L9KuIjVOUhfOh7uw2S4piR3mtpxpRtbnK809SBtyPsM9q15CPTsY7HQ==", "cpu": [ "arm64" ], @@ -2937,9 +2937,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz", - "integrity": "sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.0.tgz", + "integrity": "sha512-9fx6Zj/7vve/Fp4iexUFRKb5+RjLCff6YTRQl4CoDhdMfDoobWmhAxQWV3NfShMzQk1Q/iCnageFyGfqnsmeqQ==", "cpu": [ "ppc64" ], @@ -2951,9 +2951,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz", - "integrity": "sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.0.tgz", + "integrity": "sha512-VWQiCcN7zBgZYLjndIEh5tamtnKg5TGxyZPWcN9zBtXBwfcGSZ5cHSdQZfQH/GB4uRxk0D3VYbOEe/chJhPGLQ==", "cpu": [ "riscv64" ], @@ -2965,9 +2965,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz", - "integrity": "sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.0.tgz", + "integrity": "sha512-EHmPnPWvyYqncObwqrosb/CpH3GOjE76vWVs0g4hWsDRUVhg61hBmlVg5TPXqF+g+PvIbqkC7i3h8wbn4Gp2Fg==", "cpu": [ "s390x" ], @@ -2979,9 +2979,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz", - "integrity": "sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.0.tgz", + "integrity": "sha512-tsSWy3YQzmpjDKnQ1Vcpy3p9Z+kMFbSIesCdMNgLizDWFhrLZIoN21JSq01g+MZMDFF+Y1+4zxgrlqPjid5ohg==", "cpu": [ "x64" ], @@ -2993,9 +2993,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz", - "integrity": "sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.0.tgz", + "integrity": "sha512-anr1Y11uPOQrpuU8XOikY5lH4Qu94oS6j0xrulHk3NkLDq19MlX8Ng/pVipjxBJ9a2l3+F39REZYyWQFkZ4/fw==", "cpu": [ "x64" ], @@ -3007,9 +3007,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz", - "integrity": "sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.0.tgz", + "integrity": "sha512-7LB+Bh+Ut7cfmO0m244/asvtIGQr5pG5Rvjz/l1Rnz1kDzM02pSX9jPaS0p+90H5I1x4d1FkCew+B7MOnoatNw==", "cpu": [ "arm64" ], @@ -3021,9 +3021,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz", - "integrity": "sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.0.tgz", + "integrity": "sha512-+3qZ4rer7t/QsC5JwMpcvCVPRcJt1cJrYS/TMJZzXIJbxWFQEVhrIc26IhB+5Z9fT9umfVc+Es2mOZgl+7jdJQ==", "cpu": [ "ia32" ], @@ -3035,9 +3035,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz", - "integrity": "sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.0.tgz", + "integrity": "sha512-YdicNOSJONVx/vuPkgPTyRoAPx3GbknBZRCOUkK84FJ/YTfs/F0vl/YsMscrB6Y177d+yDRcj+JWMPMCgshwrA==", "cpu": [ "x64" ], @@ -4546,9 +4546,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001660", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz", - "integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==", + "version": "1.0.30001662", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz", + "integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==", "dev": true, "funding": [ { @@ -7703,9 +7703,9 @@ } }, "node_modules/pmtiles": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-3.0.7.tgz", - "integrity": "sha512-kGTFNyzmNdF8yiGxuoskNwLfUkHzC1ouJ5waL6dLID+g4hKlGnohIGX4q7qXrY0rHTK+8MwIKDTrUjY70Kk5ew==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-3.1.0.tgz", + "integrity": "sha512-6JvgAQ8gElP1Ilg6ILM4KqleeKS+QcwpW8PXqhPWjRFmqF42yyUJ8sP3dZHQXm+G0HYXuw1kGlMTdVEs583pCQ==", "license": "BSD-3-Clause", "dependencies": { "@types/leaflet": "^1.9.8", @@ -8028,9 +8028,9 @@ } }, "node_modules/rollup": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.3.tgz", - "integrity": "sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.0.tgz", + "integrity": "sha512-W21MUIFPZ4+O2Je/EU+GP3iz7PH4pVPUXSbEZdatQnxo29+3rsUjgrJmzuAZU24z7yRAnFN6ukxeAhZh/c7hzg==", "dev": true, "license": "MIT", "dependencies": { @@ -8044,22 +8044,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.3", - "@rollup/rollup-android-arm64": "4.21.3", - "@rollup/rollup-darwin-arm64": "4.21.3", - "@rollup/rollup-darwin-x64": "4.21.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.3", - "@rollup/rollup-linux-arm-musleabihf": "4.21.3", - "@rollup/rollup-linux-arm64-gnu": "4.21.3", - "@rollup/rollup-linux-arm64-musl": "4.21.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3", - "@rollup/rollup-linux-riscv64-gnu": "4.21.3", - "@rollup/rollup-linux-s390x-gnu": "4.21.3", - "@rollup/rollup-linux-x64-gnu": "4.21.3", - "@rollup/rollup-linux-x64-musl": "4.21.3", - "@rollup/rollup-win32-arm64-msvc": "4.21.3", - "@rollup/rollup-win32-ia32-msvc": "4.21.3", - "@rollup/rollup-win32-x64-msvc": "4.21.3", + "@rollup/rollup-android-arm-eabi": "4.22.0", + "@rollup/rollup-android-arm64": "4.22.0", + "@rollup/rollup-darwin-arm64": "4.22.0", + "@rollup/rollup-darwin-x64": "4.22.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.0", + "@rollup/rollup-linux-arm-musleabihf": "4.22.0", + "@rollup/rollup-linux-arm64-gnu": "4.22.0", + "@rollup/rollup-linux-arm64-musl": "4.22.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.0", + "@rollup/rollup-linux-riscv64-gnu": "4.22.0", + "@rollup/rollup-linux-s390x-gnu": "4.22.0", + "@rollup/rollup-linux-x64-gnu": "4.22.0", + "@rollup/rollup-linux-x64-musl": "4.22.0", + "@rollup/rollup-win32-arm64-msvc": "4.22.0", + "@rollup/rollup-win32-ia32-msvc": "4.22.0", + "@rollup/rollup-win32-x64-msvc": "4.22.0", "fsevents": "~2.3.2" } }, diff --git a/api/web/src/components/CloudTAK/Menu/OverlayExplorer.vue b/api/web/src/components/CloudTAK/Menu/OverlayExplorer.vue index 497d6775b..4a8a9936a 100644 --- a/api/web/src/components/CloudTAK/Menu/OverlayExplorer.vue +++ b/api/web/src/components/CloudTAK/Menu/OverlayExplorer.vue @@ -101,8 +101,6 @@ export default { mode_id: overlay.id, type: overlay.type, styles: overlay.styles - }, { - layers: overlay.styles })); this.loading = false; diff --git a/api/web/src/derived-types.d.ts b/api/web/src/derived-types.d.ts index 6cc396387..73d97ec6a 100644 --- a/api/web/src/derived-types.d.ts +++ b/api/web/src/derived-types.d.ts @@ -298,7 +298,7 @@ export interface paths { /** @description Order in which results are returned based on the "sort" query param */ order: "asc" | "desc"; /** @description No Description */ - type?: "vector" | "raster" | "terrain"; + type?: "raster" | "terrain" | "vector"; /** @description No Description */ sort: "id" | "created" | "updated" | "name" | "url" | "username" | "bounds" | "center" | "minzoom" | "maxzoom" | "format" | "style" | "type"; /** @description Filter results by a human readable name field */ @@ -361,14 +361,15 @@ export interface paths { content: { "application/json": { name?: string; - type?: string; + type?: "raster" | "terrain" | "vector"; url?: string; bounds?: unknown; center?: unknown; minzoom?: number; maxzoom?: number; - style?: string; - format?: string; + /** @constant */ + style?: "zxy"; + format?: "png" | "jpeg" | "mvt"; }; }; }; @@ -392,9 +393,10 @@ export interface paths { url: string; minzoom?: number; maxzoom?: number; - format?: string; - style?: string; - type?: string; + format?: "png" | "jpeg" | "mvt"; + /** @constant */ + style?: "zxy"; + type?: "raster" | "terrain" | "vector"; bounds?: number[]; center?: number[]; }; @@ -525,9 +527,10 @@ export interface paths { url?: string; minzoom?: number; maxzoom?: number; - format?: string; - style?: string; - type?: string; + format?: "png" | "jpeg" | "mvt"; + /** @constant */ + style?: "zxy"; + type?: "raster" | "terrain" | "vector"; bounds?: number[]; center?: number[]; }; @@ -4257,19 +4260,17 @@ export interface paths { patch?: never; trace?: never; }; - "/iconset": { + "/import": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** List Iconsets */ + /** List Imports */ get: { parameters: { query: { - /** @description No Description */ - scope?: "server" | "user"; /** @description Limit the number of responses returned */ limit: number; /** @description Iterate through "pages" of items based on the "limit" query param */ @@ -4277,9 +4278,11 @@ export interface paths { /** @description Order in which results are returned based on the "sort" query param */ order: "asc" | "desc"; /** @description No Description */ - sort?: "uid" | "created" | "updated" | "version" | "name" | "username" | "default_group" | "default_friendly" | "default_hostile" | "default_neutral" | "default_unknown" | "skip_resize"; - /** @description Filter results by a human readable name field */ - filter: string; + sort?: "id" | "created" | "updated" | "name" | "status" | "error" | "batch" | "result" | "username" | "mode" | "mode_id" | "config"; + /** @description No Description */ + mode?: "Unknown" | "Mission" | "Package"; + /** @description No Description */ + mode_id?: string; }; header?: never; path?: never; @@ -4296,26 +4299,52 @@ export interface paths { "application/json": { total: number; items: { - uid: string; + id: string; created: string; updated: string; - version: number; name: string; - username: string | null; - default_group: string | null; - default_friendly: string | null; - default_hostile: string | null; - default_neutral: string | null; - default_unknown: string | null; - skip_resize: boolean; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; }[]; }; }; }; }; }; - put?: never; - /** Create Iconset */ + /** Import up to 5 unknown assets into the imports manager at a time */ + put: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + imports: { + file: string; + uid: string; + ext: string; + }[]; + }; + }; + }; + }; + }; + /** Import an unknown asset into the imports manager */ post: { parameters: { query?: never; @@ -4326,17 +4355,11 @@ export interface paths { requestBody: { content: { "application/json": { - uid: string; - version: number; /** @description Human readable name */ name: string; - scope?: "server" | "user"; - default_group?: string; - default_friendly?: string; - default_hostile?: string; - default_neutral?: string; - default_unknown?: string; - skip_resize?: boolean; + mode?: "Unknown" | "Mission" | "Package"; + mode_id?: string; + config?: unknown; }; }; }; @@ -4348,18 +4371,18 @@ export interface paths { }; content: { "application/json": { - uid: string; + id: string; created: string; updated: string; - version: number; name: string; - username: string | null; - default_group: string | null; - default_friendly: string | null; - default_hostile: string | null; - default_neutral: string | null; - default_unknown: string | null; - skip_resize: boolean; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; }; }; }; @@ -4371,26 +4394,51 @@ export interface paths { patch?: never; trace?: never; }; - "/iconset/{:iconset}": { + "/import/{:import}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Iconset */ + /** Get Import */ get: { parameters: { - query?: { - /** @description No Description */ - format?: "json" | "zip"; - /** @description No Description */ - download?: boolean; - /** @description Resize Images to 32x32px */ - resize?: boolean; - /** @description No Description */ - token?: string; + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + id: string; + created: string; + updated: string; + name: string; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; + }; + }; }; + }; + }; + /** Import an asset into a previously configured import container */ + put: { + parameters: { + query?: never; header?: never; path?: never; cookie?: never; @@ -4404,26 +4452,25 @@ export interface paths { }; content: { "application/json": { - uid: string; + id: string; created: string; updated: string; - version: number; name: string; - username: string | null; - default_group: string | null; - default_friendly: string | null; - default_hostile: string | null; - default_neutral: string | null; - default_unknown: string | null; - skip_resize: boolean; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; }; }; }; }; }; - put?: never; post?: never; - /** Delete Iconset */ + /** Delete Import */ delete: { parameters: { query?: never; @@ -4449,7 +4496,7 @@ export interface paths { }; options?: never; head?: never; - /** Update Iconset */ + /** Update Import */ patch: { parameters: { query?: never; @@ -4460,13 +4507,9 @@ export interface paths { requestBody: { content: { "application/json": { - public?: boolean; - default_group?: string; - default_friendly?: string; - default_hostile?: string; - default_neutral?: string; - default_unknown?: string; - skip_resize?: boolean; + status?: string; + error?: string; + result?: unknown; }; }; }; @@ -4478,18 +4521,18 @@ export interface paths { }; content: { "application/json": { - uid: string; + id: string; created: string; updated: string; - version: number; name: string; - username: string | null; - default_group: string | null; - default_friendly: string | null; - default_hostile: string | null; - default_neutral: string | null; - default_unknown: string | null; - skip_resize: boolean; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; }; }; }; @@ -4497,33 +4540,49 @@ export interface paths { }; trace?: never; }; - "/iconset/{:iconset}/icon": { + "/import/{:import}/batch": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - get?: never; - put?: never; - /** Create Icon */ - post: { + /** List Import Batch Job Logs */ + get: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - requestBody: { - content: { - "application/json": { - /** @description Human readable name */ - name: string; - data: string; - type2525b?: string | null; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + logs: { + message: string; + timestamp: number; + }[]; + }; }; }; }; + }; + put?: never; + /** Attach a Batch Job to an instance */ + post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; responses: { /** @description Successful Response */ 200: { @@ -4532,14 +4591,18 @@ export interface paths { }; content: { "application/json": { - id: number; + id: string; created: string; updated: string; name: string; - iconset: string; - type2525b: string | null; - data: string; - path: string; + status: string; + error: string | null; + batch: string | null; + result: unknown; + username: string; + mode: string; + mode_id: string | null; + config: unknown; }; }; }; @@ -4551,29 +4614,27 @@ export interface paths { patch?: never; trace?: never; }; - "/icon": { + "/iconset": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** List Icons */ + /** List Iconsets */ get: { parameters: { query: { /** @description No Description */ scope?: "server" | "user"; - /** @description No Description */ - limit?: number; - /** @description Iterate through "pages" of items based on the "limit" query param */ + /** @description Limit the number of responses returned */ + limit: number; + /** @description Iterate through "pages" of items based on the "limit" query param */ page: number; /** @description Order in which results are returned based on the "sort" query param */ order: "asc" | "desc"; /** @description No Description */ - sort?: "id" | "created" | "updated" | "name" | "iconset" | "type2525b" | "data" | "path"; - /** @description No Description */ - iconset?: string; + sort?: "uid" | "created" | "updated" | "version" | "name" | "username" | "default_group" | "default_friendly" | "default_hostile" | "default_neutral" | "default_unknown" | "skip_resize"; /** @description Filter results by a human readable name field */ filter: string; }; @@ -4592,14 +4653,18 @@ export interface paths { "application/json": { total: number; items: { - id: number; + uid: string; created: string; updated: string; + version: number; name: string; - iconset: string; - type2525b: string | null; - data: string; - path: string; + username: string | null; + default_group: string | null; + default_friendly: string | null; + default_hostile: string | null; + default_neutral: string | null; + default_unknown: string | null; + skip_resize: boolean; }[]; }; }; @@ -4607,80 +4672,8 @@ export interface paths { }; }; put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/iconset/{:iconset}/icon/{:icon}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Icon Metadata */ - get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - id: number; - created: string; - updated: string; - name: string; - iconset: string; - type2525b: string | null; - data: string; - path: string; - }; - }; - }; - }; - }; - put?: never; - post?: never; - /** Remove Icon from Iconset */ - delete: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - status: number; - message: string; - }; - }; - }; - }; - }; - options?: never; - head?: never; - /** Update Icon in Iconset */ - patch: { + /** Create Iconset */ + post: { parameters: { query?: never; header?: never; @@ -4690,9 +4683,17 @@ export interface paths { requestBody: { content: { "application/json": { - name?: string; - data?: string; - type2525b?: string | null; + uid: string; + version: number; + /** @description Human readable name */ + name: string; + scope?: "server" | "user"; + default_group?: string; + default_friendly?: string; + default_hostile?: string; + default_neutral?: string; + default_unknown?: string; + skip_resize?: boolean; }; }; }; @@ -4704,73 +4705,46 @@ export interface paths { }; content: { "application/json": { - id: number; + uid: string; created: string; updated: string; + version: number; name: string; - iconset: string; - type2525b: string | null; - data: string; - path: string; + username: string | null; + default_group: string | null; + default_friendly: string | null; + default_hostile: string | null; + default_neutral: string | null; + default_unknown: string | null; + skip_resize: boolean; }; }; }; }; }; - trace?: never; - }; - "/iconset/{:iconset}/icon/{:icon}/raw": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Icon Data */ - get: { - parameters: { - query?: { - /** @description No Description */ - token?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - }; - }; - put?: never; - post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; - "/icon/sprite:size?.json": { + "/iconset/{:iconset}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Spriteset JSON for CoT types */ + /** Get Iconset */ get: { parameters: { - query: { + query?: { /** @description No Description */ - iconset: string; + format?: "json" | "zip"; /** @description No Description */ - scope?: "server" | "user"; + download?: boolean; + /** @description Resize Images to 32x32px */ + resize?: boolean; /** @description No Description */ token?: string; }; @@ -4785,83 +4759,31 @@ export interface paths { headers: { [name: string]: unknown; }; - content?: never; - }; - }; - }; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/icon/sprite:size?.png": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Return a sprite sheet for CoT Types */ - get: { - parameters: { - query: { - /** @description No Description */ - iconset: string; - /** @description No Description */ - scope?: "server" | "user"; - /** @description No Description */ - token?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; + content: { + "application/json": { + uid: string; + created: string; + updated: string; + version: number; + name: string; + username: string | null; + default_group: string | null; + default_friendly: string | null; + default_hostile: string | null; + default_neutral: string | null; + default_unknown: string | null; + skip_resize: boolean; + }; }; - content?: never; }; }; }; put?: never; post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/import": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Imports */ - get: { + /** Delete Iconset */ + delete: { parameters: { - query: { - /** @description Limit the number of responses returned */ - limit: number; - /** @description Iterate through "pages" of items based on the "limit" query param */ - page: number; - /** @description Order in which results are returned based on the "sort" query param */ - order: "asc" | "desc"; - /** @description No Description */ - sort?: "id" | "created" | "updated" | "name" | "status" | "error" | "batch" | "result" | "username" | "mode" | "mode_id" | "config"; - /** @description No Description */ - mode?: "Unknown" | "Mission" | "Package"; - /** @description No Description */ - mode_id?: string; - }; + query?: never; header?: never; path?: never; cookie?: never; @@ -4875,35 +4797,36 @@ export interface paths { }; content: { "application/json": { - total: number; - items: { - id: string; - created: string; - updated: string; - name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; - }[]; + status: number; + message: string; }; }; }; }; }; - /** Import up to 5 unknown assets into the imports manager at a time */ - put: { + options?: never; + head?: never; + /** Update Iconset */ + patch: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - requestBody?: never; + requestBody: { + content: { + "application/json": { + public?: boolean; + default_group?: string; + default_friendly?: string; + default_hostile?: string; + default_neutral?: string; + default_unknown?: string; + skip_resize?: boolean; + }; + }; + }; responses: { /** @description Successful Response */ 200: { @@ -4912,17 +4835,35 @@ export interface paths { }; content: { "application/json": { - imports: { - file: string; - uid: string; - ext: string; - }[]; + uid: string; + created: string; + updated: string; + version: number; + name: string; + username: string | null; + default_group: string | null; + default_friendly: string | null; + default_hostile: string | null; + default_neutral: string | null; + default_unknown: string | null; + skip_resize: boolean; }; }; }; }; }; - /** Import an unknown asset into the imports manager */ + trace?: never; + }; + "/iconset/{:iconset}/icon": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create Icon */ post: { parameters: { query?: never; @@ -4935,9 +4876,8 @@ export interface paths { "application/json": { /** @description Human readable name */ name: string; - mode?: "Unknown" | "Mission" | "Package"; - mode_id?: string; - config?: unknown; + data: string; + type2525b?: string | null; }; }; }; @@ -4949,18 +4889,14 @@ export interface paths { }; content: { "application/json": { - id: string; + id: number; created: string; updated: string; name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; + iconset: string; + type2525b: string | null; + data: string; + path: string; }; }; }; @@ -4972,17 +4908,32 @@ export interface paths { patch?: never; trace?: never; }; - "/import/{:import}": { + "/icon": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** Get Import */ + /** List Icons */ get: { parameters: { - query?: never; + query: { + /** @description No Description */ + scope?: "server" | "user"; + /** @description No Description */ + limit?: number; + /** @description Iterate through "pages" of items based on the "limit" query param */ + page: number; + /** @description Order in which results are returned based on the "sort" query param */ + order: "asc" | "desc"; + /** @description No Description */ + sort?: "id" | "created" | "updated" | "name" | "iconset" | "type2525b" | "data" | "path"; + /** @description No Description */ + iconset?: string; + /** @description Filter results by a human readable name field */ + filter: string; + }; header?: never; path?: never; cookie?: never; @@ -4996,25 +4947,39 @@ export interface paths { }; content: { "application/json": { - id: string; - created: string; - updated: string; - name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; + total: number; + items: { + id: number; + created: string; + updated: string; + name: string; + iconset: string; + type2525b: string | null; + data: string; + path: string; + }[]; }; }; }; }; }; - /** Import an asset into a previously configured import container */ - put: { + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/iconset/{:iconset}/icon/{:icon}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Icon Metadata */ + get: { parameters: { query?: never; header?: never; @@ -5030,25 +4995,22 @@ export interface paths { }; content: { "application/json": { - id: string; + id: number; created: string; updated: string; name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; + iconset: string; + type2525b: string | null; + data: string; + path: string; }; }; }; }; }; + put?: never; post?: never; - /** Delete Import */ + /** Remove Icon from Iconset */ delete: { parameters: { query?: never; @@ -5074,7 +5036,7 @@ export interface paths { }; options?: never; head?: never; - /** Update Import */ + /** Update Icon in Iconset */ patch: { parameters: { query?: never; @@ -5085,9 +5047,9 @@ export interface paths { requestBody: { content: { "application/json": { - status?: string; - error?: string; - result?: unknown; + name?: string; + data?: string; + type2525b?: string | null; }; }; }; @@ -5099,18 +5061,14 @@ export interface paths { }; content: { "application/json": { - id: string; + id: number; created: string; updated: string; name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; + iconset: string; + type2525b: string | null; + data: string; + path: string; }; }; }; @@ -5118,17 +5076,20 @@ export interface paths { }; trace?: never; }; - "/import/{:import}/batch": { + "/iconset/{:iconset}/icon/{:icon}/raw": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; - /** List Import Batch Job Logs */ + /** Icon Data */ get: { parameters: { - query?: never; + query?: { + /** @description No Description */ + token?: string; + }; header?: never; path?: never; cookie?: never; @@ -5140,22 +5101,36 @@ export interface paths { headers: { [name: string]: unknown; }; - content: { - "application/json": { - logs: { - message: string; - timestamp: number; - }[]; - }; - }; + content?: never; }; }; }; put?: never; - /** Attach a Batch Job to an instance */ - post: { + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/icon/sprite:size?.json": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Spriteset JSON for CoT types */ + get: { parameters: { - query?: never; + query: { + /** @description No Description */ + iconset: string; + /** @description No Description */ + scope?: "server" | "user"; + /** @description No Description */ + token?: string; + }; header?: never; path?: never; cookie?: never; @@ -5167,25 +5142,53 @@ export interface paths { headers: { [name: string]: unknown; }; - content: { - "application/json": { - id: string; - created: string; - updated: string; - name: string; - status: string; - error: string | null; - batch: string | null; - result: unknown; - username: string; - mode: string; - mode_id: string | null; - config: unknown; - }; + content?: never; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/icon/sprite:size?.png": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Return a sprite sheet for CoT Types */ + get: { + parameters: { + query: { + /** @description No Description */ + iconset: string; + /** @description No Description */ + scope?: "server" | "user"; + /** @description No Description */ + token?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; }; + content?: never; }; }; }; + put?: never; + post?: never; delete?: never; options?: never; head?: never; @@ -7381,7 +7384,7 @@ export interface paths { /** @description Filter results by a human readable name field */ filter: string; /** @description No Description */ - sort?: "id" | "name" | "created" | "updated" | "type" | "styles" | "url"; + sort?: "id" | "name" | "created" | "updated" | "minzoom" | "maxzoom" | "format" | "type" | "styles" | "url"; }; header?: never; path?: never; @@ -7402,6 +7405,9 @@ export interface paths { name: string; created: string; updated: string; + minzoom: number; + maxzoom: number; + format: string; type: string; styles: unknown | null; url: string; @@ -7425,7 +7431,7 @@ export interface paths { "application/json": { name: string; type: string; - styles: Record; + styles: unknown[]; url: string; }; }; @@ -7442,6 +7448,9 @@ export interface paths { name: string; created: string; updated: string; + minzoom: number; + maxzoom: number; + format: string; type: string; styles: unknown | null; url: string; @@ -7484,6 +7493,9 @@ export interface paths { name: string; created: string; updated: string; + minzoom: number; + maxzoom: number; + format: string; type: string; styles: unknown | null; url: string; @@ -7510,7 +7522,7 @@ export interface paths { "application/json": { name?: string; type?: string; - styles?: Record; + styles?: unknown[]; url?: string; }; }; @@ -7527,6 +7539,9 @@ export interface paths { name: string; created: string; updated: string; + minzoom: number; + maxzoom: number; + format: string; type: string; styles: unknown | null; url: string; @@ -7537,6 +7552,52 @@ export interface paths { }; trace?: never; }; + "/overlay/{:overlay}/tiles": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get an overlay tilejson */ + get: { + parameters: { + query?: { + /** @description No Description */ + token?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + tilejson: string; + name: string; + minzoom: number; + maxzoom: number; + format: string; + tiles: string[]; + }; + }; + }; + }; + }; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/profile/asset": { parameters: { query?: never; @@ -8738,7 +8799,7 @@ export interface paths { opacity: number; visible: boolean; token: string | null; - styles: unknown | null; + styles: unknown[]; mode: string; mode_id: string | null; url: string; @@ -8754,7 +8815,7 @@ export interface paths { opacity: number; visible: boolean; token: string | null; - styles: unknown | null; + styles: unknown[]; mode: string; mode_id: string | null; url: string; @@ -8782,6 +8843,7 @@ export interface paths { visible?: boolean; mode: string; mode_id?: string; + styles?: unknown[]; token?: string; url: string; name: string; @@ -8806,7 +8868,7 @@ export interface paths { opacity: number; visible: boolean; token: string | null; - styles: unknown | null; + styles: unknown[]; mode: string; mode_id: string | null; url: string; @@ -8881,7 +8943,7 @@ export interface paths { opacity: number; visible: boolean; token: string | null; - styles: unknown | null; + styles: unknown[]; mode: string; mode_id: string | null; url: string; @@ -8912,7 +8974,7 @@ export interface paths { visible?: boolean; url?: string; mode_id?: string; - styles?: unknown; + styles?: unknown[]; }; }; }; @@ -8934,7 +8996,7 @@ export interface paths { opacity: number; visible: boolean; token: string | null; - styles: unknown | null; + styles: unknown[]; mode: string; mode_id: string | null; url: string; @@ -10014,6 +10076,8 @@ export interface paths { order: "asc" | "desc"; /** @description No Description */ sort?: "id" | "email" | "name" | "token" | "created" | "updated"; + /** @description No Description */ + ephemeral?: boolean; /** @description Filter results by a human readable name field */ filter: string; }; @@ -10037,6 +10101,7 @@ export interface paths { created: string; updated: string; username: string; + ephemeral: boolean; expiration: string; path: string; stream_user: string | null; @@ -10062,6 +10127,11 @@ export interface paths { "application/json": { /** @description Human readable name */ name: string; + /** + * @description CloudTAK View lease - hidden in streaming list + * @default false + */ + ephemeral: boolean; /** @description Duration in Seconds */ duration: number; path?: string; @@ -10085,6 +10155,7 @@ export interface paths { created: string; updated: string; username: string; + ephemeral: boolean; expiration: string; path: string; stream_user: string | null; @@ -10154,6 +10225,7 @@ export interface paths { created: string; updated: string; username: string; + ephemeral: boolean; expiration: string; path: string; stream_user: string | null; @@ -10244,6 +10316,7 @@ export interface paths { created: string; updated: string; username: string; + ephemeral: boolean; expiration: string; path: string; stream_user: string | null; diff --git a/api/web/src/stores/map.ts b/api/web/src/stores/map.ts index b160d5c1a..b41202c1a 100644 --- a/api/web/src/stores/map.ts +++ b/api/web/src/stores/map.ts @@ -304,8 +304,7 @@ export const useMapStore = defineStore('cloudtak', { id: 0, name: 'Your Location', type: 'vector', - },{ - layers: [{ + styles: [{ id: 'you', type: 'circle', source: '0', diff --git a/api/web/src/stores/overlays/base.ts b/api/web/src/stores/overlays/base.ts index 6c3862a38..d0a55c2b8 100644 --- a/api/web/src/stores/overlays/base.ts +++ b/api/web/src/stores/overlays/base.ts @@ -18,7 +18,6 @@ export default class Overlay { _destroyed: boolean; _internal: boolean; - _layers: Array; _clickable: Array<{ id: string; type: string }>; _error?: Error; @@ -36,19 +35,27 @@ export default class Overlay { mode: string; mode_id: string | null; url?: string; - styles: object; + styles: Array; token: string | null; static async create( map: mapgl.Map, body: ProfileOverlay_Create, opts: { - layers?: Array; clickable?: Array<{ id: string; type: string }>; before?: string; } = {} ): Promise { const ov = await std('/api/profile/overlay', { method: 'POST', body }) as ProfileOverlay; + + if (ov.styles && ov.styles.length) { + for (const layer of ov.styles) { + const l = layer as any; + l.id = `${ov.id}-${l.id}`; + l.source = String(ov.id); + } + } + return new Overlay(map, ov, opts); } @@ -58,11 +65,9 @@ export default class Overlay { id: number; type: string; name: string; - }, - opts: { layers?: Array; clickable?: Array<{ id: string; type: string }>; - } = {} + }, ): Overlay { const overlay = new Overlay(map, { ...body, @@ -75,10 +80,10 @@ export default class Overlay { token: null, mode: 'internal', mode_id: null, - styles: {}, + styles: body.layers || [], pos: 3, }, { - ...opts, + clickable: body.clickable, internal: true }); @@ -91,7 +96,6 @@ export default class Overlay { } constructor(map: mapgl.Map, overlay: ProfileOverlay, opts: { - layers?: Array; clickable?: Array<{ id: string; type: string }>; internal?: boolean; before?: string; @@ -100,7 +104,6 @@ export default class Overlay { this._destroyed = false; this._internal = opts.internal || false; - this._layers = []; this._clickable = []; this._loaded = false; @@ -116,7 +119,7 @@ export default class Overlay { this.mode = overlay.mode; this.mode_id = overlay.mode_id; this.url = overlay.url; - this.styles = overlay.styles as object; + this.styles = overlay.styles; this.token = overlay.token; this.init(opts); @@ -127,7 +130,6 @@ export default class Overlay { } init(opts: { - layers?: Array; clickable?: Array<{ id: string; type: string }>; before?: string; } = {}) { @@ -165,14 +167,14 @@ export default class Overlay { if (display_text === 'Small') size = 4; if (display_text === 'Large') size = 16; - if (!opts.layers && this.type === 'raster') { - opts.layers = [{ + if (!this.styles && this.type === 'raster') { + this.styles = [{ 'id': String(this.id), 'type': 'raster', 'source': String(this.id) }] - } else if (!opts.layers && this.type === 'vector') { - opts.layers = cotStyles(String(this.id), { + } else if (!this.styles && this.type === 'vector') { + this.styles = cotStyles(String(this.id), { sourceLayer: 'out', group: false, icons: false, @@ -180,19 +182,19 @@ export default class Overlay { }); if (opts.clickable === undefined) { - opts.clickable = opts.layers.map((l) => { + opts.clickable = this.styles.map((l) => { return { id: l.id, type: 'feat' }; }); } - } else if (!opts.layers && this.type === 'geojson') { - opts.layers = cotStyles(String(this.id), { + } else if (!this.styles && this.type === 'geojson') { + this.styles = cotStyles(String(this.id), { group: this.mode !== "mission", icons: true, labels: { size } }); if (opts.clickable === undefined) { - opts.clickable = opts.layers.map((l) => { + opts.clickable = this.styles.map((l) => { if (this.mode === 'mission') { return { id: l.id, type: 'cot' }; } else { @@ -200,11 +202,11 @@ export default class Overlay { } }); } - } else if (!opts.layers) { - opts.layers = []; + } else if (!this.styles) { + this.styles = []; } - for (const l of opts.layers) { + for (const l of this.styles) { if (opts.before) { this._map.addLayer(l, opts.before); } else { @@ -212,8 +214,6 @@ export default class Overlay { } } - this._layers = opts.layers; - // The above doesn't set vis/opacity initially this.update({ opacity: this.opacity, @@ -238,7 +238,7 @@ export default class Overlay { } remove() { - for (const l of this._layers) { + for (const l of this.styles) { this._map.removeLayer(String(l.id)); } @@ -258,7 +258,6 @@ export default class Overlay { this.remove(); this.init({ - layers: this._layers, clickable: this._clickable, before: opts.before }); @@ -287,7 +286,7 @@ export default class Overlay { }): Promise { if (body.opacity !== undefined) { this.opacity = body.opacity; - for (const l of this._layers) { + for (const l of this.styles) { if (this.type === 'raster') { this._map.setPaintProperty(l.id, 'raster-opacity', Number(this.opacity)) } @@ -296,7 +295,7 @@ export default class Overlay { if (body.visible !== undefined) { this.visible = body.visible; - for (const l of this._layers) { + for (const l of this.styles) { this._map.setLayoutProperty(l.id, 'visibility', this.visible ? 'visible' : 'none'); } }