Skip to content

feat: SDK update for version 12.0.0#88

Merged
ChiragAgg5k merged 3 commits intomainfrom
dev
May 4, 2026
Merged

feat: SDK update for version 12.0.0#88
ChiragAgg5k merged 3 commits intomainfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented May 4, 2026

This PR contains updates to the SDK for version 12.0.0.

What's Changed

  • Breaking: Renamed AuthMethod enum to MethodId
  • Breaking: Replaced Projects.updateAuthStatus with Project.updateAuthMethod
  • Breaking: Replaced Projects.updateOAuth2 with per-provider methods on Project service (e.g. updateOAuth2Google, updateOAuth2GitHub)
  • Breaking: Replaced Projects.updateMockNumbers with listMockPhones, createMockPhone, getMockPhone, updateMockPhone, deleteMockPhone on Project service
  • Breaking: Replaced Projects.createJWT with Project.createEphemeralKey
  • Breaking: Moved delete from Projects to Project service
  • Breaking: Renamed execution.read/execution.write scopes to executions.read/executions.write
  • Breaking: Renamed domainId parameter to invoiceId in domains.updatePurchase and domains.updateTransferIn
  • Added: Manager service with createBlock, deleteBlock, listBlocks methods
  • Added: listEmailTemplates, listOAuth2Providers, getOAuth2Provider, listPolicies, getPolicy methods on Project service
  • Added: createPlanEstimation method on Organizations service
  • Added: listOAuth2Providers and listProjectScopes methods on Console service
  • Added: fusionauth, keycloak, kick to OAuthProvider enum
  • Added: MethodId, PolicyId enums
  • Added: mocks.read, mocks.write, sessions.read scopes
  • Added: rust-1.83 runtime
  • Added: backup-policy to AppwriteMigrationResource enum
  • Added: Plural ResourceType values (projects, functions, sites, databases, buckets, providers, topics, subscribers, messages)
  • Added: Models for ephemeral keys, mock numbers, email templates, policies, and per-provider OAuth2 settings
  • Updated: X-Appwrite-Response-Format header to 1.9.3

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR delivers the SDK update for version 12.0.0, introducing the new Manager service, migrating single-project operations to the Project service (breaking), expanding OAuth2 provider methods, adding mock-phone and policy APIs, and updating the response-format header to 1.9.3.

  • P1 — Missing BillingPlan enum: The PR description lists BillingPlan as an added enum, but no src/enums/billing-plan.ts file was created and nothing is exported from src/index.ts. The billingPlan parameter in Organizations.createPlanEstimation is therefore typed as string, allowing invalid plan IDs to pass through without a compile-time error.

Confidence Score: 4/5

Safe to merge after resolving the missing BillingPlan enum; all other breaking changes appear correctly implemented

One P1 finding: the BillingPlan enum claimed in the PR description is absent, leaving billingPlan as an untyped string in createPlanEstimation. No P0 issues found. The rest of the SDK changes (service migrations, new enums, scopes, models) look consistent and complete.

src/services/organizations.ts — missing BillingPlan enum for the billingPlan parameter

Important Files Changed

Filename Overview
src/services/organizations.ts Adds createPlanEstimation method; billingPlan parameter is untyped string — the BillingPlan enum claimed in the PR description is absent from the codebase
src/services/project.ts Large addition of new auth, mock-phone, email-template, policy, and per-provider OAuth2 methods; logic looks consistent, getOAuth2Provider provider typing already flagged in a prior thread
src/services/manager.ts New Manager service with createBlock, deleteBlock, listBlocks, and updateUserStatus; logic and path construction look correct
src/services/domains.ts Breaking rename of domainIdinvoiceId in updatePurchase and updateTransferIn correctly propagated to both signatures and path templates
src/index.ts Exports MethodId, PolicyId, and Manager as expected; BillingPlan enum is absent from exports, consistent with the missing enum file
src/enums/scopes.ts Adds sessions.read, executions.read/write, mocks.read/write, and several project-management scopes; existing SessionsWrite retained, no enum values dropped
src/enums/method-id.ts Renamed from auth-method.ts; values unchanged, correctly exported from src/index.ts

Reviews (2): Last reviewed commit: "fix: blacklist BillingPlan enum, reword ..." | Re-trigger Greptile

Comment thread src/services/project.ts
Comment on lines +3968 to +3984
getOAuth2Provider(params: { provider: string }): Promise<Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft>;
/**
* Update the project labels. Labels can be used to easily filter projects in an organization.
* Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key/team IDs) are write-only and always returned empty.
*
* @param {string[]} labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
* @param {string} provider - OAuth2 provider key. For example: github, google, apple.
* @throws {AppwriteException}
* @returns {Promise<Models.Project>}
* @returns {Promise<Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateLabels(labels: string[]): Promise<Models.Project>;
updateLabels(
paramsOrFirst: { labels: string[] } | string[]
): Promise<Models.Project> {
let params: { labels: string[] };
getOAuth2Provider(provider: string): Promise<Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft>;
getOAuth2Provider(
paramsOrFirst: { provider: string } | string
): Promise<Models.OAuth2Github | Models.OAuth2Discord | Models.OAuth2Figma | Models.OAuth2Dropbox | Models.OAuth2Dailymotion | Models.OAuth2Bitbucket | Models.OAuth2Bitly | Models.OAuth2Box | Models.OAuth2Autodesk | Models.OAuth2Google | Models.OAuth2Zoom | Models.OAuth2Zoho | Models.OAuth2Yandex | Models.OAuth2X | Models.OAuth2WordPress | Models.OAuth2Twitch | Models.OAuth2Stripe | Models.OAuth2Spotify | Models.OAuth2Slack | Models.OAuth2Podio | Models.OAuth2Notion | Models.OAuth2Salesforce | Models.OAuth2Yahoo | Models.OAuth2Linkedin | Models.OAuth2Disqus | Models.OAuth2Amazon | Models.OAuth2Etsy | Models.OAuth2Facebook | Models.OAuth2Tradeshift | Models.OAuth2Paypal | Models.OAuth2Gitlab | Models.OAuth2Authentik | Models.OAuth2Auth0 | Models.OAuth2FusionAuth | Models.OAuth2Keycloak | Models.OAuth2Oidc | Models.OAuth2Apple | Models.OAuth2Okta | Models.OAuth2Kick | Models.OAuth2Microsoft> {
let params: { provider: string };

if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
params = (paramsOrFirst || {}) as { labels: string[] };
params = (paramsOrFirst || {}) as { provider: string };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 getOAuth2Provider accepts any string instead of OAuthProvider enum

The provider parameter is typed as string rather than OAuthProvider, which loses compile-time validation. Callers can silently pass an invalid provider name (e.g. a typo like 'githb') and only receive a runtime API error rather than a TypeScript error. The old Projects.updateOAuth2 used OAuthProvider for the same purpose.

Comment thread src/enums/billing-plan.ts Outdated
Comment thread src/enums/billing-plan.ts Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread src/services/organizations.ts
@ChiragAgg5k ChiragAgg5k merged commit ce98298 into main May 4, 2026
1 check passed
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.

3 participants