Lib
The sdk.lib
object exposes a curated set of third-party libraries and native Node.js modules that you can use within your server-side Custom Functions in GridStudio. These libraries are pre-integrated and ready to use—eliminating the need for manual installation or configuration.
Available Libraries
Property | Description |
---|---|
OpenAI | Official OpenAI Node.js SDK |
Algolia | Official Algolia Search Client |
fetch | Server-side Fetch API polyfill |
fetchHeaders | The Headers class from Fetch API |
fetchRequest | The Request class from Fetch API |
fetchResponse | The Response class from Fetch API |
URLSearchParams | Node's native URLSearchParams utility |
PDFKit | Extended version of pdfkit for creating tables in PDFs |
crypto | Node.js built-in Crypto module |
DDP | Meteor's internal DDP client |
Buffer | Node.js native Buffer utility for encoding/decoding |
Example
const hash = sdk.lib.crypto.createHash('sha256')
hash.update('my secret data')
const result = hash.digest('hex')
sdk.utils.logger.info('Hashed value:', result)
const pdfDoc = new sdk.lib.PDFKit()
pdfDoc.text('Hello from GridStudio Server SDK!')
Notes
- All libraries are imported server-side and ready to use without additional setup.
- Not all third-party modules are available—contact GridStudio support if you need a specific library.