Merge remote-tracking branch 'origin/main' into feat/live-payment-create-upgrade

This commit is contained in:
Damodar Lohani
2026-05-10 11:00:43 +00:00
55 changed files with 386 additions and 115 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.8
+6 -6
View File
@@ -14,20 +14,20 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: appwrite/console-profiles
tags: |
@@ -40,7 +40,7 @@ jobs:
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
push: true
+4 -4
View File
@@ -11,9 +11,9 @@ jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.8
@@ -21,7 +21,7 @@ jobs:
run: bun install --frozen-lockfile
- name: Cache Playwright browsers
uses: actions/cache@v4
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
@@ -34,7 +34,7 @@ jobs:
- name: E2E Tests
run: bun test:e2e
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ !cancelled() }}
with:
name: playwright-report
+24 -24
View File
@@ -9,19 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: appwrite/console-cloud
tags: |
@@ -30,7 +30,7 @@ jobs:
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
push: true
@@ -51,19 +51,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: appwrite/console-cloud-stage
tags: |
@@ -72,7 +72,7 @@ jobs:
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
push: true
@@ -91,19 +91,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: appwrite/console
tags: |
@@ -112,7 +112,7 @@ jobs:
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
push: true
@@ -130,19 +130,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: appwrite/console-cloud-no-regions
tags: |
@@ -151,7 +151,7 @@ jobs:
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
push: true
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days."
+2 -2
View File
@@ -14,9 +14,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.8
+4 -4
View File
@@ -6,7 +6,7 @@
"name": "@appwrite/console",
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@93d2dfa",
"@appwrite.io/console": "^12.2.0",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
"@appwrite.io/pink-legacy": "^1.0.3",
@@ -124,15 +124,15 @@
"@analytics/type-utils": ["@analytics/type-utils@0.6.4", "", {}, "sha512-Ou1gQxFakOWLcPnbFVsrPb8g1wLLUZYYJXDPjHkG07+5mustGs5yqACx42UAu4A6NszNN6Z5gGxhyH45zPWRxw=="],
"@appwrite.io/console": ["@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@93d2dfa", { "dependencies": { "json-bigint": "1.0.0" } }],
"@appwrite.io/console": ["@appwrite.io/console@12.2.0", "", { "dependencies": { "json-bigint": "1.0.0" } }, "sha512-kv5CS/pWlSkLzG1mPctUr5fMdisZRrkOYStIvAaNPHv+bl/wFCZMMoRoiPGlBpw2NKwTddGFkkQvHq8GbxehNA=="],
"@appwrite.io/pink-icons": ["@appwrite.io/pink-icons@0.25.0", "", {}, "sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q=="],
"@appwrite.io/pink-icons-svelte": ["@appwrite.io/pink-icons-svelte@https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3", { "peerDependencies": { "svelte": "^4.0.0" } }],
"@appwrite.io/pink-icons-svelte": ["@appwrite.io/pink-icons-svelte@https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3", { "peerDependencies": { "svelte": "^4.0.0" } }, "sha512-2HYl/CC2OlfZIR7LzbLXuSPBn0iNkjbnxpaeGCkZ7UNZ/hFeSeeWjDJqTBMdZ8+X95uuZqHx62XPTiE/svuSXQ=="],
"@appwrite.io/pink-legacy": ["@appwrite.io/pink-legacy@1.0.3", "", { "dependencies": { "@appwrite.io/pink-icons": "1.0.0", "the-new-css-reset": "^1.11.2" } }, "sha512-GGde5fmPhs+s6/3aFeMPc/kKADG/gTFkYQSy6oBN8pK0y0XNCLrZZgBv+EBbdhwdtqVEWXa0X85Mv9w7jcIlwQ=="],
"@appwrite.io/pink-svelte": ["@appwrite.io/pink-svelte@https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@8dcaa17", { "dependencies": { "@appwrite.io/pink-icons-svelte": "2.0.0-RC.1", "@floating-ui/dom": "^1.6.13", "@melt-ui/pp": "^0.3.2", "@melt-ui/svelte": "^0.86.6", "@tanstack/svelte-virtual": "^3.13.10", "ansicolor": "^2.0.3", "d3": "^7.9.0", "fuse.js": "^7.1.0", "pretty-bytes": "^6.1.1", "shiki": "^1.18.0", "svelte-motion": "^0.12.2", "svelte-sonner": "^0.3.28" }, "peerDependencies": { "svelte": "^4.0.0" } }],
"@appwrite.io/pink-svelte": ["@appwrite.io/pink-svelte@https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@8dcaa17", { "dependencies": { "@appwrite.io/pink-icons-svelte": "2.0.0-RC.1", "@floating-ui/dom": "^1.6.13", "@melt-ui/pp": "^0.3.2", "@melt-ui/svelte": "^0.86.6", "@tanstack/svelte-virtual": "^3.13.10", "ansicolor": "^2.0.3", "d3": "^7.9.0", "fuse.js": "^7.1.0", "pretty-bytes": "^6.1.1", "shiki": "^1.18.0", "svelte-motion": "^0.12.2", "svelte-sonner": "^0.3.28" }, "peerDependencies": { "svelte": "^4.0.0" } }, "sha512-rw3zXN7/cUciCnhj0FR8M0H5Db+LYYMaKtPxvOAIMxNTBmStzU8kTw6grqIvdtFu9vybIsjKtIwm9QLHpNDBjA=="],
"@asamuzakjp/css-color": ["@asamuzakjp/css-color@3.2.0", "", { "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", "@csstools/css-parser-algorithms": "^3.0.4", "@csstools/css-tokenizer": "^3.0.3", "lru-cache": "^10.4.3" } }, "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw=="],
+1 -1
View File
@@ -20,7 +20,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@93d2dfa",
"@appwrite.io/console": "^12.2.0",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
"@appwrite.io/pink-legacy": "^1.0.3",
-19
View File
@@ -936,42 +936,36 @@ packages:
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm-musl@2.5.6':
resolution: {integrity: sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-arm64-glibc@2.5.6':
resolution: {integrity: sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-arm64-musl@2.5.6':
resolution: {integrity: sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@parcel/watcher-linux-x64-glibc@2.5.6':
resolution: {integrity: sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@parcel/watcher-linux-x64-musl@2.5.6':
resolution: {integrity: sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
'@parcel/watcher-win32-arm64@2.5.6':
resolution: {integrity: sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==}
@@ -1046,79 +1040,66 @@ packages:
resolution: {integrity: sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==}
cpu: [arm]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.60.0':
resolution: {integrity: sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==}
cpu: [arm]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.60.0':
resolution: {integrity: sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.60.0':
resolution: {integrity: sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==}
cpu: [arm64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-loong64-gnu@4.60.0':
resolution: {integrity: sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==}
cpu: [loong64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-loong64-musl@4.60.0':
resolution: {integrity: sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==}
cpu: [loong64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-ppc64-gnu@4.60.0':
resolution: {integrity: sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-ppc64-musl@4.60.0':
resolution: {integrity: sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==}
cpu: [ppc64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-riscv64-gnu@4.60.0':
resolution: {integrity: sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-riscv64-musl@4.60.0':
resolution: {integrity: sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==}
cpu: [riscv64]
os: [linux]
libc: [musl]
'@rollup/rollup-linux-s390x-gnu@4.60.0':
resolution: {integrity: sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==}
cpu: [s390x]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.60.0':
resolution: {integrity: sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==}
cpu: [x64]
os: [linux]
libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.60.0':
resolution: {integrity: sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==}
cpu: [x64]
os: [linux]
libc: [musl]
'@rollup/rollup-openbsd-x64@4.60.0':
resolution: {integrity: sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==}
+1
Submodule sdk-for-console added at dcfff2a2aa
+1 -2
View File
@@ -13,10 +13,9 @@ export function isProxyRuleVerified(status: ProxyRuleStatusValue): boolean {
}
export function normalizeProxyRuleStatus(status: ProxyRuleStatusValue): ProxyRuleStatusValue {
if (status === ProxyRuleStatus.Created) {
if (status === 'created') {
return ProxyRuleStatus.Unverified;
}
return status;
}
@@ -43,7 +43,7 @@
try {
selectedProxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
.proxy.updateRuleStatus({ ruleId: selectedProxyRule.$id });
await invalidate(Dependencies.DOMAINS);
show = false;
+4
View File
@@ -252,6 +252,10 @@ function generateSingleValue(field: Field): string | number | boolean | NestedNu
return faker.number.int({ min, max });
}
case 'bigint': {
return faker.number.bigInt().toString();
}
case 'double': {
const floatAttr = field as Models.ColumnFloat;
const min = isWithinSafeRange(floatAttr.min) ? floatAttr.min : 0;
+1
View File
@@ -32,6 +32,7 @@ const columnTypes = [
'text',
'mediumtext',
'longtext',
'bigint',
'integer',
'double',
'boolean',
+1 -1
View File
@@ -1,5 +1,5 @@
import { writable } from 'svelte/store';
import { type Models, MethodId } from '@appwrite.io/console';
import { type Models, AuthMethod as MethodId } from '@appwrite.io/console';
export type AuthMethod = {
label: string;
+11 -1
View File
@@ -47,6 +47,9 @@ const initialFormData = {
messaging: {
root: false,
messages: false
},
backups: {
root: false
}
};
@@ -84,7 +87,8 @@ export const ResourcesFriendly = {
provider: { singular: 'Provider', plural: 'Providers' },
topic: { singular: 'Topic', plural: 'Topics' },
subscriber: { singular: 'Subscriber', plural: 'Subscribers' },
message: { singular: 'Message', plural: 'Messages' }
message: { singular: 'Message', plural: 'Messages' },
'backup-policy': { singular: 'Backup Policy', plural: 'Backup Policies' }
};
export const providerResources: ProviderResourceMap = {
@@ -148,6 +152,9 @@ export const migrationFormToResources = <P extends Provider>(
if (formData.messaging.messages) {
addResource(MigrationResources.Message);
}
if (formData.backups.root) {
addResource(MigrationResources.Backuppolicy);
}
return resources as ProviderResourceMap[P];
};
@@ -224,6 +231,9 @@ export const resourcesToMigrationForm = (resources: MigrationResource[]): Migrat
if (resources.includes(MigrationResources.Message)) {
formData.messaging.messages = true;
}
if (resources.includes(MigrationResources.Backuppolicy)) {
formData.backups.root = true;
}
return formData;
};
@@ -115,6 +115,10 @@
return resources.includes(MigrationResources.Provider);
}
if (groupKey === 'backups') {
return resources.includes(MigrationResources.Backuppolicy);
}
const groupToResource: Record<string, MigrationResource> = {
users: MigrationResources.User,
databases: MigrationResources.Database
@@ -135,7 +139,8 @@
functions: 'function',
storage: 'bucket',
sites: 'site',
messaging: 'provider'
messaging: 'provider',
backups: 'backup-policy'
};
return map[groupKey] || groupKey;
};
@@ -10,7 +10,7 @@
import { addNotification } from '$lib/stores/notifications';
import { oAuthProviders } from '$lib/stores/oauth-providers';
import { sdk } from '$lib/stores/sdk';
import { MethodId, type Models } from '@appwrite.io/console';
import { AuthMethod as MethodId, type Models } from '@appwrite.io/console';
import { base } from '$app/paths';
import {
Avatar,
@@ -218,8 +218,8 @@ async function updateProjectOAuth({
clientSecret: getSecret('clientSecret'),
wellKnownURL: getDetail('wellKnownURL'),
authorizationURL: getDetail('authorizationURL'),
tokenUrl: getDetail('tokenUrl'),
userInfoUrl: getDetail('userInfoUrl'),
tokenURL: getDetail('tokenUrl'),
userInfoURL: getDetail('userInfoUrl'),
enabled
});
case OAuthProvider.Okta:
@@ -15,6 +15,7 @@ export type Columns =
| Models.ColumnEmail
| Models.ColumnEnum
| Models.ColumnFloat
| Models.ColumnBigint
| Models.ColumnInteger
| Models.ColumnIp
| Models.ColumnString
@@ -65,7 +65,7 @@
import { hash } from '$lib/helpers/string';
import { preferences } from '$lib/stores/preferences';
import { buildFieldUrl } from '$database/(entity)/helpers/navigation';
import { isRelationship } from '$database/table-[table]/rows/store';
import { isRelationship, buildPayload } from '$database/table-[table]/rows/store';
import { chunks } from '$lib/helpers/array';
import { Submit, trackEvent } from '$lib/actions/analytics';
import {
@@ -357,7 +357,7 @@
databaseId: page.params.database,
tableId: page.params.table,
rowId: row.$id,
data: row
data: buildPayload(columns, row)
})
)
);
@@ -369,7 +369,7 @@
await tablesSDK.createRows({
databaseId: page.params.database,
tableId: page.params.table,
rows
rows: rows.map((row) => buildPayload(columns, row))
});
}
@@ -198,8 +198,15 @@
) {
const stringColumn = column as Models.ColumnString;
return { display: `Size: ${stringColumn.size}` };
} else if (column.type === 'integer' || column.type === 'double') {
const numbersColumn = column as Models.ColumnInteger | Models.ColumnFloat;
} else if (
column.type === 'bigint' ||
column.type === 'integer' ||
column.type === 'double'
) {
const numbersColumn = column as
| Models.ColumnBigint
| Models.ColumnInteger
| Models.ColumnFloat;
const { min, max } = numbersColumn;
const isMinBigInt = typeof min === 'bigint';
@@ -0,0 +1,160 @@
<script module lang="ts">
import { page } from '$app/state';
import type { Columns } from '$database/store';
import { sdk } from '$lib/stores/sdk';
import type { Models } from '@appwrite.io/console';
function normalizeBigInt(value, field: string) {
if (value === undefined) return undefined;
if (value === null) return null;
if (typeof value === 'number') {
if (!Number.isFinite(value) || Number.isNaN(value)) {
throw new Error(`${field} must be a finite integer`);
}
if (!Number.isInteger(value)) {
throw new Error(`${field} must be an integer`);
}
}
try {
return BigInt(value);
} catch {
throw new Error(`${field} must be a valid integer`);
}
}
export async function submitBigInt(
databaseId: string,
tableId: string,
key: string,
data: Partial<Columns>
) {
const bigintData = data as Partial<Models.ColumnBigint>;
await sdk.forProject(page.params.region, page.params.project).tablesDB.createBigIntColumn({
databaseId,
tableId,
key,
required: bigintData.required,
min: normalizeBigInt(bigintData.min, 'Min'),
max: normalizeBigInt(bigintData.max, 'Max'),
xdefault: normalizeBigInt(bigintData.default, 'Default value'),
array: bigintData.array
});
}
export async function updateBigInt(
databaseId: string,
tableId: string,
data: Partial<Columns>,
originalKey?: string
) {
const bigintData = data as Partial<Models.ColumnBigint>;
await sdk.forProject(page.params.region, page.params.project).tablesDB.updateBigIntColumn({
databaseId,
tableId,
key: originalKey,
required: bigintData.required,
xdefault: normalizeBigInt(bigintData.default, 'Default value'),
min: normalizeBigInt(bigintData.min, 'Min'),
max: normalizeBigInt(bigintData.max, 'Max'),
newKey: bigintData.key !== originalKey ? bigintData.key : undefined
});
}
</script>
<script lang="ts">
import { untrack } from 'svelte';
import { Layout } from '@appwrite.io/pink-svelte';
import { InputNumber } from '$lib/elements/forms';
import { createConservative } from '$lib/helpers/stores';
import RequiredArrayCheckboxes from './requiredArrayCheckboxes.svelte';
type Props = {
editing?: boolean;
disabled?: boolean;
data?: Partial<Models.ColumnBigint>;
};
let {
editing = false,
disabled = false,
data = $bindable({
required: false,
min: 0,
max: 0,
default: 0,
array: false
})
}: Props = $props();
let savedDefault = data.default;
function handleDefaultState(hideDefault: boolean) {
if (hideDefault) {
savedDefault = data.default;
data.default = null;
} else {
data.default = savedDefault;
}
}
const {
stores: { required, array },
listen
} = createConservative<Partial<Models.ColumnBigint>>({
required: false,
array: false,
...data
});
$effect(() => {
listen(data);
});
// untrack: handleDefaultState reads and writes data.default, which would make
// this effect depend on the state it writes and trigger an infinite update loop.
$effect(() => {
const hideDefault = $required || $array;
untrack(() => handleDefaultState(hideDefault));
});
</script>
<Layout.Stack direction="row" gap="s">
<InputNumber
id="min"
label="Min"
{disabled}
placeholder="Enter size"
step={1}
bind:value={data.min as number}
required={editing} />
<InputNumber
id="max"
label="Max"
{disabled}
placeholder="Enter size"
step={1}
bind:value={data.max as number}
required={editing} />
</Layout.Stack>
<InputNumber
id="default"
label="Default value"
placeholder="Enter value"
step={1}
min={data.min as number}
max={data.max as number}
bind:value={data.default as number}
disabled={data.required || data.array || disabled}
nullable={(!data.required && !data.array) || disabled} />
<RequiredArrayCheckboxes
{editing}
{disabled}
bind:array={data.array}
bind:required={data.required} />
@@ -4,6 +4,7 @@ import Boolean, { submitBoolean, updateBoolean } from './boolean.svelte';
import Email, { submitEmail, updateEmail } from './email.svelte';
import Enum, { submitEnum, updateEnum } from './enum.svelte';
import Float, { submitFloat, updateFloat } from './float.svelte';
import BigInt, { submitBigInt, updateBigInt } from './bigint.svelte';
import Integer, { submitInteger, updateInteger } from './integer.svelte';
import Ip, { submitIp, updateIp } from './ip.svelte';
import String, { submitString, updateString } from './string.svelte';
@@ -41,6 +42,7 @@ export type Option = {
| 'Mediumtext'
| 'Longtext'
| 'Varchar'
| 'BigInt'
| 'Integer'
| 'Float'
| 'Boolean'
@@ -62,6 +64,7 @@ export type Option = {
| 'mediumtext'
| 'longtext'
| 'varchar'
| 'bigint'
| 'integer'
| 'double'
| 'boolean'
@@ -125,6 +128,15 @@ export const columnOptions: Option[] = [
update: updateVarchar,
icon: IconText
},
{
name: 'BigInt',
sentenceName: 'bigint',
component: BigInt,
type: 'bigint',
create: submitBigInt,
update: updateBigInt,
icon: IconHashtag
},
{
name: 'Integer',
sentenceName: 'integer',
@@ -16,7 +16,16 @@
export let label: string;
export let array: boolean | undefined = undefined;
export let optionalText: string | undefined = undefined;
export let value: string | number | boolean | null | string[];
export let value:
| string
| number
| bigint
| boolean
| null
| string[]
| number[]
| bigint[]
| boolean[];
export let editing = false;
export let limited = false;
export let column:
@@ -24,6 +33,7 @@
| Models.ColumnEmail
| Models.ColumnEnum
| Models.ColumnFloat
| Models.ColumnBigint
| Models.ColumnInteger
| Models.ColumnIp
| Models.ColumnString
@@ -43,6 +53,7 @@
text: String,
mediumtext: String,
longtext: String,
bigint: Integer,
integer: Integer,
double: Integer,
boolean: Boolean,
@@ -24,6 +24,7 @@
| Models.ColumnText
| Models.ColumnMediumtext
| Models.ColumnLongtext
| Models.ColumnBigint
| Models.ColumnInteger
| Models.ColumnFloat
| Models.ColumnBoolean
@@ -51,6 +52,7 @@
if (!trimmed) return null;
switch (column.type) {
case 'bigint':
case 'integer': {
const int = parseInt(trimmed, 10);
return isNaN(int) ? null : int;
@@ -122,6 +124,7 @@
const getPlaceholder = () => {
if (!array) {
switch (column.type) {
case 'bigint':
case 'integer':
return 'Enter integer';
case 'double':
@@ -134,6 +137,7 @@
}
} else {
switch (column.type) {
case 'bigint':
case 'integer':
return 'Enter integers separated by commas';
case 'double':
@@ -14,7 +14,8 @@
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
import { tick } from 'svelte';
import { isRelationship, isRelationshipToMany } from './store';
import { isRelationship, isRelationshipToMany, buildPayload } from './store';
import type { RowValue } from './store';
import { hash } from '$lib/helpers/string';
type CreateRow = {
@@ -70,7 +71,7 @@
function prepareRowPayload(createRowObject: CreateRow): object {
const { row, columns } = createRowObject;
const payload = structuredClone(row);
const payload = structuredClone(row) as Record<string, RowValue>;
for (const column of columns) {
if (isRelationship(column) && !isRelationshipToMany(column)) {
@@ -79,7 +80,13 @@
if (value && typeof value === 'object') {
if (Array.isArray(value)) {
payload[key] = value.map((item) => item?.$id).filter(Boolean);
payload[key] = value
.map((item) =>
item && typeof item === 'object' && '$id' in item
? (item.$id as string)
: null
)
.filter(Boolean);
} else {
payload[key] = (value as { $id: string })['$id'];
}
@@ -87,7 +94,7 @@
}
}
return payload;
return buildPayload(columns, payload);
}
async function create(): Promise<boolean> {
@@ -10,7 +10,7 @@
import { invalidate } from '$app/navigation';
import { PROHIBITED_ROW_KEYS } from '../store';
import ColumnItem from './columns/columnItem.svelte';
import { isRelationship, isRelationshipToMany, isSpatialType } from './store';
import { isRelationship, isRelationshipToMany, isSpatialType, buildPayload } from './store';
import { Layout, Skeleton } from '@appwrite.io/pink-svelte';
import { deepClone } from '$lib/helpers/object';
import { type Entity, toRelationalField } from '$database/(entity)';
@@ -138,11 +138,13 @@
if (!row || !work) return;
try {
const payload = buildPayload(table.fields, $work);
await sdk.forProject(page.params.region, page.params.project).tablesDB.updateRow({
databaseId: table.databaseId,
tableId: table.$id,
rowId: row.$id,
data: $work,
data: payload,
permissions: $work.$permissions
});
@@ -11,7 +11,7 @@
import { PROHIBITED_ROW_KEYS } from '../store';
import { type Columns, buildWildcardEntitiesQuery } from '$database/store';
import RelatedRowColumns from './relatedRowColumns.svelte';
import { isRelationship, isRelationshipToMany } from './store';
import { isRelationship, isRelationshipToMany, buildPayload } from './store';
import { Accordion, Layout, Skeleton } from '@appwrite.io/pink-svelte';
import { deepClone } from '$lib/helpers/object';
import { preferences } from '$lib/stores/preferences';
@@ -254,11 +254,12 @@
const work = workData.get(rowId);
const workValue = get(work);
const payload = buildPayload(relatedTable.fields, workValue);
await sdk.forProject(page.params.region, page.params.project).tablesDB.updateRow({
databaseId,
tableId: relatedTable.$id,
rowId: rowId,
data: workValue,
data: payload,
permissions: workValue.$permissions
});
@@ -272,13 +273,14 @@
if (!work) return;
const workValue = get(work);
const payload = buildPayload(relatedTable.fields, workValue);
return sdk
.forProject(page.params.region, page.params.project)
.tablesDB.updateRow({
databaseId,
tableId: relatedTable.$id,
rowId: row.$id,
data: workValue,
data: payload,
permissions: workValue.$permissions
});
});
@@ -3,6 +3,12 @@ import type { Column } from '$lib/helpers/types';
import { type Models } from '@appwrite.io/console';
import type { Attributes, Columns } from '../../store';
type RowPrimitive = string | number | bigint | boolean | null | undefined;
interface RowObject {
[key: string]: RowValue;
}
export type RowValue = RowPrimitive | RowValue[] | RowObject;
export function isRelationshipToMany(field: Field) {
if (!field) return false;
if (!isRelationship(field)) return false;
@@ -50,3 +56,35 @@ export function isSpatialType(
return spatialTypes.includes(field.type.toLowerCase());
}
function castBigIntValue(value: RowValue): RowValue {
if (value === null || value === undefined || value === '') {
return value;
}
return String(value);
}
export function buildPayload<T extends Record<string, RowValue>>(
fields: Field[] | undefined,
row: T
): T {
const payload = structuredClone(row) as Record<string, RowValue>;
for (const field of fields ?? []) {
if (field.type !== 'bigint') {
continue;
}
const value = payload[field.key];
if (field.array && Array.isArray(value)) {
payload[field.key] = value.map((item) => castBigIntValue(item));
continue;
}
payload[field.key] = castBigIntValue(value);
}
return payload as T;
}
@@ -15,6 +15,7 @@
import {
isRelationship,
isRelationshipToMany,
buildPayload,
isSpatialType,
isTextType
} from '$database/table-[table]/rows/store';
@@ -359,6 +360,7 @@
switch (type) {
case 'string':
return IconText;
case 'bigint':
case 'double':
case 'integer':
return IconHashtag;
@@ -683,11 +685,13 @@
async function updateRowContents(row: Models.Row) {
try {
const payload = buildPayload(table.fields, row);
await sdk.forProject(page.params.region, page.params.project).tablesDB.updateRow({
databaseId,
tableId: table.$id,
rowId: row.$id,
data: row,
data: payload,
permissions: row.$permissions
});
@@ -121,6 +121,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).functions.createVariable({
functionId: func.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable.secret
@@ -90,6 +90,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).functions.createVariable({
functionId: func.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable?.secret ?? false
@@ -132,6 +132,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).functions.createVariable({
functionId: func.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable?.secret ?? false
@@ -190,6 +190,7 @@
.forProject(page.params.region, page.params.project)
.functions.createVariable({
functionId: func.$id,
variableId: ID.unique(),
key: variable.name,
value: variable.value,
secret: variable?.secret ?? false
@@ -30,9 +30,9 @@ export const load: PageLoad = async ({ depends, params, url, route, parent }) =>
Query.offset(offset),
Query.orderDesc(''),
Query.orderDesc('$updatedAt'),
...(search ? [Query.search('domain', search)] : []),
...parsedQueries.values()
],
search: search || undefined
]
});
const organizationDomains = await fetchOrganizationDomainsForRules(
@@ -73,7 +73,7 @@
try {
proxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId });
.proxy.updateRuleStatus({ ruleId });
await Promise.all([
invalidate(Dependencies.DOMAINS),
@@ -68,7 +68,7 @@
try {
selectedProxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
.proxy.updateRuleStatus({ ruleId: selectedProxyRule.$id });
await invalidate(Dependencies.FUNCTION_DOMAINS);
show = false;
@@ -211,7 +211,7 @@
<Layout.Stack gap="xs">
{#if headers}
{#each headers as [name, value], index}
{#each headers as _, index (index)}
<Layout.Stack direction="row" alignItems="flex-end">
<Input.ComboBox
fullWidth
@@ -221,14 +221,14 @@
hideEmpty
options={filteredKeyList}
id={`key-${index}`}
bind:value={name}
bind:search={name}>
bind:value={headers[index][0]}
bind:search={headers[index][0]}>
</Input.ComboBox>
<InputText
label={index === 0 ? 'Value' : ''}
placeholder="Enter value"
id={`value-${index}`}
bind:value>
bind:value={headers[index][1]}>
<span slot="info">
<Tooltip>
<Layout.Stack alignItems="center">
@@ -248,7 +248,9 @@
<Button
text
icon
disabled={(!name || !value) && index === 0}
disabled={(!headers[index][0] ||
!headers[index][1]) &&
index === 0}
on:click={() => {
if (index === 0) {
headers = [['', '']];
@@ -24,6 +24,7 @@
import UpdateVariables from '$routes/(console)/project-[region]-[project]/updateVariables.svelte';
import { page } from '$app/state';
import { Link } from '$lib/elements';
import { ID } from '@appwrite.io/console';
export let data;
let showAlert = true;
@@ -31,6 +32,7 @@
const sdkCreateVariable = async (key: string, value: string, secret?: boolean) => {
await sdk.forProject(page.params.region, page.params.project).functions.createVariable({
functionId: data.function.$id,
variableId: ID.unique(),
key,
value,
secret
@@ -142,23 +142,24 @@
routing.
</Typography.Text>
<Layout.Stack gap="s">
{#each $data as [key, value], index}
{#each $data as _, index (index)}
<Layout.Stack direction="row" alignItems="flex-end">
<InputText
id={`key-${index}`}
bind:value={key}
bind:value={$data[index][0]}
placeholder="Enter key"
label={index === 0 ? 'Key' : undefined} />
<Layout.Stack direction="row" alignItems="flex-end" gap="xs">
<InputText
id={`value-${index}`}
bind:value
bind:value={$data[index][1]}
placeholder="Enter value"
label={index === 0 ? 'Value' : undefined} />
<Button
icon
compact
disabled={(!key || !value) && index === 0}
disabled={(!$data[index][0] || !$data[index][1]) &&
index === 0}
on:click={() => {
if (index === 0 && $data?.length === 1) {
$data = [['', '']];
@@ -112,23 +112,24 @@
label="Media"
optionalText="(Optional)" />
<Layout.Stack gap="s">
{#each customData || [] as [key, value], index}
{#each customData || [] as _, index (index)}
<Layout.Stack direction="row" alignItems="flex-end">
<InputText
id={`key-${index}`}
bind:value={key}
bind:value={customData[index][0]}
placeholder="Enter key"
label={index === 0 ? 'Key' : undefined} />
<Layout.Stack direction="row" alignItems="flex-end" gap="xs">
<InputText
id={`value-${index}`}
bind:value
bind:value={customData[index][1]}
placeholder="Enter value"
label={index === 0 ? 'Value' : undefined} />
<Button
icon
compact
disabled={(!key || !value) && index === 0}
disabled={(!customData[index][0] || !customData[index][1]) &&
index === 0}
on:click={() => {
if (customData.length === 1) {
customData = [['', '']];
@@ -186,7 +186,7 @@
const { detail } = event;
if (detail === 'indeterminate') return;
filteredScopes.forEach((s) => {
if (s.category === category && !s.deprecated) {
if (s.category === category) {
activeScopes[s.scope] = detail;
}
});
@@ -217,7 +217,7 @@
{@const checked = categoryState(category, scopes)}
{@const isLastItem = index === categories.length - 1}
{@const scopesLength = filteredScopes.filter(
(n) => n.category === category && effectiveScopes.includes(n.scope)
(n) => n.category === category && activeScopes[n.scope]
).length}
<Accordion
selectable
@@ -24,9 +24,9 @@ export const load: PageLoad = async ({ depends, url, route, params, parent }) =>
queries: [
Query.equal('type', RuleType.API),
Query.equal('trigger', RuleTrigger.MANUAL),
...(search ? [Query.search('domain', search)] : []),
Query.orderDesc('$updatedAt')
],
search: search || undefined
]
});
const organizationDomains = await fetchOrganizationDomainsForRules(rules, organization.$id);
@@ -72,7 +72,7 @@
try {
proxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId });
.proxy.updateRuleStatus({ ruleId });
await invalidate(Dependencies.DOMAINS);
await goto(routeBase);
@@ -68,7 +68,7 @@
try {
selectedProxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
.proxy.updateRuleStatus({ ruleId: selectedProxyRule.$id });
await invalidate(Dependencies.DOMAINS);
show = false;
@@ -33,6 +33,9 @@
messaging: {
root: 'Messaging',
messages: 'Include messages'
},
backups: {
root: 'Backup policies'
}
};
@@ -56,6 +59,9 @@
messaging: {
root: 'Import all messaging providers, topics and subscribers',
messages: 'Import all messages'
},
backups: {
root: 'Import all backup policies'
}
};
@@ -171,6 +171,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).sites.createVariable({
siteId: site.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable.secret
@@ -93,6 +93,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).sites.createVariable({
siteId: site.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable?.secret ?? false
@@ -143,6 +143,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).sites.createVariable({
siteId: site.$id,
variableId: ID.unique(),
key: variable.key,
value: variable.value,
secret: variable?.secret ?? false
@@ -151,6 +151,7 @@
const promises = variables.map((variable) =>
sdk.forProject(page.params.region, page.params.project).sites.createVariable({
siteId: site.$id,
variableId: ID.unique(),
key: variable.name,
value: variable.value,
secret: variable?.secret ?? false
@@ -29,9 +29,9 @@ export const load = async ({ params, depends, url, route, parent }) => {
Query.offset(offset),
Query.orderDesc(''),
Query.orderDesc('$updatedAt'),
...(search ? [Query.search('domain', search)] : []),
...parsedQueries.values()
],
search: search || undefined
]
});
const organizationDomains = await fetchOrganizationDomainsForRules(
@@ -72,7 +72,7 @@
try {
proxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId });
.proxy.updateRuleStatus({ ruleId });
await Promise.all([
invalidate(Dependencies.DOMAINS),
@@ -68,7 +68,7 @@
try {
selectedProxyRule = await sdk
.forProject(page.params.region, page.params.project)
.proxy.updateRuleVerification({ ruleId: selectedProxyRule.$id });
.proxy.updateRuleStatus({ ruleId: selectedProxyRule.$id });
await invalidate(Dependencies.SITES_DOMAINS);
show = false;
@@ -17,12 +17,14 @@
import UpdateVariables from '$routes/(console)/project-[region]-[project]/updateVariables.svelte';
import UpdateLogging from './updateLogging.svelte';
import UpdateDeploymentRetention from './updateDeploymentRetention.svelte';
import { ID } from '@appwrite.io/console';
export let data;
const sdkCreateVariable = async (key: string, value: string, secret: boolean) => {
await sdk.forProject(page.params.region, page.params.project).sites.createVariable({
siteId: page.params.site,
variableId: ID.unique(),
key,
value,
secret