From 51c0c3da7f96a456da3e1b8cf99065b85ffa4a07 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 May 2026 14:04:04 +0000 Subject: [PATCH 1/2] chore: update Console SDK to 12.2.0 --- .github/workflows/publish.yml | 4 ++-- .../console/create-program-membership.md | 4 ++-- docs/examples/console/create-source.md | 4 ++-- docs/examples/console/get-campaign.md | 4 ++-- docs/examples/console/get-coupon.md | 4 ++-- docs/examples/console/get-plan.md | 4 ++-- docs/examples/console/get-plans.md | 4 ++-- docs/examples/console/get-program.md | 4 ++-- docs/examples/console/get-resource.md | 4 ++-- .../console/list-o-auth-2-providers.md | 4 ++-- docs/examples/console/list-project-scopes.md | 4 ++-- docs/examples/console/list-regions.md | 4 ++-- docs/examples/console/suggest-columns.md | 4 ++-- docs/examples/console/suggest-indexes.md | 4 ++-- docs/examples/console/suggest-queries.md | 4 ++-- docs/examples/console/variables.md | 4 ++-- docs/examples/vcs/list-repository-branches.md | 2 +- src/client.ts | 2 -- src/services/vcs.ts | 18 +++++++++--------- 19 files changed, 42 insertions(+), 44 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e6ea266e..47ba2484 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '24.14.1' registry-url: 'https://registry.npmjs.org' diff --git a/docs/examples/console/create-program-membership.md b/docs/examples/console/create-program-membership.md index fa19b0c8..23ed45d7 100644 --- a/docs/examples/console/create-program-membership.md +++ b/docs/examples/console/create-program-membership.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.createProgramMembership({ +const result = await xconsole.createProgramMembership({ programId: '' }); diff --git a/docs/examples/console/create-source.md b/docs/examples/console/create-source.md index a5283da5..b6307b1d 100644 --- a/docs/examples/console/create-source.md +++ b/docs/examples/console/create-source.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.createSource({ +const result = await xconsole.createSource({ ref: '', // optional referrer: 'https://example.com', // optional utmSource: '', // optional diff --git a/docs/examples/console/get-campaign.md b/docs/examples/console/get-campaign.md index 703c6e31..e9d41aeb 100644 --- a/docs/examples/console/get-campaign.md +++ b/docs/examples/console/get-campaign.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getCampaign({ +const result = await xconsole.getCampaign({ campaignId: '' }); diff --git a/docs/examples/console/get-coupon.md b/docs/examples/console/get-coupon.md index 74c7a579..716d26a5 100644 --- a/docs/examples/console/get-coupon.md +++ b/docs/examples/console/get-coupon.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getCoupon({ +const result = await xconsole.getCoupon({ couponId: '' }); diff --git a/docs/examples/console/get-plan.md b/docs/examples/console/get-plan.md index 4c860725..7171de67 100644 --- a/docs/examples/console/get-plan.md +++ b/docs/examples/console/get-plan.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getPlan({ +const result = await xconsole.getPlan({ planId: '' }); diff --git a/docs/examples/console/get-plans.md b/docs/examples/console/get-plans.md index 546c7286..c5d846a4 100644 --- a/docs/examples/console/get-plans.md +++ b/docs/examples/console/get-plans.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getPlans({ +const result = await xconsole.getPlans({ platform: Platform.Appwrite // optional }); diff --git a/docs/examples/console/get-program.md b/docs/examples/console/get-program.md index 038cf5f3..5e19bcf0 100644 --- a/docs/examples/console/get-program.md +++ b/docs/examples/console/get-program.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getProgram({ +const result = await xconsole.getProgram({ programId: '' }); diff --git a/docs/examples/console/get-resource.md b/docs/examples/console/get-resource.md index 706d96ea..699a83dd 100644 --- a/docs/examples/console/get-resource.md +++ b/docs/examples/console/get-resource.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.getResource({ +const result = await xconsole.getResource({ value: '', type: ConsoleResourceType.Rules }); diff --git a/docs/examples/console/list-o-auth-2-providers.md b/docs/examples/console/list-o-auth-2-providers.md index d26800b2..278d16da 100644 --- a/docs/examples/console/list-o-auth-2-providers.md +++ b/docs/examples/console/list-o-auth-2-providers.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.listOAuth2Providers(); +const result = await xconsole.listOAuth2Providers(); console.log(result); ``` diff --git a/docs/examples/console/list-project-scopes.md b/docs/examples/console/list-project-scopes.md index b1cb8034..f59300a3 100644 --- a/docs/examples/console/list-project-scopes.md +++ b/docs/examples/console/list-project-scopes.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.listProjectScopes(); +const result = await xconsole.listProjectScopes(); console.log(result); ``` diff --git a/docs/examples/console/list-regions.md b/docs/examples/console/list-regions.md index 5d49fee7..ef750a85 100644 --- a/docs/examples/console/list-regions.md +++ b/docs/examples/console/list-regions.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.listRegions(); +const result = await xconsole.listRegions(); console.log(result); ``` diff --git a/docs/examples/console/suggest-columns.md b/docs/examples/console/suggest-columns.md index 32daa104..50e866ed 100644 --- a/docs/examples/console/suggest-columns.md +++ b/docs/examples/console/suggest-columns.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.suggestColumns({ +const result = await xconsole.suggestColumns({ databaseId: '', tableId: '', context: '', // optional diff --git a/docs/examples/console/suggest-indexes.md b/docs/examples/console/suggest-indexes.md index e59e3377..3014fc3d 100644 --- a/docs/examples/console/suggest-indexes.md +++ b/docs/examples/console/suggest-indexes.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.suggestIndexes({ +const result = await xconsole.suggestIndexes({ databaseId: '', tableId: '', min: 1, // optional diff --git a/docs/examples/console/suggest-queries.md b/docs/examples/console/suggest-queries.md index 7e00cea7..cbffccc2 100644 --- a/docs/examples/console/suggest-queries.md +++ b/docs/examples/console/suggest-queries.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.suggestQueries({ +const result = await xconsole.suggestQueries({ resource: QuerySuggestionResource.Activities, input: '', databaseId: '', // optional diff --git a/docs/examples/console/variables.md b/docs/examples/console/variables.md index d8c4077d..3eafec11 100644 --- a/docs/examples/console/variables.md +++ b/docs/examples/console/variables.md @@ -5,9 +5,9 @@ const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject(''); // Your project ID -const console = new Console(client); +const xconsole = new Console(client); -const result = await console.variables(); +const result = await xconsole.variables(); console.log(result); ``` diff --git a/docs/examples/vcs/list-repository-branches.md b/docs/examples/vcs/list-repository-branches.md index 97bf9296..2943996f 100644 --- a/docs/examples/vcs/list-repository-branches.md +++ b/docs/examples/vcs/list-repository-branches.md @@ -11,7 +11,7 @@ const result = await vcs.listRepositoryBranches({ installationId: '', providerRepositoryId: '', search: '', // optional - queries: '' // optional + queries: [] // optional }); console.log(result); diff --git a/src/client.ts b/src/client.ts index fcd273d1..77a14b78 100644 --- a/src/client.ts +++ b/src/client.ts @@ -366,7 +366,6 @@ class Client { impersonateuserphone: string; platform: string; selfSigned: boolean; - session?: string; } = { endpoint: 'https://cloud.appwrite.io/v1', endpointRealtime: '', @@ -383,7 +382,6 @@ class Client { impersonateuserphone: '', platform: '', selfSigned: false, - session: undefined, }; /** * Custom headers for API requests. diff --git a/src/services/vcs.ts b/src/services/vcs.ts index 6bbaa411..22c23c5e 100644 --- a/src/services/vcs.ts +++ b/src/services/vcs.ts @@ -306,11 +306,11 @@ export class Vcs { * @param {string} params.installationId - Installation Id * @param {string} params.providerRepositoryId - Repository Id * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. - * @param {string} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit, offset, cursorAfter, and cursorBefore + * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit, offset, cursorAfter, and cursorBefore * @throws {AppwriteException} * @returns {Promise} */ - listRepositoryBranches(params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string }): Promise; + listRepositoryBranches(params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string[] }): Promise; /** * Get a list of branches from a GitHub repository in your installation. This endpoint supports filtering by a search term and pagination using query strings such as `Query.limit()`, `Query.offset()`, `Query.cursorAfter()`, and `Query.cursorBefore()`. It returns branch names along with the total number of matches. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work. * @@ -318,26 +318,26 @@ export class Vcs { * @param {string} installationId - Installation Id * @param {string} providerRepositoryId - Repository Id * @param {string} search - Search term to filter your list results. Max length: 256 chars. - * @param {string} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit, offset, cursorAfter, and cursorBefore + * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit, offset, cursorAfter, and cursorBefore * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listRepositoryBranches(installationId: string, providerRepositoryId: string, search?: string, queries?: string): Promise; + listRepositoryBranches(installationId: string, providerRepositoryId: string, search?: string, queries?: string[]): Promise; listRepositoryBranches( - paramsOrFirst: { installationId: string, providerRepositoryId: string, search?: string, queries?: string } | string, - ...rest: [(string)?, (string)?, (string)?] + paramsOrFirst: { installationId: string, providerRepositoryId: string, search?: string, queries?: string[] } | string, + ...rest: [(string)?, (string)?, (string[])?] ): Promise { - let params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string }; + let params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string[] }; if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) { - params = (paramsOrFirst || {}) as { installationId: string, providerRepositoryId: string, search?: string, queries?: string }; + params = (paramsOrFirst || {}) as { installationId: string, providerRepositoryId: string, search?: string, queries?: string[] }; } else { params = { installationId: paramsOrFirst as string, providerRepositoryId: rest[0] as string, search: rest[1] as string, - queries: rest[2] as string + queries: rest[2] as string[] }; } From b9b6823aaa2ec4c9e0fd0b4dd4bbe4da15cc7159 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 May 2026 14:15:57 +0000 Subject: [PATCH 2/2] chore: update Console SDK to 12.2.0 --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 47ba2484..e6ea266e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v4 with: node-version: '24.14.1' registry-url: 'https://registry.npmjs.org'