diff --git a/bun.lock b/bun.lock index c52ea137a..dd454ea32 100644 --- a/bun.lock +++ b/bun.lock @@ -6,7 +6,7 @@ "name": "@appwrite/console", "dependencies": { "@ai-sdk/svelte": "^1.1.24", - "@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@a1b2dc2", + "@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@1fb0624", "@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", @@ -113,7 +113,7 @@ "@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@a1b2dc2", { "dependencies": { "json-bigint": "1.0.0" } }], + "@appwrite.io/console": ["@appwrite.io/console@https://pkg.vc/-/@appwrite/@appwrite.io/console@1fb0624", { "dependencies": { "json-bigint": "1.0.0" } }], "@appwrite.io/pink-icons": ["@appwrite.io/pink-icons@0.25.0", "", {}, "sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q=="], diff --git a/package.json b/package.json index 28a162596..175ccc005 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@ai-sdk/svelte": "^1.1.24", - "@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@a1b2dc2", + "@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@1fb0624", "@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", diff --git a/src/lib/sdk/compat.ts b/src/lib/sdk/compat.ts deleted file mode 100644 index 0f4faca6b..000000000 --- a/src/lib/sdk/compat.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SDK compatibility shims for exports missing from the current - * @appwrite.io/console SDK version (a1b2dc2). - * - * @todo Remove once the SDK is updated to include both BAA addon - * methods and the newer TablesDB types. - */ - -export enum TablesDBIndexType { - Key = 'key', - Fulltext = 'fulltext', - Unique = 'unique', - Spatial = 'spatial' -} diff --git a/src/lib/sdk/webhooks.ts b/src/lib/sdk/webhooks.ts deleted file mode 100644 index 208743a84..000000000 --- a/src/lib/sdk/webhooks.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Webhooks SDK compatibility shim. - * - * @todo Remove once @appwrite.io/console is updated to include both BAA addon - * methods and the Webhooks class (currently split across two SDK commits). - */ -import type { Client, Models } from '@appwrite.io/console'; - -export class Webhooks { - private client: Client; - - constructor(client: Client) { - this.client = client; - } - - async list(params?: { queries?: string[]; total?: boolean }): Promise { - const payload: Record = {}; - if (params?.queries !== undefined) payload['queries'] = params.queries; - if (params?.total !== undefined) payload['total'] = params.total; - const uri = new URL(this.client.config.endpoint + '/webhooks'); - return this.client.call('get', uri, {}, payload); - } - - async create(params: { - webhookId: string; - url: string; - name: string; - events: string[]; - enabled?: boolean; - security?: boolean; - httpUser?: string; - httpPass?: string; - }): Promise { - const payload: Record = {}; - for (const [key, value] of Object.entries(params)) { - if (value !== undefined) payload[key] = value; - } - const uri = new URL(this.client.config.endpoint + '/webhooks'); - return this.client.call('post', uri, { 'content-type': 'application/json' }, payload); - } - - async get(params: { webhookId: string }): Promise { - const uri = new URL(this.client.config.endpoint + `/webhooks/${params.webhookId}`); - return this.client.call('get', uri, {}, {}); - } - - async update(params: { - webhookId: string; - name: string; - url: string; - events: string[]; - enabled?: boolean; - security?: boolean; - httpUser?: string; - httpPass?: string; - }): Promise { - const { webhookId, ...rest } = params; - const payload: Record = {}; - for (const [key, value] of Object.entries(rest)) { - if (value !== undefined) payload[key] = value; - } - const uri = new URL(this.client.config.endpoint + `/webhooks/${webhookId}`); - return this.client.call('put', uri, { 'content-type': 'application/json' }, payload); - } - - async delete(params: { webhookId: string }): Promise { - const uri = new URL(this.client.config.endpoint + `/webhooks/${params.webhookId}`); - return this.client.call('delete', uri, { 'content-type': 'application/json' }, {}); - } - - async updateSignature(params: { webhookId: string }): Promise { - const uri = new URL( - this.client.config.endpoint + `/webhooks/${params.webhookId}/signature` - ); - return this.client.call('patch', uri, { 'content-type': 'application/json' }, {}); - } -} diff --git a/src/lib/stores/sdk.ts b/src/lib/stores/sdk.ts index e67c3b1f8..717200283 100644 --- a/src/lib/stores/sdk.ts +++ b/src/lib/stores/sdk.ts @@ -25,11 +25,10 @@ import { Domains, /*DocumentsDB,*/ Realtime, - // @todo: import Webhooks from '@appwrite.io/console' once SDK includes both BAA + Webhooks + Webhooks, Organizations } from '@appwrite.io/console'; import { Sources } from '$lib/sdk/sources'; -import { Webhooks } from '$lib/sdk/webhooks'; import { REGION_FRA, REGION_NYC, diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/create.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/create.svelte index 2feb8f865..7d9fe7f5e 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/create.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/create.svelte @@ -1,6 +1,6 @@