{"id":26579859,"url":"https://github.com/mondaycom/apps-sdk","last_synced_at":"2026-02-26T15:05:32.993Z","repository":{"id":208796270,"uuid":"589945505","full_name":"mondaycom/apps-sdk","owner":"mondaycom","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-16T12:15:40.000Z","size":589,"stargazers_count":3,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T18:07:31.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mondaycom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-17T10:06:50.000Z","updated_at":"2025-02-11T09:47:23.000Z","dependencies_parsed_at":"2024-05-09T07:41:43.046Z","dependency_job_id":"76c88a8e-f2cb-4743-aa25-26dbd7bb1a2d","html_url":"https://github.com/mondaycom/apps-sdk","commit_stats":{"total_commits":184,"total_committers":9,"mean_commits":"20.444444444444443","dds":0.5597826086956521,"last_synced_commit":"15e269ef870e80d2206dbb943d5c5d8bb169ebb6"},"previous_names":["mondaycom/apps-sdk"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondaycom%2Fapps-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondaycom%2Fapps-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondaycom%2Fapps-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mondaycom%2Fapps-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mondaycom","download_url":"https://codeload.github.com/mondaycom/apps-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066061,"owners_count":20555391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T06:29:17.431Z","updated_at":"2026-02-26T15:05:32.987Z","avatar_url":"https://github.com/mondaycom.png","language":"TypeScript","readme":"# apps-sdk\n\nThis sdk is used to leverage some of the capabilities exposed via `\u003cmonday-code /\u003e`:\n\n\u003c!-- TOC --\u003e\n\n- [Storage](#storage)\n- [Secure storage](#secure-storage)\n- [Environment variables manager](#environment-variables-manager)\n- [Logger](#logger)\n\u003c!-- TOC --\u003e\n\n## Storage\n\n\u003ch4 style=\"color:red\"\u003e\u003cb\u003e* Please note Storage contracts have been updated at version v1.0.0 *\u003c/b\u003e\u003c/h4\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ekey/value storage for monday-code projects\u003c/summary\u003e\n\n- This is the way to store customer data for your app\n- **_key/value_** based where the **_key_** is a `string` and **_value_** can be `any serializable type` (object, number, string, etc.)\n- **_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\n- There are two modes for the storage which are based on a passed option `shared`:\n  - `false` _(default)_ - The stored data will be accessible **only** you \"backend\" oriented apps (storage will not be shared between integrations and views).\n  - `true` - The stored data will be accessible from **both** \"backend\" and \"frontend\" oriented apps.\n\n### Storage API\n\nThere are four methods exposed to manage the storage - `set`, `get`, `search` and `delete`\n\n#### Initialize\n\n- `\u003cACCESS_TOKEN\u003e` - access token of the customer/account the app is working on behalf of\n\n```typescript\nimport { Storage } from '@mondaycom/apps-sdk';\n\nconst storage = new Storage('\u003cACCESS_TOKEN\u003e');\n```\n\n#### Set\n\n- `key: string` - key to store the content for\n- `value: any` - value to store\n- `previousVersion?: string` - the last version of the stored value for a specific key (_OPTIONAL_)\n- `shared?: boolean` - whether the stored data will be accessible from both \"backend\" and \"frontend\" oriented apps (_OPTIONAL_)\n- `ttl?: number` - a time value in seconds, after which the value will be deleted and will no longer be available to fetch (_OPTIONAL_)\n- `version: string` - the new version of the stored value\n\n```typescript\nconst { version, success, error } = await storage.set(key, value, { previousVersion, shared });\n```\n\n#### get\n\n```typescript\nconst { value, version, success } = await storage.get(key, { shared });\n```\n\n#### search\n\n- `key: string` - key aka 'key part' the key must include this string (case insensitive)\n- `cursor: string` - current position within the paginated dataset (_OPTIONAL_)\n\n```typescript\nconst { records, cursor, success } = await storage.search(key, { cursor });\n```\n\n#### delete\n\n```typescript\nconst { success, error } = await storage.delete(key, { shared });\n```\n\n\u003c/details\u003e\n\n## Secure storage\n\n\u003cdetails\u003e\n\u003csummary\u003ekey/value secure storage for monday-code projects\u003c/summary\u003e\n\n- This is the way to store sensitive customer data (i.e access tokens generated by OAuth for example)\n- Has 3 different modes (dependent on where it is used)\n  - `Secure storage` - when used in a deployed `\u003cmonday-code/\u003e` project it will automatically utilize the **real** secure storage\n  - `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.\n    \u003e If there are no permissions to write files on the disk, Local \"secure storage\" will not be persisted\n- **_key/value_** based where the **_key_** is a `string` and **_value_** can be `any type` (object, number, string, etc.)\n- **_compartmentalized_** for your **specific app** which means that data stored for one app will not be accessible by other apps\n\n### Secure Storage API\n\nThere are three methods exposed to manage the storage - `set`, `get` and `delete`\n\n#### initialize\n\n```typescript\nimport { SecureStorage } from '@mondaycom/apps-sdk';\n\nconst secureStorage = new SecureStorage();\n```\n\n#### Set\n\n- `key: string` - key to store the content for\n- `value: any` - value to store (must be serializable)\n\n```typescript\nawait secureStorage.set(key, value);\n```\n\n#### get\n\n```typescript\nconst storedValue = await secureStorage.get(key);\n```\n\n#### delete\n\n```typescript\nawait secureStorage.delete(key);\n```\n\n\u003c/details\u003e\n\n## Environment variables manager\n\n\u003cdetails\u003e\n\u003csummary\u003eRead environment variables in monday-code projects\u003c/summary\u003e\n\n- This is the way to **read** environment variables for your app in a project deployed `\u003cmonday-code/\u003e`.\n- Environment variables set via [@mondaycom/apps-cli](https://www.npmjs.com/package/@mondaycom/apps-cli)\n  ```shell\n  $ mapps code:env -m set -k \u003ckey\u003e -v \u003cvalue\u003e\n  ```\n- The environment variables are on the **app** level which means that they are accessible by all the **versions** of the app\n\n### Environment variables manager API\n\nThere are two methods exposed to manage the environment variables - `get` and `getKeys`\n\n#### initialize\n\n```typescript\nimport { EnvironmentVariablesManager } from '@mondaycom/apps-sdk';\n\n// Initialize the environment variables manager without injecting env into `process.env`\nlet envManager = new EnvironmentVariablesManager();\n\n// Initialize the environment variables manager and inject env into `process.env`\nenvManager = new EnvironmentVariablesManager({ updateProcessEnv: true });\n```\n\n#### get\n\n```typescript\n// Get cached environment variable\nconst cachedValue = envManager.get(key, { invalidate: false });\n\n// Get the latest version of environment variable\nconst latestValue = envManager.get(key);\n```\n\n#### getKeys\n\n```typescript\n// Get all cached environment variables keys\nconst cachedKeys = envManager.getKeys({ invalidate: false });\n\n// Get all environment variables keys\nconst latestKeys = envManager.getKeys();\n```\n\n\u003c/details\u003e\n\n## Secrets manager\n\n\u003cdetails\u003e\n\u003csummary\u003eRead secrets in monday-code projects\u003c/summary\u003e\n\n- This is the way to **read** secrets for your app in a project deployed `\u003cmonday-code/\u003e`.\n- Secrets are set via the Secrets tab in the Dev Center UI in the monday code section\n\n### Secrets manager API\n\nThere are two methods exposed to manage the secrets - `get` and `getKeys`\n\n#### initialize\n\n```typescript\nimport { SecretsManager } from '@mondaycom/apps-sdk';\n\nconst secretsManager = new SecretsManager();\n```\n\n#### get\n\n```typescript\n// Get cached secrets\nconst cachedValue = secretsManager.get(key, { invalidate: false });\n\n// Get the latest version of a secret\nconst latestValue = secretsManager.get(key);\n```\n\n#### getKeys\n\n```typescript\n// Get all cached secrets keys\nconst cachedKeys = secretsManager.getKeys({ invalidate: false });\n\n// Get all secrets keys\nconst latestKeys = secretsManager.getKeys();\n```\n\n\u003c/details\u003e\n\n## Logger\n\n\u003cdetails\u003e\n\n\u003csummary\u003eRecommended logger for monday-code projects\u003c/summary\u003e\n\n- This `logger` provides a simple way to log messages for your app in a project deployed `\u003cmonday-code/\u003e`.\n- Logged messages are accessible via via [@mondaycom/apps-cli](https://www.npmjs.com/package/@mondaycom/apps-cli)\n  ```shell\n  $ mapps code:logs\n  ```\n- Logs written **without** this logger may not be accessible via [@mondaycom/apps-cli](https://www.npmjs.com/package/@mondaycom/apps-cli) or not get labeled correctly\n\n### Logger API\n\nThere are four methods exposed to manage the environment variables - `info`, `warn`, `error` and `debug`.\n\n#### initialize\n\n```typescript\nimport { Logger } from '@mondaycom/apps-sdk';\n\nconst tag = 'my-app';\n// tag will be added to every logged message\nconst logger = new Logger(tag);\n```\n\n#### info\n\n```typescript\nlogger.info('info message');\n```\n\n#### warn\n\n```typescript\nlogger.warn('warn message');\n```\n\n#### debug\n\n```typescript\nlogger.debug('debug message');\n```\n\n#### error\n\n```typescript\n// Stack trace will be logged as well if error is provided\nlogger.error('error message', { error: new Error('error') });\n```\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondaycom%2Fapps-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmondaycom%2Fapps-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmondaycom%2Fapps-sdk/lists"}