Skip to content

feat: SDK update for version 12.1.0#89

Merged
ChiragAgg5k merged 1 commit into
mainfrom
dev
May 6, 2026
Merged

feat: SDK update for version 12.1.0#89
ChiragAgg5k merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented May 6, 2026

This PR contains updates to the SDK for version 12.1.0.

What's Changed

  • Added: setSession method on Client for X-Appwrite-Session authentication
  • Added: setDevKey method on Client for X-Appwrite-Dev-Key authentication
  • Added: suggestQueries method on Console service
  • Added: QuerySuggestionResource enum for supported list resource types
  • Added: project.policies.read, project.policies.write, backups.policies.read, backups.policies.write scopes
  • Updated: setCookie documentation clarified for server-side runtimes

@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 12.1.0 feat: SDK update for version 12.1.0 May 6, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 6, 2026

Greptile Summary

This PR updates the SDK to version 12.1.0, adding setSession and setDevKey auth methods to Client, a suggestQueries method on the Console service, a new QuerySuggestionResource enum, four new Scopes entries, and fixes the console variable shadowing across all docs examples by renaming to xconsole.

  • src/client.ts: session is now a required string (defaulting to '') instead of optional; existing falsy guards in realtime.ts and client.ts are unaffected.
  • src/services/console.ts: suggestQueries supports both positional and object-param calling styles via TypeScript overloads; the runtime dispatch correctly distinguishes the two based on typeof paramsOrFirst === 'object'.
  • Docs examples: All console examples renamed the service variable from console to xconsole, resolving the previous shadowing issue where console.log called a non-existent method on the service.

Confidence Score: 5/5

This PR is safe to merge — all changes are additive SDK surface additions with no breaking behavioral changes.

All changes are additive: new methods on Client and Console, a new enum, new scope values, version bumps, and documentation fixes. The session config field type narrowing from optional to required string is backward-compatible given the falsy guard pattern used throughout. No existing call paths are altered.

No files require special attention beyond the missing newline in src/enums/query-suggestion-resource.ts.

Important Files Changed

Filename Overview
src/client.ts Adds setSession and setDevKey auth methods; changes session from optional to required string (defaults to ''); existing falsy checks are unaffected.
src/services/console.ts Adds suggestQueries with positional and object-param overloads; dispatch logic correctly distinguishes object vs string first arg at runtime.
src/enums/query-suggestion-resource.ts New 74-entry enum for query suggestion resources; missing newline at end of file (same pattern previously flagged in other enums).
src/enums/scopes.ts Adds four new scope entries (project.policies.read/write, backups.policies.read/write) in appropriate positions.
.github/workflows/publish.yml Bumps actions/checkout and actions/setup-node to v6; Node version updated to 24.14.1.
src/index.ts Exports the new QuerySuggestionResource enum.
docs/examples/console/suggest-queries.md New example for suggestQueries; correctly uses xconsole for the service variable and global console.log for output.

Reviews (5): Last reviewed commit: "chore: update Console SDK to 12.1.0" | Re-trigger Greptile

Comment thread docs/examples/console/suggest-queries.md
@ChiragAgg5k ChiragAgg5k merged commit 0da2748 into main May 6, 2026
1 check passed
@ChiragAgg5k ChiragAgg5k deleted the dev branch May 6, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants