Skip to content

SK-2708 fix readme and sample gaps#320

Open
skyflow-bharti wants to merge 1 commit into
mainfrom
SK-2708-identify-and-fix-gaps-in-readme-and-samples
Open

SK-2708 fix readme and sample gaps#320
skyflow-bharti wants to merge 1 commit into
mainfrom
SK-2708-identify-and-fix-gaps-in-readme-and-samples

Conversation

@skyflow-bharti
Copy link
Copy Markdown
Collaborator

SK-2708: Fix README and sample gaps

Summary

  • Documented all previously undocumented or under-documented public exports in README.md
  • Fixed incorrect and deprecated API usage across sample files
  • Expanded all Options classes in samples to show every available setter as commented alternatives, following the file-upload.ts pattern

README changes

New sections added

  • Runtime client management — documents all 12 Skyflow class public methods (addVaultConfig, updateVaultConfig, getVaultConfig, removeVaultConfig, addConnectionConfig, updateConnectionConfig, getConnectionConfig, removeConnectionConfig, setLogLevel, getLogLevel, updateSkyflowCredentials, getSkyflowCredentials) with code examples
  • Configure a connection — documents ConnectionConfig shape (connectionId, connectionUrl, optional credentials)
  • Per-record errors (SkyflowRecordError) — documents the error shape returned in response.errors arrays
  • TypeScript types reference — new section covering credential sub-types, response record interfaces, request item shapes, and FileInput

Existing sections expanded

  • InsertOptions — added setTokens, setHomogeneous, setTokenMode + full TokenMode enum table
  • UpdateOptions — added code example using UpdateOptions + reference table for all 3 setters
  • GetOptions — added reference table for all 9 setters + OrderByEnum table
  • FileUploadOptions — added reference table for all 5 setters (setFilePath, setBase64, setFileName, setFileObject, setSkyflowId)
  • DeidentifyFileOptions — added reference table for all 15 setters including image, audio, PDF, and Bleep class setters
  • TokenFormat — added setVaultToken, setEntityUniqueCounter, setEntityOnly alongside existing setDefault
  • generateBearerToken / generateBearerTokenFromCreds — documented BearerTokenOptions and GenerateTokenOptions types
  • generateSignedDataTokens — merged generateSignedDataTokensFromCreds into same section with SignedDataTokensOptions type
  • VaultConfig — added optional credentials field
  • isExpired — added usage example

Bug fixes

  • Removed DELETE from RequestMethod values list (not in the enum)
  • Fixed optionsText typo → options in De-identify Text example
  • Fixed undefined variable references in Runtime management code blocks (updatedCredentials, updatedConnectionConfig, newCredentials)
  • Fixed creds undefined variable in credential sub-types example
  • Fixed http_codehttpCode in error handling example (camelCase is the current API)

Sample changes

samples/README.md

  • Added 5 missing files: client-operations.ts, credentials-options.ts, data-residency.ts, deidentify-file-with-filepath.ts, deidentify-file-with-filepath-async.ts
  • Corrected insert-byot.ts label from "Upsert operations""Insert with bring-your-own tokens (BYOT)"

Misleading placeholder values fixed

Replaced skyflow_id-prefixed placeholder strings that looked like the deprecated skyflow_id API field:

File Change
insert-byot.ts Data values 'skyflow_id1'/'skyflow_id2''<TOKEN_1>'/'<TOKEN_2>'; token: 'bearer''<BEARER_TOKEN>'
detokenzie-records.ts token: 'token''<BEARER_TOKEN>'
delete-records.ts Record IDs 'skyflow_id1–3''<SKYFLOW_ID_1–3>'
credentials-options.ts Record IDs 'skyflow_id1–6''<SKYFLOW_ID_1–6>'

Internal ticket references removed

  • update-record.ts — removed // SK-2812: comment
  • get-records.ts — removed // NEW API (SK-2812): comment and deprecated setDownloadURL reference

Deprecated field reference fixed

  • deidentify-file-with-filepath-async.tserror.error?.http_codeerror.error?.httpCode

Missing options added (as commented alternatives)

File Options added
file-upload.ts setBase64 + setFileName (Option B), setFileObject (Option C)
insert-records.ts setContinueOnError, setUpsertColumn, setHomogeneous
update-record.ts setTokens, setTokenMode
get-records.ts setRedactionType, setFields, setOffset, setLimit, setOrderBy, setDownloadUrl, setColumnName/setColumnValues
get-column-values.ts setRedactionType, setFields, setOffset, setLimit, setOrderBy
deidentify-text.ts setVaultToken, setEntityUniqueCounter, setEntityOnly on TokenFormat; fixed optionsTextoptions

Test plan

  • Verify all README code examples compile without TypeScript errors
  • Verify all sample files run successfully against a real vault
  • Confirm no deprecated field names (http_code, skyflow_id, request_ID) remain in active sample code
  • Confirm all samples/README.md links resolve to existing files

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

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

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