Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
dd5ee35
SK-2455: add linter to node sdk v2
skyflow-himanshu Dec 23, 2025
9d7d6ec
aadarsh-st/SK-2495 Replace Hardcore values with constants
aadarsh-st Jan 23, 2026
68863e1
aadarsh-st/SK-2495-Fixed comments
aadarsh-st Jan 27, 2026
b4ecf5a
aadarsh-st/SK-2495 Updated message
aadarsh-st Jan 27, 2026
def7c2c
SK-2503: Add support for custom tokenUri (#275)
saileshwar-skyflow Jan 27, 2026
b1b0a25
[AUTOMATED] Private Release 2.0.2-dev.def7c2c
saileshwar-skyflow Jan 27, 2026
d0a72ad
SK-2503: comment registry url
saileshwar-skyflow Jan 27, 2026
bbfbf8e
[AUTOMATED] Private Release 2.0.2-dev.d0a72ad
saileshwar-skyflow Jan 27, 2026
d60b089
Merge pull request #277 from skyflowapi/SK-2495-Replace-hardcode-valu…
aadarsh-st Jan 28, 2026
5ca1767
[AUTOMATED] Private Release 2.0.2-dev.d60b089
aadarsh-st Jan 28, 2026
29fa821
aadarsh-st/SK-2510-Fixed all the mentioned issue
aadarsh-st Jan 28, 2026
969139f
aadarsh-st/SK-2495- Added linting in workflow
aadarsh-st Jan 28, 2026
f43033b
[AUTOMATED] Private Release 2.0.2-dev.969139f
aadarsh-st Jan 28, 2026
a6cc9b1
SK-2503: fix token uri option
saileshwar-skyflow Jan 28, 2026
63b6bbd
[AUTOMATED] Private Release 2.0.2-dev.a6cc9b1
saileshwar-skyflow Jan 28, 2026
9f592e9
SK-2503: fix options validation
saileshwar-skyflow Jan 28, 2026
2c0c27b
[AUTOMATED] Private Release 2.0.2-dev.9f592e9
saileshwar-skyflow Jan 28, 2026
4614faa
aadarsh-st/SK-2510-Fixed comment by copilot
aadarsh-st Jan 29, 2026
4ecd39b
aadarsh-st/SK-2510- Fixed copilot comments
aadarsh-st Jan 29, 2026
bf5c1aa
Merge pull request #279 from skyflowapi/SK-2510-Fix-Node-SDK-issues
aadarsh-st Jan 29, 2026
64e1f61
[AUTOMATED] Private Release 2.0.2-dev.bf5c1aa
aadarsh-st Jan 29, 2026
f709dfa
aadarsh-st/SK-2510: Commented registry-url
aadarsh-st Jan 29, 2026
315384e
Merge pull request #280 from skyflowapi/SK-2510-Fix-Node-SDK-issues
aadarsh-st Jan 29, 2026
68d62e5
[AUTOMATED] Private Release 2.0.2-dev.315384e
aadarsh-st Jan 29, 2026
c288801
SK-2536: Fix different content-types in request and respones in invok…
saileshwar-skyflow Feb 5, 2026
1d5d4ba
[AUTOMATED] Private Release 2.0.2-dev.c288801
saileshwar-skyflow Feb 5, 2026
fd4b08d
SK-2528: update jwt-decode library for Node SDK
skyflow-himanshu Feb 6, 2026
e1b78be
SK-2528: update jwt-decode library to v3.1.2 as v4.0.0 is ESM only
skyflow-himanshu Feb 9, 2026
ee58b89
SK-2528: added jwt_decode type
skyflow-himanshu Feb 9, 2026
4ad053a
Merge pull request #282 from skyflowapi/himanshu/SK-2528-update-libra…
skyflow-himanshu Feb 9, 2026
0cc7274
SK-2645: Merge branch 'release/26.1.5' into release/26.1.4
saileshwar-skyflow Mar 24, 2026
099ce5d
SK-2645: Merge branch 'release/26.2.2' into release/26.1.4
saileshwar-skyflow Mar 24, 2026
b08a439
[AUTOMATED] Private Release 2.0.2-dev.099ce5d
saileshwar-skyflow Mar 24, 2026
8a466d8
SK-2645: Fix inconsistencies identified in extracted public interface…
saileshwar-skyflow Mar 26, 2026
e3340d3
[AUTOMATED] Private Release 2.0.2-dev.8a466d8
saileshwar-skyflow Mar 26, 2026
6a2a399
SK-2812: Public interface cleanup
aadarsh-st May 11, 2026
5838274
SK-2812: Updated change log
aadarsh-st May 11, 2026
fe1af76
SK-2812: updated skyflowId
aadarsh-st May 11, 2026
5a561d7
SK-2812: Snapshots updated
aadarsh-st May 12, 2026
641e3bd
SK-2812: Updated new changes
aadarsh-st May 13, 2026
0e9b60d
SK-2812: updated package-lock
aadarsh-st May 13, 2026
a7a90fe
SK-2812: ESLint fix
aadarsh-st May 13, 2026
6f188df
SK-2812: Fixed test cases
aadarsh-st May 13, 2026
ec369e8
SK-2812: Updated samples
aadarsh-st May 14, 2026
f42d9f4
SK-2812:Updated env
aadarsh-st May 14, 2026
7ea910e
SK-2812: Implemneted Deprecation strategies
aadarsh-st May 15, 2026
f4f70f6
SK-2812: Fixed test cases
aadarsh-st May 15, 2026
173fbf8
SK-2812: Updated Readme and Changelog
aadarsh-st May 15, 2026
74b44fa
SK-2812: Fixed deprecation message format
aadarsh-st May 18, 2026
514ca62
SK-2812: Fixed test cases and readme
aadarsh-st May 18, 2026
ec2774f
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
6e849ce
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
9f07aba
SK-2812: Fixed critical review comments
aadarsh-st May 19, 2026
e96fbce
SK-2812: Fixed Quality issues
aadarsh-st May 19, 2026
3befbf9
SK-2812: Fixed smell issue
aadarsh-st May 19, 2026
3ed02a1
SK-2812: Fixed xritical review issues
aadarsh-st May 19, 2026
b82b6cc
SK-2812: Updateed contract and fixed test
aadarsh-st May 19, 2026
2d2bf5b
SK-2812: Fixed test case
aadarsh-st May 19, 2026
761a9db
SK-2812: Fix contract snapshot CI failure
aadarsh-st May 19, 2026
1495c4d
SK-2812: Regenerate API contract snapshot with removeComments:true
aadarsh-st May 19, 2026
e91461d
SK-2812: Reverted tsconfig
aadarsh-st May 19, 2026
1dfff9d
SK-2812: Updated contracts
aadarsh-st May 19, 2026
79883b6
SK-2812: Fixed test case
aadarsh-st May 19, 2026
11ce50a
SK-2812: Updated snapshot
aadarsh-st May 19, 2026
631d72c
SK-2182: Fixed request_ID missing at some places
aadarsh-st May 20, 2026
1f02591
[AUTOMATED] Private Release 2.0.4-dev.631d72c
aadarsh-st May 20, 2026
dd8d6c8
Revert: Remove accidentally merged SK-2812 and SK-2182 commits from r…
aadarsh-st May 20, 2026
4217ad7
Merge branch 'release/26.1.4' of https://github.com/skyflowapi/skyflo…
aadarsh-st May 20, 2026
bed43e7
[AUTOMATED] Private Release 2.0.4-dev.4217ad7
aadarsh-st May 20, 2026
e10db26
SK-2812: Public interface cleanup
aadarsh-st May 11, 2026
04bb5aa
SK-2812: Updated change log
aadarsh-st May 11, 2026
0f16501
SK-2812: updated skyflowId
aadarsh-st May 11, 2026
00021a5
SK-2812: Snapshots updated
aadarsh-st May 12, 2026
05fd2a0
SK-2812: Updated new changes
aadarsh-st May 13, 2026
9c0c966
SK-2812: updated package-lock
aadarsh-st May 13, 2026
1af5c94
SK-2812: ESLint fix
aadarsh-st May 13, 2026
f7689a5
SK-2812: Fixed test cases
aadarsh-st May 13, 2026
b970e77
SK-2812: Updated samples
aadarsh-st May 14, 2026
677e46d
SK-2812:Updated env
aadarsh-st May 14, 2026
ff24164
SK-2812: Implemneted Deprecation strategies
aadarsh-st May 15, 2026
fbd0c13
SK-2812: Fixed test cases
aadarsh-st May 15, 2026
f703d6f
SK-2812: Updated Readme and Changelog
aadarsh-st May 15, 2026
c37a0f7
SK-2812: Fixed deprecation message format
aadarsh-st May 18, 2026
6b4a90f
SK-2812: Fixed test cases and readme
aadarsh-st May 18, 2026
e9812db
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
2a890fb
SK-2812: Fixed code review issues
aadarsh-st May 19, 2026
b1426db
SK-2812: Fixed critical review comments
aadarsh-st May 19, 2026
84b10d8
SK-2812: Fixed Quality issues
aadarsh-st May 19, 2026
5eda10f
SK-2812: Fixed smell issue
aadarsh-st May 19, 2026
8995bef
SK-2812: Fixed xritical review issues
aadarsh-st May 19, 2026
937ceab
SK-2812: Updateed contract and fixed test
aadarsh-st May 19, 2026
21a7dc0
SK-2812: Fixed test case
aadarsh-st May 19, 2026
eb1763d
SK-2812: Fix contract snapshot CI failure
aadarsh-st May 19, 2026
ea96f46
SK-2812: Regenerate API contract snapshot with removeComments:true
aadarsh-st May 19, 2026
465ab13
SK-2812: Reverted tsconfig
aadarsh-st May 19, 2026
cb58e47
SK-2812: Updated contracts
aadarsh-st May 19, 2026
0981139
SK-2812: Fixed test case
aadarsh-st May 19, 2026
367aa49
SK-2812: Updated snapshot
aadarsh-st May 19, 2026
0cdd063
SK-2182: Fixed request_ID missing at some places
aadarsh-st May 20, 2026
a6d379f
SK-2812: Fixed request_ID
aadarsh-st May 20, 2026
fb756c0
Merge branch 'release/26.1.4' of https://github.com/skyflowapi/skyflo…
aadarsh-st May 20, 2026
3b06aad
[AUTOMATED] Private Release 2.0.4-dev.fb756c0
aadarsh-st May 20, 2026
f40b9ab
Revert: Remove accidentally merged SK-2812/SK-2182 commits from relea…
aadarsh-st May 20, 2026
3119c23
[AUTOMATED] Private Release 2.0.4-dev.f40b9ab
aadarsh-st May 20, 2026
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
385c843
Merge pull request #309 from skyflowapi/aadarsh-st/SK-2812-clean
aadarsh-st May 20, 2026
5fa3a82
[AUTOMATED] Private Release 2.0.4-dev.385c843
aadarsh-st May 20, 2026
be9f2fa
SK-2812: Updated test case
aadarsh-st May 20, 2026
75b8e84
SK-2812- Update http_code in test and readme
aadarsh-st May 21, 2026
37a4c10
SK-2812: Fixed content-type one
aadarsh-st May 21, 2026
b305ba6
SK-2812: Updated test failure
aadarsh-st May 21, 2026
48dea08
SK-2812: Updated test to 100%
aadarsh-st May 22, 2026
b956a71
Merge pull request #310 from skyflowapi/aadarsh-st/SK-2812-clean
aadarsh-st May 22, 2026
8b13e4f
[AUTOMATED] Private Release 2.0.4-dev.b956a71
aadarsh-st May 22, 2026
8e54dfb
SK-2841: Update deprecated samples
aadarsh-st May 22, 2026
50449fe
SK-2841: Updated samples
aadarsh-st May 22, 2026
1e682d5
SK-2841: Updated remaniing in samples
aadarsh-st May 22, 2026
5f85328
SK-2841: Removed duplicate changes
aadarsh-st May 22, 2026
9c51cb9
SK-2841: Updated placeholder
aadarsh-st May 22, 2026
059fe3f
Merge pull request #312 from skyflowapi/SK-2841-update-deprecated-sam…
aadarsh-st May 22, 2026
dc92184
[AUTOMATED] Private Release 2.0.4-dev.059fe3f
aadarsh-st May 22, 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
3 changes: 3 additions & 0 deletions .github/workflows/common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- name: Install Packages
run: npm install

- name: Run ESLint
run: npm run eslint

- name: Run Tests
env:
SA_WITHOUT_CONTEXT: ${{ secrets.SA_WITHOUT_CONTEXT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/common-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '20.x'
registry-url: "https://registry.npmjs.org"
# registry-url: "https://registry.npmjs.org"

- name: Install Packages
run: npm install
Expand Down
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.

---
26 changes: 18 additions & 8 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 Expand Up @@ -932,7 +942,7 @@ try {
// catch an error, identify if it is a SkyflowError
if (error instanceof SkyflowError) {
console.error("Skyflow Specific Error:", {
code: error.error?.http_code,
code: error.error?.httpCode,
message: error.message,
details: error.error?.details,
});
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