Node.js SDK: Migrate from V1 to V2
Node.js SDK: Migrate from V1 to V2
Node.js SDK: Migrate from V1 to V2
This guide outlines the steps required to migrate the Skyflow Node.js SDK from version 1 (V1) to version 2 (V2).
V1 required a bearer token function. V2 lets you choose from five credential types and adds TypeScript support.
V1:
V2:
V2 introduces TypeScript support and multi-vault configuration. Log levels are now per-instance instead of global.
V1:
V2:
Key changes:
vaultURL replaced with clusterIdenv is now required (Env.PROD, Env.SANDBOX)V2 uses a typed InsertRequest class instead of a plain object. Responses use typed classes.
V1:
V2:
V1 response:
V2 response:
V2 uses an InsertOptions class with setter methods instead of a plain options object.
V1:
V2:
V2 errors include more detail to help with debugging.
V1:
V2:
Use the request_ID field when contacting Skyflow support — it uniquely identifies the request for faster diagnosis.