Skip to content

feat: API specs update for version 1.9.x#63

Merged
ChiragAgg5k merged 1 commit intomainfrom
feat-1.9.x-specs
May 6, 2026
Merged

feat: API specs update for version 1.9.x#63
ChiragAgg5k merged 1 commit intomainfrom
feat-1.9.x-specs

Conversation

@appwrite-specs
Copy link
Copy Markdown

@appwrite-specs appwrite-specs Bot commented May 6, 2026

This PR contains API specification updates for version 1.9.x.

@ChiragAgg5k ChiragAgg5k merged commit 26e43f2 into main May 6, 2026
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the feat-1.9.x-specs branch May 6, 2026 05:39
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 6, 2026

Greptile Summary

This PR updates the Appwrite 1.9.x API specs with a new suggestQueries console endpoint, Session authentication on existing console endpoints, DevKey/Cookie security scheme definitions across client and server specs, and scope-array promotion for backup and project policy endpoints.

  • New endpointGET /console/suggestions/queries (suggestQueries) accepts a type enum, free-text input, and optional databaseId/tableId, returning AI-generated Appwrite query objects; marked public: true with Project-only security.
  • Security additionsSession scheme added to ~30 existing console endpoints; DevKey and Cookie security definitions added to client and server specs.
  • Scope promotion — Backup and project policy endpoints now accept paired scope arrays, consistent with the pre-existing pattern used by execution endpoints.

Confidence Score: 4/5

Safe to merge after fixing the console variable shadowing in the example file.

The spec changes are largely mechanical and consistent; the only defect is in the generated example file where a naming collision causes console.log(result) to throw at runtime.

examples/1.9.x/console-web/examples/console/suggest-queries.md needs the console variable renamed to avoid shadowing the global.

Important Files Changed

Filename Overview
examples/1.9.x/console-web/examples/console/suggest-queries.md New code example for suggestQueries — variable named console shadows the global console, making console.log(result) throw a TypeError at runtime.
specs/1.9.x/open-api3-1.9.x-console.json Adds new /console/suggestions/queries endpoint; adds Session security scheme to ~30 existing endpoints; increments weights; scope fields for policy endpoints promoted from string to array.
specs/1.9.x/open-api3-1.9.x-server.json Adds DevKey and Cookie security scheme definitions; promotes policy endpoint scope fields to arrays; adds new scope values to API key enum.
specs/1.9.x/open-api3-1.9.x-client.json Adds Cookie security scheme definition; weight increments for createFile and deleteMembership.
specs/1.9.x/swagger2-1.9.x-console.json Swagger 2 mirror of OpenAPI 3 console changes — adds suggestQueries endpoint, Session/DevKey security definitions, scope array promotions, weight updates.
specs/1.9.x/swagger2-1.9.x-server.json Swagger 2 mirror of OpenAPI 3 server changes — adds DevKey/Cookie security definitions, scope array promotions, weight updates.
specs/1.9.x/swagger2-1.9.x-client.json Swagger 2 mirror of OpenAPI 3 client changes — weight increments for createFile and deleteMembership.

Reviews (1): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile

Comment on lines +8 to +17
const console = new Console(client);

const result = await console.suggestQueries({
type: Type.Activities,
input: '<INPUT>',
databaseId: '<DATABASE_ID>', // optional
tableId: '<TABLE_ID>' // optional
});

console.log(result);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The local variable console shadows the built-in global console object. After const console = new Console(client), the identifier console refers to the Appwrite service instance, so console.log(result) will throw a TypeError: console.log is not a function at runtime.

Suggested change
const console = new Console(client);
const result = await console.suggestQueries({
type: Type.Activities,
input: '<INPUT>',
databaseId: '<DATABASE_ID>', // optional
tableId: '<TABLE_ID>' // optional
});
console.log(result);
const appwriteConsole = new Console(client);
const result = await appwriteConsole.suggestQueries({
type: Type.Activities,
input: '<INPUT>',
databaseId: '<DATABASE_ID>', // optional
tableId: '<TABLE_ID>' // optional
});
console.log(result);

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.

1 participant