Skip to content

SK-3004:Add Missing types & Update samples w.r.t flowDB support. - #714

Merged
yaswanth-pula-skyflow merged 5 commits into
release/26.7.4from
SK-3004/flowdb-samples
Jul 30, 2026
Merged

SK-3004:Add Missing types & Update samples w.r.t flowDB support.#714
yaswanth-pula-skyflow merged 5 commits into
release/26.7.4from
SK-3004/flowdb-samples

Conversation

@yaswanth-pula-skyflow

@yaswanth-pula-skyflow yaswanth-pula-skyflow commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

SK-3004: flowDB support — public response types + samples + Readme

Aligns the SDK's public TypeScript surface and all samples with the flowDB contract.

Expose missing flowDB response types (bf86553)

The flowDB request/options types were already public, but the response side still resolved to the old privacyDB shapes. This commit fixes that:

  • index-node.ts now exports the flowDB response types — CollectResponse, CollectRecord, RevealResponse, RevealRecord — from internal-types, replacing the stale V1 re-exports (CollectResponse/RevealResponse from common, and the misaliased IRevealRecord as RevealRecord).
  • Repointed collect() / reveal() return types in the collect, compose-collect, and reveal containers to the flowDB CollectResponse / RevealResponse (composable-reveal inherits via index-node).
  • Errors intentionally left as the already-exported SkyflowError class; common.RevealResponse (V1) kept intact as the privacyDB path still uses it.
  • npm run type-check passes.

Update samples w.r.t flowDB changes (cb20871)

Migrated using-npm, using-script-tag, and using-typescript samples to the flowDB shapes:

  • Collect response reads records[].tokens[column][0].token (was records[0].fields).
  • Collect options use additionalFields.records[].{tableName, data, skyflowId} and upsert[].{table, uniqueColumns}; dropped tokens: true.
  • Reveal elements are token-only; per-element redaction removed and applied via reveal({ tokenGroupRedactions }).
  • TS samples updated to the new type names (CollectOptions, AdditionalFields, AdditionalFieldsRecord, RevealOptions, …) and verified type-clean against the new types.
  • Removed privacyDB-only samples (pure-js CRUD, file-render/upload, 3ds helpers).

Rename upsert option key tabletableName

Aligns the flowDB upsert option with additionalFields.records[].tableName so both collect-option objects use the same key for the table name.

  • IFlowDBUpsertOptions.tabletableName (src/core-utils/collect.ts); getFlowDBUpsertForTable now matches on upsertOption.tableName.
  • Updated upsert validator (validateUpsertOptions) and validation error messages (MISSING_/INVALID_TABLE_IN_UPSERT_OPTION) to reference tableName.
  • Updated README upsert snippets (4 occurrences) and the upsert-support.html sample.
  • Updated flowDB collect + validator unit tests to the new key.

@yaswanth-pula-skyflow
yaswanth-pula-skyflow merged commit 3e81d7f into release/26.7.4 Jul 30, 2026
4 checks passed
yaswanth-pula-skyflow added a commit that referenced this pull request Jul 31, 2026
* SK-3004:Add Flowdb support for Collect & Reveal Elements. (#712)

* 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.

* [AUTOMATED] Release - 2.7.9-dev.dc2ceeb

* SK-3004:Add Missing types & Update samples w.r.t flowDB support. (#714)

* 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.

* [AUTOMATED] Release - 2.7.9-dev.3e81d7f

* SK-3004:Add mock cvv & tableName key update in collect elements. (#715)

* 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.

* [AUTOMATED] Release - 2.7.9-dev.fd11e15

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

* SK-3004:Update readme w.r.t flowdb changes.

---------

Co-authored-by: yaswanth-pula-skyflow <yaswanth-pula-skyflow@users.noreply.github.com>
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.

3 participants