Skip to content

feat: SDK update for version 15.7.0 - #108

Merged
ChiragAgg5k merged 1 commit into
mainfrom
dev
Jul 28, 2026
Merged

feat: SDK update for version 15.7.0#108
ChiragAgg5k merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 28, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 15.7.0.

What's Changed

  • Added: waf.createChallengeRule() and waf.updateChallengeRule() for managing challenge rules
  • Added: WafRuleChallenge model
  • Added: specification parameter to update() on tablesDB, documentsDB, and vectorsDB
  • Added: folder parameter to storage.createFile() for placing files in virtual folders
  • Updated: backups.createRestoration() documents in-place restores when newResourceId is omitted

@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 15.7.0 feat: SDK update for version 15.7.0 Jul 28, 2026
Comment on lines +551 to +566
update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
update(
paramsOrFirst: { databaseId: string, name: string, enabled?: boolean, replicas?: number } | string,
...rest: [(string)?, (boolean)?, (number)?]
paramsOrFirst: { databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number } | string,
...rest: [(string)?, (boolean)?, (string)?, (number)?]
): Promise<Models.Database> {
let params: { databaseId: string, name: string, enabled?: boolean, replicas?: number };
let params: { databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number };

if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
params = (paramsOrFirst || {}) as { databaseId: string, name: string, enabled?: boolean, replicas?: number };
params = (paramsOrFirst || {}) as { databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number };
} else {
params = {
databaseId: paramsOrFirst as string,
name: rest[0] as string,
enabled: rest[1] as boolean,
replicas: rest[2] as number
specification: rest[2] as string,
replicas: rest[3] as number

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 Replica argument becomes specification

When an existing JavaScript consumer uses the previous positional form update(databaseId, name, enabled, replicas), the replica count is now assigned to specification and replicas is omitted, causing request validation to fail or the wrong database update to be applied. The same positional shift is present in the TablesDB and VectorsDB update methods.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/documents-db.ts
Line: 551-566

Comment:
**Replica argument becomes specification**

When an existing JavaScript consumer uses the previous positional form `update(databaseId, name, enabled, replicas)`, the replica count is now assigned to `specification` and `replicas` is omitted, causing request validation to fail or the wrong database update to be applied. The same positional shift is present in the TablesDB and VectorsDB update methods.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

Comment thread src/services/storage.ts
Comment on lines +562 to +581
createFile(bucketId: string, fileId: string, file: File, permissions?: string[], folder?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
createFile(
paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,
...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?]
paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], folder?: string, onProgress?: (progress: UploadProgress) => void } | string,
...rest: [(string)?, (File)?, (string[])?, (string)?,((progress: UploadProgress) => void)?]
): Promise<Models.File> {
let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };
let params: { bucketId: string, fileId: string, file: File, permissions?: string[], folder?: string };
let onProgress: ((progress: UploadProgress) => void);

if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };
params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[], folder?: string };
onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);
} else {
params = {
bucketId: paramsOrFirst as string,
fileId: rest[0] as string,
file: rest[1] as File,
permissions: rest[2] as string[]
permissions: rest[2] as string[],
folder: rest[3] as string
};
onProgress = rest[3] as ((progress: UploadProgress) => void);
onProgress = rest[4] as ((progress: UploadProgress) => void);

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 Upload callback becomes folder value

When an existing JavaScript consumer uses the previous positional form createFile(bucketId, fileId, file, permissions, onProgress), the callback is assigned to folder while onProgress becomes undefined, causing progress notifications to stop and a stringified callback to be sent as the multipart folder value.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/storage.ts
Line: 562-581

Comment:
**Upload callback becomes folder value**

When an existing JavaScript consumer uses the previous positional form `createFile(bucketId, fileId, file, permissions, onProgress)`, the callback is assigned to `folder` while `onProgress` becomes undefined, causing progress notifications to stop and a stringified callback to be sent as the multipart folder value.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates the Console SDK to 15.7.0.

  • Adds challenge-rule WAF methods and the corresponding model.
  • Adds database specification updates and virtual storage folders.
  • Updates backup, failover, WAF-condition documentation, examples, package metadata, and SDK headers.

Confidence Score: 3/5

The positional overload regressions must be fixed before merging because existing JavaScript callers can send malformed database and upload requests.

New optional parameters were inserted before established positional arguments, so old calls reinterpret replica counts as database specifications and upload callbacks as folder values.

Files Needing Attention: src/services/documents-db.ts, src/services/tables-db.ts, src/services/vectors-db.ts, src/services/storage.ts

Important Files Changed

Filename Overview
src/services/storage.ts Adds folder support to file uploads but breaks the previous positional progress-callback argument.
src/services/documents-db.ts Adds specification updates but shifts the existing positional replicas argument.
src/services/tables-db.ts Adds specification updates with the same positional compatibility break.
src/services/vectors-db.ts Adds specification updates with the same positional compatibility break.
src/services/waf.ts Adds challenge-rule create and update methods following the existing WAF endpoint and payload patterns.
src/models.ts Adds the WafRuleChallenge response model.

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
src/services/documents-db.ts:551-566
**Replica argument becomes specification**

When an existing JavaScript consumer uses the previous positional form `update(databaseId, name, enabled, replicas)`, the replica count is now assigned to `specification` and `replicas` is omitted, causing request validation to fail or the wrong database update to be applied. The same positional shift is present in the TablesDB and VectorsDB update methods.

### Issue 2
src/services/storage.ts:562-581
**Upload callback becomes folder value**

When an existing JavaScript consumer uses the previous positional form `createFile(bucketId, fileId, file, permissions, onProgress)`, the callback is assigned to `folder` while `onProgress` becomes undefined, causing progress notifications to stop and a stringified callback to be sent as the multipart folder value.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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

@ChiragAgg5k
ChiragAgg5k merged commit b6e9ef5 into main Jul 28, 2026
2 checks passed
ChiragAgg5k added a commit that referenced this pull request Jul 30, 2026
main received 15.7.0 as a squash merge (#108), so the same change exists
under a different commit on each branch. main's tree is identical to dev's
15.7.0 commit, so dev's generated 15.8.0 tree is kept as-is.
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