Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mondaycom/apps-sdk

Package Overview
Dependencies
Maintainers
8
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mondaycom/apps-sdk

monday apps SDK for NodeJS

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-8.16%
Maintainers
8
Weekly downloads
 
Created
Source

apps-sdk

This sdk is used to leverage some of the capabilities exposed via <monday-code />:

  • Storage - A Key/Value storage
  • Secure Storage - A key/Value secure storage

Table of Contents

  • Storage
  • Secure storage _ Secure Storage API _ initialize _ Set _ get * delete

Storage

  • This is the way to store customer data for your app
  • key/value based where the key is a string and value can be any serializable type (object, number, string, etc.)
  • compartmentalized based on accountId and app for your specific app which means that data stored for one account will not be accessible from the context of another account

Storage API

There are three methods exposed to manage the storage - set, get and delete

Initialize
  • <ACCESS_TOKEN> - access token of the customer/account the app is working on behalf of
import { Storage } from '@mondaycom/apps-sdk';

const storage = new Storage(<ACCESS_TOKEN>);
Set
  • key: string - key to store the content for
  • value: any - value to store
  • previousVersion?: string - the last version of the stored value for a specific key (OPTIONAL)
  • version: string - the new version of the stored value
const { version } = await storage.set(key, value, { previousVersion });
get
const storedValue = await storage.get(key);
delete
await storage.delete(key);

Secure storage

  • This is the way to store sensitive customer data (i.e access tokens generated by OAuth for example)
  • Has 3 different modes (dependent on where it is used)
    • Secure storage - when used in a deployed <monday-code/> project it will automatically utilize the real secure storage
    • Local "secure storage" - a local mock db which will mimic the api exposed by the real secure storage. Will work in this mode when sdk is used locally.

      If there are no permissions to write files on the disk, Local "secure storage" will not be persisted

  • key/value based where the key is a string and value can be any type (object, number, string, etc.)
  • compartmentalized for your specific app which means that data stored for one app will not be accessible by other apps

Secure Storage API

There are three methods exposed to manage the storage - set, get and delete

initialize
import { SecureStorage } from '@mondaycom/apps-sdk';

const secureStorage = new SecureStorage();
Set
  • key: string - key to store the content for
  • value: any - value to store (must be serializable)
await secureStorage.set(key, value);
get
const storedValue = await secureStorage.get(key);
delete
await secureStorage.delete(key);

FAQs

Package last updated on 18 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc