Skip to content

feat: Console SDK update for version 12.2.0#91

Closed
ArnabChatterjee20k wants to merge 1 commit into
mainfrom
clean-no-presences-20260508-1106
Closed

feat: Console SDK update for version 12.2.0#91
ArnabChatterjee20k wants to merge 1 commit into
mainfrom
clean-no-presences-20260508-1106

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

This PR contains updates to the Console SDK for version 12.2.0.\n\nThis branch is generated from main to avoid legacy dev-branch history (e.g. removed presences artifacts).

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 8, 2026

Greptile Summary

This PR updates the Console SDK to version 12.2.0, adding a new Presences service, bigint attribute/column support in Databases and TablesDB, new ProviderId and Range enums, OAuth2 provider listing improvements, and various variable API additions. However, two enum files contain TypeScript syntax errors that will prevent the package from compiling.

  • src/enums/range.ts declares three enum members (24h, 30d, 90d) whose names start with digits \u2014 invalid TypeScript identifiers that cause a compile-time syntax error; the Presences service imports this file directly.
  • src/enums/query-suggestion-resource.ts has a duplicate enum member Stats (lines 73\u201374: one mapped to 'presencelogs', another to 'stats'), triggering TS2300: Duplicate identifier 'Stats' and preventing compilation.
  • src/models.ts renames tokenUrl/userInfoUrl to tokenURL/userInfoURL on the OIDC provider model and src/services/proxy.ts renames updateRuleVerification \u2192 updateRuleStatus \u2014 both are breaking changes for existing consumers.

Confidence Score: 2/5

Not safe to merge as-is — two enum files contain syntax errors that will prevent the TypeScript compiler from building the package.

The Range enum uses digit-leading member names and QuerySuggestionResource has a duplicate Stats member; either error alone is enough to stop compilation, making the published SDK unusable. These need to be fixed before merging.

src/enums/range.ts and src/enums/query-suggestion-resource.ts must be corrected; src/models.ts and src/services/proxy.ts carry intentional but breaking renames worth calling out in the changelog.

Important Files Changed

Filename Overview
src/enums/query-suggestion-resource.ts Duplicate Stats enum member (lines 73–74) — one mapped to 'presencelogs', one to 'stats' — causes a TS2300 compile error; file will not compile.
src/enums/range.ts All three enum member names (24h, 30d, 90d) start with digits — invalid TypeScript identifiers; the file will not compile.
src/services/presences.ts New Presences service with list, getUsage, get, upsert, updatePresence, and delete methods; imports broken Range enum which will prevent compilation.
src/services/project.ts OAuth2 provider endpoints updated with new ProviderId enum; listOAuth2Providers gains query/total params; OIDC method updated with tokenURL/userInfoURL renames.
src/services/proxy.ts updateRuleVerification renamed to updateRuleStatus with updated endpoint path; listRules drops search parameter.
src/services/databases.ts Adds createBigIntAttribute and updateBigIntAttribute (deprecated in favour of TablesDB equivalents); AttributeBigint added to attribute union types.
src/services/functions.ts createVariable gains required variableId param; updateVariable makes key optional; listVariables adds queries/total params.
src/services/sites.ts Same variable API changes as functions.tscreateVariable gains variableId, updateVariable makes key optional, listVariables adds queries/total.
src/models.ts Adds AttributeBigint, ColumnBigint, Presence, PresenceList, UsagePresence types; renames tokenUrl/userInfoUrl to tokenURL/userInfoURL in OIDC model.
src/enums/provider-id.ts New ProviderId enum enumerating all OAuth2 provider identifiers; straightforward addition.
src/enums/proxy-rule-status.ts Removes Created = 'created' from the enum and reorders remaining values; breaking change for callers using ProxyRuleStatus.Created.

Reviews (1): Last reviewed commit: "feat: Console SDK update for version 12...." | Re-trigger Greptile

Comment on lines +73 to 74
Stats = 'presencelogs',
Stats = 'stats',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Duplicate enum member Stats causes a compile error

Lines 73 and 74 both declare Stats, which TypeScript rejects with TS2300: Duplicate identifier 'Stats'. The first entry maps to 'presencelogs' and the second to 'stats', so only one can survive — and as written, the file will not compile at all. The 'presencelogs' entry needs its own unique name (e.g. PresenceLogs = 'presencelogs').

Comment thread src/enums/range.ts
Comment on lines +1 to +5
export enum Range {
24h = '24h',
30d = '30d',
90d = '90d',
} 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.

P0 Enum member names starting with digits are invalid TypeScript identifiers

24h, 30d, and 90d are not valid TypeScript identifiers — they start with numeric digits, which is a syntax error. The TypeScript compiler will reject this file entirely. Member names must either be valid identifiers (e.g. H24 = '24h') or quoted string literals (e.g. '24h' = '24h'). Because Presences.getUsage passes a Range value directly to the API payload string, the simplest fix is to use string-literal member names: '24h' = '24h', '30d' = '30d', '90d' = '90d'.

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