feat: SDK update for version 13.0.0#93
Conversation
Greptile SummaryThis PR ships the Console SDK 13.0.0 release, renaming three email-policy methods and adding a
Confidence Score: 3/5The 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 src/services/project.ts and src/models.ts — the prompt parameter type and model field type need to be reconciled. Important Files Changed
Reviews (1): Last reviewed commit: "chore: update Console SDK to 13.0.0" | Re-trigger Greptile |
| * @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>; |
There was a problem hiding this comment.
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.
| export enum OAuth2GooglePrompt { | ||
| None = 'none', | ||
| Consent = 'consent', | ||
| SelectAccount = 'select_account', | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing newline at end of file. Most editors and linters expect a trailing newline, and its absence can cause noisy diffs.
| export enum OAuth2GooglePrompt { | |
| None = 'none', | |
| Consent = 'consent', | |
| SelectAccount = 'select_account', | |
| } | |
| export enum OAuth2GooglePrompt { | |
| None = 'none', | |
| Consent = 'consent', | |
| SelectAccount = 'select_account', | |
| } |
| export enum Prompt { | ||
| None = 'none', | ||
| Consent = 'consent', | ||
| SelectAccount = 'select_account', | ||
| } No newline at end of file |
There was a problem hiding this comment.
This PR contains updates to the SDK for version 13.0.0.
What's Changed
updateCanonicalEmailstoupdateDenyCanonicalEmailPolicyonProjectserviceupdateDisposableEmailstoupdateDenyDisposableEmailPolicyonProjectserviceupdateFreeEmailstoupdateDenyFreeEmailPolicyonProjectservicepromptparameter onupdateOAuth2Googlefor Google OAuth2 prompt configurationPromptandOAuth2GooglePromptenumspromptfield onOAuth2Googlemodel