Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6d8526a
SK-2812: Public interface cleanup
aadarsh-st May 11, 2026
1891eb9
SK-2812: Updated change log
aadarsh-st May 11, 2026
09770ad
SK-2812: updated skyflowId
aadarsh-st May 11, 2026
a25fca8
SK-2812: Snapshots updated
aadarsh-st May 12, 2026
d4f0660
SK-2812: Updated new changes
aadarsh-st May 13, 2026
730b655
SK-2812: updated package-lock
aadarsh-st May 13, 2026
424ccda
SK-2812: ESLint fix
aadarsh-st May 13, 2026
086dc18
SK-2812: Fixed test cases
aadarsh-st May 13, 2026
d7e7a21
SK-2812: Updated samples
aadarsh-st May 14, 2026
4cc6d2d
SK-2812:Updated env
aadarsh-st May 14, 2026
36ed4ea
SK-2812: Implemneted Deprecation strategies
aadarsh-st May 15, 2026
4e45981
SK-2812: Fixed test cases
aadarsh-st May 15, 2026
a7b221b
SK-2812: Updated Readme and Changelog
aadarsh-st May 15, 2026
2b89185
SK-2812: Fixed deprecation message format
aadarsh-st May 18, 2026
ebd2679
SK-2812: Fixed test cases and readme
aadarsh-st May 18, 2026
20021f0
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
db6eae9
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
96f5388
SK-2812: Fixed critical review comments
aadarsh-st May 19, 2026
f086d23
SK-2812: Fixed Quality issues
aadarsh-st May 19, 2026
a2ec345
SK-2812: Fixed smell issue
aadarsh-st May 19, 2026
c1d915d
SK-2812: Fixed xritical review issues
aadarsh-st May 19, 2026
50000ff
SK-2812: Updateed contract and fixed test
aadarsh-st May 19, 2026
1adc43e
SK-2812: Fixed test case
aadarsh-st May 19, 2026
2508fb9
SK-2812: Fix contract snapshot CI failure
aadarsh-st May 19, 2026
816c176
SK-2812: Regenerate API contract snapshot with removeComments:true
aadarsh-st May 19, 2026
02b80c9
SK-2812: Reverted tsconfig
aadarsh-st May 19, 2026
20d17e8
SK-2812: Updated contracts
aadarsh-st May 19, 2026
c875b24
SK-2812: Fixed test case
aadarsh-st May 19, 2026
a6d3b6d
SK-2812: Updated snapshot
aadarsh-st May 19, 2026
bf0aec5
SK-2182: Fixed request_ID missing at some places
aadarsh-st May 20, 2026
334d019
SK-2812: Fixed request_ID
aadarsh-st May 20, 2026
b5f16bf
SK-2812: Deleted warnonce
aadarsh-st May 20, 2026
244ba10
SK-2812: Fixed test cases
aadarsh-st May 20, 2026
2a1dd05
SK-2812: updated readme
aadarsh-st May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

All notable changes to this project will be documented as part of the release notes.
All notable changes to this project will be documented as part of the release notes.

See [Github](https://github.com/skyflowapi/skyflow-node/releases) or [npm](https://www.npmjs.com/package/skyflow-node?activeTab=versions) for more details on each released version.
See [Github](https://github.com/skyflowapi/skyflow-node/releases) or [npm](https://www.npmjs.com/package/skyflow-node?activeTab=versions) for more details on each released version.

---
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Skyflow Node.js SDK

> **This is the current, recommended version of the Skyflow SDK.** V2.1.0 brings flexible auth, multi-vault support, builder patterns, native data types, and rich error diagnostics.
>
> Migrating from v1? See the **[Migration Guide](docs/migrate_to_v2.md)** for step-by-step instructions. V1 is in maintenance mode and will reach End of Life on October 31, 2026.

Securely handle sensitive data at rest, in-transit, and in-use with the Skyflow SDK for Node.js, Deno, Bun, and Cloudflare Workers.

[![CI](https://img.shields.io/static/v1?label=CI&message=passing&color=green?style=plastic&logo=github)](https://github.com/skyflowapi/skyflow-node/actions)
Expand Down Expand Up @@ -201,7 +205,7 @@ Upgrade from `skyflow-node` v1 using the dedicated guide in [docs/migrate_to_v2.

## Vault

The [Vault](https://docs.skyflow.com/docs/vaults) performs operations on the vault such as inserting records, detokenizing tokens, retrieving tokens for list of `skyflow_id`'s and to invoke the Connection.
The [Vault](https://docs.skyflow.com/docs/vaults) performs operations on the vault such as inserting records, detokenizing tokens, retrieving tokens for list of `skyflowId`s and to invoke the Connection.

### Insert and tokenize data: `.insert(request)`

Expand All @@ -228,6 +232,8 @@ const response: InsertResponse = await skyflowClient
console.log('Insert response:', response);
```

> **Note:** The response key is `skyflowId`. The legacy `skyflow_id` key is deprecated and will be removed in an upcoming release.

#### Insert example with `continueOnError` option

Set the `continueOnError` flag to `true` to allow insert operations to proceed despite encountering partial errors.
Expand Down Expand Up @@ -271,7 +277,7 @@ const detokenizeRequest = new DetokenizeRequest([

const detokenizeOptions = new DetokenizeOptions();
detokenizeOptions.setContinueOnError(true);
detokenizeOptions.setDownloadURL(false);
detokenizeOptions.setDownloadUrl(false);

const response: DetokenizeResponse = await skyflowClient
.vault(primaryVaultConfig.vaultId)
Expand Down Expand Up @@ -307,6 +313,8 @@ const response: GetResponse = await skyflowClient
console.log("Get response:", response);
```

> **Note:** The response key is `skyflowId`. The legacy `skyflow_id` key is deprecated and will be removed in an upcoming release.

#### Get by Skyflow IDs

Retrieve specific records using Skyflow IDs. Use this method when you know the exact record IDs.
Expand Down Expand Up @@ -413,6 +421,8 @@ const response: UpdateResponse = await skyflowClient
console.log('Update response:', response);
```

> **Note:** The response key is `skyflowId`. The legacy `skyflow_id` key is deprecated and will be removed in an upcoming release.

> [!TIP]
> See the full example in the samples directory: [update-record.ts](samples/vault-api/update-record.ts)

Expand Down Expand Up @@ -465,7 +475,7 @@ Refer to [Query your data](https://docs.skyflow.com/query-data/) and [Execute Qu

### Upload File

Upload files to a Skyflow vault using the `uploadFile` method. Create a file upload request with the `FileUploadRequest` class, which accepts parameters such as the table name, column name, and Skyflow ID. Configure upload options with the `FileUploadOptions` class, which accepts the file object as shown below:
Upload files to a Skyflow vault using the `uploadFile` method. Create a file upload request with the `FileUploadRequest` class, which accepts the table name and column name. Set the Skyflow ID via `FileUploadOptions.setSkyflowId()`. Configure upload options with the `FileUploadOptions` class, which accepts the file object as shown below:

```typescript
// Please use Node version 20 & above to run file upload
Expand All @@ -479,19 +489,19 @@ import * as fs from "fs";

// Prepare File Upload Data
const tableName: string = "table-name"; // Table name
const skyflowId: string = "skyflow-id"; // Skyflow ID of the record
const columnName: string = "column-name"; // Column name to store file
const skyflowId: string = "skyflow-id"; // Skyflow ID of the record
const filePath: string = "file-path"; // Path to the file for upload

// Create File Upload Request
const uploadReq: FileUploadRequest = new FileUploadRequest(
tableName,
skyflowId,
columnName,
);

// Configure FileUpload Options
const uploadOptions: FileUploadOptions = new FileUploadOptions();
uploadOptions.setSkyflowId(skyflowId); // Set the Skyflow ID via options
const buffer = fs.readFileSync(filePath);
// Set any one of FilePath, Base64 or FileObject in FileUploadOptions
uploadOptions.setFileObject(new File([buffer], filePath)); // Set a File object
Expand Down Expand Up @@ -857,11 +867,11 @@ Alternatively, you can also send the entire credentials as string by using `gene

#### Generate bearer tokens scoped to certain roles

Generate bearer tokens with access limited to a specific role by specifying the appropriate roleID when using a service account with multiple roles. Use this to limit access for services with multiple responsibilities, such as segregating access for billing and analytics. Generated bearer tokens are valid for 60 minutes and can only execute operations permitted by the permissions associated with the designated role.
Generate bearer tokens with access limited to a specific role by specifying the appropriate roleId when using a service account with multiple roles. Use this to limit access for services with multiple responsibilities, such as segregating access for billing and analytics. Generated bearer tokens are valid for 60 minutes and can only execute operations permitted by the permissions associated with the designated role.

```ts
const options = {
roleIDs: ['roleID1', 'roleID2'],
roleIds: ['roleId1', 'roleId2'],
};
```

Expand Down
47 changes: 47 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts",
"bundledPackages": [],
"compiler": {
"tsconfigFilePath": "<projectFolder>/tsconfig.json"
},
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>/api-report/",
"reportTempFolder": "<projectFolder>/temp/",
"reportFileName": "<unscopedPackageName>.api.md"
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": false
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
},
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-setter-with-docs": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
}
}
}
Loading
Loading