Skip to content

SK-3004: Beta Release changes for flowDB suppport - #719

Merged
yaswanth-pula-skyflow merged 8 commits into
beta-release/26.7.4from
release/26.7.4
Jul 31, 2026
Merged

SK-3004: Beta Release changes for flowDB suppport #719
yaswanth-pula-skyflow merged 8 commits into
beta-release/26.7.4from
release/26.7.4

Conversation

@yaswanth-pula-skyflow

Copy link
Copy Markdown
Collaborator

SK-3004: FlowDB support for Collect & Reveal elements

Summary

Adds support for the new flowDB (/v2) vault API across the Elements (iframe) flows — Collect, Composable Collect, and Reveal — alongside the existing privacyDB implementation. Introduces flowDB-specific request/response
construction, a dedicated error contract, and updated upsert options, and restricts the client-level CRUD/file APIs to internal use.

Why

flowDB uses a different request/response and error contract than privacyDB (new record shape, inline per-record errors, new upsert semantics). The SDK's Element flows needed to speak this contract while keeping existing behaviour
intact.

Key changes

Response / error contract (flowDB)

  • New record shape: { tableName, skyflowId, tokens, httpCode }
    (vs privacyDB { table, fields: { skyflow_id, ... } }).
  • Partial failure → resolve as success with failed records inlined into
    records as { error, tableName, httpCode }.
  • Full failure → single { error } object, surfaced via the new
    SkyflowFlowDBError.
  • flowDB never returns a top-level errors[] array (the privacyDB shape).

New error type — src/libs/skyflow-flowdb-error.ts

  • SkyflowFlowDBError + normalizeFlowDBError() normalize the flowDB error
    body (snake_case grpc_code/http_code/http_status) into the SDK's
    camelCase convention, tolerating SkyflowError and bare-string inputs.

Collect / Reveal core-utils

  • src/core-utils/collect.ts: flowDB insert/update request builders and
    response/error parsers (constructFlowDBInsertRequest/Response/Error,
    insertDataInCollectFlowDB, updateDataInCollectFlowDB).
  • src/core-utils/reveal.ts: flowDB detokenize/reveal request + response
    parsing, including composable reveal formatting.

Upsert options (flowDB)

  • Now require { table, uniqueColumns } (+ optional updateType) instead of
    privacyDB's { table, column }.
  • New validations & error codes: MISSING_UNIQUE_COLUMNS_IN_UPSERT_OPTION,
    INVALID_UNIQUE_COLUMNS_IN_UPSERT_OPTION, INVALID_UPDATE_TYPE_IN_UPSERT_OPTION.
  • New Skyflow.UpdateType enum exposed on the client.

Reveal redaction

  • New token-group redaction validations + error codes
    (INVALID_TOKEN_GROUP_REDACTIONS_REVEAL,
    INVALID_TOKEN_GROUP_REDACTION_ENTRY_REVEAL).

API surface

  • Client-level CRUD/file methods are now private (#insert, #update,
    #detokenize, #get, #getById, #delete) — these flows are driven through
    Elements, not called directly on the client.

Tests

  • New flowDB suites: collect.flowdb.test.js, reveal.flowdb.test.js,
    frame-element-init.flowdb.test.js, composable-frame-element-init.flowdb.test.js,
    skyflow-frame-controller.detokenize.flowdb.test.js,
    skyflow-frame-controller-upload-tokenize.test.js.

yaswanth-pula-skyflow and others added 8 commits July 29, 2026 21:45
* SK-3004:Add flowdb implementation for collect & composable elements.

* SK-3004:Add flowdb implementation for Reveal elements.

* SK-3004:Update flowdb upsert options in collect options.

* SK-3004:Update response & error parsing.

* SK-3004:Update response & error parsing for reveal elements.

* SK-3004:Update SkyflowID to SkyflowId.

* SK-3004:Update Reveal response structure.

* SK-3004:Update FlowDB support changes w.r.t latest contract.

* SK-3004:Update & skip tests cases w.r.t privacyDB changes.
* SK-3004:Update README with flowdb changes.

* SK-3004:Expose missing flowDB response types.

* SK-3004:Update samples w.r.t flowDB changes.

* SK-3004:Update upsert type table to tableName.

* SK-3004:Update samples with SkyflowError type.
* SK-3004:Update table to tableName in Collect Element.

* SK-3004:Add Mock CVV token support in collect elements.

* SK-3004:Update samples with tableName key update.
@github-actions

Copy link
Copy Markdown

🔐 Gitleaks Findings: 14 issue(s) detected

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

🔸 Rule: generic-api-key
📄 File: README.md:null
📝 Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
🔑 Secret: **********
🔗 Path: README.md:null

...and more. Only showing first 10 findings.

@yaswanth-pula-skyflow
yaswanth-pula-skyflow changed the base branch from main to beta-release/26.7.4 July 31, 2026 15:48
@github-actions

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@yaswanth-pula-skyflow

Copy link
Copy Markdown
Collaborator Author

Will address while refactoring test coverage.

@yaswanth-pula-skyflow
yaswanth-pula-skyflow merged commit 9e3bd1b into beta-release/26.7.4 Jul 31, 2026
4 of 6 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