Skip to content

feat: SDK update for version 13.0.0#93

Merged
ArnabChatterjee20k merged 1 commit into
mainfrom
dev
May 12, 2026
Merged

feat: SDK update for version 13.0.0#93
ArnabChatterjee20k merged 1 commit into
mainfrom
dev

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

@ArnabChatterjee20k ArnabChatterjee20k commented May 12, 2026

This PR contains updates to the SDK for version 13.0.0.

What's Changed

  • Breaking: Renamed updateCanonicalEmails to updateDenyCanonicalEmailPolicy on Project service
  • Breaking: Renamed updateDisposableEmails to updateDenyDisposableEmailPolicy on Project service
  • Breaking: Renamed updateFreeEmails to updateDenyFreeEmailPolicy on Project service
  • Added: prompt parameter on updateOAuth2Google for Google OAuth2 prompt configuration
  • Added: Prompt and OAuth2GooglePrompt enums
  • Added: prompt field on OAuth2Google model

@ArnabChatterjee20k ArnabChatterjee20k changed the title feat: Console SDK update for version 13.0.0 feat: SDK update for version 13.0.0 May 12, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR ships the Console SDK 13.0.0 release, renaming three email-policy methods and adding a prompt parameter to updateOAuth2Google along with two new enums (Prompt, OAuth2GooglePrompt).

  • Three methods renamed to align with new API paths: updateCanonicalEmailsupdateDenyCanonicalEmailPolicy, updateDisposableEmailsupdateDenyDisposableEmailPolicy, updateFreeEmailsupdateDenyFreeEmailPolicy.
  • updateOAuth2Google gains an optional prompt?: Prompt[] parameter; the matching response model field uses OAuth2GooglePrompt[] — a separate enum type with identical values — creating a type mismatch between input and output that will cause TypeScript errors in read-then-write usage.
  • Two new enums (Prompt, OAuth2GooglePrompt) are added and exported; both are missing trailing newlines.

Confidence Score: 3/5

The breaking renames and version bump are straightforward, but the Google OAuth2 prompt feature ships with an input/output type inconsistency that will surface as TypeScript compilation errors for any caller that reads and then reuses prompt values from the returned model.

The method signature for updateOAuth2Google uses Prompt[] while the OAuth2Google model returns OAuth2GooglePrompt[]. These are two distinct string enum types in TypeScript, so a user who reads googleConfig.prompt and passes it back into the function will hit a type error. The fix is small (align the types), but the bug is present in the released public surface area.

src/services/project.ts and src/models.ts — the prompt parameter type and model field type need to be reconciled.

Important Files Changed

Filename Overview
src/services/project.ts Removed old email policy methods and added new ones targeting new API paths; added prompt parameter to updateOAuth2Google using Prompt[] type, which conflicts with OAuth2GooglePrompt[] used in the response model.
src/enums/prompt.ts New Prompt enum with None/Consent/SelectAccount values; duplicates OAuth2GooglePrompt exactly and is missing a trailing newline.
src/enums/o-auth-2-google-prompt.ts New OAuth2GooglePrompt enum used in Models.OAuth2Google; identical values to Prompt but a different type — missing trailing newline.
src/models.ts Added prompt: OAuth2GooglePrompt[] field to the OAuth2Google model; import and field look correct.
src/index.ts Exports both Prompt and OAuth2GooglePrompt; additions are placed correctly alongside sibling enums.
.github/workflows/publish.yml Bumped actions/checkout and actions/setup-node from v4 to v6 and pinned Node.js to 24.14.1; no functional concerns.
src/client.ts SDK version header bumped from 12.2.0 to 13.0.0; one-line change, correct.

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

Comment thread src/services/project.ts
* @returns {Promise<Models.OAuth2Google>}
*/
updateOAuth2Google(params?: { clientId?: string, clientSecret?: string, enabled?: boolean }): Promise<Models.OAuth2Google>;
updateOAuth2Google(params?: { clientId?: string, clientSecret?: string, prompt?: Prompt[], enabled?: boolean }): Promise<Models.OAuth2Google>;
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 Type mismatch between Prompt and OAuth2GooglePrompt

updateOAuth2Google accepts Prompt[] as input, but Models.OAuth2Google.prompt is typed as OAuth2GooglePrompt[]. Because TypeScript string enums are nominally typed, a value of Prompt cannot be assigned to OAuth2GooglePrompt (and vice versa) without an explicit cast. This breaks the common read-then-write pattern: project.updateOAuth2Google({ prompt: googleConfig.prompt }) will fail with a type error since googleConfig.prompt is OAuth2GooglePrompt[], not Prompt[]. One of the two types should be used consistently — since the model already uses OAuth2GooglePrompt, the method signature should match it.

Comment on lines +1 to +5
export enum OAuth2GooglePrompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
} No newline at end of file
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 Missing newline at end of file. Most editors and linters expect a trailing newline, and its absence can cause noisy diffs.

Suggested change
export enum OAuth2GooglePrompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
}
export enum OAuth2GooglePrompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
}

Comment thread src/enums/prompt.ts
Comment on lines +1 to +5
export enum Prompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
} No newline at end of file
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 Missing newline at end of file, same as o-auth-2-google-prompt.ts.

Suggested change
export enum Prompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
}
export enum Prompt {
None = 'none',
Consent = 'consent',
SelectAccount = 'select_account',
}

@ArnabChatterjee20k ArnabChatterjee20k merged commit 253a392 into main May 12, 2026
2 checks 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.

2 participants