Skip to main content

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

PropertyDescription
OpenAIOfficial OpenAI Node.js SDK
AlgoliaOfficial Algolia Search Client
fetchServer-side Fetch API polyfill
fetchHeadersThe Headers class from Fetch API
fetchRequestThe Request class from Fetch API
fetchResponseThe Response class from Fetch API
URLSearchParamsNode's native URLSearchParams utility
PDFKitExtended version of pdfkit for creating tables in PDFs
cryptoNode.js built-in Crypto module
DDPMeteor's internal DDP client
BufferNode.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.