diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 6c41a431..00000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,8 +0,0 @@ -[alias] -mattrax = "run -p mattrax --" -mttx = "run -p mttx -- --server http://localhost:3000 " -mattraxd = "run -p mattraxd --" -ingest = "run -p ingest" - -[env] -WEB_URL = "http://localhost:3000" # Redirect traffic to your devserver. diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 1f262b70..6105e8a2 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -27,91 +27,94 @@ jobs: - name: Git clone the repository uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: latest +# - uses: pnpm/action-setup@v4 +# with: +# version: latest - - name: Install dependencies - run: pnpm i +# - name: Install dependencies +# run: pnpm i - - name: Build - working-directory: apps/landing - env: - NITRO_PRESET: cloudflare_pages - run: pnpm build +# - name: Build +# working-directory: apps/landing +# env: +# NITRO_PRESET: cloudflare_pages +# run: pnpm build - - name: Deploy - working-directory: apps/landing - run: | - set -o pipefail - pnpm dlx wrangler pages deploy dist/ --project-name landing 2>&1 | tee -a BUILD_OUTPUT +# - name: Deploy +# working-directory: apps/landing +# run: | +# set -o pipefail +# pnpm dlx wrangler pages deploy dist/ --project-name landing 2>&1 | tee -a BUILD_OUTPUT - - name: Export `DEPLOYMENT_URL` - id: result - run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT +# - name: Export `DEPLOYMENT_URL` +# working-directory: apps/landing +# id: result +# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT - web: - name: Web - runs-on: ubuntu-latest - environment: - name: web - url: ${{ steps.result.outputs.DEPLOYMENT_URL }} - steps: - - name: Git clone the repository - uses: actions/checkout@v4 +# web: +# name: Web +# runs-on: ubuntu-latest +# environment: +# name: web +# url: ${{ steps.result.outputs.DEPLOYMENT_URL }} +# steps: +# - name: Git clone the repository +# uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: latest +# - uses: pnpm/action-setup@v4 +# with: +# version: latest - - name: Install dependencies - run: pnpm i +# - name: Install dependencies +# run: pnpm i - - name: Build - working-directory: apps/web - env: - NITRO_PRESET: cloudflare_pages - run: pnpm build +# - name: Build +# working-directory: apps/web +# env: +# NITRO_PRESET: cloudflare_pages +# run: pnpm build - - name: Deploy - working-directory: apps/web - run: | - set -o pipefail - pnpm dlx wrangler pages deploy dist/ --project-name web 2>&1 | tee -a BUILD_OUTPUT +# - name: Deploy +# working-directory: apps/web +# run: | +# set -o pipefail +# pnpm dlx wrangler pages deploy dist/ --project-name web 2>&1 | tee -a BUILD_OUTPUT - - name: Export `DEPLOYMENT_URL` - id: result - run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT +# - name: Export `DEPLOYMENT_URL` +# working-directory: apps/web +# id: result +# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT - api: - name: API - runs-on: ubuntu-latest - environment: - name: api - url: ${{ steps.result.outputs.DEPLOYMENT_URL }} - steps: - - name: Git clone the repository - uses: actions/checkout@v4 +# api: +# name: API +# runs-on: ubuntu-latest +# environment: +# name: api +# url: ${{ steps.result.outputs.DEPLOYMENT_URL }} +# steps: +# - name: Git clone the repository +# uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: latest +# - uses: pnpm/action-setup@v4 +# with: +# version: latest - - name: Install dependencies - run: pnpm i +# - name: Install dependencies +# run: pnpm i - - name: Build - working-directory: apps/api - env: - NITRO_PRESET: cloudflare_pages - run: pnpm build +# - name: Build +# working-directory: apps/api +# env: +# NITRO_PRESET: cloudflare_pages +# run: pnpm build - - name: Deploy - working-directory: apps/api - run: | - set -o pipefail - pnpm dlx wrangler deploy src/index.ts --define "import.meta.env.GIT_SHA:'$(git rev-parse HEAD)'" 2>&1 | tee -a BUILD_OUTPUT +# - name: Deploy +# working-directory: apps/api +# run: | +# set -o pipefail +# pnpm dlx wrangler deploy src/index.ts --define "import.meta.env.GIT_SHA:'$(git rev-parse HEAD)'" 2>&1 | tee -a BUILD_OUTPUT - - name: Export `DEPLOYMENT_URL` - id: result - run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT +# - name: Export `DEPLOYMENT_URL` +# working-directory: apps/api +# id: result +# run: echo "DEPLOYMENT_URL=$(grep -Eo 'https://[^ >]+' BUILD_OUTPUT|head -1)" >> $GITHUB_OUTPUT diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4f375904..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "editor.defaultFormatter": "biomejs.biome" -} diff --git a/Cargo.lock b/Cargo.lock index 4ddf6440..35fdea64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,44 +8,6 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -55,12 +17,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -112,7 +68,7 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -122,7 +78,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -142,45 +98,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "autocfg" version = "1.4.0" @@ -188,1189 +105,235 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] -name = "aws-lc-rs" -version = "1.9.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f95446d919226d587817a7d21379e6eb099b97b45110a7f272a444ca5c54070" -dependencies = [ - "aws-lc-sys", - "mirai-annotations", - "paste", - "zeroize", -] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "aws-lc-sys" -version = "0.21.1" +name = "bumpalo" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234314bd569802ec87011d653d6815c6d7b9ffb969e9fee5b8b20ef860e8dce9" -dependencies = [ - "bindgen 0.69.4", - "cc", - "cmake", - "dunce", - "fs_extra", - "libc", - "paste", -] +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] -name = "aws_lambda_events" -version = "0.15.1" +name = "cc" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7319a086b79c3ff026a33a61e80f04fd3885fbb73237981ea080d21944e1cb1c" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ - "base64 0.22.1", - "bytes", - "http", - "http-body", - "http-serde", - "query_map", - "serde", - "serde_json", + "shlex", ] [[package]] -name = "axum" -version = "0.7.7" +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "async-trait", - "axum-core", - "axum-macros", - "base64 0.22.1", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sha1", - "sync_wrapper 1.0.1", - "tokio", - "tokio-tungstenite", - "tower 0.5.1", - "tower-layer", - "tower-service", - "tracing", + "android-tzdata", + "iana-time-zone", + "num-traits", + "windows-targets", ] [[package]] -name = "axum-core" -version = "0.4.5" +name = "clap" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.1", - "tower-layer", - "tower-service", - "tracing", + "clap_builder", + "clap_derive", ] [[package]] -name = "axum-extra" -version = "0.9.4" +name = "clap_builder" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c3220b188aea709cf1b6c5f9b01c3bd936bb08bd2b5184a12b35ac8131b1f9" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ - "axum", - "axum-core", - "bytes", - "cookie", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "serde", - "tower 0.5.1", - "tower-layer", - "tower-service", - "tracing", + "anstream", + "anstyle", + "clap_lex", + "strsim", ] [[package]] -name = "axum-macros" -version = "0.4.2" +name = "clap_derive" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ + "heck", "proc-macro2", "quote", "syn 2.0.82", ] [[package]] -name = "backtrace" -version = "0.3.74" +name = "clap_lex" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] -name = "base64" -version = "0.21.7" +name = "colorchoice" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] -name = "base64" -version = "0.22.1" +name = "core-foundation-sys" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "bigdecimal" -version = "0.4.5" +name = "crossbeam-channel" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d712318a27c7150326677b321a5fa91b55f6d9034ffd67f20319e147d40cee" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "autocfg", - "libm", - "num-bigint", - "num-integer", - "num-traits", + "crossbeam-utils", ] [[package]] -name = "bindgen" -version = "0.69.4" +name = "crossbeam-utils" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.82", - "which", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] -name = "bindgen" -version = "0.70.1" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.82", + "powerfmt", ] [[package]] -name = "bitflags" -version = "2.6.0" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +name = "easy-xml" +version = "0.1.4" +source = "git+https://github.com/oscartbeaumont/easy-xml?rev=f373c5bc85802e434274400865a9ba8dbc2313f1#f373c5bc85802e434274400865a9ba8dbc2313f1" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "easy-xml-derive", + "xml-rs", ] [[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +name = "easy-xml-derive" +version = "0.1.4" +source = "git+https://github.com/oscartbeaumont/easy-xml?rev=f373c5bc85802e434274400865a9ba8dbc2313f1#f373c5bc85802e434274400865a9ba8dbc2313f1" dependencies = [ - "generic-array", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "borsh" -version = "1.5.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "borsh-derive" -version = "1.5.1" +name = "glob" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" -dependencies = [ - "once_cell", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.82", - "syn_derive", -] +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "btoi" -version = "0.4.3" +name = "hashbrown" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd6407f73a9b8b6162d8a2ef999fe6afd7cc15902ebf42c5cd296addf17e0ad" -dependencies = [ - "num-traits", -] +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] -name = "bumpalo" -version = "3.16.0" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "bytecheck" -version = "0.6.12" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "bytecheck_derive" -version = "0.6.12" +name = "iana-time-zone" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", ] [[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.7.2" +name = "iana-time-zone-haiku" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "serde", + "cc", ] [[package]] -name = "cc" -version = "1.1.31" +name = "indexmap" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ - "jobserver", - "libc", - "shlex", + "equivalent", + "hashbrown", ] [[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +name = "ingest" +version = "0.0.1" dependencies = [ + "apple-pfm", + "easy-xml", + "glob", + "ms-ddf", "nom", + "plist", + "serde", + "serde_json", + "specta", + "specta-typescript", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] -name = "cfg_aliases" -version = "0.2.1" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "clap_lex" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" - -[[package]] -name = "cmake" -version = "0.1.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" -dependencies = [ - "cc", -] - -[[package]] -name = "colorchoice" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" - -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "cuid-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d59a706635108a7e8eaae7ec8e6154504fafa4a415ef38690d94fccea051757" - -[[package]] -name = "cuid2" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e281dc36864ea88fae2ec4e21eb280e8239487acb1ddc59b528b0afa7997bd" -dependencies = [ - "cuid-util", - "getrandom", - "num", - "rand", - "sha3", -] - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.82", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "easy-xml" -version = "0.1.4" -source = "git+https://github.com/oscartbeaumont/easy-xml?rev=f373c5bc85802e434274400865a9ba8dbc2313f1#f373c5bc85802e434274400865a9ba8dbc2313f1" -dependencies = [ - "easy-xml-derive", - "xml-rs", -] - -[[package]] -name = "easy-xml-derive" -version = "0.1.4" -source = "git+https://github.com/oscartbeaumont/easy-xml?rev=f373c5bc85802e434274400865a9ba8dbc2313f1#f373c5bc85802e434274400865a9ba8dbc2313f1" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "flate2" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" -dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "frunk" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874b6a17738fc273ec753618bac60ddaeac48cb1d7684c3e7bd472e57a28b817" -dependencies = [ - "frunk_core", - "frunk_derives", - "frunk_proc_macros", - "serde", -] - -[[package]] -name = "frunk_core" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3529a07095650187788833d585c219761114005d5976185760cf794d265b6a5c" -dependencies = [ - "serde", -] - -[[package]] -name = "frunk_derives" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99b8b3c28ae0e84b604c75f721c21dc77afb3706076af5e8216d15fd1deaae3" -dependencies = [ - "frunk_proc_macro_helpers", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "frunk_proc_macro_helpers" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a956ef36c377977e512e227dcad20f68c2786ac7a54dacece3746046fea5ce" -dependencies = [ - "frunk_core", - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "frunk_proc_macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e86c2c9183662713fea27ea527aad20fb15fee635a71081ff91bf93df4dc51" -dependencies = [ - "frunk_core", - "frunk_proc_macro_helpers", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", -] - -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "http-serde" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd" -dependencies = [ - "http", - "serde", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.0", -] - -[[package]] -name = "ingest" -version = "0.0.1" -dependencies = [ - "apple-pfm", - "easy-xml", - "glob", - "ms-ddf", - "nom", - "plist", - "serde", - "serde_json", - "specta", - "specta-typescript", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" @@ -1379,152 +342,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "keyed_priority_queue" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee7893dab2e44ae5f9d0173f26ff4aa327c10b01b06a72b52dd9405b628640d" -dependencies = [ - "indexmap", -] - -[[package]] -name = "lambda_http" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fe279be7f89f5f72c97c3a96f45c43db8edab1007320ecc6a5741273b4d6db" -dependencies = [ - "aws_lambda_events", - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "lambda_runtime", - "mime", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio-stream", - "url", -] - -[[package]] -name = "lambda_runtime" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed49669d6430292aead991e19bf13153135a884f916e68f32997c951af637ebe" -dependencies = [ - "async-stream", - "base64 0.22.1", - "bytes", - "futures", - "http", - "http-body", - "http-body-util", - "http-serde", - "hyper", - "hyper-util", - "lambda_runtime_api_client", - "pin-project", - "serde", - "serde_json", - "serde_path_to_error", - "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tracing", -] - -[[package]] -name = "lambda_runtime_api_client" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c90a10f094475a34a04da2be11686c4dcfe214d93413162db9ffdff3d3af293a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "tokio", - "tower 0.4.13", - "tower-service", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.161" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" - -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if", - "windows-targets", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +] [[package]] -name = "libz-sys" -version = "1.1.20" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "linux-raw-sys" -version = "0.4.14" +name = "libc" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "log" @@ -1532,15 +362,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "lru" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "matchers" version = "0.1.0" @@ -1550,12 +371,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "mattraxd" version = "0.0.1" @@ -1572,45 +387,12 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "mirai-annotations" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" - [[package]] name = "ms-ddf" version = "0.0.1" @@ -1619,37 +401,6 @@ dependencies = [ "easy-xml-derive", ] -[[package]] -name = "mx-cloud" -version = "0.0.1" -dependencies = [ - "axum", - "axum-extra", - "base64 0.22.1", - "cuid2", - "lambda_http", - "mx-db", - "mysql_async", - "openssl", - "serde", - "serde_json", - "tokio", - "tower-http", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "mx-db" -version = "0.0.1" -dependencies = [ - "chrono", - "mysql_async", - "mysql_common", - "refinery", - "serde_json", -] - [[package]] name = "mx-utils" version = "0.0.0" @@ -1660,99 +411,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "mysql-common-derive" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe0450cc9344afff34915f8328600ab5ae19260802a334d0f72d2d5bdda3bfe" -dependencies = [ - "darling", - "heck 0.4.1", - "num-bigint", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.82", - "termcolor", - "thiserror", -] - -[[package]] -name = "mysql_async" -version = "0.34.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0b66e411c31265e879d9814d03721f2daa7ad07337b6308cb4bb0cde7e6fd47" -dependencies = [ - "bytes", - "crossbeam", - "flate2", - "futures-core", - "futures-sink", - "futures-util", - "keyed_priority_queue", - "lru", - "mysql_common", - "pem", - "percent-encoding", - "pin-project", - "rand", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "socket2", - "thiserror", - "tokio", - "tokio-rustls", - "tokio-util", - "tracing", - "twox-hash", - "url", - "webpki", - "webpki-roots", -] - -[[package]] -name = "mysql_common" -version = "0.32.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478b0ff3f7d67b79da2b96f56f334431aef65e15ba4b29dd74a4236e29582bdc" -dependencies = [ - "base64 0.21.7", - "bigdecimal", - "bindgen 0.70.1", - "bitflags", - "bitvec", - "btoi", - "byteorder", - "bytes", - "cc", - "chrono", - "cmake", - "crc32fast", - "flate2", - "frunk", - "lazy_static", - "mysql-common-derive", - "num-bigint", - "num-traits", - "rand", - "regex", - "rust_decimal", - "saturating", - "serde", - "serde_json", - "sha1", - "sha2", - "smallvec", - "subprocess", - "thiserror", - "time", - "uuid", - "zstd", -] - [[package]] name = "nom" version = "7.1.3" @@ -1773,76 +431,12 @@ dependencies = [ "winapi", ] -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -1852,97 +446,18 @@ dependencies = [ "autocfg", ] -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -[[package]] -name = "openssl" -version = "0.10.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "openssl-src" -version = "300.3.2+3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pem" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" -dependencies = [ - "base64 0.22.1", - "serde", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - [[package]] name = "phf" version = "0.11.2" @@ -1982,27 +497,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher 0.3.11", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", + "siphasher", ] [[package]] @@ -2011,137 +506,42 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - [[package]] name = "plist" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" -dependencies = [ - "base64 0.22.1", - "indexmap", - "quick-xml", - "serde", - "time", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "pretty_assertions" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.82", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.88" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "unicode-ident", + "base64", + "indexmap", + "quick-xml", + "serde", + "time", ] [[package]] -name = "ptr_meta" -version = "0.1.4" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] -name = "ptr_meta_derive" -version = "0.1.4" +name = "pretty_assertions" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "diff", + "yansi", ] [[package]] -name = "query_map" -version = "0.7.0" +name = "proc-macro2" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eab6b8b1074ef3359a863758dae650c7c0c6027927a085b7af911c8e0bf3a15" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ - "form_urlencoded", - "serde", - "serde_derive", + "unicode-ident", ] [[package]] @@ -2162,30 +562,12 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", "rand_core", ] @@ -2194,52 +576,6 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "refinery" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0904191f0566c3d3e0091d5cc8dec22e663d77def2d247b16e7a438b188bf75d" -dependencies = [ - "refinery-core", - "refinery-macros", -] - -[[package]] -name = "refinery-core" -version = "0.8.14" -source = "git+https://github.com/rust-db/refinery?rev=ff1c5c07c00f196e8ec4f10827ab882db2fd9d14#ff1c5c07c00f196e8ec4f10827ab882db2fd9d14" -dependencies = [ - "async-trait", - "cfg-if", - "log", - "mysql_async", - "regex", - "serde", - "siphasher 1.0.1", - "thiserror", - "time", - "toml", - "url", - "walkdir", -] - -[[package]] -name = "refinery-macros" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd81f69687fe8a1fa10995108b3ffc7cdbd63e682a4f8fbfd1020130780d7e17" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "refinery-core", - "regex", - "syn 2.0.82", -] [[package]] name = "regex" @@ -2285,59 +621,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rkyv" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rust_decimal" version = "1.36.0" @@ -2345,116 +628,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", - "borsh", - "bytes", "num-traits", - "rand", - "rkyv", - "serde", - "serde_json", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" -dependencies = [ - "aws-lc-rs", - "log", - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "aws-lc-rs", - "ring", - "rustls-pki-types", - "untrusted", ] -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - [[package]] name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "saturating" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece8e78b2f38ec51c51f5d475df0a7187ba5111b2a28bdc761ee05b075d40a71" - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "serde" version = "1.0.210" @@ -2487,69 +669,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -2565,49 +684,18 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - [[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "specta" version = "2.0.0-rc.20" @@ -2654,99 +742,32 @@ dependencies = [ "thiserror", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subprocess" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2e86926081dda636c546d8c5e641661049d7562a68f5488be4a1f7f66f6086" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "tap" -version = "1.0.1" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] -name = "termcolor" -version = "1.4.1" +name = "syn" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ - "winapi-util", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] @@ -2810,195 +831,12 @@ dependencies = [ "time-core", ] -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 0.1.2", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97" -dependencies = [ - "bitflags", - "bytes", - "http", - "http-body", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - [[package]] name = "tracing" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3048,16 +886,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -3068,157 +896,32 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", - "serde", - "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", - "tracing-serde", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "rand", - "static_assertions", ] -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" - [[package]] name = "valuable" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasm-bindgen" version = "0.2.95" @@ -3274,37 +977,6 @@ version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.26.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -3321,15 +993,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3354,15 +1017,6 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -3427,24 +1081,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -dependencies = [ - "memchr", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "xml-rs" version = "0.8.22" @@ -3456,58 +1092,3 @@ name = "yansi" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.82", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - -[[package]] -name = "zstd" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index 594a6a85..ce51e3c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,6 @@ [workspace] resolver = "2" -members = [ - "apps/ingest", - "apps/mattraxd", - "apps/cloud", - "crates/*", -] +members = ["apps/ingest", "apps/mattraxd", "crates/*"] [profile.dist] inherits = "release" @@ -13,10 +8,7 @@ lto = "thin" [workspace.dependencies] tracing = { version = "^0.1" } -tokio = { version = "^1", features = [ - "macros", - "rt-multi-thread", -] } +tokio = { version = "^1", features = ["macros", "rt-multi-thread"] } axum = { version = "^0.7" } serde = { version = "^1", features = ["derive"] } serde_json = { version = "^1" } @@ -28,20 +20,8 @@ specta = { version = "=2.0.0-rc.20", features = [ ] } specta-util = { version = "0.0.7" } specta-typescript = "0.0.7" -mysql_async = { version = "0.34.2", default-features = false, features = [ - "default-rustls", - "derive", - "tracing", - "chrono", -] } [patch.crates-io] # Some minor improvements easy-xml = { git = "https://github.com/oscartbeaumont/easy-xml", rev = "f373c5bc85802e434274400865a9ba8dbc2313f1" } easy-xml-derive = { git = "https://github.com/oscartbeaumont/easy-xml", rev = "f373c5bc85802e434274400865a9ba8dbc2313f1" } - -# Support for latest mysql-async - https://github.com/rust-db/refinery/pull/327 -refinery-core = { git = "https://github.com/rust-db/refinery", rev = "ff1c5c07c00f196e8ec4f10827ab882db2fd9d14" } - -# TODO: This should only be used when using SST Live Lambda! -# lambda_runtime = { git = "https://github.com/oscartbeaumont/aws-lambda-rust-runtime", rev = "9d75ac7168dd6869bfa8deb1bc83018830dc617f" } diff --git a/apps/api/build.ts b/apps/api/build.ts deleted file mode 100644 index 826d861b..00000000 --- a/apps/api/build.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { execSync } from "node:child_process"; -import fs from "node:fs"; -import path from "node:path"; -import { build } from "esbuild"; -import { solidPlugin } from "esbuild-plugin-solid"; -import { apiRoutes, headers } from "./config.js"; - -const __dirname = path.dirname(new URL(import.meta.url).pathname); - -const dist = path.join(__dirname, "dist"); - -// Get git SHA -const gitSha = execSync("git rev-parse HEAD").toString().trim(); - -// Cleanup previous builds -if (fs.existsSync(dist)) fs.rmSync(dist, { recursive: true }); -fs.mkdirSync(dist); - -const webDist = path.join(__dirname, "..", "web", "dist"); -if (fs.existsSync(webDist)) fs.rmSync(webDist, { recursive: true }); - -// Build UI -execSync("pnpm web build", { - stdio: "inherit", - cwd: path.join(__dirname, "..", ".."), - env: { - NITRO_PRESET: "cloudflare_pages", - VITE_PUBLIC_GIT_SHA: gitSha, - ...process.env, - }, -}); - -// Copy frontend build -fs.cpSync(path.join(__dirname, "..", "web", "dist"), dist, { recursive: true }); - -// Cleanup Vinxi/Nitro output -fs.rmSync(path.join(dist, "_worker.js"), { recursive: true, force: true }); -fs.rmSync(path.join(dist, "nitro.json")); -fs.rmSync(path.join(dist, "_build", ".vite", "manifest.json")); -fs.rmSync(path.join(dist, "_build", "server-functions-manifest.json")); -fs.rmSync(path.join(dist, "_redirects")); -fs.rmSync(path.join(dist, "_headers")); -fs.rmSync(path.join(dist, "_routes.json")); - -// Build worker -const result = await build({ - bundle: true, - format: "esm", - charset: "utf8", - sourcemap: false, - outdir: path.join(dist, "_worker.js"), - entryPoints: ["./src/index.ts"], - logLevel: "info", - resolveExtensions: [".tsx", ".ts", ".jsx", ".mjs", ".js", ".json"], - mainFields: ["solid", "worker", "browser", "module", "jsnext", "main"], - conditions: ["solid", "worker", "browser", "import", "production"], - platform: "node", - splitting: true, - minify: true, - legalComments: "none", - plugins: [solidPlugin({ solid: { generate: "ssr" } })], - define: { - "import.meta.env.DEV": JSON.stringify(false), - "import.meta.env.MODE": JSON.stringify("production"), - "import.meta.env.NODE_ENV": JSON.stringify("production"), - "import.meta.env.GIT_SHA": JSON.stringify(gitSha), - }, - metafile: true, -}); - -if (result.errors.length > 0) process.exit(1); - -// TODO: Disable in prod -fs.writeFileSync( - path.join(dist, "_worker.js", "meta.json"), - JSON.stringify(result.metafile), -); - -// Cloudflare configuration -fs.writeFileSync( - path.join(dist, "_routes.json"), - JSON.stringify({ - version: 1, - include: apiRoutes, - exclude: [], - }), -); - -fs.writeFileSync( - path.join(dist, "_headers"), - Object.entries(headers) - .map( - ([route, headers]) => - `${route}\n${Object.entries(headers) - .map(([key, value]) => `\t${key}: ${value}`) - .join("\n")}`, - ) - .join("\n"), -); - -console.log("Build complete!"); diff --git a/apps/api/config.js b/apps/api/config.js deleted file mode 100644 index 0d63878d..00000000 --- a/apps/api/config.js +++ /dev/null @@ -1,48 +0,0 @@ -// Request flow: -// - Matches apiRoutes the Worker will be invoked by the `_routes.json` `include` pattern -// - Otherwise, static files or `index.html` will be served by the CDN - -// All frontend routes. -// These need a redirect to automatically serve the HTML from the edge, as the Worker has smart placement (so it's not from the edge). -// TODO: Automatically generate from file system router information? -const frontendRoutes = ["/", "/t/*", "/account", "/roadmap"]; - -// All backend routes -// These go to the Worker. -export const apiRoutes = [ - "/api/*", - "/EnrollmentServer/*", - "/ManagementServer/*", -]; - -// Headers to apply to all routes. -// TODO: Right now these don't allow to routes served by the Worker (but they should) -export const headers = { - "/*": { - "X-Frame-Options": "DENY", - "X-Content-Type-Options": "nosniff", - "Referrer-Policy": "strict-origin-when-cross-origin", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - }, - "/favicon.ico": { - "Cache-Control": - "public, max-age=1440, s-maxage=1440, stale-if-error=1440, no-transform", - }, - "/_build/*": { - "Cache-Control": "public, immutable, max-age=31536000", - }, - "/_server/*": { - "Cache-Control": "public, immutable, max-age=31536000", - }, - // TODO: Can we avoid this growing with routes? - // TODO: Maybe checkout https://github.com/withastro/astro/pull/7846 - ...Object.fromEntries( - frontendRoutes.map((route) => [ - route, - { - "Cache-Control": - "public, max-age=0, s-maxage=3600, stale-if-error=3600, no-transform", - }, - ]), - ), -}; diff --git a/apps/api/package.json b/apps/api/package.json deleted file mode 100644 index 93c2b75b..00000000 --- a/apps/api/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@mattrax/api", - "type": "module", - "private": true, - "exports": { - "./worker": "./src/index.ts", - "./client": "./src/client.ts", - "./config": "./config.ts", - "./plugin": "./src/plugin.js" - }, - "scripts": { - "build": "tsx ./build.ts" - }, - "dependencies": { - "@lucia-auth/adapter-drizzle": "^1.1.0", - "@mattrax/email": "workspace:*", - "@mattrax/ms-mde": "workspace:*", - "@mattrax/mysql-planetscale": "^0.0.3", - "@mattrax/trpc-server-function": "workspace:*", - "@microlabs/otel-cf-workers": "1.0.0-rc.48", - "@opentelemetry/api": "^1.9.0", - "@paralleldrive/cuid2": "^2.2.2", - "@planetscale/database": "^1.19.0", - "@solidjs/router": "0.14.10", - "@t3-oss/env-core": "^0.11.1", - "@trpc/server": "^10.45.2", - "aws4fetch": "^1.0.20", - "drizzle-orm": "^0.35.2", - "fast-xml-parser": "^4.5.0", - "hono": "^4.6.5", - "lucia": "^3.2.2", - "node-forge": "^1.3.1", - "oslo": "^1.2.1", - "seroval": "^1.1.1", - "zod": "^3.23.8" - }, - "devDependencies": { - "@cloudflare/workers-types": "^4.20241018.0", - "@types/node": "^22.7.7", - "@types/node-forge": "^1.3.11", - "@whatwg-node/server": "^0.9.50", - "esbuild": "^0.24.0", - "esbuild-plugin-solid": "^0.6.0", - "vite": "^5.4.9" - }, - "peerDependencies": { - "solid-js": "*" - } -} diff --git a/apps/api/src/aws/apiGateway.ts b/apps/api/src/aws/apiGateway.ts deleted file mode 100644 index bae15452..00000000 --- a/apps/api/src/aws/apiGateway.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { aws } from "."; - -// TODO -export async function updateDomainName( - domain: string, - region: string, - body: any, -) { - if (!aws.client) - throw new Error("Attempted updateDomainName without valid AWS credentials"); - const resp = await aws.client.fetch( - `https://apigateway.${region}.amazonaws.com/v2/domainnames/${domain}`, - { - method: "PATCH", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(body), - }, - ); - if (!resp.ok) - throw new Error( - `Failed to update '${domain}' with status ${resp.statusText}: ${await resp.text()}`, - ); - // TODO - console.log(await resp.text()); -} diff --git a/apps/api/src/aws/s3.ts b/apps/api/src/aws/s3.ts deleted file mode 100644 index 3ab0fd4e..00000000 --- a/apps/api/src/aws/s3.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { aws } from "."; - -// Get an object from an S3 bucket -// *Note* all error handling is left to the caller as it's very context specific. -export async function getObject( - bucketName: string, - region: string, - key: string, - params?: RequestInit, -) { - if (!aws.client) - throw new Error("Attempted getObject without valid AWS credentials"); - return await aws.client.fetch( - `https://${bucketName}.s3.${region}.amazonaws.com/${key}`, - params, - ); -} - -// Put an object into an S3 bucket -export async function putObject( - bucketName: string, - region: string, - key: string, - body: BodyInit, - params?: RequestInit, -) { - if (!aws.client) - throw new Error("Attempted getObject without valid AWS credentials"); - const resp = await aws.client.fetch( - `https://${bucketName}.s3.${region}.amazonaws.com/${key}`, - { - method: "PUT", - body, - ...params, - }, - ); - if (!resp.ok) - throw new Error( - `Failed to put to bucket '${bucketName}' object '${key}': ${resp.statusText}`, - ); - return resp; -} diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts deleted file mode 100644 index 7dd5c6e3..00000000 --- a/apps/api/src/index.ts +++ /dev/null @@ -1,164 +0,0 @@ -import type { ExecutionContext } from "@cloudflare/workers-types"; -import { - type TrpcServerFunctionOpts, - trpcServerFunction, -} from "@mattrax/trpc-server-function"; -import { toReadableStream } from "@mattrax/trpc-server-function/seroval"; -import { instrument } from "@microlabs/otel-cf-workers"; -import { trace } from "@opentelemetry/api"; -import { type Context, Hono } from "hono"; -import { HTTPException } from "hono/http-exception"; -import { logger } from "hono/logger"; -import type { BlankEnv, BlankInput } from "hono/types"; -import { provideRequestEvent } from "solid-js/web/storage"; -import { getActiveAuthority } from "./authority"; -import { env } from "./env"; -import { createTRPCContext, router } from "./trpc"; -import { waitlistRouter } from "./waitlist"; -import { enrollmentServerRouter, managementServerRouter } from "./win"; - -declare module "solid-js/web" { - interface RequestEvent { - hono: Context; - waitUntil(promise: Promise | (() => Promise)): void; - // TODO: Tie to `wrangler.toml`'s generated types? - env: Record; - } -} - -const GIT_SHA = (import.meta.env as any)?.GIT_SHA || "unknown"; - -const app = new Hono() - .onError((err, c) => { - console.error(err); - if (err instanceof HTTPException) return err.getResponse(); - trace.getActiveSpan()?.recordException(err); - return c.json({ error: "Internal Server Error" }, 500); - }) - .use((c, next) => - provideRequestEvent( - { - hono: c, - request: c.req.raw, - waitUntil: c.executionCtx.waitUntil as any, - env: c.env as any, - // SS's stuff is still being injected via Vite. - locals: {}, - response: c.res, - nativeEvent: undefined as any, - }, - () => next(), - ), - ); - -if (import.meta.env.DEV) app.use(logger()); - -app - .get("/api/__version", (c) => c.json(GIT_SHA)) - .route("/api/waitlist", waitlistRouter) - .get("/api/__cron", async (c) => { - if (c.req.query("secret") !== env.INTERNAL_SECRET) { - c.status(403); - return c.json({ error: "Forbidden" }); - } - - // TODO: Hook this up to a proper Cloudflare CRON - await getActiveAuthority(true); - - return c.text("ok"); - }) - .all("/api/trpc", async (c) => { - const opts: TrpcServerFunctionOpts = await c.req.json(); - const result = await trpcServerFunction({ - router, - ctx: createTRPCContext(), - opts, - }); - - c.header("Content-Type", "text/javascript"); - c.status(200); - const resp = c.body(toReadableStream(result)); - // TODO: For some reason the `c.header` above isn't always respected. - resp.headers.set("Content-Type", "text/javascript"); - return resp; - }) - .route("/EnrollmentServer", enrollmentServerRouter) - .route("/ManagementServer", managementServerRouter) - .all("*", (c) => { - c.status(404); - if (c.req.raw.headers.get("Accept")?.includes("application/json")) { - return c.json({ error: "Not Found" }); - } - return c.text("404: Not Found"); - }); - -// TODO: Codegen from `wrangler.toml` -type Env = Record; - -// We disable this in dev because it doesn't play nice with Vite's devserver (due it trying to instrument CF stuff that doesn't exist). -const instrumented = import.meta.env.DEV - ? undefined - : instrument( - { - fetch: async (request: Request, env: Env, ctx: ExecutionContext) => { - const resp = await app.fetch(request, env, ctx); - const spanCtx = trace.getActiveSpan(); - if (spanCtx) - resp.headers.set("x-trace-id", spanCtx.spanContext().traceId); - return resp; - }, - }, - (env) => { - return { - service: { name: "web", version: GIT_SHA }, - exporter: { - url: "https://api.axiom.co/v1/traces", - headers: { - Authorization: `Bearer ${env.AXIOM_API_TOKEN}`, - "X-Axiom-Dataset": `${env.AXIOM_DATASET}`, - }, - }, - }; - }, - ); - -const _log = console.log; -console.log = (...args) => { - _log(...args); - trace.getActiveSpan()?.addEvent("log", { args }); -}; -const _error = console.error; -console.error = (...args) => { - _error(...args); - trace.getActiveSpan()?.addEvent("error", { args }); -}; -const _warn = console.warn; -console.warn = (...args) => { - _warn(...args); - trace.getActiveSpan()?.addEvent("warn", { args }); -}; -const _trace = console.trace; -console.trace = (...args) => { - _trace(...args); - trace.getActiveSpan()?.addEvent("trace", { args }); -}; - -export default { - fetch: async (request: Request, env: Env, ctx: ExecutionContext) => { - // biome-ignore lint/style/noParameterAssign: In dev you get `ctx` as `env` type thing so we override. - if (import.meta.env.DEV) env = process.env; - if (!ctx) - // biome-ignore lint/style/noParameterAssign: - ctx = { - waitUntil: (p) => - // If we don't catch it will panic the node devserver. - p.catch((err) => console.error("Failed waitUntil:", err)), - passThroughOnException: () => {}, - }; - - const isAxiom = "AXIOM_API_TOKEN" in env && "AXIOM_DATASET" in env; - return await (isAxiom && !!instrumented - ? instrumented.fetch(request, env, ctx) - : app.fetch(request, env, ctx)); - }, -}; diff --git a/apps/api/src/plugin.js b/apps/api/src/plugin.js deleted file mode 100644 index f9d6d7d0..00000000 --- a/apps/api/src/plugin.js +++ /dev/null @@ -1,90 +0,0 @@ -import { createServer } from "node:http"; -import { createServerAdapter } from "@whatwg-node/server"; -import { apiRoutes } from "../config.js"; - -export function plugin() { - const match = new RegExp( - `(^(${apiRoutes.map((r) => `^${r.replaceAll("/", "\\/").replaceAll("*", ".*")}`).join("|")}))`, - "gm", - ); - let config; - let s; - - return { - name: "mattrax:dev", - - config(config) { - if (!config.server) config.server = {}; - if (!config.server.proxy) config.server.proxy = {}; - config.server.proxy = { - ...config.server.proxy, - ...Object.fromEntries( - apiRoutes.map((r) => [ - r.replaceAll("/*", ""), - "http://localhost:9038", - ]), - ), - }; - }, - - configResolved(_config) { - config = _config; - }, - - configureServer(server) { - if (config.inlineConfig.router.name !== "ssr") return; - - s = createServer(async (req, res, next) => { - try { - const m = await server.ssrLoadModule("@mattrax/api/worker"); - if (!m.default) - throw new Error("No `default` export found in server module."); - if (!m.default.fetch) - throw new Error("No `fetch` export found in server module."); - await createServerAdapter(m.default.fetch).handle(req, res, next); - } catch (err) { - console.error(err); - res.writeHead(500); - res.end("Internal Server Error"); - } - return; - }); - s.listen(9038); - process.on("exit", (code) => s.close()); - - // TODO: This is not working as expected, probs a Vinxi thing. - // server.middlewares.use(async (req, res, next) => { - // // console.log("API request", req.url, req.url && match.test(req.url)); - // if (req.url && match.test(req.url)) { - // try { - // const m = await server.ssrLoadModule("@mattrax/api/worker"); - // if (!m.default) - // throw new Error("No `default` export found in server module."); - // if (!m.default.fetch) - // throw new Error("No `fetch` export found in server module."); - // // console.log(createServerAdapter(m.default.fetch)); - // // console.log( - // // await createServerAdapter(m.default.fetch).handle(req, res, next), - // // ); - // // TODO: m.default.fetch - // await createServerAdapter(() => new Response("TODO")).handle( - // req, - // res, - // next, - // ); - // } catch (err) { - // console.error(err); - // res.status(500); - // res.end("Internal Server Error"); - // } - // return; - // } - // next(); - // }); - }, - - buildEnd() { - if (s) s.close(); - }, - }; -} diff --git a/apps/api/src/win/index.ts b/apps/api/src/win/index.ts deleted file mode 100644 index fa2a1a49..00000000 --- a/apps/api/src/win/index.ts +++ /dev/null @@ -1,359 +0,0 @@ -import { discoverResponse, discoveryRequest } from "@mattrax/ms-mde/discovery"; -import { - enrollmentRequest, - enrollmentResponse, -} from "@mattrax/ms-mde/enrollment"; -import { policyRequest, policyResponse } from "@mattrax/ms-mde/policy"; -import { deserializeXml, soapResponse } from "@mattrax/ms-mde/util"; -import { datatype, wapProvisioningProfile } from "@mattrax/ms-mde/wap"; -import { trace } from "@opentelemetry/api"; -import { Hono } from "hono"; -import { getActiveAuthority, getAuthorityTruststore } from "~/authority"; -import { env } from "~/env"; -import { microsoftDeviceIDExtension } from "../win/common"; - -export const enrollmentServerRouter = new Hono() - .get("/Authenticate.svc", async (c) => { - const appru = c.req.query("appru"); - if (!appru) return new Response("Missing appru", { status: 400 }); - return c.html(`
-

- -
`); - }) - .get("/ToS", async (c) => { - const url = new URL(c.req.raw.url); - - const appru = url.searchParams.get("appru"); - // TODO: Style this error page - if (!appru) return c.body("Missing appru!", { status: 400 }); - return c.html( - `h3>AzureAD Term Of Service - -`, - ); - }) - .get("/Discovery.svc", async (c) => new Response("")) - .post("/Discovery.svc", async (c) => { - const span = trace.getActiveSpan(); - const traceId = span ? span.spanContext().traceId : "..."; - - const req = deserializeXml(discoveryRequest, await c.req.text()); - if (!req.success) { - // TODO: Handle XML errors with SOAP faults - console.log(req); - throw new Error("Error!"); - } - - const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; - - return soapResponse( - discoverResponse( - { - authPolicy: "Federated", - // TODO: Should this reflect this clients version/us error if we don't recognize it? - enrollmentVersion: "5.0", - enrollmentPolicyServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Policy.svc`, - enrollmentServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Enrollment.svc`, - authenticationServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Authenticate.svc`, - }, - { - relatesTo: messageId, - correlationId: traceId, - activityId: traceId, - }, - ), - ); - }) - .post("/Policy.svc", async (c) => { - const span = trace.getActiveSpan(); - const traceId = span ? span.spanContext().traceId : "..."; - - const req = deserializeXml(policyRequest, await c.req.text()); - if (!req.success) { - // TODO: Handle XML errors with SOAP faults - for (const error of req.issues) { - console.error("ISSUE", error.message, error.path, error); - } - console.log(JSON.stringify(req.output, null, 2)); - throw new Error("Error!"); - } - const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; - - // TODO: Authentication - - // TODO: Client renewing it's own certificate - - // if cmd.Header.Action != policyActionRequest { - // fault.Fault(fmt.Errorf("the request's action is not supported by the endpoint"), "the request was not destined for this endpoint", soap.FaultCodeActionMismatch) - // return - // } else if strings.Split(r.URL.String(), "?")[0] != strings.Split(cmd.Header.To, "?")[0] { - // fault.Fault(fmt.Errorf("the request was destined for another server"), "the request was not destined for this server", soap.FaultCodeEndpointUnavailable) - // return - // } - - return soapResponse( - policyResponse( - { - policyId: "mattrax-identity", - policyFriendlyName: "Mattrax Device Authority Policy", - }, - { - relatesTo: messageId, - correlationId: traceId, - activityId: traceId, - }, - ), - ); - }) - .post("/Enrollment.svc", async (c) => { - const span = trace.getActiveSpan(); - const traceId = span ? span.spanContext().traceId : "..."; - - const req = deserializeXml(enrollmentRequest, await c.req.text()); - if (!req.success) { - // TODO: Handle XML errors with SOAP faults - for (const error of req.issues) { - console.error("ISSUE", error.message, error.path, error); - } - console.log(JSON.stringify(req.output, null, 2)); - throw new Error("Error!"); - } - - const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; - const authBstRaw = - req.output["s:Envelope"]["s:Header"]?.["wsse:Security"]?.[ - "wsse:BinarySecurityToken" - ]?.["#text"]; - if (!authBstRaw) throw new Error("TODO: Handle unauthorised"); - const authBst = atob(authBstRaw); - - // const deviceId = req.output['s:Envelope']['s:Body']; - const enrollmentType = "Full"; // TODO: req.output["s:Envelope"]["s:Body"]["wst:RequestSecurityToken"]["ac:AdditionalContext"]["ac:ContextItem"].find((item) => item["ac:Name"] === "EnrollmentType")["ac:Value"]; - const csrRaw = atob( - req.output["s:Envelope"]["s:Body"]["wst:RequestSecurityToken"][ - "wsse:BinarySecurityToken" - ]["#text"], - ); - - // @ts-expect-error - const certStore = enrollmentType === "Device" ? "Device" : "User"; - - if (authBst !== "TODOSpecialTokenWhichVerifiesAuth") { - console.warn("Invalid authentication token!"); - } - - const [ - identityCertFingerprint, - rootCertificateDer, - signedClientCertFingerprint, - clientCRTRaw, - ] = await todo(csrRaw); - - console.log( - `Subject=${encodeURIComponent("CN=TODO")}&Stores=My%5C${certStore}`, - ); - - if (!identityCertFingerprint) throw new Error("TODO: Prevent this"); - if (!signedClientCertFingerprint) throw new Error("TODO: Prevent this"); - if (!rootCertificateDer) throw new Error("TODO: Prevent this"); - if (!clientCRTRaw) throw new Error("TODO: Prevent this"); - - return soapResponse( - enrollmentResponse( - { - wapProvisioningProfile: wapProvisioningProfile({ - CertificateStore: { - Root: { - System: { - [identityCertFingerprint]: { - EncodedCertificate: rootCertificateDer, - }, - }, - }, - My: { - [certStore]: { - [signedClientCertFingerprint]: { - EncodedCertificate: clientCRTRaw, - }, - PrivateKeyContainer: {}, - }, - }, - }, - APPLICATION: { - APPID: "w7", - "PROVIDER-ID": "DEMO MDM", - NAME: "Windows MDM Demo Server", - ADDR: `${env.MANAGE_URL}/ManagementServer/Manage.svc`, - ROLE: "4294967295", - BACKCOMPATRETRYDISABLED: null, // TODO: handle this - DEFAULTENCODING: "application/vnd.syncml.dm+xml", - SSLCLIENTCERTSEARCHCRITERIA: `Subject=${encodeURIComponent( - "CN=TODO", - )}&Stores=My%5C${certStore}`, - APPAUTH: [ - { - AAUTHLEVEL: "CLIENT", - AAUTHTYPE: "DIGEST", - AAUTHSECRET: "dummy", - AAUTHDATA: "nonce", - }, - { - AAUTHLEVEL: "APPSRV", - AAUTHTYPE: "DIGEST", - AAUTHNAME: "dummy", - AAUTHSECRET: "dummy", - AAUTHDATA: "nonce", - }, - ], - }, - DMClient: { - Provider: { - "DEMO MDM": { - Poll: { - NumberOfFirstRetries: datatype(8), - }, - }, - }, - }, - }), - }, - { - relatesTo: messageId, - correlationId: traceId, - activityId: traceId, - }, - ), - ); - }); - -export const managementServerRouter = new Hono().post( - "/Manage.svc", - async (c) => { - const request = c.req.raw; - - const body = await request.text(); - - // TODO: Authenticate this came from the mTLS proxy - - const clientCertRaw = request.headers.get("x-client-cert"); - if (!clientCertRaw) { - // TODO: Proper error handling??? - return new Response("No client cert", { status: 400 }); - } - - // console.log("GOT", atob(clientCertRaw)); // TODO - - const { asn1, pki } = (await import("node-forge")).default; - - // TODO: Why do we need to double base64 decode? - const clientCert = pki.certificateFromAsn1( - asn1.fromDer(atob(clientCertRaw)), - ); - const expectedCerts = await getAuthorityTruststore(); - - const isTrusted = expectedCerts.some((cert) => { - try { - return cert.verify(clientCert); - } catch (e) { - console.error(e); - return false; - } - }); - - if (!isTrusted) - return new Response("Client cert not trusted", { status: 400 }); - - console.log("MANAGEMENT", clientCertRaw, body); - - // TODO: Authenticate client - // TODO: Do management session - - return new Response(""); - }, -); - -async function todo(binarySecurityToken: string) { - const { asn1, md, pki } = (await import("node-forge")).default; - - const [authority, authorityKey] = await getActiveAuthority(); - - const csr = pki.certificationRequestFromAsn1( - asn1.fromDer(binarySecurityToken), - ); - - console.log("CSR", csr.subject); - - const cert = pki.createCertificate(); - cert.version = csr.version; - cert.signature = csr.signature; - if (csr.publicKey) cert.publicKey = csr.publicKey; - else console.error("No public key in CSR"); - // TODO: hook this up with SSLSearch thingo - // cert.setSubject(csr.subject.attributes); - cert.setSubject([ - { - name: "commonName", - value: "TODO", // TODO: commonName, - }, - ]); - - cert.setExtensions([ - { - name: "basicConstraints", - critical: true, - cA: false, - }, - { - name: "keyUsage", - critical: true, - digitalSignature: true, - keyEncipherment: true, - }, - { - name: "extKeyUsage", - critical: true, - clientAuth: true, - }, - { - id: microsoftDeviceIDExtension, - value: "todo", // TODO: deviceId - }, - ]); - - // TODO: Hook this up - cert.serialNumber = `${Number.parseInt( - `${Math.floor(Math.random() * 1000000000000000000)}`, - 10, - )}`; - cert.setIssuer(authority.subject.attributes); - cert.validity.notBefore = new Date(); - cert.validity.notAfter = new Date(); - cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1); - cert.sign(authorityKey, md.sha256.create()); - - const clientCert = asn1.toDer(pki.certificateToAsn1(cert)).getBytes(); - const ca = asn1.toDer(pki.certificateToAsn1(authority)).getBytes(); - - return [ - await certificateSha1Fingerprint(ca), - Buffer.from(ca, "binary").toString("base64"), - await certificateSha1Fingerprint(clientCert), - Buffer.from(clientCert, "binary").toString("base64"), - ]; -} - -const certificateSha1Fingerprint = async (msg: string) => { - const { md } = (await import("node-forge")).default; - return md.sha1.create().update(msg).digest().toHex().toUpperCase(); -}; diff --git a/apps/api/sst-env.d.ts b/apps/api/sst-env.d.ts deleted file mode 100644 index 593ead04..00000000 --- a/apps/api/sst-env.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -import "sst" -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json deleted file mode 100644 index c328e11c..00000000 --- a/apps/api/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "composite": true, - "outDir": "./distt", - "moduleResolution": "Bundler", - "allowJs": true, - "types": ["node", "vite/client"], - "paths": { - "~/*": ["./src/*"] - } - }, - "include": ["src/", "build.ts", "config.js"], - "exclude": ["node_modules", "dist"] -} diff --git a/apps/api/wrangler.toml b/apps/api/wrangler.toml deleted file mode 100644 index 17485b26..00000000 --- a/apps/api/wrangler.toml +++ /dev/null @@ -1,36 +0,0 @@ -#:schema node_modules/wrangler/config-schema.json -name = "api" -main = "src/index.ts" -compatibility_date = "2024-10-01" -compatibility_flags = ["nodejs_compat_v2"] - -# TODO: Require auth on preview deployments -workers_dev = true - -# Basically we take over /api/* from the Cloudflare Pages project. -# We can't serve assets through this deployment without loosing smart placement on the API code due to the lack of `_headers` and `_redirects` support. -route = { pattern = "cloud.mattrax.app/api/*", zone_name = "mattrax.app" } - -[observability] -enabled = true - -[placement] -mode = "smart" - -[define] -"import.meta.env.DEV" = "true" -"import.meta.env.MODE" = "production" -"import.meta.env.NODE_ENV" = "production" - -[vars] -NODE_ENV = "production" -VITE_PROD_ORIGIN = "https://cloud.mattrax.app" -MANAGE_URL = "https://manage.mattrax.app" -FROM_ADDRESS = "Mattrax " -INTERNAL_SECRET = "" -DATABASE_URL = "" -AWS_ACCESS_KEY_ID = "" -AWS_SECRET_ACCESS_KEY = "" -WAITLIST_DISCORD_WEBHOOK_URL = "" -FEEDBACK_DISCORD_WEBHOOK_URL = "" -DO_THE_THING_WEBHOOK_URL = "" diff --git a/apps/cloud/Cargo.toml b/apps/cloud/Cargo.toml deleted file mode 100644 index 4423d5b2..00000000 --- a/apps/cloud/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "mx-cloud" -description = "Services for Mattrax's Cloud offering" -version = "0.0.1" -edition = "2021" -publish = false -default-run = "axum" - -[dependencies] -mx-db = { path = "../../crates/mx-db" } - -tracing = { workspace = true } -axum = { workspace = true, features = ["http2", "macros", "ws"] } -serde = { workspace = true, features = ["derive"] } -tokio = { workspace = true } -serde_json = { workspace = true } -mysql_async = { workspace = true } - -openssl = { version = "0.10.68", features = ["vendored"] } - -lambda_http = "0.13.0" -tracing-subscriber = "0.3.18" -tower-http = { version = "0.6.1", features = ["trace"] } -axum-extra = { version = "0.9.4", features = ["cookie"] } -base64 = "0.22.1" -cuid2 = "0.1.3" diff --git a/apps/cloud/LICENCE b/apps/cloud/LICENCE deleted file mode 100644 index e9d57861..00000000 --- a/apps/cloud/LICENCE +++ /dev/null @@ -1,3 +0,0 @@ -Code in this directory is proprietary software and can not be operated without express permission from the Mattrax Inc. - -You are forbidden for any use, modification, or distribution of this code. This code is the property of the Mattrax. \ No newline at end of file diff --git a/apps/cloud/README.md b/apps/cloud/README.md deleted file mode 100644 index 22f907d9..00000000 --- a/apps/cloud/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Cloud - -**This is not design for self-hosting!!! Checkout [`apps/mattrax`](../mattrax)** - -Services for Mattrax's Cloud offering. diff --git a/apps/cloud/build.rs b/apps/cloud/build.rs deleted file mode 100644 index 13bd0e34..00000000 --- a/apps/cloud/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -use std::process::Command; - -fn main() { - let output = Command::new("git") - .args(["rev-parse", "--short", "HEAD"]) - .output() - .expect("error getting git hash. Does `git rev-parse --short HEAD` work for you?"); - let git_hash = String::from_utf8(output.stdout) - .expect("Error passing output of `git rev-parse --short HEAD`"); - println!("cargo:rustc-env=GIT_HASH={git_hash}"); -} diff --git a/apps/cloud/src/bin/axum.rs b/apps/cloud/src/bin/axum.rs deleted file mode 100644 index b4304762..00000000 --- a/apps/cloud/src/bin/axum.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! WARNING: This is only designed for development purposes and does not support the full capabilities of Mattrax Cloud! - -use std::net::Ipv4Addr; - -#[tokio::main] -async fn main() { - let app = mx_cloud::Context::from_env() - .expect("Failed to load context") - .mount(); - - let listener = tokio::net::TcpListener::bind((Ipv4Addr::UNSPECIFIED, 3000)) - .await - .unwrap(); - axum::serve(listener, app).await.unwrap(); -} diff --git a/apps/cloud/src/bin/lambda.rs b/apps/cloud/src/bin/lambda.rs deleted file mode 100644 index f7747f27..00000000 --- a/apps/cloud/src/bin/lambda.rs +++ /dev/null @@ -1,12 +0,0 @@ -#[tokio::main] -async fn main() -> Result<(), lambda_http::Error> { - // If you use API Gateway stages, the Rust Runtime will include the stage name - // as part of the path that your application receives. We don't want this! - std::env::set_var("AWS_LAMBDA_HTTP_IGNORE_STAGE_IN_PATH", "true"); - - let app = mx_cloud::Context::from_env() - .expect("Failed to load context") - .mount(); - - lambda_http::run(app).await -} diff --git a/apps/cloud/src/lib.rs b/apps/cloud/src/lib.rs deleted file mode 100644 index 508bdf39..00000000 --- a/apps/cloud/src/lib.rs +++ /dev/null @@ -1,110 +0,0 @@ -use std::{sync::Arc, time::Duration}; - -use axum::{ - extract::{MatchedPath, Request}, - http::{HeaderValue, StatusCode}, - middleware::{self, Next}, - response::{Redirect, Response}, - routing::get, - Router, -}; -use tower_http::trace::TraceLayer; -use tracing::{info_span, Span}; - -mod sql; - -pub struct Context { - pub internal_secret: String, - pub db: mx_db::Db, -} - -impl Context { - /// Load the Mattrax Cloud context from environment variables - pub fn from_env() -> Result { - Ok(Context { - internal_secret: std::env::var("INTERNAL_SECRET") - .map_err(|_| "'INTERNAL_SECRET' must be set")?, - db: mx_db::Db::new( - &std::env::var("DATABASE_URL").map_err(|_| "'DATABASE_URL' must be set")?, - ), - }) - } - - /// Mount the Mattrax Cloud API onto an Axum router - pub fn mount(self) -> Router { - let this = Arc::new(self); - tracing_subscriber::fmt().init(); - std::panic::set_hook(Box::new(move |panic| tracing::error!("{panic}"))); - - Router::new() - .route( - "/", - get(|| async move { Redirect::temporary("https://mattrax.app") }), - ) - .route( - "/_/version", - get(|| async move { - format!( - "Mattrax MDM {} ({})", - env!("CARGO_PKG_VERSION"), - env!("GIT_HASH") - ) - }), - ) - .nest( - "/psdb.v1alpha1.Database", - sql::mount().route_layer(middleware::from_fn_with_state(this.clone(), sql::auth)), - ) - .with_state(this.clone()) - .layer( - TraceLayer::new_for_http() - .make_span_with(|request: &axum::http::Request<_>| { - let matched_path = request - .extensions() - .get::() - .map(MatchedPath::as_str); - - info_span!( - "http_request", - method = ?request.method(), - matched_path, - some_other_field = tracing::field::Empty, - ) - }) - .on_response(|resp: &Response, latency: Duration, _span: &Span| { - #[cfg(debug_assertions)] - tracing::info!("responded with {} in {:?}", resp.status(), latency); - }), - ) - .route_layer(middleware::from_fn(headers)) - .fallback(|| async move { (StatusCode::NOT_FOUND, "404: Not Found") }) - } -} - -async fn headers(request: Request, next: Next) -> Response { - let (method, uri) = (request.method().clone(), request.uri().clone()); - let mut response = next.run(request).await; - - #[cfg(debug_assertions)] - tracing::debug!("{method} {uri} - {:?}", response.status()); - - let headers = response.headers_mut(); - headers.append("Server", HeaderValue::from_static("Mattrax")); - // if cgg!(debug_assertions) { - // headers.append( - // "Strict-Transport-Security", - // HeaderValue::from_static("max-age=31536000; preload"), - // ); - // } - headers.append("X-Frame-Options", HeaderValue::from_static("DENY")); - headers.append( - "X-Content-Type-Options", - HeaderValue::from_static("nosniff"), - ); - headers.append( - "Referrer-Policy", - HeaderValue::from_static("strict-origin-when-cross-origin"), - ); - - response -} diff --git a/apps/cloud/src/sql.rs b/apps/cloud/src/sql.rs deleted file mode 100644 index 0314af2b..00000000 --- a/apps/cloud/src/sql.rs +++ /dev/null @@ -1,336 +0,0 @@ -//! This code is heavily copied from another project of [Cityscale](https://github.com/oscartbeaumont/cityscale). -//! -//! This is a `@planetscale/database` compatible adapter for usage with a regular MySQL database. -//! This provides connection pooling and an Edge compatible API with the ability for self-hosting. -//! -//! This implementation has also been stripped to just the stuff required by Mattrax. Eg. no `/CreateSession` endpoint because it's effectively unused in Planetscale's SDK. -//! - -use std::{collections::HashMap, sync::Arc}; - -use axum::{ - extract::{Request, State}, - http::StatusCode, - middleware::Next, - response::{IntoResponse, Response}, - routing::post, - Json, Router, -}; -use base64::{engine::general_purpose::STANDARD, Engine}; -use mysql_async::{ - consts::{ColumnFlags, ColumnType}, - prelude::*, - Column, Row, Transaction, TxOpts, Value, -}; -use serde::{Deserialize, Serialize}; -use serde_json::json; -use tokio::sync::RwLock; -use tracing::{debug, error}; - -use crate::Context; - -pub struct ConnectionPool { - /// Active database transactions - sessions: RwLock>>, -} - -pub fn mount() -> Router> { - let pool = Arc::new(ConnectionPool { - sessions: Default::default(), - }); - - Router::new() - .route( - "/Execute", - post({ - let pool = pool.clone(); - |State(state): State>, Json(data): Json| async move { - let start = std::time::Instant::now(); - let mut session = None; - - if data.query == "BEGIN" { - let tx = state.db.start_transaction(TxOpts::default()).await.map_err(|err| { - error!("Error starting DB transaction: {err}"); - error(format!("error starting DB transaction: {err:?}")) - })?; - - let id = cuid2::create_id(); - debug!("Creating new DB session {id:?}"); - - { - pool.sessions.write().await.insert(id.clone(), tx); - } - - session = Some(TransactionSession { - id - }); - - // `BEGIN` is run by `db.start_transaction` so we don't actually wanna execute it - return Ok(Json(json!({ - "session": session, - "result": json!({}), - "timing": start.elapsed().as_secs_f64(), - })).into_response()); - } - - let (columns, values, rows_affected, last_insert_id) = if let Some(session) = data.session { - // TODO: Can we only lock the specific session, not all of them while the DB query is running - let mut sessions = pool.sessions.write().await; - - if data.query == "COMMIT" { - let tx = sessions.remove(&session.id).ok_or_else(|| { - debug!("Attempted to commit non-existent transaction {:?}", session.id); - error(format!("error committing non-existent transaction {:?}", session.id)) - })?; - - tx.commit().await.map_err(|err| { - error!("Error committing transaction: {err}"); - error(format!("error committing transaction {:?}: {err:?}", session.id)) - })?; - debug!("COMMIT transaction {:?}", session.id); - - return Ok(Json(json!({ - "session": session, - "result": json!({}), - "timing": start.elapsed().as_secs_f64(), - })).into_response()); - } else if data.query == "ROLLBACK" { - let tx = sessions.remove(&session.id).ok_or_else(|| { - debug!("Attempted to rollback non-existent transaction {:?}", session.id); - error(format!("error rolling back non-existent transaction {:?}", session.id)) - })?; - - tx.rollback().await.map_err(|err| { - error!("Error rolling back transaction: {err}"); - error(format!("error rolling back transaction {:?}: {err:?}", session.id)) - })?; - debug!("ROLLBACK transaction {:?}", session.id); - - return Ok(Json(json!({ - "session": session, - "result": json!({}), - "timing": start.elapsed().as_secs_f64(), - })).into_response()); - } else { - debug!("Executing query {:?} on session {:?}", data.query, session.id); - let tx = sessions.get_mut(&session.id).ok_or_else(|| { - debug!("Attempted to getting non-existent transaction {:?}", session.id); - error(format!("error getting non-existent transaction {:?}", session.id)) - })?; - - let result = tx - .exec_iter(&data.query, ()) - .await - .map_err(|err| { - error!("Error executing query against transaction {:?}: {err}", session.id); - error(format!("error executing query: {err:?}")) - })?; - - (result.columns(), result.collect_and_drop::().await, tx.affected_rows().to_string(), tx.last_insert_id().map(|v| v.to_string())) - } - } else { - let mut conn = state.db.get_conn().await.map_err(|err| { - error!("Error getting DB connection: {err}"); - error(format!("error getting DB connection: {err:?}")) - })?; - - debug!("Executing query {:?}", data.query); - let result = conn - .exec_iter(&data.query, ()) - .await - .map_err(|err| { - error!("Error executing query: {err}"); - error(format!("error executing query: {err:?}")) - })?; - - (result.columns(), result.collect_and_drop::().await, conn.affected_rows().to_string(), conn.last_insert_id().map(|v| v.to_string())) - }; - - let values = values.map_err(|err| { - error!("Error getting values: {err}"); - error(format!("error decoding values: {err:?}")) - })?; - - let fields = columns.as_deref() - .unwrap_or(&[]) - .iter() - .map(|col| - json!({ - "name": col.name_str().to_string(), - "type": column_type_to_str(col), - "charset": col.character_set(), - "flags": col.flags().bits() - }) - ) - .collect::>(); - - let rows = values - .into_iter() - .map(|mut row| { - let mut lengths = Vec::new(); - let mut values = Vec::new(); - - for i in 0..row.len() { - let Some(value) = row.take(i) else { - continue; - }; - - let result = match value { - Value::NULL => { - lengths.push(-1i64); - continue; - }, - Value::Bytes(v) => { - lengths.push(v.len().try_into().expect("unable to cast usize to i64. How big are your damn pointers?")); - values.extend(v); - continue; - }, - Value::Int(i) => i.to_string(), - Value::UInt(i) => i.to_string(), - Value::Float(i) => i.to_string(), - Value::Double(i) => i.to_string(), - // TODO: Planetscale seems to wipe out the fractional seconds, idk why but we are gonna copy for now. - Value::Date(year, month, day, hour, minute, second, _) => { - if row.columns_ref()[i].column_type() == ColumnType::MYSQL_TYPE_DATE { - format!("{:04}-{:02}-{:02}", year, month, day) - } else { - format!("{:04}-{:02}-{:02} {:02}:{:02}:{:02}", year, month, day, hour, minute, second) - } - }, - // TODO: Planetscale seems to wipe out the fractional seconds, idk why but we are gonna copy for now. - Value::Time(neg, d, h, i, s, _) => { - if neg { - format!("-{:02}:{:02}:{:02}", d * 24 + u32::from(h), i, s) - } else { - format!("{:02}:{:02}:{:02}", d * 24 + u32::from(h), i, s) - } - } - }; - - lengths.push(result.len().try_into().expect("unable to cast usize to i64. How big are your damn pointers?")); - values.extend(result.as_bytes()); - } - - json!({ - "lengths": lengths, - "values": STANDARD.encode(values), - }) - }) - .collect::>(); - - Ok::(Json(json!({ - "session": session, - "result": json!({ - "rowsAffected": rows_affected, - "insertId": last_insert_id, - "fields": fields, - "rows": rows, - }), - "timing": start.elapsed().as_secs_f64(), - })).into_response()) - } - }), - ) -} - -pub async fn auth(State(state): State>, request: Request, next: Next) -> Response { - let authorization = request - .headers() - .get("authorization") - .and_then(|v| v.to_str().ok()); - - if authorization - != Some(&format!( - "Basic {}", - STANDARD.encode(format!(":{}", &state.internal_secret)) - )) - && authorization != Some(&format!("Bearer {}", state.internal_secret)) - { - return (StatusCode::UNAUTHORIZED, "Unauthorized").into_response(); - } - - next.run(request).await -} - -fn error(msg: String) -> Response { - ( - StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({ - "error": { - "message": msg, - } - })), - ) - .into_response() -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -struct TransactionSession { - id: String, -} - -#[derive(Deserialize)] -struct SqlRequest { - query: String, - session: Option, -} - -// Convert MySQL column types to Vitess column types -// -// Ref: -// - https://github.com/vitessio/vitess/blob/9e40015748ede158357bd7291f583db138abc3df/go/sqltypes/type.go#L142 -// - https://vitess.io/files/version-pdfs/Vitess-Docs-6.0-04-29-2020.pdf -fn column_type_to_str(col: &Column) -> &'static str { - let is_signed = !col.flags().contains(ColumnFlags::UNSIGNED_FLAG); - let is_binary = col.flags().contains(ColumnFlags::BINARY_FLAG); - - if col.flags().contains(ColumnFlags::ENUM_FLAG) { - return "ENUM"; - } else if col.flags().contains(ColumnFlags::SET_FLAG) { - return "SET"; - } - - match col.column_type() { - ColumnType::MYSQL_TYPE_DECIMAL => "DECIMAL", - ColumnType::MYSQL_TYPE_TINY => t(is_signed, "INT8", "UINT8"), - ColumnType::MYSQL_TYPE_SHORT => t(is_signed, "INT16", "UINT16"), - ColumnType::MYSQL_TYPE_LONG => t(is_signed, "INT32", "UINT32"), - ColumnType::MYSQL_TYPE_FLOAT => "FLOAT32", - ColumnType::MYSQL_TYPE_DOUBLE => "FLOAT64", - ColumnType::MYSQL_TYPE_NULL => "NULL", - ColumnType::MYSQL_TYPE_TIMESTAMP => "TIMESTAMP", - ColumnType::MYSQL_TYPE_LONGLONG => t(is_signed, "INT64", "UINT64"), - ColumnType::MYSQL_TYPE_INT24 => t(is_signed, "INT24", "UINT24"), - ColumnType::MYSQL_TYPE_DATE => "DATE", - ColumnType::MYSQL_TYPE_TIME => "TIME", - ColumnType::MYSQL_TYPE_DATETIME => "DATETIME", - ColumnType::MYSQL_TYPE_YEAR => "YEAR", - ColumnType::MYSQL_TYPE_NEWDATE => unreachable!("Internal to MySQL."), - ColumnType::MYSQL_TYPE_VARCHAR => "VARCHAR", - ColumnType::MYSQL_TYPE_BIT => "BIT", - ColumnType::MYSQL_TYPE_TIMESTAMP2 => todo!(), - ColumnType::MYSQL_TYPE_DATETIME2 => todo!(), - ColumnType::MYSQL_TYPE_TIME2 => todo!(), - ColumnType::MYSQL_TYPE_TYPED_ARRAY => unreachable!("Used for replication only."), - ColumnType::MYSQL_TYPE_UNKNOWN => unreachable!(), - ColumnType::MYSQL_TYPE_JSON => "JSON", - ColumnType::MYSQL_TYPE_NEWDECIMAL => todo!(), - ColumnType::MYSQL_TYPE_ENUM => "ENUM", - ColumnType::MYSQL_TYPE_SET => "SET", - ColumnType::MYSQL_TYPE_TINY_BLOB - | ColumnType::MYSQL_TYPE_MEDIUM_BLOB - | ColumnType::MYSQL_TYPE_LONG_BLOB - | ColumnType::MYSQL_TYPE_BLOB => t(is_binary, "BLOB", "TEXT"), - ColumnType::MYSQL_TYPE_VAR_STRING => t(is_binary, "VARBINARY", "VARCHAR"), - ColumnType::MYSQL_TYPE_STRING => t(is_binary, "BINARY", "CHAR"), - ColumnType::MYSQL_TYPE_GEOMETRY => "GEOMETRY", - } -} - -fn t(a_or_b: bool, a: T, b: T) -> T { - if a_or_b { - a - } else { - b - } -} diff --git a/apps/landing/sst-env.d.ts b/apps/landing/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/apps/landing/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/apps/web/app.config.ts b/apps/web/app.config.ts index 3ecca807..dbdf1eec 100644 --- a/apps/web/app.config.ts +++ b/apps/web/app.config.ts @@ -1,4 +1,4 @@ -import { plugin } from "@mattrax/api/plugin"; +import { execSync } from "node:child_process"; import mattraxUI from "@mattrax/ui/vite"; import { defineConfig } from "@solidjs/start/config"; import { visualizer } from "rollup-plugin-visualizer"; @@ -14,6 +14,9 @@ import { monorepoRoot } from "./loadEnv"; const nitroPreset = process.env.NITRO_PRESET ?? "node-server"; const isCFPages = nitroPreset === "cloudflare_pages"; +// Get git SHA +const gitSha = execSync("git rev-parse HEAD").toString().trim(); + export default defineConfig({ ssr: false, routeDir: "app", @@ -41,8 +44,10 @@ export default defineConfig({ gzipSize: true, filename: `stats${router === "client" ? "" : `-${router}`}.html`, }), - plugin(), ], + define: { + "import.meta.env.GIT_SHA": JSON.stringify(gitSha), + }, }), server: { preset: nitroPreset, @@ -66,5 +71,9 @@ export default defineConfig({ external: ["cloudflare:sockets"], }, }), + vercel: { + // Gotta stay close to the DB + regions: ["iad1"], + }, }, }); diff --git a/apps/web/package.json b/apps/web/package.json index c08fa0e0..8880b525 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,11 +14,11 @@ "@kobalte/core": "^0.13.7", "@kobalte/tailwindcss": "^0.9.0", "@lucia-auth/adapter-drizzle": "^1.1.0", - "@mattrax/api": "workspace:*", "@mattrax/configuration-schemas": "workspace:*", "@mattrax/drizzle-to-rs": "workspace:*", "@mattrax/email": "workspace:*", "@mattrax/ms-graph": "workspace:*", + "@mattrax/ms-mde": "workspace:*", "@mattrax/mysql-planetscale": "workspace:*", "@mattrax/policy": "workspace:*", "@mattrax/policy-composer": "workspace:*", @@ -66,7 +66,6 @@ "drizzle-orm": "^0.35.2", "fast-xml-parser": "^4.5.0", "h3": "^1.13.0", - "hono": "^4.6.5", "jose": "^5.9.6", "lucia": "^3.2.2", "minidenticons": "^4.2.1", @@ -97,6 +96,7 @@ "@microsoft/microsoft-graph-types": "^2.40.0", "@simplewebauthn/types": "^11.0.0", "@tailwindcss/forms": "^0.5.9", + "@types/node-forge": "^1.3.11", "@types/prismjs": "^1.26.4", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", diff --git a/apps/api/src/auth.ts b/apps/web/src/api/auth.ts similarity index 67% rename from apps/api/src/auth.ts rename to apps/web/src/api/auth.ts index 68c3ad03..a9db93bb 100644 --- a/apps/api/src/auth.ts +++ b/apps/web/src/api/auth.ts @@ -1,21 +1,13 @@ import { DrizzleMySQLAdapter } from "@lucia-auth/adapter-drizzle"; import { cache } from "@solidjs/router"; -import { - deleteCookie, - getCookie, - getSignedCookie, - setCookie, - setSignedCookie, -} from "hono/cookie"; import { Lucia } from "lucia"; - import { getRequestEvent } from "solid-js/web"; +import { deleteCookie, getCookie, setCookie } from "vinxi/server"; import { accounts, db, sessions } from "~/db"; -import { env, withEnv } from "~/env"; +import { withEnv } from "~/env"; export const lucia = withEnv(() => { const adapter = new DrizzleMySQLAdapter(db, sessions, accounts); - return new Lucia(adapter, { sessionCookie: { name: "session", @@ -52,17 +44,14 @@ export interface DatabaseUserAttributes { type DatabaseSessionAttributes = Record; export const checkAuth = cache(async () => { - const req = getRequestEvent()!; + const req = getRequestEvent(); if (!req) throw new Error("No request event"); - const sessionId = await getSignedCookie( - req.hono, - env.INTERNAL_SECRET, - lucia.sessionCookieName, - ); - if (!sessionId) { - if (getCookie(req.hono, "isLoggedIn") !== undefined) - deleteCookie(req.hono, "isLoggedIn", { + const sessionId = getCookie(lucia.sessionCookieName) ?? null; + + if (sessionId === null) { + if (getCookie("isLoggedIn") !== undefined) + deleteCookie(req.nativeEvent, "isLoggedIn", { ...lucia.createBlankSessionCookie().attributes, httpOnly: false, }); @@ -74,26 +63,18 @@ export const checkAuth = cache(async () => { if (session) { const cookie = lucia.createSessionCookie(session.id); - if (session.fresh) { - await setSignedCookie( - req.hono, - cookie.name, - cookie.value, - env.INTERNAL_SECRET, - cookie.attributes, - ); - } - - if (getCookie(req.hono, "isLoggedIn") === undefined) { - setCookie(req.hono, "isLoggedIn", "true", { + if (session.fresh) + setCookie(req.nativeEvent, cookie.name, cookie.value, cookie.attributes); + if (getCookie("isLoggedIn") === undefined) { + setCookie("isLoggedIn", "true", { ...cookie.attributes, httpOnly: false, }); } } else { const cookie = lucia.createBlankSessionCookie(); - deleteCookie(req.hono, cookie.name, cookie.attributes); - deleteCookie(req.hono, "isLoggedIn", { + setCookie(req.nativeEvent, cookie.name, cookie.value, cookie.attributes); + deleteCookie(req.nativeEvent, "isLoggedIn", { ...cookie.attributes, httpOnly: false, }); @@ -108,14 +89,8 @@ export async function createSession(accountId: string) { const session = await lucia.createSession(accountId, {}); const cookie = lucia.createSessionCookie(session.id); - await setSignedCookie( - req.hono, - cookie.name, - cookie.value, - env.INTERNAL_SECRET, - cookie.attributes, - ); - setCookie(req.hono, "isLoggedIn", "true", { + setCookie(req.nativeEvent, cookie.name, cookie.value, cookie.attributes); + setCookie(req.nativeEvent, "isLoggedIn", "true", { ...cookie.attributes, httpOnly: false, }); @@ -127,8 +102,8 @@ export async function logout(sessionId: string) { const req = getRequestEvent(); if (!req) throw new Error("No request event"); const cookie = lucia.createBlankSessionCookie(); - deleteCookie(req.hono, lucia.sessionCookieName, cookie.attributes); - deleteCookie(req.hono, "isLoggedIn", { + deleteCookie(req.nativeEvent, lucia.sessionCookieName, cookie.attributes); + deleteCookie(req.nativeEvent, "isLoggedIn", { ...cookie.attributes, httpOnly: false, }); diff --git a/apps/api/src/authority/index.ts b/apps/web/src/api/authority/index.ts similarity index 100% rename from apps/api/src/authority/index.ts rename to apps/web/src/api/authority/index.ts diff --git a/apps/api/src/authority/issue.ts b/apps/web/src/api/authority/issue.ts similarity index 100% rename from apps/api/src/authority/issue.ts rename to apps/web/src/api/authority/issue.ts diff --git a/apps/api/src/aws/emails.ts b/apps/web/src/api/aws/emails.ts similarity index 100% rename from apps/api/src/aws/emails.ts rename to apps/web/src/api/aws/emails.ts diff --git a/apps/api/src/aws/index.ts b/apps/web/src/api/aws/index.ts similarity index 100% rename from apps/api/src/aws/index.ts rename to apps/web/src/api/aws/index.ts diff --git a/apps/api/src/client.ts b/apps/web/src/api/client.ts similarity index 100% rename from apps/api/src/client.ts rename to apps/web/src/api/client.ts diff --git a/apps/api/src/trpc/helpers.ts b/apps/web/src/api/trpc/helpers.ts similarity index 94% rename from apps/api/src/trpc/helpers.ts rename to apps/web/src/api/trpc/helpers.ts index 30b06615..6be03e68 100644 --- a/apps/api/src/trpc/helpers.ts +++ b/apps/web/src/api/trpc/helpers.ts @@ -5,7 +5,6 @@ import { TRPCError, initTRPC } from "@trpc/server"; import { and, eq } from "drizzle-orm"; import { ZodError, z } from "zod"; -import { trace } from "@opentelemetry/api"; import { getRequestEvent } from "solid-js/web"; import { db, tenantMembers, tenants } from "~/db"; import { checkAuth } from "../auth"; @@ -67,7 +66,8 @@ export const authedProcedure = publicProcedure.use(async ({ next }) => { if (!data) throw new TRPCError({ code: "UNAUTHORIZED" }); - trace.getActiveSpan()?.setAttribute("account.pk", data.account.pk); + // TODO + // trace.getActiveSpan()?.setAttribute("account.pk", data.account.pk); return next({ ctx: { @@ -107,8 +107,9 @@ export const tenantProcedure = authedProcedure const tenant = await getTenant(input.tenantId, ctx.account.pk); if (!tenant) throw new TRPCError({ code: "FORBIDDEN", message: "tenant" }); + // TODO // Technically the user could make a request for multiple tenants in a batch but the UI doesn't allow this so gonna ignore it for now. - trace.getActiveSpan()?.setAttribute("tenant.pk", tenant.pk); + // trace.getActiveSpan()?.setAttribute("tenant.pk", tenant.pk); return opts.next({ ctx: { ...ctx, tenant } }); }); diff --git a/apps/api/src/trpc/index.ts b/apps/web/src/api/trpc/index.ts similarity index 100% rename from apps/api/src/trpc/index.ts rename to apps/web/src/api/trpc/index.ts diff --git a/apps/api/src/trpc/routers/auth.ts b/apps/web/src/api/trpc/routers/auth.ts similarity index 98% rename from apps/api/src/trpc/routers/auth.ts rename to apps/web/src/api/trpc/routers/auth.ts index 01ab2d2a..2026e9c7 100644 --- a/apps/api/src/trpc/routers/auth.ts +++ b/apps/web/src/api/trpc/routers/auth.ts @@ -11,8 +11,8 @@ import { checkAuth, createSession, logout, -} from "~/auth"; -import { sendEmail } from "~/aws/emails"; +} from "~/api/auth"; +import { sendEmail } from "~/api/aws/emails"; import { accountLoginCodes, accounts, db, tenants } from "~/db"; import { env } from "~/env"; import { authedProcedure, createTRPCRouter, publicProcedure } from "../helpers"; diff --git a/apps/api/src/trpc/routers/blueprint.ts b/apps/web/src/api/trpc/routers/blueprint.ts similarity index 100% rename from apps/api/src/trpc/routers/blueprint.ts rename to apps/web/src/api/trpc/routers/blueprint.ts diff --git a/apps/api/src/trpc/routers/device.ts b/apps/web/src/api/trpc/routers/device.ts similarity index 100% rename from apps/api/src/trpc/routers/device.ts rename to apps/web/src/api/trpc/routers/device.ts diff --git a/apps/api/src/trpc/routers/meta.ts b/apps/web/src/api/trpc/routers/meta.ts similarity index 100% rename from apps/api/src/trpc/routers/meta.ts rename to apps/web/src/api/trpc/routers/meta.ts diff --git a/apps/api/src/trpc/routers/tenant/index.ts b/apps/web/src/api/trpc/routers/tenant/index.ts similarity index 100% rename from apps/api/src/trpc/routers/tenant/index.ts rename to apps/web/src/api/trpc/routers/tenant/index.ts diff --git a/apps/api/src/trpc/routers/tenant/settings.ts b/apps/web/src/api/trpc/routers/tenant/settings.ts similarity index 99% rename from apps/api/src/trpc/routers/tenant/settings.ts rename to apps/web/src/api/trpc/routers/tenant/settings.ts index ac66cf25..aef73fcf 100644 --- a/apps/api/src/trpc/routers/tenant/settings.ts +++ b/apps/web/src/api/trpc/routers/tenant/settings.ts @@ -2,7 +2,7 @@ import { waitUntil } from "@mattrax/trpc-server-function/server"; import { TRPCError } from "@trpc/server"; import { and, eq } from "drizzle-orm"; import { z } from "zod"; -import { sendEmail } from "~/aws/emails"; +import { sendEmail } from "~/api/aws/emails"; import { accounts, tenantInvites, tenantMembers, tenants } from "~/db"; import { env } from "~/env"; import { diff --git a/apps/api/src/win/common.ts b/apps/web/src/api/win/common.ts similarity index 100% rename from apps/api/src/win/common.ts rename to apps/web/src/api/win/common.ts diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsx index 0392d21c..c1d6ff4e 100644 --- a/apps/web/src/app.tsx +++ b/apps/web/src/app.tsx @@ -58,11 +58,14 @@ function createQueryClient(errorBus: EventBus<[string, unknown]>) { }); } -const SolidQueryDevtools = lazy(() => - import("@tanstack/solid-query-devtools").then((m) => ({ - default: m.SolidQueryDevtools, - })), -); +// For some reason this is triggering a `document` access on the server +const SolidQueryDevtools = import.meta.env.DEV + ? lazy(() => + import("@tanstack/solid-query-devtools").then((m) => ({ + default: m.SolidQueryDevtools, + })), + ) + : undefined; export default function App() { const errorBus = createEventBus<[string, unknown]>(); @@ -154,7 +157,9 @@ export default function App() { return null; }} > - {import.meta.env.DEV && } + {import.meta.env.DEV && SolidQueryDevtools ? ( + + ) : null} {props.children} diff --git a/apps/web/src/app/(dash)/t/[tenantId]/blueprints/(blueprints).tsx b/apps/web/src/app/(dash)/t/[tenantId]/blueprints/(blueprints).tsx index 158a8219..993292bb 100644 --- a/apps/web/src/app/(dash)/t/[tenantId]/blueprints/(blueprints).tsx +++ b/apps/web/src/app/(dash)/t/[tenantId]/blueprints/(blueprints).tsx @@ -1,9 +1,9 @@ -import type { RouterOutput } from "@mattrax/api/client"; import { BreadcrumbItem, Button, buttonVariants } from "@mattrax/ui"; import { createTimeAgo } from "@solid-primitives/date"; import { A } from "@solidjs/router"; import { Suspense } from "solid-js"; import { stringSimilarity } from "string-similarity-js"; +import type { RouterOutput } from "~/api/client"; import { useTenantId } from "~/app/(dash)"; import { Page } from "~/components/Page"; import { Table, defineTable } from "~/components/Table"; diff --git a/apps/web/src/app/(dash)/t/[tenantId]/devices/(devices).tsx b/apps/web/src/app/(dash)/t/[tenantId]/devices/(devices).tsx index b6ab14f9..7bf64749 100644 --- a/apps/web/src/app/(dash)/t/[tenantId]/devices/(devices).tsx +++ b/apps/web/src/app/(dash)/t/[tenantId]/devices/(devices).tsx @@ -1,10 +1,10 @@ -import type { RouterOutput } from "@mattrax/api/client"; import { Badge, BreadcrumbItem, Button, buttonVariants } from "@mattrax/ui"; import { createTimeAgo } from "@solid-primitives/date"; import { A } from "@solidjs/router"; import { Suspense } from "solid-js"; import { stringSimilarity } from "string-similarity-js"; import { match } from "ts-pattern"; +import type { RouterOutput } from "~/api/client"; import { useTenantId } from "~/app/(dash)"; import { Page } from "~/components/Page"; import { Table, defineTable, toOptions } from "~/components/Table"; diff --git a/apps/web/src/app/EnrollmentServer/Authenticate.svc.ts b/apps/web/src/app/EnrollmentServer/Authenticate.svc.ts new file mode 100644 index 00000000..01030ecd --- /dev/null +++ b/apps/web/src/app/EnrollmentServer/Authenticate.svc.ts @@ -0,0 +1,21 @@ +import type { APIEvent } from "@solidjs/start/server"; + +export function GET({ request }: APIEvent) { + const url = new URL(request.url); + const appru = url.searchParams.get("appru"); + + // TODO: Style this error page + if (!appru) return new Response("Missing appru", { status: 400 }); + + return new Response( + `
+

+ +
`, + { + headers: { + "Content-Type": "text/html", + }, + }, + ); +} diff --git a/apps/web/src/app/EnrollmentServer/Discovery.svc.ts b/apps/web/src/app/EnrollmentServer/Discovery.svc.ts new file mode 100644 index 00000000..e4bc1064 --- /dev/null +++ b/apps/web/src/app/EnrollmentServer/Discovery.svc.ts @@ -0,0 +1,37 @@ +import { discoverResponse, discoveryRequest } from "@mattrax/ms-mde/discovery"; +import { deserializeXml, soapResponse } from "@mattrax/ms-mde/util"; +import type { APIEvent } from "@solidjs/start/server"; +import { env } from "~/env"; + +export const GET = () => new Response(""); + +export async function POST({ request }: APIEvent) { + const traceId = "..."; // TODO: Figure this out??? + + const req = deserializeXml(discoveryRequest, await request.text()); + if (!req.success) { + // TODO: Handle XML errors with SOAP faults + console.log(req); + throw new Error("Error!"); + } + + const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; + + return soapResponse( + discoverResponse( + { + authPolicy: "Federated", + // TODO: Should this reflect this clients version/us error if we don't recognize it? + enrollmentVersion: "5.0", + enrollmentPolicyServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Policy.svc`, + enrollmentServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Enrollment.svc`, + authenticationServiceUrl: `${env.VITE_PROD_ORIGIN}/EnrollmentServer/Authenticate.svc`, + }, + { + relatesTo: messageId, + correlationId: traceId, + activityId: traceId, + }, + ), + ); +} diff --git a/apps/web/src/app/EnrollmentServer/Enrollment.svc.ts b/apps/web/src/app/EnrollmentServer/Enrollment.svc.ts new file mode 100644 index 00000000..24dbeeb0 --- /dev/null +++ b/apps/web/src/app/EnrollmentServer/Enrollment.svc.ts @@ -0,0 +1,205 @@ +import { + enrollmentRequest, + enrollmentResponse, +} from "@mattrax/ms-mde/enrollment"; +import { deserializeXml, soapResponse } from "@mattrax/ms-mde/util"; +import { datatype, wapProvisioningProfile } from "@mattrax/ms-mde/wap"; +import type { APIEvent } from "@solidjs/start/server"; +import { getActiveAuthority } from "~/api/authority"; +import { microsoftDeviceIDExtension } from "~/api/win/common"; +import { env } from "~/env"; + +export async function POST({ request }: APIEvent) { + const traceId = "..."; // TODO: Figure this out??? + + const req = deserializeXml(enrollmentRequest, await request.text()); + if (!req.success) { + // TODO: Handle XML errors with SOAP faults + for (const error of req.issues) { + console.error("ISSUE", error.message, error.path, error); + } + console.log(JSON.stringify(req.output, null, 2)); + throw new Error("Error!"); + } + + const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; + const authBstRaw = + req.output["s:Envelope"]["s:Header"]?.["wsse:Security"]?.[ + "wsse:BinarySecurityToken" + ]?.["#text"]; + if (!authBstRaw) throw new Error("TODO: Handle unauthorised"); + const authBst = atob(authBstRaw); + + // const deviceId = req.output['s:Envelope']['s:Body']; + const enrollmentType = "Full"; // TODO: req.output["s:Envelope"]["s:Body"]["wst:RequestSecurityToken"]["ac:AdditionalContext"]["ac:ContextItem"].find((item) => item["ac:Name"] === "EnrollmentType")["ac:Value"]; + const csrRaw = atob( + req.output["s:Envelope"]["s:Body"]["wst:RequestSecurityToken"][ + "wsse:BinarySecurityToken" + ]["#text"], + ); + + // @ts-expect-error + const certStore = enrollmentType === "Device" ? "Device" : "User"; + + if (authBst !== "TODOSpecialTokenWhichVerifiesAuth") { + console.warn("Invalid authentication token!"); + } + + const [ + identityCertFingerprint, + rootCertificateDer, + signedClientCertFingerprint, + clientCRTRaw, + ] = await todo(csrRaw); + + console.log( + `Subject=${encodeURIComponent("CN=TODO")}&Stores=My%5C${certStore}`, + ); + + if (!identityCertFingerprint) throw new Error("TODO: Prevent this"); + if (!signedClientCertFingerprint) throw new Error("TODO: Prevent this"); + if (!rootCertificateDer) throw new Error("TODO: Prevent this"); + if (!clientCRTRaw) throw new Error("TODO: Prevent this"); + + return soapResponse( + enrollmentResponse( + { + wapProvisioningProfile: wapProvisioningProfile({ + CertificateStore: { + Root: { + System: { + [identityCertFingerprint]: { + EncodedCertificate: rootCertificateDer, + }, + }, + }, + My: { + [certStore]: { + [signedClientCertFingerprint]: { + EncodedCertificate: clientCRTRaw, + }, + PrivateKeyContainer: {}, + }, + }, + }, + APPLICATION: { + APPID: "w7", + "PROVIDER-ID": "DEMO MDM", + NAME: "Windows MDM Demo Server", + ADDR: `${env.MANAGE_URL}/ManagementServer/Manage.svc`, + ROLE: "4294967295", + BACKCOMPATRETRYDISABLED: null, // TODO: handle this + DEFAULTENCODING: "application/vnd.syncml.dm+xml", + SSLCLIENTCERTSEARCHCRITERIA: `Subject=${encodeURIComponent( + "CN=TODO", + )}&Stores=My%5C${certStore}`, + APPAUTH: [ + { + AAUTHLEVEL: "CLIENT", + AAUTHTYPE: "DIGEST", + AAUTHSECRET: "dummy", + AAUTHDATA: "nonce", + }, + { + AAUTHLEVEL: "APPSRV", + AAUTHTYPE: "DIGEST", + AAUTHNAME: "dummy", + AAUTHSECRET: "dummy", + AAUTHDATA: "nonce", + }, + ], + }, + DMClient: { + Provider: { + "DEMO MDM": { + Poll: { + NumberOfFirstRetries: datatype(8), + }, + }, + }, + }, + }), + }, + { + relatesTo: messageId, + correlationId: traceId, + activityId: traceId, + }, + ), + ); +} + +async function todo(binarySecurityToken: string) { + const { asn1, md, pki } = (await import("node-forge")).default; + + const [authority, authorityKey] = await getActiveAuthority(); + + const csr = pki.certificationRequestFromAsn1( + asn1.fromDer(binarySecurityToken), + ); + + console.log("CSR", csr.subject); + + const cert = pki.createCertificate(); + cert.version = csr.version; + cert.signature = csr.signature; + if (csr.publicKey) cert.publicKey = csr.publicKey; + else console.error("No public key in CSR"); + // TODO: hook this up with SSLSearch thingo + // cert.setSubject(csr.subject.attributes); + cert.setSubject([ + { + name: "commonName", + value: "TODO", // TODO: commonName, + }, + ]); + + cert.setExtensions([ + { + name: "basicConstraints", + critical: true, + cA: false, + }, + { + name: "keyUsage", + critical: true, + digitalSignature: true, + keyEncipherment: true, + }, + { + name: "extKeyUsage", + critical: true, + clientAuth: true, + }, + { + id: microsoftDeviceIDExtension, + value: "todo", // TODO: deviceId + }, + ]); + + // TODO: Hook this up + cert.serialNumber = `${Number.parseInt( + `${Math.floor(Math.random() * 1000000000000000000)}`, + 10, + )}`; + cert.setIssuer(authority.subject.attributes); + cert.validity.notBefore = new Date(); + cert.validity.notAfter = new Date(); + cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1); + cert.sign(authorityKey, md.sha256.create()); + + const clientCert = asn1.toDer(pki.certificateToAsn1(cert)).getBytes(); + const ca = asn1.toDer(pki.certificateToAsn1(authority)).getBytes(); + + return [ + await certificateSha1Fingerprint(ca), + Buffer.from(ca, "binary").toString("base64"), + await certificateSha1Fingerprint(clientCert), + Buffer.from(clientCert, "binary").toString("base64"), + ]; +} + +const certificateSha1Fingerprint = async (msg: string) => { + const { md } = (await import("node-forge")).default; + return md.sha1.create().update(msg).digest().toHex().toUpperCase(); +}; diff --git a/apps/web/src/app/EnrollmentServer/Policy.svc.ts b/apps/web/src/app/EnrollmentServer/Policy.svc.ts new file mode 100644 index 00000000..9ad09faf --- /dev/null +++ b/apps/web/src/app/EnrollmentServer/Policy.svc.ts @@ -0,0 +1,44 @@ +import { policyRequest, policyResponse } from "@mattrax/ms-mde/policy"; +import { deserializeXml, soapResponse } from "@mattrax/ms-mde/util"; +import type { APIEvent } from "@solidjs/start/server"; + +export async function POST({ request }: APIEvent) { + const traceId = "..."; // TODO: Figure this out??? + + const req = deserializeXml(policyRequest, await request.text()); + if (!req.success) { + // TODO: Handle XML errors with SOAP faults + for (const error of req.issues) { + console.error("ISSUE", error.message, error.path, error); + } + console.log(JSON.stringify(req.output, null, 2)); + throw new Error("Error!"); + } + const messageId = req.output["s:Envelope"]["s:Header"]["a:MessageID"]; + + // TODO: Authentication + + // TODO: Client renewing it's own certificate + + // if cmd.Header.Action != policyActionRequest { + // fault.Fault(fmt.Errorf("the request's action is not supported by the endpoint"), "the request was not destined for this endpoint", soap.FaultCodeActionMismatch) + // return + // } else if strings.Split(r.URL.String(), "?")[0] != strings.Split(cmd.Header.To, "?")[0] { + // fault.Fault(fmt.Errorf("the request was destined for another server"), "the request was not destined for this server", soap.FaultCodeEndpointUnavailable) + // return + // } + + return soapResponse( + policyResponse( + { + policyId: "mattrax-identity", + policyFriendlyName: "Mattrax Device Authority Policy", + }, + { + relatesTo: messageId, + correlationId: traceId, + activityId: traceId, + }, + ), + ); +} diff --git a/apps/web/src/app/EnrollmentServer/ToS.ts b/apps/web/src/app/EnrollmentServer/ToS.ts new file mode 100644 index 00000000..0736a886 --- /dev/null +++ b/apps/web/src/app/EnrollmentServer/ToS.ts @@ -0,0 +1,30 @@ +import type { APIEvent } from "@solidjs/start/server"; + +export function GET({ request }: APIEvent) { + const url = new URL(request.url); + const appru = url.searchParams.get("appru"); + + // TODO: Style this error page + if (!appru) return new Response("Missing appru", { status: 400 }); + + return new Response( + `

AzureAD Term Of Service

+ +`, + { + headers: { + "Content-Type": "text/html", + }, + }, + ); +} diff --git a/apps/web/src/app/ManagementServer/Manage.svc.ts b/apps/web/src/app/ManagementServer/Manage.svc.ts new file mode 100644 index 00000000..928609e1 --- /dev/null +++ b/apps/web/src/app/ManagementServer/Manage.svc.ts @@ -0,0 +1,41 @@ +import type { APIEvent } from "@solidjs/start/server"; +import { getAuthorityTruststore } from "~/api/authority"; + +export async function POST({ request }: APIEvent) { + const body = await request.text(); + + // TODO: Authenticate this came from the mTLS proxy + + const clientCertRaw = request.headers.get("x-client-cert"); + if (!clientCertRaw) { + // TODO: Proper error handling??? + return new Response("No client cert", { status: 400 }); + } + + // console.log("GOT", atob(clientCertRaw)); // TODO + + const { asn1, pki } = (await import("node-forge")).default; + + // TODO: Why do we need to double base64 decode? + const clientCert = pki.certificateFromAsn1(asn1.fromDer(atob(clientCertRaw))); + const expectedCerts = await getAuthorityTruststore(); + + const isTrusted = expectedCerts.some((cert) => { + try { + return cert.verify(clientCert); + } catch (e) { + console.error(e); + return false; + } + }); + + if (!isTrusted) + return new Response("Client cert not trusted", { status: 400 }); + + console.log("MANAGEMENT", clientCertRaw, body); + + // TODO: Authenticate client + // TODO: Do management session + + return new Response(""); +} diff --git a/apps/web/src/app/api/[...404].ts b/apps/web/src/app/api/[...404].ts new file mode 100644 index 00000000..f3eb5338 --- /dev/null +++ b/apps/web/src/app/api/[...404].ts @@ -0,0 +1,25 @@ +import type { APIEvent } from "@solidjs/start/server"; + +function handler({ request }: APIEvent) { + if (request.headers.get("Accept")?.includes("application/json")) { + return new Response(JSON.stringify({ error: "Not Found" }), { + status: 404, + headers: { + "Content-Type": "application/json", + }, + }); + } + + return new Response("404: Not Found", { + status: 404, + headers: { + "Content-Type": "text/plain", + }, + }); +} + +export const GET = handler; +export const POST = handler; +export const PUT = handler; +export const DELETE = handler; +export const PATCH = handler; diff --git a/apps/web/src/app/api/cron.ts b/apps/web/src/app/api/cron.ts new file mode 100644 index 00000000..be115753 --- /dev/null +++ b/apps/web/src/app/api/cron.ts @@ -0,0 +1,20 @@ +import type { APIEvent } from "@solidjs/start/server"; +import { getActiveAuthority } from "~/api/authority"; +import { env } from "~/env"; + +export async function GET({ request }: APIEvent) { + const url = new URL(request.url); + + if (url.searchParams.get("secret") !== env.INTERNAL_SECRET) + return new Response(JSON.stringify("Forbidden"), { + status: 403, + headers: { "Content-Type": "application/json" }, + }); + + // Check if the authority certificate needs renewal + await getActiveAuthority(true); + + // TODO: Clear inactive sessions + + return new Response("ok"); +} diff --git a/apps/web/src/app/api/trpc.ts b/apps/web/src/app/api/trpc.ts new file mode 100644 index 00000000..3bb41ba8 --- /dev/null +++ b/apps/web/src/app/api/trpc.ts @@ -0,0 +1,28 @@ +import { + type TrpcServerFunctionOpts, + trpcServerFunction, +} from "@mattrax/trpc-server-function"; +import { toReadableStream } from "@mattrax/trpc-server-function/seroval"; +import type { APIEvent } from "@solidjs/start/server"; +import { createTRPCContext, router } from "~/api/trpc"; + +async function handler({ request }: APIEvent) { + const opts: TrpcServerFunctionOpts = await request.json(); + const result = await trpcServerFunction({ + router, + ctx: createTRPCContext(), + opts, + }); + + return new Response(toReadableStream(result), { + headers: { + "Content-Type": "text/javascript", + }, + }); +} + +export const GET = handler; +export const POST = handler; +export const PUT = handler; +export const DELETE = handler; +export const PATCH = handler; diff --git a/apps/web/src/app/api/version.ts b/apps/web/src/app/api/version.ts new file mode 100644 index 00000000..e6ac0e3c --- /dev/null +++ b/apps/web/src/app/api/version.ts @@ -0,0 +1 @@ +export const GET = () => new Response(import.meta.env.GIT_SHA); diff --git a/apps/api/src/waitlist.ts b/apps/web/src/app/api/waitlist.ts similarity index 76% rename from apps/api/src/waitlist.ts rename to apps/web/src/app/api/waitlist.ts index 6888fbbe..a0953177 100644 --- a/apps/api/src/waitlist.ts +++ b/apps/web/src/app/api/waitlist.ts @@ -1,6 +1,7 @@ +import type { APIEvent } from "@solidjs/start/server"; import { sql } from "drizzle-orm"; -import { Hono } from "hono"; import { z } from "zod"; +import { sendDiscordMessage } from "~/api/trpc/routers/meta"; import { db, waitlist, @@ -8,7 +9,6 @@ import { waitlistInterestReasons, } from "~/db"; import { env } from "~/env"; -import { sendDiscordMessage } from "./trpc/routers/meta"; const waitlistRequest = z.object({ email: z.string().email(), @@ -17,12 +17,9 @@ const waitlistRequest = z.object({ deployment: z.enum(waitlistDeploymentMethod), }); -export const waitlistRouter = new Hono().post("/", async (c) => { - const result = waitlistRequest.safeParse(await c.req.json()); - if (!result.success) { - c.status(400); - return c.text("Invalid request!"); - } +export async function POST({ request }: APIEvent) { + const result = waitlistRequest.safeParse(await request.json()); + if (!result.success) return new Response("Invalid request", { status: 400 }); // We do Discord first, incase the DB is down. try { @@ -57,5 +54,5 @@ export const waitlistRouter = new Hono().post("/", async (c) => { console.error("Failed to insert into waitlist", err); } - return c.text("ok"); -}); + return new Response("ok"); +} diff --git a/apps/api/src/db/index.ts b/apps/web/src/db/index.ts similarity index 91% rename from apps/api/src/db/index.ts rename to apps/web/src/db/index.ts index e3f02e46..e99843a5 100644 --- a/apps/api/src/db/index.ts +++ b/apps/web/src/db/index.ts @@ -1,13 +1,13 @@ import { Client, type Config } from "@planetscale/database"; import { drizzle } from "drizzle-orm/planetscale-serverless"; -import { withEnv } from "~/env"; +import { env, withEnv } from "~/env"; export * from "./schema"; import * as schema from "./schema"; let fetchHandler: Config["fetch"] = undefined; -export const db = withEnv((env) => { +export const db = withEnv(() => { const client = new Client({ url: env.DATABASE_URL, fetch: async (input, init) => { diff --git a/apps/api/src/db/schema.ts b/apps/web/src/db/schema.ts similarity index 100% rename from apps/api/src/db/schema.ts rename to apps/web/src/db/schema.ts diff --git a/apps/api/src/env.ts b/apps/web/src/env.ts similarity index 76% rename from apps/api/src/env.ts rename to apps/web/src/env.ts index 897f22f1..50a3a48d 100644 --- a/apps/api/src/env.ts +++ b/apps/web/src/env.ts @@ -1,5 +1,4 @@ import { createEnv } from "@t3-oss/env-core"; -import { getRequestEvent } from "solid-js/web"; import { z } from "zod"; function optionalInDev( @@ -26,18 +25,6 @@ export const env = withEnv((env) => { AWS_ACCESS_KEY_ID: optionalInDev(z.string()), AWS_SECRET_ACCESS_KEY: optionalInDev(z.string()), - // Used for Entra identity provider - ENTRA_CLIENT_ID: z.string(), - ENTRA_CLIENT_SECRET: z.string(), - - // Stipe billing - // STRIPE_PUBLISHABLE_KEY: optionalInDev(z.string()), - // STRIPE_SECRET_KEY: optionalInDev(z.string()), - - // Tracing - AXIOM_DATASET: z.string().optional(), - AXIOM_API_TOKEN: z.string().optional(), - // Discord webhooks WAITLIST_DISCORD_WEBHOOK_URL: z.string().optional(), FEEDBACK_DISCORD_WEBHOOK_URL: z.string().optional(), @@ -66,12 +53,13 @@ export function withEnv( return new Proxy({} as any, { get(_, prop) { - const event = getRequestEvent(); - if (!event) - throw new Error( - "Attempted to access `withEnv` value outside of a request context", - ); - const env = event.env; + // TODO: `process.env` works in Vercel but not Cloudflare Workers + // const event = getRequestEvent(); + // if (!event) + // throw new Error( + // "Attempted to access `withEnv` value outside of a request context", + // ); + const env = process.env; // event.env; let result = cache.get(env); if (!result) { diff --git a/apps/web/src/lib/data.tsx b/apps/web/src/lib/data.tsx index 1a032f97..8dbb422e 100644 --- a/apps/web/src/lib/data.tsx +++ b/apps/web/src/lib/data.tsx @@ -1,5 +1,5 @@ -import type { RouterOutput } from "@mattrax/api/client"; import { z } from "zod"; +import type { RouterOutput } from "~/api/client"; import { useTenantId } from "~/app/(dash)"; import { trpc } from "./trpc"; import { useZodParams } from "./useZodParams"; diff --git a/apps/web/src/lib/index.tsx b/apps/web/src/lib/index.tsx index f0b32b79..9f944b23 100644 --- a/apps/web/src/lib/index.tsx +++ b/apps/web/src/lib/index.tsx @@ -1,5 +1,5 @@ -import type { AppRouter } from "@mattrax/api/client"; import { TRPCClientError } from "@trpc/client"; +import type { AppRouter } from "~/api/client"; export * from "./trpc"; diff --git a/apps/web/src/lib/trpc.ts b/apps/web/src/lib/trpc.ts index 9847d95d..550a5674 100644 --- a/apps/web/src/lib/trpc.ts +++ b/apps/web/src/lib/trpc.ts @@ -1,10 +1,10 @@ -import { type AppRouter, serverFunction } from "@mattrax/api/client"; import { createServerFunctionLink, seroval, } from "@mattrax/trpc-server-function"; import { createTRPCSolidStart } from "@solid-mediakit/trpc"; import { useQueryClient } from "@tanstack/solid-query"; +import { type AppRouter, serverFunction } from "~/api/client"; // function serverFunction(opts: TrpcServerFunctionOpts) { // "use server"; diff --git a/apps/web/sst-env.d.ts b/apps/web/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/apps/web/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index ff6758e9..e4aa7af9 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -25,7 +25,6 @@ { "path": "../../packages/email" }, { "path": "../../packages/trpc-server-function" }, { "path": "../../packages/policy" }, - { "path": "../../packages/policy-composer" }, - { "path": "../api" } + { "path": "../../packages/policy-composer" } ] } diff --git a/biome.json b/biome.json index a8dadd40..cd7e1842 100644 --- a/biome.json +++ b/biome.json @@ -13,12 +13,8 @@ "auto-imports.d.ts", "node_modules", "dist", - "apps/android", - ".sst", "configuration-schemas/**/*.json", - "sst-env.d.ts", "tsconfig.app.json", - "indexed-db-observers-polyfill.js", "packages/ui/src/sonner.css" ] }, diff --git a/crates/mx-db/Cargo.toml b/crates/mx-db/Cargo.toml deleted file mode 100644 index 3f16eb53..00000000 --- a/crates/mx-db/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "mx-db" -version = "0.0.1" -edition = "2021" -publish = false - -[dependencies] -mysql_async = { workspace = true } -serde_json = { workspace = true } - -mysql_common = { version = "0.32", features = [ - "chrono", -] } # This is a dependency of `mysql_async` -chrono = { version = "0.4.38", features = ["serde"] } -refinery = { version = "0.8.14", features = ["mysql_async"] } diff --git a/crates/mx-db/migrations/0000_dry_stephen_strange.sql b/crates/mx-db/migrations/0000_dry_stephen_strange.sql deleted file mode 100644 index 58d06742..00000000 --- a/crates/mx-db/migrations/0000_dry_stephen_strange.sql +++ /dev/null @@ -1,287 +0,0 @@ -CREATE TABLE `account_login_codes` ( - `code` varchar(8) NOT NULL, - `account` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `account_login_codes_code` PRIMARY KEY(`code`) -); ---> statement-breakpoint -CREATE TABLE `accounts` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(16) NOT NULL, - `email` varchar(256) NOT NULL, - `name` varchar(256) NOT NULL, - `features` json, - CONSTRAINT `accounts_pk` PRIMARY KEY(`pk`), - CONSTRAINT `accounts_id_unique` UNIQUE(`id`), - CONSTRAINT `accounts_email_unique` UNIQUE(`email`) -); ---> statement-breakpoint -CREATE TABLE `application_assignments` ( - `appPk` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device','group') NOT NULL, - CONSTRAINT `application_assignments_appPk_pk_variant_pk` PRIMARY KEY(`appPk`,`pk`,`variant`) -); ---> statement-breakpoint -CREATE TABLE `apps` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `description` varchar(256), - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `apps_pk` PRIMARY KEY(`pk`), - CONSTRAINT `apps_id_unique` UNIQUE(`id`) -); ---> statement-breakpoint -CREATE TABLE `audit_log` ( - `id` serial AUTO_INCREMENT NOT NULL, - `tenant` bigint unsigned NOT NULL, - `action` enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup') NOT NULL, - `data` json NOT NULL, - `account` bigint unsigned, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `audit_log_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `certificates` ( - `key` varchar(256) NOT NULL, - `certificate` varbinary(9068) NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `certificates_key` PRIMARY KEY(`key`) -); ---> statement-breakpoint -CREATE TABLE `cli_auth_codes` ( - `code` varchar(24) NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `session` varchar(255), - CONSTRAINT `cli_auth_codes_code` PRIMARY KEY(`code`) -); ---> statement-breakpoint -CREATE TABLE `device_actions` ( - `action` enum('restart','shutdown','lost','wipe','retire') NOT NULL, - `device` bigint unsigned NOT NULL, - `created_by` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `deployed_at` timestamp, - CONSTRAINT `device_actions_action_device_pk` PRIMARY KEY(`action`,`device`) -); ---> statement-breakpoint -CREATE TABLE `devices` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `description` varchar(256), - `enrollment_type` enum('user','device') NOT NULL, - `os` enum('Windows','iOS','macOS','tvOS','Android','ChromeOS') NOT NULL, - `serial_number` varchar(256) NOT NULL, - `manufacturer` varchar(256), - `model` varchar(256), - `os_version` varchar(256), - `imei` varchar(256), - `free_storage` bigint, - `total_storage` bigint, - `owner` bigint unsigned, - `azure_ad_did` varchar(256), - `enrolled_at` timestamp NOT NULL DEFAULT (now()), - `last_synced` timestamp NOT NULL DEFAULT (now()), - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `devices_pk` PRIMARY KEY(`pk`), - CONSTRAINT `devices_id_unique` UNIQUE(`id`), - CONSTRAINT `devices_serial_number_unique` UNIQUE(`serial_number`), - CONSTRAINT `devices_azure_ad_did_unique` UNIQUE(`azure_ad_did`) -); ---> statement-breakpoint -CREATE TABLE `domains` ( - `domain` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `enterprise_enrollment_available` boolean NOT NULL DEFAULT false, - `identity_provider` bigint unsigned NOT NULL, - CONSTRAINT `domains_domain` PRIMARY KEY(`domain`) -); ---> statement-breakpoint -CREATE TABLE `group_assignables` ( - `group` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device') NOT NULL, - CONSTRAINT `group_assignables_group_pk_variant_pk` PRIMARY KEY(`group`,`pk`,`variant`) -); ---> statement-breakpoint -CREATE TABLE `groups` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `groups_pk` PRIMARY KEY(`pk`), - CONSTRAINT `groups_id_unique` UNIQUE(`id`) -); ---> statement-breakpoint -CREATE TABLE `identity_providers` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256), - `provider` enum('entraId') NOT NULL, - `tenant` bigint unsigned NOT NULL, - `linker_upn` varchar(256), - `linker_refresh_token` varchar(1024), - `remote_id` varchar(256) NOT NULL, - `last_synced` timestamp, - CONSTRAINT `identity_providers_pk` PRIMARY KEY(`pk`), - CONSTRAINT `identity_providers_id_unique` UNIQUE(`id`), - CONSTRAINT `identity_providers_tenant_unique` UNIQUE(`tenant`), - CONSTRAINT `identity_providers_provider_remote_id_unique` UNIQUE(`provider`,`remote_id`) -); ---> statement-breakpoint -CREATE TABLE `organisation_invites` ( - `code` varchar(256) NOT NULL, - `org` bigint unsigned NOT NULL, - `email` varchar(256) NOT NULL, - `created_at` timestamp DEFAULT (now()), - CONSTRAINT `organisation_invites_code` PRIMARY KEY(`code`), - CONSTRAINT `organisation_invites_org_email_unique` UNIQUE(`org`,`email`) -); ---> statement-breakpoint -CREATE TABLE `organisation_members` ( - `org` bigint unsigned NOT NULL, - `account` bigint unsigned NOT NULL, - CONSTRAINT `organisation_members_org_account_pk` PRIMARY KEY(`org`,`account`) -); ---> statement-breakpoint -CREATE TABLE `organisations` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(100) NOT NULL, - `slug` varchar(256) NOT NULL, - `billing_email` varchar(256), - `stripe_customer_id` varchar(256), - `owner` bigint unsigned NOT NULL, - CONSTRAINT `organisations_pk` PRIMARY KEY(`pk`), - CONSTRAINT `organisations_id_unique` UNIQUE(`id`), - CONSTRAINT `organisations_slug_unique` UNIQUE(`slug`) -); ---> statement-breakpoint -CREATE TABLE `policies` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `priority` smallint NOT NULL DEFAULT 128, - `name` varchar(256) NOT NULL, - `data` json NOT NULL DEFAULT ('{}'), - `tenant` bigint unsigned NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()), - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policies_pk` PRIMARY KEY(`pk`), - CONSTRAINT `policies_id_unique` UNIQUE(`id`) -); ---> statement-breakpoint -CREATE TABLE `policy_assignables` ( - `policy` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device','group') NOT NULL, - CONSTRAINT `policy_assignables_policy_pk_variant_pk` PRIMARY KEY(`policy`,`pk`,`variant`) -); ---> statement-breakpoint -CREATE TABLE `policy_deploy` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `policy` bigint unsigned NOT NULL, - `data` json NOT NULL DEFAULT ('{}'), - `comment` varchar(256) NOT NULL, - `author` bigint unsigned NOT NULL, - `done_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policy_deploy_pk` PRIMARY KEY(`pk`), - CONSTRAINT `policy_deploy_id_unique` UNIQUE(`id`) -); ---> statement-breakpoint -CREATE TABLE `policy_deploy_status` ( - `deploy` bigint unsigned NOT NULL, - `device` bigint unsigned NOT NULL, - `variant` enum('success','failed') NOT NULL, - `result` json NOT NULL, - `done_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policy_deploy_status_deploy_device_pk` PRIMARY KEY(`deploy`,`device`) -); ---> statement-breakpoint -CREATE TABLE `session` ( - `id` varchar(255) NOT NULL, - `account` varchar(255) NOT NULL, - `user_agent` varchar(256) NOT NULL, - `location` varchar(256) NOT NULL, - `expires_at` timestamp NOT NULL, - CONSTRAINT `session_id` PRIMARY KEY(`id`) -); ---> statement-breakpoint -CREATE TABLE `tenant` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(100) NOT NULL, - `slug` varchar(256) NOT NULL, - `org` bigint unsigned, - CONSTRAINT `tenant_pk` PRIMARY KEY(`pk`), - CONSTRAINT `tenant_id_unique` UNIQUE(`id`), - CONSTRAINT `tenant_slug_unique` UNIQUE(`slug`) -); ---> statement-breakpoint -CREATE TABLE `users` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `email` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - `provider` bigint unsigned NOT NULL, - `resource_id` varchar(256), - CONSTRAINT `users_pk` PRIMARY KEY(`pk`), - CONSTRAINT `users_id_unique` UNIQUE(`id`), - CONSTRAINT `users_email_tenant_unique` UNIQUE(`email`,`tenant`), - CONSTRAINT `users_resource_id_provider_unique` UNIQUE(`resource_id`,`provider`) -); ---> statement-breakpoint -CREATE TABLE `waitlist` ( - `id` serial AUTO_INCREMENT NOT NULL, - `email` varchar(256) NOT NULL, - `name` varchar(256), - `interest` enum('personal','internal-it-team','msp-provider','other') NOT NULL, - `deployment` enum('managed-cloud','private-cloud','onprem','other') NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `waitlist_id` PRIMARY KEY(`id`), - CONSTRAINT `waitlist_email_unique` UNIQUE(`email`) -); ---> statement-breakpoint -CREATE TABLE `windows_ephemeral_state` ( - `session_id` varchar(256) NOT NULL, - `msg_id` varchar(256) NOT NULL, - `cmd_id` varchar(256) NOT NULL, - `deploy` bigint unsigned NOT NULL, - `key` varchar(256) NOT NULL, - CONSTRAINT `windows_ephemeral_state_session_id_msg_id_cmd_id_pk` PRIMARY KEY(`session_id`,`msg_id`,`cmd_id`) -); ---> statement-breakpoint -ALTER TABLE `account_login_codes` ADD CONSTRAINT `account_login_codes_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `application_assignments` ADD CONSTRAINT `application_assignments_appPk_apps_pk_fk` FOREIGN KEY (`appPk`) REFERENCES `apps`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `apps` ADD CONSTRAINT `apps_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `audit_log` ADD CONSTRAINT `audit_log_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `audit_log` ADD CONSTRAINT `audit_log_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `cli_auth_codes` ADD CONSTRAINT `cli_auth_codes_session_session_id_fk` FOREIGN KEY (`session`) REFERENCES `session`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `device_actions` ADD CONSTRAINT `device_actions_device_devices_pk_fk` FOREIGN KEY (`device`) REFERENCES `devices`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `device_actions` ADD CONSTRAINT `device_actions_created_by_accounts_pk_fk` FOREIGN KEY (`created_by`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `devices` ADD CONSTRAINT `devices_owner_users_pk_fk` FOREIGN KEY (`owner`) REFERENCES `users`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `devices` ADD CONSTRAINT `devices_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `domains` ADD CONSTRAINT `domains_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `domains` ADD CONSTRAINT `domains_identity_provider_identity_providers_pk_fk` FOREIGN KEY (`identity_provider`) REFERENCES `identity_providers`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `group_assignables` ADD CONSTRAINT `group_assignables_group_groups_pk_fk` FOREIGN KEY (`group`) REFERENCES `groups`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `groups` ADD CONSTRAINT `groups_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `identity_providers` ADD CONSTRAINT `identity_providers_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `organisation_invites` ADD CONSTRAINT `organisation_invites_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `organisation_members` ADD CONSTRAINT `organisation_members_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `organisation_members` ADD CONSTRAINT `organisation_members_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `organisations` ADD CONSTRAINT `organisations_owner_accounts_pk_fk` FOREIGN KEY (`owner`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policies` ADD CONSTRAINT `policies_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policy_assignables` ADD CONSTRAINT `policy_assignables_policy_policies_pk_fk` FOREIGN KEY (`policy`) REFERENCES `policies`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policy_deploy` ADD CONSTRAINT `policy_deploy_policy_policies_pk_fk` FOREIGN KEY (`policy`) REFERENCES `policies`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policy_deploy` ADD CONSTRAINT `policy_deploy_author_accounts_pk_fk` FOREIGN KEY (`author`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policy_deploy_status` ADD CONSTRAINT `policy_deploy_status_deploy_policy_deploy_pk_fk` FOREIGN KEY (`deploy`) REFERENCES `policy_deploy`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `policy_deploy_status` ADD CONSTRAINT `policy_deploy_status_device_devices_pk_fk` FOREIGN KEY (`device`) REFERENCES `devices`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `session` ADD CONSTRAINT `session_account_accounts_id_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `tenant` ADD CONSTRAINT `tenant_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `users` ADD CONSTRAINT `users_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `users` ADD CONSTRAINT `users_provider_identity_providers_pk_fk` FOREIGN KEY (`provider`) REFERENCES `identity_providers`(`pk`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE `windows_ephemeral_state` ADD CONSTRAINT `windows_ephemeral_state_deploy_policy_deploy_pk_fk` FOREIGN KEY (`deploy`) REFERENCES `policy_deploy`(`pk`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/crates/mx-db/migrations/0001_chemical_mojo.sql b/crates/mx-db/migrations/0001_chemical_mojo.sql deleted file mode 100644 index c6036027..00000000 --- a/crates/mx-db/migrations/0001_chemical_mojo.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `kv` ( - `key` varchar(256) NOT NULL, - `value` varbinary(9068) NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP, - CONSTRAINT `kv_key` PRIMARY KEY(`key`) -); diff --git a/crates/mx-db/migrations/0002_outgoing_dagger.sql b/crates/mx-db/migrations/0002_outgoing_dagger.sql deleted file mode 100644 index b08fd76e..00000000 --- a/crates/mx-db/migrations/0002_outgoing_dagger.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `certificates`; \ No newline at end of file diff --git a/crates/mx-db/migrations/0003_spotty_changeling.sql b/crates/mx-db/migrations/0003_spotty_changeling.sql deleted file mode 100644 index 4b5b89fa..00000000 --- a/crates/mx-db/migrations/0003_spotty_changeling.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `policy_deploy_status` MODIFY COLUMN `variant` enum('pending','success','failed') NOT NULL; \ No newline at end of file diff --git a/crates/mx-db/migrations/0004_peaceful_magik.sql b/crates/mx-db/migrations/0004_peaceful_magik.sql deleted file mode 100644 index b9cf6a28..00000000 --- a/crates/mx-db/migrations/0004_peaceful_magik.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `policy_deploy_status` ADD `conflicts` json;--> statement-breakpoint -ALTER TABLE `policy_deploy_status` DROP COLUMN `result`; \ No newline at end of file diff --git a/crates/mx-db/migrations/0005_mysterious_santa_claus.sql b/crates/mx-db/migrations/0005_mysterious_santa_claus.sql deleted file mode 100644 index 0d565bc3..00000000 --- a/crates/mx-db/migrations/0005_mysterious_santa_claus.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `device_actions` DROP COLUMN `deployed_at`; \ No newline at end of file diff --git a/crates/mx-db/migrations/0006_young_rick_jones.sql b/crates/mx-db/migrations/0006_young_rick_jones.sql deleted file mode 100644 index 5930778b..00000000 --- a/crates/mx-db/migrations/0006_young_rick_jones.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE `windows_ephemeral_state`;--> statement-breakpoint -ALTER TABLE `devices` ADD `enrolled_by` bigint unsigned NOT NULL; \ No newline at end of file diff --git a/crates/mx-db/migrations/0007_right_slayback.sql b/crates/mx-db/migrations/0007_right_slayback.sql deleted file mode 100644 index b2c53fbf..00000000 --- a/crates/mx-db/migrations/0007_right_slayback.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `users` RENAME COLUMN `email` TO `upn`;--> statement-breakpoint -ALTER TABLE `users` DROP INDEX `users_email_tenant_unique`;--> statement-breakpoint -ALTER TABLE `users` ADD CONSTRAINT `users_upn_tenant_unique` UNIQUE(`upn`,`tenant`); \ No newline at end of file diff --git a/crates/mx-db/migrations/0008_living_grandmaster.sql b/crates/mx-db/migrations/0008_living_grandmaster.sql deleted file mode 100644 index 8ba8fc1f..00000000 --- a/crates/mx-db/migrations/0008_living_grandmaster.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Custom SQL migration file, put you code below! -- --- Idk why but Drizzle aren't diffing `NOT NULL` correctly and adding it when it's not in the schema. -ALTER TABLE `devices` MODIFY COLUMN `enrolled_by` bigint unsigned; \ No newline at end of file diff --git a/crates/mx-db/migrations/0009_exotic_venus.sql b/crates/mx-db/migrations/0009_exotic_venus.sql deleted file mode 100644 index 96c4475d..00000000 --- a/crates/mx-db/migrations/0009_exotic_venus.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `devices` ADD `mdm_id` varchar(24) NOT NULL; -ALTER TABLE `devices` ADD CONSTRAINT `devices_mdm_id_unique` UNIQUE(`mdm_id`);--> statement-breakpoint \ No newline at end of file diff --git a/crates/mx-db/migrations/0010_curvy_tigra.sql b/crates/mx-db/migrations/0010_curvy_tigra.sql deleted file mode 100644 index 42ed48e7..00000000 --- a/crates/mx-db/migrations/0010_curvy_tigra.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `passkey_challenges` ( - `challenge` varchar(256) NOT NULL, - CONSTRAINT `passkey_challenges_challenge` PRIMARY KEY(`challenge`) -); ---> statement-breakpoint -CREATE TABLE `passkeys` ( - `account` bigint unsigned NOT NULL, - `public_key` text NOT NULL, - `credential_id` varchar(128) NOT NULL, - `counter` int NOT NULL, - `transports` json, - CONSTRAINT `passkeys_credential_id` PRIMARY KEY(`credential_id`), - CONSTRAINT `passkeys_account_unique` UNIQUE(`account`) -); ---> statement-breakpoint -ALTER TABLE `passkeys` ADD CONSTRAINT `passkeys_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/crates/mx-db/migrations/meta/0000_snapshot.json b/crates/mx-db/migrations/meta/0000_snapshot.json deleted file mode 100644 index 7bb93c66..00000000 --- a/crates/mx-db/migrations/meta/0000_snapshot.json +++ /dev/null @@ -1,1722 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "1bbbafde-9226-4e29-a9ba-3fdd450f96ee", - "prevId": "00000000-0000-0000-0000-000000000000", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "certificates": { - "name": "certificates", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "certificate": { - "name": "certificate", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "certificates_key": { - "name": "certificates_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "result": { - "name": "result", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0001_snapshot.json b/crates/mx-db/migrations/meta/0001_snapshot.json deleted file mode 100644 index 91bdc1b4..00000000 --- a/crates/mx-db/migrations/meta/0001_snapshot.json +++ /dev/null @@ -1,1759 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "1601bfa3-61c4-410d-88d9-7b014ad5ebc0", - "prevId": "1bbbafde-9226-4e29-a9ba-3fdd450f96ee", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "certificates": { - "name": "certificates", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "certificate": { - "name": "certificate", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "certificates_key": { - "name": "certificates_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "result": { - "name": "result", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0002_snapshot.json b/crates/mx-db/migrations/meta/0002_snapshot.json deleted file mode 100644 index 38384201..00000000 --- a/crates/mx-db/migrations/meta/0002_snapshot.json +++ /dev/null @@ -1,1723 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "6d3cef37-3daa-441d-9ceb-d48d1b468002", - "prevId": "1601bfa3-61c4-410d-88d9-7b014ad5ebc0", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "result": { - "name": "result", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0003_snapshot.json b/crates/mx-db/migrations/meta/0003_snapshot.json deleted file mode 100644 index dc36e0cd..00000000 --- a/crates/mx-db/migrations/meta/0003_snapshot.json +++ /dev/null @@ -1,1722 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "41ef4efd-68f0-49fd-9f4f-16acc70ee9bc", - "prevId": "6d3cef37-3daa-441d-9ceb-d48d1b468002", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "result": { - "name": "result", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0004_snapshot.json b/crates/mx-db/migrations/meta/0004_snapshot.json deleted file mode 100644 index 00469477..00000000 --- a/crates/mx-db/migrations/meta/0004_snapshot.json +++ /dev/null @@ -1,1722 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "bddb59b7-8f31-466b-8f2a-632994bdd910", - "prevId": "41ef4efd-68f0-49fd-9f4f-16acc70ee9bc", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "deployed_at": { - "name": "deployed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0005_snapshot.json b/crates/mx-db/migrations/meta/0005_snapshot.json deleted file mode 100644 index dabfa750..00000000 --- a/crates/mx-db/migrations/meta/0005_snapshot.json +++ /dev/null @@ -1,1715 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "5fa30830-57bd-472e-b232-3a5294223270", - "prevId": "bddb59b7-8f31-466b-8f2a-632994bdd910", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - }, - "windows_ephemeral_state": { - "name": "windows_ephemeral_state", - "columns": { - "session_id": { - "name": "session_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "msg_id": { - "name": "msg_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "cmd_id": { - "name": "cmd_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "windows_ephemeral_state_deploy_policy_deploy_pk_fk": { - "name": "windows_ephemeral_state_deploy_policy_deploy_pk_fk", - "tableFrom": "windows_ephemeral_state", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "windows_ephemeral_state_session_id_msg_id_cmd_id_pk": { - "name": "windows_ephemeral_state_session_id_msg_id_cmd_id_pk", - "columns": ["session_id", "msg_id", "cmd_id"] - } - }, - "uniqueConstraints": {} - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0006_snapshot.json b/crates/mx-db/migrations/meta/0006_snapshot.json deleted file mode 100644 index f2d022e7..00000000 --- a/crates/mx-db/migrations/meta/0006_snapshot.json +++ /dev/null @@ -1,1663 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "361b0641-fcdd-44e7-9377-3a72234a362f", - "prevId": "5fa30830-57bd-472e-b232-3a5294223270", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enrolled_by": { - "name": "enrolled_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_email_tenant_unique": { - "name": "users_email_tenant_unique", - "columns": ["email", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0007_snapshot.json b/crates/mx-db/migrations/meta/0007_snapshot.json deleted file mode 100644 index a0ba2352..00000000 --- a/crates/mx-db/migrations/meta/0007_snapshot.json +++ /dev/null @@ -1,1665 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "83b4cce0-09ef-48c5-90f7-e4b62e3bbc0e", - "prevId": "361b0641-fcdd-44e7-9377-3a72234a362f", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enrolled_by": { - "name": "enrolled_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "upn": { - "name": "upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_upn_tenant_unique": { - "name": "users_upn_tenant_unique", - "columns": ["upn", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": { - "\"users\".\"email\"": "\"users\".\"upn\"" - } - } -} diff --git a/crates/mx-db/migrations/meta/0008_snapshot.json b/crates/mx-db/migrations/meta/0008_snapshot.json deleted file mode 100644 index 71546ea4..00000000 --- a/crates/mx-db/migrations/meta/0008_snapshot.json +++ /dev/null @@ -1,1663 +0,0 @@ -{ - "id": "b1d6a90d-ae48-4a72-8c26-52e7fa4bd225", - "prevId": "83b4cce0-09ef-48c5-90f7-e4b62e3bbc0e", - "version": "5", - "dialect": "mysql", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "columnsFrom": ["account"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "columnsFrom": ["appPk"], - "tableTo": "apps", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "columnsFrom": ["account"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "columnsFrom": ["session"], - "tableTo": "session", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "columnsFrom": ["device"], - "tableTo": "devices", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "columnsFrom": ["created_by"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enrolled_by": { - "name": "enrolled_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "columnsFrom": ["owner"], - "tableTo": "users", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "columnsFrom": ["identity_provider"], - "tableTo": "identity_providers", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "columnsFrom": ["group"], - "tableTo": "groups", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())", - "onUpdate": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "columnsFrom": ["org"], - "tableTo": "organisations", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "columnsFrom": ["org"], - "tableTo": "organisations", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "columnsFrom": ["account"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "columnsFrom": ["owner"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "columnsFrom": ["policy"], - "tableTo": "policies", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "columnsFrom": ["policy"], - "tableTo": "policies", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "columnsFrom": ["author"], - "tableTo": "accounts", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "columnsFrom": ["deploy"], - "tableTo": "policy_deploy", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "columnsFrom": ["device"], - "tableTo": "devices", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "columnsFrom": ["account"], - "tableTo": "accounts", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "columnsFrom": ["org"], - "tableTo": "organisations", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "upn": { - "name": "upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "columnsFrom": ["tenant"], - "tableTo": "tenant", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "columnsFrom": ["provider"], - "tableTo": "identity_providers", - "columnsTo": ["pk"], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_upn_tenant_unique": { - "name": "users_upn_tenant_unique", - "columns": ["upn", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - } - }, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/crates/mx-db/migrations/meta/0009_snapshot.json b/crates/mx-db/migrations/meta/0009_snapshot.json deleted file mode 100644 index 456982ce..00000000 --- a/crates/mx-db/migrations/meta/0009_snapshot.json +++ /dev/null @@ -1,1674 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "c0a6c778-615c-42ea-920c-3fb9b780f8c2", - "prevId": "b1d6a90d-ae48-4a72-8c26-52e7fa4bd225", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mdm_id": { - "name": "mdm_id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enrolled_by": { - "name": "enrolled_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_mdm_id_unique": { - "name": "devices_mdm_id_unique", - "columns": ["mdm_id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "upn": { - "name": "upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_upn_tenant_unique": { - "name": "users_upn_tenant_unique", - "columns": ["upn", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/0010_snapshot.json b/crates/mx-db/migrations/meta/0010_snapshot.json deleted file mode 100644 index b36bbae8..00000000 --- a/crates/mx-db/migrations/meta/0010_snapshot.json +++ /dev/null @@ -1,1759 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "id": "255bac9e-11bc-4401-9f48-362fcfa333be", - "prevId": "c0a6c778-615c-42ea-920c-3fb9b780f8c2", - "tables": { - "account_login_codes": { - "name": "account_login_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "account_login_codes_account_accounts_pk_fk": { - "name": "account_login_codes_account_accounts_pk_fk", - "tableFrom": "account_login_codes", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "account_login_codes_code": { - "name": "account_login_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "accounts": { - "name": "accounts", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "features": { - "name": "features", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "accounts_pk": { - "name": "accounts_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "accounts_id_unique": { - "name": "accounts_id_unique", - "columns": ["id"] - }, - "accounts_email_unique": { - "name": "accounts_email_unique", - "columns": ["email"] - } - } - }, - "application_assignments": { - "name": "application_assignments", - "columns": { - "appPk": { - "name": "appPk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "application_assignments_appPk_apps_pk_fk": { - "name": "application_assignments_appPk_apps_pk_fk", - "tableFrom": "application_assignments", - "tableTo": "apps", - "columnsFrom": ["appPk"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "application_assignments_appPk_pk_variant_pk": { - "name": "application_assignments_appPk_pk_variant_pk", - "columns": ["appPk", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "apps": { - "name": "apps", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "apps_tenant_tenant_pk_fk": { - "name": "apps_tenant_tenant_pk_fk", - "tableFrom": "apps", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "apps_pk": { - "name": "apps_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "apps_id_unique": { - "name": "apps_id_unique", - "columns": ["id"] - } - } - }, - "audit_log": { - "name": "audit_log", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "action": { - "name": "action", - "type": "enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "audit_log_tenant_tenant_pk_fk": { - "name": "audit_log_tenant_tenant_pk_fk", - "tableFrom": "audit_log", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "audit_log_account_accounts_pk_fk": { - "name": "audit_log_account_accounts_pk_fk", - "tableFrom": "audit_log", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "audit_log_id": { - "name": "audit_log_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "cli_auth_codes": { - "name": "cli_auth_codes", - "columns": { - "code": { - "name": "code", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "session": { - "name": "session", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cli_auth_codes_session_session_id_fk": { - "name": "cli_auth_codes_session_session_id_fk", - "tableFrom": "cli_auth_codes", - "tableTo": "session", - "columnsFrom": ["session"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "cli_auth_codes_code": { - "name": "cli_auth_codes_code", - "columns": ["code"] - } - }, - "uniqueConstraints": {} - }, - "device_actions": { - "name": "device_actions", - "columns": { - "action": { - "name": "action", - "type": "enum('restart','shutdown','lost','wipe','retire')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_by": { - "name": "created_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "device_actions_device_devices_pk_fk": { - "name": "device_actions_device_devices_pk_fk", - "tableFrom": "device_actions", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "device_actions_created_by_accounts_pk_fk": { - "name": "device_actions_created_by_accounts_pk_fk", - "tableFrom": "device_actions", - "tableTo": "accounts", - "columnsFrom": ["created_by"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "device_actions_action_device_pk": { - "name": "device_actions_action_device_pk", - "columns": ["action", "device"] - } - }, - "uniqueConstraints": {} - }, - "devices": { - "name": "devices", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "mdm_id": { - "name": "mdm_id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrollment_type": { - "name": "enrollment_type", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "os": { - "name": "os", - "type": "enum('Windows','iOS','macOS','tvOS','Android','ChromeOS')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "serial_number": { - "name": "serial_number", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "manufacturer": { - "name": "manufacturer", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "model": { - "name": "model", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "os_version": { - "name": "os_version", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "imei": { - "name": "imei", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "free_storage": { - "name": "free_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "total_storage": { - "name": "total_storage", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "azure_ad_did": { - "name": "azure_ad_did", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "enrolled_at": { - "name": "enrolled_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enrolled_by": { - "name": "enrolled_by", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "devices_owner_users_pk_fk": { - "name": "devices_owner_users_pk_fk", - "tableFrom": "devices", - "tableTo": "users", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "devices_tenant_tenant_pk_fk": { - "name": "devices_tenant_tenant_pk_fk", - "tableFrom": "devices", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "devices_pk": { - "name": "devices_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "devices_id_unique": { - "name": "devices_id_unique", - "columns": ["id"] - }, - "devices_mdm_id_unique": { - "name": "devices_mdm_id_unique", - "columns": ["mdm_id"] - }, - "devices_serial_number_unique": { - "name": "devices_serial_number_unique", - "columns": ["serial_number"] - }, - "devices_azure_ad_did_unique": { - "name": "devices_azure_ad_did_unique", - "columns": ["azure_ad_did"] - } - } - }, - "domains": { - "name": "domains", - "columns": { - "domain": { - "name": "domain", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "enterprise_enrollment_available": { - "name": "enterprise_enrollment_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": false - }, - "identity_provider": { - "name": "identity_provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "domains_tenant_tenant_pk_fk": { - "name": "domains_tenant_tenant_pk_fk", - "tableFrom": "domains", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "domains_identity_provider_identity_providers_pk_fk": { - "name": "domains_identity_provider_identity_providers_pk_fk", - "tableFrom": "domains", - "tableTo": "identity_providers", - "columnsFrom": ["identity_provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "domains_domain": { - "name": "domains_domain", - "columns": ["domain"] - } - }, - "uniqueConstraints": {} - }, - "group_assignables": { - "name": "group_assignables", - "columns": { - "group": { - "name": "group", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "group_assignables_group_groups_pk_fk": { - "name": "group_assignables_group_groups_pk_fk", - "tableFrom": "group_assignables", - "tableTo": "groups", - "columnsFrom": ["group"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "group_assignables_group_pk_variant_pk": { - "name": "group_assignables_group_pk_variant_pk", - "columns": ["group", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "groups": { - "name": "groups", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "groups_tenant_tenant_pk_fk": { - "name": "groups_tenant_tenant_pk_fk", - "tableFrom": "groups", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "groups_pk": { - "name": "groups_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "groups_id_unique": { - "name": "groups_id_unique", - "columns": ["id"] - } - } - }, - "identity_providers": { - "name": "identity_providers", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "enum('entraId')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "linker_upn": { - "name": "linker_upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "linker_refresh_token": { - "name": "linker_refresh_token", - "type": "varchar(1024)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "remote_id": { - "name": "remote_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_synced": { - "name": "last_synced", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "identity_providers_tenant_tenant_pk_fk": { - "name": "identity_providers_tenant_tenant_pk_fk", - "tableFrom": "identity_providers", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "identity_providers_pk": { - "name": "identity_providers_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "identity_providers_id_unique": { - "name": "identity_providers_id_unique", - "columns": ["id"] - }, - "identity_providers_tenant_unique": { - "name": "identity_providers_tenant_unique", - "columns": ["tenant"] - }, - "identity_providers_provider_remote_id_unique": { - "name": "identity_providers_provider_remote_id_unique", - "columns": ["provider", "remote_id"] - } - } - }, - "kv": { - "name": "kv", - "columns": { - "key": { - "name": "key", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "varbinary(9068)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "onUpdate": true, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "kv_key": { - "name": "kv_key", - "columns": ["key"] - } - }, - "uniqueConstraints": {} - }, - "organisation_invites": { - "name": "organisation_invites", - "columns": { - "code": { - "name": "code", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_invites_org_organisations_pk_fk": { - "name": "organisation_invites_org_organisations_pk_fk", - "tableFrom": "organisation_invites", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_invites_code": { - "name": "organisation_invites_code", - "columns": ["code"] - } - }, - "uniqueConstraints": { - "organisation_invites_org_email_unique": { - "name": "organisation_invites_org_email_unique", - "columns": ["org", "email"] - } - } - }, - "organisation_members": { - "name": "organisation_members", - "columns": { - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisation_members_org_organisations_pk_fk": { - "name": "organisation_members_org_organisations_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "organisation_members_account_accounts_pk_fk": { - "name": "organisation_members_account_accounts_pk_fk", - "tableFrom": "organisation_members", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisation_members_org_account_pk": { - "name": "organisation_members_org_account_pk", - "columns": ["org", "account"] - } - }, - "uniqueConstraints": {} - }, - "organisations": { - "name": "organisations", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "billing_email": { - "name": "billing_email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "stripe_customer_id": { - "name": "stripe_customer_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "owner": { - "name": "owner", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "organisations_owner_accounts_pk_fk": { - "name": "organisations_owner_accounts_pk_fk", - "tableFrom": "organisations", - "tableTo": "accounts", - "columnsFrom": ["owner"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "organisations_pk": { - "name": "organisations_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "organisations_id_unique": { - "name": "organisations_id_unique", - "columns": ["id"] - }, - "organisations_slug_unique": { - "name": "organisations_slug_unique", - "columns": ["slug"] - } - } - }, - "passkey_challenges": { - "name": "passkey_challenges", - "columns": { - "challenge": { - "name": "challenge", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "passkey_challenges_challenge": { - "name": "passkey_challenges_challenge", - "columns": ["challenge"] - } - }, - "uniqueConstraints": {} - }, - "passkeys": { - "name": "passkeys", - "columns": { - "account": { - "name": "account", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "credential_id": { - "name": "credential_id", - "type": "varchar(128)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "counter": { - "name": "counter", - "type": "int", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "transports": { - "name": "transports", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "passkeys_account_accounts_pk_fk": { - "name": "passkeys_account_accounts_pk_fk", - "tableFrom": "passkeys", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "passkeys_credential_id": { - "name": "passkeys_credential_id", - "columns": ["credential_id"] - } - }, - "uniqueConstraints": { - "passkeys_account_unique": { - "name": "passkeys_account_unique", - "columns": ["account"] - } - } - }, - "policies": { - "name": "policies", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "priority": { - "name": "priority", - "type": "smallint", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 128 - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "last_modified": { - "name": "last_modified", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policies_tenant_tenant_pk_fk": { - "name": "policies_tenant_tenant_pk_fk", - "tableFrom": "policies", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policies_pk": { - "name": "policies_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policies_id_unique": { - "name": "policies_id_unique", - "columns": ["id"] - } - } - }, - "policy_assignables": { - "name": "policy_assignables", - "columns": { - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "pk": { - "name": "pk", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('user','device','group')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "policy_assignables_policy_policies_pk_fk": { - "name": "policy_assignables_policy_policies_pk_fk", - "tableFrom": "policy_assignables", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_assignables_policy_pk_variant_pk": { - "name": "policy_assignables_policy_pk_variant_pk", - "columns": ["policy", "pk", "variant"] - } - }, - "uniqueConstraints": {} - }, - "policy_deploy": { - "name": "policy_deploy", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "policy": { - "name": "policy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "data": { - "name": "data", - "type": "json", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "('{}')" - }, - "comment": { - "name": "comment", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "author": { - "name": "author", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_policy_policies_pk_fk": { - "name": "policy_deploy_policy_policies_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "policies", - "columnsFrom": ["policy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_author_accounts_pk_fk": { - "name": "policy_deploy_author_accounts_pk_fk", - "tableFrom": "policy_deploy", - "tableTo": "accounts", - "columnsFrom": ["author"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_pk": { - "name": "policy_deploy_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "policy_deploy_id_unique": { - "name": "policy_deploy_id_unique", - "columns": ["id"] - } - } - }, - "policy_deploy_status": { - "name": "policy_deploy_status", - "columns": { - "deploy": { - "name": "deploy", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device": { - "name": "device", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variant": { - "name": "variant", - "type": "enum('pending','success','failed')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "conflicts": { - "name": "conflicts", - "type": "json", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "done_at": { - "name": "done_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": { - "policy_deploy_status_deploy_policy_deploy_pk_fk": { - "name": "policy_deploy_status_deploy_policy_deploy_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "policy_deploy", - "columnsFrom": ["deploy"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "policy_deploy_status_device_devices_pk_fk": { - "name": "policy_deploy_status_device_devices_pk_fk", - "tableFrom": "policy_deploy_status", - "tableTo": "devices", - "columnsFrom": ["device"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "policy_deploy_status_deploy_device_pk": { - "name": "policy_deploy_status_deploy_device_pk", - "columns": ["deploy", "device"] - } - }, - "uniqueConstraints": {} - }, - "session": { - "name": "session", - "columns": { - "id": { - "name": "id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "account": { - "name": "account", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_agent": { - "name": "user_agent", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "location": { - "name": "location", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "session_account_accounts_id_fk": { - "name": "session_account_accounts_id_fk", - "tableFrom": "session", - "tableTo": "accounts", - "columnsFrom": ["account"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "session_id": { - "name": "session_id", - "columns": ["id"] - } - }, - "uniqueConstraints": {} - }, - "tenant": { - "name": "tenant", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "slug": { - "name": "slug", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "org": { - "name": "org", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tenant_org_organisations_pk_fk": { - "name": "tenant_org_organisations_pk_fk", - "tableFrom": "tenant", - "tableTo": "organisations", - "columnsFrom": ["org"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "tenant_pk": { - "name": "tenant_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "tenant_id_unique": { - "name": "tenant_id_unique", - "columns": ["id"] - }, - "tenant_slug_unique": { - "name": "tenant_slug_unique", - "columns": ["slug"] - } - } - }, - "users": { - "name": "users", - "columns": { - "pk": { - "name": "pk", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "id": { - "name": "id", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "upn": { - "name": "upn", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tenant": { - "name": "tenant", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "provider": { - "name": "provider", - "type": "bigint unsigned", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "resource_id": { - "name": "resource_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "users_tenant_tenant_pk_fk": { - "name": "users_tenant_tenant_pk_fk", - "tableFrom": "users", - "tableTo": "tenant", - "columnsFrom": ["tenant"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - }, - "users_provider_identity_providers_pk_fk": { - "name": "users_provider_identity_providers_pk_fk", - "tableFrom": "users", - "tableTo": "identity_providers", - "columnsFrom": ["provider"], - "columnsTo": ["pk"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "users_pk": { - "name": "users_pk", - "columns": ["pk"] - } - }, - "uniqueConstraints": { - "users_id_unique": { - "name": "users_id_unique", - "columns": ["id"] - }, - "users_upn_tenant_unique": { - "name": "users_upn_tenant_unique", - "columns": ["upn", "tenant"] - }, - "users_resource_id_provider_unique": { - "name": "users_resource_id_provider_unique", - "columns": ["resource_id", "provider"] - } - } - }, - "waitlist": { - "name": "waitlist", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": false, - "notNull": true, - "autoincrement": true - }, - "email": { - "name": "email", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "interest": { - "name": "interest", - "type": "enum('personal','internal-it-team','msp-provider','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deployment": { - "name": "deployment", - "type": "enum('managed-cloud','private-cloud','onprem','other')", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "(now())" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": { - "waitlist_id": { - "name": "waitlist_id", - "columns": ["id"] - } - }, - "uniqueConstraints": { - "waitlist_email_unique": { - "name": "waitlist_email_unique", - "columns": ["email"] - } - } - } - }, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} diff --git a/crates/mx-db/migrations/meta/_journal.json b/crates/mx-db/migrations/meta/_journal.json deleted file mode 100644 index 02be9dab..00000000 --- a/crates/mx-db/migrations/meta/_journal.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "version": "5", - "dialect": "mysql", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1713931019335, - "tag": "0000_dry_stephen_strange", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1714273519161, - "tag": "0001_chemical_mojo", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1714621481150, - "tag": "0002_outgoing_dagger", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1717597354775, - "tag": "0003_spotty_changeling", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1717598060538, - "tag": "0004_peaceful_magik", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1717642399926, - "tag": "0005_mysterious_santa_claus", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1717643076370, - "tag": "0006_young_rick_jones", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1718031784348, - "tag": "0007_right_slayback", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1718175093819, - "tag": "0008_living_grandmaster", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1718177010992, - "tag": "0009_exotic_venus", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1719151207671, - "tag": "0010_curvy_tigra", - "breakpoints": true - } - ] -} diff --git a/crates/mx-db/migrations/refinery/V0000__dry_stephen_strange.sql b/crates/mx-db/migrations/refinery/V0000__dry_stephen_strange.sql deleted file mode 100644 index 2597609c..00000000 --- a/crates/mx-db/migrations/refinery/V0000__dry_stephen_strange.sql +++ /dev/null @@ -1,287 +0,0 @@ -CREATE TABLE `account_login_codes` ( - `code` varchar(8) NOT NULL, - `account` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `account_login_codes_code` PRIMARY KEY(`code`) -); - -CREATE TABLE `accounts` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(16) NOT NULL, - `email` varchar(256) NOT NULL, - `name` varchar(256) NOT NULL, - `features` json, - CONSTRAINT `accounts_pk` PRIMARY KEY(`pk`), - CONSTRAINT `accounts_id_unique` UNIQUE(`id`), - CONSTRAINT `accounts_email_unique` UNIQUE(`email`) -); - -CREATE TABLE `application_assignments` ( - `appPk` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device','group') NOT NULL, - CONSTRAINT `application_assignments_appPk_pk_variant_pk` PRIMARY KEY(`appPk`,`pk`,`variant`) -); - -CREATE TABLE `apps` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `description` varchar(256), - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `apps_pk` PRIMARY KEY(`pk`), - CONSTRAINT `apps_id_unique` UNIQUE(`id`) -); - -CREATE TABLE `audit_log` ( - `id` serial AUTO_INCREMENT NOT NULL, - `tenant` bigint unsigned NOT NULL, - `action` enum('addIdp','removeIdp','connectDomain','disconnectDomain','addDevice','deviceAction','removeDevice','addPolicy','deployPolicy','deletePolicy','addApp','editApp','removeApp','addGroup','editGroup','removeGroup') NOT NULL, - `data` json NOT NULL, - `account` bigint unsigned, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `audit_log_id` PRIMARY KEY(`id`) -); - -CREATE TABLE `certificates` ( - `key` varchar(256) NOT NULL, - `certificate` varbinary(9068) NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `certificates_key` PRIMARY KEY(`key`) -); - -CREATE TABLE `cli_auth_codes` ( - `code` varchar(24) NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `session` varchar(255), - CONSTRAINT `cli_auth_codes_code` PRIMARY KEY(`code`) -); - -CREATE TABLE `device_actions` ( - `action` enum('restart','shutdown','lost','wipe','retire') NOT NULL, - `device` bigint unsigned NOT NULL, - `created_by` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `deployed_at` timestamp, - CONSTRAINT `device_actions_action_device_pk` PRIMARY KEY(`action`,`device`) -); - -CREATE TABLE `devices` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `description` varchar(256), - `enrollment_type` enum('user','device') NOT NULL, - `os` enum('Windows','iOS','macOS','tvOS','Android','ChromeOS') NOT NULL, - `serial_number` varchar(256) NOT NULL, - `manufacturer` varchar(256), - `model` varchar(256), - `os_version` varchar(256), - `imei` varchar(256), - `free_storage` bigint, - `total_storage` bigint, - `owner` bigint unsigned, - `azure_ad_did` varchar(256), - `enrolled_at` timestamp NOT NULL DEFAULT (now()), - `last_synced` timestamp NOT NULL DEFAULT (now()), - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `devices_pk` PRIMARY KEY(`pk`), - CONSTRAINT `devices_id_unique` UNIQUE(`id`), - CONSTRAINT `devices_serial_number_unique` UNIQUE(`serial_number`), - CONSTRAINT `devices_azure_ad_did_unique` UNIQUE(`azure_ad_did`) -); - -CREATE TABLE `domains` ( - `domain` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - `enterprise_enrollment_available` boolean NOT NULL DEFAULT false, - `identity_provider` bigint unsigned NOT NULL, - CONSTRAINT `domains_domain` PRIMARY KEY(`domain`) -); - -CREATE TABLE `group_assignables` ( - `group` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device') NOT NULL, - CONSTRAINT `group_assignables_group_pk_variant_pk` PRIMARY KEY(`group`,`pk`,`variant`) -); - -CREATE TABLE `groups` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - CONSTRAINT `groups_pk` PRIMARY KEY(`pk`), - CONSTRAINT `groups_id_unique` UNIQUE(`id`) -); - -CREATE TABLE `identity_providers` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256), - `provider` enum('entraId') NOT NULL, - `tenant` bigint unsigned NOT NULL, - `linker_upn` varchar(256), - `linker_refresh_token` varchar(1024), - `remote_id` varchar(256) NOT NULL, - `last_synced` timestamp, - CONSTRAINT `identity_providers_pk` PRIMARY KEY(`pk`), - CONSTRAINT `identity_providers_id_unique` UNIQUE(`id`), - CONSTRAINT `identity_providers_tenant_unique` UNIQUE(`tenant`), - CONSTRAINT `identity_providers_provider_remote_id_unique` UNIQUE(`provider`,`remote_id`) -); - -CREATE TABLE `organisation_invites` ( - `code` varchar(256) NOT NULL, - `org` bigint unsigned NOT NULL, - `email` varchar(256) NOT NULL, - `created_at` timestamp DEFAULT (now()), - CONSTRAINT `organisation_invites_code` PRIMARY KEY(`code`), - CONSTRAINT `organisation_invites_org_email_unique` UNIQUE(`org`,`email`) -); - -CREATE TABLE `organisation_members` ( - `org` bigint unsigned NOT NULL, - `account` bigint unsigned NOT NULL, - CONSTRAINT `organisation_members_org_account_pk` PRIMARY KEY(`org`,`account`) -); - -CREATE TABLE `organisations` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(100) NOT NULL, - `slug` varchar(256) NOT NULL, - `billing_email` varchar(256), - `stripe_customer_id` varchar(256), - `owner` bigint unsigned NOT NULL, - CONSTRAINT `organisations_pk` PRIMARY KEY(`pk`), - CONSTRAINT `organisations_id_unique` UNIQUE(`id`), - CONSTRAINT `organisations_slug_unique` UNIQUE(`slug`) -); - -CREATE TABLE `policies` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `priority` smallint NOT NULL DEFAULT 128, - `name` varchar(256) NOT NULL, - `data` json NOT NULL DEFAULT ('{}'), - `tenant` bigint unsigned NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()), - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policies_pk` PRIMARY KEY(`pk`), - CONSTRAINT `policies_id_unique` UNIQUE(`id`) -); - -CREATE TABLE `policy_assignables` ( - `policy` bigint unsigned NOT NULL, - `pk` bigint unsigned NOT NULL, - `variant` enum('user','device','group') NOT NULL, - CONSTRAINT `policy_assignables_policy_pk_variant_pk` PRIMARY KEY(`policy`,`pk`,`variant`) -); - -CREATE TABLE `policy_deploy` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `policy` bigint unsigned NOT NULL, - `data` json NOT NULL DEFAULT ('{}'), - `comment` varchar(256) NOT NULL, - `author` bigint unsigned NOT NULL, - `done_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policy_deploy_pk` PRIMARY KEY(`pk`), - CONSTRAINT `policy_deploy_id_unique` UNIQUE(`id`) -); - -CREATE TABLE `policy_deploy_status` ( - `deploy` bigint unsigned NOT NULL, - `device` bigint unsigned NOT NULL, - `variant` enum('success','failed') NOT NULL, - `result` json NOT NULL, - `done_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `policy_deploy_status_deploy_device_pk` PRIMARY KEY(`deploy`,`device`) -); - -CREATE TABLE `session` ( - `id` varchar(255) NOT NULL, - `account` varchar(255) NOT NULL, - `user_agent` varchar(256) NOT NULL, - `location` varchar(256) NOT NULL, - `expires_at` timestamp NOT NULL, - CONSTRAINT `session_id` PRIMARY KEY(`id`) -); - -CREATE TABLE `tenant` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(100) NOT NULL, - `slug` varchar(256) NOT NULL, - `org` bigint unsigned, - CONSTRAINT `tenant_pk` PRIMARY KEY(`pk`), - CONSTRAINT `tenant_id_unique` UNIQUE(`id`), - CONSTRAINT `tenant_slug_unique` UNIQUE(`slug`) -); - -CREATE TABLE `users` ( - `pk` serial AUTO_INCREMENT NOT NULL, - `id` varchar(24) NOT NULL, - `name` varchar(256) NOT NULL, - `email` varchar(256) NOT NULL, - `tenant` bigint unsigned NOT NULL, - `provider` bigint unsigned NOT NULL, - `resource_id` varchar(256), - CONSTRAINT `users_pk` PRIMARY KEY(`pk`), - CONSTRAINT `users_id_unique` UNIQUE(`id`), - CONSTRAINT `users_email_tenant_unique` UNIQUE(`email`,`tenant`), - CONSTRAINT `users_resource_id_provider_unique` UNIQUE(`resource_id`,`provider`) -); - -CREATE TABLE `waitlist` ( - `id` serial AUTO_INCREMENT NOT NULL, - `email` varchar(256) NOT NULL, - `name` varchar(256), - `interest` enum('personal','internal-it-team','msp-provider','other') NOT NULL, - `deployment` enum('managed-cloud','private-cloud','onprem','other') NOT NULL, - `created_at` timestamp NOT NULL DEFAULT (now()), - CONSTRAINT `waitlist_id` PRIMARY KEY(`id`), - CONSTRAINT `waitlist_email_unique` UNIQUE(`email`) -); - -CREATE TABLE `windows_ephemeral_state` ( - `session_id` varchar(256) NOT NULL, - `msg_id` varchar(256) NOT NULL, - `cmd_id` varchar(256) NOT NULL, - `deploy` bigint unsigned NOT NULL, - `key` varchar(256) NOT NULL, - CONSTRAINT `windows_ephemeral_state_session_id_msg_id_cmd_id_pk` PRIMARY KEY(`session_id`,`msg_id`,`cmd_id`) -); - -ALTER TABLE `account_login_codes` ADD CONSTRAINT `account_login_codes_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `application_assignments` ADD CONSTRAINT `application_assignments_appPk_apps_pk_fk` FOREIGN KEY (`appPk`) REFERENCES `apps`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `apps` ADD CONSTRAINT `apps_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `audit_log` ADD CONSTRAINT `audit_log_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `audit_log` ADD CONSTRAINT `audit_log_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `cli_auth_codes` ADD CONSTRAINT `cli_auth_codes_session_session_id_fk` FOREIGN KEY (`session`) REFERENCES `session`(`id`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `device_actions` ADD CONSTRAINT `device_actions_device_devices_pk_fk` FOREIGN KEY (`device`) REFERENCES `devices`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `device_actions` ADD CONSTRAINT `device_actions_created_by_accounts_pk_fk` FOREIGN KEY (`created_by`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `devices` ADD CONSTRAINT `devices_owner_users_pk_fk` FOREIGN KEY (`owner`) REFERENCES `users`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `devices` ADD CONSTRAINT `devices_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `domains` ADD CONSTRAINT `domains_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `domains` ADD CONSTRAINT `domains_identity_provider_identity_providers_pk_fk` FOREIGN KEY (`identity_provider`) REFERENCES `identity_providers`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `group_assignables` ADD CONSTRAINT `group_assignables_group_groups_pk_fk` FOREIGN KEY (`group`) REFERENCES `groups`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `groups` ADD CONSTRAINT `groups_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `identity_providers` ADD CONSTRAINT `identity_providers_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `organisation_invites` ADD CONSTRAINT `organisation_invites_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `organisation_members` ADD CONSTRAINT `organisation_members_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `organisation_members` ADD CONSTRAINT `organisation_members_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `organisations` ADD CONSTRAINT `organisations_owner_accounts_pk_fk` FOREIGN KEY (`owner`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policies` ADD CONSTRAINT `policies_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policy_assignables` ADD CONSTRAINT `policy_assignables_policy_policies_pk_fk` FOREIGN KEY (`policy`) REFERENCES `policies`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policy_deploy` ADD CONSTRAINT `policy_deploy_policy_policies_pk_fk` FOREIGN KEY (`policy`) REFERENCES `policies`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policy_deploy` ADD CONSTRAINT `policy_deploy_author_accounts_pk_fk` FOREIGN KEY (`author`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policy_deploy_status` ADD CONSTRAINT `policy_deploy_status_deploy_policy_deploy_pk_fk` FOREIGN KEY (`deploy`) REFERENCES `policy_deploy`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `policy_deploy_status` ADD CONSTRAINT `policy_deploy_status_device_devices_pk_fk` FOREIGN KEY (`device`) REFERENCES `devices`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `session` ADD CONSTRAINT `session_account_accounts_id_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`id`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `tenant` ADD CONSTRAINT `tenant_org_organisations_pk_fk` FOREIGN KEY (`org`) REFERENCES `organisations`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `users` ADD CONSTRAINT `users_tenant_tenant_pk_fk` FOREIGN KEY (`tenant`) REFERENCES `tenant`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `users` ADD CONSTRAINT `users_provider_identity_providers_pk_fk` FOREIGN KEY (`provider`) REFERENCES `identity_providers`(`pk`) ON DELETE no action ON UPDATE no action; -ALTER TABLE `windows_ephemeral_state` ADD CONSTRAINT `windows_ephemeral_state_deploy_policy_deploy_pk_fk` FOREIGN KEY (`deploy`) REFERENCES `policy_deploy`(`pk`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0001__chemical_mojo.sql b/crates/mx-db/migrations/refinery/V0001__chemical_mojo.sql deleted file mode 100644 index c6036027..00000000 --- a/crates/mx-db/migrations/refinery/V0001__chemical_mojo.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE `kv` ( - `key` varchar(256) NOT NULL, - `value` varbinary(9068) NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP, - CONSTRAINT `kv_key` PRIMARY KEY(`key`) -); diff --git a/crates/mx-db/migrations/refinery/V0002__outgoing_dagger.sql b/crates/mx-db/migrations/refinery/V0002__outgoing_dagger.sql deleted file mode 100644 index b08fd76e..00000000 --- a/crates/mx-db/migrations/refinery/V0002__outgoing_dagger.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE `certificates`; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0003__spotty_changeling.sql b/crates/mx-db/migrations/refinery/V0003__spotty_changeling.sql deleted file mode 100644 index 4b5b89fa..00000000 --- a/crates/mx-db/migrations/refinery/V0003__spotty_changeling.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `policy_deploy_status` MODIFY COLUMN `variant` enum('pending','success','failed') NOT NULL; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0004__peaceful_magik.sql b/crates/mx-db/migrations/refinery/V0004__peaceful_magik.sql deleted file mode 100644 index 38603e19..00000000 --- a/crates/mx-db/migrations/refinery/V0004__peaceful_magik.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `policy_deploy_status` ADD `conflicts` json; -ALTER TABLE `policy_deploy_status` DROP COLUMN `result`; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0005__mysterious_santa_claus.sql b/crates/mx-db/migrations/refinery/V0005__mysterious_santa_claus.sql deleted file mode 100644 index 0d565bc3..00000000 --- a/crates/mx-db/migrations/refinery/V0005__mysterious_santa_claus.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `device_actions` DROP COLUMN `deployed_at`; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0006__young_rick_jones.sql b/crates/mx-db/migrations/refinery/V0006__young_rick_jones.sql deleted file mode 100644 index 93deb5a7..00000000 --- a/crates/mx-db/migrations/refinery/V0006__young_rick_jones.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE `windows_ephemeral_state`; -ALTER TABLE `devices` ADD `enrolled_by` bigint unsigned NOT NULL; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0007__right_slayback.sql b/crates/mx-db/migrations/refinery/V0007__right_slayback.sql deleted file mode 100644 index f0768110..00000000 --- a/crates/mx-db/migrations/refinery/V0007__right_slayback.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `users` RENAME COLUMN `email` TO `upn`; -ALTER TABLE `users` DROP INDEX `users_email_tenant_unique`; -ALTER TABLE `users` ADD CONSTRAINT `users_upn_tenant_unique` UNIQUE(`upn`,`tenant`); \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0008__living_grandmaster.sql b/crates/mx-db/migrations/refinery/V0008__living_grandmaster.sql deleted file mode 100644 index 8ba8fc1f..00000000 --- a/crates/mx-db/migrations/refinery/V0008__living_grandmaster.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Custom SQL migration file, put you code below! -- --- Idk why but Drizzle aren't diffing `NOT NULL` correctly and adding it when it's not in the schema. -ALTER TABLE `devices` MODIFY COLUMN `enrolled_by` bigint unsigned; \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0009__exotic_venus.sql b/crates/mx-db/migrations/refinery/V0009__exotic_venus.sql deleted file mode 100644 index 458e2d08..00000000 --- a/crates/mx-db/migrations/refinery/V0009__exotic_venus.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `devices` ADD `mdm_id` varchar(24) NOT NULL; -ALTER TABLE `devices` ADD CONSTRAINT `devices_mdm_id_unique` UNIQUE(`mdm_id`); \ No newline at end of file diff --git a/crates/mx-db/migrations/refinery/V0010__curvy_tigra.sql b/crates/mx-db/migrations/refinery/V0010__curvy_tigra.sql deleted file mode 100644 index fe19efb9..00000000 --- a/crates/mx-db/migrations/refinery/V0010__curvy_tigra.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `passkey_challenges` ( - `challenge` varchar(256) NOT NULL, - CONSTRAINT `passkey_challenges_challenge` PRIMARY KEY(`challenge`) -); - -CREATE TABLE `passkeys` ( - `account` bigint unsigned NOT NULL, - `public_key` text NOT NULL, - `credential_id` varchar(128) NOT NULL, - `counter` int NOT NULL, - `transports` json, - CONSTRAINT `passkeys_credential_id` PRIMARY KEY(`credential_id`), - CONSTRAINT `passkeys_account_unique` UNIQUE(`account`) -); - -ALTER TABLE `passkeys` ADD CONSTRAINT `passkeys_account_accounts_pk_fk` FOREIGN KEY (`account`) REFERENCES `accounts`(`pk`) ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/crates/mx-db/src/_migrations.rs b/crates/mx-db/src/_migrations.rs deleted file mode 100644 index 634666c5..00000000 --- a/crates/mx-db/src/_migrations.rs +++ /dev/null @@ -1,3 +0,0 @@ -use refinery::embed_migrations; - -embed_migrations!("./migrations/refinery"); diff --git a/crates/mx-db/src/db.rs b/crates/mx-db/src/db.rs deleted file mode 100644 index 47e32600..00000000 --- a/crates/mx-db/src/db.rs +++ /dev/null @@ -1,49 +0,0 @@ -// This file was generated by '@mattrax/drizzle-to-rs' -#![allow(unused)] -use chrono::NaiveDateTime; -use mysql_async::{prelude::*, BinaryProtocol, Deserialized, QueryResult, Serialized}; - -// 'FromValue::from_value' but 'track_caller' -#[track_caller] -fn from_value(row: &mut mysql_async::Row, index: usize) -> T { - let v = row.take(index).unwrap(); - match T::from_value_opt(v) { - Ok(this) => this, - Err(e) => { - let column_name = row - .columns_ref() - .get(index) - .map(|c| c.name_str()) - .unwrap_or("unknown".into()); - let type_name = std::any::type_name::(); - panic!("Could not retrieve {type_name:?} from column {column_name:?}: {e}") - } - } -} - -#[derive(Clone)] -pub struct Db { - pool: mysql_async::Pool, -} - -impl std::ops::Deref for Db { - type Target = mysql_async::Pool; - - fn deref(&self) -> &Self::Target { - &self.pool - } -} - -impl std::ops::DerefMut for Db { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.pool - } -} - -impl Db { - pub fn new(db_url: &str) -> Self { - Self { - pool: mysql_async::Pool::new(db_url), - } - } -} diff --git a/crates/mx-db/src/lib.rs b/crates/mx-db/src/lib.rs deleted file mode 100644 index 210b3797..00000000 --- a/crates/mx-db/src/lib.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Mattrax database. -//! -//! `db.rs` is generated from Drizzle code defined Typescript (`rust.ts`). -//! `migrations.rs` is generated from the SQL migration files. -//! - -mod _migrations; -#[allow(warnings, unused, clippy)] -mod db; - -pub use _migrations::migrations; -pub use db::*; -pub use mysql_async::Serialized; diff --git a/drizzle.config.ts b/drizzle.config.ts index 7055391e..1c3885bb 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,5 +1,3 @@ -import fs from "node:fs"; -import path from "node:path"; import dotenv from "dotenv"; import { defineConfig } from "drizzle-kit"; @@ -16,8 +14,7 @@ if (!process.env.DATABASE_URL?.startsWith("mysql://")) ); export default defineConfig({ - out: "./crates/mx-db/migrations", - schema: "./apps/api/src/db/schema.ts", + schema: "./apps/web/src/db/schema.ts", dialect: "mysql", dbCredentials: { url: process.env.DATABASE_URL!, @@ -25,28 +22,3 @@ export default defineConfig({ verbose: true, strict: true, }); - -// Drizzle and refinery use different migration formats -process.on("exit", () => { - const migrations = path.join("crates", "mx-db", "migrations"); - const refineryMigrations = path.join(migrations, "refinery"); - if (fs.existsSync(refineryMigrations)) { - fs.rmdirSync(refineryMigrations, { recursive: true }); - } - fs.mkdirSync(refineryMigrations); - - for (const fileName of fs.readdirSync(migrations)) { - const p = path.join(migrations, fileName); - if (!fs.lstatSync(p).isFile()) continue; - - const [num, ...rest] = path.parse(fileName).name.split("_"); - const src = fs.readFileSync(p, "utf-8"); - fs.writeFileSync( - path.join(refineryMigrations, `V${num}__${rest.join("_")}.sql`), - // @ts-expect-error - src.replaceAll("--> statement-breakpoint", ""), - ); - } - - console.log("Successfully converted Drizzle migrations to Refinery format!"); -}); diff --git a/nx.json b/nx.json deleted file mode 100644 index 022cd9f9..00000000 --- a/nx.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "./node_modules/nx/schemas/nx-schema.json", - "targetDefaults": { - "build": { - "dependsOn": ["^build"], - "outputs": ["{projectRoot}/dist", "{projectRoot}/.output"], - "inputs": ["default", "^default", { "env": "NITRO_PRESET" }], - "cache": true - } - }, - "defaultBase": "main" -} diff --git a/package.json b/package.json index a2871271..b84a3f00 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "dev": "pnpm --filter @mattrax/web dev", "web": "pnpm --filter @mattrax/web --", "landing": "pnpm --filter @mattrax/landing --", - "api": "pnpm --filter @mattrax/api --", "email": "pnpm --filter @mattrax/email --", "ingest": "pnpm --filter @mattrax/ingest --", "db:push": "DRIZZLE=1 drizzle-kit push", @@ -21,6 +20,9 @@ "node": ">=20.17", "pnpm": "^9" }, + "resolutions": { + "nitropack": "npm:nitropack-nightly@latest" + }, "dependencies": { "@biomejs/biome": "^1.9.4", "@solidjs/start": "1.0.9", @@ -32,13 +34,11 @@ }, "devDependencies": { "husky": "^9.1.6", - "nx": "20.0.3", - "sst": "3.1.49", "wrangler": "^3.81.0" }, "pnpm": { "patchedDependencies": { - "@solidjs/start": "patches/@solidjs__start.patch" + "nitropack-nightly": "patches/nitropack-nightly.patch" } } } diff --git a/packages/configuration-schemas/sst-env.d.ts b/packages/configuration-schemas/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/configuration-schemas/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/drizzle-to-rs/sst-env.d.ts b/packages/drizzle-to-rs/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/drizzle-to-rs/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/email/sst-env.d.ts b/packages/email/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/email/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/idb-plus/sst-env.d.ts b/packages/idb-plus/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/idb-plus/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/ms-graph/sst-env.d.ts b/packages/ms-graph/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/ms-graph/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/ms-mde/sst-env.d.ts b/packages/ms-mde/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/ms-mde/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/ms-mdm/sst-env.d.ts b/packages/ms-mdm/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/ms-mdm/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/mysql-planetscale/sst-env.d.ts b/packages/mysql-planetscale/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/mysql-planetscale/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/policy-composer/sst-env.d.ts b/packages/policy-composer/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/policy-composer/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/policy/sst-env.d.ts b/packages/policy/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/policy/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/trpc-server-function/package.json b/packages/trpc-server-function/package.json index 44ea7b17..630cc39a 100644 --- a/packages/trpc-server-function/package.json +++ b/packages/trpc-server-function/package.json @@ -17,6 +17,7 @@ "@tanstack/query-core": "^5.59.13", "@trpc/client": "^10.45.2", "@trpc/server": "^10.45.2", + "@vercel/functions": "^1.4.2", "seroval": "^1.1.1" }, "peerDependencies": { diff --git a/packages/trpc-server-function/src/server.ts b/packages/trpc-server-function/src/server.ts index cc3e17bb..a424356f 100644 --- a/packages/trpc-server-function/src/server.ts +++ b/packages/trpc-server-function/src/server.ts @@ -1,5 +1,5 @@ import { AsyncLocalStorage } from "node:async_hooks"; -import { getRequestEvent } from "solid-js/web"; +import { waitUntil as vercelWaitUntil } from "@vercel/functions"; export const TRPC_LOCAL_STORAGE = new AsyncLocalStorage<() => void>(); @@ -12,7 +12,9 @@ export function flushResponse() { } export function waitUntil(promise: Promise | (() => Promise)) { - const e = getRequestEvent(); - if (!e) throw new Error("Called `waitUtil` outside request context"); - (e as any).waitUntil(promise); + // TODO: Vercel and Cloudflare do it differently + // const e = getRequestEvent(); + // if (!e) throw new Error("Called `waitUntil` outside request context"); + // (e as any).waitUntil(promise); + vercelWaitUntil(typeof promise === "function" ? promise() : promise); } diff --git a/packages/trpc-server-function/sst-env.d.ts b/packages/trpc-server-function/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/trpc-server-function/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/packages/ui/sst-env.d.ts b/packages/ui/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/packages/ui/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/patches/@solidjs__start.patch b/patches/@solidjs__start.patch deleted file mode 100644 index c01bfdc8..00000000 --- a/patches/@solidjs__start.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/config/index.js b/config/index.js -index 0b53874cc5eb5cff12c99230c079d261cc71bd31..dfb0144edac87285e8d0bb77bf9b4f3323f48839 100644 ---- a/config/index.js -+++ b/config/index.js -@@ -123,7 +123,7 @@ export function defineConfig(baseConfig = {}) { - resolve: { - alias: { - "#start/app": join(process.cwd(), start.appRoot, `app${entryExtension}`), -- "~": join(process.cwd(), start.appRoot), -+ // "~": join(process.cwd(), start.appRoot), - ...(!start.ssr - ? { - "@solidjs/start/server": "@solidjs/start/server/spa" -@@ -188,7 +188,7 @@ export function defineConfig(baseConfig = {}) { - resolve: { - alias: { - "#start/app": join(process.cwd(), start.appRoot, `app${entryExtension}`), -- "~": join(process.cwd(), start.appRoot), -+ // "~": join(process.cwd(), start.appRoot), - ...(start.experimental.islands - ? { - "@solidjs/start/client": "@solidjs/start/client/islands" -@@ -258,7 +258,7 @@ export function defineConfig(baseConfig = {}) { - resolve: { - alias: { - "#start/app": join(process.cwd(), start.appRoot, `app${entryExtension}`), -- "~": join(process.cwd(), start.appRoot), -+ // "~": join(process.cwd(), start.appRoot), - ...(!start.ssr - ? { - "@solidjs/start/server": "@solidjs/start/server/spa" diff --git a/patches/nitropack-nightly.patch b/patches/nitropack-nightly.patch new file mode 100644 index 00000000..9fc330aa --- /dev/null +++ b/patches/nitropack-nightly.patch @@ -0,0 +1,18 @@ +diff --git a/dist/presets/cloudflare/preset.mjs b/dist/presets/cloudflare/preset.mjs +index 14c004d7bd7ba664aecb20e39538d778ac62f7c3..4a6ba97a3e3e222a414be673ef9d808cf0a42e93 100644 +--- a/dist/presets/cloudflare/preset.mjs ++++ b/dist/presets/cloudflare/preset.mjs +@@ -79,6 +79,13 @@ const cloudflare = defineNitroPreset( + wasm: { + lazy: true + }, ++ rollupConfig: { ++ output: { ++ entryFileNames: "index.mjs", ++ format: "esm", ++ inlineDynamicImports: false ++ } ++ }, + hooks: { + async compiled(nitro) { + await writeFile( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fff4bd6e..88ecef0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,10 +4,13 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + nitropack: npm:nitropack-nightly@latest + patchedDependencies: - '@solidjs/start': - hash: qyqwxlt4pf7pfndzmkpqvr6gne - path: patches/@solidjs__start.patch + nitropack-nightly: + hash: wynz3sibbystwgsuqi5dq4yc74 + path: patches/nitropack-nightly.patch importers: @@ -18,7 +21,7 @@ importers: version: 1.9.4 '@solidjs/start': specifier: 1.0.9 - version: 1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + version: 1.0.9(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -38,107 +41,10 @@ importers: husky: specifier: ^9.1.6 version: 9.1.6 - nx: - specifier: 20.0.3 - version: 20.0.3(@swc/core@1.7.26(@swc/helpers@0.5.13)) - sst: - specifier: 3.1.49 - version: 3.1.49(hono@4.6.5) wrangler: specifier: ^3.81.0 version: 3.81.0(@cloudflare/workers-types@4.20241018.0) - apps/api: - dependencies: - '@lucia-auth/adapter-drizzle': - specifier: ^1.1.0 - version: 1.1.0(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(lucia@3.2.2) - '@mattrax/email': - specifier: workspace:* - version: link:../../packages/email - '@mattrax/ms-mde': - specifier: workspace:* - version: link:../../packages/ms-mde - '@mattrax/mysql-planetscale': - specifier: ^0.0.3 - version: 0.0.3 - '@mattrax/trpc-server-function': - specifier: workspace:* - version: link:../../packages/trpc-server-function - '@microlabs/otel-cf-workers': - specifier: 1.0.0-rc.48 - version: 1.0.0-rc.48(@opentelemetry/api@1.9.0) - '@opentelemetry/api': - specifier: ^1.9.0 - version: 1.9.0 - '@paralleldrive/cuid2': - specifier: ^2.2.2 - version: 2.2.2 - '@planetscale/database': - specifier: ^1.19.0 - version: 1.19.0 - '@solidjs/router': - specifier: 0.14.10 - version: 0.14.10(solid-js@1.9.2) - '@t3-oss/env-core': - specifier: ^0.11.1 - version: 0.11.1(typescript@5.6.3)(zod@3.23.8) - '@trpc/server': - specifier: ^10.45.2 - version: 10.45.2 - aws4fetch: - specifier: ^1.0.20 - version: 1.0.20 - drizzle-orm: - specifier: ^0.35.2 - version: 0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1) - fast-xml-parser: - specifier: ^4.5.0 - version: 4.5.0 - hono: - specifier: ^4.6.5 - version: 4.6.5 - lucia: - specifier: ^3.2.2 - version: 3.2.2 - node-forge: - specifier: ^1.3.1 - version: 1.3.1 - oslo: - specifier: ^1.2.1 - version: 1.2.1 - seroval: - specifier: ^1.1.1 - version: 1.1.1 - solid-js: - specifier: '*' - version: 1.9.2 - zod: - specifier: ^3.23.8 - version: 3.23.8 - devDependencies: - '@cloudflare/workers-types': - specifier: ^4.20241018.0 - version: 4.20241018.0 - '@types/node': - specifier: ^22.7.7 - version: 22.7.7 - '@types/node-forge': - specifier: ^1.3.11 - version: 1.3.11 - '@whatwg-node/server': - specifier: ^0.9.50 - version: 0.9.50 - esbuild: - specifier: ^0.24.0 - version: 0.24.0 - esbuild-plugin-solid: - specifier: ^0.6.0 - version: 0.6.0(esbuild@0.24.0)(solid-js@1.9.2) - vite: - specifier: ^5.4.9 - version: 5.4.9(@types/node@22.7.7)(terser@5.36.0) - apps/landing: dependencies: '@fontsource-variable/inter': @@ -158,7 +64,7 @@ importers: version: 0.14.10(solid-js@1.9.2) '@solidjs/start': specifier: 1.0.9 - version: 1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + version: 1.0.9(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 @@ -173,7 +79,7 @@ importers: version: 1.9.2 vinxi: specifier: 0.4.3 - version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) vite: specifier: ^5.4.9 version: 5.4.9(@types/node@22.7.7)(terser@5.36.0) @@ -226,9 +132,6 @@ importers: '@lucia-auth/adapter-drizzle': specifier: ^1.1.0 version: 1.1.0(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(lucia@3.2.2) - '@mattrax/api': - specifier: workspace:* - version: link:../api '@mattrax/configuration-schemas': specifier: workspace:* version: link:../../packages/configuration-schemas @@ -241,6 +144,9 @@ importers: '@mattrax/ms-graph': specifier: workspace:* version: link:../../packages/ms-graph + '@mattrax/ms-mde': + specifier: workspace:* + version: link:../../packages/ms-mde '@mattrax/mysql-planetscale': specifier: workspace:* version: link:../../packages/mysql-planetscale @@ -276,7 +182,7 @@ importers: version: 8.3.4 '@solid-mediakit/trpc': specifier: ^3.0.3 - version: 3.0.3(@solidjs/router@0.14.10(solid-js@1.9.2))(@solidjs/start@1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)))(@tanstack/solid-query@5.59.13(solid-js@1.9.2))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) + version: 3.0.3(pi6l3uets2ryebxnhjnpytgqce) '@solid-primitives/autofocus': specifier: ^0.0.111 version: 0.0.111(solid-js@1.9.2) @@ -321,7 +227,7 @@ importers: version: 0.14.10(solid-js@1.9.2) '@solidjs/start': specifier: 1.0.9 - version: 1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + version: 1.0.9(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) '@t3-oss/env-core': specifier: ^0.11.1 version: 0.11.1(typescript@5.6.3)(zod@3.23.8) @@ -382,9 +288,6 @@ importers: h3: specifier: ^1.13.0 version: 1.13.0 - hono: - specifier: ^4.6.5 - version: 4.6.5 jose: specifier: ^5.9.6 version: 5.9.6 @@ -450,7 +353,7 @@ importers: version: 5.5.0 vinxi: specifier: 0.4.3 - version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) xml2js: specifier: ^0.6.2 version: 0.6.2 @@ -470,6 +373,9 @@ importers: '@tailwindcss/forms': specifier: ^0.5.9 version: 0.5.9(tailwindcss@3.4.14) + '@types/node-forge': + specifier: ^1.3.11 + version: 1.3.11 '@types/prismjs': specifier: ^1.26.4 version: 1.26.4 @@ -657,7 +563,7 @@ importers: dependencies: '@solid-mediakit/trpc': specifier: ^3.0.3 - version: 3.0.3(@solidjs/router@0.14.10(solid-js@1.9.2))(@solidjs/start@1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)))(@tanstack/solid-query@5.59.13(solid-js@1.9.2))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) + version: 3.0.3(pi6l3uets2ryebxnhjnpytgqce) '@solidjs/router': specifier: 0.14.10 version: 0.14.10(solid-js@1.9.2) @@ -670,6 +576,9 @@ importers: '@trpc/server': specifier: ^10.45.2 version: 10.45.2 + '@vercel/functions': + specifier: ^1.4.2 + version: 1.4.2 seroval: specifier: ^1.1.1 version: 1.1.1 @@ -678,7 +587,7 @@ importers: version: 1.9.2 vinxi: specifier: '*' - version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + version: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) packages/ui: dependencies: @@ -774,24 +683,10 @@ packages: resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.7': - resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} - engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.7': resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.25.7': - resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - - '@babel/helper-member-expression-to-functions@7.25.7': - resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} - engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.18.6': resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} @@ -806,28 +701,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.25.7': - resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} - engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.25.7': resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} engines: {node: '>=6.9.0'} - '@babel/helper-replace-supers@7.25.7': - resolution: {integrity: sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.25.7': resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': - resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.7': resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} @@ -870,28 +751,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.25.7': - resolution: {integrity: sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-typescript@7.25.7': - resolution: {integrity: sha512-VKlgy2vBzj8AmEzunocMun2fF06bsSWV+FvVXohtL6FGve/+L217qhHxRTVGHEDO/YR8IANcjzgJsd04J8ge5Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/preset-typescript@7.25.7': - resolution: {integrity: sha512-rkkpaXJZOFN45Fb+Gki0c+KMIglk4+zZXOoMJuyEK8y8Kkc8Jd3BDmP7qPsz0zQMJj+UD7EprF+AqAXcILnexw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/runtime@7.25.7': resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} engines: {node: '>=6.9.0'} + '@babel/standalone@7.25.9': + resolution: {integrity: sha512-j37QF9mpPAneLBp9xX9FU8O9mWbuKvGbjDvjWtg4vu++08210X7FQNq+3df7MkeI1g56XFWsEqyN0byzuSe3dA==} + engines: {node: '>=6.9.0'} + '@babel/template@7.25.7': resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} engines: {node: '>=6.9.0'} @@ -1052,18 +919,9 @@ packages: '@emnapi/core@0.45.0': resolution: {integrity: sha512-DPWjcUDQkCeEM4VnljEOEcXdAD7pp8zSZsgOujk/LGIwCXWbXJngin+MO4zbH429lzeC3WbYLGjE2MaUOwzpyw==} - '@emnapi/core@1.3.1': - resolution: {integrity: sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==} - '@emnapi/runtime@0.45.0': resolution: {integrity: sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==} - '@emnapi/runtime@1.3.1': - resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} - - '@emnapi/wasi-threads@1.0.1': - resolution: {integrity: sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==} - '@esbuild-kit/core-utils@3.3.2': resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} deprecated: 'Merged into tsx: https://tsx.is' @@ -2273,9 +2131,6 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@kamilkisiela/fast-url-parser@1.1.4': - resolution: {integrity: sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==} - '@kobalte/core@0.12.6': resolution: {integrity: sha512-+Ta2o2wEqZ2fCqLMkvjT40VHNmcFKdGe8TNDVQbbMPk66qoU6g/DDRFR/Ib7eAjb+C95VoIyk6zaafos2VOo0w==} peerDependencies: @@ -2312,14 +2167,6 @@ packages: resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true - '@mattrax/mysql-planetscale@0.0.3': - resolution: {integrity: sha512-A6M1qF1RxlwAWLY7ETKH/t3yaH6FVHlr5YkYfjNPMKL+c7T9HDtYyI05/0j7HeEwTOtsltedRVLl7yAQSHSU7Q==} - - '@microlabs/otel-cf-workers@1.0.0-rc.48': - resolution: {integrity: sha512-fSxXVfeIlnF8+BGMbmWy5Sngl4IH2993/sHdY8pRXOYrUBKbRDieTBg1zEiIpZoM81UuIAOy46eqJS5NP+2Fpw==} - peerDependencies: - '@opentelemetry/api': ~1.9.0 - '@microsoft/microsoft-graph-client@3.0.7': resolution: {integrity: sha512-/AazAV/F+HK4LIywF9C+NYHcJo038zEnWkteilcxC1FM/uK/4NVGDKGrxx7nNq1ybspAroRKT4I1FHfxQzxkUw==} engines: {node: '>=12.0.0'} @@ -2341,9 +2188,6 @@ packages: '@microsoft/microsoft-graph-types@2.40.0': resolution: {integrity: sha512-1fcPVrB/NkbNcGNfCy+Cgnvwxt6/sbIEEFgZHFBJ670zYLegENYJF8qMo7x3LqBjWX2/Eneq5BVVRCLTmlJN+g==} - '@napi-rs/wasm-runtime@0.2.4': - resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} - '@netlify/functions@2.8.2': resolution: {integrity: sha512-DeoAQh8LuNPvBE4qsKlezjKj0PyXDryOFJfJKo3Z1qZLKzQ21sT314KQKPVjfvw6knqijj+IO+0kHXy/TJiqNA==} engines: {node: '>=14.0.0'} @@ -2663,129 +2507,13 @@ packages: '@nothing-but/utils@0.12.1': resolution: {integrity: sha512-1qZU1Q5El0IjE7JT/ucvJNzdr2hL3W8Rm27xNf1p6gb3Nw8pGnZmxp6/GEW9h+I1k1cICxXNq25hBwknTQ7yhg==} - '@nx/nx-darwin-arm64@20.0.3': - resolution: {integrity: sha512-/wjxSuQZOHwDopNAfuh2BTsaDtDECjTDrKHJdTknrSVjdsB2b1hwSdL7Ct0PXBiSnf+0gfYBR2fuPmLZYb3AXA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@nx/nx-darwin-x64@20.0.3': - resolution: {integrity: sha512-Gobgkvsx61P5TI0uuDQTI/D2AXJt3xnBuAWQ4V/NW/OpkvL8j/q8zk81uK0tumVvIc4p5kSlGmQ46/ytSrdqvg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@nx/nx-freebsd-x64@20.0.3': - resolution: {integrity: sha512-nbYp89BP0z0DzuaUH/yVVhCbL96vUUaKmCVmmdlvQRgiaX89BChAMuEdLNSeaDHFrhgTYB87ku3Ok6DRCAIOcg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - - '@nx/nx-linux-arm-gnueabihf@20.0.3': - resolution: {integrity: sha512-eKIYJPvXO/N1FjteZHC4DLV0u+2h70RmrDQODPztfl3mI5AjCwFdLf9RPN1D+SuNdfK1WwZIszY+FiVxrpK19A==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - - '@nx/nx-linux-arm64-gnu@20.0.3': - resolution: {integrity: sha512-CDFy2WNsMZvxshtGdFV/yCux1XkLtcqh0FiitNvGdgNugXXp3CLVEUx6dI3VBuIBNGbfozdr7n+fuXN6F2S4MQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@nx/nx-linux-arm64-musl@20.0.3': - resolution: {integrity: sha512-BGrSRNPuDyj0yeP2MyzF1MMij1KO4Q/2YSgBbYzVSc8JdrUqf+3rqI8VXNTr3FcAKMTPgFjkFZ3XD3s/62gsdg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@nx/nx-linux-x64-gnu@20.0.3': - resolution: {integrity: sha512-xGGjQ8q5XuF0/432APvAi/OSMdR3LZ1yQ9hYh+JGvM5wh44I3UbgBXRCJlsHp+t2hdlilF6kpaeMSiP1Z9CEbg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@nx/nx-linux-x64-musl@20.0.3': - resolution: {integrity: sha512-fTmZNbq3QQF5BLGPB8PGuFuNo3s2F86IQDOUYWpjXiuKjoI1Y5yM14RQpHLwYOGnUNoKYOhlv/JAyFrDX6ALZA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@nx/nx-win32-arm64-msvc@20.0.3': - resolution: {integrity: sha512-hdtfg9pIzhtLqqGvsTemQYwe+kqqL1JGNgrlf3V59HSbbAADYZbHnliujoRybJo7dpeS/DDTNMNeblg99tFQLA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@nx/nx-win32-x64-msvc@20.0.3': - resolution: {integrity: sha512-HcqE8AlWuwcsIOj0OnKDQ3q7L0RZsOrBRhDRKbJeUnIFz/t2R3q8Y6trrqTyFAafgW6JNLBp+tgcUyfHPUy/eQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@one-ini/wasm@0.1.1': resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} - '@opentelemetry/api-logs@0.53.0': - resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==} - engines: {node: '>=14'} - '@opentelemetry/api@1.9.0': resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} - '@opentelemetry/core@1.26.0': - resolution: {integrity: sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/exporter-trace-otlp-http@0.53.0': - resolution: {integrity: sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': ^1.0.0 - - '@opentelemetry/otlp-exporter-base@0.53.0': - resolution: {integrity: sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': ^1.0.0 - - '@opentelemetry/otlp-transformer@0.53.0': - resolution: {integrity: sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': ^1.3.0 - - '@opentelemetry/resources@1.26.0': - resolution: {integrity: sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/sdk-logs@0.53.0': - resolution: {integrity: sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.4.0 <1.10.0' - - '@opentelemetry/sdk-metrics@1.26.0': - resolution: {integrity: sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - - '@opentelemetry/sdk-trace-base@1.26.0': - resolution: {integrity: sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/semantic-conventions@1.27.0': - resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} - engines: {node: '>=14'} - '@oslojs/asn1@1.0.0': resolution: {integrity: sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA==} @@ -2912,36 +2640,6 @@ packages: resolution: {integrity: sha512-Tv4jcFUFAFjOWrGSio49H6R2ijALv0ZzVBfJKIdm+kl9X046Fh4LLawrF9OMsglVbK6ukqMJsUCeucGAFTBcMA==} engines: {node: '>=16'} - '@protobufjs/aspromise@1.1.2': - resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} - - '@protobufjs/base64@1.1.2': - resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} - - '@protobufjs/codegen@2.0.4': - resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} - - '@protobufjs/eventemitter@1.1.0': - resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} - - '@protobufjs/fetch@1.1.0': - resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} - - '@protobufjs/float@1.0.2': - resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} - - '@protobufjs/inquire@1.1.0': - resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} - - '@protobufjs/path@1.1.2': - resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} - - '@protobufjs/pool@1.1.0': - resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} - - '@protobufjs/utf8@1.1.0': - resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - '@radix-ui/number@1.1.0': resolution: {integrity: sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==} @@ -3550,6 +3248,16 @@ packages: peerDependencies: react: ^18.0 || ^19.0 || ^19.0.0-rc + '@redocly/ajv@8.11.2': + resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} + + '@redocly/config@0.12.1': + resolution: {integrity: sha512-RW3rSirfsPdr0uvATijRDU3f55SuZV3m7/ppdTDvGw4IB0cmeZRkFmqTrchxMqWP50Gfg1tpHnjdxUCNo0E2qg==} + + '@redocly/openapi-core@1.25.8': + resolution: {integrity: sha512-eKKRqo2RYo7UIoDvIgcUB9ynhOjIWJnILXFz+VDevYeOBKd/CxvC0KbNRnuOrFqG3ip6363R/ONal2MyvuVrjg==} + engines: {node: '>=14.19.0', npm: '>=7.0.0'} + '@rollup/plugin-alias@5.1.1': resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} engines: {node: '>=14.0.0'} @@ -3559,9 +3267,9 @@ packages: rollup: optional: true - '@rollup/plugin-commonjs@25.0.8': - resolution: {integrity: sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==} - engines: {node: '>=14.0.0'} + '@rollup/plugin-commonjs@28.0.1': + resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: rollup: ^2.68.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -3595,8 +3303,8 @@ packages: rollup: optional: true - '@rollup/plugin-replace@5.0.7': - resolution: {integrity: sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==} + '@rollup/plugin-replace@6.0.1': + resolution: {integrity: sha512-2sPh9b73dj5IxuMmDAsQWVFT7mR+yoHweBaXG2W/R8vQ+IWZlnaI7BR7J6EguVQUp1hd8Z7XuozpDjEKQAAC2Q==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -3946,75 +3654,6 @@ packages: '@solidjs/start@1.0.9': resolution: {integrity: sha512-dZ1b4Oa5gXk95eVxHAj/W+sQIY3yevYeerrxKNWPqwTyzZYvwUwpnU7Ph3sMduo5LnL/USQ66AloLTs2FX94ZA==} - '@swc/core-darwin-arm64@1.7.26': - resolution: {integrity: sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - - '@swc/core-darwin-x64@1.7.26': - resolution: {integrity: sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - - '@swc/core-linux-arm-gnueabihf@1.7.26': - resolution: {integrity: sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - - '@swc/core-linux-arm64-gnu@1.7.26': - resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-arm64-musl@1.7.26': - resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - - '@swc/core-linux-x64-gnu@1.7.26': - resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-linux-x64-musl@1.7.26': - resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - - '@swc/core-win32-arm64-msvc@1.7.26': - resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - - '@swc/core-win32-ia32-msvc@1.7.26': - resolution: {integrity: sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - - '@swc/core-win32-x64-msvc@1.7.26': - resolution: {integrity: sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - - '@swc/core@1.7.26': - resolution: {integrity: sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==} - engines: {node: '>=10'} - peerDependencies: - '@swc/helpers': '*' - peerDependenciesMeta: - '@swc/helpers': - optional: true - '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} @@ -4024,9 +3663,6 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@swc/types@0.1.12': - resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} - '@t3-oss/env-core@0.11.1': resolution: {integrity: sha512-MaxOwEoG1ntCFoKJsS7nqwgcxLW1SJw238AJwfJeaz3P/8GtkxXZsPPolsz1AdYvUTbe3XvqZ/VCdfjt+3zmKw==} peerDependencies: @@ -4112,9 +3748,6 @@ packages: '@tybys/wasm-util@0.8.3': resolution: {integrity: sha512-Z96T/L6dUFFxgFJ+pQtkPpne9q7i6kIPYCFnQBHSgSPV9idTsKfIhCss0h5iM9irweZCatkrdeP8yi5uM1eX6Q==} - '@tybys/wasm-util@0.9.0': - resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} - '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -4199,8 +3832,17 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vercel/nft@0.26.5': - resolution: {integrity: sha512-NHxohEqad6Ra/r4lGknO52uc/GrWILXAMs1BB4401GTqww0fw1bAqzpG1XHuDO+dprg4GvsD9ZLLSsdo78p9hQ==} + '@vercel/functions@1.4.2': + resolution: {integrity: sha512-WLY3g6NT1SVJDAoAqz5pJfJ8uyOmEejZkatZn0q57Dn6qXNrh/pjbeffolQy9npWRYJPcfwjgqw8tUqolTEyuw==} + engines: {node: '>= 16'} + peerDependencies: + '@aws-sdk/credential-provider-web-identity': '*' + peerDependenciesMeta: + '@aws-sdk/credential-provider-web-identity': + optional: true + + '@vercel/nft@0.27.5': + resolution: {integrity: sha512-b2A7M+4yMHdWKY7xCC+kBEcnMrpaSE84CnuauTjhKKoCEeej0byJMAB8h/RBVnw/HdZOAFVcxR0Izr3LL24FwA==} engines: {node: '>=16'} hasBin: true @@ -4253,33 +3895,10 @@ packages: '@vitest/utils@2.1.3': resolution: {integrity: sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==} - '@whatwg-node/fetch@0.9.22': - resolution: {integrity: sha512-+RIBffgoaRlWV9cKV6wAX71sbeoU2APOI3G13ZRMkabYHwkvDMeZDTyxJcsMXA5CpieJ7NFXF9Xyu72jwvdzqA==} - engines: {node: '>=18.0.0'} - - '@whatwg-node/node-fetch@0.5.27': - resolution: {integrity: sha512-0OaMj5W4fzWimRSFq07qFiWfquaUMNB+695GwE76LYKVuah+jwCdzSgsIOtwPkiyJ35w0XGhXmJPiIJCdLwopg==} - engines: {node: '>=18.0.0'} - - '@whatwg-node/server@0.9.50': - resolution: {integrity: sha512-7Vd8k6iu+ps8bkZT+Y/wPm42EDh8KojAL+APKa79mntgkyPtdq0r1//CO+0eYqQBz6HGrDxHRT4KChSOy4jGIw==} - engines: {node: '>=18.0.0'} - '@xmldom/xmldom@0.8.10': resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} engines: {node: '>=10.0.0'} - '@yarnpkg/lockfile@1.1.0': - resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} - - '@yarnpkg/parsers@3.0.0-rc.46': - resolution: {integrity: sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==} - engines: {node: '>=14.15.0'} - - '@zkochan/js-yaml@0.0.7': - resolution: {integrity: sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==} - hasBin: true - abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -4440,9 +4059,6 @@ packages: aws4fetch@1.0.20: resolution: {integrity: sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g==} - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} - b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} @@ -4528,10 +4144,10 @@ packages: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} - c12@1.11.2: - resolution: {integrity: sha512-oBs8a4uvSDO9dm8b7OCFW7+dgtVrwmwnrVXYzLm43ta7ep2jCn/0MhoUFygIWtxhyy6+/MG7/agvpY0U1Iemew==} + c12@2.0.1: + resolution: {integrity: sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==} peerDependencies: - magicast: ^0.3.4 + magicast: ^0.3.5 peerDependenciesMeta: magicast: optional: true @@ -4584,6 +4200,9 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -4608,6 +4227,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -4630,10 +4253,6 @@ packages: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} - cli-spinners@2.6.1: - resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} - engines: {node: '>=6'} - cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} @@ -4696,6 +4315,9 @@ packages: resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} hasBin: true + colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -4728,6 +4350,9 @@ packages: commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compatx@0.1.8: + resolution: {integrity: sha512-jcbsEAR81Bt5s1qOFymBufmCbXCXbk0Ql+K5ouj6gCyx2yHlu6AgmGIi9HxfKixpUDO5bCFJUHQ5uM6ecbTebw==} + compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} @@ -4843,19 +4468,25 @@ packages: dax-sh@0.39.2: resolution: {integrity: sha512-gpuGEkBQM+5y6p4cWaw9+ePy5TNon+fdwFVtTI8leU3UhwhsBfPewRxMXGuQNC+M2b/MDGMlfgpqynkcd0C3FQ==} - db0@0.1.4: - resolution: {integrity: sha512-Ft6eCwONYxlwLjBXSJxw0t0RYtA5gW9mq8JfBXn9TtC0nDPlqePAhpv9v4g9aONBi6JI1OXHTKKkUYGd+BOrCA==} + db0@0.2.1: + resolution: {integrity: sha512-BWSFmLaCkfyqbSEZBQINMVNjCVfrogi7GQ2RSy1tmtfK9OXlsup6lUMwLsqSD7FbAjD04eWFdXowSHHUp6SE/Q==} peerDependencies: - '@libsql/client': ^0.5.2 - better-sqlite3: ^9.4.3 - drizzle-orm: ^0.29.4 + '@electric-sql/pglite': '*' + '@libsql/client': '*' + better-sqlite3: '*' + drizzle-orm: '*' + mysql2: '*' peerDependenciesMeta: + '@electric-sql/pglite': + optional: true '@libsql/client': optional: true better-sqlite3: optional: true drizzle-orm: optional: true + mysql2: + optional: true debounce@2.0.0: resolution: {integrity: sha512-xRetU6gL1VJbs85Mc4FoEGSjQxzpdxRyFhe3lmWFyy2EzydIcD4xzUvRJMD+NPDfMwKNhxa3PvsIOU32luIWeA==} @@ -4986,13 +4617,9 @@ packages: dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - dot-prop@8.0.2: - resolution: {integrity: sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==} - engines: {node: '>=16'} - - dotenv-expand@11.0.6: - resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} - engines: {node: '>=12'} + dot-prop@9.0.0: + resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==} + engines: {node: '>=18'} dotenv-expand@8.0.3: resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==} @@ -5134,9 +4761,6 @@ packages: encoding@0.1.13: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} - end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - engine.io-parser@5.2.3: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} engines: {node: '>=10.0.0'} @@ -5145,10 +4769,6 @@ packages: resolution: {integrity: sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==} engines: {node: '>=10.2.0'} - enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - entities@2.2.0: resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} @@ -5170,12 +4790,6 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} - esbuild-plugin-solid@0.6.0: - resolution: {integrity: sha512-V1FvDALwLDX6K0XNYM9CMRAnMzA0+Ecu55qBUT9q/eAJh1KIDsTMFoOzMSgyHqbOfvrVfO3Mws3z7TW2GVnIZA==} - peerDependencies: - esbuild: '>=0.20' - solid-js: '>= 1.0' - esbuild-register@3.6.0: resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} peerDependencies: @@ -5294,12 +4908,12 @@ packages: resolution: {integrity: sha512-YEboHE5VfopUclOck7LncgIqskAqnv4q0EWbYCaxKKjAvO93c+TJIaBuGy8CBFdbg9nKdpN3AuPRwVBJ4k7NrQ==} engines: {node: '>=18'} - fast-decode-uri-component@1.0.1: - resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} - fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} @@ -5307,9 +4921,6 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} - fast-querystring@1.1.2: - resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} - fast-xml-parser@4.5.0: resolution: {integrity: sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==} hasBin: true @@ -5325,10 +4936,6 @@ packages: picomatch: optional: true - figures@3.2.0: - resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} - engines: {node: '>=8'} - file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -5339,10 +4946,6 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - flexsearch@0.7.21: resolution: {integrity: sha512-W7cHV7Hrwjid6lWmy0IhsWDFQboWSng25U3VVywpHOTJnnAZNPScog67G+cVpeX9f7yDD21ih0WDrMMT+JoaYg==} @@ -5370,12 +4973,6 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - front-matter@4.0.2: - resolution: {integrity: sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==} - - fs-constants@1.0.0: - resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} - fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -5484,11 +5081,6 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported - globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -5514,6 +5106,9 @@ packages: resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + h3-nightly@1.13.1-20241013-011028-3bf8af0: + resolution: {integrity: sha512-4kygQHpL1MqsabGd2IRpZ1nGUWw6xXpNq4u6ier2ydZr/Hs6/oQlR5fm9WNIhBYaO5sS5ati+UVwsFg+q5JFeg==} + h3@1.11.1: resolution: {integrity: sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A==} @@ -5661,6 +5256,10 @@ packages: engines: {node: '>=16.x'} hasBin: true + index-to-position@0.1.2: + resolution: {integrity: sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==} + engines: {node: '>=18'} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -5844,6 +5443,10 @@ packages: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} + js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5872,14 +5475,14 @@ packages: engines: {node: '>=6'} hasBin: true + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true - jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -5915,10 +5518,6 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lines-and-columns@2.0.3: - resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - listhen@1.9.0: resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} hasBin: true @@ -5936,6 +5535,9 @@ packages: lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} @@ -6000,6 +5602,9 @@ packages: magicast@0.2.11: resolution: {integrity: sha512-6saXbRDA1HMkqbsvHOU6HBjCVgZT460qheRkLhJQHWAbhXoWESI3Kn/dGGXyKs15FFKR85jsUqFx2sMK0wy/5g==} + magicast@0.3.5: + resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -6247,17 +5852,10 @@ packages: resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} - engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -6362,8 +5960,8 @@ packages: sass: optional: true - nitropack@2.9.7: - resolution: {integrity: sha512-aKXvtNrWkOCMsQbsk4A0qQdBjrJ1ZcvwlTQevI/LAgLWLYc5L7Q/YiYxGLal4ITyNSlzir1Cm1D2ZxnYhmpMEw==} + nitropack-nightly@2.10.0-20241021-025328.14b4891f: + resolution: {integrity: sha512-Lx830D5om3ixfHFx657HgSjajsBybTVZisTZuFsC7BWnuYCzePFvwQtJU3kUuu0VjwidntH1sta+XBJ1QbU4Kg==} engines: {node: ^16.11.0 || >=17.0.0} hasBin: true peerDependencies: @@ -6401,9 +5999,6 @@ packages: node-html-parser@5.4.2: resolution: {integrity: sha512-RaBPP3+51hPne/OolXxcz89iYvQvKOydaqoePpOgXcrOKZhjVIzmpKZz+Hd/RBO2/zN2q6CNJhQzucVz+u3Jyw==} - node-machine-id@1.1.12: - resolution: {integrity: sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==} - node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} @@ -6425,10 +6020,6 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} - npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} - npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6447,18 +6038,6 @@ packages: nwsapi@2.2.13: resolution: {integrity: sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==} - nx@20.0.3: - resolution: {integrity: sha512-6ZuZ09IdMIwbklKqEwUAHspuVMsDr7TIcCyeytmdDC1XbA+Tbb93wriyJyiI9EBQw4StrlJF9vSXAZsuDiOKeA==} - hasBin: true - peerDependencies: - '@swc-node/register': ^1.8.0 - '@swc/core': ^1.3.85 - peerDependenciesMeta: - '@swc-node/register': - optional: true - '@swc/core': - optional: true - nypm@0.3.12: resolution: {integrity: sha512-D3pzNDWIvgA+7IORhD/IuWzEk4uXv6GsgOxiid4UU3h9oq5IqV1KtPDi63n4sZJ/xcWlr88c0QM2RgN5VbOhFA==} engines: {node: ^14.16.0 || >=16.10.0} @@ -6512,17 +6091,15 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - openapi-typescript@6.7.6: - resolution: {integrity: sha512-c/hfooPx+RBIOPM09GSxABOZhYPblDoyaGhqBkD/59vtpN21jEuWKDlM0KYTvqJVlSYjKs0tBcIdeXKChlSPtw==} + openapi-typescript@7.4.1: + resolution: {integrity: sha512-HrRoWveViADezHCNgQqZmPKmQ74q7nuH/yg9ursFucZaYQNUqsX38fE/V2sKBHVM+pws4tAHpuh/ext2UJ/AoQ==} hasBin: true + peerDependencies: + typescript: ^5.x openid-client@5.6.4: resolution: {integrity: sha512-T1h3B10BRPKfcObdBklX639tVz+xh34O7GjofqrqiAQdm7eHsQ00ih18x6wuJ/E6FxdtS2u3FmUGPDeEcMwzNA==} - ora@5.3.0: - resolution: {integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==} - engines: {node: '>=10'} - ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -6546,6 +6123,10 @@ packages: parse-entities@4.0.1: resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} + parse-json@8.1.0: + resolution: {integrity: sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==} + engines: {node: '>=18'} + parse5@7.2.0: resolution: {integrity: sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==} @@ -6768,13 +6349,6 @@ packages: proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - protobufjs@7.4.0: - resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} - engines: {node: '>=12.0.0'} - - proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -6899,6 +6473,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + recast@0.23.9: resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==} engines: {node: '>= 4'} @@ -6949,6 +6527,10 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -7224,68 +6806,31 @@ packages: resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} engines: {node: '>= 0.6'} - sst-darwin-arm64@3.1.49: - resolution: {integrity: sha512-R9NKAzFXnQwyoc9OAV6sAEWQ5WhwOTt6u69q1+DS4sVdkUe0kK4LHkd1k5LAZy9rb5cGiKUFshKXGMQzC2kBJQ==} - cpu: [arm64] - os: [darwin] - sst-darwin-arm64@3.2.38: resolution: {integrity: sha512-NaGT9JWwOznJ1jZkN77Izo9CknXI6Ffgjn1UuSWlt8sleDvUMCiH27zTq7NKb2AIEmbM8APWGWt7ZHSUuQX3RA==} cpu: [arm64] os: [darwin] - sst-darwin-x64@3.1.49: - resolution: {integrity: sha512-bFhBCVeiYrDxmG7WhsUeoG6R+Jae/O9gNP992/0lmfYySIoAN5gHCJMog2LwekDv0NLGwJhY77td6fSuEVdzXw==} - cpu: [x64] - os: [darwin] - sst-darwin-x64@3.2.38: resolution: {integrity: sha512-BFnZOLVnBUSutu61ggP0Pa09YLPBhBEVxq/fC5FKxMBKPxyiV55Zbc3qkNc/b9esTbXz4P8Hz2hicG0FrcOczQ==} cpu: [x64] os: [darwin] - sst-linux-arm64@3.1.49: - resolution: {integrity: sha512-AeNarbV05u5IXrtuuhPl/5jusKTdYn3jpdhH7zkZw+VQrNc4lxQGJ2t90jMqtf/oygVxXM5hKzHaQq8Umhh0AQ==} - cpu: [arm64] - os: [linux] - sst-linux-arm64@3.2.38: resolution: {integrity: sha512-gRsvxFzU7CdcUe57rsoySonNViDEUV/5kUEnpiVgKLLn3YMXENHt6Ec1Wzap9XUDOUvWQasl9nz6J079lE2cgg==} cpu: [arm64] os: [linux] - sst-linux-x64@3.1.49: - resolution: {integrity: sha512-TPFboRfU0dnq5gSJ8fMMdM/nzlc4m0wY/FxEyoMhV+mR3zbjSfJtMgAQJpUjXIyhH4fsxZzC7wZWMa2nA5GTbw==} - cpu: [x64] - os: [linux] - sst-linux-x64@3.2.38: resolution: {integrity: sha512-v25Hi/hN69tkiHPuB7Aha3WPExYFpHhLDLNzhdUS1xjHq9eOuClst08kTTX/LYc5sDAKe0CE0iD2q9PJD+clVQ==} cpu: [x64] os: [linux] - sst-linux-x86@3.1.49: - resolution: {integrity: sha512-CZ3CmLxUK91umWIw9dtZpegAms0EibqspB8nncrbzeUTHHx2o3RpXGR7/giQSYQdXdwNC75wxOUEk6/4E2Alzw==} - cpu: [x86] - os: [linux] - sst-linux-x86@3.2.38: resolution: {integrity: sha512-C8Qug9l83TjH7jDzenut3B8A5AMWqPd86fvbUEjtDhahMLnXvcKgfDFU3rFFSYaB6S5gARUdGO/MsZIKGsFFDg==} cpu: [x86] os: [linux] - sst@3.1.49: - resolution: {integrity: sha512-iwxgceCGzqzBThh6SgvigT6FoFH/Y+WVIGH/WbaVvB09+JvFZbuMbP2JU/PjxTBcupEN2KC9/cv7OJo4LDeTnw==} - hasBin: true - peerDependencies: - hono: 4.x - valibot: 0.30.x - peerDependenciesMeta: - hono: - optional: true - valibot: - optional: true - sst@3.2.38: resolution: {integrity: sha512-tJhKb9y2+k2H5ojVIR201eRjZtnrEcShjTPj3vA63b0kMPTrA6a4bKzgVM11J4xVEjrgcuQ5NhrrRj48lX6iUg==} hasBin: true @@ -7360,10 +6905,6 @@ packages: resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} engines: {node: '>=0.10.0'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} @@ -7447,10 +6988,6 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - tar-stream@2.2.0: - resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} - engines: {node: '>=6'} - tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} @@ -7504,17 +7041,13 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - tldts-core@6.1.52: - resolution: {integrity: sha512-j4OxQI5rc1Ve/4m/9o2WhWSC4jGc4uVbCINdOEJRAraCi0YqTqgMcxUx7DbmuP0G3PCixoof/RZB0Q5Kh9tagw==} + tldts-core@6.1.54: + resolution: {integrity: sha512-5cc42+0G0EjYRDfIJHKraaT3I5kPm7j6or3Zh1T9sF+Ftj1T+isT4thicUyQQ1bwN7/xjHQIuY2fXCoXP8Haqg==} - tldts@6.1.52: - resolution: {integrity: sha512-fgrDJXDjbAverY6XnIt0lNfv8A0cf7maTEaZxNykLGsLG7XP+5xhjBTrt/ieAsFjAlZ+G5nmXomLcZDkxXnDzw==} + tldts@6.1.54: + resolution: {integrity: sha512-rDaL1t59gb/Lg0HPMUGdV1vAKLQcXwU74D26aMaYV4QW7mnMvShd1Vmkg3HYAPWx2JCTUmsrXt/Yl9eJ5UFBQw==} hasBin: true - tmp@0.2.3: - resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} - engines: {node: '>=14.14'} - to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -7560,10 +7093,6 @@ packages: typescript: optional: true - tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} - tslib@2.8.0: resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} @@ -7576,9 +7105,9 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} - type-fest@3.13.1: - resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} - engines: {node: '>=14.16'} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + engines: {node: '>=16'} typescript@5.6.3: resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} @@ -7731,6 +7260,10 @@ packages: resolution: {integrity: sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==} hasBin: true + untyped@1.5.1: + resolution: {integrity: sha512-reBOnkJBFfBZ8pCKaeHgfZLcehXtM6UTxc+vqs1JvCps0c4amLNp3fhdGBZwYp+VLyoY9n3X5KOP7lCyWBUX9A==} + hasBin: true + unwasm@0.3.9: resolution: {integrity: sha512-LDxTx/2DkFURUd+BU1vUsF/moj0JsoTvl+2tcg2AUOiEzVturhGGx17/IMgGvKUYdZwr33EJHtChCJuhu9Ouvg==} @@ -7743,8 +7276,8 @@ packages: uqr@0.1.2: resolution: {integrity: sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==} - urlpattern-polyfill@10.0.0: - resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} + uri-js-replace@1.0.1: + resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} urlpattern-polyfill@8.0.2: resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} @@ -8044,6 +7577,9 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + yaml@2.6.0: resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} engines: {node: '>= 14'} @@ -8110,7 +7646,7 @@ snapshots: '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -8130,7 +7666,7 @@ snapshots: '@babel/traverse': 7.25.7 '@babel/types': 7.25.8 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -8144,10 +7680,6 @@ snapshots: '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.25.7': - dependencies: - '@babel/types': 7.25.8 - '@babel/helper-compilation-targets@7.25.7': dependencies: '@babel/compat-data': 7.25.8 @@ -8156,26 +7688,6 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - '@babel/helper-member-expression-to-functions@7.25.7': - dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - '@babel/helper-module-imports@7.18.6': dependencies: '@babel/types': 7.25.8 @@ -8207,21 +7719,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-optimise-call-expression@7.25.7': - dependencies: - '@babel/types': 7.25.8 - '@babel/helper-plugin-utils@7.25.7': {} - '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7 - transitivePeerDependencies: - - supports-color - '@babel/helper-simple-access@7.25.7': dependencies: '@babel/traverse': 7.25.7 @@ -8229,13 +7728,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': - dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 - transitivePeerDependencies: - - supports-color - '@babel/helper-string-parser@7.25.7': {} '@babel/helper-validator-identifier@7.25.7': {} @@ -8272,41 +7764,12 @@ snapshots: '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - - '@babel/preset-typescript@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) - transitivePeerDependencies: - - supports-color - '@babel/runtime@7.25.7': dependencies: regenerator-runtime: 0.14.1 + '@babel/standalone@7.25.9': {} + '@babel/template@7.25.7': dependencies: '@babel/code-frame': 7.25.7 @@ -8320,7 +7783,7 @@ snapshots: '@babel/parser': 7.25.8 '@babel/template': 7.25.7 '@babel/types': 7.25.8 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -8390,7 +7853,8 @@ snapshots: mime: 3.0.0 zod: 3.23.8 - '@cloudflare/workers-types@4.20241018.0': {} + '@cloudflare/workers-types@4.20241018.0': + optional: true '@content-collections/core@0.7.2(typescript@5.6.3)': dependencies: @@ -8462,24 +7926,11 @@ snapshots: tslib: 2.8.0 optional: true - '@emnapi/core@1.3.1': - dependencies: - '@emnapi/wasi-threads': 1.0.1 - tslib: 2.8.0 - '@emnapi/runtime@0.45.0': dependencies: tslib: 2.8.0 optional: true - '@emnapi/runtime@1.3.1': - dependencies: - tslib: 2.8.0 - - '@emnapi/wasi-threads@1.0.1': - dependencies: - tslib: 2.8.0 - '@esbuild-kit/core-utils@3.3.2': dependencies: esbuild: 0.18.20 @@ -9098,7 +8549,7 @@ snapshots: '@antfu/install-pkg': 0.4.1 '@antfu/utils': 0.7.10 '@iconify/types': 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.7.2 @@ -9155,8 +8606,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@kamilkisiela/fast-url-parser@1.1.4': {} - '@kobalte/core@0.12.6(solid-js@1.9.2)': dependencies: '@floating-ui/dom': 1.6.11 @@ -9217,22 +8666,6 @@ snapshots: - encoding - supports-color - '@mattrax/mysql-planetscale@0.0.3': - dependencies: - '@planetscale/database': 1.19.0 - mysql2: 3.11.3 - - '@microlabs/otel-cf-workers@1.0.0-rc.48(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@microsoft/microsoft-graph-client@3.0.7': dependencies: '@babel/runtime': 7.25.7 @@ -9240,12 +8673,6 @@ snapshots: '@microsoft/microsoft-graph-types@2.40.0': {} - '@napi-rs/wasm-runtime@0.2.4': - dependencies: - '@emnapi/core': 1.3.1 - '@emnapi/runtime': 1.3.1 - '@tybys/wasm-util': 0.9.0 - '@netlify/functions@2.8.2': dependencies: '@netlify/serverless-functions-api': 1.26.1 @@ -9459,102 +8886,10 @@ snapshots: '@nothing-but/utils@0.12.1': {} - '@nx/nx-darwin-arm64@20.0.3': - optional: true - - '@nx/nx-darwin-x64@20.0.3': - optional: true - - '@nx/nx-freebsd-x64@20.0.3': - optional: true - - '@nx/nx-linux-arm-gnueabihf@20.0.3': - optional: true - - '@nx/nx-linux-arm64-gnu@20.0.3': - optional: true - - '@nx/nx-linux-arm64-musl@20.0.3': - optional: true - - '@nx/nx-linux-x64-gnu@20.0.3': - optional: true - - '@nx/nx-linux-x64-musl@20.0.3': - optional: true - - '@nx/nx-win32-arm64-msvc@20.0.3': - optional: true - - '@nx/nx-win32-x64-msvc@20.0.3': - optional: true - '@one-ini/wasm@0.1.1': {} - '@opentelemetry/api-logs@0.53.0': - dependencies: - '@opentelemetry/api': 1.9.0 - - '@opentelemetry/api@1.9.0': {} - - '@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.27.0 - - '@opentelemetry/exporter-trace-otlp-http@0.53.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) - - '@opentelemetry/otlp-exporter-base@0.53.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) - - '@opentelemetry/otlp-transformer@0.53.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.53.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) - protobufjs: 7.4.0 - - '@opentelemetry/resources@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - - '@opentelemetry/sdk-logs@0.53.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.53.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - - '@opentelemetry/sdk-metrics@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - - '@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - - '@opentelemetry/semantic-conventions@1.27.0': {} + '@opentelemetry/api@1.9.0': + optional: true '@oslojs/asn1@1.0.0': dependencies: @@ -9671,35 +9006,12 @@ snapshots: asn1js: 3.0.5 ipaddr.js: 2.2.0 pvtsutils: 1.3.5 - tslib: 2.8.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@planetscale/database@1.19.0': {} - - '@protobufjs/aspromise@1.1.2': {} - - '@protobufjs/base64@1.1.2': {} - - '@protobufjs/codegen@2.0.4': {} - - '@protobufjs/eventemitter@1.1.0': {} - - '@protobufjs/fetch@1.1.0': - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/inquire': 1.1.0 - - '@protobufjs/float@1.0.2': {} - - '@protobufjs/inquire@1.1.0': {} - - '@protobufjs/path@1.1.2': {} + tslib: 2.8.0 - '@protobufjs/pool@1.1.0': {} + '@pkgjs/parseargs@0.11.0': + optional: true - '@protobufjs/utf8@1.1.0': {} + '@planetscale/database@1.19.0': {} '@radix-ui/number@1.1.0': {} @@ -10274,18 +9586,45 @@ snapshots: dependencies: react: 18.3.1 + '@redocly/ajv@8.11.2': + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js-replace: 1.0.1 + + '@redocly/config@0.12.1': {} + + '@redocly/openapi-core@1.25.8(encoding@0.1.13)(supports-color@9.4.0)': + dependencies: + '@redocly/ajv': 8.11.2 + '@redocly/config': 0.12.1 + colorette: 1.4.0 + https-proxy-agent: 7.0.5(supports-color@9.4.0) + js-levenshtein: 1.1.6 + js-yaml: 4.1.0 + lodash.isequal: 4.5.0 + minimatch: 5.1.6 + node-fetch: 2.7.0(encoding@0.1.13) + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - encoding + - supports-color + '@rollup/plugin-alias@5.1.1(rollup@4.24.0)': optionalDependencies: rollup: 4.24.0 - '@rollup/plugin-commonjs@25.0.8(rollup@4.24.0)': + '@rollup/plugin-commonjs@28.0.1(rollup@4.24.0)': dependencies: '@rollup/pluginutils': 5.1.2(rollup@4.24.0) commondir: 1.0.1 estree-walker: 2.0.2 - glob: 8.1.0 + fdir: 6.4.2(picomatch@4.0.2) is-reference: 1.2.1 magic-string: 0.30.12 + picomatch: 4.0.2 optionalDependencies: rollup: 4.24.0 @@ -10313,7 +9652,7 @@ snapshots: optionalDependencies: rollup: 4.24.0 - '@rollup/plugin-replace@5.0.7(rollup@4.24.0)': + '@rollup/plugin-replace@6.0.1(rollup@4.24.0)': dependencies: '@rollup/pluginutils': 5.1.2(rollup@4.24.0) magic-string: 0.30.12 @@ -10491,15 +9830,15 @@ snapshots: '@solid-primitives/utils': 6.2.3(solid-js@1.9.2) solid-js: 1.9.2 - '@solid-mediakit/trpc@3.0.3(@solidjs/router@0.14.10(solid-js@1.9.2))(@solidjs/start@1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)))(@tanstack/solid-query@5.59.13(solid-js@1.9.2))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))': + '@solid-mediakit/trpc@3.0.3(pi6l3uets2ryebxnhjnpytgqce)': dependencies: '@solidjs/router': 0.14.10(solid-js@1.9.2) - '@solidjs/start': 1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) + '@solidjs/start': 1.0.9(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)) '@tanstack/solid-query': 5.59.13(solid-js@1.9.2) '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/server': 10.45.2 solid-js: 1.9.2 - vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) '@solid-primitives/autofocus@0.0.111(solid-js@1.9.2)': dependencies: @@ -10666,11 +10005,11 @@ snapshots: dependencies: solid-js: 1.9.2 - '@solidjs/start@1.0.9(patch_hash=qyqwxlt4pf7pfndzmkpqvr6gne)(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))': + '@solidjs/start@1.0.9(solid-js@1.9.2)(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0))': dependencies: - '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) - '@vinxi/server-components': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) - '@vinxi/server-functions': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) + '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2)) + '@vinxi/server-components': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2)) + '@vinxi/server-functions': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2)) defu: 6.1.4 error-stack-parser: 2.1.4 html-to-image: 1.11.11 @@ -10689,54 +10028,6 @@ snapshots: - vinxi - vite - '@swc/core-darwin-arm64@1.7.26': - optional: true - - '@swc/core-darwin-x64@1.7.26': - optional: true - - '@swc/core-linux-arm-gnueabihf@1.7.26': - optional: true - - '@swc/core-linux-arm64-gnu@1.7.26': - optional: true - - '@swc/core-linux-arm64-musl@1.7.26': - optional: true - - '@swc/core-linux-x64-gnu@1.7.26': - optional: true - - '@swc/core-linux-x64-musl@1.7.26': - optional: true - - '@swc/core-win32-arm64-msvc@1.7.26': - optional: true - - '@swc/core-win32-ia32-msvc@1.7.26': - optional: true - - '@swc/core-win32-x64-msvc@1.7.26': - optional: true - - '@swc/core@1.7.26(@swc/helpers@0.5.13)': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.12 - optionalDependencies: - '@swc/core-darwin-arm64': 1.7.26 - '@swc/core-darwin-x64': 1.7.26 - '@swc/core-linux-arm-gnueabihf': 1.7.26 - '@swc/core-linux-arm64-gnu': 1.7.26 - '@swc/core-linux-arm64-musl': 1.7.26 - '@swc/core-linux-x64-gnu': 1.7.26 - '@swc/core-linux-x64-musl': 1.7.26 - '@swc/core-win32-arm64-msvc': 1.7.26 - '@swc/core-win32-ia32-msvc': 1.7.26 - '@swc/core-win32-x64-msvc': 1.7.26 - '@swc/helpers': 0.5.13 - optional: true - '@swc/counter@0.1.3': {} '@swc/helpers@0.5.13': @@ -10748,11 +10039,6 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.8.0 - '@swc/types@0.1.12': - dependencies: - '@swc/counter': 0.1.3 - optional: true - '@t3-oss/env-core@0.11.1(typescript@5.6.3)(zod@3.23.8)': dependencies: zod: 3.23.8 @@ -10833,10 +10119,6 @@ snapshots: tslib: 2.8.0 optional: true - '@tybys/wasm-util@0.9.0': - dependencies: - tslib: 2.8.0 - '@types/acorn@4.0.6': dependencies: '@types/estree': 1.0.6 @@ -10934,7 +10216,9 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/nft@0.26.5(encoding@0.1.13)': + '@vercel/functions@1.4.2': {} + + '@vercel/nft@0.27.5(encoding@0.1.13)': dependencies: '@mapbox/node-pre-gyp': 1.0.11(encoding@0.1.13) '@rollup/pluginutils': 4.2.1 @@ -10972,7 +10256,7 @@ snapshots: untun: 0.1.3 uqr: 0.1.2 - '@vinxi/plugin-directives@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))': + '@vinxi/plugin-directives@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))': dependencies: '@babel/parser': 7.25.8 acorn: 8.13.0 @@ -10983,29 +10267,29 @@ snapshots: magicast: 0.2.11 recast: 0.23.9 tslib: 2.8.0 - vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) - '@vinxi/server-components@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))': + '@vinxi/server-components@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))': dependencies: - '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) + '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2)) acorn: 8.13.0 acorn-loose: 8.4.0 acorn-typescript: 1.4.13(acorn@8.13.0) astring: 1.9.0 magicast: 0.2.11 recast: 0.23.9 - vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) - '@vinxi/server-functions@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2))': + '@vinxi/server-functions@0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2))': dependencies: - '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2)) + '@vinxi/plugin-directives': 0.4.3(vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2)) acorn: 8.13.0 acorn-loose: 8.4.0 acorn-typescript: 1.4.13(acorn@8.13.0) astring: 1.9.0 magicast: 0.2.11 recast: 0.23.9 - vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2) + vinxi: 0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) '@vitest/expect@2.1.3': dependencies: @@ -11047,36 +10331,8 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 - '@whatwg-node/fetch@0.9.22': - dependencies: - '@whatwg-node/node-fetch': 0.5.27 - urlpattern-polyfill: 10.0.0 - - '@whatwg-node/node-fetch@0.5.27': - dependencies: - '@kamilkisiela/fast-url-parser': 1.1.4 - busboy: 1.6.0 - fast-querystring: 1.1.2 - tslib: 2.8.0 - - '@whatwg-node/server@0.9.50': - dependencies: - '@whatwg-node/fetch': 0.9.22 - tslib: 2.8.0 - '@xmldom/xmldom@0.8.10': {} - '@yarnpkg/lockfile@1.1.0': {} - - '@yarnpkg/parsers@3.0.0-rc.46': - dependencies: - js-yaml: 3.14.1 - tslib: 2.8.0 - - '@zkochan/js-yaml@0.0.7': - dependencies: - argparse: 2.0.1 - abbrev@1.1.1: {} abbrev@2.0.0: {} @@ -11114,16 +10370,15 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color - agent-base@7.1.1: + agent-base@7.1.1(supports-color@9.4.0): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color - optional: true ansi-align@3.0.1: dependencies: @@ -11215,7 +10470,8 @@ snapshots: async@3.2.6: {} - asynckit@0.4.0: {} + asynckit@0.4.0: + optional: true autoprefixer@10.4.20(postcss@8.4.47): dependencies: @@ -11231,14 +10487,6 @@ snapshots: aws4fetch@1.0.20: {} - axios@1.7.7: - dependencies: - follow-redirects: 1.15.9 - form-data: 4.0.1 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - b4a@1.6.7: {} babel-plugin-jsx-dom-expressions@0.39.2(@babel/core@7.25.8): @@ -11335,20 +10583,22 @@ snapshots: dependencies: streamsearch: 1.1.0 - c12@1.11.2: + c12@2.0.1(magicast@0.3.5): dependencies: - chokidar: 3.6.0 + chokidar: 4.0.1 confbox: 0.1.8 defu: 6.1.4 dotenv: 16.4.5 giget: 1.2.3 - jiti: 1.21.6 + jiti: 2.3.3 mlly: 1.7.2 ohash: 1.1.4 pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.2.1 rc9: 2.1.2 + optionalDependencies: + magicast: 0.3.5 cac@6.7.14: {} @@ -11375,7 +10625,7 @@ snapshots: capnp-ts@0.7.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) tslib: 2.8.0 transitivePeerDependencies: - supports-color @@ -11403,6 +10653,8 @@ snapshots: chalk@5.3.0: {} + change-case@5.4.4: {} + character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -11429,6 +10681,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.1: + dependencies: + readdirp: 4.0.2 + chownr@2.0.0: {} citty@0.1.6: @@ -11449,8 +10705,6 @@ snapshots: dependencies: restore-cursor: 3.1.0 - cli-spinners@2.6.1: {} - cli-spinners@2.9.2: {} client-only@0.0.1: {} @@ -11509,11 +10763,14 @@ snapshots: color-support@1.1.3: {} + colorette@1.4.0: {} + colorette@2.0.20: {} combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 + optional: true comma-separated-tokens@2.0.3: {} @@ -11529,6 +10786,8 @@ snapshots: commondir@1.0.1: {} + compatx@0.1.8: {} + compress-commons@6.0.2: dependencies: crc-32: 1.2.2 @@ -11634,9 +10893,10 @@ snapshots: '@deno/shim-deno': 0.19.2 undici-types: 5.28.4 - db0@0.1.4(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1)): + db0@0.2.1(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(mysql2@3.11.3): optionalDependencies: drizzle-orm: 0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1) + mysql2: 3.11.3 debounce@2.0.0: {} @@ -11644,9 +10904,11 @@ snapshots: dependencies: ms: 2.0.0 - debug@4.3.7: + debug@4.3.7(supports-color@9.4.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 9.4.0 decimal.js@10.4.3: optional: true @@ -11673,7 +10935,8 @@ snapshots: defu@6.1.4: {} - delayed-stream@1.0.0: {} + delayed-stream@1.0.0: + optional: true delegates@1.0.0: {} @@ -11744,13 +11007,9 @@ snapshots: no-case: 3.0.4 tslib: 2.8.0 - dot-prop@8.0.2: + dot-prop@9.0.0: dependencies: - type-fest: 3.13.1 - - dotenv-expand@11.0.6: - dependencies: - dotenv: 16.4.5 + type-fest: 4.26.1 dotenv-expand@8.0.3: {} @@ -11808,10 +11067,6 @@ snapshots: iconv-lite: 0.6.3 optional: true - end-of-stream@1.4.4: - dependencies: - once: 1.4.0 - engine.io-parser@5.2.3: {} engine.io@6.5.5: @@ -11823,7 +11078,7 @@ snapshots: base64id: 2.0.0 cookie: 0.4.2 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io-parser: 5.2.3 ws: 8.17.1 transitivePeerDependencies: @@ -11831,10 +11086,6 @@ snapshots: - supports-color - utf-8-validate - enquirer@2.3.6: - dependencies: - ansi-colors: 4.1.3 - entities@2.2.0: {} entities@4.5.0: {} @@ -11851,19 +11102,9 @@ snapshots: es-module-lexer@1.5.4: {} - esbuild-plugin-solid@0.6.0(esbuild@0.24.0)(solid-js@1.9.2): - dependencies: - '@babel/core': 7.25.8 - '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - babel-preset-solid: 1.9.2(@babel/core@7.25.8) - esbuild: 0.24.0 - solid-js: 1.9.2 - transitivePeerDependencies: - - supports-color - esbuild-register@3.6.0(esbuild@0.19.12): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) esbuild: 0.19.12 transitivePeerDependencies: - supports-color @@ -12133,10 +11374,10 @@ snapshots: fake-indexeddb@6.0.0: {} - fast-decode-uri-component@1.0.1: {} - fast-deep-equal@2.0.1: {} + fast-deep-equal@3.1.3: {} + fast-fifo@1.3.2: {} fast-glob@3.3.2: @@ -12147,10 +11388,6 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 - fast-querystring@1.1.2: - dependencies: - fast-decode-uri-component: 1.0.1 - fast-xml-parser@4.5.0: dependencies: strnum: 1.0.5 @@ -12163,10 +11400,6 @@ snapshots: optionalDependencies: picomatch: 4.0.2 - figures@3.2.0: - dependencies: - escape-string-regexp: 1.0.5 - file-uri-to-path@1.0.0: {} filelist@1.0.4: @@ -12177,8 +11410,6 @@ snapshots: dependencies: to-regex-range: 5.0.1 - flat@5.0.2: {} - flexsearch@0.7.21: {} follow-redirects@1.15.9: {} @@ -12193,17 +11424,12 @@ snapshots: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 + optional: true fraction.js@4.3.7: {} fresh@0.5.2: {} - front-matter@4.0.2: - dependencies: - js-yaml: 3.14.1 - - fs-constants@1.0.0: {} - fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -12374,14 +11600,6 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - globals@11.12.0: {} globby@14.0.2: @@ -12412,6 +11630,19 @@ snapshots: dependencies: duplexer: 0.1.2 + h3-nightly@1.13.1-20241013-011028-3bf8af0: + dependencies: + cookie-es: 1.2.2 + crossws: 0.3.1 + defu: 6.1.4 + destr: 2.0.3 + iron-webcrypto: 1.2.1 + ohash: 1.1.4 + radix3: 1.1.2 + ufo: 1.5.4 + uncrypto: 0.1.3 + unenv: 1.10.0 + h3@1.11.1: dependencies: cookie-es: 1.2.2 @@ -12581,8 +11812,8 @@ snapshots: http-proxy-agent@7.0.2: dependencies: - agent-base: 7.1.1 - debug: 4.3.7 + agent-base: 7.1.1(supports-color@9.4.0) + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color optional: true @@ -12600,17 +11831,16 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color - https-proxy-agent@7.0.5: + https-proxy-agent@7.0.5(supports-color@9.4.0): dependencies: - agent-base: 7.1.1 - debug: 4.3.7 + agent-base: 7.1.1(supports-color@9.4.0) + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color - optional: true httpxy@0.1.5: {} @@ -12632,6 +11862,8 @@ snapshots: dependencies: queue: 6.0.2 + index-to-position@0.1.2: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -12649,7 +11881,7 @@ snapshots: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) denque: 2.1.0 lodash.defaults: 4.2.0 lodash.isarguments: 3.1.0 @@ -12791,6 +12023,8 @@ snapshots: js-cookie@3.0.5: {} + js-levenshtein@1.1.6: {} + js-tokens@4.0.0: {} js-tokens@9.0.0: {} @@ -12812,7 +12046,7 @@ snapshots: form-data: 4.0.1 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.5(supports-color@9.4.0) is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.13 parse5: 7.2.0 @@ -12835,9 +12069,9 @@ snapshots: jsesc@3.0.2: {} - json5@2.2.3: {} + json-schema-traverse@1.0.0: {} - jsonc-parser@3.2.0: {} + json5@2.2.3: {} jsonfile@6.1.0: dependencies: @@ -12865,8 +12099,6 @@ snapshots: lines-and-columns@1.2.4: {} - lines-and-columns@2.0.3: {} - listhen@1.9.0: dependencies: '@parcel/watcher': 2.4.1 @@ -12901,6 +12133,8 @@ snapshots: lodash.isarguments@3.1.0: {} + lodash.isequal@4.5.0: {} + lodash.isplainobject@4.0.6: {} lodash.merge@4.6.2: {} @@ -12963,6 +12197,12 @@ snapshots: '@babel/types': 7.25.8 recast: 0.23.9 + magicast@0.3.5: + dependencies: + '@babel/parser': 7.25.8 + '@babel/types': 7.25.8 + source-map-js: 1.2.1 + make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -13403,7 +12643,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -13478,16 +12718,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.3: - dependencies: - brace-expansion: 2.0.1 - minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 - minimist@1.2.8: {} - minipass@3.3.6: dependencies: yallist: 4.0.0 @@ -13603,55 +12837,57 @@ snapshots: - '@babel/core' - babel-plugin-macros - nitropack@2.9.7(@planetscale/database@1.19.0)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(webpack-sources@3.2.3)(xml2js@0.6.2): + nitropack-nightly@2.10.0-20241021-025328.14b4891f(patch_hash=wynz3sibbystwgsuqi5dq4yc74)(@planetscale/database@1.19.0)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(mysql2@3.11.3)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2): dependencies: '@cloudflare/kv-asset-handler': 0.3.4 '@netlify/functions': 2.8.2 '@rollup/plugin-alias': 5.1.1(rollup@4.24.0) - '@rollup/plugin-commonjs': 25.0.8(rollup@4.24.0) + '@rollup/plugin-commonjs': 28.0.1(rollup@4.24.0) '@rollup/plugin-inject': 5.0.5(rollup@4.24.0) '@rollup/plugin-json': 6.1.0(rollup@4.24.0) '@rollup/plugin-node-resolve': 15.3.0(rollup@4.24.0) - '@rollup/plugin-replace': 5.0.7(rollup@4.24.0) + '@rollup/plugin-replace': 6.0.1(rollup@4.24.0) '@rollup/plugin-terser': 0.4.4(rollup@4.24.0) '@rollup/pluginutils': 5.1.2(rollup@4.24.0) '@types/http-proxy': 1.17.15 - '@vercel/nft': 0.26.5(encoding@0.1.13) + '@vercel/nft': 0.27.5(encoding@0.1.13) archiver: 7.0.1 - c12: 1.11.2 - chalk: 5.3.0 + c12: 2.0.1(magicast@0.3.5) chokidar: 3.6.0 citty: 0.1.6 + compatx: 0.1.8 + confbox: 0.1.8 consola: 3.2.3 cookie-es: 1.2.2 croner: 8.1.2 - crossws: 0.2.4 - db0: 0.1.4(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1)) + crossws: 0.3.1 + db0: 0.2.1(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(mysql2@3.11.3) defu: 6.1.4 destr: 2.0.3 - dot-prop: 8.0.2 - esbuild: 0.20.2 + dot-prop: 9.0.0 + esbuild: 0.24.0 escape-string-regexp: 5.0.0 etag: 1.8.1 fs-extra: 11.2.0 globby: 14.0.2 gzip-size: 7.0.0 - h3: 1.13.0 + h3: h3-nightly@1.13.1-20241013-011028-3bf8af0 hookable: 5.5.3 httpxy: 0.1.5 ioredis: 5.4.1 - jiti: 1.21.6 + jiti: 2.3.3 klona: 2.0.6 knitwork: 1.1.0 listhen: 1.9.0 magic-string: 0.30.12 + magicast: 0.3.5 mime: 4.0.4 mlly: 1.7.2 mri: 1.2.0 node-fetch-native: 1.6.4 ofetch: 1.4.1 ohash: 1.1.4 - openapi-typescript: 6.7.6 + openapi-typescript: 7.4.1(encoding@0.1.13)(typescript@5.6.3) pathe: 1.1.2 perfect-debounce: 1.0.0 pkg-types: 1.2.1 @@ -13670,6 +12906,7 @@ snapshots: unenv: 1.10.0 unimport: 3.13.1(rollup@4.24.0)(webpack-sources@3.2.3) unstorage: 1.12.0(@planetscale/database@1.19.0)(ioredis@5.4.1) + untyped: 1.5.1 unwasm: 0.3.9(webpack-sources@3.2.3) optionalDependencies: xml2js: 0.6.2 @@ -13681,6 +12918,7 @@ snapshots: - '@azure/keyvault-secrets' - '@azure/storage-blob' - '@capacitor/preferences' + - '@electric-sql/pglite' - '@libsql/client' - '@netlify/blobs' - '@planetscale/database' @@ -13690,8 +12928,9 @@ snapshots: - drizzle-orm - encoding - idb-keyval - - magicast + - mysql2 - supports-color + - typescript - uWebSockets.js - webpack-sources @@ -13719,8 +12958,6 @@ snapshots: css-select: 4.3.0 he: 1.2.0 - node-machine-id@1.1.12: {} - node-releases@2.0.18: {} nopt@5.0.0: @@ -13735,10 +12972,6 @@ snapshots: normalize-range@0.1.2: {} - npm-run-path@4.0.1: - dependencies: - path-key: 3.1.1 - npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -13759,55 +12992,6 @@ snapshots: nwsapi@2.2.13: optional: true - nx@20.0.3(@swc/core@1.7.26(@swc/helpers@0.5.13)): - dependencies: - '@napi-rs/wasm-runtime': 0.2.4 - '@yarnpkg/lockfile': 1.1.0 - '@yarnpkg/parsers': 3.0.0-rc.46 - '@zkochan/js-yaml': 0.0.7 - axios: 1.7.7 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.6.1 - cliui: 8.0.1 - dotenv: 16.4.5 - dotenv-expand: 11.0.6 - enquirer: 2.3.6 - figures: 3.2.0 - flat: 5.0.2 - front-matter: 4.0.2 - ignore: 5.3.2 - jest-diff: 29.7.0 - jsonc-parser: 3.2.0 - lines-and-columns: 2.0.3 - minimatch: 9.0.3 - node-machine-id: 1.1.12 - npm-run-path: 4.0.1 - open: 8.4.2 - ora: 5.3.0 - semver: 7.6.3 - string-width: 4.2.3 - tar-stream: 2.2.0 - tmp: 0.2.3 - tsconfig-paths: 4.2.0 - tslib: 2.8.0 - yargs: 17.7.2 - yargs-parser: 21.1.1 - optionalDependencies: - '@nx/nx-darwin-arm64': 20.0.3 - '@nx/nx-darwin-x64': 20.0.3 - '@nx/nx-freebsd-x64': 20.0.3 - '@nx/nx-linux-arm-gnueabihf': 20.0.3 - '@nx/nx-linux-arm64-gnu': 20.0.3 - '@nx/nx-linux-arm64-musl': 20.0.3 - '@nx/nx-linux-x64-gnu': 20.0.3 - '@nx/nx-linux-x64-musl': 20.0.3 - '@nx/nx-win32-arm64-msvc': 20.0.3 - '@nx/nx-win32-x64-msvc': 20.0.3 - '@swc/core': 1.7.26(@swc/helpers@0.5.13) - transitivePeerDependencies: - - debug - nypm@0.3.12: dependencies: citty: 0.1.6 @@ -13861,14 +13045,17 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openapi-typescript@6.7.6: + openapi-typescript@7.4.1(encoding@0.1.13)(typescript@5.6.3): dependencies: + '@redocly/openapi-core': 1.25.8(encoding@0.1.13)(supports-color@9.4.0) ansi-colors: 4.1.3 - fast-glob: 3.3.2 - js-yaml: 4.1.0 + change-case: 5.4.4 + parse-json: 8.1.0 supports-color: 9.4.0 - undici: 5.28.4 + typescript: 5.6.3 yargs-parser: 21.1.1 + transitivePeerDependencies: + - encoding openid-client@5.6.4: dependencies: @@ -13877,17 +13064,6 @@ snapshots: object-hash: 2.2.0 oidc-token-hash: 5.0.3 - ora@5.3.0: - dependencies: - bl: 4.1.0 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.6.1 - is-interactive: 1.0.0 - log-symbols: 4.1.0 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - ora@5.4.1: dependencies: bl: 4.1.0 @@ -13929,6 +13105,12 @@ snapshots: is-decimal: 2.0.1 is-hexadecimal: 2.0.1 + parse-json@8.1.0: + dependencies: + '@babel/code-frame': 7.25.7 + index-to-position: 0.1.2 + type-fest: 4.26.1 + parse5@7.2.0: dependencies: entities: 4.5.0 @@ -14116,23 +13298,6 @@ snapshots: proto-list@1.2.4: {} - protobufjs@7.4.0: - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 - '@protobufjs/eventemitter': 1.1.0 - '@protobufjs/fetch': 1.1.0 - '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 - '@protobufjs/path': 1.1.2 - '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.7 - long: 5.2.3 - - proxy-from-env@1.1.0: {} - punycode@2.3.1: optional: true @@ -14290,6 +13455,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.2: {} + recast@0.23.9: dependencies: ast-types: 0.16.1 @@ -14374,6 +13541,8 @@ snapshots: require-directory@2.1.1: {} + require-from-string@2.0.2: {} + requires-port@1.0.0: {} resolve-from@5.0.0: {} @@ -14588,7 +13757,7 @@ snapshots: socket.io-adapter@2.5.5: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) ws: 8.17.1 transitivePeerDependencies: - bufferutil @@ -14598,7 +13767,7 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -14607,7 +13776,7 @@ snapshots: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io: 6.5.5 socket.io-adapter: 2.5.5 socket.io-parser: 4.2.4 @@ -14689,49 +13858,21 @@ snapshots: sqlstring@2.3.3: {} - sst-darwin-arm64@3.1.49: - optional: true - sst-darwin-arm64@3.2.38: optional: true - sst-darwin-x64@3.1.49: - optional: true - sst-darwin-x64@3.2.38: optional: true - sst-linux-arm64@3.1.49: - optional: true - sst-linux-arm64@3.2.38: optional: true - sst-linux-x64@3.1.49: - optional: true - sst-linux-x64@3.2.38: optional: true - sst-linux-x86@3.1.49: - optional: true - sst-linux-x86@3.2.38: optional: true - sst@3.1.49(hono@4.6.5): - dependencies: - aws4fetch: 1.0.20 - jose: 5.2.3 - openid-client: 5.6.4 - optionalDependencies: - hono: 4.6.5 - sst-darwin-arm64: 3.1.49 - sst-darwin-x64: 3.1.49 - sst-linux-arm64: 3.1.49 - sst-linux-x64: 3.1.49 - sst-linux-x86: 3.1.49 - sst@3.2.38(hono@4.6.5): dependencies: aws4fetch: 1.0.20 @@ -14809,8 +13950,6 @@ snapshots: strip-bom-string@1.0.0: {} - strip-bom@3.0.0: {} - strip-final-newline@3.0.0: {} strip-literal@2.1.0: @@ -14912,14 +14051,6 @@ snapshots: transitivePeerDependencies: - ts-node - tar-stream@2.2.0: - dependencies: - bl: 4.1.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - inherits: 2.0.4 - readable-stream: 3.6.2 - tar-stream@3.1.7: dependencies: b4a: 1.6.7 @@ -14974,16 +14105,14 @@ snapshots: tinyspy@3.0.2: {} - tldts-core@6.1.52: + tldts-core@6.1.54: optional: true - tldts@6.1.52: + tldts@6.1.54: dependencies: - tldts-core: 6.1.52 + tldts-core: 6.1.54 optional: true - tmp@0.2.3: {} - to-fast-properties@2.0.0: {} to-regex-range@5.0.1: @@ -14994,7 +14123,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.52 + tldts: 6.1.54 optional: true tr46@0.0.3: {} @@ -15016,12 +14145,6 @@ snapshots: optionalDependencies: typescript: 5.6.3 - tsconfig-paths@4.2.0: - dependencies: - json5: 2.2.3 - minimist: 1.2.8 - strip-bom: 3.0.0 - tslib@2.8.0: {} tsx@4.19.1: @@ -15033,7 +14156,7 @@ snapshots: type-fest@2.19.0: {} - type-fest@3.13.1: {} + type-fest@4.26.1: {} typescript@5.6.3: {} @@ -15152,7 +14275,7 @@ snapshots: '@antfu/install-pkg': 0.4.1 '@antfu/utils': 0.7.10 '@iconify/utils': 2.1.33 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) kolorist: 1.8.0 local-pkg: 0.5.0 unplugin: 1.14.1(webpack-sources@3.2.3) @@ -15191,6 +14314,18 @@ snapshots: consola: 3.2.3 pathe: 1.1.2 + untyped@1.5.1: + dependencies: + '@babel/core': 7.25.8 + '@babel/standalone': 7.25.9 + '@babel/types': 7.25.8 + defu: 6.1.4 + jiti: 2.3.3 + mri: 1.2.0 + scule: 1.3.0 + transitivePeerDependencies: + - supports-color + unwasm@0.3.9(webpack-sources@3.2.3): dependencies: knitwork: 1.1.0 @@ -15210,7 +14345,7 @@ snapshots: uqr@0.1.2: {} - urlpattern-polyfill@10.0.0: {} + uri-js-replace@1.0.1: {} urlpattern-polyfill@8.0.2: {} @@ -15258,7 +14393,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(terser@5.36.0)(webpack-sources@3.2.3)(xml2js@0.6.2): + vinxi@0.4.3(@planetscale/database@1.19.0)(@types/node@22.7.7)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(ioredis@5.4.1)(mysql2@3.11.3)(terser@5.36.0)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2): dependencies: '@babel/core': 7.25.8 '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) @@ -15280,7 +14415,7 @@ snapshots: hookable: 5.5.3 http-proxy: 1.18.1 micromatch: 4.0.8 - nitropack: 2.9.7(@planetscale/database@1.19.0)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(webpack-sources@3.2.3)(xml2js@0.6.2) + nitropack: nitropack-nightly@2.10.0-20241021-025328.14b4891f(patch_hash=wynz3sibbystwgsuqi5dq4yc74)(@planetscale/database@1.19.0)(drizzle-orm@0.35.2(@cloudflare/workers-types@4.20241018.0)(@opentelemetry/api@1.9.0)(@planetscale/database@1.19.0)(@types/react@18.3.11)(mysql2@3.11.3)(pg@8.13.0)(postgres@3.4.4)(react@18.3.1))(encoding@0.1.13)(mysql2@3.11.3)(typescript@5.6.3)(webpack-sources@3.2.3)(xml2js@0.6.2) node-fetch-native: 1.6.4 path-to-regexp: 6.3.0 pathe: 1.1.2 @@ -15302,6 +14437,7 @@ snapshots: - '@azure/keyvault-secrets' - '@azure/storage-blob' - '@capacitor/preferences' + - '@electric-sql/pglite' - '@libsql/client' - '@netlify/blobs' - '@planetscale/database' @@ -15316,13 +14452,14 @@ snapshots: - ioredis - less - lightningcss - - magicast + - mysql2 - sass - sass-embedded - stylus - sugarss - supports-color - terser + - typescript - uWebSockets.js - webpack-sources - xml2js @@ -15330,7 +14467,7 @@ snapshots: vite-node@2.1.3(@types/node@22.7.7)(terser@5.36.0): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) pathe: 1.1.2 vite: 5.4.9(@types/node@22.7.7)(terser@5.36.0) transitivePeerDependencies: @@ -15375,7 +14512,7 @@ snapshots: vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)(terser@5.36.0)): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: @@ -15408,7 +14545,7 @@ snapshots: '@vitest/spy': 2.1.3 '@vitest/utils': 2.1.3 chai: 5.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) magic-string: 0.30.12 pathe: 1.1.2 std-env: 3.7.0 @@ -15572,6 +14709,8 @@ snapshots: yallist@4.0.0: {} + yaml-ast-parser@0.0.43: {} + yaml@2.6.0: {} yargs-parser@21.1.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cf4ee50a..286cf7f5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,3 @@ packages: - apps/* - packages/* - - apps/email/.react-email - - infra diff --git a/sst-env.d.ts b/sst-env.d.ts deleted file mode 100644 index e3c10719..00000000 --- a/sst-env.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* This file is auto-generated by SST. Do not edit. */ -/* tslint:disable */ -/* eslint-disable */ -import "sst" -export {} -declare module "sst" { - export interface Resource { - "AxiomApiToken": { - "type": "sst.sst.Secret" - "value": string - } - "DatabaseURL": { - "type": "sst.sst.Secret" - "value": string - } - "DoTheThingWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientID": { - "type": "sst.sst.Secret" - "value": string - } - "EntraClientSecret": { - "type": "sst.sst.Secret" - "value": string - } - "FeedbackDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "ManageApi": { - "type": "sst.aws.ApiGatewayV2" - "url": string - } - "TruststoreBucket": { - "name": string - "type": "sst.aws.Bucket" - } - "WaitlistDiscordWebhookURL": { - "type": "sst.sst.Secret" - "value": string - } - "cloud": { - "name": string - "type": "sst.aws.Function" - "url": string - } - "email": { - "sender": string - "type": "sst.aws.Email" - } - } -} diff --git a/sst.config.ts b/sst.config.ts deleted file mode 100644 index faa227da..00000000 --- a/sst.config.ts +++ /dev/null @@ -1,380 +0,0 @@ -/// - -import crypto from "node:crypto"; -import path from "node:path"; -import type { Env } from "./apps/api/src/env"; - -if ("CLOUDFLARE_DEFAULT_ACCOUNT_ID" in process.env === false) - throw new Error("'CLOUDFLARE_DEFAULT_ACCOUNT_ID' is required"); -const accountId = process.env.CLOUDFLARE_DEFAULT_ACCOUNT_ID!; - -export default $config({ - app: (input) => ({ - name: "mattrax", - removal: input?.stage === "prod" ? "retain" : "remove", - home: "cloudflare", - providers: { - aws: { region: "us-east-1" }, - cloudflare: true, - tls: true, - command: true, - random: true, - }, - }), - async run() { - // Prerequisites - const zone = await cloudflare.getZone({ - accountId, - // mattrax.app - zoneId: "39b92fff0aea21806fd1b6c6bea628ce", - }); - - // Configuration - const DATABASE_URL = new sst.Secret("DatabaseURL"); - const ENTRA_CLIENT_ID = new sst.Secret("EntraClientID"); - const ENTRA_CLIENT_SECRET = new sst.Secret("EntraClientSecret"); - const AXIOM_API_TOKEN = new sst.Secret("AxiomApiToken"); - const WAITLIST_DISCORD_WEBHOOK_URL = new sst.Secret( - "WaitlistDiscordWebhookURL", - ); - const FEEDBACK_DISCORD_WEBHOOK_URL = new sst.Secret( - "FeedbackDiscordWebhookURL", - ); - const DO_THE_THING_WEBHOOK_URL = new sst.Secret("DoTheThingWebhookURL"); - - // Derived - const webSubdomain = $app.stage === "prod" ? "cloud" : `${$app.stage}-web`; - const manageSubdomain = - $app.stage === "prod" ? "manage" : `${$app.stage}-manage`; - - // Automatic - const INTERNAL_SECRET = new random.RandomString("internalSecret", { - length: 64, - overrideSpecial: "$-_.+!*'()", - }); - - // Defaults - $transform(sst.aws.Function, (args) => { - args.architecture ??= "arm64"; - }); - $transform(cloudflare.WorkerScript, (args) => { - args.compatibilityDate ??= "2024-09-29"; - args.compatibilityFlags ??= ["nodejs_compat_v2"]; - }); - $transform(cloudflare.PagesProject, (args) => { - if (!args.deploymentConfigs) args.deploymentConfigs = {}; - args.deploymentConfigs = $resolve([args.deploymentConfigs]).apply( - ([cfg]) => { - if (!cfg.preview) cfg.preview = {}; - if (!cfg.production) cfg.production = {}; - cfg.preview.compatibilityDate ??= "2024-09-29"; - cfg.preview.compatibilityFlags ??= ["nodejs_compat_v2"]; - cfg.production.compatibilityDate ??= "2024-09-29"; - cfg.production.compatibilityFlags ??= ["nodejs_compat_v2"]; - return cfg; - }, - ); - }); - - // Email - const email = - $app.stage !== "prod" - ? sst.aws.Email.get("email", "mattrax.app") - : new sst.aws.Email("email", { - sender: "mattrax.app", - dmarc: - "v=DMARC1; p=reject; rua=mailto:re+awpujuxug4y@dmarc.postmarkapp.com; adkim=r; aspf=r;", - dns: sst.cloudflare.dns(), - }); - const sender = $interpolate`hello@${email.sender}`; - - // Fastmail email - if ($app.stage === "prod") { - const cnames = { - "mesmtp._domainkey.mattrax.app": "mesmtp.mattrax.app.dkim.fmhosted.com", - "fm1._domainkey": "fm1.mattrax.app.dkim.fmhosted.com", - "fm2._domainkey": "fm2.mattrax.app.dkim.fmhosted.com", - "fm3._domainkey": "fm3.mattrax.app.dkim.fmhosted.com", - }; - const mxs = [ - ["in1-smtp.messagingengine.com", 10], - ["in2-smtp.messagingengine.com", 20], - ] as const; - const txts = [ - "v=spf1 include:spf.messagingengine.com include:amazonses.com -all", - ]; - - for (const [name, content] of Object.entries(cnames)) { - new cloudflare.Record(`CnameRecord${name}`, { - zoneId: zone.id, - name: name, - type: "CNAME", - content, - proxied: false, - }); - } - for (const [content, priority] of mxs) { - new cloudflare.Record(`MxRecord${content}`, { - zoneId: zone.id, - name: "@", - type: "MX", - content, - priority, - }); - } - for (const value of txts) { - new cloudflare.Record(`TxtRecord${value}`, { - zoneId: zone.id, - name: "@", - type: "TXT", - content: value, - }); - } - } - - // `apps/cloud` - SQL proxy - const cloudBuild = new command.local.Command("cloudBuild", { - create: - "./.github/cl.sh build --arm64 --release -p mx-cloud --bin lambda", - dir: process.cwd(), - // TODO: We should be able to ask Nx if the project has changed and only deploy if required. - triggers: [crypto.randomUUID()], - environment: { - CARGO_TERM_COLOR: "always", - }, - }); - - const cloud = new sst.aws.Function( - "cloud", - { - handler: "bootstrap", - architecture: "arm64", - runtime: "provided.al2023", - // SST/Pulumi is having problems with `dependsOn` so we force their hand. - bundle: cloudBuild.stdout.apply(() => - path.join(process.cwd(), "target", "lambda", "lambda"), - ), - memory: "128 MB", - environment: { - DATABASE_URL: DATABASE_URL.value, - INTERNAL_SECRET: INTERNAL_SECRET.result, - }, - // TODO: We should probs setup IAM on this??? - url: true, - }, - { - dependsOn: [cloudBuild], - }, - ); - const cloudHost = cloud.url.apply((url) => new URL(url).host); - - // Records for: https://mtls.mattrax.app - new cloudflare.Record("mtlsCNAME", { - zoneId: zone.id, - name: manageSubdomain, - type: "CNAME", - content: "mtls.mattrax.app", - }); - new cloudflare.Record("mtlsTXT", { - zoneId: zone.id, - name: manageSubdomain, - type: "TXT", - content: "mtls:accept|https://mattrax.app", - }); - - const webUser = new aws.iam.User("web"); - const webAccessKey = new aws.iam.AccessKey("webAccessKey", { - user: webUser.name, - }); - const webPolicy = aws.iam.getPolicyDocument({ - statements: [ - { - effect: "Allow", - actions: ["ses:SendEmail*"], - resources: ["*"], - }, - ], - }); - new aws.iam.UserPolicy("webUserPolicy", { - name: "webPolicy", - user: webUser.name, - policy: webPolicy.then((p) => p.json), - }); - - const VITE_PROD_ORIGIN = `https://${renderZoneDomain(zone, webSubdomain)}`; - const env: { [K in keyof Env]: $util.Input } = { - NODE_ENV: "production", - INTERNAL_SECRET: INTERNAL_SECRET.result, - DATABASE_URL: $interpolate`https://:${INTERNAL_SECRET.result}@${cloudHost}`, - MANAGE_URL: $interpolate`https://${renderZoneDomain( - zone, - manageSubdomain, - )}`, - FROM_ADDRESS: $interpolate`Mattrax <${sender}>`, - AWS_ACCESS_KEY_ID: webAccessKey.id, - AWS_SECRET_ACCESS_KEY: webAccessKey.secret, - ENTRA_CLIENT_ID: ENTRA_CLIENT_ID.value, - ENTRA_CLIENT_SECRET: ENTRA_CLIENT_SECRET.value, - VITE_PROD_ORIGIN, - WAITLIST_DISCORD_WEBHOOK_URL: WAITLIST_DISCORD_WEBHOOK_URL.value, - FEEDBACK_DISCORD_WEBHOOK_URL: FEEDBACK_DISCORD_WEBHOOK_URL.value, - DO_THE_THING_WEBHOOK_URL: DO_THE_THING_WEBHOOK_URL.value, - AXIOM_API_TOKEN: AXIOM_API_TOKEN.value, - AXIOM_DATASET: "mattrax", - }; - - const web = CloudflarePages("web", { - domain: { - zone, - sub: $app.stage === "prod" ? "cloud" : `${$app.stage}-web.dev`, - }, - build: { - command: "pnpm api build", - output: path.join("apps", "api", "dist"), - environment: { - NITRO_PRESET: "cloudflare_pages", - NODE_ENV: "production", - VITE_PROD_ORIGIN, - }, - }, - site: { - deploymentConfigs: { - preview: { - environmentVariables: env as any, - placement: { - mode: "smart", - }, - }, - production: { - environmentVariables: env as any, - placement: { - mode: "smart", - }, - }, - }, - }, - }); - - // `apps/landing` - const landing = CloudflarePages("landing", { - domain: { - zone, - sub: $app.stage === "prod" ? "@" : `${$app.stage}-landing.dev`, - }, - build: { - command: "pnpm landing build", - output: path.join("apps", "landing", "dist"), - environment: { - NITRO_PRESET: "cloudflare_pages", - NODE_ENV: "production", - VITE_MATTRAX_CLOUD_ORIGIN: web.url, - }, - }, - }); - - return { - cloudApi: cloud.url, - landing: landing.url, - web: web.url, - }; - }, -}); - -const renderZoneDomain = (zone: cloudflare.GetZoneResult, sub: string) => - `${sub === "@" ? "" : `${sub}.`}${zone.name}`; - -/// A construct which takes care of creating a Cloudflare Pages project and creating an associated deployment. -function CloudflarePages( - name: string, - opts: { - build: { - command: string; - output: string; - environment?: Record>; - }; - site?: Partial>; - domain?: { - zone: cloudflare.GetZoneResult; - sub: string; - }; - dependsOn?: - | $util.Input<$util.Input<$util.Resource>[]> - | $util.Input<$util.Resource>; - }, -) { - const site = new cloudflare.PagesProject( - `${name}Site`, - { - ...opts.site, - accountId, - name: $app.stage === "prod" ? name : `${name}-${$app.stage}`, - productionBranch: opts.site?.productionBranch ?? "main", - }, - { - dependsOn: opts.dependsOn, - }, - ); - - // TODO: We only need to deploy when Nx says something changed. Eg. changing landing should skip deploying web. - const triggers = [crypto.randomUUID()]; - - const build = new command.local.Command( - `${name}Build`, - { - create: opts.build.command, - environment: opts.build.environment, - dir: process.cwd(), - triggers, - }, - { - dependsOn: opts.dependsOn, - }, - ); - - new command.local.Command( - `${name}Deploy`, - { - create: $interpolate`pnpm wrangler pages deploy ${path.join( - process.cwd(), - opts.build.output, - )} ${$app.stage !== "prod" ? "--commit-dirty " : ""}--project-name ${ - site.id - }`, - environment: { - CLOUDFLARE_DEFAULT_ACCOUNT_ID: accountId, - CLOUDFLARE_ACCOUNT_ID: accountId, - }, - dir: process.cwd(), - triggers, - }, - { - dependsOn: [site, build], - }, - ); - - let domain = ""; - if (opts.domain) { - domain = renderZoneDomain(opts.domain.zone, opts.domain.sub); - new cloudflare.PagesDomain(`${name}Domain`, { - accountId, - domain, - projectName: site.name, - }); - - new cloudflare.Record(`${name}Record`, { - zoneId: opts.domain.zone.id, - name: opts.domain.sub, - type: "CNAME", - content: site.subdomain, - proxied: true, - }); - } - - // TODO: Cloudflare Access for preview deployments - - return { - // TODO: Return the URL of the deployment instead of this for development. - url: `https://${domain}`, - previewSubdomain: site.subdomain, - }; -} diff --git a/tsconfig.json b/tsconfig.json index ce471cc8..6b6e5d72 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "references": [ { "path": "./apps/web" }, { "path": "./apps/landing" }, - { "path": "./apps/api" }, { "path": "./packages/drizzle-to-rs" }, { "path": "./packages/configuration-schemas" }, { "path": "./packages/drizzle-to-rs" },